+ 2
What's the easiest programming bug you’ve spent way too much time trying to solve?
5 Antworten
+ 14
Once I wrote the code for an Android app. At one place in hundreds of lines of code, I wrote "EditText" instead of "TextView" (IDE won't recognize this error). It took me 4 hours to write the code but 1 whole day to find the mistake.
+ 4
I forgot to put a cout statement and was thinking for like 2 days
why the hell is this not giving me any output.....
😂😂😂😂😂
https://www.sololearn.com/Discuss/728061/?ref=app
+ 3
yea i will sound dumb if i explain it
so i have a class that manages config files which handles currently 2 main files. i have copy pasted code and i messed something up. this is what the code looked like about
ConfigManager manager = new ConfigManager();
manager.setupFile1();
manager.loadFile1();
ConfigManager manager = new ConfigManager();
manager.setupFile2();
manager.loadFile2();
then runningc this gave me a NullpointerException on file1 for guess what reason. i accidentally did ConfigManager manager = new ConfigManager(); twice which overrides file1 to null
it took me 45 min to figure it out because i was only looking in the ConfigManager class. i did fix a few other bugs in the process but now i hate myself for not thinking to read the object creation.
something to learn... if you have a problem, do not only read the area where the stacktrace tells you where it is, but also how it was constructed and declared
happy coding
+ 3
I was coding on Unity and wrote the code that checks whether the LayerMask is ground , if so player can jump ... nothing fancy
But the code didn't work , it took me an entire day , changing every line of code which I knew was right (just in case ) changing mechanics , doing every stupid thing I can , I was about to delete the game then I noticed I set the Tag as "Ground" instead of LayerMask (they are next to each other) ;_;
+ 1
When I was writing a game in Python I used an integer type input and couldn't figure out why the whole game broke. I changed everything and still no luck, spent 2 days on it. Then I realised I just had to remove the integer from int(input()). That solved everything.