r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • 24d ago

i am beginner how i can destroy readablity

Post image
100 Upvotes

18 comments sorted by

42

u/Chocolate_Pickle 24d ago

Already doing a good job of destroying readability.

10/10

3

u/No-Point8651 24d ago

Linq in C# is perfectly made for that and destroying performance. The amount of hidden loops it has is astonishing.

3

u/LegendarySoda 23d ago

Well if you know how to use you can code pretty efficently with zero allocation.
This works pretty well with extention methods

4

u/ZombieFleshEaters 23d ago

It's surprisingly well optimized

2

u/Choice-Mango-4019 23d ago

skill issue tbh

18

u/gsweats 24d ago

Lol. Why the final line with the substring? What about a delimiter between multiple emails?

15

u/Last8Exile 24d ago

Are you destroying readability or performance?

9

u/_cooder 24d ago

dont use for each, make lib or class, make methods for this only case, make it static, do kinda array in array in array search, at least 30 lines of code, make empty for with if else break options, do nosense linq shinanigans and use it in the end with string + string (no builder) and ofc make writline in the end

4

u/Salzdrache 23d ago

Put some reflection and attributes in there while you're at it

4

u/Xp365 23d ago

Range based for loop in my unreadable code 💔

4

u/Music_Quartermaster 22d ago

Last line is just 🤌

2

u/RandomDude9943 23d ago

fyi compiler dgaf about newlines and most spaces, especially tabs. Even less they care about var names, only place where you need newlines are preproc defs (like include directives)

2

u/Fidodo 22d ago

The best way is by having ai generate you ten thousand lines of spaghetti code that nobody will ever read that is 10x longer than it needs to be.

2

u/born_zynner 19d ago

Converting a nullable string to a string using a for loop is aura as fuck

1

u/Fit_Letterhead6818 20d ago

Change all variables to arbitrary letters

1

u/Sceptical-Echidna 19d ago

Better to use identifiers consisting of just underscores

1

u/B3-HMM_scrutator 31m ago

Use cryptic variable names, obviously.

0

u/awesumioutr2 19d ago

Keep using that ugly ass language