Javascript-Math, math everywhere!!! :)
From C++ to PHP, debugging to webhosting; help and discussion about writing your latest program to running your website. NOT for help when your PC won't work.
| Announcements | Posted on | |
|---|---|---|
| Please change your TSR password | 23-05-2013 | |
-
Re: Javascript-Math, math everywhere!!! :)
I'd say do them. I learnt that the hard way when I started off. I skipped "Training" and dived straight into it, then thought to myself "I've no clue what's going on" and went back to training, and wasted quite some time in the process.
It's always good to have a solid knowledge on the lingo before you dive into intricate builds.
However, don't let it get tedious & boring. Don't spend the next week building HelloWorlds. Skip tasks that you feel are too patronising, given that you know that you can do them if you wanted to.
Sin Cera
Tim -
Re: Javascript-Math, math everywhere!!! :)
When you're learning a language, a lot of the learning process is repetitively doing unrealistic and not useful tasks to get to grips with the language itself rather than what you can make with it. That comes later when you can understand the syntax and program flow to a sufficient level that you think, "how would I do this with a computer?" rather than "how would I do this with Javascript?".
The whole idea between Hello Worlds and calculators is to get to that, "oh, so if I make a function I can call it lots of times and write less, and I can turn this real life equation into something the computer will understand" point. Once you understand the language, the solutions to problems naturally become clearer.
e.g. "I wonder if the window object has a scroll function (which it does - window.scrollBy(x, y))" instead of "I wonder if I can make Javascript scroll the page down". -
Re: Javascript-Math, math everywhere!!! :)I am a big advocate of diving in head first and filling in the gaps later, but for beginning programmers there is far too much critical stuff to miss out on. Start with the basics, take it a step at a time and make sure you understand how every single line of code you write produces the result it does.(Original post by ttoby)
I've found the opposite approach works well. I tend to just dive in and if I get stuck with something, Google how to do it and move on.
Later on, when you have a deeper appreciation of how everything works, you can get away with introducing "black boxes" and being happy knowing how to map inputs to outputs without necessarily having a clear picture of what's in the middle (such as, for example, using high-level frameworks). -
Re: Javascript-Math, math everywhere!!! :)
How I learned JavaScript was by setting myself a goal of making something, then making it. JavaScript isn't that complicated, it's more what one needs to do to get things working. Personally I just cheat and use jQuery.

Oh, and you'll probably find JSFiddle helpful.