![]() |
Documenting changes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Documenting changes (/showthread.php?tid=13190) |
Documenting changes - El Forum - 11-13-2008 [eluser]James Gifford[/eluser] Hi everyone. I have been making extensive changes to CI's core libraries for a current project and I haven't been doing a great job of documenting the changes I made for future reference. I was just wondering what conventions other developers use when modifying someone else's code. I'm currently going back and commenting any changes with my initials and a brief explanation of what I was thinking at the time. I wish now that I had commented out the original code and added my own rather than overwriting it. Does anyone have any preferences for this sort of thing? Documenting changes - El Forum - 11-13-2008 [eluser]Colin Williams[/eluser] Any reason you are hacking core classes and not overriding them? Documenting changes - El Forum - 11-13-2008 [eluser]James Gifford[/eluser] [quote author="Colin Williams" date="1226653086"]Any reason you are hacking core classes and not overriding them?[/quote] No, not really. Fewer files cluttering up the app I suppose. Documenting changes - El Forum - 11-13-2008 [eluser]sikkle[/eluser] You gonna pay for that little one when they add function and upgrade some core functionnality realy. Overide the system one, or if you change it, just delete the system one that it that all, the next upgrade will not broke your apps. When it come to security, upgrade matter. see ya around. Documenting changes - El Forum - 11-13-2008 [eluser]John_Betong[/eluser] When changing existing code I copy the complete function and prefix one version with OLD_ so that I can always return to the OLD_ version. Sometimes I include the date and the reson for making the changes. Most editors allow global searching so it is quite easy to find then original code by searching for " OLD_". |