+ 5
What are some of your most silly mistakes you have missed?
Hey everyone, When dealing with thousands of codes, it becomes quite a common occurrence to unintentionally make syntax and illogical errors within our code. What are some of your most silly mistakes that you have been trying to fix for hours before coming to a conclusion that it was so simple? Personally for me, I had issues with null exception handling which took several meaningless hours debugging the whole program. Cheers everyone and Happy Coding!
13 Answers
+ 10
I was wondering why my python script doesn’t work.
I forgot to type ”python” in front of my file when executing it.
+ 9
hhhh Robert Atkins did u finally find the error ?😄
my Silly mistake is i forget (;) 😅
+ 8
was typing up an event handler for a key stroke and on the down key i typed KeyEvent.getKeyLocation()
instead of
KeyEvent.getKeyCode();
spent hours trying to figure out why my sprite could move left, right, and up, but not down lol
+ 7
one time, when I was building a website, i forgot that each line (in JavaScript) usually needs a colon to finish the statement, so I sat there for hours, eventually gave up, then came back a day and a half later, and eventually figured it out, and laughed histerically fer like a minute at my stupidity
so yep, thats my dumb mistake that I made, cuz yep, im spECial😅😂😂
*sigh*
+ 6
(1/2/3) = (1/(2/3))
I saw the code and misunderstand that formula for hours not just hours but 2 days
well actually
(1/2/3) ≠ (1/(2/3))
+ 6
Forget to compile a Java code using javac before running it...
+ 5
Sawen yeah, and that happens to me a lot as well :) lol or forget the () when i call length on a String instead of an array
+ 5
I was web scraping in Python, and 2 hours of debugging to realize that I typed urlopen(link).read instead of urlopen(link).read() 😂😂😂
+ 5
The most often mistypings are:
Doing a for loop going down
for(int i=n;i>=0;i++)
wrong variable used
arr=new int[r][c]
for(int i=0;i<r;i++)
for(int j=0; j<r;j++)
foo(arr[i][j])
or
for(int j=0; j<c;i++)
+ 5
when i was working on a website using bootstrap 4 i realized there was a horizontal scrollbar in my website which was not expected. i spent too many hours trying to fix it only to realize that instead of typing 'container-fluid' i had typed 'row-fluid'
+ 4
Thanks all for the responses, they're great and can definitely relate 100%!
+ 4
I tried to use : to set html attributes 🤦♂️
+ 4
I used such a for loop once
for (int x=0;x>5;x++){}
The code inside didn't run. It took me hours to figure out what was wrong. In fact, I asked for help in the Q&A.
When I found out the condition should've been 'x<5' I was like "yo wtf!" I deleted the Q&A thread as soon as I could.