Llewellyn Falco is an independent agile coach. He discovered strong-style pair programming. He is creator of the open source testing tool ApprovalTests( www.approvaltests.com ). He spends most of his time programming in Java and C# specializing in improving legacy code.He is the co-founder of TeachingKidsProgramming.org & co-author of Mob Programming Guidebook
The single worst architectural anti-pattern is also the one I see the most often. It locks you into an architecture. Makes your choices permanent and inhibits being able to respond when you need to scale.
We are going to look at multiple examples of this anti-pattern. Not only focusing on how to avoid it in the first place, but also how to restructure code once you have detected it in your current system.
Let’s get back to basics.
One of the microskills often used in TDD is Consume First Architecture, which simply means using the fields and methods before they exist. Sounds easy? Well yes and no. Even simple lines of code can have HUGE implications on your architecture. The real skill in consume first is to be able to see, question and respond to those implications on sight.
In this lab, we are going to geek out over a single line of code. We will take it and turn it into 40-50 variations and explore how each variation impacts the resulting design.
Red - Green - (refactor)
We all know that refactoring is suppose to be the step that let’s us tease apart the logic of our code. ‘Fake it till you make it’ allows for us to evolve an emergent solution to complex problems. Yet this is usually glossed over when showing Test Driven Development.
But not in this session. Here we are going to focus completely on Fake it till you make it. Taking complex katas and reducing them to
1 Red - 1 Green - 40 Refactors.
“In order to make delicious food…. you need to develop a palate capable of discerning good and bad. Without good taste,
you can't make good food.” - Jiro Ono (World’s Best Sushi Chef)
Many of us are stuck with messy code. We know it’s not great but it works and what can we do? Where and how do you start?
We are going to use some cutting edge training to train your pattern recognition section of your brain to instantly recognize common, reoccurring anti-pattern (smells) in your code.
Then we will learn very specific techniques to start improving on these specific smells.
Once you are trained to see these anti-patterns you’ll recognize them everywhere. Now that you are equipped to handle them your code will start to transform into something beautiful and easy to work with.