Halo! I am Sumit, a software architect, consultant, in Bangalore. I have 14+ years of web addiction, 3 failed startups, 8 startups total. You can poke me @sumitdatta

Thursday, February 17, 2011

Good code, great code

When you do software development (or any other work for that matter), getting to the first 60% is comparatively easier than the rest 40%. The initial 60% work usual is bulk work, broad plans, overviews from 3000 feet high and all. But the more you cross that mark of broad planning and go into the details, work becomes art. The first lot is almost always science. The last part is true craftsmanship. This is something that any team must consider when they work on projects of any size where quality matters. Of course if you can pass your project with just coarse details then do not even bother to read this blog.

I have myself been programming with web languages (mainly PHP) for the last 7 years at least. Before that I had C, C++ in school and college. And even before that BASIC in lower classes in school. And it all started with LOGO when I was just 6 years old perhaps. Yes these many years and it still takes time to think through a large project. The initial outline comes within the first 30 seconds. But as I go deeper into the details, the architecture shifts. It is not always performance that you need to take care of. Code maintenance is also a big headache. You do not want to be stuck with code which is difficult to hand over to team members. That is basically dead code.

Also the modern stack of code for the web has changed dramatically. It has become a habit to think in terms of APIs. This enables loosely coupled architecture which is probably the best thing about the web itself. When designing web software though one thing I had to learn the hard way is that UI is most important. I have always thought of it, but still failed many times to stick to that rule. Slowly we have almost got to that point though and soon it will be better. But it is very essential to understand usability in user facing software. Code comes later.

A good software product is made of many components. Raw lines of code are just a part of it, very important ones though. But a very efficient data crunching tool will fail if it allows only XML files to be imported. People may have Excels, CSVs and what not. So it is most important to understand the audience. All these go in that ultimate great piece of code. In the end a product is also the packaging, the color, the logo, the manual that comes with it right? Same for software.

So from the next time you start a project by coding, think. Do the above points apply to it? If so try avoiding mistakes noted here. Go make some new mistakes :P