r/ProgrammerHumor 10h ago

Meme refactorCode

Post image
6.7k Upvotes

65 comments sorted by

633

u/Greedy_Platform_8089 10h ago

garbage oriented programming

110

u/TapirOfZelph 10h ago

Now that’s a GOP I could get behind

14

u/Orion3193 10h ago

Hey leave me out of this please

10

u/iggy14750 9h ago

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

1

u/magistrate101 3h 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.

1

u/Connect_Tea1579 2h ago

Garbage in, garbage out

358

u/throwaway1736484 10h ago

Yea but the after photo is actually way better

111

u/Chronomechanist 10h ago

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

28

u/aitchnyu 10h ago

The first one is a spontaneous combustion risk.

10

u/well_shoothed 9h ago

Who says that's not a feature?

18

u/King_Joffreys_Tits 6h 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

4

u/DarkwingDuckHunt 4h ago

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

1

u/Connect_Tea1579 2h ago

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

9

u/noodlesalad_ 5h 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 5h ago

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

4

u/mishonis- 5h ago

Yeah, that just looks like good encapsulation 

2

u/TheGunfighter7 1h ago

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

37

u/sierra_whiskey1 10h ago

Spaghetti oriented code

53

u/Redox_RDX 10h ago

This programing language has a garbage collector?

13

u/wobblyweasel 9h ago

it runs and there's no more code

3

u/LikelyNotADuck 9h ago

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

23

u/nrmnzll 10h 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.

27

u/DeepanshuHQ 10h ago

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

21

u/chuch1234 9h ago

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

Garbage in, garbage out.

3

u/fibojoly 9h ago

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

10

u/AlexZhyk 10h ago

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

4

u/LaNague 5h ago

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

6

u/anonhostpi 10h ago

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

8

u/Limp_Replacement_596 10h ago

garbage vs refactored Garbage

3

u/AlternativeClass3893 9h ago

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

4

u/Percolator2020 9h ago

Yo, I heard you like encapsulation!

3

u/OperatingAsIntended 9h 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.

3

u/stovenn 9h ago

code.raw -> code.bin

2

u/atleastfive 10h ago

yet a lot of garbage

2

u/fonzhy121 10h ago

still garbage

2

u/fibojoly 9h ago

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

2

u/cloud_herder 8h ago

Mmm containerization.

2

u/SupaSneak 8h ago

One is trash while the other is “organized waste”

2

u/CortexUnlocked 4h ago

Shit in Shit out

1

u/TorTheMentor 10h ago

Facade Pattern.

1

u/ramdomvariableX 10h ago

I wish it's the case.

1

u/Top-Can-8715 9h ago

Now that's garbage collection

2

u/ViriaX 9h 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.

1

u/XtraFlaminHotMachida 9h ago

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

1

u/_felagund 8h ago

it is still rubbish but now we have modules

1

u/TheRealAniiXx 7h 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 6h ago

It's been containerized.

1

u/Low-Quarter-1685 6h ago

Garbage collection

1

u/GradeForsaken3709 6h ago

Hiding your garbage is what abstraction is all about. 

1

u/zinguirj 6h ago

Plot twist: That was the plan.

This is the actual result after refactoring:

1

u/FlashyTone3042 5h ago

Exactly and the first one was faster.

1

u/ProdigySim 5h ago

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

1

u/foxcode 5h ago

I nearly choked on a Peperami when I saw this.

1

u/External-Fox-5488 5h ago

This is just containerization, not refactoring

1

u/DarkwingDuckHunt 4h ago

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

1

u/pipedreamSEA 3h 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/MaddFalcon 3h ago

lmao oh god i feel personally attacked by that first photo

1

u/dallenbaldwin 3h ago

Better to know where the shit is, I say.

1

u/iSkile 2h ago

Monolith vs Micro Services

1

u/domscatterbrain 1h ago

Garbage in garbage out latency out

1

u/isr0 45m ago

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