The community on STL ALT .NET

STL ALT .NET members were recently given the chance to win free tickets to the St. Louis Days of .NET conference in August by writing (and tweeting) a blog post about the group, what they have learned, and why they enjoy attending. Here are the winners!

Maintainable JavaScript (book review)

Maintainable JavaScriptJavaScript has, it seems, finally come into its own, and with its new immense popularity, attracted the attention of opinionated writers of every ilk. The latest book in O’Reilly’s growing collection of excellent books on all things JavaScript – _Maintainable Javascript _by Nicholas Zakas -- is a worthy addition to the cannon, not because it brings anything new to the table per se, but because it consolidates a lot of different source material into a roadmap of sorts, useful for two primary target audiences: 1) developers who are new to JavaScript development but are otherwise familiar with traditional software practices such as unit testing, continuous integration, structured builds, etc., and 2) casual JavaScript developers who have probably hacked some jQuery in the browser but are really interested in what all the cool kids are doing now. Zakas, a former Yahoo employee with blood, sweat and tears invested in YUI, has divided his work into three parts, two of which are augmented by detailed appendixes. The first part covers JavaScript style guidelines, and is really a cross-section of The Gospel According to Douglas Crockford (a.k.a., The Good Parts), and YUI, jQuery and Dojo recommended coding conventions. The JavaScript community is anything if not opinionated, and the division over minutia really shines in this section. Zakas stresses that, “[r]ather than trying to force my preferences upon you, this [section] highlights important aspects that should be covered in your style guidelines.” He notes that his own personal heresies can be found in Appendix A in case the official dissension isn’t enough. Though I troll, the material in section one is still pretty important. Zekas is right when he claims that teams should make an effort to follow consistent guidelines (regardless of _which _guidelines they happen to prefer). Style variations in big projects can be a source of confusion at best, and costly bugs at worst. There are many conventions on which JavaScript community leaders agree, and when they differ, it is often obvious that preference, not actual danger, is the driver. Seasoned developers will feel at home reading about formatting, commenting, proper statement and expression structure, and how to property declare variables and functions. For junior folk, or those new to the language, these conventions can be invaluable specifically because JavaScript behaves in ways that are occasionally surprising (e.g., variables are scoped at the function level, not the block level, so variable declarations can be trickier than most other languages). In part two, Zakas examines some best practices for writing JavaScript code. There is less subjective material here, mostly because “best practices” in JavaScript are like guard rails on a highway. They are not there for aesthetic appeal, they are there to save your life. Veteran JavaScript developers know how malleable JavaScript code can really be and prefer to prevent accidents rather than recover from them. Zakas discusses the dangers of global objects, the problems with type coercion and equality checks, when and how to safely modify objects, best practices for throwing and handling errors, and several other topics (like separation of concerns) that, while not particular to JavaScript, remain treasured as received wisdom. Part three is not so much about JavaScript code as it is about structuring and running a JavaScript project. Most developers first experienced JavaScript as a second-hand language used to manipulate web pages but otherwise, considered it inconsequential. JavaScript is now a first class citizen among languages, though, and as projects increase in size and complexity, a number of tools and practices have emerged to make managing those projects easier. Zakas starts this section by discussing a build process, for which he chose the well-known tool Ant as a demonstration candidate. The build process forms the backbone of each chapter in this section, as each topic relates to the build process in some way. A few salient chapters cover common browser needs, such as file concatenation and minification, and several others cover universal concerns such as automated documentation and automated testing (both unit and integration). Zakas covers a primary technology in each chapter (e.g., JSDoc toolkit for automated documentation) but provides a very useful, fairly comprehensive list of alternatives in an appendix. The final chapter in this section looks at the total build configuration with all moving parts – a very useful ten-thousand foot view of a large-scale JavaScript project setup. _Maintainable JavaScript _is fairly short, and quite enjoyable, although I feel that it does repeat a great deal of content from Crockford, et al, especially in the first two sections. This is not necessarily bad, but if the reader is already familiar with the opinions of these community leaders, it would be acceptable (and beneficial) to forego the first two sections and jump straight to section three. The appendices are also useful for all readers, regardless of previous exposure. JavaScript virgins would do well to pay attention to all sections, however, and would also do well to read Crockford, if only for his more esoteric explanations of JavaScript’s quirks and goods. Zakas does a good job making this information accessible and concise, and his inclusion of alternative perspectives provides a wider view of the community as a whole. If you’re new to JavaScript, or you’re looking to stand up your first significant JavaScript project, invest in this book. It is money well spent.

Browsers on Twitter

I combined screenshots of the four major browsers on Twitter. The results are very interesting from a social media perspective:

  • IE tweets the most (followed by Firefox, which tweets about 1/3 less than IE)
  • Firefox by far follows the most tweeps
  • Firefox has the most followers (followed by Chrome and IE, which are comparably close)

Browsers on Twitter

(Click on the image for a hi-res version.)

Mindscape sponsors STL ALT .NET

Mindscape Code Monkeys love their tools. From the gruffest Unix hacker who can outperform a concert pianist in Emacs keystrokes, to the coolest Metro vegan hippy in Redmond, developers will go to religious lengths to prove their undying affinity for the software that makes their lives, their jobs, easier. Mindscape is no novice on the field of tools and controls. Not only does Mindscape produce an impressive suite of standalone development products, they offer an assortment of helpful Visual Studio plugins, many free of charge, to the Microsoft community. Want to dress up WPF or Silverlight? How about design an NHibernate persistence solution? Interested in Windows Phone 7, or maybe SimpleDB? Mindscape has tools for all of these, and more. Mindscape has generously offered to donate one standalone product license each month to raffle at STL ALT .NET, as well as one Mega Pack license for any group member who delivers a full presentation! In addition, in July we will be raffling one additional license for the WPF Elements 5.1 launch this month. Follow @MindscapeHQ on Twitter for additional product information and release announcements.

