Iv just been making my way though The archives of Codding Horror by Jeff Atwood as I often do. Its one of those good places where you can learn how to program, and think about why your writing that code that way, rather than just how to write java/C/Php…..
In one of his articles he mentions a concept called object happiness. I would like to take this opportunity to say this;
Hi my name is Gwilym and im Object Happy.
Worse I am design happy, the first thing I do when I get my greasy little fingers on a new coding project is this, I design the hell out of it. Im always leaning about new ways of coding and there will be a dozen things I want to try out. I will stand in front of my white board and be thinking “yes, yes we can have a singleton here, ar yes my precious oh and we can abstract this out to here, oh my and we can can use an interface to link these together”. The result of this is that I waste coding time because, the design will now be so reusable, robust and readable that it will need about an extra 50% more code than if I had sat down and just bashed the thing out. I know this because I have seen may other peoples solutions to the same problems were they have just coded it, any they nearly all work close to or just aswell as mine, we both get 1st’s and all I get for the extra week of coding I put in is a nice comment from the Lecturer who marked it.
Rimmer: Look, I’ve got my engineering re-sit on Monday; I don’t know anything. Where’s my revision timetable?
Lister: Wait, is this the thing in a- in all different colours, with all the subjects divided into study periods and rest periods and self-testin’ times?
Rimmer: It took me seven weeks to make it. I’ve got to cram my whole revision into one night.
Lister: Hang on, this the thing with a note on it, in red, said, “Vital, valuable, urgent! Do not touch on pain of death!”?
Lister: I threw it away.
– Red Dwarf
This has no good points-
Make sure you don’t spend stupid amounts of time on your design, and leave you self no time to implement
Make sure you design is worth something, otherwise you work will just be thrown away.
Having thought about this I would say this-
Find a percentage call it x make it sane about 10-20% when you design something make sure that all the exciting things you thought of, never add more than this the total size/ workload of your project.
For anything that you could code in a day , design it as you go along or you will be there for a week.
If you have to design it badly, code it, hand it in. Then if you really want to you can always go back and have quite little refactor by your self until your soul is once again happy.
But most of all remember as I try to we are programmer not designers so CODE, design is something to help you do that, but it overall less inportant than code