Fieldnotes

TypeScript == Maintainable and “Best Practice” JavaScript

If you are writing JavaScript but not using something like Coffee Script, TypeScript or Script# then you are missing out on hours of productivity and a far more pleasant js coding experience.

Coffee Script has been around for a while now but I put off learning it because I didn’t want to add yet another layer of tools/languages into my already overflowing brain.  But thankfully I’m on a project where we are using TypeScript and I think it will have a similar type of productivity impact that tools like ReSharper have.

TypeScript is a JavaScript compiler and static typing extension for JavaScript.  When you write TypeScript it compiles to JavaScript at runtime but provides you static typing during development.  You can write plain JS right next to TypeScript because TypeScript extends JS.  You get things like Interfaces, Classes and Inheritance… not to mention typed parameters, properties, etc.

In my first experience with TypeScript I took a gnarly (but “best practice”) JavaScript module that was 200 lines to provide the exact same functionality in just 100 lines.  To be fair the outputted JS was about 200 lines but the point is the TypeScript file (which I maintain) is only 100 lines!!!  This is a huge complexity reducer and productivity booster.

I think I’m sold.

Get started with this great video from Anders Hejlsberg on Channel 9.

P.S. How does TypeScript play with JQuery, Knockout and other libraries you ask?  Well, anything you write runs as JavaScript — but if you want all the auto-complete and static type checks then you’ll need the “Type Definitions” for each library… thankfully there is an awesome project which provides these for virtually any popular JS library.

https://github.com/borisyankov/DefinitelyTyped (or on Nuget)

UPDATE:

Scott Hanselman has a great post on TypeScript that you should checkout.


git is awesome

The natural source code management system for me is TFS because it’s a Microsoft tool and has very good integration with Visual Studio.  It also has a useful ALM component which pulls everything together.  I’ve used TFS since it’s first version and through the most current 2012 release.  It’s useful but it has its problems.

Last year I began using git for one of my projects.  I didn’t necessarily pick git itself but rather GitHub which offered amazing pricing on managed remote/distributed source control.  I struggled a bit in the beginning — as I think most people do — but recently I hit a point where lightbulbs turned on, the seas parted, and I think I am becoming proficient (not an expert) with git.

The reason git is great is because it is very difficult to do something you can’t undo — perhaps this is why it’s more complex than others too.  Once you learn some of the terminology and methodology of key commands you begin to “become one with git.”

Anyway, I encourage you to check it out if you haven’t.  I’m thinking of posting about specific scenarios and commands in the future.


MVC & jQuery

Started digging into MVC3 and jQuery this weekend… FINALLY!  So far it’s been quite surprising — I think Microsoft (or better stated ASP.NET) is getting it right!

Having worked at a Microsoft shop for the past 3 years I’ve gotten used to the trap of web forms and LOB web applications.  Worse, I’ve spend 18 months concentrating on desktop and mobile smart client development so my web time has been limited.  I’ll admit I’ve gotten a bit rusty — but that’s easily corrected.

As a way back into the swing of things I’m trying to port an under performing desktop application into an MVC website.  The biggest challenge has little to do with MVC actually and more to do with integrating legacy components which make hazardous use of WinForms UI.

More to come…


This is one of the many reasons I love my wife… Soapian Frugality.  I bought the bottle on the right for around $7 because it smelled good and caught my eye in the store—it did a lousy job cleaning our hands.  She, on the other hand, bought the bottle on the left for $1.79.  It smells great (almost the same as mine) and does a great job cleaning our hands.  I’d be broke without her, in so many ways.

This is one of the many reasons I love my wife… Soapian Frugality.  I bought the bottle on the right for around $7 because it smelled good and caught my eye in the store—it did a lousy job cleaning our hands.  She, on the other hand, bought the bottle on the left for $1.79.  It smells great (almost the same as mine) and does a great job cleaning our hands.  I’d be broke without her, in so many ways.


Red River Regional Dispatch went live on our software just before 7 am this morning.  Things are looking good after 12 hours of operations including a major police incident which occurred minutes after go live. View Larger

Red River Regional Dispatch went live on our software just before 7 am this morning. Things are looking good after 12 hours of operations including a major police incident which occurred minutes after go live.


Google: Self-driving Cars Are Here! →

I first learned about Google’s concept for fast driving cars a few months ago.  Apparently they moved quickly from rough concept to (well) working prototype.  I am very impressed with this particular product and I think we will be hearing a lot more about this next year.

The thing I like most about this is how Google seems to be so self-aware.  Instead of Google thinking of itself as a “search company” they are smart enough to realize they are a “solution company”.  They are working on solving problems like transit… but more importantly the ridiculous time waste we call commuting.

If Google can help us gain back the 15, 30, 60 minutes it takes to get to work or to the store they would be solving a huge problem.  But what’s in it for Google?  Well, they are everywhere else (web, phone, tv) but they aren’t in our car (yet).  Imagine a full voice-recognition experience with directions, online music, search, movies, etc — all while your car carefully and with greater fuel efficiency, escorts you to your destination.

Hello future, pleased to meet you.


Big Bang in Fargo… Epic Go Live!

I’m heading to Fargo, ND this Friday for a customer go-live that will include over 14 public safety agencies and virtually our entire product suite.  It gives new meaning to “Big Bang”.

With 22 people onsite spread across 2 states and numerous cities we need to be smart about how we handle communication.  We have a command center setup that will receive and coordinate all important communications and serve as a central point for issue response and overall command/control.

How does your company manage large go lives?

If the prep stuff goes well I may have some time Saturday mostly to myself… thinking about checking out some of the locations from the movie.

image

We’ll be careful to watch for wood chippers…


Great post from Bryce.VC.  Jack Dorsey, co-founder of Square, gives a talk to Stanford on how he got started and his philosophy on leading business.  This is just a 3 min excerpt… I’m watching the full lecture whose link you can find from Bryce.VC.

(Source: bryce.vc)


If you can get past the wholesome family cheese, The Waltons is a great escape from today’s “me” generation of television.  Reminds me that families can be great… Jenni got me hooked on it. 

If you can get past the wholesome family cheese, The Waltons is a great escape from today’s “me” generation of television.  Reminds me that families can be great… Jenni got me hooked on it.