← Back to all posts

Career · 6 min read

From the lecture hall to the terminal: what teaching taught me about code

Between 2020 and 2022, I taught computer science and ran lab sessions at the Faculty of Informatics, Ghor University. I wrote the lecture materials, set the exams, and marked the projects. It's easy to describe that job as separate from software engineering. I don't think it was.

Explaining is a form of testing

When you have to explain a recursive function to forty students who have never seen one, you find out fast whether you actually understand it or just recognize the pattern. Teaching forced me to hold concepts at two levels at once: precise enough to be correct, simple enough to be usable. That's the same standard I now try to hold my code to — a function should be correct, and it should also be legible to the next person who opens the file.

Grading is code review with worse incentives

Grading student projects meant reading a lot of code that technically worked and still needed to be pushed back. It's where I first practiced giving feedback that was specific about what to fix without discouraging someone from trying again. That instinct — be exact about the problem, generous about the person — has mattered more in professional code review than anything I learned from a style guide.

The best bug reports I write now read like the feedback I used to leave on a student's first attempt at a database schema.

What carried over, and what didn't

The habits carried over cleanly. The context did not. Moving from a university faculty in Ghor to a master's program in Mainz meant re-establishing credibility from scratch, in a system that couldn't simply take my two years of teaching on faith. That's part of why I'm pursuing the M.Sc. in Applied Computer Science now — not to relearn the fundamentals, but to put them inside a structure that translates.