Tuesday, April 28, 2015

Old Code, You Wrote

Do you ever go back to code you had written a long time ago and wonder who had written it and why they made it so messy?
I realized that I need to go through my documentation for some of my first projects here (or actually write the documentation).  While looking through the code I have seen things that I really want to change or improve, not that the code I had written before was bad, but the code could be better.  The only problem that I face in doing this is that then the code needs to be tested and compiled and pushed to production, and some of these projects have their feet in many places all at once.
I think that what I am going to do with this code (since I am short on time, most of the time) is to change some of the things that don't change the flow of logic.  I am talking about things like using blocks where before I didn't have them because I didn't know about them when I first wrote the code. 
The rest of the changes I think I might just put into the documentation of the code in a section labeled "Future Updates", or something of the like.  If the change isn't too ​big, but something that I don't want to change and not test for fear of breaking the code, I am going to write a little comment where I would make the change, something that would make complete sense to whoever looks at it, especially me.

​​​​​How do you document code?

No comments:

Post a Comment