Saturday, March 25, 2017

Practical Application of DRY

In The Wrong Abstraction, Sandi Metz says the cost of code duplication is less than the cost of using the wrong abstraction. I had to watch her Rails 2014 talk to fully understand her point. She discusses the cost of duplication around the 13:58 mark.

I watched the entire talk.  The ideas are presented so well that it's simply brilliant.

The main take-away with respect to the cost of code duplication verse the wrong abstraction is that it's also an argument for delaying the application of DRY until you fully understand the algorithm.

What makes her presentation compelling is the insight she provides on knowing when to apply DRY. It's the first time I've seen someone provide a practical example of why delaying the application of this principle is important.

In addition to the insight provided on applying DRY the talk contains a great deal of practical advice.

The presentation provides a useful tool for explaining the evolution of code through the ebb and flow of complexity during development. The presentation is directed at individuals attempting a refactor. The Wrong Abstraction includes the notion of a team working on the code.

I plan on using the presentation as a vehicle to help my team understand the challenges they are facing in their own struggles with complexity. Having the tools to discuss this challenge goes a long way towards understanding and finding solutions to it.

The Wrong Abstraction introduces the notion of the sunk cost associated with using the wrong abstraction and makes an argument that developers need to recognize this accept that sometimes the best way out of that challenge is to take a back step by reintroducing duplication. It is the step back which provides the opportunity to revisit the abstraction and improve it.

Sunday, March 19, 2017

It's The Foundation That Matters

I have to agree with Santiago L. Valdarrama and the points he makes in The unremarkable career of (some) modern software developers. Continuously learning is important to your career. Complacency is a career killer.

I've resigned from two positions during my career because those organizations got in the way of my learning or didn't provide the opportunity to apply it. Staying in these organizations comes at great personal cost. It's a cost that can sneak up on you if you aren't vigilant.

In addition to building a solid foundation build a broad network to get better insight on the issues you face.  I discuss some of the pitfalls of social proof and social loafing in Stop Being a Cave Dweller. These pitfalls are an issue if you think Google and Stack Overflow are your friends. (They certainly help but you need to think as well.)

The response on Reddit to Santiago's blog post is interesting. In my view Santiago's, point is understand the theory and stay sharp. The fact of the matter is that technology changes. You need something to carry with you as you move through your career. That something is probably a solid foundation in fundamentals that can carry you for the long haul.