paint-brush
Surefire Ways to Become a Better Coderby@jacobedawson
10,828 reads
10,828 reads

Surefire Ways to Become a Better Coder

by Jacob E. DawsonMarch 21st, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

If you’re reading this then the chances are that either you feel like you’re not living up to your full potential as a coder, or you’re a straight-up beginner with your head spinning. I can totally empathize — I’ve been in your shoes — hell, I’ve been coding for nearly 4 years and I still feel like it’s my first day of school. No worries. I spend a lot of time talking to coders who are much better than myself, and through those conversations I’ve learned a few things about how to improve — quickly & efficiently. I want to share some of those tips with you now so hopefully you can level-up with less stress. Let’s rock’n’roll.

People Mentioned

Mention Thumbnail
Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Surefire Ways to Become a Better Coder
Jacob E. Dawson HackerNoon profile picture

If you’re reading this then the chances are that either you feel like you’re not living up to your full potential as a coder, or you’re a straight-up beginner with your head spinning. I can totally empathize — I’ve been in your shoes — hell, I’ve been coding for nearly 4 years and I still feel like it’s my first day of school. No worries. I spend a lot of time talking to coders who are much better than myself, and through those conversations I’ve learned a few things about how to improve — quickly & efficiently. I want to share some of those tips with you now so hopefully you can level-up with less stress. Let’s rock’n’roll.

Just Code Baby*

Ok, let’s begin with a disclaimer. I hate when people say things so obvious you feel like punching them in the face. I really do. So please — hear me out on this one. I read a lot of posts on r/webdev where people want to know what they should do next, or ask how they can become a better coder. Think about it this way — how good do you think Michael Jordan would have been at basketball if all he did was sit at home and read books about the sport? What if all he did was shoot lay-ups exclusively with his right hand? We never would have heard of him. He became great by playing basketball every day — by playing it with a competitive fire and challenging himself in every facet of the game. If you want to become a better coder, then you have to:

1.) code every day

2.) always push yourself a little bit harder than before.

*If you are not coding every day yet still posting “how can I get better at coding” questions, please stop reading this now and go and f*cking code ;)

So now that Captain Obvious has declared his face super-punchable, here are some practical ways for you to code every day in fun ways that challenge you:

  • Find layouts on Dribbble / Behance and try to recreate them in Codepen.
  • Grab some open APIs from Programmable Web or Todd Motto’s List and come up with novel ways to rinse, rearrange & display the data.
  • Build a single-page pong clone using only pure JavaScript.
  • Try coding ‘real life’ layouts. By this I mean take a layout from say, a magazine and then challenge yourself to recreate that layout in code.
  • Run experiments in different way. If you find it easy to build something with the help of jQuery, try building the same thing using only pure JavaScript and Web APIs.

Build Something Real

I tried learning to code a few times before the penny dropped. In hindsight, the reason is obvious — I was stuck on the Tutorial Treadmill. The Tutorial Treadmill is when you spend all of your time building to-do apps and creating throwaway code that doesn’t *really* do anything. This is a surefire way to lose motivation & inspiration.

My personal coding journey really took off when I decided to build a web app that actually meant something to me. When you decide to build something personal, unexpected challenges will come at you from all angles, and by tackling these challenges as they arise you’ll start to build a repository of techniques to handle them. I started with building a simple chat program for my friends, and by the end of it I was interfacing with APIs, handling user-authentication, integrating animation libraries, configuring servers and much more. I didn’t know that I would be doing any of those things when I started the journey, but once you have the core of a project going these things will crop up naturally while you build them.

no one is going to hire you when you show them that you’ve successfully managed to copy and paste 12 Scotch.io tutorials

An added benefit of building a Real Thing™ is that you have something of substance to share with interviewers & companies if you decide that you’re ready to enter the job market. You’ll definitely want a few of these projects to pull out during interviews — no one is going to hire you when you show them that you’ve successfully managed to copy and paste 12 Scotch.io tutorials. You should also be using a version control system like Github to manage the code of your Real Thing™, which means that you can always add the repo address to your portfolio & resume.

Look At Professional Code

If you build for the web, you have the opportunity to see how professional developers are working every time you open up your browser — it’s as easy as opening up the dev tools on your browser and inspecting the code. You can learn techniques and tricks just by seeing how the pros arrange their HTML, utilize CSS animations or integrate libraries to make the magic happen. If you think that the website you’re visiting looks good, feels fast and is glowing with quality — open it up and see how they do it.

