Programming lessons · Java, C#, Python, JavaScript
See how code works.
Not only what it says, but what happens: where the value goes, where the arrow points, which line runs now. Short lessons made of cards, with a 3D scene next to the code.
Start with
- 6590 programs run and compared
- 132 3D scenes
- no sign-up

coffee points to the same object, so it prints 8.0.
Product coffee = new Product();
coffee.price = 10;
Product sale = coffee;
sale.price = 8;
System.out.println(coffee.price); // 8.0The steps in words
- new makes the object, and its fields get starting values. coffee gets an arrow to it.
- Follow the arrow from coffee: the price of the object becomes 10.
- sale = coffee copies the arrow, not the object. Two arrows, one object.
- Follow the arrow from sale: the price in the same object becomes 8.
- coffee points to the same object, so it prints 8.0.

coffee points to the same object, so it prints 8.
Product coffee = new Product();
coffee.Price = 10;
Product sale = coffee;
sale.Price = 8;
Console.WriteLine(coffee.Price); // 8The steps in words
- new makes the object, and its fields get starting values. coffee gets an arrow to it.
- Follow the arrow from coffee: the price of the object becomes 10.
- sale = coffee copies the arrow, not the object. Two arrows, one object.
- Follow the arrow from sale: the price in the same object becomes 8.
- coffee points to the same object, so it prints 8.

coffee points to the same object, so it prints 8.
coffee = Product()
coffee.price = 10
sale = coffee
sale.price = 8
print(coffee.price) # 8The steps in words
- Product() makes the object, and __init__ gives its fields starting values. coffee gets an arrow to it.
- Follow the arrow from coffee: the price of the object becomes 10.
- sale = coffee copies the arrow, not the object. Two arrows, one object.
- Follow the arrow from sale: the price in the same object becomes 8.
- coffee points to the same object, so it prints 8.

