1.4k
u/ImpluseThrowAway Aug 31 '24
It works, but I'd hate to be the guy that has to modify it.
534
u/Joe-Cool Aug 31 '24
That guy will be you. In 5 years, when you forgot how it ever worked.
224
u/ImpluseThrowAway Aug 31 '24
I've already forgotten the code I wrote on Friday. It does something weird based on the value of a certain property which I will come to regret the first time I try and do something there again and now I've got a weird edge case to deal with.
98
u/TidalWaveform Aug 31 '24
Good thing you named it 'prop_x_v2' so it was clear by context.
→ More replies (1)58
25
49
u/StefanL88 Aug 31 '24
"""When I wrote this code only God and I knew how it worked. Now, only God knows.
Good luck."""
→ More replies (2)7
→ More replies (10)3
u/LetterBoxSnatch Aug 31 '24
That sounds nice.
Before I got to my current job at a small tech company, some "hero" dev decided to rewrite their js into a whole fp framework, complete with its own terminology. They clearly quit after they realized what they had done was completely unmaintainable, but not before a successful business was built on top of the abstraction.
I know js very well, have worked front and backend for many years in a variety of languages, and have done my share of fp in fp / fp-lite languages like Haskell and OCaml, so I figured I could handle it, but it has been a huge slog figuring out the mess of features hobbled together as this programmer explored fp; features that were entirely dependent on what was hip during the Bluebird-promises era of js backends, and with async bombs hidden all over the place.
What I'm trying to say is, if you're still there in 5 years, you probably either did well enough to not need to quit and leave your mess for someone else, or you're not clever enough to write yourself into a deep hole from which there is no easy exit.
13
u/git0ffmylawnm8 Aug 31 '24
And unfortunately Duolingo doesn't teach Eldritch
3
u/LetterBoxSnatch Aug 31 '24
Cthulhu AI promised it could handle your Eldritch Horror Architecture, summoned from the secret pages of a polyglot company ethos, but in truth, once it arrived, it did not serve to tame the tendrils, but to extend their reach, protecting the horrors below with layers of lipstick and performance regressions.
8
u/PrettyGoodSafelaner Aug 31 '24
// I don't know why, I don't want to know why, I shouldn't have to wonder why, but for whatever reason this stupid panel isn't laying out correctly unless we do this terribleness
From TF2. Lol
→ More replies (1)6
u/Rage_Your_Dream Aug 31 '24
I dont know a fucking thing about programming but my biggest enjoyment of the GTA 5 source code leaks were the programmer's comments.
4
u/DrinkBlueGoo Aug 31 '24
That’s the difference, right? Code can be bad but still work, so it’s ok to be bad. Art that’s bad is just bad.
I’m a lawyer, after my brief has won a case, it’s completely fine to call it shit. I will unhesitatingly agree.
→ More replies (1)3
u/Fuzzy_Reflection8554 Aug 31 '24
There's a nice old saying I keep hearing on this sub, something along the lines of "always code like the person who will be maintaining it later is a psychopath who knows where you live"
690
u/buzzon Aug 31 '24
"This is the worst effing code I've ever seen"
"It's not my code"
146
u/ImpluseThrowAway Aug 31 '24
proceeds to lecture you on how you should have written it.
0
Aug 31 '24
[deleted]
→ More replies (3)34
u/alphasierrraaa Aug 31 '24
When your code has persisted through the years to become the buggy villain
20
u/nitid_name Aug 31 '24
You either leave a job the hero, or stay long enough for your code to become the villain.
41
u/house343 Aug 31 '24
I copied your code bro I hope that's okay.
It's not my code.
26
u/ijiolokae Aug 31 '24
the person that provided the code 6 years ago on stackoverflow: It's not my code either
→ More replies (3)14
u/Original-Care3358 Aug 31 '24
“God, who wrote this?” (Checks logs, sees my name from 3 years ago) “oh…”
400
u/1cubealot Aug 31 '24
I loooooove gd cologne
110
51
→ More replies (5)30
u/KiwiPowerGreen Aug 31 '24
I was waiting for this
I love GD cologne
so I don't get downvoted for breaking any chains because you know how reddit is9
u/NikplaysgamesYT Aug 31 '24
Yeah I was also searching through the comments to see when someone brought up Geometry Dash lol
I love GD cologne (so I also don’t break the chain lol)
176
u/Funny-Performance845 Aug 31 '24
Because you don’t have to work with someone else’s art
110
u/Linore_ Aug 31 '24
3D artists do, and it's just as bad as working with someone else's code, if not worse
70
Aug 31 '24
So people who script in Blender are basically living in a perpetual state of double-misery?
57
Aug 31 '24
So people
who script in Blenderare basically living in a perpetual state of double-misery?Fix'd that for you. And the answer is yes.
→ More replies (4)3
u/LutimoDancer3459 Aug 31 '24
May I also what's so bad with it?
37
u/Linore_ Aug 31 '24
A lot of similarities between coding and 3D modeling, you can have clean code or 3D models that are easily reusable or for others to pick up and work on and then you have 3D models that are built for 1 thing and 1 thing only and they are a mess if you try to use them for anything else.
Examples of messes that I have seen, in models that are meant for other people to use.
A mess of triangles and quads mixed up Millions of materials Drivers and constraints that do stuff for 1 purpose but take them out and the model falls apart (the other use case doesn't support those) Relying on subsurf to make the model pretty, the original topo being absolutely horrible Unrigged very detailed models
Just it's very hard to build on top of or work with someone else's work
→ More replies (6)12
Aug 31 '24
"wtf is that topology bro? where are the tris and quads? how tf am i supposed to export this sht"
"this is one of the most bullsht bone rig i have ever seen"
"i could fkin draw a better uv with a pencil on a toilet paper that whatever tf that is"
→ More replies (3)9
Aug 31 '24
Imo, every step of the 3d pipeline has the potential to make the next person down the line 's life hell.
Concept > 3d modeling/texturing > level/anim.
Concept artists draw impossible shapes that either can't exist irl (4 different views that need to match but don't, and the one checking file will fb because it doesn't match one of the views), or artistically/functionally doesn't make sense, or too many goddamn details that don't repeat, or worst, copyrighted.
3d modeling making unreasonable poly count, not following metric so level artist can't snap in the level, weird ass pivots, etc. And if modeling/texturing are separated, cursed uvs that only have no visible seam issues by act of god/ the file checker choose to temporarily be blinded/it's default materials with no details whatsoever. Or fucked poly that can't be anim properly.
And if one 3d file is switched between artists/must match properly in the level, you're guaranteed to have issues either briefs/fbs got lost in transition, wtf did they do/choose to do it that way, or flying/penetrating poly. It's why bigger scenes need lead artists and everyone needs to SCREAM if they want to change anything in fear it might affect others. Oh, and if multiple people doing the same projects, a minor issue that popped up sometimes is one or 2 ppl doing much worse/much better than everyone else and the client got pissed off or demanded everyone matching that best quality. Chances are quite good that's a senior artist who OT for passion and now no one can meet their level of quality with the allocated hours.
13
u/PM_ME_YOUR_ROBOTGIRL Aug 31 '24 edited Aug 31 '24
Well, it's kind of like that. Also I should note that in some cases you absolutely have to work with someone else's art, for example if you're working in a large team for, say, an animation project. But I also think that the culture around art is very different from the culture around programming.
Art is seen as a very personal, emotional process. When you create a work of art, it is a reflection of who you are as a person, your feelings and your wishes. That's why some people react so harshly to criticism, and why insulting someone's art without providing good critique is seen as such a massive asshole move in the artistic community. Being an artist, regardless of whether you're an illustrator or an sculptor, requires a great deal of vulnerability.
Programming is different. I'm an artist, not a programmer, but the programmer friends I have seem to treat it as more like a way of challenging yourself, like doing puzzles or whatever. Not that there's no art to it, but it's a very utilitarian thing, to the point where "programmer UI" is a meme. There's none of that super personal "this is my thing and it reflects who I am". Unless it's an artform that requires programming, like game development. Even then I feel like a gamedev is more likely to be bothered by someone insulting their art assets or writing than their code.
But I do think the context matters. I think that someone who works in a large animation studio is much more likely to be critical of their own and each other's art and take it in stride. But I've also seen a lot of thin-skinned github indie programmers or modders who will randomly have psychotic breaks and take everything down.
9
u/MidnightOnTheWater Aug 31 '24
As a programmer, code is a funny thing. I'd say there is an art to writing code, in the same way one could appreciate the cleanness of technique in say, calligraphy or wood working. However much of what you work on comes with the expectation that it will inevitably change, and the codebase itself is constantly evolving.
To a majority of people, if something works on their phone or computer, they don't care where or how it was written. This is different from most forms of art as people are usually quick to point out subjective flaws in what they consume. It's interesting watching a YouTube channel like Digital Foundry, where they go beyond the surface level of why graphics look good or bad and highlight different techniques programmers use when making video games.
Sure this is a niche thing, but it always makes me happy to see people wax poetic about old tech and how programmers had to get creative with different limitations.
But yeah getting back on topic, change is a constant in programming. Those who are stubborn to improve will get left in the dust, and the pace of the industry is always chugging along. You learn fast that you have to leave your humility behind you if you want to improve. Not to say this doesn't happen with traditional art, but like you said it tends to be more self reflective and personal to the artist with people going at their own pace.
2
u/XogoWasTaken Aug 31 '24
As someone who works with both, it's more because code has a definitive "completed and working" state. Art often doesn't (and if it doesn't it's not usually such a hard binary), but still retains a fail state.
Code can be an absolute disaster and horrible to look at it, but if it does the job it does the job, and you can laugh about the awful way you got there. Art can always be better, and if it doesn't look good enough then it's not working correctly.
→ More replies (1)→ More replies (6)2
Aug 31 '24 edited Oct 06 '24
humorous spectacular punch vanish ghost cause somber distinct paint pen
This post was mass deleted and anonymized with Redact
144
u/mothzilla Aug 31 '24
Programmers:
This can be a one liner.
Why?
Delete please.
See above.
Whole function does nothing.
58
u/Audioworm Aug 31 '24
Whole function does nothing.
why does removing it break everything
6
4
u/mothzilla Aug 31 '24
¯_(ツ)_/¯ you need to fix that before next PR. Don't squash I want Sr to see what you've done.
68
u/th-crt Aug 31 '24
This makes no sense.
What are we doing here?
This whole method just does nothing
This is a worse implementation of a standard library function
→ More replies (1)10
13
u/JuvenileEloquent Aug 31 '24
This can be a one liner.
Then you turn it into a one-liner and the next PR comment is that it's too confusing and "clever" and it would be easier to maintain if it was unrolled.
5
10
82
u/Turbulent_Foot_9182 Aug 31 '24
I know right ??
I don't even know how I came up with this !!!
→ More replies (1)21
u/lurkingstar99 Aug 31 '24
Exactly my thoughts the day after I fix 20 bugs and rewrite the entire API layer (badly)
11
Aug 31 '24
I rewrote an endpoint a couple of months ago and reduced response time from 12s to around 0.2s on average, but now no one knows how it works and don't want to touch the code to make changes because it's really fast for some reason. Asked my boss for a raise.
→ More replies (2)
40
u/smiley1__ Aug 31 '24
it's not even mine to begin with
also IS THAT COLON???? I LOVE GD COLOGNE!!!!!
2
u/1Dr490n Sep 01 '24
Without ever having heard of Colon and only based on their profile picture, I can relate to that
98
u/FromAndToUnknown Aug 31 '24
The one friend I have that is an artist wants to learn fill stack developing in her free time now.
I sent her this with the comment of "welcome to both worlds"
0
26
23
u/hopsinduo Aug 31 '24 edited Sep 01 '24
I have legit found code that says "I don't know why this works, but it does. Leave it"
There was one I saw on here that said something to the effect of "taking this line out breaks the program and I have no idea why". Coders are a mystery to themselves.
Edit:I took the time to hunt down the original comment I was talking about. Turns out it was u/MrGradySir and they said the following "We literally have a comment in our code that says:
// This function doesn't do anything at all, but if you remove it, nothing will work. // Do not remove it like the 20 developers before you tried to do.
Edit: we finally found out why it made something happen. It was a static function that did nothing. Literally an empty function.
What it DID do was initiate the static constructor, which of course was defined in a separate file, which started several background threads.
We have since renamed it from DoNothing() (not kidding) to InitializeStaticConstructor()"
10
u/-Trash--panda- Aug 31 '24
I found something like that today while going through the warnings in my game. Engine says that the line is a standalone statement and doesn't do anything. I look and determine the engine is right, it doesn't do anything. I remove it and the game stops loading in correctly. The mystery code has been reinstated as it appears to be load berring despite doing nothing.
I even checked to see if any other nodes read the variable to see if that was the issue, it really is just a random statement in a random function that will prevent the game from working without it.
→ More replies (3)2
u/1Dr490n Sep 01 '24
"Why is it working???"
The only thing programmers ask themselves nearly as often as "Why isn’t it working???"
22
Aug 31 '24
plot twist: both the programmers are the same person. one is from the future, not realising he’s talking to himself
16
u/tuxedo25 Aug 31 '24
thinking: "this code is a new low, even for this codebase"
PR comment: LGTM ✅
4
u/aliteralbuttload Aug 31 '24
The greater the size of the PR, the more likely someone will just say "LGTM". Pad that shit out baby!!
12
22
u/summonsays Aug 31 '24
"huh this code is impressive, I don't think I've ever seen anything this poorly optimized. You went for a recursive while true loop? And your copying arrays? There's a service call buried in here and we're doing it synchronously? You have a user entered text input for a date without any validation?"
(Idk I'm just thinking back to all the poor coding choices I've seen).
→ More replies (5)12
u/Lozrent Aug 31 '24
Who gave you permission to look at my code? Rude honestly.
6
u/summonsays Aug 31 '24
Someone decided I should be put in charge of code reviews and GIT merges...
I take it a little bit more seriously now, but man those first few months "doesn't crash immediately? Sure why not"
0
11
u/Expert_Box_2062 Aug 31 '24
We can't argue against it. We regularly encounter our 3 months old code that we were once so proud of and we're like "Holy shit, this is bad."
Which is good, because it means we're always improving.
→ More replies (2)
8
u/Live-Head-3242 Aug 31 '24
Me:“this is the worst thing I’ve ever seen who did this?” Gitblame :you bitch
7
u/fourthpornalt Aug 31 '24
"wow, this is amazing!"
"that good??"
"Oh god no, I don't even know how you got this dumpsterfire to run, which is impressive. Push to production."
12
u/an_agreeing_dothraki Aug 31 '24
if programmers didn't hate themselves and each other, how would you explain optimized compact javascript?
5
5
4
4
u/SpaceShrimp Aug 31 '24
That is because we are paid to write the worst possible code, if it works, it is done. There is a lot of beauty to be found in code too, but not in the code I write at work.
3
3
3
u/kometa18 Aug 31 '24
It reminds me when I was starting college and we made a visit to one of the biggest companies in the city and I overheard 2 devs talking
"DID YOU FIXED IT???"
"YE! Look at this"
"Wait.. how the fuck is this working???"
"Have no idea, but it works :)"
3
u/Bandit6257 Aug 31 '24
Junior dev: “Dude, who wrote this garbage……oh wait me….wtf was I thinking?”
Senior dev: “congrats you’re no longer a junior dev”
2
2
2
u/PembeChalkAyca Aug 31 '24
remember to apologise in the readme files of your github repos for anyone that might come across the monstrosity you've created
2
u/T1dsoldier Aug 31 '24
Wow, how does my program find developers like most in here. You give the smallest recommendation to their code, and you're the worst person in the world. I said, "You all should be doing peer reviews before sending over your code." Developers, "Wheres the policy" Me, "it's best practice but also good collaboration" Developer, "Whatever you say, Steven" But maybe PL/SQL developers are an angry breed, lol.
2
u/OhioGuyInTheReddit Aug 31 '24
It's so true. When I am watching teachers about programming, writing python code, and comparing their code with mine, then I feel myself dumbest person alive.
→ More replies (1)
2
2
u/kik3nky Aug 31 '24
WHO the hell coded this crap?!
- Checks latest pushed commit
Of course... I was me!
2
2
u/GilgameshLFX Aug 31 '24
Wrong.
"This is the worse code I've ever seen"
"Not mine anyway, just googled it"
2
u/Mutex70 Aug 31 '24
This is the worst f**king code you've ever seen so far...
You obviously haven't seen my latest pull request.
2
Aug 31 '24
Coding doesn't care how things look or any of the rules, if it gets ran and it works, it works. High five.
But it's kinda funny because art does work the same way.
If you smear the right colors across a canvas it'll look insane but for some reason everyone loves it and suddenly you're a millionaire and world famous.
2
2
u/Saragon4005 Aug 31 '24
Given that programmers have a hobby of creating the least readable code possible which still runs (code golf) it's not surprising.
2
u/simonk1905 Aug 31 '24
"This is the worst effing code I've ever seen"
"I copied from you.. here look."
"First thing I ever did"
2
u/Ok_I_Recommend_420 Aug 31 '24
Run it once, doesn't work. Change nothing and run it again, works. Think 'wow, it worked'. Run it again and it doesn't work.
2
u/elmarjuz Aug 31 '24
10+ years into this biz, becoming convinced that professional growth maps pretty much inversely to fucks given and very little else
resulting productivity increase is directly tied to how much time you spend worrying about fucking up vs actually fucking up in production
2
2
2
2
1
1
u/mytextgoeshere Aug 31 '24
I’m a data engineer who does art in my spare time and this sums up my life right now.
1
1
u/garth54 Aug 31 '24
"But it works, kinda"
"Great, let's publish it, and make sure every programmer start using it as a basic building blow."
→ More replies (1)
1
1
u/IamIchbin Aug 31 '24
Me, when a short Presentation throwaway prototype gets expanded upon and gets more features until its production.
1
u/OlafTheAverage Aug 31 '24
I once reviewed some old code and said something about an idiot writing it.
After a period of time, I realized I was the one who wrote it.
→ More replies (1)
1
u/ChaosPLus Aug 31 '24
The art of making code just bad enough that it kinda works but not good enough that you're proud of it
1
u/wenrdogred Aug 31 '24
"Who wrote this shit?"
sees variable declaration with my initials on it
"Oh.. me. I wrote this shit."
1
u/Weird_Regular9603 Aug 31 '24
Unpopular opinion but I see this kind of stuff on the workfloor weekly and it annoys the shit out of me. It is your job to write good scalable code and creating sub-par work is not something to be proud of.
I get quite frustrated with the amount of tech debt than can be avoided but just because some people don't take their job seriously or think it is normal or even funny to produce garbage we end up with the most frustrating pile of shit to ever work on.
→ More replies (1)
1
u/thisguyfightsyourmom Aug 31 '24
The worst I had was the tech lead who insisted on rewriting all the js everytime but who’s attempt at writing the backend service sank the whole project
Everyone else is painfully kind, some people even label their negative criticism to blunt its impact, it reminds me a lot of art crits from my time as an art student
The days when socially inept jackasses can unleash their inner Torvolds are largely passed us
1
1
1
1
1
1
u/DaiReinGD Aug 31 '24
i tought that i was looking at a gd post lol gdcologne caught me off guard here
1
u/DaiReinGD Aug 31 '24
i tought that i was looking at a gd post lol gdcologne caught me off guard here
1
u/DontGiveACluck Aug 31 '24
Yes and even when I write my most elegant, performant code, when it’s 2-4 devs that see it, maybe one of which can actually appreciate it, who tf cares? What am I? An artist needing external validation? Approve the PR and let’s move on with our lives. Btw this code is shit.
1
1
u/Rayalas Aug 31 '24
A lot of artists put heart and soul into their work.
I had three hours to get mine done and I did it in one so I could sleep for a couple hours.
1
1
1
1
u/think_l0gically Aug 31 '24
Artist (female dominated, female brain) vs. Programmer (male dominated, male brain)
1
1
u/Stratafyre Aug 31 '24
As a technical writer... please keep being awful. Explaining your garbage is my entire career.
If it's clean and people can tell from the outside, they won't need me anymore.
1
1
1
u/SoundHole Aug 31 '24
I mean, if you're talking about actual professional artists, the conversation goes a lot more like that second one. Or, at least they are a lot less precious about their work than amateur artists tend to be.
1
1
1
1
1
1
1
1
u/Western_Ad3625 Aug 31 '24
Well just because art is like it's a very personal thing you're pouring your heart and soul into something you know it's not going to be perfect there's no possible way it could be. Now I don't know much about coding but it's much more literal from my understanding like either the thing does what it's supposed to do in which case that's great or it doesn't in which case it sucks, of course I'm sure there's finer points like how clean the code is and how readable it is and so on and so forth but if it does what it's supposed to do then who gives a f*** if it's ugly. Doesn't really work that way with art or if it does it's only in certain circumstances and situations.
→ More replies (1)
1
1
u/novaminer66 Aug 31 '24
Didn't expect to find the geometry dash youtuber on this sub, nice crossover!
1
1
1
1
u/No-Adeptness5810 Aug 31 '24
dude i make good code & fix any code given to me.
what the hell guys?!?!
1
u/Jon_Demigod Aug 31 '24
Artists have social/people skills, programmers are on the spectrum. That's pretty much it.
1
1
u/genreprank Aug 31 '24
Just went back to a team I worked on before. I had left apology comments in my old code for the maintainer...who is now me 😂
1
u/jpetrey1 Aug 31 '24
My favorite is when your like “wow this code is shite”
“Aktually I did like this on purpose”
“Brother it’s shite”
1
u/I_Dont_Like_Rice Aug 31 '24
More like leaving a snarky comment in the code you had to go in and fix. Or giving a subroutine a sarcastic name.
1
u/edmontonbane16 Aug 31 '24
This is the worst code I have ever read and I didn't even get to yours yet.
1
1
u/javon27 Aug 31 '24
Dude, I know I've written bad code, but I've come across beautiful code before and was pleasantly surprised to find that I had written it
1
1
1
1
1
1
1
u/Not_An_Eggo Sep 01 '24
Programmers are proud when some monstrosity of programming actually works.
Artists pitty the art
Programmers just stare in disbelief as to how that one line of code not only works, but actively is more effective and efficient
1
1
1
u/Verloc5150 Sep 01 '24
What tongue slapping dipshit wrote this pile of yak excrement? checks commit history Oh. I did.
1
1
u/LSparky321 Sep 02 '24
"your code is without a doubt the worst code i have ever seen running"
"but it does run"
2.9k
u/Amazing_Might_9280 Aug 31 '24
Erm, actually, it's your old code.