
Sign up to save your podcasts
Or


The DRY principle is a guiding principle behind frameworks like Ruby on Rails. It's basic tenet as provided by the Pragmatic Programmers is:
EVERY PIECE OF KNOWLEDGE MUST HAVE A SINGLE, UNAMBIGUOUS, AUTHORITATIVE REPRESENTATION WITHIN A SYSTEM.
This basically means that between your database schema, code, architecture, etc. you should only have one representation of each piece of knowledge that applies to your system.
But what about mathematical algorithms. Or, an example that I just worked through at work, we're using flash and HTML authentication. Both systems need to be able to authenticate. So, how do we consolidate our code so that authentication knowledge is only managed in one place?
I've also seen instances where duplicate code is hard to generalize to match all cases. In those circumstances, I ask myself the following questions.
I'm fully aware of that after making my decision, I may not get back to modifying this code, so I have to make the best decision I can. The main concern I have is maintainability.
If I can maintain things in one place, for example building code generation off of a configuration file that fans out to multiple parts of the system, keeping the implementation details in the config file. (Think about a SOAP WSDL file.) Or if I can build a configuration off of some code implementation. Or I can generate some documentation from the code. I can avoid circumstances where I can break my code in one place by changing it in another.
That's the true power of the DRY principle.
Download this Episode
This is take II of the Pair Programming episode. The first take wasn't what I wanted to communicate about pair programming. Please give it a listen and check out the show notes on the original recording.
This week's episode on pair programming discusses where you might see pair programming, HashRocket's pairing setup, perceived and real disadvantages to pair programming, its advantages, and what it takes to do good pairing.
Pair programming is usually associated with Extreme Programming. It is sometimes seen as a mentoring practice, but is actually a collaboration practice, not a mentoring practice. This is because both programmers participate equally, not one leading and the other following for long durations. Pair programming is done with 1 computer and 2 programmers. I've never seen it work well with 2 computers and 2 programmers unless one computer was being ignored or under-utilized.
Obie Fernandez shared HashRocket's pairing setup and much more on his blog. The setup is not cheap. It's envied by many a programmer.
Some of the disadvantages of pair programming (some of which are only perceived disadvantages) are:
The advantages are:
Here are a few things that are critical to good pairing:
Download this Episode
In this episode, Chad discusses how he broke out of a comfortable job as a forklift operator, which ultimately led to him becoming a programmer.
He discusses his job, Ruby Central, and the Pragmatic Studio as contributions he makes to the community.
We also discuss the ebb and flow of passion for programming and how to avoid burnout on the things that we love. He has actually put a ban on himself for travel so he can spend time on the things that are important.
Chad told me that he espouses the Test Driven Development mindset, Continuous Integration, and Agile or dynamic methodologies. We discuss task automation, Puppet, Chef, etc.
The important things in software development boil down to quality. If you can automate your common, important tasks and make it easy for the person who needs it to kick off the process on their own.
Chad also had some great suggestions for new developers. First, read code. Second, write tests for the areas of code that don't have tests. This will force you to refactor the code and make it better.
To get involved in the community, you can start or organize a conference, create open source projects, help software maintainers meet Ruby 1.9 compatibility issues, join a mailing list, and so much more…
Download this Episode