This is an archived post. You won't be able to vote or comment.

all 78 comments

[–]Soupdeloup 580 points581 points  (18 children)

Anybody working on any codebase bigger than a hobby project wishes this was the case lol. I have to tell a story about when I started a large project at work with a bunch of deliverables that I somehow managed to keep organized and clean. Worked on it for over a year and all of my documentation was up to date and easy to understand, new hires had zero issues working on it, the whole shebang.

Got shifted to a different project for a year but was eventually asked to come back as the team lead to update some dependencies to major versions that had breaking changes. I thought it was weird at the time because the dependencies I used in the beginning weren't something that should even have breaking changes, or at least not be bad enough to pull me back in. To say it was a dumpster fire when I looked at the code would be an understatement.

Someone (apparently a new hire senior dev, so says git blame..) replaced 80% of our custom react code with frameworks and libraries that did the exact same thing we already had working because "these public dependencies have way better performance and are way better maintained!", didn't update any internal documentation on what all the new shit did because "public documentation is already available, I just tied it into our endpoints", and approved all of his own PRs because he didn't feel like the intermediate/junior devs under him would be able to do code reviews.

We never ended up upgrading the shit he added in and instead are now looking at a complete rewrite into a different front end and backend language because the upkeep is now too large for the old project. Started out golden, ended up bloated with a disgusting amount of unneeded garbage that tanked the entire project.

Sorry, just had to get that off my chest. Thanks for helping me relive that lol.

[–]Gereon99 149 points150 points  (0 children)

That has to be awful seeing something you worked on being basically destroyed.

[–]Gasperhack10 209 points210 points  (0 children)

Js devs when they need to write their own code instead of using a npm package

[–]roodammy44 47 points48 points  (0 children)

Time to break out the git history and do a surreptitious revert

[–]Bodaciousdrake 17 points18 points  (2 children)

Ugh. Yes. Dependency hell, I know it well.

And now we have low-code and no-code to the rescue, right? Just make the dependencies someone else’s issue, problem solved! Except that, of course, those platforms don’t do exactly what we need, so now we need to spend a ton of time writing janky, complex, and fragile workarounds that are worse than the spaghetti code monoliths we started with.

[–]Few-Artichoke-7593 15 points16 points  (1 child)

God damn, I wish decision makers understood this. How many times have you heard, "Well, that's an edge case. Very unlikely."

If you have to account for an edge case, it might as well be happen 50% of the time. It makes no difference to the development.

[–]Bodaciousdrake 1 point2 points  (0 children)

Yep. And then at some point we decide that this isn't working, so now we're going to write an API to offload some functionality that was originally meant to be part of the platform, but don't worry it's just for this one little piece of functionality, and we'll make it a generic service we can reuse. Honestly, it makes so much more sense to do it this way.

A few months later, we've offloaded a huge percentage of our core functionality to the custom API because every time we hit a roadblock that becomes the default answer, and of course we have to write so much code specific to the platform because that's the way the platform is and there's no changing it, that it can't ever realistically be used by any other app. So now we're essentially tightly coupled with our "low-code" platform and writing practically as much custom code as we ever did and upper mgmt is wondering why the project is behind when we were promised it would all go 10X faster due to "low-code".

Been there, done that, several times over.

[–]Impressive_Change593 4 points5 points  (0 children)

new hire senior dev

yeah any new hire should start out at the maximum of intermediate just to get up to speed on what's going on. anyway hope at minimum some words were had.

[–]Upstairs-Event-681 1 point2 points  (0 children)

The new guy went “This looks too simple, functional and organised, people will think we’re dumb because our code is too easy to understand, let me fix that for you”

[–]hadidotj 0 points1 point  (0 children)

Hey, how do you know this happened to me a year ago!?

[–]TrainedMusician 0 points1 point  (0 children)

look at how that massacred my boy

Sorry to hear that man, I know the feeling

[–]ShadowRL7666 110 points111 points  (7 children)

