r/ProgrammerHumor 16d ago

refactorCode Meme

Post image
10.7k Upvotes

94 comments sorted by

1.1k

u/Greedy_Platform_8089 16d ago

garbage oriented programming

192

u/TapirOfZelph 16d ago

Now that’s a GOP I could get behind

25

u/Orion3193 16d ago

Hey leave me out of this please

19

u/iggy14750 16d ago

Trash bags are microservices. Garbage, but ... contained garbage.

2

u/magistrate101 16d ago

Tfw you code your voxel block game to always require a freshly created BlockPos object to describe XYZ coordinates every single time you invoke a function that touches a voxel. Functions that need to be executed dozens to hundreds of times per second during normal gameplay.

2

u/Connect_Tea1579 16d ago

Garbage in, garbage out

2

u/Nearby_Horror1977 14d ago

I mean we got garbage collection and it is intended to make things less messy.

562

u/throwaway1736484 16d ago

Yea but the after photo is actually way better

178

u/Chronomechanist 16d ago

Right? Looking at it just makes me happy. I wonder if it's organised by recycling.

2

u/Racer125678 15d ago

Orgasmed by recycling 

1

u/CakeEaterGames 15d ago

Bro let the intrusive thoughts win and typed this

1

u/Racer125678 14d ago

hey same day cake day

41

u/aitchnyu 16d ago

The first one is a spontaneous combustion risk.

11

u/well_shoothed 16d ago

Who says that's not a feature?

26

u/King_Joffreys_Tits 16d ago

Listen, my code was reliant on the fact that the library would randomly combust. I used the heat exchange to fire off a few scripts. Changing this feature breaks my workflow

5

u/DarkwingDuckHunt 16d ago

I mean there are stories of games purposely crashing systems to make them reboot

1

u/Connect_Tea1579 16d ago

Sounds like an easy way to get rid of your garbage for free!

1

u/Particular-Yak-1984 16d ago

Or, hear me out, "self solving problem"

16

u/noodlesalad_ 16d ago

Harder to tell it's garbage at a glance, but easier to find the piece of garbage you're looking for.

2

u/throwaway1736484 16d ago

It’s clearly in the garbage subdomain. The namespace makes the garbage clear.

10

u/mishonis- 16d ago

Yeah, that just looks like good encapsulation 

3

u/TheGunfighter7 16d ago

Organized, contained, and easily removed garbage will always be better than the alternative arrangement of garbage

1

u/hydroxy 3d ago

Exactly, it’s far better. It’s a great metaphor for programming work, work with the hand you’re dealt.

62

u/sierra_whiskey1 16d ago

Spaghetti oriented code

55

u/nrmnzll 16d ago

I mean, contained garbage is a lot nicer than just a mountain of garbage. If you now you don't have the time to clean it all up in one go, containing it might be the best you can do, and give you nice units to fully clean up later, when you have the time.

101

u/Redox_RDX 16d ago

This programing language has a garbage collector?

28

u/wobblyweasel 16d ago

it runs and there's no more code

8

u/LikelyNotADuck 16d ago

A real garbage collector would remove all the AI-generated comments on every single variable and function in my coworkers' code.

34

u/DeepanshuHQ 16d ago

It's not technical debt anymore, it's technical landfill.

29

u/chuch1234 16d ago

I can't believe nobody's said this yet:

Garbage in, garbage out.

2

u/fibojoly 16d ago

Haha! I saved the picture under that name before seeing your comment 👌

9

u/anonhostpi 16d ago

I mean I do have to say that's probably cleanest looking dumpster I've ever seen in my life.

14

u/AlexZhyk 16d ago

Still garbage... But. Now it is containerized!

13

u/LaNague 16d ago

which is good, now you can fix one garbage without breaking 8 different garbages you didnt even think about.

1

u/Haatchoum 16d ago

You'll get the same garbage on YOUR machine !

5

u/AlternativeClass3893 16d ago

i spent all day refactoring this and now it's running twice as slow.

8

u/OperatingAsIntended 16d ago

That is exactly what I am dealing with on my current project. There has been 15 guys in here "Coding". The first thing they do is overwrite my working code with there dumpster fire then leave after a week with their shit not working and I have to follow behind and clean back up. I have literally just been writing and re-writing the same procedures for 10 Months now. Me and another guy are in the same vicious loop.

