Archive for the 'Javascript' Category
-
2009.07.04
The beauty of this
posted in Javascript
I’d argue that you won’t love Javascript until you know about the “this” reference, and how to work with it. If you’ve done object oriented programming, you’re probably familiar with the “this” reference in some other language. But if you’re thinking that it works the same in Javascript as in your language of choice, you’re [...]
-
2009.07.02
Building a Javascript clone of Civilization, part 1
posted in Javascript, Object Oriented
So I thought it might be fun to build a game in Javascript, and not just some dead simple game. As I was younger (because I’m so old now) I liked the games Civilization and Colonization a lot, so I wanted to try to make a clone of them, using Javascript. I decided from the [...]
-
2009.07.01
Automatic getters and setters in Javascript
posted in Javascript, Object Oriented
When you’re working with object oriented code, writing those dumb getters and setters can be a bit of a pain, since they’re just getting and setting simple values most of the times. So I thought I’d bring in some magic to my Javascript classes to generate these methods. I’m using John Resigs Simple Javascript Inheritance [...]
About the archives
Welcome to the archives here at The Coffeescripter. Have a look around.