Why we hide a bug in every project
Every Devventura job project has a bug written by a fictional teammate. Here's why debugging someone else's code is the most underrated skill for new developers.
If you've worked as a developer for more than a few weeks, you know the feeling. A ticket comes in: "Drivers are seeing other drivers' stops." You open the code. You didn't write it. The person who did is on holiday. The code looks… fine?
That moment, staring at reasonable-looking code that's somehow wrong, is a big part of the job. And almost no course prepares you for it. So we put it in on purpose.
Every project has a teammate, and they make mistakes
Each job project on our career path has a milestone where a colleague's code is broken. Not broken in a silly, obvious way. Broken in the ways real code breaks:
- In the first project, the daily revenue is wrong only for some parcels.
- In the second, a schedule function "remembers" stops from the previous van, because of a mutable default argument. It passes the first test and fails the second.
- In the third, a search crashes for one Dutch city,
's-Hertogenbosch, and the same bug turns out to be an SQL injection hole.
You get a failing test and a bug report from a driver, and that's it. Finding it is your job.
Why this matters so much
When you write code from scratch, you know what every line is supposed to do. When you debug someone else's, you have to work it out: read carefully, form a guess, test the guess. That's a different skill, and it's the one you'll use most.
It also teaches humility in a nice way. After you've found a mutable default in someone else's code, you'll never write one yourself without a little alarm going off. Then a few milestones later, you review a pull request that brings the same bug back, wrapped in a "performance improvement". Spotting it there feels great.
How to get better at debugging
A few habits that help, whatever you're working on:
- Reproduce it first. If you can't make it fail on purpose, you can't know you fixed it.
- Read the error from the bottom up. The last line says what; the lines above say where.
- Make one guess at a time. Change one thing, run it again. Changing five things at once teaches you nothing, even if it works.
- Print more than you think you need.
print(repr(value))shows the hidden spaces and quotes thatprint(value)doesn't. - Write the test that would have caught it. Then it stays fixed.
The best part
Of all the milestones we wrote, the bug fixes were the most fun to write, and we think they're the most fun to solve. Building something is satisfying. Figuring out why something is broken, and being right, is satisfying in a different way. It's the closest thing programming has to solving a mystery.
If you want to try it, the bugs start in the first job project, right after Python Fundamentals.
Read next
- Why we teach with simulated jobs, not puzzles
Coding puzzles train one skill. The job needs several more: reading vague tickets, working in code someone else wrote, fixing their bugs and taking review.
- Your first week as a junior developer: what nobody tells you
You'll read more code than you write, you'll ask questions that feel stupid, and that's exactly right. An honest look at the first week on a software team.
- Python's mutable default argument trap (and how to fix it)
Why def f(items=[]) shares one list between every call, how it causes bugs that look impossible, and the None pattern that fixes it, with dataclasses and class attributes too.
- SQL injection in Python: why f-strings break your queries (with sqlite3)
How building SQL with f-strings crashes on a name like 's-Hertogenbosch and lets attackers rewrite your query, and how parameterised queries in sqlite3 fix both.
- Code review checklist for junior developers
What senior engineers look for in a code review, as a practical checklist: correctness, edge cases, tests, naming, structure and performance, with C++-specific points.