Computers and Technology
How to learn another Programming Language
For the past few months, I have been struggling with trying to learn how to program in Javascript, one of the easiest languages one can learn (besides C, I suppose). I know to program in PHP pretty well, I got the whole concept down, and I’ve made plenty of sites to say that I’m experienced. I can work with MySQL, and I can do plenty of other things. However, Javascript has been giving me a headache, that is, until recently.
I tried to work through the language the same way I did with PHP. I watched a few in-depth videos, I tried to do some tutorials on good-tutorials, etc etc. But that did not work. However, I found a great way to get started with the language. I call this the “crash course method”.
Crash Course Method
Here is a summary of my crash-course method:
- go on a tutorial site, one that goes from the beginning to the end with Javascript, such as w3schools.
- look at the topics and write them down real quick like so ( – statements, – comments, – variables)
- for each topic, make a little program to demonstrate the topic, here is an example for a for loop and comments:
<html> <body> <script type="text/javascript"> <!-- document.write("Start for loop" + "<br />"); // single line comment for (i = 0; i <=5; i++) { document.write(i + "<br />"); } /* block comment */ document.write ("For loop ends"); //--> </script> </body> </html> - Don’t focus on the details of javascript, or the tutorials, each programming language works almost the same way (variables, loops, functions etc) so, simply see how javascript works and relate it to your language. For example, in PHP I used the echo function to print out text, javascript uses document.write() with the text between the parenthesis. In PHP, each variable has a dollar sign in front of it, in javascript, that is not the case. Do print out a variable, simply don’t use quotation marks. Make notes of these details, that’ll come in handy
- Have fun! Make little programs, pointless programs that could be made without the use of javascript. Simply, get used to writing the code, don’t find a way around it, tackle the project with javascript
The idea of a crash-course is not to focus on the details, and simply write code as much as possible. That helps the most, I found that out with PHP, and I’m starting to find this out with javascript as well.
Also, note that all programming languages work on a similar concept. Just because it looks unfamiliar, does not mean it does not follow the standard principles you’re used to.
| Print article | This entry was posted by Admin on July 21, 2010 at 17:17, and is filed under javascript, Tutorials. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 1 year ago
I think that worked for you because javascript is pretty simple compared to php, so it’s just basically getting used to different syntax. I started with javascript and I’m trying to learn java and php, which is really hard.
about 1 year ago
believe it or not, I find PHP to be rather simple, and I had no problems learning that. Javascript, on the other hand, proved to be a huge challenge for me. I still struggle understanding it. (trying to incorporate ajax and different JS libraries (Ajax etc) is hard as hell too).
Check this aritcle out: http://www.davepcguy.com/archive/where-to-learn-php/ and check the link for the Zend tutorial set there, it’s how I learned PHP and found it to be the best teacher.