← Back to Difficulty Selection

Code Review (Warmup): "God Functions" (Doing Too Much)

Story

This function parses input, validates data, talks to the database, formats output… and probably makes coffee too.

It works, but it’s doing way more than one function should.

When everything lives in one place, nothing is reusable and testing becomes painful.

A small change or test means dealing with the entire function instead of just the part you care about.

Rule of thumb:

If a function feels "important", it's probably doing too much.

Next Topic: Magic Numbers / Magic Strings

Cookies help us track your progress - nothing extra.