Beyond that, there is more quality code than you could ever read sitting on Github waiting for you to clone it to your local machine. Choose a library with say > 500 stars but that isn’t gigantic — something very useful and very popular without being gargantuan. You’re free to inspect the code and see how they achieve their results. You’ll learn a lot just by mentally reverse engineering the code to figure out how the software works, and in the process you’ll likely get a fly-on-the-wall view of properly commented and well-configured code. That’s a free & invaluable resource just waiting for you to get your hands dirty!

Finally — you might begin to understand the code well enough that you can start to think of ways to improve it. How modular is the code that they’ve written? Are they using monolithic functions that could be broken down into smaller, more readable elements? Are they using objects efficiently, or importing an entire library to complete a simple task? When you start to notice these things — when you can say “not sure why they did X, I would do it like Y” — you will know you’re improving.

Learn a Different Language

Coding preferences can sometimes devolve into the PC Master Race argument, whereby language X is for undisputed champions and Y is for shameful noobs. While it’s true that PHP sucks (kidding! ..kind of), the beauty of programming languages is that every one of them has strengths and weaknesses. There’s an old saying attributed to Mark Twain: to the man with a hammer, everything looks like a nail, and this kind of mentality can get in the way of becoming the best coder that you can be.

While the rise of NodeJS and Universal JavaScript means that it’s possible — and at times preferable — to write the front and back-end of a project in JavaScript, it may not always be the most efficient. JavaScript began as a cute little language to handle browser-based functions, and has grown like crazy over the past decade to become the language of the web, but there are other languages that shine in different ways:

  • Ruby & Python are multi-purpose languages with very readable syntax and rock-solid frameworks (Ruby on Rails, Django). Python has become the de-facto standard for Machine Learning in recent years.
  • Java, C# — Knowledge of those languages can enforce a more rigorous understanding of ‘how programming really works’ under the hood (by necessity). Java has been at the top or near the top of in-demand programming jobs for over a decade.
  • C is a compiled language that is transformed directly into machine code — it’s very ‘close to the metal’ and learning this will force you to understand the physical & theoretical underpinnings of computer science.
  • APL is a programming language that looks more like ancient Sanskrit and is mainly used by Operating Thetans of level 8 or higher.

You don’t have to go out and learn every other language under the sun, but having a knowledge of what other languages do, how they do it and why people use them will give you a much richer understanding of the coding ecosystem in general.

Do Freelance Projects for Cheap / Free

While the general consensus is that you should never use Upwork to get freelance work, I think that it can actually be a pretty useful way to improve your coding skills. Look — an economic race to the bottom is never a good idea, but on the other hand, necessity is the mother of invention. If you take on a smallish project on Upwork (or a similar freelance platform), you’ll not only be simulating the conditions of honest-to-goodness freelance coding work, you’ll also be under some time pressure, which is something that your own projects generally won’t offer (unless you’re super strict with yourself).

Even if the payment is ludicrously small, you can think of it as though you’re getting paid to learn — which isn’t such a bad deal since learning usually costs money. You’ll also feel a little bit of extra pressure to deliver high-quality work, which is going to force you to learn best practices and do your research before marking the job as complete.

If you’re morally opposed to Upwork et al, you can even add in some feel-good juice by offering your services to not-for-profits and local charities. The upside of this is not only that you get to feel all warm & gooey on the inside, but the bar generally won’t be raised so high when you’re upgrading the local soup kitchen’s website from a 90’s-era codebase. FreeCodeCamp and similar websites offer you a lot of options when it comes to donating your time, and it’s a win-win situation.

You Are Never Finished

Realize that you’re never “done”. There’s not some oddly-calm code ninja waiting at the top of an ice-covered mountain to pin a “Winner!” badge on your sweat-stained lapels once you’ve successfully managed to put together a functioning Webpack build without swearing. Unfortunately.

A journey of 100k LOC begins with a single LOC.

No matter what you learn, coding just keeps on going. You could be the number-one expert in your area of expertise and a few years later be totally unemployable *cough* ActionScript coders *cough*. Even when you’re feeling pretty solid with your skills, just remember that there’s some uber-keyboard jockey working for a Wall Street trading firm who dreams of binary code and poops algorithms. Don’t sweat it — be the best that you can be and keep on coding.

Good luck!

If you’re wondering whether you’re ready to get a developer job, I’m building a platform to help you find out. Jumpjet helps you become a better coder by practicing technical interviews with pro developers. Get feedback, get hired. Check it out here: https://www.jumpjet.io