Advice Needed: Learning PHP and JavaScript
Hello MPGH,
This is my first post, I have been looking for a forum to improve my coding skills through discussion. I grew up on PC games so naturally when I am discouraged or bored with creating php forms I am looking to video games to help motivate me to learn by creating something cool and fun!
Anyhow, I have been studying PHP for about 8months, I have a ton of experience with apache web servers and I have the hang of linux command line. I worked for a web hosting company and I have attempted to reverse some games when I was younger. I am pretty familiar with terminology of programming but I lack practice.
My first question is: Is it a bad idea to learn PHP and JavaScript at the same time? or should I master one then move to the other.
My second request: Does anyone have advice on planning a project and workflow? I tend to just start winging it and I get overwhelmed.
I have been reading books and I honestly feel like my wheels are spinning and I am not making progress. Any advice on some small gaming related project I could work on? I am trying to get my head around Object Oriented Programming.
Looks like my post is all over the place, but thats how I feel, confused.... Any advice?
In response to your first question: It's not a bad thing to learn php and javascript together because they have a very similar syntax, but you should understand their purpose. PHP is used for server side scripting ( so accessing databases, processing information from forms and such), and JavaScript is to make html more functional. The big thing about javascript is that you can create dynamic web pages and such.
Your second question: I am by no means an expert on this matter because I have received no professional education on it, but what I usually do to organize my code structure before hand is to map it out on paper. You want to start out by writing a short paragraph that will describe what the program does. Then you will want to start outlining certain functions that you know you will need to make, and jot down what they are supposed to do and maybe, if you can, you can sort of diagram the algorithm used in the function you want to make.
Now, you will notice that you almost always will think of extra things while you are coding, but doing this will help you get started with the project and you will know what to expect and what to look into.
As for education through books: You will only learn from the books by reading little bits of it and then practicing that concept. Even though the book will be divided into chapters, you will most likely not want to read a whole chapter at a time. You will want to take it two to three pages at a time a day and then use those concepts to make programs. It will take you some time, but it won't be boring if you are applying the ideas to cool projects. In my experience, I liked this method because I would learn something new everyday, and since I would learn it little by little, it stuck a lot more in my mind.
As for some project ideas, you might not want to start doing like fps game related projects, but you can make some console games like tic tac toe, battleship, and a number guesser. You could even make your own mmo and that will give you good practice with the concept of functions and loops.
Good luck, and if you ever need anything please make a thread here, we are always happy to help people who are giving effort.
To continue on what 258456 said on the second question, it is usually common practice to create a flow chart or start your website 'building blocks' which usually includes what the program is, how the program is going to run, how you will manage it, and how the code will be constructed. These are essential when you are working with a team, so it can be a set focus on your specific objective.
On determining how the code will be constructed, it really depends on the size of the project. On small projects, OOP code or any other formal framework is not a necessity, but on bigger projects, it can really help the flow and organization of code.
For your first question, I recommend learning coding a language one by one and if you're really bad and cannot move on, try your other one.