How to start a project

How to start a project
0

#1

So I really enjoy my time on FCC and my certification is really just around the corner (i’m at the tic tac toe project)
but I felt like it is over my head,
so I looked for similar projects on github, and I completely understand how they built them,
but I am not feeling ready to build one by myself, how can I build it w/o just copy&paste and still achieve something from completing the project?
I think my real question is how to build a good,multi classes and functions and organized program?
Thank you!


#2

I don’t know about the organisation side of things - my code is horribly organised…

But, when I’m starting something from scratch I just try to solve one tiny problem at a time. So for tic-tac-toe my thought process went something like this:

How do I make a 3x3 grid?
How do I centre that grid?
How do I make an X appear in a cell when I click it?
How do I let the computer ‘click’ a cell?
How do I know if someone has won?

I typically don’t know the answers to any of those questions before I start, so I just keep chipping away at it until it takes shape. I often hit upon other important questions as I go, like ‘what happens if I pick a cell that’s already filled?’ Or ‘how can I let the player choose to be X or O?’

Essentially all my coding looks like that :slight_smile:


#3

Hello @idosavion I don’t see the original post, but one of the campers posted a link to Course covers methods for organizing your code a few days ago. It looks good and I plan to go through it myself.


#4

I think a good project starts at the “drawing table”; before sitting in front of the computer and writing a single line of code you should have a clear idea of things like “which object(s) do I need?”, “which properties and methods should they have?”, etc…

After that you can shape your objects in your code. (vanilla Javascript)

Then you have to think about how to visualize them. (HTML and CSS)

Finally you have to verify that your visualization is updated according to any change in your object status (vanilla Javascript or, more likely, jQuery).

Obviously this is not an immutable rule but I noticed this is the pattern I follow most of the time for front-end projects.


#5

@idosavion you may find this useful, the thread is a discussion basically on your question:

[How to start a program](http://forum.freecodecamp.com/t/how-to-start-a-program/1507)


#6

Rick, i’ve been playing around this course for the last two days and i’m really enjoying it so far. You have to be quite autonomous and know your way around vanilla JS or Jquery (I did choose to go vanilla JS in this challenge).

I’ve gone from spaghetti code and i’m currently refactoring this to have a MVC look. I highly recommend it !


#7

Write good codes with functions? I’m interested in this too.

Not sure if you know but I think the term you may be interested in is ES6. Here is a good tutorial series. Can be commonly found in React in the next module.

Also, checkout the async tutorials on promise and generator here:

Hope this helps :slight_smile:


#8

I’m gonna add this series as a recommendation;


#9

… but one of the campers posted a link to Course covers methods for organizing your code a few days ago…

I’m enjoying this one.