Being a U*nix programmer, one has to, at some time or the other in his life, play around with makefiles. Writing one isn't a big deal, plenty of tutorials available to get you started. But hacking and tweaking one 800+ lines worth of makefile without a single line of @$%#ing God Damned comment is a nightmare! I would compare it with walking with a small LED in your hand through a dense jungle on a dreadful moonless night! It was the length of the file with apparently many targets that made the task involving, and not the structure, which I later figured out (after 2 days of gruelling dives in and out of the file) was pretty simple. Time for a moral now:
Moral:
If anything that you write (code/makefile/script ...) is going to be read/tweaked by someone else (esp. with you NOT around), then PLEASE PLEASE PLEASE in GOD's name put a comment out there explaining the flow and structure!
If anything that you write (code/makefile/script ...) is going to be read/tweaked by someone else (esp. with you NOT around), then PLEASE PLEASE PLEASE in GOD's name put a comment out there explaining the flow and structure!
I bet your colleagues will bless you for that! Feeling much better now, the work isn't done though.
2 comments:
True! I face same problem in our code. No comment, new API document and after spending 4 hrs, simply found that functions written are never been used :(
I liked the example of LED and Jungle. Superb. And yes, comments are must. there is no doubt about it.
Post a Comment