Smash that "subscribe" button if you don't want to miss anything. π
For further actions, you may consider blocking this person and/or reporting abuse
Smash that "subscribe" button if you don't want to miss anything. π
For further actions, you may consider blocking this person and/or reporting abuse
Oldest comments (29)
Early in my webdev life I really didn't grasp the concept of
GETvsPOST. I wrote some really bad/insecure code which attempted to submit huge amounts of data via URL params.Any time I've had to work on really bad legacy code where I can't confidently change any existing code, but I can pile some crap on the top somewhere if there's a problem. It just keeps getting worse and worse and worse and eventually you leave the project and somebody else takes the routine.
I once worked on a SQL query that took seven days to execute. Exact same situation.
Aghhhhhh!
Did things ever fail after 5 days and you need to start over? I mean β sometimes I'm running a script that requires me to keep my laptop open and I forget that. π
So it started Like executing for
2 days : Didn't execute, abort
3 days :Didnt work, abort
5 days: Didnt work, abort
finally it was long weekend and i executed it in my cloud virtual machine.
7 days : Finally Done.
ibb.co/6XRc7Xt : See this.
Oh man do I feel this. It's too real haha
What's the worst code you've ever written... yet.
A SQL script that deletes all tables, views, everything.
Executed by mistake (my first days at work).
My mates pranked me.
Wait so they pranked you into writing the script and executing? Can you expand on the story?
Well I was a trainee (German system) and it was my first month or so. My trainer just wanted to show me some cool stuff on a dummy database. Sadly though the DB software was still connected to the main db. So yeah I deleted main. Of course our admins had backups but still ... Yikes
I remember do something similar in UNIX scripting where you delete all the files on a system. The way you figure out who did it was that the only remaining account left on the system was theirs, as you cannot delete your own account. That was always fun. Even more fun when one of the backups failed.
At the beginning of my career, I was fond of one-liners and compactness, with all the disregard of white spaces, meaningful variable names and readability all around.
I don't really know if the code was either crappy, genius or average, because I had no idea of what that meant: it was completely obscure to myself in a couple of months.
My code used to look like a regular expression.
Lol I remember early on as a programmer being proud of traits in my code which were objectively awful. Like, seeing complexity as a win because of all the cool things one single algorithm could accomplish.
Yikes
Made my day. Might be due to my constant usage of ihateregex.io/
I had to store plain password in a "new" application cause in the previous application the password were stored like that.
In 2008 I participated in a graphing calculator challenge where the goal was to convert a numeric input into word form (e.g. 1002 to "one thousand two"). I didn't understand algorithms at the time, so the code was a mass of if statements determining what each part of the screen should print, rather than concatenating a string.
The screen wasn't big enough to handle output that way, so the "and" was... creatively placed.
(I still won though because my program was the fastest... turns out calculators executed loops very slowly, so my not using them gave me an edge!)
Didnβt know React but was called in to do some last minute changes which needs to be committed under a deadline.
Using location.reload() to refresh the browser after a react state change that wasnβt rendering the intended component.
Got so sick in the stomach writing it. Had to purge it from git history so it never exist. Spend the weekend learning React proper.
It felt dirty. I never fully recovered.
C'mon that's not that bad πππ
I once wrote a primitive ES3 lexical parser in PHP meant to filter out comments and bundle JS files (a few years before node.js was released).
It resulted in errors because it had concatenated jQuery, which used an IEFE, with another IEFE without a semicolon in between, an edge case that I had overseen during development. It took me almost 1Β½ days to find and fix that error.
I was a college student in my first year and I used phyton in basic programming class. It was an exam day and one of the task given was to make a triangle with "*". I didn't even know how to use a loop concept, so I used print() and spacebar a few times to make a triangle. I could say that the task was succesfully failed.
When all you have is a hammer, everything is a nail innit