I keep running into the same problems. The problem is irrelevant, but the fact that I keep running into is completely frustrating.

The problem only happens once every, 3-6 months or so as I stub out a new iteration of the project. I keep a journal every time, but I spend at least a day or two each iteration trying to get the issue resolved.

How do you guys keep from making the same mistakes over and over?
I've tried a journal but it apparently doesn't work for me.

A few more details about the issue: Each time I make a new project to hold the files, I import a particular library. The library is a C++ library which imports glew.h and glx.h GLX redefines BOOL and that's not kosher since BOOL is a keyword for ObjC.

I had a fix the last time I went through this. I #ifndef the header in the library to exclude GLEW and GLX and everything worked hunky-dory.

This time, however, I do the same thing, use the same #ifndef block but now it throws a bunch of errors. I go back to the old project, and it works. New project no-worky.

It seems like it does this every time, and my solution to it is new each time for some reason. I know #defines and #includes are one of the trickiest areas of C++ (and cross-language with Objective-C), but I had this working and now it's not.

  • 2
    I think a few more details would be helpful in your question.
    – Walter
    Nov 16, 2010 at 13:52
  • Wow, this is messed up. C++ has a built-in bool type.
    – Dima
    Nov 16, 2010 at 14:15
  • @Dima, I know. xmd.h typedef's a BOOL as unsigned char but in objc.h it is signed char. Nov 16, 2010 at 14:29

4 Answers 4


I'd suggest determining what triggers the issue, and restructuring your development process to avoid that scenario. What 'restructuring' entails is highly dependent on the problem. It ranges from abstracting some behavior into a seperate class to changing the composition of your team.

A journal detailing the context of the incident and resolution approaches can certainly help you converge on the root cause and/or a general solution. Once you've determined that there are a few obvious options:

  1. If the cause is avoidable: Try to avoid triggering the root cause next time.
  2. If the solution proves to be simple: Implement the general solution whenever the problem occurs.
  3. Restructure your development process so that it naturally avoids the issue.

The options available depend on the information about the issue you have, and the amount of control you have over the development process.

  • I agree. Learning and remembering how to fix a problem is not a long term solution, you should fix the underlying issue so you don't run into the problem again. Like getting your car stuck in mud. Its very good knowing how to get your car out of mud, but the lesson of the day should be not to drive your car through mud in the first place.
    – Richard
    Nov 16, 2010 at 14:04
  • Point 3 is well taken. Nov 16, 2010 at 14:53

I use full-text search of my email like a knowledge base and have for a dozen years. When I have a new issue I resolve that I know I'll need to remember, if there is no relevant email chain I'll just send a mail to myself so that it will get pulled up the next time I have the problem and go casting about for the answer. Not really different from a journal; the key to this is that I always already search my email if I know I've seen a particular issue before.

  • like a personal wiki? Nov 16, 2010 at 14:06
  • Yeah sort of, but even more informal if thats possible. The difference is there is already a lot of information in my mailbox due to email chains with other developers, vendors etc. So rather than put that in a Wiki I just add my own entries to my mailbox.
    – Jeremy
    Nov 16, 2010 at 14:07

A well adjusted person is one who makes the same mistake twice without getting nervous. - Alexander Hamilton

Seriously, though, if this has already happened a few times, that means that you will soon catch on. :)

  • but it's so costly! It's a tricky problem to be sure, (Objective-C++, glx and cocoa don't mix) but I keep solving it and not either taking good enough notes or something because it happens again! Nov 16, 2010 at 13:51
  • Well, if you keep forgetting about it, it must not be costly enough... Do you not remember that you have seen it before? Do you not remember where you put your notes?
    – Dima
    Nov 16, 2010 at 13:56
  • it seems like the solution I used last time doesn't work completely or I miss a step or some such each time I implement it. I'm reading my notes but I just must not be careful enough or something. Are there other methods? Nov 16, 2010 at 14:02
  • Sounds like your notes are not detailed enough...
    – Dima
    Nov 16, 2010 at 14:11

Trust your instinct.

Some people get nervous in the face of a new assignment, large or small. The answer that you found last time is still somewhere in your memory, regardless of your memory-recall works.

"Instinct" is often a proxy-word for the sub-conscious memory recall. You might have an 'inclination,' 'an urge,' or similar. Acting on those weak signals is more difficult in the presence of anxiety or other attention-consuming / attention-distracting factors.

  • 1
    Please elaborate on this.
    – Dynamic
    May 13, 2012 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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