1. Learning based on practice

Java learning based on practice

There are people who love CodeGym with all their hearts, and there are people who hate it with all their hearts. But even CodeGym's most vicious critic will readily agree that it has an impressively huge number of tasks. And the reason why there are so many of them is because all CodeGym training has practice as its foundation.

Programming is a skill. Nobody says, "I know how to program". Every programmer says, "I can program". It is a hands-on skill, like swimming or playing chess. And you can only cultivate the skill through constant practice.

That's why the entire CodeGym course is a sequence of increasingly difficult tasks. You start with very easy, primitive tasks, and end with the most difficult and interesting ones. The difficulty grows a little with each level. This is precisely the path that will lead you to your goal of becoming a programmer.

2. Types of tasks

A whole bunch of different types of tasks await you on CodeGym. Let's list the main ones:

Tasks where you write a program

These are the most important tasks in the course. Their difficulty level varies widely: from the simplest tasks to those that you will have to think about a lot.

The goal of these tasks is to write a program that meets specified conditions and requirements. Most tasks fall into this category. For the convenience of CodeGym students, we mark these tasks according to their difficulty level: EASY, MEDIUM, HARD and EPIC.

EPIC tasks are often based on future learning material in lessons you have not yet unlocked. They are popular with CodeGym students who feel the course is too easy for them. Others can simply skip these tasks and return to them later, when they have already become familiar with the relevant theory.


The downside to ordinary tasks is that they are small. Done and forgotten, as they say. Therefore, it is rarely possible to make them highly interesting. But a large program is difficult to test: there are simply too many ways to implement it.

That's why CodeGym introduced project tasks — large tasks divided into 5-35 ordinary subtasks. You perform all the subtasks sequentially, and you end up with a large program.

At the end of each level after Level 20, there is one large project task, which is divided into twenty subtasks. There are also another 6 game tasks, which are also projects. And there is one project task for being accepted into an online internship. In total, there are 27 project tasks in the entire course.


For a long time, CodeGym had no tests or quizzes. CodeGym's creator holds the opinion that passed tests create the "illusion of knowledge" in people. People don't really know how to program, but they are thoroughly convinced otherwise, since they passed the tests. Such people stop learning, since "they already know everything".

Subsequently, quizzes were added to allow CodeGym students to easily identify gaps in their learning. It is useful for programmers to know the nuances of the things they work with on a daily basis in their profession.

3. Task statuses

Each task on CodeGym has a special status. The status can change as you solve tasks.

Each CodeGym task is associated with a lesson. Initially, you won't have access to any tasks, which means you won't be able to solve them.

When you open the next lesson, all the tasks in the lesson become available for solving, i.e. their status changes to "Available".

If you have submitted a task for verification at least once, then its status changes from "Available" to "In progress".

Finally, when you have successfully met all the requirements and the validator accepts your submission, then the task's status changes to "Completed".

Users with a Premium Mentor subscription have 3 more days to try to write other solutions for the task. After this additional window of time expires, the task moves into "Closed" status, and this status will no longer change.

4. Requirements

In the early years of CodeGym, when you verified each task you got a simple result: yes or no. The program either passed all the tests or it did not. Super simple, but not super helpful.

As people learn, it is very important that they understand what they are doing wrong and how to start doing it right. Accordingly, it makes perfect sense that if the server doesn't accept your solution, then you would ask, well, what's wrong with it?

To get an answer to this question, you need someone to dive into your solution, analyze it, and tell you what's wrong with it. This would take a long time and be expensive. The beauty of instant task verification is that you can sit down to study at 2 AM and it will all work just like any other time.

That's why we rewrote all the tasks on CodeGym. Now each task has not only task conditions, but also a list of 5-10 requirements that flesh out the conditions. Most importantly, each requirement is verified separately.

That means that when you submit a task for verification today, you will get an extended response: next to each task requirement you will see a special icon indicating whether your program satisfies this requirement or not. Example:


This approach greatly simplifies life as you work on tasks that require you to write several classes or methods. You will always be able to see which methods or classes you wrote correctly and which you did not.

5. Recommendations

Is it possible to make the tasks even better somehow? Wouldn't it be great if, after each check, you were told what exactly is wrong in your program and got hints about how to fix it? Yes, that would be cool! Well, guess what? We do just that on CodeGym 🙂

We catch dozens of common mistakes by checking each task requirement. If your program makes a mistake that the validator knows about, then it makes a recommendation — a hint on how you can fix your solution so that it satisfies all the requirements.