coffee points to the same object, so it prints 8.
const coffee = new Product();
coffee.price = 10;
const sale = coffee;
sale.price = 8;
console.log(coffee.price); // 8The steps in words
- new makes the object, and its fields are still undefined. coffee gets an arrow to it.
- Follow the arrow from coffee: the price of the object becomes 10.
- sale = coffee copies the arrow, not the object. Two arrows, one object.
- Follow the arrow from sale: the price in the same object becomes 8.
- coffee points to the same object, so it prints 8.
One idea, four languages
The concept is one. The syntax differs.
The same class in Java, C#, Python and JavaScript. Press "Run" and follow the program line by line: which line runs, what is in the object, what comes out at the end.
Dog.javachecked
class Dog {
private final String name;
Dog(String name) { this.name = name; }
String speak() { return name + ": Woof!"; }
public static void main(String[] args) {
System.out.println(new Dog("Rex").speak());
}
}class Dog
{
private readonly string name;
public Dog(string name) => this.name = name;
public string Speak() => $"{name}: Woof!";
static void Main() =>
Console.WriteLine(new Dog("Rex").Speak());
}class Dog:
def __init__(self, name):
self.name = name
def speak(self):
return f"{self.name}: Woof!"
print(Dog("Rex").speak())class Dog {
#name;
constructor(name) { this.#name = name; }
speak() { return `${this.#name}: Woof!`; }
}
console.log(new Dog("Rex").speak());Press "Run"
How it works
A lesson of cards, one at a time
One card is on the screen. First a problem you know, then the idea and the scene, then small hands-on tasks. No wall of text. Your progress is kept in your browser.
Lesson "Why methods", Java
- ProblemOne change, three places
It starts from something that hurts: the same code copied in three places.
- The ideaWrite it once, call it by name
The idea in plain words, then exactly how it is written.
- See itWhat happens on a call
The 3D scene moves with the code and shows the memory.
- Try itWhat order? What is missing?
Put the lines in order, fill in the gap, find the bug.
- ExerciseThe receipt and the triangle
A whole small program you write yourself.
- TestCheck yourself
A short test. A wrong answer tells you why it is wrong.
Courses
The whole path, module by module
Every lesson uses only what you have already seen. Open a module and start from its first lesson.
OOP with Java
From the first program to classes, inheritance, exceptions, collections, files, threads and databases.
Open the course- 00Welcomethe language, where it is used, setup3 lessons
- 01Language basicsvariables, conditions, loops, arrays9 lessons
- 02Methodscode you write once and call many times4 lessons
- 03Classes and objectsyour own types5 lessons
- 04Inheritance and polymorphismwhat is shared, in one place5 lessons
- 05Errors and exceptionswhen something goes wrong3 lessons
- 06Text and filesstrings, regex, files5 lessons
- 07Collectionslists, stack, queue, HashMap5 lessons
- 08Modern Javalambdas, data pipelines, patterns4 lessons
- 09Real-world programstests, threads, network, databases, reflection5 lessons
OOP with C#
From the first program to classes, inheritance, exceptions, LINQ, async and web apps with ASP.NET and WPF.
Open the course- 00Welcomethe language, where it is used, setup3 lessons
- 01Language basicsvariables, conditions, loops, arrays9 lessons
- 02Methodscode you write once and call many times4 lessons
- 03Classes and objectsyour own types5 lessons
- 04Inheritance and polymorphismwhat is shared, in one place5 lessons
- 05Errors and exceptionswhen something goes wrong3 lessons
- 06Web and desktopLINQ, async, the internet, MVC, WebAPI, WPF8 lessons
Programming with Python
From the first program to functions, classes, inheritance, exceptions, files, collections, tests, threads and databases.
Open the course- 00Welcomethe language, where it is used, setup3 lessons
- 01Language basicsvariables, conditions, loops, arrays9 lessons
- 02Functionscode you write once and call many times4 lessons
- 03Classes and objectsyour own types5 lessons
- 04Inheritance and polymorphismwhat is shared, in one place5 lessons
- 05Errors and exceptionswhen something goes wrong3 lessons
- 06Text and filesstrings, regex, files5 lessons
- 07Collectionslists, stack, queue, dicts, sets5 lessons
- 08Modern Pythonlambdas, data pipelines, patterns4 lessons
- 09Real-world programstests, threads, network, databases, reflection5 lessons
Programming with JavaScript
From the first program to functions, classes, inheritance, exceptions, files, collections, async, tests and databases with Node.js.
Open the course- 00Welcomethe language, where it is used, setup3 lessons
- 01Language basicsvariables, conditions, loops, arrays9 lessons
- 02Functionscode you write once and call many times4 lessons
- 03Classes and objectsyour own types5 lessons
- 04Inheritance and polymorphismwhat is shared, in one place5 lessons
- 05Errors and exceptionswhen something goes wrong3 lessons
- 06Text and filesstrings, regex, files5 lessons
- 07Collectionsarrays, stack, queue, Map, Set5 lessons
- 08Modern JavaScriptlambdas, data pipelines, patterns4 lessons
- 09Real-world programstests, threads, network, databases, reflection5 lessons
Databases and SQL
SQL queries you run right in the browser, database design, transactions, indexes, the database in a program and the kinds of databases, with live simulators.
Open the courseGames and project
Then you build something real
Three games from scratch to the end and one large project. Every step is a lesson with a scene, and every game says which module it comes after.
gameRPGHeroes of five races, battles and levels. Inheritance, interfaces and exceptions in a game.
gameEpic CosmosStars, planets and satellites as classes, then resources, buildings and ships.
gameThe Locked LabA text escape game with no fighting: rooms, commands, puzzles and a save code.
projectHotel bookingsA server and a client. When two people want one room at the same moment, only one gets it.
Checked code
The code is not copied by eye. It is run.
Every program from the lessons and the scenes is compiled and run in Docker with no network, and its output is compared with the one in the lesson. If anything breaks, the site is not published.
- programs
- 6,5905522 run, 1056 with input, 12 only compiled (WPF)
- "find the bug" tasks
- 418the bug is exactly on the line the task points to
- 3D scenes
- 132every step points to a real line of its code
- problems
- 0in the latest check
With the same versions you will write with
- Java 21
- .NET 10
- Python 3.12
- Node 22
- Docker
- no network
Questions
People often ask
Do I need an account?
No. Everything is open to read. Your progress is kept only in your browser and nowhere else.
Do I need to know anything first?
No. The Welcome module says what the language is, where it is used and how to set up your computer. Every later lesson uses only what you have already seen.
Which language should I pick?
The concepts are the same, so there is no wrong choice. If you follow a curriculum, take its language. If not: Python is the easiest to read and is everywhere in data and automation, JavaScript runs in every browser and on the server, Java and C# show types most clearly. C# also has a module on web and desktop apps.
Are the lessons the same in all four languages?
The topics, scenes and tasks are the same. Where a language does something differently, the lesson shows its way: in Python and JavaScript functions are not in a class, types are not written, and default values take the place of overloading.
Is there an English version of the lessons?
Yes. Every lesson, game and the project is in English, and so is the code in them: the programs print English and are checked just like the Bulgarian ones.
What's new
Latest changes
The lessons in English
Every lesson, game and the project now has an English version, code included: the programs print English and pass the same checks. The scenes write their labels in the language of the page.
Python and JavaScript
The same lessons, scenes, tasks and checks, in Python and JavaScript. Where the language does something differently (functions without a class, no declared types, no overloading), the lesson shows its own way.
Wider lessons, .NET 10 and one large project
On a large monitor the scene sits next to the code and the output next to the program. The C# code is checked with .NET 10. Six similar exercises made way for one step-by-step project: hotel bookings.
Lessons made of cards, with a 3D scene in each
The lectures and exercises became modules of short lessons: a problem, the idea, a scene, small tasks, an exercise and a test. A lesson never uses anything not shown yet. Three games were added.
The Java and C# courses moved here
The material from java.gh.igergov.com and csharp.gh.igergov.com was moved and rewritten. Every old address leads to the lesson its content went into.
About
Where wannacode comes from
The site started as help for students at the Technical University of Sofia: lectures and exercises in object-oriented programming with Java and C#.
Today it is open to anyone who wants to grow as a programmer, in four languages: Java, C#, Python and JavaScript. A separate course teaches databases and SQL.
Made by Ivo Gergov as part of Evo Tech's campaign for accessible programming education.
The first lesson is one click away.
Open the course, read the idea, run the code. The site will remember where you got to.