How Complex is my Code?

Coders split: speedy tricks or code humans can actually read

TLDR: A developer essay argues that while fast code matters, the real cost is how hard it is for humans to read and fix it. Commenters split between empathy-first simplicity, doom about unavoidable complexity, and calls to make AI tools show a 'complexity score' after every change

Today’s brain-bender: is “fast” code actually better, or is the real win code that humans don’t hate reading? A new essay breaks down complexity from the classic Big O (how work grows as data grows) to how our brains parse code, comparing a simple, slow-ish sort with a faster but fussier one. The twist: the author says the priciest resource isn’t your computer — it’s your brainpower. The crowd went wild. One fan cheered the empathy angle, quoting the line that complexity is in the reader’s head, not the writer’s keyboard. Cue the existentialists: a veteran dev stormed in with “complexity is quicksand” energy, claiming software is ruled by entropy and that we’re all slowly sinking. Newbies chimed in with “wait, I never thought about this,” while the thread’s main villain became… AI coding assistants. A hot take accused tools like Claude of bloating code, and commenters imagined a “Complexity Police” bot flashing: “You increased complexity by 7%” — cue laughter and nervous nods. Memes flew: “Big O? Big Oops.” “CPU cycles are cheap, brain cycles aren’t.” Meanwhile, pragmatists begged for better meters that measure human confusion, not just machine time. Drama level: spicy, with a side of self-awareness and a dash of doom

Key Points

  • Complexity is defined as resources required to run code, expanded to include human cognitive effort and domain knowledge.
  • Insertion sort example demonstrates O(n²) time complexity, especially costly on reverse-sorted inputs.
  • Counting sort example shows O(n) + O(k) behavior with steps: find max, count occurrences, build result.
  • Counting sort has practical constraints: depends on max value, can be wasteful for sparse large ranges, and doesn’t handle negatives as shown.
  • The article argues developer time and comprehension often outweigh compute costs and questions how to measure human-centric code complexity beyond lines of code.

Hottest takes

"The cognitive complexity of a function can only be determined by the reader" — wxw
"A constant struggle against accidental complexity. Like quicksand" — klabb3
"You increased code complexity by 7%. Can you find a simpler solution?" — mherrmann
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.