Is it normal not to understand every line of code in a Flask tutorial?

September 29, 2026 5 answers
Asked by .soil.profile
I'm a computer science student building my first web app in Python, and I'm following the official Flask tutorial to create a blog. I understand the overall structure and what the application is doing, but I don't understand every line or every term yet. Is that normal when learning, or should I stop and fully understand each part before continuing?

Answers

_ordinary_pencil
Thereโ€™s a useful distinction between learning code and shipping code. While learning, itโ€™s perfectly reasonable to write code you only partly understand and investigate it as you go. Before other people rely on the application, though, you should understand the important parts well enough to maintain, debug, and secure them. The goal isnโ€™t instant total understanding; itโ€™s steadily reducing the unknowns.
Reply to this answer
out-of-print journal
Programming is built on layers of abstraction, so nobody understands every detail of everything their code relies on. Even experienced developers use documentation and tools to explain unfamiliar code. Tools such as language models can help explain a snippet, but check the explanation carefully and make sure you can describe what the code does before depending on it in a real project.

.soil.profile: That makes sense. Iโ€™ll use explanations as a learning aid rather than letting a tool write the whole application for me.

Reply to this answer
sum+3terms
Thatโ€™s completely normal, especially the first time you work through an unfamiliar codebase. With experience, more patterns and syntax will become intuitive, but youโ€™ll always encounter unfamiliar code in new projects. Keep notes about the parts you donโ€™t understand and return to them when you have time.
Reply to this answer
_5 folding screens
A good way to learn is to get the tutorial working, then experiment with it. Change a value, remove a line, alter the output, or replace a function and observe what breaks. Follow up on the questions that come up. Youโ€™ll learn more by testing your assumptions than by trying to memorize every line before moving on.
Reply to this answer
atlas 73
Itโ€™s fine to continue while youโ€™re still filling in gaps, but donโ€™t become comfortable with never understanding them. In particular, make an effort to learn unfamiliar Python syntax, standard-library features, and the Flask concepts that your application depends on. You donโ€™t need to understand every implementation detail of every imported library, but you should understand the code you maintain, troubleshoot, or deploy.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions