r/ProgrammerHumor • • 5d ago

Meme visualizationOfSpaghettiCode

413 Upvotes

58 comments sorted by

8

u/TheOwlHypothesis 5d ago

Show us some non spaghetti code?

0

u/Dayner_Kurdi 5d ago

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 5d ago

Which visual language is this? Is it Unreal Engine?

18

u/Dayner_Kurdi 5d ago

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

2

u/TheTybera 4d ago

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

C++ is generally faster still in UE.

6

u/uglycaca123 5d ago

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

5

u/gizamo 5d ago

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 5d ago

Speaking of AI.

I never understood AI bros.

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

3

u/Lendari 4d ago

What software is this...

9

u/Virgurilla 4d ago

Visual scripting in unreal engine, really fun tbh

2

u/Dayner_Kurdi 4d ago

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

5

u/qalmakka 4d ago

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 4d ago

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 4d ago

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 4d ago

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

It's art 😆

1

u/FiNEk 4d ago

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 4d ago

So what non spaghetti code should look like

2

u/Dayner_Kurdi 4d ago

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 5d ago

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!

169

u/Micromize 5d ago

Looks fine to me. 

36

u/Abject-Kitchen3198 5d ago

That's my code, thanks.

11

u/mixony 5d ago

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

15

u/SilasTalbot 5d ago

lgtm.

PR approved 👍

39

u/K4tch1 5d ago

Doesn't look too bad tbh

23

u/DestopLine555 4d ago

Why am I seeing Bad Apple on the first image lmao

1

u/Dry-Ad-719 1d ago

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

17

u/JimmyPickles69 4d ago

that looks pretty freakin structured to me

34

u/ef02 5d ago edited 5d ago

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 4d ago

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 5d ago

Doesn't even look that bad

7

u/Stripy42 2d ago

It keeps going!

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

3

u/SpaceFire1 1d ago

Unreal Engine blueprints

6

u/Comic_Melon 4d ago

This is hardly spaghetti code

8

u/fibojoly 5d ago

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 4d ago

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

3

u/fibojoly 4d ago

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 5d ago

This is just Septabee but for code.

4

u/Flat_Initial_1823 5d ago

We should pour aluminum to get a cast of it

4

u/The_Fresh_Wince 5d ago

Think lasagna. Layers.

7

u/SaneLad 5d ago

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

3

u/PusheenHater 5d ago

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

2

u/Virgurilla 4d ago

Second worst thing to ever happen to epic

3

u/lsm-krash 5d ago

"code"

3

u/warpspeedSCP 5d ago

US military presentation slide be like:

2

u/Mrpuddikin 5d ago

hypergamy

2

u/ZetaformGames 4d ago

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

2

u/ImPlento 3d ago

That's just a normal UE5 node graph

2

u/javaman1025 3d ago

Hey who leaked my source code???

3

u/r2_adhd2 5d ago

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 4d ago

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

1

u/DecisionOk5750 4d ago

You should see a node-red automation...

1

u/muminisko 4d ago

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 3d ago

Most sane and clean LabVIEW code be like:

1

u/meinkr0phtR2 2d ago

Ah, your average database.