This post explains why "monkeypatching" has such a bad reputation, and why so many people avoid it. If you patch system code in an uncontrolled fashion, you can get into trouble down the line. What I do with this server is something like this:
- Test my fix on my local (office) network
- Save a new version of the affected package, and export a patch
- Upload both the patch and the new version of the package to the server
- Apply the patch live, and put the new package into the auto-load directory
- Delete the patch
The last step is key, I think. You don't want to get into the practice of loading in a series of patches, because that is the road to hell - you never really feel like you know what's running. The way I run the server, anytime it needs a restart, I don't have any patches loading - just known versions of code that I've got in my source code repository. So I do monkey patching, but only with the live server. When it starts clean, it starts from versioned code.
Now Listening to: Shadow Of A Lonely Man by The Alan Parsons Project from: Pyramid
Technorati Tags:
monkey patching, patching, smalltalk, dynamic language