Here, let me explain. One of the biggest recurring problems among programmers, not only programmers but those who work solo on problems with an extensive width and a breadth, is that we get tunnel fucking vision.
Too many times have I been in a similar situation where I had an issue that drained several precious hours only to have a quick conversation with a fellow programmer to find out that it was some checkbox I forgot to tick or some lonely line of code which I took for granted. If you ever did some programming you know how shitty and great it feels at the same time when you solve issues such as this. You are happy because you've found the cause that squeezed the life out of you, and you feel like shit because, well... your life was squeezed out of you trying to figure out whadup. As a pragmatic man your next thought is this: "Okay. I made shit mistake. I don't want repeat this mistake ever again because it cost me a lot of time, made me feel stupid and tired me the hell out. So how do I not fall in this predicament again?"
This elephant photo belongs to Jim.I've got the remedy. You have two options.
- You get a rubber duck and you talk and walk him/her through the situation. Every time I tell an inexperienced developer about this they laugh at the mere idea of talking to an inanimate object... Seriously, rubber ducks are very very very helpful. When you are speaking in contrast to the act of silently thinking your brain works things out in a a whole different manner. This is an actual life-hack, yo. Use it and thank me later. We've tested this in real life situations so I can personally vouch for how good it is.
- You keep fellow developers and friends around and always have a couple of buds you can contact when you're stuck. When you tell them your problem they will ask you the most basic stupid questions and you'll cry out to them "No, man that's not where the problem is. Let me tell you..." Well you shut your whore mouth that instant and humor your friend and walk him through that code. He doesn't need to listen to your shitty ass theories about why your code isn't working because none of that got you nowhere. He is listening and doing you a favor, walk him through and you'll hit that snag in no time where you done goofed. This works because when someone who doesn't know your code enters the game they need baby-steps instructions on how things work and most often we make mistakes on these levels. After your friends solves your problem for you, you should buy him a drink later or suck his dick I don't care.
Finally, thank you @AurinRed for helping me out solve this problem! Your box of chocolate is on its way.