Agile Zone is brought to you in partnership with:

I wrote my first program in Z80A when I was 14 on a ZX Spectrum and ever since I have been hooked. I love writing code of any flavour as well as being passionate about the coding process. I have worked professionally in the software industry for the last 15 years using Microsoft Technologies, and I code at night in PHP, HTML, Javascript and CSS. Chris is a DZone MVB and is not an employee of DZone and has posted 31 posts at DZone. You can read more from them at their website. View Full User Profile

Everybody Fails Sometimes.

04.11.2014
| 7445 views |
  • submit to reddit

Everybody makes mistakes, otherwise we would all write bug free code. For most of us a mistake can be fixed and doesn’t have too serious consequences.

When I first released the Pico Plugin Framework, to make sure that the framework doesn’t clash with itself I enclosed the class definition in an if statement with class_exists. Now that was fine, but I hadn’t counted on the fact that if there was more than one version of the framework installed then the possibly the wrong version of the class would be loaded and used which would lead to odd behavior. Such as putting in a debug statement and then having a scratchy head moment when the debugging statement is not called.

Rather than beating myself up too much about it I got back down to developer land, did some Googling and thinking and implemented a factory pattern. The it was all good and the world could go back to sleep knowing I had fixed the problem.

So what did I take away from all this? Just a reminder of one of my personal values. Everybody fails sometimes. What matters is how you recover, and deal with the failure.

Have you failed at something? But through perseverance overcome the problem and gone on to success? If so I would love to hear about it so why not leave a comment.

Published at DZone with permission of Chris Odell, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)