4

It was one of those "I need more coffee days"..
I was writing some checking function called "check" (now to clarify my company is not coding oop style so no classes etc.) And as I went on I included another file for some functions and what not. Pretty normal stuff right? Right. In that file I required there also was a function called "check".
Guess who tried to use the "check" function of the imported file in the "check" function?! Right! A Fucking genius aka. me!!
So I tried to figure out why the page wouldn't load and why the server was starting to lag more and more.
After killing all the apache tasks three times i finally realized what I did.
Took me 10 minutes to figure out that i was causing endless recursion. That day wasn't my best and clearly not filled with enough coffee.

PS: yes I know oop would have probably eliminated the possibility for this but I'm just adapting to the coding style of my company as I can't really change things since I'm just an intern.

Comments
Add Comment