---
title: "How to Get Better at Coding: Practice Habits + 30-Day Plan"
description: "How to get better at coding: deliberate practice, tracing code, small projects and AI as a tutor not a crutch, plus a 30-day plan and Python examples."
slug: how-to-get-better-at-coding
canonical: https://learn.modernagecoders.com/blog/how-to-get-better-at-coding/
date: 2026-11-15
dateModified: 2026-11-15
category: "Learn to Code"
tags: ["Learn to Code", "Python", "Practice", "AI", "Beginners"]
keywords: ["how to get better at coding", "how to get better at coding without ai", "how to get better at coding in python", "how to get better at coding reddit", "how to improve coding skills", "how to practice coding", "30 day coding plan"]
readTime: "12 min read"
author: "Modern Age Coders Team"
---
# How to Get Better at Coding: 6 Habits and a 30-Day Plan

> Deliberate practice, reading code, tracing, small projects and AI as a tutor rather than a crutch, with runnable Python and a day-by-day plan.

![How to get better at coding: a 30-day practice calendar with habits for writing, reading, tracing and building code](/images/blog/how-to-get-better-at-coding/00-hero.png)

*By Modern Age Coders Team · 2026-11-15 · 12 min read*

**Quick answer:** To get better at coding, practise on problems slightly too hard for you, write code from a blank file instead of copying, read other people's code, trace programs line by line before running them, and build small projects you finish. Use AI to explain your errors after you have tried, not to write the code for you. Thirty minutes a day for 30 days, with a weekly re-solve of old problems, beats long weekend sessions.

To **get better at coding**, write code from a blank file on problems slightly too hard for you, read other people's code, trace programs line by line and predict the output before you run them, and build small projects you actually finish. Use AI to explain an error after you have tried, never to write the whole thing. Thirty focused minutes a day does more than a long weekend session.

That answer is simple. Doing it is not, because the activities that feel productive (watching tutorials, copying code that works, asking a chatbot) are the ones that teach the least. This guide explains six habits that work, with Python you can run, an honest section on coding without AI, and a 30-day plan you can print.

## Why you are not getting better at coding

Most people who feel stuck are not lazy. They are practising the wrong thing. Watching someone else code trains you to follow code, which is a real skill but a different one from writing it. Our post on [why you can understand solutions but not solve problems](/blog/why-can-i-understand-solutions-but-not-solve-problems) covers that gap in detail.

- **Tutorial loops:** finishing one course and starting another at the same level, because a new course feels like progress.
- **Copy and run:** typing in code that works. Your fingers learn; your head mostly does not.
- **Problems that are too easy or far too hard:** easy problems feel good and teach little; impossible ones teach only frustration.
- **No feedback:** never checking whether you could do it again tomorrow without help.

## Habit 1: deliberate practice, one level above you

Deliberate practice means working on the edge of what you can do, with a clear goal and quick feedback. In coding that looks like a problem you expect to solve in 20 to 40 minutes, not 2 and not 200. If you solve three in a row in under ten minutes, move up. If you fail three in a row, step down.

The key move is the blank file. Close the tutorial, close the solution, and write it yourself. Being stuck in a blank file for ten minutes is the exercise, not a sign that it is going badly. Our [method for solving coding problems](/blog/how-to-solve-coding-problems) gives you five steps to follow when the file is blank.

## Habit 2: trace code before you run it

Tracing means following a program line by line on paper, tracking every variable, and predicting the output before the computer shows you. It is the fastest way to stop guessing. Try this one. Cover the output and write your prediction first:

```python
# Predict the output BEFORE you run this. Write your guess down.
total = 0
n = 1
while n < 20:
    if n % 3 == 0:
        total += n
    n = n * 2 + 1
print(n, total)
```

Output:

```plaintext
31 18
```

If you guessed differently, do not just read the answer. Make a trace table. Here is the same loop with a print on each pass, so Python draws the table for you:

```python
# The same loop with a print on every pass: the trace table, made by Python.
total = 0
n = 1
print("n   n%3==0  total")
while n < 20:
    if n % 3 == 0:
        total += n
    print(f"{n:<3} {str(n % 3 == 0):<7} {total}")
    n = n * 2 + 1
print("loop ends with n =", n)
```

Output:

```plaintext
n   n%3==0  total
1   False   0
3   True    3
7   False   3
15  True    18
loop ends with n = 31
```

![A trace table for a Python while loop: n goes 1, 3, 7, 15 and stops at 31, and total adds 3 and 15 to reach 18](/images/blog/how-to-get-better-at-coding/01-trace-table.png)

*Predict, then check. The row where your guess and the table disagree is the thing you did not understand.*

