Regardless of the type of programming you’re doing, there will be plenty of opportunities for you to make mistakes. If you’re involved with a very complex project, then obviously there are more places for mistakes do happen. But even if you’re doing a relatively short and straightforward programming task, problems can still arise.
Here are some of the most common programming mistakes, and some tips and pointers for helping you avoid them.
Mistake: Not Having a Plan
One of the most common programming mistakes is something not strictly limited to the programming world – starting your work without having a plan. If you begin to code or design without having some idea of your goals, and any applicable constraints or requirements, then you’re much more likely to run into problems.
Solution: Have a Plan!
To avoid this mistake, simply make sure you have a plan when you begin your work. Your plan doesn’t necessarily have to be particularly complicated or set in stone but you do need to have at least a general idea of your final deliverables, as well as some ideas for what direction to take to get there.
Mistake: Programming in a Vacuum
Another common mistake is focusing too much on the coding process itself, and forgetting about your ultimate end-users. If your finished product is not well understood and not easily usable, then it would be hard to consider your work successful, even if the underlying code itself is of the highest quality.
Solution: Engage the End-User
It’s important to communicate with the ultimate end-users of your work, whether that’s internal to your organization, or an external client. You don’t want the client to be in control of driving your programming work, of course, but you do need to communicate with them so you understand how they’re going to use your code, and what their expectations are in terms of interfaces and usability. (As an added bonus, having increased communication with the ultimate end-user can help identify any potential problems before they happen, and enable you to manage their expectations accordingly.)
Mistake: Writing Spaghetti Code or Undocumented Code
While everyone has their own style of programming, it’s important not to write code that’s so convoluted and more difficult for someone else to understand. Depending on the nature of the product, the code may need to be updated or ported to a different platform at some point in the future, and you may not be the person to undertake this task. (Even if you are the person to rework the code, you probably know that it can sometimes be difficult to understand exactly what you did when you revisit code months or years later.) If your code is a mess, and is not properly documented or annotated, then your client satisfaction, and your reputation, may suffer.
Solution: Incorporate Time For Documentation and Refactoring
To avoid having yourself associated with effective but difficult to follow code, make sure to incorporate Time within your programming cycle to comment about your code wherever appropriate, and to occasionally refactor the more complicated blocks so that they will be easily understood by others later.
Avoiding these mistakes will help you become a better programmer and deliver the best possible code to your clients.
Author : Blue Cloud
Just a normal software developer who love to write code. Developing professional software since 1999. After working in the software industry for many years, I've started my own website to share knowledges and experiences.
COMMENTS
blog comments powered by