Should a correct solution be elegant too?

Many times when engineers propose a design/solution we are told ‘Well lets just get over the hump for now and refactor it later”  or ‘oh, that’s an elegant solution but lets just get it done for now’ and the worst of all you are just ignored. (Makes you think if you are speaking in a different language)

This almost always pains me, I just cannot understand how can a solution be correct and not be elegant to me a complete design is something that is correct, elegant, maintainable and easy to extend. Something that will stand the test of time. Something that can be reused.

I learnt the hard way every thing that you ever write and put into the system, someday you will have to enhance it, so would it not be better for you if you do it right the fist time around ?

I guess it is the engineer in me, I get bored if there is no puzzle to solve.


Why no rigior ?

Recently I had to fix a problem with a job hanging, so I pulled out my trusty YouKit profiler, profiled the app and was quickly able to detect the problem.

Basically it was an old fashioned connection leak due to a mix of bad coding, no ‘max wait time’ set on get connection and to make the problem worse it is multi-threaded.

At first look, all the threads were in a blocked state, so I reduced the number of threads to one (oh thank goodness for Executors), and soon the problem became pretty evident. Oh there were other problems too like creating infinite number of threads, when we have very finite number of resources, parent thread dying without waiting for child threads to complete……

Why do programmers think making a piece of code multi threaded is so easy ? Especially when you are dealing with legacy code (and I mean code written over the past 10 years by various people), trust me all it is going to do, is zoom into existing issues in the code.

I think the first step in increasing the performance of any app, would be just profile it! Find out where it spends 80% of the time and try to tune it that.

And that’s where my issue of rigor arises, I rarely see anyone wanting to profile an application before tuning it, solution to every problem seems to be to go GungHo with threading.

This attitude is also evident in another very popular notion of “throwing pancakes on the wall” to see what sticks.

Ok when did engineering disappear from IT ? seriously did I miss that memo ? most of us have some sort of bachelors degree, if not a masters so why are we behaving like code monkeys ? What happened to measurement ? reading ?

What happened to critical thinking ? I read an article ‘Are we losing our ability to think critically?’ from the ACM (yes you should read that magazine or pick Dr.Dobbs or some professional computing journal if you are serious about your craft.) And I have to say the answer to that question is YES.

But can you blame em? nowadays all developers are crammed into one giant room where you cant even hear your own thoughts. It is no wonder developers are the biggest promotors of headphones.


OMG I am an Introvert !!

Oh My God, after 32 years I have finally realized that I am an Introvert !!

I read this recent post “Caring for Your Introvert” (only cause it appeared on Hacker News) and found so many things familiar, which lead me to question, am I an introvert ?

So as anyone would do I went to Google (the source of all answers) and found many articles and one of them was “Being an Introvert”  and this self assessment, I got 23 out of 30  so atleast I am not a total Introvert.

I invite everyone to take the above assessment, and figure out what orientation you are.