Slightly Overwhelmed

Slightly Overwhelmed
0

#1

Hi,

I’m currently learning front end development and working my way through the freeCodeCamp courses.

One of the projects is to build a tick tak toe web app: https://codepen.io/freeCodeCamp/full/KzXQgy

Looking through the javascript code is very overwhelming and is making my consider is coding is for me.

Do I need to understand every line of code and be able to reproduce something like this from scratch if I was working as a front end developer?

Thanks


#2

If you’re jumping ahead it’s going look intimidating. By the time that you are writing your own tic-tac-toe game it will look different.


#3

Slow down. Everybody has that feeling at some point, even really experienced developers feel it sometimes when facing code made by even more experienced ones, or out of their scope of expertise.
But at the end of the day, it’s just a matter of taking the right, short, slow steps instead of trying to jump to the moon


#4

yes, you should be able to reproduce something similar - if you’re working through the lessons and don’t have any previous experience that will look tough - and it will be tough, but that’s where you learn the most. Most of the example projects are pretty well done by people with a decent chunk of experience(pretty sure anyway). I would try and figure out your own way to tackle the project. By the way, a lot of things will look tough like that when you’re learning. But give it time - a couple months from now you will have come a long way. That code does look tough - here’s mine if you want another example https://codepen.io/moT01/pen/egOKqO


#5

thanks for all the replies - I’m not going to give up.


#6

I’m a little late to the party, however, I want to throw my two cents

When I first worked on the tic tac toe game I felt very much the same way you did.

Sure I could start with the gameboard, but don’t I have to connect the pieces to it? How am I keeping track of what the winning patterns are? Should I be integrating this while building the board? Screw that, how am I going to make this look PRETTY? All the moving pieces I had to consider completely overwhelmed me to the point I didn’t know where to start.

After staring at a white, empty Codepen pane which was supposed to contain my tic tac toe game, I got curious and asked myself, “What would the board look like in JavaScript?”

I quickly brought up repl.it and created my game board as a 2 dimensional array. Then I wondered how I could put a game piece in this array and used the assignment operator with the array and proper indexes. And let’s not forget how to determine when it’s the computer’s turn…

As you can see, all it took to get the ball rolling was starting as tiny as declaring variables and fiddling with arrays. Before you know it, you have a working tic tac toe board all through the console output of repl.it.

So the next time you ever feel overwhelmed, just bring up repl.it or jsfiddle and fiddle around with some tiny bit of javascript code. You’ll be amazed how fast you can throw something together.


#7

It is intimidating at first (I don’t know javascript yet) but trust me soon or later you will be like “ohhhh now i understand” make sure you also learn from different people, not everyone teaches the same way and not everyone learn the same way “Jeffrey Way” on youtube have a free javascript course of the basics and for me this guy is amazing teaching and don’t worry about not retaining everything at first you will eventually remember most of the needed things (even pro use reference sometimes) is the same for every language but the cool thing is if you know one language some other will be easy to learn! Keep asking questions and dont give up!


#8

Yes, that one scared me too. But if you learn the JS, it’s not so bad. The other thing is to break everything into small pieces. How do I draw a board? How do I tell it where to put Xs and Os? How do I have it pick a random square? How do I check if anyone has won? The trick is to break things down into smaller problems and then break those down even further if needed. A big part of learning to code isn’t just about learning neat coding tricks, but learning how to break problems down. That’s what all those tough algorithm challenges are for.

So just put in the time. When you get there, you should be ready. And if you have any problems, we’re here to help.


#9

That is always great advice: break down the problem into smaller and smaller problems. That applies to life in general. Also make small functions that do one thing as much as possible.