Personal Productivity Stack Exchange is a question and answer site for people wanting to improve their personal productivity. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a programmer, and I discuss when I code, but everytime I compile, there are at least 1 to 3 bugs. For the math questions I do, given 10 questions, no matter how easy it is, I consistently have errors in 1-2 questions, no matter how many details I check.

I start thinking, is it subconciously I wish myself to go wrong? How should I overcome this?

share|improve this question
Are you making the same mistakes or different ones? – superM Mar 12 '13 at 10:14
@superM same mistakes, over and over again. – william007 Mar 12 '13 at 14:00
I think you can try making a list of the mistakes you make, and while you work on a new problem go through that list and make sure you didn't make those mistakes again. This will not reduce the reason (which I can't know), but will help fight the consequences – superM Mar 12 '13 at 18:26

In programming, bugs are a fact of life. No developer should expect zero bugs. Large applications have thousands or millions of bugs.

Instead plan what to do with the bugs you discover.

  • learn from them. Try not to make the same mistakes again
  • understand why you make these mistakes. Is it a particular class of bugs? Perhaps you need some training in that aspect
  • prioritise bug types. What is most important to get right?
  • plan your code reviews to focus on your priorities

Don't panic about it. It is normal!

share|improve this answer

For programming, are you writing unit tests? The unit tests are supposed to catch the bugs even before you commit. It's also harder to make the same error in both the code and the test. (unless it is a logic error.)

share|improve this answer

If you notoriously code sloppily, there are some things you can do to improve the situation:

  • Use test-driven development (TDD). It is great for avoiding bugs, as it requires you to write tests for your classes and functions.
  • Avoid interpreted and loosely typed languages as programs written in such languages may contain lots of bugs which only occur during runtime.
  • Use a language which handles memory allocation/garbage collection automatically for you.
  • Use an IDE with strict error/warning checking settings. That will highlight potential problems.
  • Be sure to document your code so that it is clear what it does.
share|improve this answer

When you read something difficult, like a legal agreement, it's difficult to understand every word. But you read the whole thing first, then go back to understand the words.

Similarly, when you code something complicated, it's difficult to keep it bug free. Just keep doing it, finish what you're doing, note down the bugs, and go back and fix the bugs. Otherwise, you'll never see the big picture if you spend your time worrying about bugs.

After you've done it a few times, you'll make less and less bugs. If you've ever started with C or PHP, there was probably a time when you were making fatal errors due to forgetting semicolons... now you're experienced enough that you never worry about it.

If you haven't done so already, I highly recommend getting a bug tracker and a to do list for your projects. It's probably one of the most important things I've picked up from the programming.

share|improve this answer

its ok, to have write bugs, till they can be detected, resolved and not repeated again..., So learn from your bugs, and if possible document the bugs that you create, it ll help you not to repeat it again...

share|improve this answer

I'd say you're lucky your problem is consistency rather than, say, understanding. The fix is repetition, which some may see as lost time but as you say it improves problem solving ability. Unfortunately it can be a bit boring, so one solution is to get problem sets that are -so- simple you don't notice how long it takes. Unfortunately I don't have any links, I don't know what level (or what branch of math) you are at. Try asking friends for their p-sets or doing easy ones you see laying around.

For programming, try e.g. Do the same problems over and over and you will not only get more consistent but faster too. For typing (c.f. another question of yours that was unfortunately closed) try something repetitive like over, say, Typeracer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.