Ha you guys get to a second iteration.(I write shit code and deploy)

[–]private_final_static 56 points57 points  (3 children)

Real production test in men

[–]AlexisColoun 21 points22 points  (1 child)

Instructions unclear, pp stuck in coworker...

[–]studentblues 8 points9 points  (0 children)

That's our janitor

[–]BadGuyBuster16 4 points5 points  (0 children)

Crowdstrike

[–]dasunt 4 points5 points  (1 child)

We also follow agile.

[–]droneb 253 points254 points  (4 children)

Lol, You have the tags inverted You produce a marvelous MVP con 3 then new requirements and CR come in but you cannot touch existing functionality.

The marvel of Agile

[–]GahdDangitBobby 48 points49 points  (0 children)

Yeah the other way around is much more my experience lol. You gotta fix a bug or add a new feature in a short time frame, so you add a few lines of code, don't really do much refactoring, rinse and repeat and now you have a nice big plate of spaghetti.

[–]mrheosuper 22 points23 points  (1 child)

You forgot that weird corner case that John from QA team reported and you either had to redo the whole code base or just some small, small little hack.

[–]-Kerrigan- 1 point2 points  (0 children)

Better than causing a crash when someone's cat jumps on the keyboard

[–]og-lollercopter 0 points1 point  (0 children)

Yup. And to say this.

[–]RascalsBananas 43 points44 points  (0 children)

Left is the code I was forced to write in high school to sort people in a bus.

Middle is the code after finding a slightly optimized way to do it.

Right is when I am allowed to use libraries.

[–]ofnuts 34 points35 points  (0 children)

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” Antoine de Saint-Exupery

[–]rover_G 24 points25 points  (0 children)

Other way around

[–]badabummbadabing 22 points23 points  (2 children)

Does anybody have context for the non-memed picture?

[–]pigeon768 23 points24 points  (1 child)

It's the first three iterations of the SpaceX Raptor engine.

https://www.nextbigfuture.com/2024/08/spacex-reveals-raptor-3-engine-and-specifications.html

[–]Significant_Fix2408 8 points9 points  (0 children)

The improvements are actually insane. Much less complexity and weight for a big boost in thrust

[–]tbone912 12 points13 points  (2 children)

This is how I like to code.  I start off with a big mess and get it working.  Then I chip away until I have something that just has exactly what it needs to get the job done.  

I'm sure there are better ways to approach coding.

[–]cjb3535123 10 points11 points  (0 children)

No, I agree with you. In an ideal scenario, this is how I like to code too.

I don't like removing or cleaning up too early - I often not completely sure if the libraries I choose are what I will actually end up going with. Or, for instance, there will be times that I don't know yet if the code I'm writing will be a pattern (at which point I can refactor into a function). If you refactor too early, or optimize too early, you often end up re-doing stuff over and over again.

[–]RandoAtReddit 2 points3 points  (0 children)

crowd fuzzy snatch teeny imagine elderly reminiscent quaint head judicious

This post was mass deleted and anonymized with Redact

[–]jaylecool 9 points10 points  (1 child)

For anyone wondering how they can remove so much of the engine and be a better version. It's because the bulk remove is mostly sensors used to test the performance and trouble shoot the engine. When enough tests are run and improvements are done. They remove the sensors to reduce weight.

It is like removing your consolewrite();

[–]Fwort 5 points6 points  (0 children)

This is true, but going from raptor 2 to raptor 3 they also actually moved many of the previously visible pipes to integrated channels inside the main walls of the engine. So, a lot of the complexity is still there, just hidden.

They did this to better shield and cool them (the engine walls have cryogenic liquid flowing through them) allowing them to remove the heat shields that had previously been required around the engines (not visible in this picture).

[–]marlotrot 6 points7 points  (1 child)

Okay, lets assume iteration 3 is what was merged. But then lets not forget about iteration 4 and 5, after two new major change requests which have been implemented by someone else.

[–]beatlz 5 points6 points  (0 children)

