I've been developing for years. Years! Yet every now and then something that turns out to be simple floors me for just a little bit longer than is comfortable.
Working with code really can keep you humble. What always catches you out or got you stuck recently that really shouldn't have?
Share your silly mistakes and maybe we'll all feel a bit better about it.
Latest comments (120)
One of those silly mistakes that a friend of mine always does in laravel is when he is editing a "blade" file and expect the result in another file .. so we often spend 15 min until we figure out that we are working on the wrong route or blade
I had to check, blades are view templates in Laravel, right? It's a badass thing to say you're working on regardless! So many templates look the same though, it's easy to mix up.
I made a new react component but kept getting type errors (was using typescript) in VS Code. I removed everything one by one until I was left with just a ‘< div />’ and still there were squiggly lines all over. I looked everywhere but couldn’t figure out why (even copied the entirety of a component that was working). Ultimately, I realised my file was a ‘.ts’ instead of ‘.tsx’.
One "x" out of place and not even in the contents of the file. Ouch!
I was coding with HTML the other day, and I usually correct my code (copy and paste a piece elsewhere) as I go along to clean up the interface, but then I forget to add the closing tags for the elements, making me spend HOURS trying to figure out why the hierarchy on my screen isn't working and why things weren't showing up 😂
Why isn't my function working?!
*forgot to call it
When you use bluej and you are a beginner. You make a program but it has no output such as system.out.println. And then you try to execute it and have no errors but blank output this happened to me on my examinations, good thing it was not too late for me i made it and got full marks gg
I spent all day yesterday on a problem only to realize that it was an array index off by one (some code was in JavaScript, some in C#/Razor, and I didn't notice the C# part was generating the wrong numbers in the HTML). Of course, the code was trying to resolve something in the wrong set of data, leading to very weird results.
Expletives were used.
User: I can't save anything!
Me: What? Of course you can.
User: It won't save, it just says 'field not found' - what does that mean?
Me: Ohh...
I haven't unlocked permissions for the
user
role. It works for myadmin
role!I forgot to include a viewport META in the example code for an article about using CSS instead of JavaScript to make a mobile "hamburger" menu, then for a week couldn't figure out why people were reporting that the font size was uselessly tiny on their devices... wasted time throwing all sorts of style at the problem and staring at the CSS, when the problem was in the markup.
I can't tell you how many times I've done something like:
if(a = b) {
// do something
}
After some time I finally realize that i didn't put a second
=
.Oh, I've done this before. It's such a pain to spot a missing
=
!Nearly 25 years ago. Programming in SAS on the mainframe for the first time. I had to process some data and output some summary reports. Of course, there was a need for some blank lines.
Now, printing on the mainframe: The printer was in another building. A few times a day, someone would bring the printouts over to a specific floor in the other two buildings. So, you had to wait until the time the printouts are dropped off and then go to the floor in the building where they are left and hope it had printed in time for this run.
Obviously, since I was new at this, I figured I'd develop the reports on screen until they looked good enough to see how they looked on paper. Makes sense, right?
The blank lines would never show. Everything was stuck together with no spacing. I tried dozens of things, to no avail. I mentioned it in passing to a couple of more experienced people but they just assumed I needed to work more at it, I guess.
I worked at this all week, no success. Come Friday, we have a section meeting and I mention the issue. Right away some guy with lots of mainframe experience says, "Oh, that's normal. The blank lines won't show on the screen. You have to print if you have to see them."
That look of annoyance on my face coupled with me laughing out loud must have been something.
Could not get a Lambda .NET core project to run locally with AWS toolkit earlier, spent about 1/2 hour digging around and searching for some missing dependency - ended up asking another dev - turned out I just set the wrong start up project in VS 🤦♂️🤦♂️🤦♂️
pm2 reset app instead off pm2 restart app, and was wondering what impossible bug have i introduced into my code, because i couldn't fix it 🤦♂️
Once spent 2 days wondering why my login component wasn't rendering.....
Was looking on the wrong page 😂😂😂😂
Luckily this was in my practice days and not anything serious.
Still not sure why I decided to pursue it as a career after that
Because we all do it! 😂
Most of the time what I do is change something on the local api and query the hosted api for the changes via postman. Will go like this for about 5 minutes restarting and console logging the code until my sight gets the glimpse of the url in postman . Silly me
Ouch. And you can't even place a visual banner to say it's dev/staging when it's an API request.
Late reply - but a thought occurred to me - what about a response header 'X-Environment: test/dev/prod', that might help when staring at Postman for the umpteenth time?
Might help! Though I know I would likely be looking at the body of the response rather than the headers. Sometimes there’s just no guard against ourselves 😄
Well well...
github.com/postmanlabs/postman-app...
still open :(
That's a good idea though. Maybe it will get enough support.
That moment when you are setting up a web server and you don't understand why it's not loading your index.html on both HTTP/HTTPS. Oh wait, firewall (AWS EC2 -.-")