Friday, December 21, 2012

Installing and working with CoffeeScript in Netbeans

Netbeans Plugin page
Netbeans already has excellent support for JavaScript fortunately it also has a plugin for CoffeeScript written by a guy name Denis Stepanov. Although its missing a "set target folder" feature and only supports CoffeeScript 1.3.3, its still good. The thing here is that it just works. I don't need to install node.js (and the associated npm) to translate CoffeeScript to JavaScript.

To add CoffeeScript support in Netbeans, we start off downloading the plugin. When done you install it via the plugin page. You should restart Netbeans after and that's it. 

After the restart, try creating a new project. There should be a new project type called CoffeeScript Application. And you should be able to add CoffeeScript scripts to existing web projects also. Just remember the limitation that where you wrote your CoffeeScript is also where the output JavaScript will be saved to.

Next post will be about CoffeeScript data types and functions.

Thursday, December 20, 2012

My course to learn the good parts of JavaScript -> CoffeeScript

JavaScript is big. A lot of stuff are now getting built with JavaScript: mobile apps, desktop apps, database shells, etc.

Now, if you write enough JavaScript you will learn that JavaScript is can be a mess especially on large projects. Even if you followed Douglas Crockford's JavaScript the good parts, its quite verbose. This is where CoffeeScript comes in. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. And this is my course for learning CoffeeScript.

My course works out to something like this:

1. Installing and working with CoffeeScript in Netbeans
2. CoffeeScript data types and functions
3. CoffeeScript control structures
4. CoffeeScript prototypes and classes
5. CoffeeScript and JQuery

Saturday, December 8, 2012

Steam on Linux: Need to update them Nvidia Driver

Valve is now running a closed beta for its Steam platform on Linux; more specifically Ubuntu. This is a good thing since I do believe what's holding Ubuntu (and Linux in general) back from the mainstream is the lack of good games. I bet down the line, I will be building a Ubuntu gaming rig. This isn't really a bad idea but them video driver repositories need to catch up.

Right now if you let Ubuntu select your Nvidia driver from the official repositories, it will install the 295.xx driver which makes Steam on Linux unhappy. So we need to update it to, at least, 304.xx driver. The least painful way to do this is via ppa rather than downloading the driver from the Nvidia site, shutdown X and sh run the installer.

So to install the Nvidia 304.xx driver on Ubuntu 12.04; Open a terminal and run the following commands:

# Add ppa repo
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
# Update software list
sudo apt-get update
# Install drive
sudo apt-get install nvidia-current nvidia-settings

You should be downloading about 70ish MB worth of stuff. Restart and then configure it via:

# Configure video settings
sudo nvidia-settings

So that's it and you should be downloading the 25 available games and then playing. I'm download Team Fortress 2 and getting my sandvich.