Skip to main content

Posts

Showing posts from August, 2015

Comment your code (well)

From basic beginners to experienced experts, everyone is either a poor commenter or knows someone who is a poor commenter. If you need a hair cut, try understanding an open source uncommented project. You will tear out all of your hair from frustration. 
Not writing comments is bad, but so is writing bad comments. If your comment is so vague that if I'm reading through your code and it seems completely random, or makes me have to remind myself what kind of project that I'm looking at, maybe it shouldn't be there.
There are 5 types of comments that I've seen: No comment - There's nothing there (Bad)Vague comment - It just doesn't make sense in the context (Bad)//This counts Unnecessary comment - It just doesn't need to be there (Bad)//this line adds 1 and 2 together Funny commentHelpful/Descriptive comment - Brief yet descriptive about the method/function. Placed at a point in the program that could be potentially confusing. A helpful comment might also describe …

Code as an Art

There are many different topics that I could use as my first topic but I think I'll start with expressing how code is actually an art form.

Woah what?

Yes. Code == Art. In Merriam Webster, Art is described as:


"Something that is created with imagination and skill and that is beautiful or that expresses important ideas or feelings"
This could very easily apply to code. Programmers, like artists use their own distinct patterns and styles when it comes to writing code. To create something with code is no simple task. No matter what language you are using there are many different aspects you have to consider. From what framework to use, to how to optimize it/make it faster. A programmer needs to be able to see the beauty of the program beyond its user interface. They should be able to take pride in knowing that what they have created, is a distinct form of creation that stemmed from their brain. A fully formed program represents a beautiful combination of imagination and skill t…