Programming Improvement 8 – Don’t start writing the code until you have the specifications

I recently started writing a project for a client.  At the beginning of the project, we had a mock-up of the main screen.  Since I was waiting for the analyst to write the design documents, I went ahead and built the main screen (database table, data access code, controller, views, etc.).

Over the last few weeks, the analyst wrote the detailed design documents for the other screens – the ones for the supporting tables.  So I built everything for the supporting tables.

This week, I received the detailed design documents from the analyst for the main screen.  There were several significant changes from the initial mock-up (as expected).

It didn’t take a huge amount of time to change the code I had already written.  However, there was a good chunk of “wasted” time when you account for the code I initially wrote for that screen.  But I probably could have used that time to make improvements to the “framework” part of the project instead.

I realized no one had looked at the main screen that I built from the initial mock-up.  So there really wasn’t any benefit for creating it earlier.  This was truly an instance of YAGNI – You Ain’t Gonna Need It [yet].

Leave a Reply

Your email address will not be published. Required fields are marked *