Thursday, 26 March 2015

Revisiting Old Code

When I first began to write code, I didn't see the need for comments. It never occurred to me that someone else would read my code and wouldn't instantly understand what my variable 'b' meant. In addition I didn't realize that I would have to understand other people's code.

Once I made the realization that readability of code was über important, I began to comment like crazy. However this slowed me down and eventually turned me off the idea of commenting altogether. How I made up for this was creating extremely good variable names, such that just by reading the variables' name one could tell what it is and how it should be used.

Much like my first encounter with code, I have now been asked for the writing SLOG of week 11 to revisit and old post and see if I agree or disagree with my position. I now realize that my old posts are analogous to my original uncommented code that I began to write as a young programmer. Now I am tasked to dig through weirdly named posts in order to find something that I've since changed my mind on.

Much like uncommented code, the above mentioned search took way too much time but I eventually found a post that I published at the end of January. It was called First Impressions and chronicled my panicked execution of Assignment 1.

I chose to revisit this one because I have learned something since I wrote it 2 months ago. I learned that the best way to figure out code or an idea is to argue about it with people who are equally passionate. Since then I believe I have posted about a really late night when I concurred minimax. This would not have happened alone and I am very thankful that I have managed to surround myself with like-minded people.

Study groups are something that I've never really been into because I work best in my own thoughts, but to externalize complicated problems and talk them out (yell at each other) is honestly a refreshing way to deal with a problem. From now on all of my computer science work will not begin with premature coding but will begin with an argument with friends as we try to decide what the best way to deal with a problem is.

No comments:

Post a Comment