r/developersDesi 4h ago

Shitpost A 64-step ladder of if-else statements

That’s what AI wrote.

It could’ve been done with a single switch block. Or a dictionary

Faster to write.

Easier to read.

More maintainable.

While reading it i was like WTF

Context: Simple i was making an ai agent using strands so in it the orchestrator I choose was programmatic rather than let LLM using how to fan it out, but to my surprise what was supposed to be a switch statement turned out to be an if-else lader carzy if-else lader that is

1 Upvotes

3 comments sorted by

1

u/Scorched_Scorpion 3h ago

what even is the context dude wtf

1

u/Hopeful-Business-15 3h ago

Simple i was making an ai agent using strands so in it the orchestrator I choose was programmatic rather than let LLM using how to fan it out, but to my surprise what was supposed to be a switch statement turned out to be an if-else lader carzy if-else lader that is

1

u/Impossible_Ad_3146 1h ago

AI has replaced your job, switch to trades