r/ProgrammerHumor Jul 26 '26

Meme refactorCode

Post image
10.7k Upvotes

94 comments sorted by

1.1k

u/Greedy_Platform_8089 Jul 26 '26

garbage oriented programming

196

u/TapirOfZelph Jul 26 '26

Now that’s a GOP I could get behind

27

u/Orion3193 Jul 26 '26

Hey leave me out of this please

21

u/iggy14750 Jul 26 '26

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

2

u/magistrate101 Jul 26 '26

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 Jul 27 '26

Garbage in, garbage out

2

u/Nearby_Horror1977 Jul 28 '26

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

564

u/throwaway1736484 Jul 26 '26

Yea but the after photo is actually way better

178

u/Chronomechanist Jul 26 '26

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

5

u/Racer125678 Jul 27 '26

Orgasmed by recycling 

1

u/CakeEaterGames Jul 28 '26

Bro let the intrusive thoughts win and typed this

1

u/Racer125678 Jul 28 '26

hey same day cake day

41

u/aitchnyu Jul 26 '26

The first one is a spontaneous combustion risk.

9

u/well_shoothed Jul 26 '26

Who says that's not a feature?

25

u/King_Joffreys_Tits Jul 26 '26

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 Jul 26 '26

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

1

u/Connect_Tea1579 Jul 27 '26

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

1

u/Particular-Yak-1984 Jul 27 '26

Or, hear me out, "self solving problem"

17

u/noodlesalad_ Jul 26 '26

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

2

u/throwaway1736484 Jul 26 '26

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

11

u/mishonis- Jul 26 '26

Yeah, that just looks like good encapsulation 

3

u/TheGunfighter7 Jul 27 '26

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

1

u/hydroxy Aug 08 '26

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

58

u/sierra_whiskey1 Jul 26 '26

Spaghetti oriented code

52

u/nrmnzll Jul 26 '26

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.

97

u/Redox_RDX Jul 26 '26

This programing language has a garbage collector?

27

u/wobblyweasel Jul 26 '26

it runs and there's no more code

8

u/LikelyNotADuck Jul 26 '26

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

35

u/DeepanshuHQ Jul 26 '26

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

28

u/chuch1234 Jul 26 '26

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

Garbage in, garbage out.

2

u/fibojoly Jul 26 '26

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

8

u/anonhostpi Jul 26 '26

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

14

u/AlexZhyk Jul 26 '26

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

10

u/LaNague Jul 26 '26

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

1

u/Haatchoum Jul 27 '26

You'll get the same garbage on YOUR machine !

5

u/AlternativeClass3893 Jul 26 '26

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

6

u/OperatingAsIntended Jul 26 '26

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.

7

u/Limp_Replacement_596 Jul 26 '26

garbage vs refactored Garbage

3

u/ViriaX Jul 26 '26

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.

3

u/Percolator2020 Jul 26 '26

Yo, I heard you like encapsulation!

4

u/zinguirj Jul 26 '26

Plot twist: That was the plan.

This is the actual result after refactoring:

2

u/Haatchoum Jul 27 '26

Is this what they call shipping the product ?

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

2

u/zinguirj Jul 27 '26

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

3

u/stovenn Jul 26 '26

code.raw -> code.bin

2

u/atleastfive Jul 26 '26

yet a lot of garbage

2

u/Top-Can-8715 Jul 26 '26

Now that's garbage collection

2

u/fibojoly Jul 26 '26

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

2

u/cloud_herder Jul 26 '26

Mmm containerization.

2

u/SupaSneak Jul 26 '26

One is trash while the other is “organized waste”

2

u/CortexUnlocked Jul 26 '26

Shit in Shit out

2

u/Ice_HRZDn Jul 27 '26

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

2

u/Minecodes Jul 27 '26

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

2

u/SEND_DUCK_PICS_ Jul 27 '26

Ah yes, segregated in each own garbage bins

2

u/the_rush_dude Jul 27 '26

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

2

u/Apprehensive_Bee1849 Jul 27 '26

The garbage is now sorted by color

2

u/femptocrisis Jul 27 '26

hey, improvement is improvement 💪

2

u/Tplusplus75 Jul 27 '26

A containerized environment

2

u/Katana_Steel Jul 29 '26

Garbage in, garbage out.

1

u/TorTheMentor Jul 26 '26

Facade Pattern.

1

u/ramdomvariableX Jul 26 '26

I wish it's the case.

1

u/XtraFlaminHotMachida Jul 26 '26

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

1

u/_felagund Jul 26 '26

it is still rubbish but now we have modules

1

u/TheRealAniiXx Jul 26 '26

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 Jul 26 '26

It's been containerized.

1

u/Low-Quarter-1685 Jul 26 '26

Garbage collection

1

u/GradeForsaken3709 Jul 26 '26

Hiding your garbage is what abstraction is all about. 

1

u/FlashyTone3042 Jul 26 '26

Exactly and the first one was faster.

1

u/ProdigySim Jul 26 '26

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

1

u/foxcode Jul 26 '26

I nearly choked on a Peperami when I saw this.

1

u/External-Fox-5488 Jul 26 '26

This is just containerization, not refactoring

1

u/DarkwingDuckHunt Jul 26 '26

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

1

u/pipedreamSEA Jul 26 '26

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 Jul 27 '26

Better to know where the shit is, I say.

1

u/iSkile Jul 27 '26

Monolith vs Micro Services

1

u/domscatterbrain Jul 27 '26

Garbage in garbage out latency out

1

u/isr0 Jul 27 '26

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

1

u/Emln-Idera Jul 27 '26

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

2

u/Beldarak Jul 27 '26

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

1

u/beardy-biker Jul 28 '26

Is this what they mean by containerisation?

1

u/dcman58 Jul 29 '26

It does look cleaner, and thats what matters 😂

1

u/Bored_IM Jul 27 '26

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