Пользователь Brian
Level 41

Coding: Moving From Theory to Practice or How to Deal With Coder’s Block

Published in the Random group
78687 members
Different kinds of people are using CodeGym for different reasons. While many choose our platform as the main source of learning how to code in Java, quite often CodeGym is used by students studying programming in the uni, and even by teachers or professional coders looking to exercise in practical Java coding. The reason so many people who already know how to code tend to stay on CodeGym is that in coding, the learning process never stops, and it shouldn’t stop. But sometimes it does. Coding: Moving From Theory to Practice or How to Deal With Coder’s Block - 1

Coder’s Block

With programming having so much in it, you will most certainly be facing various problems and bottlenecks in this journey. One of the first bottlenecks many people are facing when still at the beginning of this process is having a hard time actually starting to write code upon learning all the basic coding concepts and ways it is supposed to be done. In a broader sense, it is commonly known as Coder’s Block. Here’s how one coding beginner describes this problem on Reddit: “A few months back, I enrolled in a Node.js course on Udemy where the instructor walks you through creating a few projects while covering the foundations of Node.js. The course relies on solving challenges and building complex projects as you advance. So far I've managed to build projects while watching the content and doing the exercises. But when it comes to building something of my own, I simply can't get my head around it. I understand the theoretical concept of Node.js, how it works, how to set up a server but when it comes to doing something on my own, I simply go blank.” Quite a typical problem really, especially for the students of those courses and learning programs that do not have the right approach in place to make this transaction (from learning theory to writing your own code) go easy and smoothly. CodeGym, thanks to its practice-first approach and balanced structure, actually makes this problem disappear. But let’s say you have chosen a different platform to learn Java or experiencing difficulties with starting to code anyways. Here are a few suggestions on how to get over this bottleneck once and for all.

1. Try solving coding tasks.

Starting from the most simple ones, this way, your brain will have a chance to get used to typing code in an easy and entertaining manner, without putting too much pressure on the end result. We had to put this advice first just because, as you may know, CodeGym is the king of Java coding tasks. We have over 1200 tasks, and this is one of the reasons so many people who actually know how to code still use our platform.

2. Try reading and reverse engineering someone else’s code.

Another good advice if you are having trouble with writing code is to start with reading the code someone else has written, while trying to figure the purpose of each line, get a grasp of the structure, and writing the same thing on your own. This way you can start getting used to the actual work with the code and the ways it could be written. GitHub will be a great place to find projects and code that is most like what you would like to program eventually. After you got used to reading the code, you can try contributing to one of the open source projects there, to get real coding experience and add a project to your resume/portfolio.
Here’s an advice from Jeff Standen, a programmer and software architect with decades of experience: “Constantly find small problems that you care about which can be solved programmatically and practice, practice, practice. If having a solution to those problems would create value for you, then you'll be more likely to persevere. If you have a concrete goal, then you will know exactly when you've reached it, and you'll know what parts are missing along the way. You will serendipitously learn thousands of useful and interesting things that weren't part of your original project, but will be forever useful in the future. Be curious about how the software you currently use is built. Have you ever wondered how Gmail identifies messages as spam?”

3. Try helping others with their code.

The principle of learning something by teaching others works for coding as well. If you are having problems with writing code on your own, try to help others with the same task! For example, you can assist those who are looking for help on programming forums and online communities such as Stack Overflow, Hacker News, Reddit or Quora. At CodeGym, we have a separate Help section for those reasons exactly: those who are seeking help can ask for it, while those who are looking to utilize the learning-by-teaching effect, are free to contribute.
“Coding is like a muscle and needs to be exercised. Even if you stop coding for some time, it takes time to get back on track. Just keep coding. Make tools, write demos, try out new libraries. Read code. Go back and read your own code, read other people's code. You'll be surprised to see how different your old code was, and how much it could be improved. Read other people's code but don't assume all code or massive amounts of code are good coding practices. If you have access to other code repositories from your work by all means read it, you'll gain lots of insight,” recommends Ivan Marcin, a software engineer from Silicon Valley.

4. Try getting in love with the idea of coding your own stuff.

If you know how to code, you can create your own software products that serve your individual needs and are based on your ideas, and that’s what makes programming so great! Try playing with this idea and watch how quickly your mind will join in, imagining everything that you could build if you just practice long enough. It may sound like something small and unimportant, but in reality having the right mental settings often is a crucial success factor. So keep going back to the idea of coding your own stuff, while not forgetting to practice as well, and you’ll see where it leads you.
“Solve pattern-recognition based problems because it will improve the visualization of logic. It is one of the fundamental steps of computation thinking. After some level of practice, your mind will work like a mini-debugger where you could able to visualize the flow of data and how different variables are taking values at different points of execution of code. If a problem asked in the interview or anywhere else, then we should able to get the logic correctly in a single chance, instead of guessing,” said Mohmad Yakub, a developer and programming teacher.

5. Don’t worry about making mistakes and writing code that doesn’t work.

Feeling blocked when you are about to start doing something you’re unaccustomed to, such as writing, speaking a foreign language or playing a musical instrument, is typical, and coding is not in any way different. Naturally, you are worrying about your code being wrong, with countless mistakes in it that would stop it from working properly. And you should, but not too much. If you tend to put too much pressure on yourself, and this is what stops you from coding, try to relax and focus on the process instead of the result. Also a simple thing, but it helps to get over the block.


We at CodeGym know firsthand how annoying the coder’s block can be. And our course is built in a way to get around it as much as possible. Truth is, Coder’s Block will probably haunt you throughout your whole career in coding (if you will have one) and not just at its very beginning. Feeling unproductive and not able to produce anything meaningful follows professional coders as much as writers, musicians and people in other professions requiring creativity and mental effort. So the sooner you’ll learn to deal with it, the more beneficial it will end up being in the long run. Good luck and may the force be with you.
What else to read:
Coding: Moving From Theory to Practice or How to Deal With Coder’s Block - 2
Comments (1)
Li Yu Level  4 , New York City , United States
27 December 2020
the most important is practice, practice, and practice.