Friday, February 4, 2011

A line of code is one too many

courtesy of www.dilbert.com


Over-engineering the obvious

One line of code is one too many.

This quote, which I should trademark if I was a little more "entrepreneur", just summarize a situation we keep coming in while leading design sessions, code reviews, etc. How often people comes up with complex solutions to simple problems. We, developers, thrive on complexity. We think the best solution is by definition the most complex one. Or, we find a solution to a problem, which itself provokes another problem, and a solution, and a problem, and on and on. It's hard to just tell everyone "Hey, forget about it. WHAT led us in that direction in the first place ?!?!?!". But, let's face it. We are not working to have fun. And designing complex algorithms and frameworks IS fun.

So in honor of these situations, I came up with this quote: A line of code is one too many.

Ultimately this just says that when you write a line of code, you better have a reason to put it there. A reason you can easily debate with any people reviewing your code. Any line should be left off if it doesn't fill a present need. Any line fulfilling a future need, even probable, should be removed right away. Keep in mind that the future, in terms of software development, is really hard to predict.

Saturday, January 15, 2011

IDE or Inert Drowsy Environment


courtesy of http://www.dilbert.com/


There was a time when you had to choose between Emacs and VI. In every development team there was a battle. Who would push the CTRL-X CTRL-something faster? Who would knock that ESC key like there was no tomorrow? But something happened at that time. IDEs, already popular in the Microsoft world, took over...

What we gained in speed, we lost in skills.

Today you can spot who was there at the time, and who is what I call an IDE slave. Java developers were considered better developers for that reason. They had to know the library by heart. They had to scan countless javadocs to achieve what they had to do.

Its sad that you don't meet a lot of genuine developers these days. Weird thing is that pretty much everyone consider themselves senior...

So do yourself a favor: next time you learn a new language, forget that IDE for a few weeks. Yes, you will be slow, but you will learn so darn fast that it will look like a great investment.