Saturday, September 28, 2013

Building and installing NodeJS on Ubuntu 12.10 ... for noobs (like me)

So I'm a .NET guy and not that much of an expert on Linux. However, recent projects renewed my enthousiasm for JavaScript (AngularJS and KnockOut). Looking at some JavaScript best practices quickly leads to looking into testing and often the testing is done command line and requires NodeJS to be installed.

Obviously, I could have just installed Node on my windows machine (which seems to be possible and is supposed to be very easy), but I'll do it on my Ubuntu Server instance just because I can (or learn). And I found a nice video that walks me through the process: http://www.youtube.com/watch?v=ogprXGQWrQk

So, let's get started. I fired up my Ubuntu and I've read you need to start updating the package manager:

sudo apt-get update
sudo apt-get install git build-essential wget

Now get the latest version of Node and download it to you machine

wget http://nodejs.org/dist/v0.10.18/node-v0.10.18.tar.gz

Untar it 
tar xvf node-v0.10.18.tar.gz

Which is e(x)tract, (v)erbose output and (f) file as input.

Go into the folder 
cd node-v0.10.18
./configure

make
sudo make install

OK - the compilation was quite slow and took more than 10 minutes. I noticed in my vSphere client that only 1 processor was running out of the 8 that the VM has available to it. So Googling resulted in:

make -j
sudo make install

To use all cores. Building Node now only took 2 minutes... NICE. And yes - it worked right away! Piece of cake this.


Sunday, September 1, 2013

JavaScript weekend in videos

We're currently working on an AngularJS website which is really awesome to be doing. So, we're writing a bunch of JavaScript. I wanted to raise my JavaScript knowledge to a higher level so I've been watching some YouTube movies on Javascript this weekend.



Here are a few interesting ones I had a look at.

A 3 part series on JavaScript by Douglas Crockford:
- Part 1: Douglas Crockford: The JavaScript Programming Language
- Part 2: Douglas Crockford: An Inconvenient API - The Theory of the DOM
- Part 3: Douglas Crockford: Advanced JavaScript

A quick 'by example' explanation of closures
Video by Bob Tabor.

Javascript patterns
Which will then lead me to understanding Javascript Patterns - as described here: Learning JavaScript Design Patterns



Javascript Ninja level
Finally - there is this site: http://ejohn.org/apps/learn/ - a site by a guy named John Resig who knows a thing or two about JavaScript ... he created jQuery.

Sunday, August 25, 2013

FireBase - Scalable real-time backend

Looking at some AngularJS video's, I came across FireBase. It's a real-time enabled document storage as far as I can see. Go check out the tutorial, it's great to get a quick feel on this thing.


Sunday, August 18, 2013

Reading up on AngularJS best practices

This week I'm starting on a Single Page Application (SPA) for which we decided to go with AngularJS. Can't wait to get started and for prep I've been reading up an a few 'best practices' and 'lessons learned'. Here are some interesting articles:

Lessons Learned: A Year with a Large AngularJS Project
Code Organization in Large AngularJS and JavaScript Applications
AngularJS Best Practices: I’ve Been Doing It Wrong! Part 1 of 3 part 2 and part 3
While you're at it - check out the AngularJS YouTube channel


Friday, August 9, 2013

MS Azure - updated terms & conditions

It was already anounced on .NET Rocks! By Scott Guthrie - Azure pricing changed so that stopped VMs are free of charge and you pay by the minute. Awesome.

Also - since I'm working at a MS Gold Partner, my MSDN Premium account entitles me to a whole bunch of Azure credits. Awesome. I've been spinning up VMs with VS2013, new BizTalk etc etc.

Check out mr. Guthrie's blog post: http://weblogs.asp.net/scottgu/archive/2013/06/03/windows-azure-announcing-major-improvements-for-dev-test-in-the-cloud.aspx


Tuesday, August 6, 2013

Windows Azure - scripting your VMs

I've looked into some Puppet videos over the last couple of weeks and I'm stoked to get that running on my machine. I'm not that quick since Linux is not my normal environment of working in and I'm not as quick in it.

But - I've been hearing about all these benefits of quickly spinning up 100 Azure nodes for load testing or something, so it should be possible to script this process as well. Here's a channel 9 video on how to do that on Azure: