Rob Smyth

Friday 18 January 2008

Ask Not What You Need To Code, But What The Code Needs Of You

A repeating theme at work recently has been developer's with rising skills having difficulty working out 'where to put the code'. What I've noticed is they are trying hard (perhaps too hard I think) to 'understand the design to know where to put the code'. Often this becomes an inhibitor, kinda like not being able to see the forest for the trees :-).

It seems to me that this is a case of believing that a developer's work is to know where to put the code. This is being really hard on yourself, it means you recon you need to be omnipotent, to add functionality you must know all. Kind of a god of the code approach.

Alternatively ask not what you need to code but what the code needs of you. Understand what functionality (not code) is required and then where this type of functionality is handled (belong) in the code. I like to put this as 'who cares?'. Then it no longer becomes a big problem of god like knowledge, but adding code to single identifiable point, hopefully a new class.

Life was supposed to be simple ... right?

No comments: