7 Tips on How NOT to do BAD Programming
By Ashish MohtaAs a I promised in the evolution of techspot, from now on I will be including posts on programming also.I am not a big experienced programmer but I will surely make a difference on this.
As this is the first post of this category, I would like to draw attention of programmers who are crazy about programming (like me).Here are some tips out of my experience for not being a BAD PROGRAMMER.
- Dont Start coding as soon as you get to know what you have to make : When I started coding i was a cowboy ,I know C , I know sytanxes lets do it.And to be honest it used to take hours of trial and hits to get to know what I have to do.So “Have a roadmap like a sketch or flowchart, before you embark for programming.It will save time and frustration both”
- Dont Make your programme look like an essay: If you have written a code which has low readability, like you have to move the screen left and right to see the code, the alarm should be ringing.Make your code readable so even you can understand what you have written.
- Dont forget to add comments: Whenever you change or add something new, make some comments so you can undestand what you did, why you changed.Trust me it will help you when u get back to it again.
- Dont Name the variables and functions as “a “b”: Dont make you program constructs like variables and functions like “variable a” “function b”.It is highly recommeneded that you name them properly so its useability is clear.
- Dont make longer programs, break them down: If you have written programs which is too long, alarm should be ringing.Breaking down the functionality will not only give you, reuseablity but easy reading.
- Dont have too many break points: If your control construct(selection, iteration and sequencing) have more than one entry and exit points, alarm should be ringing.
- Dont forget to catch exceptions and errors: If your programme is crashing too often, you have surely forgotten to catch the overflow exceptions and other things.Remember no matter how you good your programme is, if it crashes you are a looser.
So what mistakes you make ? Do you have more tips? Share your experience with me and other readers to let them know and become a better programmer.I hope you liked the post.
If you enjoyed this post Subscribe to the Free TechSpot Newsletter or Feed It through RSS
.Leave a comment to this post tell what you think about the post and other readers.and do subscribe to comments to this post so you get ideas by other readers and bloggers.Its a great way to find
|
About The Author of this article: Ashish is one of the co-author of this blog and writes on various interesting softwares, PC tips and more. You can read more of his articles here. |
Enjoyed this article? Download our Toolbar ( for Free ) and read us more quickly or Free Subscribe to the Full RSS Feed or Get Post like this in your Inbox Click to get via Email ( You will have to confirm by checking you Inbox)
Readers Play Ground
- Add your Comments or Discuss further in our forums
Enjoyed this article? Subscribe to the Full RSS Feed
- Email This Post to your friends or somebody who can use it
-
Tags: Programming, syntaxes
- Get Post like this in your Inbox Click to get via Email ( You will have to confirm by checking you Inbox)
- Read More Stories from Programming




No matter with your post and no matter with the topic of your site either but…you’ve been tagged !! Click here and answer the questionnaire.
Ask me if you’ve got pbs with traductions from french
i’m a bit programmer myself (C, Java, ada and a few others) and i learnt the languages at school. Your advice are really the advice our teachers gave us and i think you forgot nothing :). In fact, we were evaluated on these criteria.
And good thing : you give an explicit way to evaluate a program (no ‘a’ or ‘b’, no need to scroll the code from left to right etc.).
One more thing, i heard that in some firms, they want about 10% of comments int the code. It can help to knox if you have enough comments or not.
Design is the fundamnetal boost for programming.
Exception Handling is what i used to while writing my programs. It made my customers find themselves in worst situations while using the programs. But Now I learnt a lot and use a central error handling system.
I would like to suggest following
1. Code should be reusable.
2. Less use of global variables.