Programming Tips and Tricks
Here are some commonly used tips and tricks to make your programming go smoother. These will help you reduce your errors and increase your speed.
- When using tags, parentheses, curly brackets, or square brackets that come in pairs (one for opening and one for closing), you can type both of them right away so you don't forget them. Then you can come back and fill in the text or code that comes between them.
- Use a text editor or coding program with line numbers. This way when you use an error console, you will know which line your error is on.
- Become familiar with and start using the "search" and "search and replace" feature in your software program. This becomes handy when renaming variables or swapping out words.
- Use the "code snippets" feature of your software program. This allows you to save templates and sections of code for easy insertion. The more you use this feature, the more you will think of your code in terms of objects (making you into a better object-orientated programmer).
- Be consistent with you whitespace. This consistency will make your code easier to read.
- Use a software program that uses code auto-completion to save you time.
- Use a software program that uses syntax-coloring. This will make your code easier to read and will help you find a mistake because the color of your code will be inconsistent if you forget a closing parenthesis, tag, or bracket.
- Built-in FTP clients may or may not save you time. You might be able to FTP your work more quickly keeping another FTP program open and using that. Determine which makes you most efficient early on and then stick with that.
- Use comments when code cannot be recognized or understood right away.
- Customize your software program to have a black colored background and light colored text. This will help your eyes, because the black background will make the screen not as bright.