What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Stupid coding mistakes

chriswp

Legendary Member
Rating - 100%
42   0   0
Joined
Nov 21, 2011
Messages
1,116
Reaction score
880
Points
5,785
Age
30
Location
Northern Suburbs, CT
Whats the longest you have been stuck on a bug/error and it turns out that you were just stupid?
Mine is now in Python:

I have spent 3 hours quering a pandas dataframe and getting no results (there should always be results for this query), and it turns out that I had a % instead of a &:
h_records = dfh.loc[(dfh['date']==station[0])%(dfh['lat']==station[1])&(dfh['long']==station[2]), :]

So much time wasted
 
:ROFLMAO: I once spend 3 hours trying to figure out why the data does not update on the frontend side, turns out I binded the wrong data property to the frontend. Was a great moment 🤦‍♀️
 
:ROFLMAO: I once spend 3 hours trying to figure out why the data does not update on the frontend side, turns out I binded the wrong data property to the frontend. Was a great moment 🤦‍♀️
Been there 🤦‍♂️
 
Not exactly my own stupidity but it did make me waste so much time.

#define else
 
I've done plenty dumb stuff, but I've blocked it all from my memory... I only remember the following because it was funny because of how the guy reacted.

Once helped a buddy at work who was struggling with an issue for like 4 hours... He asked me to come look and I was like
"click there... hit delete and it will work"
He had copied the control ID including the # from the JS and pasted it into the actual HTML when changing the control ID... resulting in
<div id="#someid"></div> ... so the js going $("#someid") wasn't finding the control to drop the partial view in to.

He was like "F#### you" (which was more to himself lol) when I told him to just remove the # and it worked instantly... because he had been debugging all the backend code for hours, making sure the right variables were going into the method and the right data was coming back and the right partial view was getting populated and sent back. lol
 
This one time, at band camp, I used JSON Utils: Generate C#, VB.Net, SQL Table, Java and PHP from JSON which is an amazing tool that let's you paste in a block of JSON and it will generate a C# (or a few other langs) model for you.
Unfortunately one of the properties was called "System" which then made a "System" class. I only notice stuff was broken a little bit after adding that stuff so now I was in some other file that refused to compile because it was "using System.<something>". I checked and the DLL was there and everything and wasted a good amount of time wondering WTF on that one...
 
A guy at work was stuck on one issue for half a week. They combed through everything back and forth, analysts, devs, and who knows all. Some dev environment wasn't being populated, but everything checked out. He was missing a "\" at the end of the path.
No idea what the environment/data/language or the sort was though 🤷‍♂️
 
A guy at work was stuck on one issue for half a week. They combed through everything back and forth, analysts, devs, and who knows all. Some dev environment wasn't being populated, but everything checked out. He was missing a "\" at the end of the path.
No idea what the environment/data/language or the sort was though 🤷‍♂️
I have a colleague who uses this 'crude' path joining method. I've had this issue a few times when I use his scripts and change some stuff.
 
Definitely not my longest case but the most retarded... Was coding a campus lab exam and had finished all submissions save for one, which was outputting the same answer no matter what I tried. Turns out I was making changes to one file and compiling another copy of my first attempt. Took me an hour and a bit to figure that out.
 
Definitely not my longest case but the most retarded... Was coding a campus lab exam and had finished all submissions save for one, which was outputting the same answer no matter what I tried. Turns out I was making changes to one file and compiling another copy of my first attempt. Took me an hour and a bit to figure that out.
Had this a few times as well. Working on a script that's on a server, while the processing is done on a remote desktop, but I copied the server script to the remote desktop to test it. Takes a few runs of the script to figure out that I'm being dumb.
 
Definitely not my longest case but the most retarded... Was coding a campus lab exam and had finished all submissions save for one, which was outputting the same answer no matter what I tried. Turns out I was making changes to one file and compiling another copy of my first attempt. Took me an hour and a bit to figure that out.

Wait until you learn about broswer caching and deploy something without adding a version number to the javascript and the clients complain the same stuff is still not working correctly... but locally it works PERFECTLY...

Then there's regional settings and all the fun that THAT brings with it. lol.
I'm supporting some legacy software for a client... A C# clickonce app that was written quite a few years ago.

One user complains there's a certain part of the application not working correctly for JUST her. We log in on another machine... it works... we go to her machine... log in as her... doesn't work... log in as someone else... doesn't work. No error message, just doesn't work as expected. Faff for two hours stepping through code... eventually turns out to be regional settings... was trying to convert to decimal, but had a "," instead of a "." so it was breaking... logging errors, but it doesn't log WHICH user caused the error... there are lots of errors being logged constantly by various parts of the app and various users... so it was trial and error and eventually I was like "mmmmm... lemme check something"... and boom, found the issue.
 

Users who are viewing this thread

Back
Top Bottom