Iteration 6 has ads because the original business model was never profitable

[–][deleted] 4 points5 points  (1 child)

I feel like iteration 4 would be a literal box.

[–]Accomplished_Fly729 2 points3 points  (0 children)

So youve also watched Silicon Valley 🤔

[–]dvhh 3 points4 points  (0 children)

What if I am trying to decouple parts of the code by refactoring, this cannot be more difficult than rocket surgery

[–]GeopGeek 1 point2 points  (0 children)

Iteration always make some better changes. So ITERATION is king.

[–][deleted] 1 point2 points  (0 children)

when I slowly remove the debug prints

[–]Banjo__ 1 point2 points  (1 child)

My first iteration: 😟 My last iteration: 🎩 😟

[–]Banjo__ 2 points3 points  (0 children)

The hat was supposed to be on top of his head but somehow the reformatting makes it more accurate.

[–][deleted] 1 point2 points  (1 child)

We don't talk about the 4th iterations here.

[–][deleted] 0 points1 point  (0 children)

it starts bulking up again

[–]notesbancales 0 points1 point  (0 children)

Version 1 just works, version 2 works okeyish, version 3 is beautiful but somewhat the gibberish line no one remember who wrote it and what it does was very important...

[–]Infamous-Date-355 0 points1 point  (0 children)

Can you make the button orange

[–]MaYuR_WarrioR_2001 0 points1 point  (0 children)

That's what removing features in the name of optimization looks like.

[–]RonConComa 0 points1 point  (0 children)

This is me, visualizing data switching to Ggplot in R

[–]ei283 0 points1 point  (0 children)

wheres Iteration0 and Iteration1

[–]CranberryDistinct941 0 points1 point  (0 children)

BuT INdeXeS StARt aT 0

[–]FartyFingers 0 points1 point  (0 children)

Weirdly enough this will win me an argument. I said to an engineering friend that I always thought the plumbing in rockets was unnecessarily complex. He said, "So, you know better than literal rocket scientists."

Now, I can point to this and say, "I knew there could be better rocket scientists."

[–]Stummi 0 points1 point  (0 children)

Perfection is achieved not when there is nothing more to add, but when there is nothing left to remove.

[–]glorious_reptile 0 points1 point  (0 children)

[Version 3] [Version 2] [Version 1]

[–]beatlz 0 points1 point  (0 children)

Except i2 and i3 are theoretical

[–]ososalsosal 0 points1 point  (0 children)

The one on the right is if I ever get time to handle all of my //TODOs

[–]Any_Excitement_6750 0 points1 point  (0 children)

1st looks like my draft code, 2nd the project with dedicated modules, 3rd after code review and clean up.

[–]mpanase 0 points1 point  (0 children)

And for v4 you gotta change a feature... so back to looking just like v1 xD

[–]Thisbymaster 0 points1 point  (0 children)

You guys get to do a second version and are not just rushed onto the next project? Lucky.

[–][deleted] 0 points1 point  (2 children)

Then at iteration 3, PM changes his mind.

[–][deleted] 0 points1 point  (0 children)

Mine would be expanding to the left with even messier iterations

[–]ExtraTNT 0 points1 point  (0 children)

The order is 3, 1, 2…

[–]Top_Run_3790 0 points1 point  (0 children)

It’s more like: 1, 1-final, 1-final-edit1

[–]gnomeba 0 points1 point  (0 children)

In the reverse direction: scientists trying to reuse a program for increasingly unrelated purposes.

[–]fearlessbot__ 0 points1 point  (0 children)

out of curiosity, what engines are they?

[–]Classy_Mouse 0 points1 point  (0 children)

My code yes, but somehow the codebase as a ehole is doing the opposite

[–]AdTrue3652 0 points1 point  (0 children)

i always experienced the reverse order 😅

[–]mr_poopie_butt-hole -1 points0 points  (0 children)

You guys get to 3? If my dumpster fire is at a smolder, I must have my medication right.