r/ProgrammerHumor • • Nov 03 '26

Meme visualizationOfSpaghettiCode

424 Upvotes

59 comments sorted by

8

u/TheOwlHypothesis Nov 03 '26

Show us some non spaghetti code?

0

u/Dayner_Kurdi Nov 03 '26

I would, but I can’t post an image on reply…

But here is a basic one

https://forums.unrealengine.com/t/reading-blueprints-as-a-coder/6184

9

u/Sentinel-Hyena Nov 03 '26

Which visual language is this? Is it Unreal Engine?

18

u/Dayner_Kurdi Nov 03 '26

Yes, blueprint unreal, this is the what the engine generate in each project

2

u/TheTybera Nov 04 '26

I think its the other way around blueprint gets compiled into bytecode.

C++ is generally faster still in UE.

6

u/uglycaca123 Nov 03 '26

spaghetti code without bolognese? or carbonara? or something in general??? what a savage...

5

u/gizamo Nov 03 '26

For real. This should have a NSFW tag or something. This is absolutely filthy.

Still probably cleaner than a lot of AI apps tho.

2

u/Dayner_Kurdi Nov 03 '26

Speaking of AI.

I never understood AI bros.

they have never eaten any good, or are they built differently?

3

u/Lendari Nov 04 '26

What software is this...

9

u/Virgurilla Nov 04 '26

Visual scripting in unreal engine, really fun tbh

2

u/Dayner_Kurdi Nov 04 '26

Unreal, blueprints. They are auto-generated “code” in each project

5

u/qalmakka Nov 04 '26

First thing I did in my current job is to remove all non UI blueprints from our massive UE5 app. That shit is not maintainable, Tim Sweeney was probably high as fuck when he though they were an alternative to scripting. You can maintain scripts, you can't maintain whatever that is

2

u/Dayner_Kurdi Nov 04 '26

I assumed that the initial intent is to have none programmer make a quick and dirty prototype to pitch their idea…

Somewhere, somehow, it became like this, only to be deprecated…

2

u/qalmakka Nov 04 '26

Yes, and for that I understand their intended purpose. But without any serious scripting support the only viable alternative is their wannabe-dotnet mutilated dialect of C++ which is shit. Pure unadulterated shit. You have all the problems of a GC with all the warts of C++ - fun!

3

u/Dayner_Kurdi Nov 04 '26

Well… to be fair… to an artist or a game designer.

It's art 😆

1

u/FiNEk Nov 04 '26

UE community is obsessed with blueprints for whatever reason. Epic pivoted to remove all that shit in UE6 finaly, but what a shitstorm they unleashed, its kinda hilarious.

3

u/RevolutionaryLab1784 Nov 04 '26

So what non spaghetti code should look like

2

u/Dayner_Kurdi Nov 04 '26

I can't post an image in reply.

But this is a basic / beginner setup

https://forums.unrealengine.com/t/reading-blueprints-as-a-coder/6184

111

u/jhill515 Nov 03 '26

I see a consistent Left-to-Right flow that has few cycles in it. Hardly spaghetti. Not just that, but this is all system-level orchestration; everyone knows integration is like DIY wiring/plumbing a house!

It's all proprietary, but find someone who can show you any bit of source code from NDDS and other DDS predecessors. That is spaghetti code!

175

u/Micromize Nov 03 '26

Looks fine to me. 

37

u/Abject-Kitchen3198 Nov 03 '26

That's my code, thanks.

11

u/mixony Nov 03 '26

I am in this picture and I don't like it

15

u/SilasTalbot Nov 04 '26

lgtm.

PR approved 👍

39

u/K4tch1 Nov 03 '26

Doesn't look too bad tbh

23

u/DestopLine555 Nov 04 '26

Why am I seeing Bad Apple on the first image lmao

1

u/Dry-Ad-719 27d ago

u/Junferno bad apple on spaghetti code pretty please? 🥺👉👈

17

u/JimmyPickles69 Nov 04 '26

that looks pretty freakin structured to me

34

u/ef02 Nov 03 '26 edited Nov 03 '26

For anyone wondering, these are generated by engine and aren't meant to be viewed or edited in the editor, there's just no reason to prevent them from being opened in the editor.

Edit: I came back to this post and realized that I was wrong, although Unreal does have ugly assets generated at build-time.

14

u/Malleus94 Nov 04 '26

Ok I developed in Unreal in the last 7 years and while this is some of the worst managed Blueprint I've ever seen, this is still salvageable with half a day of moving nodes since hopefully all is handled in the same graph. Most people miss that the true Spaghetti code is not just ugly code, is also code that is executed through multiple classes without a real reason.

Spaghetti code in Unreal looks more like a blueprint with 200 functions calling C++ code, which in turn trigger BlueprintNativeEvents which are defined in editor, which triggers an event which is bound in a C++ file, all of which is dynamically instanciated at runtime and held together by soft references so you won't ever understand WHERE the fuck the whole stuff is used in the game.

9

u/GreenerThanFF Nov 03 '26

Doesn't even look that bad

7

u/Stripy42 29d ago

It keeps going!

But what's that graphing software? I want to see how bad my code is.

3

u/SpaceFire1 28d ago

Unreal Engine blueprints

6

u/Comic_Melon Nov 04 '26

This is hardly spaghetti code

8

u/fibojoly Nov 03 '26

In 2008, I joined a company with a 10 year old existing codebase. They wanted me to work on it and I'm a very visual guy so I asked if they had a map or something. They did not. I discovered Doxygen and used it to create that map. My boss, delighted to see this, had a mate print it out. The final poster was 4x3 meters high... :/

2

u/Virgurilla Nov 04 '26

I would love to see it even if blurred out tbh sounds amazing

3

u/fibojoly Nov 04 '26

Sorry it was back in the day before omnipresent cameras. I wish I had taken a photo because it really is something to see ! :D

4

u/AmazinDood Nov 03 '26

This is just Septabee but for code.

4

u/Flat_Initial_1823 Nov 03 '26

We should pour aluminum to get a cast of it

4

u/The_Fresh_Wince Nov 03 '26

Think lasagna. Layers.

7

u/SaneLad Nov 03 '26

Bro that's not code. That's a Large Hadron Collider result.

3

u/PusheenHater Nov 03 '26

We'll no longer have this since Epic deprecated blueprints.

2

u/Virgurilla Nov 04 '26

Second worst thing to ever happen to epic

3

u/warpspeedSCP Nov 03 '26

US military presentation slide be like:

2

u/Mrpuddikin Nov 03 '26

hypergamy

2

u/ZetaformGames Nov 04 '26

This is why I'm not a fan of node based programming...

2

u/ImPlento Nov 05 '26

That's just a normal UE5 node graph

2

u/javaman1025 29d ago

Hey who leaked my source code???

3

u/r2_adhd2 Nov 03 '26

I have never, and I mean never, let any of my Blueprints get this bad. Ever. I either port it to C++ in the parent or a break things into new functions. This is terrifying me to look at.

1

u/Skyswimsky Nov 04 '26

Doesn't say much without visualization of "clean" code as comparison

1

u/DecisionOk5750 Nov 04 '26

You should see a node-red automation...

1

u/muminisko Nov 04 '26

Shaders builder in Unity look similar and I never get it over few nodes without deep need to scrap it out

1

u/dhnam_LegenDUST Nov 05 '26

Most sane and clean LabVIEW code be like:

1

u/meinkr0phtR2 29d ago

Ah, your average database.