Month: January 2017
Comments – Good Comments
Even though you should generally try to write your code in a way that doesn’t need comments, there are cases where they can be valid. Below are some examples. Legal Comments Sometimes your job will require you to put some legal comments at the beginning of your file. Maybe you’re using some open source code…
Comments – Introduction
Functions – The DRY Principle
A very important lesson that every programmer has to learn at some point, is that duplication is bad. This is what the DRY Principle addresses. What is duplication? Simply put, duplication is having lines of code in your application, that are repeated in multiple places. Whenever you copy and paste a snippet of code, you…