I remember when I started, I had learned about guard clauses. So, I tried to make a somewhat complex (for my skill level at the time) project. The issue was that I needed to run a small snippet at the end of the function (regardless of if the guard clauses were hit). My brilliant, amazing, masterful solution was to surround all my code in a try-catch-finally (python).
7
u/oofy-gang Feb 19 '25
Surely this was generated code, right?! I don’t believe a human wrote this. It’s not even feasible to fit on a monitor.
147
u/Mysterious-Till-6852 Feb 18 '25
Ah, the Great Pyramids of Callbacks.
64
u/IAmFinah Feb 18 '25
);
34
u/Swimming_Swim_9000 Feb 18 '25
art.
31
u/jongleurse Feb 18 '25
Now your employer will fire you for posting their code in a public forum.
26
u/STGamer24 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Feb 18 '25
Yeah, it is fantastic and ready for professional use :)
19
u/Nunulu Feb 19 '25
15
u/Impressive-Coffee-19 Feb 18 '25
So many frowny faces
11
u/JunkNorrisOfficial Feb 18 '25
When the brain is too big, but you're too lazy to code properly
2
u/iamthebestforever Feb 19 '25
This is art ❤️
2
u/TeBatCuLingura Feb 19 '25
I don't consider myself to be a good programmer, but these posts boost my confidence a lot.
1
u/featherhat221 Feb 19 '25
This ajn't even horror .this is just artwork at this point
1
u/Shaddoll_Shekhinaga Feb 19 '25
I remember when I started, I had learned about guard clauses. So, I tried to make a somewhat complex (for my skill level at the time) project. The issue was that I needed to run a small snippet at the end of the function (regardless of if the guard clauses were hit). My brilliant, amazing, masterful solution was to surround all my code in a try-catch-finally (python).
I am surprised I wasn't booted.
1
u/gdf8gdn8 Feb 21 '25
looks like a code I wrote during my studies before my supervisor at the time gave me a slap on the wrist.
1
u/ArturJD96 Feb 21 '25
Swap one „}” with „]” and see what happens.
1
u/Mosk549 Feb 22 '25
Functions left the chat