views:

138

answers:

2
+3  Q: 

Top pragmatic tips

I guess most of you have read The Pragmatic Programmer. What are the most important tips for you? They all are good, but what are the most actual for you, that you use every day.

+2  A: 

Make Quality a Requirements Issue

Refactor Early, Refactor Often

Coding Ain’t Done ‘Til All the Tests Run

The one I think is the best when working in a team

Fix the Problem, Not the Blame

rahul
+3  A: 

It's been a while since I read that book so I had to review the list. All the tips are good, but some that jumped out at me on an initial scan are:

Eliminate Effects Between Unrelated Things

By keeping things isolated, it's much easier to test your code and to reuse it later. Improved understanding is a bonus too.

Write Code That Writes Code

This is a great one. If you find yourself writing a list of 20 similar conditions in a row, you've got a prime example for code generation. Computers make fewer random mistakes than humans.

Don’t Live with Broken Windows

This one is critical to avoid having your code degenerate into a steaming heap that nobody wants to fix. Keep things in order, even the slightest inconsistency like an incorrect indent.

Crash Early

Like the book says, a dead program can do far less damage than an unpredictable one. This is a really important consideration in some types of software, such as medical or (real-world) process control. What actually happens when the software running the nuclear power plant crashes?

Greg Hewgill