this post was submitted on 20 Apr 2026
1 points (100.0% liked)

JavaScript

2716 readers
1 users here now

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] bitcrafter@programming.dev 0 points 1 week ago (2 children)

One can definitely go overboard with this, though. I have had to read a lot of code where someone broke something up into several functions that only had the effective of forcing me to constantly bounce around all over source file to figure out what was going on without improving clarity at all.

[–] clif@lemmy.world 0 points 1 week ago (1 children)

Ugh, SonarQube with the cognitive complexity check.

"Instead of having 50 lines where all logic is right here, I'mma need you to break it up into 10 separate functions so it's a massive pain in the ass to figure out what the fuck is going on"

I understand the reasoning but sometimes it's way more confusing to split up complex logic instead of just having it all in one place.

[–] Windex007@lemmy.world 0 points 1 week ago

SonarQube can eat my whole asshole.

[–] einkorn@feddit.org 0 points 1 week ago

As with everything: Balance is the key.