The Good Parts, Patterns, and a Cookbook of Javascript

I’ve been asked recently about some books to learn/get updated on/figure out this new found JavaScript craze, so here’s my first three suggestions… 🙂

JavaScript: The Good Parts by Douglas Crockford

I started reading JavaScript: The Good Parts by Douglas Crockford a few months back. I’ve been slowly making my way through the book and wanted to add a few notes, thoughts, and maybe even discuss some of these “Good Parts”.

It seems, even with all the great things happening around Javascript, there are still tons of issues and concerns around using this as a primary language for full stack development. There are concerns around maintainability and other issues also. I like Javascript, but I keep getting that sinking feeling like it is the next realm of “Visual Basic”, which hasn’t held so well throughout the years. If Javascript is going to become the next Visual Basic, I want to be ahead of the curve on the chaos that will surely ensue, and be aware of the signs of poorly designed, poorly built Javascript “Death Marches”. The last thing I want to do is to walk into a shop that has created its own demise through technical debt in Javascript, which I can only imagine could be exponentially worse than a mess in Java or C#.

JavaScript Patterns by Stoyan Stefanov

This book I’ve just picked up, not even started, but decided it is a must have after reviewing the contents. With the concerns of JavaScript kind of being the new “Visual Basic” (and really, not in a language sense, but in a mort sense) when I saw Chapter 2 hits upon “Writing Maintainable Code”, “Writing to be Read”, and “Minimizing Globals” along with a host of other interesting sections I had to spot for this book. JavaScript has and will continue to be in desperate need of good developers who focus strongly on readable, maintainable, simple, and usable code. So far there is a large contingent out there that either don’t pay attention, try to generate everything under the sun, or just simply write crappy code that is completely unmaintainable (or even readable to start with).

JavaScript: The Definitive Guide by David Flanagan

This book is kind of the “bible” of JavaScript. The first edition came out years ago and, in all honesty, I think I’ve seen the book on about every single web developer’s bookshelf I’ve seen. I bet it shows up on those with no bookshelf, but is loaded on a Kindle, or other eBook Reader for those electronically enabled web developers.

I’ve probably seen at least every page of this book, not particularly having read it from beginning to end. This book is full of information regarding JavaScript including all the nooks and crannies of the language that you may or may not want to delve into. Either way, if you write JavaScript even a little, you should have this book somewhere near.

Windows Live Microsoft Word Document UX vs. Google Docs UX

Before even getting to the point of writing a document, there are very distinct user experiences (UX). I have my own preferences, but I am very curious what others think.

When somebody decides to create a new Microsoft Word Document in the Windows Live Site on their Skydrive they’re presented with this interface.

Windows Live Skydrive Microsoft Word Document
Windows Live Skydrive Microsoft Word Document (Click for full size image)

To start typing in the prospective document you much choose your security, enter a document name, and save the document.  It assumes that you absolutely want a unique name, will have a document viewable by the entire Internet, and that you have to save it just to start.

In Google Docs though the approach is entirely different.  When you create a new Google Document you are presented with the actual document interface as shown.

Google Docs Interface (Click for larger image)
Google Docs Interface (Click for larger image)

Google Docs assumes that you want to immediately start typing your word processor document. It also assumes you may not know what you want to name the file, nor that you even need to actually save it, until you of course start typing. At that time the document starts to automatically save. It also assumes that this is your document and you don’t want the entire world to be able to view the document.

So I’m left with questions:

  • Which interface do people really prefer?
  • Do people prefer to start typing immediately or filling out the three pieces of information like the MS Word Doc requires?
  • One appears to allow for immediate productivity for the document creator vs. the other one. Is that just my observation or do others see it that way also?
Please let me know your two cents, I’m truly curious about which UX works out better for you.

Observations on Linux (Ubuntu Specifically)

It has been a long while since I’ve used a Linux + GUI. Ubuntu, I understand probably isn’t the most bleeding edge, but just out of the box it has all the candy of Windows 7 plus lots of 3rd party enhancements and drivers or OS-X with the same. I’m honestly amazed that the OS is THIS feature packed. Everything one needs is installed to get going. The other amazing thing is evident in some measurements. These are all done so far on a Dell Inspiron 1720 Laptop, Intel Dual Core with 4 GB of RAM.

  1. Memory utilization on is about 70% of what Windows 7 uses for similar tasks. I dare not even compare it to Vista. It runs almost on par with Apple’s OS-X.
  2. Processor utilization to accomplish the same tasks (i.e. word processor, spreadsheet calcuations, launching web browsers, or straight executing heavy calculations) is a fair percentage lower than Windows 7. Generally around 5-10% lower utilization. This is noticable in longer battery life.
  3. Ubuntu, regular Desktop Edition, has a 5-25% longer batter life than using Windows 7.
  4. .NET Framework Code Execution on Mono/Linux is noticably faster than running the same code on Windows 7/.NET Framework/IIS.
  5. Boot time to load (see GUI + Desktop Features Listed Below) with all features is approximately 10-25% of Windows 7 with default load + 3rd Party Tools Added to match functionality (such as Winsplit Revolution and other tools).

Windows + W = Current Running App Windows for the Desktop that is in focus. Use the arrow keys to select the window to focus on.

Windows + E = Desktops, use arrow keys to select the one you want.

Alt + Tab = Switches between apps, pretty standard GUI Functionality.

Functionality enabled for the Dell Inspiron 1720 without loading a single driver manually:

1. The Func + F1 Combo Works to put the laptop to sleep.
2. The Func + F3 works to provide the battery status on a laptop.
3. The Func + F5 for scroll lock.
4. Func + F8 for CRT/LCD switching.
5. In addition to that the scroll on the track pad works with a default Ubuntu Installation, both vertical and horizontal.
6. Video Card was loaded, update was detected, and an updated driver was downloaded.
7. Network Card, Blue Tooth, and Other Network Drivers where all loaded.
8. Chipset, and other drivers needed for hardware, etc, all loaded.

All in all, the Ubuntu Organization has done and excellent job of building an operating system that easily rivals OS-X or Windows 7.

Two Completely Unrelated Items

Just two quick links I found interesting lately.

First is CQRS on Windows Azure.

This is a great write up about how to setup a CQRS Architecture using Windows Azure.  The article covers topics ranging from idempotency to command ordering, overall, good stuff.

The second link is the Timeglider for jQuery Plugin.

jQuery Timeline (Click for Demo)
jQuery Timeline (Click for Demo)

This is just a cool plugin for jQuery.  Being able to zoom in and out of a timeline, and horizontally from past to present, is a great way to view dates & events.

Cuttin’ Teeth With NuGet

If you’re in the .NET Dev space you might have heard about the release of nuget.  This is an absolutely great tool for pulling in dependencies within a Visual Studio 2010 Project.  (It can also help a lot in Visual Studio 2008, and maybe even earlier versions)

Instead of writing up another tutorial I decided I’d put together specific links for putting together packages, installing packages, and other activities around using this tool.  In order of importance in getting started, I’ve itemized the list below.

  1. Nuget Gallery

    The first site to check out is the Nuget Codeplex Site.

  2. Check out the Nuget Gallery.
  3. Then check out the getting start page.

Once you’ve checked out all those sites & got rolling with nuget, be sure to check out some of the blogs from the guys that have put time in on the development and ongoing awesomeness of it!

That’s all I’ve got for now, check out the nuget, if you code against the .NET stack you owe it to yourself!

Also some of my cohorts have put together a few pieces of information related to nuget and getting it tied together a bit like Ruby on Rails Gems: