The Programming Process
Spend time thinking about the problem and solution before sitting down to write code.
Create an IPO chart.
Create pseudocode and/or a flowchart.
Write a little bit of code at a time, making sure it continues to work.
Visualization
Program with a blank piece of paper in front of you.
Draw an empty box every time you create a variable. Write the variable name next to the box. Write the value assigned to the variable inside the box.
Draw a row of boxes with subscripts for arrays.
Draw a large box for modules. Put the module name at the top and variable boxes inside.
Draw something like a UML diagram for classes and objects.
Debugging
Delete or comment out sections of code, attempting to isolate the error.
When using a language / IDE with the capability… Use breakpoints!
Style
Find and use a style guide for the language you are using.
There are style checker plug-ins for many languages for many IDEs like StyleCop for C# and CheckStyle for Java.
Documentation
Comments in code are important for many reasons.
First, there are several “real world” benefits. Programs are most often written in teams and comments can help team members understand what is happening in the code. Also, programs are often maintained long after they are written by different programmers. If you are ever in the position of having to support code someone else has written you will greatly appreciate their comments, and others will appreciate the comments you add.
Although your class assignments probably aren’t these types of programs, there are still many good reasons why you should add documentation: to establish good habits early, to enhance your assignments so they are more beneficial to you as references in future courses or on the job, to provide insight of your thinking to the instructor, and to create a quality artifact for a student portfolio.
More information -
Places to Learn Programming for Free
Khan Academy - Computer Science - Fun drawing and animation tutorials in JavaScript
Khan Academy - Python Programming - Introduction to programming and computer science using Python 3
Places to Write and Run Code Online
Codenvy - online IDLE to create Java, JavaScript, Ruby, Python, PHP, and Android projects
Programmr - examples, exercise, and ability to run programs in Java, C++, Python, C#, PHP, Ruby, jQuery, Android, iOS, JavaScript, SQL, and others
Other Useful Programming Web Sites
Samples
Language Relations
Language Popularity