Pluralsight sponsors STL ALT .NET

Pluralsight Developers experience the unique challenge of being afloat in an ever-changing sea of technology. Their survival depends a great deal on keeping abreast of the latest currents, trends, and changes. Nothing helps a developer more than the experience of other professionals distilled into a readily consumable medium. Pluralsight, a leading champion of video-based technology training, has compiled an extensive library of videos created by first-class technical authors to help developers of every ilk further hone their craft. Pluralsight has donated twenty-five monthly subscription cards to be raffled at monthly STL ALT .NET meetings. Each subscription card will grant each winner one month of unlimited access to the Pluralsite training library. Videos covers popular .NET topics such as:

  • ASP.NET
  • C#
  • Entity Framework
  • F#
  • LINQ
  • NHibernate
  • Visual Studio
  • WCF
  • Windows Azure
  • WPF
  • etc.

In the true spirit of ALT .NET, Pluralsite also offers training beyond the Microsoft stack, with videos on topics like Ruby, Clojure, iOS, Android, JavaScript and jQuery. If you’re interested in new video releases, or other offers from Pluralsight, you can follow @pluralsight on Twitter.

footnote.js

A few days ago I released a small open source jQuery plugin called footnote.js. The idea for this plugin came to me as I was writing an article on postal.js (coming soon!). I was adding some footnotes, and as I re-arranged text in my html document, I had to re-arrange the footnotes to match the order of the superscript tags in the document. As you can imagine, this is a colossal pain in the ass, so in a fit of inspiration, I hacked together a jQuery plugin to manage this for me. In short, when the document loads, it reads the order of superscript tags in the DOM, then reorders the items in an ordered list (the footnotes) to match. It also re-numbers all of the superscript tags and creates hyperlinks to the corresponding footnotes. It does make some assumptions (e.g., that you only have one list of footnotes), but I was striving for the simplest use case, so it is what it is. Forks and pull requests are welcome, if you feel inclined.

A Book Apart sponsors STL ALT.NET

When I ask my web UI friends what resources they would recommend to a n00b looking to develop his HTML and CSS chops, the near universal answer is to direct me to the wonderful websites A List Apart and its publishing arm, A Book Apart. For years these websites have been delivering high-quality, non-trivial articles and books on front-end web development and design. They are universally acknowledged as accurate, if not authoritative, sources of knowledge, and have been a tremendous help to me in my professional career. A Book Apart has graciously donated one copy of each book in the Complete A Book Apart Library to be raffled during the next several months at STL ALT .NET meetings:

_Each volume is a concise and fresh take on an important field in web design. Jeremy Keith’s HTML5 for Web Designers explores what the web’s new lingua franca means for working designer/developers. Dan Cederholm’s CSS3 for Web Designers shows how you can design for the experience layer today. Erin Kissane’s The Elements of Content Strategyexplains where content strategy came from, and how you can do it well. Ethan Marcotte’s Responsive Web Design demonstrates CSS techniques and design principles for crafting fluid, responsive websites. Aarron Walter’s Designing for Emotion will teach you how to you make your users fall in love with your site, while Luke Wroblewski’s Mobile First will make you a master of mobile, and improve your desktop designs, too. _

Mobile First and Responsive Web DesignI personally own digital copies of each book in this series, and I’ve finished three of six. Of particular interest to me were Ethan Marcotte’s Responsive Web Design and Luke Wroblewski’s Mobile First. Both of these books take a long look at the current state of mobile web development, and make a compelling argument that not only should developers be aware of the issues and technologies involved with the mobile web, but they should be coding their websites to take advantage of those things right now. Mobile first design – once onerous in CSS2 and HTML4 – is becoming the standard design approach as mobile phones and tablets saturate the consumer market. Mobile First makes the technological and business cases for embracing the mobile web, while Responsive Web Design shows how this can be achieved with fluid layouts, flexible images, and CSS3 media queries. I have nothing but the highest opinion for A Book Apart, and I am excited that STL ALT .NET members will get to experience this awesomicity as well!

LINQPad sponsors STL ALT.NET

LINQPadI remember when LINQ was the new hotness. When developers realized that they could stop writing `for` and `foreach` loops to farm data from collections. It was a magical time, full of unicorns and rainbows and such. In this midst of this bliss Joseph Albahari, author of the excellent C# in a Nutshell, released a small program called LINQPad that functioned as both a pseudo-C# LINQ REPL and a light-weight frontend to SQL Server (via LINQ2SQL). Using LINQPad was (and still is) a great way to explore the LINQ API without breaking actual production code. Since those early days, LINQPad has grown to support all of the major LINQ technologies and other data providers, including:

  • Entity Framework
  • LINQ to XML
  • Parallel LINQ
  • OData
  • WCF Data Services
  • SQL Azure
  • and many more!

In addition, LINQPad can also serve as an F# REPL, for those of the functional persuasion who would like more flexibility than FSI provides. LINQPad is also extensible. When I worked with Josh Buedel, he created a plugin for LINQPad that queried an XML web service exposed by an online billing provider that we were using at the time. Using LINQPad, we could write LINQ queries against the service endpoints as if they were object collections, which made debugging service issues and generating ad hoc reports a breeze. While LINQPad has always been free, users who wanted auto-completion, Reflector integration, smart tags, code snippets, etc. paid a premium fee for the Pro version of LINQPad. Mr. Albahari has generously donated two Pro licenses to STL ALT .NET, which will be raffled to members in the coming months. Two lucky winners will walk away with great software that no .NET developer should be without!