Shortcuts. Save Time Now, Pay For It Later…
Everyone takes a shortcut now and then when developing code. We shouldn’t, and we know it, but sometimes we do anyways. I am guilty of it as much as the next guy. And unfortunately, it can bite me in the butt just like everyone else. Let me tell you a story…
Anyone who reads my blogs regularly knows that I have been on a SalesForce kick lately (and anyone who reads my blogs regularly also has way too much time on their hands… but I digress). Anyway, there are two ways to develop code on the Force.com platform. They have a handy little web interface that allows you to write code and run tests online, directly into the development environment. There is also a plug in for Eclipse, which allows you to write the code locally, commit it to Subversion, and uploads it to the development environment for you with every save.
Using Eclipse is a much better way to develop, as it allows you to maintain history, manages change control, allows for continuous integration, etc. And I know this. But it also takes more time to set up. So today when I wanted to make a little change to the unit test structure I had in place for an application, I chose to just go into the web interface to make the change. It was just a quick little change, low risk, right? Well…
Without getting into the gory (and embarrassing) details, I inadvertently closed the browser window before saving my changes. The net result was the loss of about 50% of my unit tests for the application. Had I been developing in Eclipse, I could have easily recovered them. In the end I was able to get most of them back, but at the expense of most of my afternoon. Which brings me to my point: Shortcuts do NOT save time in the end. They might cut a few minutes off here and there, but eventually it will catch up with you like it did me.
Good Coding Practices are referred to as “good” because they make our job easier in the long run. If taking a shortcut yielded a better overall result, then it wouldn’t be a shortcut - it would be the standard practice. Next time you are working on code, and you feel the itch to take a shortcut, take a minute to step away, go get that can of Tab, and come back to your desk ready to do it the right way the first time. It will save time in the end.

Comments
I live by “Spend a dime now, save a dollar later”. Plan Plan Plan! The book, “The Art of Project Management”, recently updated to “Making Things Happen” (http://oreilly.com/catalog/9780596517717/index.html) has some very succinct and relevant chapters for project managers, architects, and developers.
Also, I’m pretty sure any developer in question would be going for a can of Mt. Dew, not Tab.
Melanie -
“Spend a dime now, save a dollar later” is a MUCH better way to put it. Thank you for rephrasing it!
And only the newer developers would prefer Mt Dew over Tab. Us old timers appreciate both… :)
Leave A Comment