Archive for category Uncategorized

The Bigger Picture

Pills

Mark was feeling worse, as the cold was taking over him. This was a somewhat new experience to him, as he had always been so healthy that it was really hard to even remember when he’d last felt that way. But his condition got pretty bad, so he picked up the Yellow Pages from the top of his nightstand and looked for a doctor. Although it was late in the evening, he found this very kind Dr. Harris who came right to his appartment and, after having him examined, prescribed him Darvon, 2 tablets each day, for his coughing problem.

As he was finally getting better, Mark could now go to work. But during his week off, a decent amount of files, one more urgent than the other, piled up his desk. He was really doing his best but he was still having a hard time sleeping every night due to the great deal of responsibilty that was screaming in his ears all the time. There came a time when, combined with his coughing problem, the situation became unbearable, so he had to do something to be able to sleep. He remembered his friend Andy, who used to take Diazepam for the same problem, so the next day he met Andy during lunch time and got a few tablets from him.

He could finally sleep. His cold was also getting better, and he was catching up with the unfinished work at the office. Things were looking better for Mark, until one day when he died in his sleep.

The authopsy revealed, not surprisingly, significant amounts of Dextropropoxyphene and Valium in his blood, which – taken in decent amounts – are not dangerous for the human body; hovever, when combined, they can usually cause allergic reactions and, to the least fortunate, even death.

  • Facebook
  • Twitter
  • Google Buzz
  • MySpace
  • Yahoo Messenger
  • Google Gmail
  • Yahoo Bookmarks
  • Yahoo Buzz
  • AIM
  • AOL Mail
  • Blogger Post
  • Delicious
  • Digg
  • Google Bookmarks
  • LinkedIn
  • Orkut
  • StumbleUpon
  • Technorati Favorites
  • Windows Live Favorites
  • Share/Bookmark

SDBP08

SDBP 2008

Between October 26 and 30 – 2008, I’ve been fortunate to attend the Software Development Best Practices Conference in Boston MA. Apart from the opportunity of listening and free talking to people like Ken Schwaber, Bjarne Stroustrup, Mike Cohn or Scott Ambler, it has been a great time to visit a very beautiful city.

    

    

    

  • Facebook
  • Twitter
  • Google Buzz
  • MySpace
  • Yahoo Messenger
  • Google Gmail
  • Yahoo Bookmarks
  • Yahoo Buzz
  • AIM
  • AOL Mail
  • Blogger Post
  • Delicious
  • Digg
  • Google Bookmarks
  • LinkedIn
  • Orkut
  • StumbleUpon
  • Technorati Favorites
  • Windows Live Favorites
  • Share/Bookmark

Tags: , ,

Don’t Copy If You Can’t Paste

Copy/Paste

Xerox-boy

Matt used to be an appreciated developer at his previous job, but now he succeeded to join a much bigger software company, one which he and all his friends had always admired. His new colleagues started to trust him also, so he was assigned with creating one new plugin for their application. They were even so nice to show him other plugins’ source code, and explain him how they worked by means of code samples. In one week’s time, he got it all woriking well, but when his code was reviewed, this came out:

/*
* class CGuiSettingsPlugin
* Manages settings for the Graphical User Interface
*/
class CCommunicationSettingsPlugin
{

He is now known as “Xerox-boy”.

As a developer, you are often faced with the situation of creating software components very similar to others, in terms of structure and behaviour. In those times, the easiest approach is to simply copy entire functions, classes, or even source code files and do some changes here-and-there. This habbit, however, has several darker sides which usually strike back sooner or later, one way or another.

Why Copy and Paste? 

Because it’s easy. Why rethink an architecture, why bother to try and convince the managers that the (proper) changes would take more time, why even bother when you can just copy that class, change its name and slightly modify one single member function? It has already worked for you so many times before, so it’s pretty much supposed to work this time too… after all, you are just duplicating something that’s already working.

Because others also did it before you. You are faced with adding a new branch to a decisional “switch”, that already contains 30 other alternative cases. You’re not supposed to change the whole logic right now, are you?

Wrong

Nobody said it was gonna be easy, and after all, it’s not always necessarily supposed to be. There are times in products’ lifecycles when architectures need to be revised, and code needs to be refactored. Postponing those times for too long may force you to eventually do the right thing exactly when you have no time for that.

You may not want to start thinking everything all-over by youself, and it also wouldn’t be advisable, but the least you could do would be to raise the problem, and make people aware of it. There will be for sure many who will understand the need of allocating time and resources for finding the right solutions.

Title picture © Mafoto | Dreamstime.com

  • Facebook
  • Twitter
  • Google Buzz
  • MySpace
  • Yahoo Messenger
  • Google Gmail
  • Yahoo Bookmarks
  • Yahoo Buzz
  • AIM
  • AOL Mail
  • Blogger Post
  • Delicious
  • Digg
  • Google Bookmarks
  • LinkedIn
  • Orkut
  • StumbleUpon
  • Technorati Favorites
  • Windows Live Favorites
  • Share/Bookmark

Tags: ,