The usual mistakes are forgetting that the loop checks `n < 20` only at the top (so n reaches 31 before it stops) and adding 31 to the total. Each wrong guess points at one exact gap in your understanding. That is what makes tracing so efficient.

## Habit 3: read code written by other people

Writers read. Coders often do not. Reading good code shows you ways of doing things you would never invent. Start small: a function in a library you use, a solution to a problem you have already solved, a classmate's project. Ask three questions of every piece you read: what does it do, why is it written this way, and what would break if I changed one line?

Then change one line and run it. Reading becomes learning when you test a prediction.

## Habit 4: solve the same problem three ways

Solving one problem three different ways teaches you more than three different problems solved one way each. You see what each tool in the language is good for. Here is one problem, adding the digits of a number, solved with arithmetic, with text, and with recursion:

```python
# One problem, three ways: add up the digits of a number.
def digit_sum_loop(n):          # way 1: peel digits off with % and //
    total = 0
    while n > 0:
        total += n % 10
        n //= 10
    return total

def digit_sum_text(n):          # way 2: treat the number as text
    return sum(int(ch) for ch in str(n))

def digit_sum_recursive(n):     # way 3: last digit + digit sum of the rest
    if n < 10:
        return n
    return n % 10 + digit_sum_recursive(n // 10)

for n in (0, 7, 2026, 99999):
    print(n, digit_sum_loop(n), digit_sum_text(n), digit_sum_recursive(n))
```

Output:

```plaintext
0 0 0 0
7 7 7 7
2026 10 10 10
99999 45 45 45
```

All three agree on every test, including 0, which is the awkward case: the loop version returns 0 because the loop never runs, and the recursive version returns it as a single digit. If a version had disagreed, you would have learned exactly where your understanding was thin. Our [recursion guide for beginners](/blog/recursion-explained-for-beginners) explains the third way slowly.

## Habit 5: build small projects you finish

A finished small project teaches more than an abandoned big one, because finishing forces you through the boring parts: edge cases, input checking, making it work twice. Pick projects that take two to five sessions:

- A quiz that reads questions from a file and keeps a high score.
- A homework tracker that sorts tasks by due date.
- A program that tells you which day of the week you were born on.
- A text-based adventure with three rooms and one locked door.
- A unit converter with tests for every conversion.

When you finish one, add a single feature you did not plan for. Our [Python project ideas for beginners](/blog/python-project-ideas-for-beginners) has starter code for many more.

## Habit 6: use AI as a tutor, not a crutch

AI coding assistants are useful, and pretending otherwise does not help anyone. The question is when to use them. If AI writes the code, it does the practice, and you get the result without the skill. If AI explains your mistake after you have tried, you keep the practice and get faster feedback.

| Crutch (skip this) | Tutor (do this) |
| --- | --- |
| "Write a program that finds the first unique letter." | "Here is my code. It returns the wrong letter for 'swiss'. Do not fix it; ask me a question that helps me find the bug." |
| Pasting an error and copying the fix | Asking what the error message means, then fixing it yourself |
| Asking for the whole project | Asking for three test cases your code should pass |
| Accepting code you cannot explain | Asking it to explain one line at a time, then closing it and rewriting from memory |

![Using AI as a crutch versus a tutor: asking for code versus asking for a question that helps you find your own bug](/images/blog/how-to-get-better-at-coding/02-crutch-or-tutor.png)

*Same tool, opposite effect. Who does the thinking decides whether you learn.*

> **AI tools have age rules**

> Check the vendor's age rule before a young learner uses any AI tool. Most chat assistants require users to be at least 13. ChatGPT's terms ask for a parent's or guardian's permission for anyone under 18, and Claude is for adults (18 and over) only. Under-13s should build these skills with puzzles, Scratch and Python, without a chatbot account. Our guide to [teaching kids AI at home](/blog/how-to-teach-kids-ai-at-home) covers safe options by age.

For a closer look at which tools are allowed at which age, see our list of [AI coding tools for students](/blog/best-ai-coding-tools-for-students-2026).

## How to get better at coding without AI

You can, and for the first month or so we think you should. Everything above works without any AI: blank files, tracing, reading, three ways, small projects. The things AI speeds up, such as explaining an error message, you can get from the official documentation, a printed trace table, or a classmate or teacher reading your code. A useful rule for beginners is a no-AI first month: you build the habit of being stuck and getting unstuck on your own, and then you add AI as a tutor with that habit already in place.

## How to get better at coding in Python

- **Use the interactive shell.** Type a line, see the result. It is the fastest feedback loop in programming.
- **Learn the core containers properly:** list, dictionary, set, tuple. Most beginner problems are a choice between these.
- **Read the error from the bottom up.** The last line of a Python traceback names the error; the line above it shows where.
- **Write small functions with one job each** and test them with a few `print` or `assert` lines.
- **Re-solve old problems** using a feature you have just learned, such as a dictionary instead of a nested loop.

