Tips for Beginner's Coding Training

Tips for Beginner's Coding Training

If you are a beginner learning coding, you may find yourself stuck in a bottleneck sometimes: you already know the basics of a language and many functions, but you have no idea how to solve a problem with the knowledge. And when this dilemma occurs frequently, it leads you to imposter syndrome and all kinds of psychological burdens.

“Do you really know how to code? What is wrong with you?” You may have asked yourself countlessly.

As a beginner, I know this feeling, too. In my perspective, head knowledge could not help you, unless you strengthen your problem solving skills. Thus in this article, I would like to share some tips on self coding training, which I concluded from my learning experiences. You could apply them on any language learning.


Practice Wisely

People learn programming languages in different ways, may them be online courses, peer learning, video marathons, or case studies. All these methods work, but after these everybody does the same thing: practice with problems. And yes, problem solving skills are developed via practices, nothing gifted or magical. My suggestion in the practice websites is Leetcode, where you could find problems categorized in different levels and specializations.

Leetcode webpage with categorized questions

Sounds cliché? Allow me to give some warnings. Practice does not mean to immerse yourself for hours or days in the online platforms of coding questions, because it is not healthy to burn brain cells for too long on the questions that you would be struggling with. Also, not all the problems are needed for your success in your career. You can tell if a coding problem is for general interviews or designed only for mathematicians. So, find your own problem level and category, and do the time management in problem solving.

During the practice, do not feel bad about failing to solve the problems, no matter how easy it could be. The purpose of the practice is to train your skills, it is rather a progress than an accomplishment. Mental difficulties are universal in code learning, because it is to store knowledge of machines into the human brain, bugs and failures are inevitable. So, be strong and optimistic, you will succeed eventually.


RTFM

When you do not have a clue about solving the problem, do not panic. Read the problem carefully, you may have misunderstood it, or miss the clues / hints for solving the problem. Misreading a question is very common for programmers. After all, understanding the problem is very real.

No alt text provided for this image


Tips to Broaden Your Vision

When you have a theory about solving a problem, you could inspect it for possible logic loopholes first.

One common consideration is the data types / data structures. It is beneficial even for high-level languages like Python (do you know when is a good time to use lists, sets, and tuples?). You can ask yourself some questions regarding them:

  • Does it require so many buffers / memories to solve?
  • Is it possible to convert the question to a simpler mathematical problem?
  • Can I simplify my method by using other kinds of data structures?

For example, linked list is fast at value insertion but slow at value searching, array is the other way around, and red black tree has both speed in average. When processing large amount of data, red black tree could be more favored.

No alt text provided for this image

Another consideration is about the critical conditions / edge cases. You need to think about them because programs might be vulnerable to processing errors, data providing issues, and hackers. No issue is too small to be excluded from considerations in the technology world.

No alt text provided for this image

Do these before write your code, make them your habit, it would broaden your vision.


Small Self-Challenges

Maybe you are good at solving some problems, but you can challenge yourself with some small improvements over your solutions. Ask yourself:

  • Can I make my syntax more concise, by simplifying the code structure / reducing my variables / using more effective functions or methods?
  • Can I code it with a faster language if allowed?
  • Can I use a faster processing method (with less time complexity)?
  • Can I write my code as fast as I can?

For example, below are some codes I wrote for calculating Pi values with similar structure (infinite series by Leibniz) in 2 languages (Python and C), you can see C language is much faster than the more popular Python.

Python code of Leibniz series
C code of Leibniz series
Python run time (above) vs C run time (below)

Make the self-challenging a habit, even to a muscle memory degree if you can. Because once you can do it subconsciously, you would think faster and more clearly, in the future your thoughts would be clear enough to capture the whole picture of a problem that is too hard for you today.

For small challenges, I recommend the website CodinGame. It has a section called Clash of Code to do competitive coding in limited time, with simple questions and random small challenges as I mentioned above. Most coding questions are designed as online games or for game development, and they are friendly for entry level programming learners and game developers. Below is a sneak peek of the small competition.

No alt text provided for this image


Ask for Helps

Like I mentioned above, learning has nothing to feel bad about, so does crying for help. All programming engineers have been bullied by machines countless times, they would not have the pride to belittle you, and it does not hurt to have an extra set of eyes for debugging.


These are my humble personal opinions (and gibberish) of learning code, I hope my experiences are helpful for you in some aspects. I have been learning programming languages only for 1 year by far and I am still learning, and I found these tips are very helpful to me. There might be more helpful tips I have not included in this article, so please share if you have it, I am glad to be amazed.


Leetcode main page: https://leetcode.com/explore/

CodinGame main page: https://www.codingame.com/home

More info: https://www.geeksforgeeks.org/best-tips-for-beginners-to-learn-coding-effectively/


To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics