web developer & system programmer

coder . cl

ramblings and thoughts on programming...

drawbacks of monkey patching

published: 06-08-2011 / updated: 06-08-2011
posted in: development, programming, tips
by Daniel Molina Wegener

Monkey patching is the worst activity that you can handle on programming. Not at all because it carry a lot of problems, like less hours of sleep and a lack of concentration during the programming activity, among other things it reduces your capacity of planning and source code optimization. Where you must deal with the ugliest source code that you ever will see. Monkey patching do not affects only your work, it affects your life style, and probably most monkey patched code is generated by tight schedules, underestimated projects and wrongly handled requirements.

If you will join a project, first ask if that project requires monkey patching, so you can handle your new schedule, that means that you must be available more time along the day and you will require more tasks to do. With monkey patching probably you will join the cycle of death, which will drive you to certain stressful situations.

Cycle of Death

Cycle of Death

If you are not able to concentrate, you will be generating more bugs than when you are properly concentrated, so you need to sleep well. You can help yourself to regularise your schedule, so you can concentrate properly during the day. If you generate more bugs, the number of iterations between you and the QA team will be higher than doing software corrections properly. Monkey patching is a well known bug generation method, it will lead your project to a numerous bugs, including design ones.

You will double work if you need to monkey patch a software piece. You can skip many bugs if you help yourself to use static analysis tools and runtime checkers. But if your schedule is short, and it does not allow you to use those tools and your codification must be done quickly and you are force to use monkey patching, you must think on require more time to develop your software piece.

Take a good rest, and then start codifying. Everyone agree that programming is hard thinking task, it requires good concentration. If you work with project managers that cannot handle the concept of programming as an activity that requires good concentration, and an activity that must be done relaxed, without pressure, to reach the higher productivity levels, you are on the wrong place. Just take a look on companies like Google or FogCreek. They really know the value of their developers, and I know that those companies will never use monkey patching to do their work ;)

No coments yet.

post a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>