Think about it. There are now roughly 1200 tasks on CodeGym, with a total of approximately 10,000 requirements. And there are several recommendations associated with each requirement. Some requirements have dozens of them. CodeGym's validator is ready to make over 50,000 recommendations for user solutions.

Plus, all this happens as your solution is validated, which in most cases takes less than a second. No person could do that. This is a real virtual mentor.


6. Community

CodeGym focuses on a whole lot of practice, which accounts for more than 80% of the whole learning process. We turned learning into a big, engaging quest (actually a series of quests).

But everyone is different: some people learn quickly, and others learn more slowly. Some people find new material easy, while others find it more difficult. But our job is for each of our students to arrive at the finish line. At least that's what we are striving for.

In this world, programmers are not just a few million people who write code in various languages and create startups in their free time. They form a global network, constantly sharing their knowledge with others, ready to answer questions and help you understand complex topics.

The world's largest developer community — the StackOverflow website — was born out of the need for programmers to learn from each other. Its concept is simple: you ask a question and any programmer in the world can answer it. Convenient, right? 🙂

At CodeGym, we believe that exchanging knowledge between students is extremely valuable. As programmers help others, they themselves grow. And there's no better way to understand something yourself than to explain it to someone else. That's why we have created special sections on our website that are designed to give all our students the opportunity to share their knowledge and help each other learn.

So what do you do if you get stuck on the latest task? Searching for a ready-made solution on the Internet is a bad idea. Sure, you will get credit for the task if you just copy someone else's solution or use our correct solution. But you won't close your knowledge gap and that will certainly come back to bite you in the butt in the future.

7. Questions about tasks

The requirements, recommendations, and virtual mentor are super cool. But what if the validator still won't accept your solution and you're not sure what the problem is?

Even in this case, there is still a way out. Meet the Help section. In this section of the website, CodeGym students can ask questions about tasks, explore each other's solutions, and also give advice and tips. Posting complete solutions is not allowed!

It sounds very simple and basic, but it's actually quite sophisticated.

First, each question can have an associated task. This means there's no point in wading through all the questions, if you are interested in questions about a specific task. You can always use a filter to easily see only the questions related to the task that interests you. Just enter the task name in the search bar:

Questions about tasks

Second, if you click the "Community help" button while solving a task, you will immediately be taken to the Help section, where you will see only questions about the task you are working on. If your solution fails task verification, then the questions are sorted in a helpful way: the top questions will be about the unsatisfied requirements that caused your solution to fail.

Help button

Third, the IntelliJ IDEA plugin offers similar functionality. You can click the "Help" button or press the key combination Ctrl+Alt+W, which will immediately open the Help section in your browser. And of course, the filter will display only questions about the task you are solving in IntelliJ IDEA.

IntelliJ IDEA help

8. Creating a question

If you don't find a good analysis of your error in the Help section, then you can always create your own question. This is quite easy to do — you just need to click the "Ask a question" button and fill in the required fields:

 Creating a question

Unlike many other services, such as StackOverflow, Code Ranch, etc., CodeGym doesn't require you to cram all the important information into the question's title. Write your question however you like.

And by the way, you don't need to copy your code from WebIDE or IntelliJ IDEA and add it to your question. When you create a question about a task, your solution's code along with the statuses of the various task requirements are automatically added to it, i.e. which requirements your solution currently satisfies and which it does not.

 Creating a question 2

This means that other CodeGym students immediately see all the relevant information about the asker's solution, which makes it much easier to provide good advice.

9. Solution code

On many sites, when creating a question about code, you need to either attach an archive with program files to the question, or add all these files to the text of the question itself. The result is a big mess that people are either unwilling or unable to dig into.

Asking a question quickly and efficiently is an entire art form. On regular websites, you will either have to spend half an hour formulating your question, or accept the fact that no one is going to answer you. A good question about a task absolutely must contain the following information:

  • Link to the task that the asker is solving
  • The task conditions so others don't need to go hunt them down anywhere
  • Solution code — this could include many files
  • Status of each task requirement, i.e. what currently works and what doesn't.
  • Text of the question: this is usually quite clear — my solution doesn't work, and I'm not sure why.

CodeGym displays this information using a special widget that is very similar to the WebIDE widget. After all, it is already designed to display all of that information. Well, perhaps with the exception of the question itself.

Solution code

In fact, we wrote a special widget just to make it convenient for you to study other users' solutions. And to make it easy and pleasant for other users to examine your solutions in the questions you ask.

New Java Syntax, level 1, lesson 3
It's cool to be a programmer!
Write a program that displays: "I think being a programmer is cool". Example output: I think being a programmer is cool