TIps

A well written program comes a long way to making the customer process go smoothly. There are several dimensions to programming, the first of which is, obviously, to make sure that your program works! Errors are unacceptable no matter what the situation is, and the programmer must not evade the inevitability of having to debug to find the core of the problem. As long your software/website/product works properly, everything else is just icing on the cake. Functionality should be your number one priority.
I am not saying the other dimenions are not important. You are writing the program for someone else, whether it be your customer or your boss (or yourself). If they do not accept it, you are wasting your time. To ensure that your program runs smoothly, there are certain methodologies and recommendations you can follow.
You have all heard the phrase KISS - Keep it Simple Stupid. Or Keep it Short and Sweet. Even if your program is thousands of lines long and contains several files, always start off simple. What is the best way to design this program? Should you use copmlicated mathematical formulas? Should you use variable names that are long and complicated? Is your logic all over the place? These are things to consider when you are in the design process.
Comments - necessary or unnecessary? They are a must. Chances are you're not the only one reading your program, and when others read it, you want to make sure they understand what you did. If not, you may have to explain it, and it will take even longer for them to understand. Where to put comments? That is up to you. Whichever part of the code you feel needs explaining. Comment blocks are also good, but make sure they actually explain the code. We don't need to have to decipher what your comments mean.
Functions and modules - use them when you can. They can save you lots of time. Why do something over when it's already been done? Creating modules takes time, but the payoff will be worth it because you will save even more time in the future. Let's say you create a function to calculate the pythagorem theorem. Why not save it so you can use it in the future?
Don't quote me on this, but if you can find code on the internet that works for you, use it. There are lots of free code snippets on the internet. In case you stumble upon something that twists your brain, you can always ask for help from your friend, the information superhighway.

No comments:

Post a Comment