Coded while manic
Posted by stonedrunescaper@reddit | talesfromtechsupport | View on Reddit | 30 comments
So I wrote something for work. It’s not super incredible or crazy complex. It’s just something I wrote to make my job easier and then I shared it with the team. People started using it and then it replaced the old crap we used to do.
I’m panicking right now because I don’t understand what the fuck I wrote. I was out of my gddamn mind when I made this. None of it makes any sense. Like there’s two variables that are random German-looking words. I say looking because I googled them both and neither are real words. It’s literal nonsense.
Don’t ask me to tell you what they are because it would dox me to my coworkers.
I also have ‘ORANGE’ as a variable. Orange doesn’t match anything at all logically. I’m sitting here trying to remember why I used Orange and all I can actually remember is laughing to myself about eight months ago because orange rhymes with nothing. Then I started thinking about other languages and wondering if there’s oh
Motherfucker
I’m not correcting that. I’ll let you read where my brain stopped just now. I don’t even know how to finish this story anymore. It’s still a fuck up but now I think I can correct it.
**I was told to post this here from TIFU
Ophiochos@reddit
Is it just that your variables are weird? Does the code actually work fine? Doesn’t sound like anyone else has a problem.
stonedrunescaper@reddit (OP)
My coworkers are going to think I’m insane if they ever try to read it. & what if it breaks?
Ophiochos@reddit
I’d say that it took a while to get right and I was using unique variables to tell them apart. by the 18th version I was using very random stuff but finally it works!
Dr4g0nSqare@reddit
Man if people ever saw my print statements while I'm angrily troubleshooting code...
"I SHOULDN'T BE HITTING THIS LOGIC RIGHT NOW"
"WTF is this?!?"
"I'm stuck in another goddamn loop that I don't belong in."
"I'm a fucking stupid computer who can't do anything right"
I started doing it less often when I once almost submitted a version to the company git repo with one of those commented out but not deleted.
Geminii27@reddit
Not your problem. You weren't paid to code it, you're not being paid to maintain it. It was some manager's decision (or your co-workers' decisions) to use that code for the team. If it breaks, they can fix it, replace it, or they can go back to doing things the way they were doing before.
Other people choosing to use half-insane unknown code they have no contract covering? That's their decision and their responsibility. It's not yours.
OffSeer@reddit
Why can’t this Chatbot take the code and ask another Chatbot to decode and analyze it?
vaildin@reddit
I'm not a programmer, but I'm pretty sure that if its working, you shouldn't be touching it.
TheFishBanjo@reddit
I would start by formatting all the code to look nice and beginning to comment the parts that do make sense to me. Then I would start refactoring, taking small steps to make the code appear more sensible in the areas that I understand. The more I worked on it, I think my head would start wrapping around the problem again and understanding it. Some of the murky areas should come back. It's pretty amazing how much your brain can retain even though you might not be able to pull it to the surface right now.
As always, protect yourself at all times.
maryel77@reddit
While I can't make jokes by knowing about code, this is exactly how my brain works while panicking. In that sense, you're not alone, and are doing just fine... sometimes we all need those manic stream of consciousness content to unscramble our thoughts later, and you can take reassurance that you're a very smart cookie to make your panic work for you like that even if you don't know how to explain what you did.
trro16p@reddit
Since you kinda sorta figured out which planet your brain was on when you coded this, you should be able to relabel things to something coherent (with a lot of comments).
Remember, you should follow this guy philosophy
WorkChronicles.com - Relevant Cartoon
And you will avoid a situation in the future this guy faced.
XKCD - Relevant Cartoon
songbolt@reddit
lol, the upcoming generation struggles with the Internet, Episode 9208
Elestriel@reddit
Fixed that for you.
Loko8765@reddit
When you are asked how it works, look at the guy and say “Why? Don’t you understand it?”
fizzlefist@reddit
Double down on confidence. Make sure to have a cuppa coffee in one hand at all times, à la Julian from Trailer Park Boys.
NotPrepared2@reddit
Double down... Always have cups of coffee in both hands.
songbolt@reddit
If you're from another country, you also must brag how the people back there drink way more and stronger.
ravoguy@reddit
++?????++ Out of Cheese Error. Redo From Start
ManWhoIsDrunk@reddit
Just get a bigger ram skull!
z500@reddit
This is unironically one of my error codes
AshleyJSheridan@reddit
Mr. Jelly! Mr. Jelly! Error at Address Number 6, Treacle Mine Road.
ZilxDagero@reddit
Coding is like building a very precarious tower out of popcicle sticks several stories tall. Once it works, people should be afraid to touch it.
Entire-Relief-9662@reddit
orange rimes with something ask eminem
sori_at@reddit
If you say doorhinge with an Australian accent it works fine.
ray10k@reddit
Vibe coders showing code they don't understand and which "should" do what they need it to do:
OP: Look what they need to mimic a fraction of my power!
bno000@reddit
Is it a compiled binary or a script? They can’t easily pull it apart if it’s a binary I guess.
DeadlyShaving@reddit
Honestly I'd ask cursor to review it and comment everything and generate full documentation for me.
I'm building a discord bot and didn't worry about the code itself (how it looked/server specific terms I was using) until I got a collaborator and ngl sat here thinking "mother fucker... Why the fuck did I do that?" and way too many times now had a "what's this for? What does this do? Why did you do it this way?" and had to say "I mean... It worked doing that so it stayed?" 😅
Turbojelly@reddit
That is known as Vibe Coding.
Eichmil@reddit
Shove it into Codex and ask it to tell you what it does and given you a neatly written and documented version
robertabt@reddit
This is one of the few times where an LLM might be useful.
Tell it what task it is achieving and give it as much context as you can, and then ask it to comment your code, check it for bugs and (potentially) rename your variables.
Obviously if it's in-house / proprietary / sensitive don't do this using a commercial service. In that kind of case you'd be better off self-hosting some model.
Xaphios@reddit
Well now we need to know what the fuck up was and how you're going to correct it!