Share This

Random Programming Tips For Beginners

While the programming courses in our university and other universities in Nepal give good basic foundation for programming, they lack the chapters on approach to better programming practices. In this post, I'll list some better programming practices intended for beginner programmers.


Select the proper variable and functions name so that it would be easier for you as well as other programmers to read your code. Remember you will start to puzzle if you check back your own unmanaged code.

Follow a proper convention for naming and STICK to it. You can follow any variables naming convention but you should always stick to it. (Some basic variable naming conventions are:

int iNum, char strName[40]
int i_num, char str_name[40]
It does not matter which you follow. What matters is how consistent you follow the convention.

Think before you code and sketch the structure of your program. Flowcharts, algorithms, pseudo-codes, etc. can prove great work before coding.

Don't ignore compiler warnings as those warnings probably indicate that your executable might be buggy in runtime.

Make the habit of writing comments as it would make the program even more clearer for others and yourself as well. But do not write excessive and unnecessary comments. Don't write comments in the lines that are self-explanatory.

Indent your source code as proper indentation makes your code look neat and increases readability.

Multiply rather than dividing as multiplication is generally faster than division.

If you've got any useful tips, leave them as comment and we'll add your tips in the post.

1 comments:

Rahul Vyas said...

Hey...this is a wonderful website buddy and an informative post!!! i am new here and i found this site very interesting and informative.

PHP Programming Company India

Post a Comment

Followers