DEV Community

Cover image for How to Get Better at Coding Without Really Trying
Kaemon Lovendahl
Kaemon Lovendahl

Posted on

How to Get Better at Coding Without Really Trying

Intro

This article was made to help those, like myself, that have trouble finding the time, or the patience to practice skills related to WebDev. Time spent on anything is precious and I despise needing to go back to re-learn something over and over again.

I want to state that this tutorial isn't about committing EVERYTHING to memory. It's not worth anyone's time to try and memorize every JavaScript Array method, or some specific Data Structure that you'll never use. This is about learning how to code and how to learn new skills.

Also, if you don't want to spend the time reading through this article you can find a TLDR at the end

Repetition

Repetition is probably one of the best methods I've used to solidify knowledge. This is done by initially practicing a problem over the course of a week. For example, if you started on a Monday you would practice again on Wednesday, Friday, and Sunday. Practicing every other day helps to train your brain to recall the information better and better each time.

After the first week, you should come back to it over increasingly extended amounts of time. Something like a full week, to a few weeks, to a full month. That is assuming you aren't using the new concept in any of your projects or work.

Coming back can really help you to see if you've actually solidified the knowledge. You might even find something that was overlooked in previous practices. Just be sure you come back to it before it's fully forgotten!

I've used these methods to practice concepts like Recursion, Async/Await, Redux, and State Machines.

Know How You Learn

Everyone has a preferred/best method to learn new things. This includes methods like reading, watching videos, or actively practicing, or a combination of these. At this point, you should know the best methods that help you to solidify knowledge.

Personally, I prefer the hands-on approach where I'll try to implement a new concept on my own, then when I get stuck, or if I succeed I'll go over an article/tutorial on the topic. I find that this gives me a better perspective on why/how a thing is done the way it is.

Coding Challenges

There are many, many, many websites dedicated to providing coding challenges for a wide assortment of languages! These sites are perfect for practicing/perfecting your knowledge of a language. There is, however, a right way and a wrong way to do these challenges.

These challenges should only be used to practice your knowledge of a language and nothing more. Not only that but you should only focus on problems that test concepts you are either uncomfortable with or if you want to try solving a problem in a unique, not straight-forward way. You won't get better if you only solve challenges you already know how to solve.

If you're just starting out with a new language I recommend just doing the basics as your main objective. You should be comfortable with concepts like string manipulation, arrays, classes, hashes(objects), if statements, and loops.

Once you are comfortable with the basics you should spend time using language-specific concepts, or try solving problems with a unique solution than you would have used. For example, try using recursion instead of if-statements, or try using a Hash instead of an Array to hold data, etc.

I do need to state using unique solutions to challenges can be great practice but you shouldn't use complex solutions unless it makes sense. You can solve a problem in a unique way but will you understand that one-liner a year from now? Documentation can really help explain your thought patterns.

Locating a site for coding challenges shouldn't be too difficult, and there are so many out there that you should be able to find one you like. I used to use codeWars and hackerRank for a while. I will say that I was able to find a challenge site that I fell in love with, codingame. Its challenges are all themed around videogames. They've even gamified challenges by having a match-made game where you try to solve problems alongside others. It can be pretty fun!

Projects

While Coding Challenges are a great way to get better at a language, projects are how you get better at development. Projects challenge you to not only build something but to build something documented, tested, maintainable, etc. Manipulating an Object can only get you so far when you need to build a website or an API.

In my opinion, most of your time practicing should be spent building projects. This is where you can really put all of your knowledge together and develop marketable skills for your career. Topics that you should be familiar with in any project would be testing, state management, file structure, documentation, and architecture.

Having trouble figuring out what you want to build? Try rebuilding your version of an App, or website that you use frequently. Wish something existed that doesn't currently, build it yourself! My largest pet project is a collection manager for my constantly growing Magic: The Gathering collection.

Be Uncomfortable

This is probably the largest point I want to make. If you are frequently building projects or solving problems the same way you always have then you aren't learning anything new. Have you used Redux for state management? Why not try State Machines, or Context if your using React.

It doesn't take long to realize there is no single solution for every problem you come across. Every tool/framework has advantages and disadvantages. Knowing multiple ways to solve a problem can really make your life easier when you're using a tool the right way.

For example, it'd be overkill to use Rails to build an API for basic CRUD functionality with few customizations. Choosing something like Node + Express would be better?

TLDR

  • Don't just maintain knowledge, actively work to better it.

  • You don't have to be perfect. (But that doesn't mean you can write crappy code either.)

  • Work on something you are unfamiliar with.

  • Solve a problem with an unfamiliar solution. (Using a loop? Why not recursion?)

  • Would you understand this code if you just had a memory wipe? (Comment Everything)

Top comments (11)

Collapse
 
houdinii profile image
Brian B.

"Know How You Learn", the shortest section, but by far the most important. I cannot learn from video, at all. It turns into me just retyping what the person is typing and I ingest none of it. Give me low-level documentation, though, and I turn into an expert. Once I figured this out, I was home-free. Before you ever figure out how to interface new code with your computer you have to find a way to interface new code with your brain and it's just as specific in how it receives new data.

Collapse
 
stephanlamoureux profile image
Stephan Lamoureux

Staying out of your comfort zone is definitely where most of your growth will come!

Collapse
 
abdojulari profile image
Abdul Ojulari

Well as for me, learning by practicing is the most effective way of learning. Videos make it easier, at least if the tutors make it work, I would definitely get it working and reapply the knowledge where is suitably needed.

Collapse
 
robinbastiaan profile image
Robin Bastiaan

Good article! In my career as a developer I have found out that knowing how to code is not the same as knowing how to put the knowledge into practice. For me the magic happens when I build something new with techniques with little experience all while trying to uphold the best conventions. That being said, I do like to know stuff by memory so I can breeze through the development process more quickly and have some sense of confidence I know what I am working on.

Collapse
 
bl1133 profile image
Bryan Lee • Edited

What helps me when doing a video course is taking notes with keywords highlighted. I have multiple notebooks full of notes, and I can come back to it and review what I learned whenever I want. It also works as reference. And the process of note-taking makes you engaged with the video content. Otherwise I get bored and lose attention.

Collapse
 
detzam profile image
webstuff

You know your title has no srnse regarding the article. I mean all those things, coding challenges for instance, they require you to lose time, to add time to the craft.
If you re working a 9 to 17 job, you need to add time for new projects.

Collapse
 
aalphaindia profile image
Pawan Pawar

Keep sharing

Collapse
 
andrewbaisden profile image
Andrew Baisden

Agreed coding challenges can make a big difference. And the fact that many interviews require you to know some data structures and algorithms its a good thing to practice.

Collapse
 
joancomasfdz profile image
Joan Comas Fernandez

Good advise here! I'd like to point out though that repeating an exercise every week, doing your own projects and doing coding challenges is actually trying.

Collapse
 
squidbe profile image
squidbe

Good, reasonable advice, but your title is misrepresentative and, thus, seems clickbaity. I think a more representative title would serve you better.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.