If you are still at the start, [learn Python step by step](/blog/learn-python-step-by-step) sets out the order to learn things in, and [how long it takes to learn Python](/blog/how-long-does-it-take-to-learn-python) gives honest timelines.

## If you searched "how to get better at coding reddit"

Adding "reddit" to a search usually means you want advice from people who have done it, not a sales page. Fair enough. So here is the plain version, with nothing to buy in it: stop starting new tutorials, write code from a blank file every day, finish small things, read code that is better than yours, and expect to feel stuck most of the time, because being stuck is what practice feels like. If a plan does not include being stuck, it is a plan for watching, not learning.

## A 30-day plan to get better at coding

Thirty minutes a day. Every seventh day is a re-solve day: pick two problems from earlier in the month and solve them again from a blank file.

| Days | Focus | What to do each day |
| --- | --- | --- |
| 1 to 6 | Blank-file basics | One small problem a day (loops, conditions, lists). Write the expected output first, then the code. |
| 7 | Re-solve | Solve two earlier problems again without looking. Note which one you could not do. |
| 8 to 13 | Tracing | Trace one short program on paper before running it; then one problem from a blank file. |
| 14 | Re-solve | Two old problems, and trace one of your own solutions line by line. |
| 15 to 20 | Three ways | Take one problem and solve it two or three different ways. Compare which is clearest. |
| 21 | Re-solve | Two old problems, from a blank file, timed. |
| 22 to 28 | Small project | Build one project from the list above. One feature per day, tested before the next. |
| 29 | Read | Read someone else's solution to a problem you solved. List two things they did better. |
| 30 | Review | Re-solve your hardest problem of the month and write one paragraph on what changed. |

> **Keep a mistake log**

> One line per mistake: what you did, what it should have been, and how you will spot it next time. After a month, the log shows your three most common mistakes, which is the most useful thing a coder can know about themselves.

## How long does it take to get better at coding?

You will notice a difference in a month of daily practice: problems that stopped you at the start will take minutes. Becoming comfortable writing small programs from scratch usually takes a few months of steady work. There is no honest single number, because it depends on how many hours you put in and whether those hours are spent writing or watching.

## How we teach it

The principles on our [how we teach](/how-we-teach) page are these habits in a live class: students explain their thinking out loud, we trace a loop line by line until they can predict every step, learners derive a rule themselves before they see it, we solve the same problem three ways, and mistakes are treated as data. You can see it in [Python for teens](/courses/python-complete-masterclass-teens), the [Python and AI course for kids](/courses/python-ai-kids-masterclass) and the [Python masterclass for adults and college students](/courses/python-programming-masterclass-zero-to-advanced-college), and our page on [how to think like a programmer](/how-to-think-like-a-programmer) goes deeper. The first class is free.

[Book a free class](/book-demo) [Book a priority demo](/book-demo)

## Frequently asked questions

**How can I get better at coding fast?**

Practise daily on problems slightly too hard for you, from a blank file, and re-solve old problems every week. Trace code before running it. These give quick, honest feedback, which is what makes improvement fast.

**How do I get better at coding without AI?**

Use blank-file practice, tracing on paper, reading other people's code and small projects. For explanations, use the official documentation and a teacher or classmate. Many beginners benefit from a first month with no AI at all.

**Is it bad to use AI when learning to code?**

Not if you use it as a tutor: try first, then ask it to explain an error or give you test cases, and make the fix yourself. It is harmful when it writes code you cannot explain. Check the age rules first: Claude is for adults only, and ChatGPT asks for a parent's permission under 18.

**How do I get better at coding in Python?**

Use the interactive shell for quick experiments, learn lists, dictionaries and sets well, read tracebacks from the bottom, write small tested functions, and re-solve old problems with features you have just learned.

**How many hours a day should I practise coding?**

Thirty to sixty focused minutes a day is enough to improve steadily. Consistency matters more than length.

**Why do I forget code I learned?**

Because you read or watched it rather than retrieving it. Re-solving a problem from a blank file a few days later is what makes it stick.

**What small projects help you get better at coding?**

Projects you can finish in a few sessions: a quiz with a high score, a homework tracker, a birthday weekday finder, a text adventure, a unit converter with tests.

**Can kids get better at coding with these habits?**

Yes. Younger children do the same habits in a lighter form: predicting what a Scratch script will do before clicking it, building small games they finish, and explaining their code out loud.

---

*Source: https://learn.modernagecoders.com/blog/how-to-get-better-at-coding/*