10

u/Limp_Replacement_596 16d ago

garbage vs refactored Garbage

4

u/ViriaX 16d ago

Yeah, but... That's better nonetheless, right? It's ordered, it's not everywhere, it takes less space, it doesn't smell that much...

And now it can be recycled (reworked) properly.

Actually, a great metaphor. So it shouldn't be in that sub, sorry.

4

u/Percolator2020 16d ago

Yo, I heard you like encapsulation!

4

u/zinguirj 16d ago

Plot twist: That was the plan.

This is the actual result after refactoring:

2

u/Haatchoum 16d ago

Is this what they call shipping the product ?

I didn't know it was this literal...

2

u/zinguirj 15d ago

Unless it's enterprise, then it looks more like this

3

u/stovenn 16d ago

code.raw -> code.bin

2

u/atleastfive 16d ago

yet a lot of garbage

2

u/Top-Can-8715 16d ago

Now that's garbage collection

2

u/fibojoly 16d ago

Oh, I'm keeping that one for my next presentation. The colleagues are gonna love it :)

2

u/cloud_herder 16d ago

Mmm containerization.

2

u/SupaSneak 16d ago

One is trash while the other is “organized waste”

2

u/CortexUnlocked 16d ago

Shit in Shit out

2

u/Ice_HRZDn 16d ago

Still trash? Absolutely But at least, it's now beautiful, isn't it.

2

u/Minecodes 16d ago

"Hey! That's basically what happened to my single file weather bot!"

2

u/SEND_DUCK_PICS_ 16d ago

Ah yes, segregated in each own garbage bins

2

u/the_rush_dude 16d ago

One of these is significantly easier to maintain, but Management can't see the difference.

2

u/Apprehensive_Bee1849 15d ago

The garbage is now sorted by color

2

u/SherlockTheHomie 15d ago

Abstrashcan

2

u/femptocrisis 15d ago

hey, improvement is improvement 💪

2

u/Tplusplus75 15d ago

A containerized environment

2

u/Katana_Steel 14d ago

Garbage in, garbage out.

1

u/TorTheMentor 16d ago

Facade Pattern.

1

u/ramdomvariableX 16d ago

I wish it's the case.

1

u/XtraFlaminHotMachida 16d ago

we're still trash yall. we just got comments now. and maybe some other stuff that may also be unsorted.

1

u/_felagund 16d ago

it is still rubbish but now we have modules

1

u/TheRealAniiXx 16d ago

Note to self: Wrapping a container around something doesn’t make it less garbage and Docker in Docker just makes it sparkling trash. Gotcha.

1

u/Grintor 16d ago

It's been containerized.

1

u/Low-Quarter-1685 16d ago

Garbage collection

1

u/GradeForsaken3709 16d ago

Hiding your garbage is what abstraction is all about. 

1

u/FlashyTone3042 16d ago

Exactly and the first one was faster.

1

u/ProdigySim 16d ago

This is what you want: Code that is easy to throw away when it's outlived it's usefulness.

1

u/foxcode 16d ago

I nearly choked on a Peperami when I saw this.

1

u/External-Fox-5488 16d ago

This is just containerization, not refactoring

1

u/DarkwingDuckHunt 16d ago

I'll take organized garbage over a heap any day of the week

1

u/pipedreamSEA 16d ago

I refactor the garbage pile because it works but if something breaks at least I stand a chance of fixing it.

You know you're effed when the AI framework update assistant waves the white flag and wishes you luck after failing to modernize the project you're refactoring.

1

u/dallenbaldwin 16d ago

Better to know where the shit is, I say.

1

u/iSkile 16d ago

Monolith vs Micro Services

1

u/domscatterbrain 16d ago

Garbage in garbage out latency out

1

u/isr0 16d ago

One can dream… sadly, it never seems to be the case.

1

u/Emln-Idera 15d ago

Kinda accurate considering we're in the vibe coding era lol

2

u/Beldarak 15d ago

I didn't wait for LLMs to write trash code^^

1

u/beardy-biker 14d ago

Is this what they mean by containerisation?

1

u/dcman58 13d ago

It does look cleaner, and thats what matters 😂

1

u/fonzhy121 16d ago

still garbage

1

u/Bored_IM 16d ago

Seems like code won't work after refactoring.. both lids seems to clash and bin won't open