Friday 12 March 2010

Maslow for Programmers

What would the Maslow-pyramid look like if we applied it to programmers?
(Physiological Need) The starting layer is the fundamental knowledge to implement something in a given environment with given tools. This doesn't need further explanation, without this the rest has no meaning.

(Safety) The basic security of your program; that is a relatively bug-free level, where you can think of, and prepare your software for many of the exceptional situations that could arise.

(Love, Belonging) The awareness of the user and the explicit intention of creating software that has value for its users. This level also includes the intention of writing code that others can understand, designing software with aproved and well-spread concepts in mind, following industry standards and guidelines.

(Esteem) When you don't only care about clean code and design, but also about the process by which you achieve those things. Reflection is a great part of this. Through honest and regular reflection you regularly arrive to the conclusion that you need to learn more, and so you do just that. Without continuous improvement, you can't reach the fifth level

(Self-actualization) Where you can make your own contributions to the software world let they be books, theories or techniques. They could also be development tools, SDK's that aid others' work or have beneficial influence on the way others implement things.

Are you still with me? If you are, you could say, "It's all very nice, but is there a point to all this?" There might.

You have to know your tools and the programming language you use before you can look any further. This sounds trivial, but it's actually quite difficult to achieve. The problem is that many of today's development tools are so sophisticated, sport so many features, offer so many options and solutions in syntax and in libraries, that you just can't learn it from a book. You have to work on many projects, preferably in different problem domains, so that you can come across all particular features of your tool that solve your particular problems perfectly. This takes time, and luck is also a factor here. The good news is that once you have acquired that knowledge, it's only up to you to move up in the pyramid:

* You can start to think about the value of the software you develop.
* You can start looking up literature on how to design, create and test software. It's all out there.
* You can start reflecting on yourself(on your team), you can start improving your process, you can strive to become better at what you do.

Okay, the top level may be out of reach for most us. Not everyone can think as originally as Kent Beck, or write about software as systematically and meticuluosly as Frederick Brooks. But who knows? Maybe, one day you will write the next, all new version of Rhino.Mocks for all the .Net-developers to awe.

Read full post...

Wednesday 3 March 2010

Assert First Development

A good programmer writes about 10 lines of code a day. Maybe less maybe more, though it's a very interresting topic leading to names like Barry Boehm and Tom DeMarco, it's not the subject of this post. I just wanted to point out that eventhough undoubtedly useful, IntelliSense, or any autocompletion tool for that matter, is way overrated. A programmer might type in that single line of code of the hour in five minutes, or in eight without IntelliSense. I'm glad we've got that out of the way. Next, if you are a TDDer and don't already use the Arrange/Act/Assert concept, start today and you will never look back. Anyways.

"Assert First Development"[1] is about writing the assert of your test first. This gives you the means to write the act-part in a way your assert needs it, and then the arrange-part as your act and assert needs it. This way you have to think about only one thing at a time. If you do it the other way around - that is from arrange to assert - you always have to think about all three parts simultaneously. You could of course say "I'm very smart and I can think about many things at once", and I believe you can, but you could use all your cleverness to solve one problem at a time, potentially solving things even better. If not, you still haven't lost anything, you just did your job sequentially. But chances are that your assert will be right the first time around, not mentioning your arrange in which you set really only those things up your act needs, and not the things you think your act will need. Only thing you lose is some parts of your IntelliSense, but we already established that it's really not that much of a loss.
One last thought. Assert First Development is another great example of the pull-system: there is never waste produced, we don't setup mocks or fakes or anything we might not need eventually.

References:
[1] Kent Beck: Test Driven Development: By Example

Read full post...