It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
It may sound stupid, but I expected to read comments about
Settlers 1 and such here.
Not some lengthy tutorial for javascript.
Get your own thread in cyberspace ;)
avatar
Qbix: It may sound stupid, but I expected to read comments about
Settlers 1 and such here.
Not some lengthy tutorial for javascript.
Get your own thread in cyberspace ;)

Actually, this is my thread. Muahahaha!
avatar
Qbix: Get your own thread in cyberspace ;)
avatar
hansschmucker: Actually, this is my thread. Muahahaha!

LOL! From all the coding newbies, a big thank you for your time and effort Hans! I'll study your tutorial today.
avatar
hansschmucker: Actually, this is my thread. Muahahaha!
avatar
hashishen: LOL! From all the coding newbies, a big thank you for your time and effort Hans! I'll study your tutorial today.

You're welcome, but it's not nearly finished yet... this is still part 1 - basic language constructs. Then comes the logic part which is a lot more complicated, because Javascript in the browser has a lot of quirks. For example, to animate a block to move across the screen, you would expect to just count through a series of X positions: 1,2,3,4,5,6... Except, it doesn't work, because the browser will only display the result AFTER the loop has ended. You'll need to use a totally different language construct to get the desired effect (hint: timeout). But that function has quirks of its own.
avatar
JudasIscariot: I've been looking to get into coding as well. What would you recommend for a newb? I can't read in German...

If you just want to start with learning the basics of programming, I'd actually recommend VBScript. The language itself is really easy, and you don't need to mess around with compilers and stuff. You won't be able to make any games with it or anything, but for learning basic programming principles (conditions, loops, file I/O, etc.) it's fine. Once you've got the hang of that, you can progress to something more useful ;-)
Don't. Really, don't. There are plenty of script languages which won't scar you forever. Anyway, in case somebody missed it, I started writing a JS tutorial over here
avatar
JudasIscariot: I've been looking to get into coding as well. What would you recommend for a newb? I can't read in German...
avatar
Wishbone: If you just want to start with learning the basics of programming, I'd actually recommend VBScript. The language itself is really easy, and you don't need to mess around with compilers and stuff. You won't be able to make any games with it or anything, but for learning basic programming principles (conditions, loops, file I/O, etc.) it's fine. Once you've got the hang of that, you can progress to something more useful ;-)

Cool. I think I will try that. I got horribly scarred by C/C++ in school wayyyy back when. It looked like they were making it up as they went along....
avatar
hansschmucker: Don't. Really, don't. There are plenty of script languages which won't scar you forever. Anyway, in case somebody missed it, I started writing a JS tutorial over here

I will try anything at this point. I hope I have the mind capable of learning coding. I tried way back when and I don't know ...maybe I was impatient when younger??
Post edited February 03, 2009 by JudasIscariot
avatar
hansschmucker: Don't. Really, don't. There are plenty of script languages which won't scar you forever. Anyway, in case somebody missed it, I started writing a JS tutorial over here

Yes, I know. Javascript is just somewhat more complicated than VBScript (or more advanced, if you will), so if you have zero programming experience, I think VBScript is an easier place to start. I learned programming using C++ in school, but if I hadn't had to stick with it to pass, I might not have had the tenacity to keep at it for long. Of course, at some point you pass a sort of "point of no return", after which you can keep going by yourself, but to get there, you need to put in a lot of work.
Post edited February 03, 2009 by Wishbone
C is a horrible language to start with and C++ even more. It's wonderfully versatile, but when you try to learn something, you have to be able to focus on the basic principle, without being distracted with trying to remember all memory handles, so that you can free them later on. Also, teachers like to show off with stuff like, instead of trying to teach anything.
((barValue*)((complexType*)foo->bar))[3].x()
avatar
hansschmucker: Don't. Really, don't. There are plenty of script languages which won't scar you forever. Anyway, in case somebody missed it, I started writing a JS tutorial over here
avatar
Wishbone: Yes, I know. Javascript is just somewhat more complicated than VBScript (or more advanced, if you will), so if you have zero programming experience, I think VBScript is an easier place to start. I learned programming using C++ in school, but if I hadn't had to stick with it to pass, I might not have had the tenacity to keep at it for long. Of course, at some point you pass a sort of "point of no return", after which you can keep going by yourself, but to get there, you need to put in a lot of work.

Javascript has a lot of features, but the nice thing is that you can entirely ignore them if you want to. You can equally well write a BASIC-style function based code or a prototype based OOP-style.
I usually teach JS, because, as a C-LIKE language, it's incredibly well structured, while BASIC variants often adopt bits and pieces from whatever language the developer currently fancies. That may be C, that may be LINGO, that maybe PYTHON, that may be PERL. There's no structure. You think you understand the logic in one part only to see that a different part has an entirely different logic.
Post edited February 03, 2009 by hansschmucker