Wednesday, May 9, 2012

Simplicity is the ultimate sophistication, especially true for 4GL like SQL

Many years ago, when I apply for a lead developer position in IT department of a regional bank, I was given a stored procedure printed on 5 pages of letter size paper with font size of 8.

I start to read it, very soon I became confused, I could not figure out what the stored procedure was doing and could not associate its code to its name…. then I asked “Is this kind of stored procedure common in your system? How this kind of stored procedure be maintained”. The answer I got was “You go it! that’s the point. The stored procedure should not be that complicated.  It should do one thing and one thing only and the name should indicate so clearly. Here you are a good one.” With that, the interviewers handled me a simplified version of the same stored procedure that is a half-page only.

I still remember the name of the manager at the interview was Sarah (could not remember her last name), and the database developer lead was Brian Mincey. (You can find him at my facebook friend).

Ask ourselves, do we write stored procedures 500 lines in size and do lots of stuff that are not reflected in its name?  Think about this,  you are not the only one who needs to work on this stored procerure. there are many others need to. and there would be many others need to work on it in years to come. ( if the system you are working on makes its way to production).  My manager at HP has this line in his email signture "Simplicity is the ultimate sophistication". I think it carrries lots of wisdom. Our life is complicated enough, make it simple when you can.

No comments:

Post a Comment