Geek


23
Nov 10

How to learn Node.js from Scratch

Server-side Javascript has appealed to me for quite a awhile, and while watching from the sidelines was interesting, I still never had the time to really get my feet wet and see how the language really worked. That changed after joining Joyent, of course. We’re the proud home of Node.js, and it would be wrong unforgivable if I didn’t know how to write JS.

It turns out that learning Javascript has been quite fun, and really easy. There are numerous resources on the internet for learning how to manipulate the DOM, and do ridiculous stuff with JQuery. But I’ve never been a UI person. I’m a server and network guy, through and through. It turns out, the hardest part about learning Javascript is finding decent documentation. Most of my learning experience has been through reading other peoples wacky, sometimes incomprehensible code, and then going through lists of tutorials that I wrote for myself. Breaking things seems to be the best way to learn how to write stuff. I also was able to rely on some of my brilliant co-workers who are full time software engineers.

Here’s a list of resources I found helpful, which don’t necessarily show up at the top of your Google search results.

NodeTuts

A decent list of tutorials as screencasts. They can be a little on the long side, but there are a few gems. Check out the one about learning how Sys.pump (util.pump) works. Once you understand how it works you’ll kind of be blown away at how easily you wrote something so powerful

Node.Js Documentation

The API documentation for node is extremely well written, a testament to Ryan’s Benevolent Dictator for Life mentality, which is a really good thing.

Crockford on Javascript

Douglas Crockford has a ton of really well written examples, standards, “best practices”, and videos. If you’re interested, check out “Javascript – The Good Parts” post, hosted on the Yahoo! developer network (Mirror please…)

Mozilla Developer Network Javascript Reference

I don’t know why this wasn’t the first result I found when I searched for things like “Javascript Object” or “Javascript Array”, but this is the best resource that explains what the native objects are, what methods they include, and provides some decent examples on their usage. A MUST read.

Learning Advanced Javascript

John Resig is putting together a book on the Secrets of Javascript, and it has something to do with Ninjas. But this part of the book is available for people to read today, and it’s pretty cool. After you nail down a lot of the style, prototyping, and closure stuff, be sure to check out this list of examples on advanced JS.


14
May 10

Mobilicity Launches… on GoDaddy

Mobilicity, a new mobile phone carrier is launching in Canada on May 15th, 2010. Starting in Toronto, then covering other major cities like Vancouver, and Montreal, the service is competitively priced with unlimited plans for calling and text messages at around $35 dollars (CAD) a month, which is pretty sweet.

After seeing some buzz on Twitter about Mobilicity, I went to their website, which was so slow I thought I was on dial-up.

This amateur stuff from a Telecom?
No… It can’t be.

But after seeing a database connection error (This means shit is broken for all your non-techies) I realized something was really up.

Check this out:

# host www.mobilicity.ca
www.mobilicity.ca has address 173.201.38.96
# host 173.201.38.96
96.38.201.173.in-addr.arpa domain name pointer ip-173-201-38-96.ip.secureserver.net.

Huh? Secureserver.net is….

# whois 173.201.38.96
 
OrgName:    GoDaddy.com, Inc.
OrgID:      GODAD
Address:    14455 N Hayden Road
Address:    Suite 226
City:       Scottsdale
StateProv:  AZ
PostalCode: 85260
Country:    US
 
NetRange:   173.201.0.0 - 173.201.255.255
CIDR:       173.201.0.0/16
OriginAS:   AS26496
NetName:    GO-DADDY-SOFTWARE-INC
NetHandle:  NET-173-201-0-0-1
Parent:     NET-173-0-0-0-0
NetType:    Direct Allocation
NameServer: CNS1.SECURESERVER.NET
NameServer: CNS2.SECURESERVER.NET
NameServer: CNS3.SECURESERVER.NET
Comment:    Please send abuse complaints to abuse@godaddy.com
RegDate:    2009-09-18
Updated:    2009-09-18

Its GoDaddy. A telecom that hosts its website on GoDaddy.

Yikes.


30
Apr 10

Clouds and The Fate of the Help Desk

As an efficiency nut there’s one thing that makes me really happy about Tablets:

The Help Desk will be going away.

It’s important to understand the meaning of the term “Help Desk”. I don’t just mean people who sit around all day with headsets, answering phone calls. It turns out there are a *lot* of people employed in IT whose job it is to just keep the lights on. Vendors, Integration specialists, Sysadmins, and the guy whose entire job it is to  click the right button to clear the printer queue. Entire countries have devoted a lot of resources to greasing the gears of computers. They all work in a Helpdesk somehow.

CTO’s and CIO’s are starting to appreciate that their function at a company isn’t about technology implementation – it’s about how technology can help their business. Who cares if your OS is running Windows or Linux if all you need is a Word processor (and Solitaire). It’s become totally irrelevant.

What matters is the applications that are delivered to the end user; everything else is just implementation dogma. The people doing these implementations are Help Desks too, they’re just a few degrees removed from the end-user and prefer snazzier titles like ‘Application Services Engineer.’

It’s gonna take awhile. The PC will be around for a long time and people still need to type. But as we shift to tiny, integrated, crash-proof devices we need help desks less and less. The intuitive nature of the computer will suggest that it’s no longer important to be adept at using them. Not only that, but as we cycle through generations of people, the technical citizens will supplant the technical immigrants


18
Feb 10

Carbon Computing

Being able to outsource all of your computing needs to an external provider is absolutely fantastic for developers and some businesses. While not running your own infrastructure is much cheaper, it also makes the amount of energy and associated ‘costs’ of computing very opaque.

There are quite a few issues with the transparency of costs in the cloud computing space. This includes no transparency into the cost of electricity, and where that electricity is coming from. To date, there is no public database of electricity markets, datacenters, and hosting providers which lists how much carbon per kWh of electricity is being output. In ICT this is a massive issue, because of the sheer amount of energy our industry consumes.

“Information and Communication Technology (ICT) is both a problem and a potential solution in the war against climate change. Currently, computers are responsible for more greenhouse gas emissions than airlines. Greenhouse gas is growing exponentially and we expect that ICT will produce double the emissions of the airline industry within five years with no end in site. ICT can provide a solution to climate change by reducing carbon emmission in the world through telecommuting and other means.”

Here in British Columbia we get most of our electricity from renewable hydro-electric power. Hydro-Electric is one of the lowest forms of reliable low carbon output electricity generation available. It goes without saying that providing computing services using energy generated this way would mean less CO2 / kWh but also less CO2 per compute cycle.

We need several things to make this happen

1) Start measuring how much power ICT is using on a per server / component basis
2) Develop resources that track carbon output per kWh in different states & provinces and provide that information as a service
3) Determine where your computing resources are located and track on a per machine level the amount of carbon being output
4) Calculate how much carbon you’re using.

Those are pretty audacious goals, but I think we really need to start keeping track of carbon output for power. By tying that into the different services we use on a regular basis, we can make carbon part of the social and actual cost of using services. Hopefully that will help buy us enough time and money to develop the carbon neutral power solutions we desperately need.