refactoring

Recursos de programación de refactoring
Symmetry is a subtle concept that may seem only related to code aesthetics. However, as Kent Beck states in Implementation Patterns, "...finding and expressing symmetry is a preliminary step to removing duplication. If a similar thought exists in several places in the code, making them symmetrical to each other is a first good step towards unifying them"In this post we'll look at an example of expressing symmetry as a way to make duplication more visible. This is the initial code of a version of...
These are great talks that I've seen during November:AgileByExample 2016: Henrik Kniberg - Keynote - Focus (or Stop Starting, Start Finishing)  Henrik Kniberg. As usualy Henrik deliver a great talk that inspired me a lot.DOES16 San Francisco - Time Theft: How Hidden and Unplanned Work Commit the Perfect Crime Great talk about the most important factors that destroy the productivity and the flow. Explain some off the concepts of Lean and is a great complement of to the classic ...
El objetivo del curso "Refactoring PHP" es mejorar el código PHP de nuestras aplicaciones sin miedo a romper la funcionalidad y mejorando el mantenimiento del código. La idea es aprender técnicas para mejorar nuestras habilidades como programadores y poder afrontar modificaciones en un código legado evitando los problemas comunes. Accede al curso en https://geekshubsacademy.com/cursos/refactoring-php
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability. However, what does this mean for my existing codebase? In this talk, we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner. We discuss things like: - How to adapt to requirement changes using first-class functions. - How you can enhance code reusability using currying. - How you can make your code more robust by favoring immutability over mutability. - How you can reduce null pointer exceptions with Optional. About Raoul CEO & Co-founder of Cambridge Coding Academy, PhD Computer Science, Co-author of Java 8 in Action Raoul-Gabriel Urma is CEO and Co-Founder of Cambridge Coding Academy. He is also author of the bestselling programming book “Java 8 in Action” which sold over 15,000 copies globally. Raoul completed a PhD in Computer Science at the University of Cambridge. In addition, he holds a MEng in Computer Science from Imperial College London and graduated with first class honours having won several prizes for technical innovation. Raoul has delivered over 60 technical talks at international conferences. He has worked for Google, eBay, Oracle, and Goldman Sachs. He is also a Fellow of the Royal Society of Arts. About Lambda World: The 2016 Lambda World brought together Functional Programming enthusiasts from around the world for two days of presentations, hacking, networking, and a healthy dose of partying in Cadiz, Spain. Hosted by 47 Degrees, the event also featured a Typelevel Community Conference and a Scala Center Hackathon. Join in on the conversation at http://www.twitter.com/lambda_world and http://www.twitter.com/47deg using #LambdaWorld. Stay tuned to http://www.lambda.world and http://www.47deg.com for more on the conference and announcements for the 2017 event.
Using literals in your tests can have some advantages, such as, readability and traceability. While this is true when the data are simple, it's less so when the data are nested, complex structures. In that case, using literals can hinder refactoring and thus become an obstacle to adapting to changes. The problem with using literals for complex, nested data is that the knowledge about how to build such data is spread all over the tests. There are many tests that know about the representation of...
Hace unas semanas estuvimos en el evento de la Software Craftsmanship Barcelona donde intentamos resolver la kata Incomprehensible Finder. Hoy os traemos la primera parte explicando nuestro enfoque a la hora de resolverla. Más info: http://codely.tv/screencasts/finder-kata-refactoring/
Recently at a Clojure Barcelona Developers event, we had a refactoring session in which we introduced Stuart Sierra's component library in a code that was already done: our previous solution to the Lights out kata. First, we put the code in charge of talking to the back end and updating the lights atom in a separated component, ApiLightsGateway: Then, we did the same for the lights code which was put in the Lights component: This component provided a place to create and close the channel we us...
I did Emily Bache's Parrot Refactoring Kata again (I did this kata in Java some time ago) but this time in Clojure. This is a very simple kata that is meant to practice the Replace Conditional with Polymorphism refactoring. This is the initial code of the kata that have to be refactored: Since Clojure provides several ways of achieving polymorphism, I did two versions of the kata: - One using protocols: This refactoring was a bit more involved than the one I did for the next version, but I ma...
In last week's Barcelona Software Craftsmanship Dojo we did the Varint kata created by Eric Le Merdy. Since I was facilitating it, I couldn't code during the event. Once I got home, I did it using Clojure. These are the tests using Midje and Clojure test.check libraries: and this is the resulting code: I used a mix of a bit of TDD, a lot of REPL-driven development (RDD) and some property-based testing. Basically, the cycle I followed was like this: Write a failing test (using more complicated...
A couple of weeks ago, I did the the Ohce kata in a Barcelona Software Craftsmanship event (I wrote a previous post about it). I wasn't happy with the resulting tests for the Ohce class: What I didn't like about the tests was that they weren't independent from each other. When I started doing TDD, they were independent, but as soon as I introduced the loop to request more user phrases, I had to stub a call to the PhraseReader in each test that returned the stop phrase to avoid infinite loops....