Coding is hard. Really hard. There are times when you'll think "this is amazing! I love this!"
But you'll also have the not so amazing times. The times when you are staring at the same error for days, or stuck trying to understand a new concept. You may up thinking, "I am just not cut out for this. Why am I trying?".
So what do you do if you feel yourself wanting to give up? I've got some tips for you, but first, here's my story about when I almost gave up, and what I did about it...
*Lights dim & dramatic intro music plays*
When I first started programming as part of my Computer Science course, I felt super lost. People will say you’re not supposed to know much when you’re just starting out, but I really struggled in the beginning.
I just couldn’t grasp any coding concepts:
Abstraction: The idea of focusing on the ideas, rather than, the implementations... “OK Yoda what does that mean?”
Interfaces: “Ah! I know this one! Thats the thing the user uses to interact with the…oh wait”
Functions & Objects: “Not overly sure how many of these things I need or when I need them. So I’ll just use one for now" *creates monolith file called MyClass.js*
Arrays: “Arrays hold things. Got it. But only one type of thing. OK, fair enough I guess. Ooo look you can make a 2D array…an array of arrays. EASY! I’m ready to start this assignment”:
Assignment: The following code is a 3D array, which is an array of arrays of arrays, containing random numbers. Iterate over the array and print the prime numbers and the frequency in which they appear, in order. Consider time complexity.
*leaves the building*
And don’t get me started on data structures and algorithms…
I wasn’t sure why I was so far behind in my course.
Was it that I just wasn’t cut out for coding?
Was it the quality of my course & lecturers?
Was it the copious amounts of beer and partying I did in my first few weeks of university (nah, it couldn’t have been that).
After a few years of struggling and scraping by, I still couldn't code the simplest apps. The final straw was being told by one particular company that I should consider another field when I was interviewing for an internship.
This was the lowest point for me, and I was tempted to give up and drop out. But technology was my passion, I wanted to become a developer more than anything. I was in my final year of university, and I decided enough was enough.
I sat down, opened my laptop, put on some ACDC, and started practicing.
I would practice day in and day out. On coding websites, on my own small projects, following tutorials, if there was a way to practice code, I was doing it. When I wasn’t writing code, I was reading about code. I read other peoples code. I read about the people who wrote good code.
Slowly but surely it, it started to click. All the concepts I didn’t understand were slowly coming to me. And like a phoenix from the ashes (or, something more computer related and less dramatic), I graduated and landed my first junior developer role.
After many years of experience, learning, and mistakes (those stories are for another day!) I've progressed past the junior developer stage. I’m currently working at a startup leading the product development. I'm also mentoring more junior developers than myself, and loving every minute of it.
I am now on a mission to pass my knowledge to junior developers all over the world. To show that anyone can crack their way into the world of web development with some hard work, and some dedication.
Hopefully I haven't bored you too much - still with me? Good, let's get onto the tips to try when you're feeling a tad defeated.
Take a step back, and realise it's normal
The first thing to do before you throw in the towel on your web development career is to realise that it's perfectly natural to feel overwhelmed at times. The best way to do this is to step away from the code for a while. Go for a walk, read a book or watch TV. Basically, take a break and relax for a bit. If you need to take a few days off, that's perfectly fine as well.
When you return, hopefully you'll feel a bit more refreshed and fired up to go again! If not, here's a few more things you can try.
I don't think this is stated enough, but patience is super important for developers of all levels. When learning to code, it can be frustrating to not understand something, especially if you've been looking at it for hours.
But the next time you feel yourself getting frustrated at a bug and error, remember the "step back" approach from the previous point and try telling yourself:
"OK this sucks, but getting frustrated won't help anything. I'll take a break and come back with fresh eyes and try again".
You'll be surprised how much this will help.
Celebrate the wins when you get them
A lot of junior developers I've met, can be quite hard on themselves and fail to properly acknowledge their accomplishments.
"I finally got this button working on my app but it took all day!"
So? The point is it now works! Huzzah!
It's important to celebrate the wins when you get them. Whether you are trying to get your first HTML page working, or trying to create your own complex web app, whenever you get something working, celebrate it.
Scream "SUCCESS" at the top of your voice, jump around the room, dance with the neighbours. OK, that's probably a bit much (I didn't do any of that, I swear...) but you get the idea. By celebrating the wins, you're acknowledging your accomplishments, filling yourself with joy, and motivating yourself to keep going for more wins.
Set smaller, definable goals
It's easy to sit down and say "OK, my goal is to learn how to code". This is a great goal to have, but it's a difficult one to measure. When have you finished learning how to code? Is it when you have created your first website? When you have created your first large app? When you've gotten your first job?
By creating and reaching smaller goals more often, you'll feel like you're making progress.
Keep a journal of your progress
Even if you set your own goals, it can be difficult to remember everything. You may have started with the intention of completing one thing, and got side tracked and ended up learning or doing something else (this happens to me all the time!).
A good way to keep track of your progress is to write everything down in a journal. At the start of your week, day or whatever it may be, write down the goal you plan to achieve. When you've met that goal, write it down, along with any notes that spring to mind that you want to remember. Didn't meet the goal? No problem, write down why - whether it be distractions, doing something else that seemed more interesting, needed a break, etc.
If you're ever feeling defeated, look into your journal of wins - you'll be surprised at how far you have come!
Look back at your early projects
Another great approach to seeing how far you have come, is to look at your early code exercises and projects. This is your paper trail of progression, whether it was your very first HTML page, your first "Hello World" app or your first TODO app. You might look back and think, "Oh I remember that, it took me forever to figure out how to add those checkboxes! Now I can do it with my eyes closed".
So put everything you do onto GitHub, or keep it saved on your computer. No matter how small it is, it was a part of your journey, and important to remember.
Join the community
There is no better community than the web development community. From the open source software, to the free resources to learning to code, it really is great to be a part of. I wish I had of got involved with the community earlier - it would have made the difficult parts of my web development journey a lot easier.
Why? Because of the support. There are many great communities from freeCodeCamp, to CodeNewbies, to Subreddits and Twitter groups that are built to support fellow coders.
I highly recommend getting involved in these communities. Share what you're doing, see what other people are doing, and get involved in the discussions. It's a great motivator when you get a few likes, thanks or replies to a post you've made.
Work hard, and don't give up
As I said in the beginning, coding is hard. Continue to put in the work, celebrate the wins when you get them, and don't give up. It'll be worth it in the end! In the words of Nelson Mandela:
Everything seems impossible before its done