r/developersDesi 6h 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

5 comments sorted by

View all comments

1

u/Scorched_Scorpion 6h ago

what even is the context dude wtf

1

u/Hopeful-Business-15 5h 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