The Happy Path (@The_HappyPath) header
The Happy Path (@The_HappyPath) profile picture

Quick software engineering explainers for things you should've googled by now

Join the newsletter →
Joined December 2025
Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)Photo by The Happy Path (@The_HappyPath)
Classic pagination bug: a product search feels instant on the first few pages, then gets slower the deeper it goes. A few hundred pages in, response times stretch into seconds and CPU usage goes up. OFFSET is the culprit, and the fix is a one-line change to the query.
2
5
1
51
26,687
The Happy Path retweeted
A request with a valid token hits an admin-only endpoint, and the user doesn't have the admin role. A) 401 Unauthorized B) 403 Forbidden Which status code should come back?
1
1
119
A request with a valid token hits an admin-only endpoint, and the user doesn't have the admin role. A) 401 Unauthorized B) 403 Forbidden Which status code should come back?
1
1
119
The Happy Path retweeted
SQL quiz. A table orders with 4 rows: amount is 10, NULL, 20 and 30. What's the output of this query? SELECT AVG(amount) FROM orders;
3
1
4
418
SQL quiz. A table orders with 4 rows: amount is 10, NULL, 20 and 30. What's the output of this query? SELECT AVG(amount) FROM orders;
3
1
4
418
A. 401 means the server can't tell who is calling: the credentials are missing or can't be verified. B is 403 Forbidden, C is 404 Not Found, D is 429 Too Many Requests.
HTTP quiz. What does 401 Unauthorized means? A) credentials missing or invalid B) valid credentials, access denied C) resource not found at this URL D) rate limit exceeded for client
4
260
HTTP quiz. What does 401 Unauthorized means? A) credentials missing or invalid B) valid credentials, access denied C) resource not found at this URL D) rate limit exceeded for client
2
1
7
713
PATCH is the one that’s not idempotent. RFC 5789 doesn't make it idempotent: a patch that appends an item to a list adds it again on every retry. GET, PUT and DELETE are idempotent: repeating them leaves the server in the same state.
An idempotent request leaves the server in the same state whether it's sent once or three times. Three of these HTTP methods are idempotent by definition: - GET - DELETE - PATCH - PUT Which one is NOT idempotent?
1
5
338
An idempotent request leaves the server in the same state whether it's sent once or three times. Three of these HTTP methods are idempotent by definition: - GET - DELETE - PATCH - PUT Which one is NOT idempotent?
3
1
1
16
1,268
Sending file uploads through the backend means every byte crosses the server twice: in from the browser, then out to storage. Presigned S3 URLs avoid that. The backend checks the user's permissions and signs a URL for one file key, and the browser sends the file straight to S3.
2
1
13
681
A. git revert adds a new commit that undoes the bad one. Everyone's history still matches. git reset moves main back to an earlier commit. Pushing that takes a force push, and teammates who pulled still have the bad commit in their copies.
A bad commit is already on main, and teammates have pulled it. How do you undo it? A) git revert B) git reset
8
405
A bad commit is already on main, and teammates have pulled it. How do you undo it? A) git revert B) git reset
3
3
1
10
1,470
List, tuple, set and dict are the four main built-in collections in Python.
Three questions tell them apart: is it ordered, can it be modified, and are duplicates allowed?
1
1
18
602
Lie. localhost is a hostname, and the OS looks it up like any other name. On many systems the lookup also returns ::1, the IPv6 loopback address, and some clients try ::1 first. A server listening only on 127.0.0.1 refuses those connections.
localhost always resolves to 127.0.0.1.
4
364
localhost always resolves to 127.0.0.1.
1
1
6
686
DSA Basics: BFS. BFS (breadth-first search) allows to go through the nodes of a tree level by level. A queue is the data structure that enables it: 1. Visit a node, starting with the root 2. Add its children to the back of the queue 3. Take the next node from the front
2
258
HAVING. HAVING filters the groups after GROUP BY has computed each total.
A SQL query for the customers who spent over 1000 in total, with one keyword missing: SELECT customer_id, SUM(amount) FROM orders GROUP BY customer_id ____ SUM(amount) > 1000 Which keyword goes in the blank?
1
11
487
A SQL query for the customers who spent over 1000 in total, with one keyword missing: SELECT customer_id, SUM(amount) FROM orders GROUP BY customer_id ____ SUM(amount) > 1000 Which keyword goes in the blank?
4
1
1
13
1,000
REST API or RESTful API? The two terms get used interchangeably, and in daily talk that’s fine.Strictly, REST is an architectural style defined by a set of constraints. An API is RESTful when it follows them, while “REST API” often labels any HTTP + JSON service.
4
12
707
Truth. If node_modules already exists, npm ci deletes it before the install starts. It then installs exactly what package-lock.json lists, and stops with an error if package.json and the lockfile disagree.
npm ci deletes the existing node_modules folder before it installs anything.
161
npm ci deletes the existing node_modules folder before it installs anything.
1
3
361