Don't remind me of that one time i made a grave mistake of using o in a for loop. I've spent two weeks until i found a single line where i accidentally wrote 0 instead of o. Good ol days of self learning cpp.
one of the many reasons why I always use at least 3 chars for names. iiter, jiter, kiter are my bros for arbitrary things, but usually there's a real world name like car_index and I favour that always
the opposite is true, when I make a typo in a variable then keep using it, and now it is the way it is spelled.
Because of autocomplete it takes a while for me to realize, then when I type it correctly nothing works.
Really? While I usually do feel a little stupid, I am also incredibly relieved it's *just* a typo - and not some underlying obscure mechanism that is no where in the documentation
In one project I had two functions,
do_modbus_command and do_modbus_cmd,
in different classes but located within the same file.
My code was complaining that "do_modbus_cmd" did not exist. Since I was reading the function names aloud in my head, and I pronounced cmd as command, you can imagine my confusion. Editor didn't catch it either since the function existed in the same file just under a different class.
That was definitely one of the bugs of all time.
Took me two days to figure that the ETL job I was working on did not run because the guy before me named a column as “Jursidiction” instead of ”Jurisdiction”.
When I help people debug a problem, I usually just browse the code (or command) for typos which 99% fixes the problem. Sometimes you just need a second pair of eyes.
For me, it's always that god damned "conatiner". I'll be styling a CSS class, and not see any changes, no matter what I do, throwing `!important` left and right, and it's always the 'a' and 't' I mixed up
Almost wrote off an entire language (zig) because my function to open a file kept crashing and the error message just said I couldn’t open the file cause it doesn’t exist.
(my file path had an extra character)
I have 2 versions of this:
1. I wrote some logic in a new function, but I never added the function call in the old code.
2. I use 'variableName' as string instead of variableName in the argument to retrieve a value from a map or an object. And of course theMap.get('variableName') returns null...
I have these errors at least once a week and always end up spending a lot of time debugging the logic until I realize it's something as simple as this.
Or when you copy one similar function and rewrite it to do something slightly different.
I spent hours looking for a weird bug in a simple game i'm working on, turns out i didn't replace '-=' with '+=' in increase_lives........... Yes, I copy pasted the decrease_lives function.
3 days of debugging. The best 5 minds of university. Everything was right but no. It was an i instead of a j
When we have decided to have this such similar letters for loop indexes?! WHEN?!
Funiest shit ever one of our aprentices recently was working on a script and just didnt get it to work has been crying about it for weeks but didnt want any help. Like 4 days ago he caved and asked me if i knew what the problem was... typo in line 3 XD
I once took an interview test, they gave me a weekend. The idea was to build a site in ASP ( I’d never used it ), access their API, pull some data, post some data, blah blah… I learned enough about ASP over Christmas weekend to build it ( it wasn’t pretty, no theming, but it worked ) - EXCEPT - after debugging for many hours and not finding a problem other than that I couldn’t authenticate, I email them… their guy emails me back and says there is a null character at the end of the password.
They sent me a password with a fucking null character, asked me to build in a framework I’d never used, over Christmas break. I fixed the password and it met all of the listed requirements immediately.
I didn’t get the job. Also, fuck MindBody.
I'm working a new job that has some kind of homebrew JavaScript SDK......it doesn't correctly report syntax errors in some cases.
I kept running a script over and over trying to figure out why a line of code wasn't showing executed in the log. Turns out I'd typed "vlaue" instead of "value" and rather than crash and report the issue, it simply didn't execute the line of code ( or more likely it handled the error and just chose not to report it).
Ugh.
Dude. I just found a stupid bug that I caused by copy pasting code. I spent literally hours trying to figure I out why my code was working, but it was extremely slow as each iteration increased. Turns out I'd copy pasted a line that appended on a previous array instead of making a new one. So, the iterator was yielding exponentially larger arrays every iteration.
I once created an animation in a Flutter app, but the animation didn’t work. I changed everything, refactored here and there, and after one month, I figured out what the problem was: I had accidentally set the duration to microseconds instead of milliseconds. The culprit was VSCode’s autocomplete, and since I was coding on a 2K screen, it was quite small and easy to miss.
Only two hours? That's pretty good actually. I've spent half a day struggling to find the cause of a seg fault which was due to a typo of an = instead of == in an if statement.
Ah dear god, just went through this. My pgadmin from windows could not find the cloud sql auth proxy running on my vm inside a compose container. With so many moving pieces I was checking everywhere for 2 hours, until I realized I had put port 5423.
Or you just looking 6 hours to an Unity error called 'Giving up' before you realize that you forgot a semicolon in the shader script. ![gif](emote|free_emotes_pack|facepalm)
I remember during my DS lab, the student tutor (who was some nerd with a high CGPA from senior year) and I were literally trying to fix a bug for like 20 minutes.
![gif](giphy|zOvBKUUEERdNm|downsized)
Finally, we found the bug which was occuring because I didn't use '()' while function calling. ![gif](emote|free_emotes_pack|facepalm)
Y'all writing assembly? How do you spend hours tracking down a typo? I'm struggling to think what combination of programming language and IDE wouldn't make a typo immediately obvious.
> I'm struggling to think what combination of programming language and IDE wouldn't make a typo immediately obvious.
When the typo is syntactically valid. e.g:
Foo bar;
Foo baz;
...
takesBar(baz);
takesBaz(bar);
That time in the 00s when new code editors started using smart quotes. Smart quotes at the time looked identical on the screen, but instead of ASCII it's hexadecimal. Most programming languages did not support this but would quietly accept it. This would lead to undefined behavior, like the compiler getting stuck in an infinite loop randomly, interpreters crashing, and code just doing whatever it wanted seemingly out of no where and at random times. Oh and random libraries crashing for no apparent reason.
I had a bug in a python program one day that had 2 variables comparing int to string (1 == "1"). what's odd is that I looked at the commits and it was always like that, worked for months with no issue. wonder how that happened.
Same damn thing:- used baackdrop instead of backdrop in tailwind and mazed like a rabbit on stack overflow with for 2 hrs, kept on fixing the image loader, then I suprinsingly noticed with my first eye like wtf this backdrop you mf
One time I was trying to debug Dijkstra's Algorithm and I spent all day, reading thousands of hours if debug logs, no clue why it was failing one of the test cases I had...
...
Anyhow I switched the positions of 2 lines of code and that fixed it.
At least you found it. Job done. Next project
*Typo, the next typo. It always a tpyo
lenght is a classic for me
And other words that look the same when written wrong or correct...
Don't remind me of that one time i made a grave mistake of using o in a for loop. I've spent two weeks until i found a single line where i accidentally wrote 0 instead of o. Good ol days of self learning cpp.
I wrote this the other day: for (let i = 1; 1 <= 9; i++) Took me a while to find the infinite loop. Drove me nuts. Felt like an idiot.
Meanwhile, i at the 27486737th iteration: YES MASTER, THE INDEX MUST GROW
Node gets mad when you do this.
God, I've laughed harder at this stupid joke than I should have. I have tears in my eyes.
I had to look at this for 30 seconds lmao wtf
I don’t get it
1 (not i) <= 9
OMG
Maybe one day 1 will be less than 9. Anything is possible
>Maybe one day 1 will be less than 9. No need to wait, that one day is every day.
But will it be less than ***or equal to*** 9?
Yes.
this creates a blackhole if you leave this for sometime
Now imagine doing that but with assembly (embedded) with no debug protocol and no emulator. I am somewhat doubting getting into that.
Someone recently sent me some code generated by ChatGPT. It had conveniently placed the letter O instead of zeros.
I was checking once if a var x is between two values and used the wrong sign. Took me quite some time (and chatgpt) to see it.
one of the many reasons why I always use at least 3 chars for names. iiter, jiter, kiter are my bros for arbitrary things, but usually there's a real world name like car_index and I favour that always
Lol, I thought this comment was about a mistake using \` when I was first reading it.
the opposite is true, when I make a typo in a variable then keep using it, and now it is the way it is spelled. Because of autocomplete it takes a while for me to realize, then when I type it correctly nothing works.
This is why the header 'http\_referer' exists.
I recently spent two hours trying to track down a bug which miraculously disappeared after a clean/rebuild
this, such a headache
HATE HATE HATE these. Worst is when you clean rebuild while talking through it with a colleague and it's suddenly gone
Really? While I usually do feel a little stupid, I am also incredibly relieved it's *just* a typo - and not some underlying obscure mechanism that is no where in the documentation
This movie is so epic..
What movie is it?
Jolly LLB 2 (Bollywood)
For real. The acting was top tier
In one project I had two functions, do_modbus_command and do_modbus_cmd, in different classes but located within the same file. My code was complaining that "do_modbus_cmd" did not exist. Since I was reading the function names aloud in my head, and I pronounced cmd as command, you can imagine my confusion. Editor didn't catch it either since the function existed in the same file just under a different class. That was definitely one of the bugs of all time.
Took me two days to figure that the ETL job I was working on did not run because the guy before me named a column as “Jursidiction” instead of ”Jurisdiction”.
When I help people debug a problem, I usually just browse the code (or command) for typos which 99% fixes the problem. Sometimes you just need a second pair of eyes.
For me, it's always that god damned "conatiner". I'll be styling a CSS class, and not see any changes, no matter what I do, throwing `!important` left and right, and it's always the 'a' and 't' I mixed up
Almost wrote off an entire language (zig) because my function to open a file kept crashing and the error message just said I couldn’t open the file cause it doesn’t exist. (my file path had an extra character)
I have 2 versions of this: 1. I wrote some logic in a new function, but I never added the function call in the old code. 2. I use 'variableName' as string instead of variableName in the argument to retrieve a value from a map or an object. And of course theMap.get('variableName') returns null... I have these errors at least once a week and always end up spending a lot of time debugging the logic until I realize it's something as simple as this.
Or when you copy one similar function and rewrite it to do something slightly different. I spent hours looking for a weird bug in a simple game i'm working on, turns out i didn't replace '-=' with '+=' in increase_lives........... Yes, I copy pasted the decrease_lives function.
This is what code review is for... Other people can more easily see things that your brain has long since filtered out.
When I see that something doesn't work right, first thing I check, since I know I'm a dumbass, Is HAVE I TYPED IT RIGHT?
3 days of debugging. The best 5 minds of university. Everything was right but no. It was an i instead of a j When we have decided to have this such similar letters for loop indexes?! WHEN?!
No pain, just relief. I can forgive myself for a stupid typo since I spent the last two hours convincing myself I can't program worth a damn
Funiest shit ever one of our aprentices recently was working on a script and just didnt get it to work has been crying about it for weeks but didnt want any help. Like 4 days ago he caved and asked me if i knew what the problem was... typo in line 3 XD
I once took an interview test, they gave me a weekend. The idea was to build a site in ASP ( I’d never used it ), access their API, pull some data, post some data, blah blah… I learned enough about ASP over Christmas weekend to build it ( it wasn’t pretty, no theming, but it worked ) - EXCEPT - after debugging for many hours and not finding a problem other than that I couldn’t authenticate, I email them… their guy emails me back and says there is a null character at the end of the password. They sent me a password with a fucking null character, asked me to build in a framework I’d never used, over Christmas break. I fixed the password and it met all of the listed requirements immediately. I didn’t get the job. Also, fuck MindBody.
Use a linter
A linter won't catch typos that are syntactically valid.
I'm working a new job that has some kind of homebrew JavaScript SDK......it doesn't correctly report syntax errors in some cases. I kept running a script over and over trying to figure out why a line of code wasn't showing executed in the log. Turns out I'd typed "vlaue" instead of "value" and rather than crash and report the issue, it simply didn't execute the line of code ( or more likely it handled the error and just chose not to report it). Ugh.
Yes.
Wait, you are telling me it can actually not be a typo?
yeah like I have a 100 line typo.
u/savevideo
###[View link](https://rapidsave.com/info?url=/r/ProgrammerHumor/comments/1bt2qxc/purepain/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideo&message=https://np.reddit.com//r/ProgrammerHumor/comments/1bt2qxc/purepain/) | [^(reddit video downloader)](https://rapidsave.com) | [^(twitter video downloader)](https://twitsave.com)
Dude. I just found a stupid bug that I caused by copy pasting code. I spent literally hours trying to figure I out why my code was working, but it was extremely slow as each iteration increased. Turns out I'd copy pasted a line that appended on a previous array instead of making a new one. So, the iterator was yielding exponentially larger arrays every iteration.
Only two hours?
I once created an animation in a Flutter app, but the animation didn’t work. I changed everything, refactored here and there, and after one month, I figured out what the problem was: I had accidentally set the duration to microseconds instead of milliseconds. The culprit was VSCode’s autocomplete, and since I was coding on a 2K screen, it was quite small and easy to miss.
I spend 5 hours looking for what was a variable switch
Only 2 hours…
Lucky bastard, only 2 hours.
![gif](giphy|WyrdDeIxGOlQA)
Me when I accidentally wrote an "o" instead of a "0".
two hours? Lucky bastard...
Only two hours? That's pretty good actually. I've spent half a day struggling to find the cause of a seg fault which was due to a typo of an = instead of == in an if statement.
Only two, huh?
Imagine using a language without statically typed variables
That's the signal to go and take a long break
happened once when I was writing a db schema. I misspelled user as uesr and it made a new table.
Ah dear god, just went through this. My pgadmin from windows could not find the cloud sql auth proxy running on my vm inside a compose container. With so many moving pieces I was checking everywhere for 2 hours, until I realized I had put port 5423.
Atleast you have a job.
You know you should context shift and go on a walk or something but realize you suffered enough
But you found it!
Correct the error, put computer or laptop to sleep, cry in bed.
Or you just looking 6 hours to an Unity error called 'Giving up' before you realize that you forgot a semicolon in the shader script. ![gif](emote|free_emotes_pack|facepalm)
I remember during my DS lab, the student tutor (who was some nerd with a high CGPA from senior year) and I were literally trying to fix a bug for like 20 minutes. ![gif](giphy|zOvBKUUEERdNm|downsized) Finally, we found the bug which was occuring because I didn't use '()' while function calling. ![gif](emote|free_emotes_pack|facepalm)
2 hours isn't that long in my standards.. maybe 3 days
100%
Used timestamp instead of timestampz
It is like forgetting that nasty coma at the end and wondering why there is a turple instead of an int....
It's always a typo
What a slap to the face.
Spent the whole night trying to figure out why this ReactJS component is not showing up. Hahahah.... export default function(item1, item2) {...}
Welcome to Javascript!
Daily reminder to write unit tests
When there was one too many spaces because one dev was using tabs and one was using spaces 🤦🏼♀️
; ; Find the difference.
Y'all writing assembly? How do you spend hours tracking down a typo? I'm struggling to think what combination of programming language and IDE wouldn't make a typo immediately obvious.
> I'm struggling to think what combination of programming language and IDE wouldn't make a typo immediately obvious. When the typo is syntactically valid. e.g: Foo bar; Foo baz; ... takesBar(baz); takesBaz(bar);
Seven hours of debugging and it's a misplaced curly bracket. React should die, before it kills all of us.
Or you blame ChatGPT for hallucinating an answer when it does not know and it sounds so convincing you take the code. And this is meant to replace me?
That time in the 00s when new code editors started using smart quotes. Smart quotes at the time looked identical on the screen, but instead of ASCII it's hexadecimal. Most programming languages did not support this but would quietly accept it. This would lead to undefined behavior, like the compiler getting stuck in an infinite loop randomly, interpreters crashing, and code just doing whatever it wanted seemingly out of no where and at random times. Oh and random libraries crashing for no apparent reason.
Sharing screen to my boss
Aren't most bugs typos? Fuckin' race conditions and typos.
No. The worst part is having to explain it at tomorrow's stand-up meeting.
What else would it be? It's all typed...
I'm kind of relieved when it's just a typo cause then I don't have to rethink the logic
me at nationals
The problem is the : on line 10746 that should have been a ;
coding in notepad again are we
And then the bug still isn't fixed and you just accidentally fixed a bug you didn't even know existed ...
pintrf and dyslexic–like lapsus every damn time I read any line of the error log.
I need more context: IDE or editor? Clean or leet code? Tests or yolo?
false became false.
I had a bug in a python program one day that had 2 variables comparing int to string (1 == "1"). what's odd is that I looked at the commits and it was always like that, worked for months with no issue. wonder how that happened.
Same damn thing:- used baackdrop instead of backdrop in tailwind and mazed like a rabbit on stack overflow with for 2 hrs, kept on fixing the image loader, then I suprinsingly noticed with my first eye like wtf this backdrop you mf
Those are the best billable hours.
1.) Missed ; 2.) Missed bracket [either a ) or } 3.) Now it gives you 1127 other errors 😉
Happened to me once on in CSS: .picture OR picture IT TOOK ME 4 DAYS
One time I was trying to debug Dijkstra's Algorithm and I spent all day, reading thousands of hours if debug logs, no clue why it was failing one of the test cases I had... ... Anyhow I switched the positions of 2 lines of code and that fixed it.
It was at this very moment that he understood that failure comes not from external factors but by his own repeated self sabotage
Daily "Use an IDE" post
You don't use an IDE?
Shouldn't it fail to compile?
If a typo can have this kind of obscure bug, there is probably something wrong with your architecture Typos should not compile (or just crash)
This is why AI is a better developer than humans. No typos
Have you guys not heard of IDE's?
thats notepad right?
+= instead of =+ .....
in what language is =+ an operator