Welcome Guest, Not a member yet? Register   Sign In
Documenting changes
#1

[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?
#2

[eluser]Colin Williams[/eluser]
Any reason you are hacking core classes and not overriding them?
#3

[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.
#4

[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.
#5

[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_".
 
 




Theme © iAndrew 2016 - Forum software by © MyBB