Alexis Ohanian and the Open Internet

On Tuesday this week I went downtown to hear Alexis Ohanian speak at the StartLouis monthly meetup. His presentation was part of the Internet 2012 bus tour – a trip from Colorado to Kentucky in which Ohanian and Reddit general manager Eric Martin are documenting stories about the economic success of small businesses and startups that rely heavily on an open internet for their existence.

Ohanian’s crusade comes on the heels of some very bad internet legislation, SOPA and PIPA, that met tremendous resistance from the internet community because they sought to apply stringent regulation to internet providers in the name of protecting intellectual property, specifically copyrighted material, from being distributed without permission on the internet. In ignorance lawmakers crafted bills that required costly, drastic, or impossible changes to the structure of the internet itself in (what many believe to be) a futile attempt to curb piracy – changes that would necessarily limit freedom and destroy the open exchange of ideas, goods, and services that has yielded the richest economic bounty in modern times.

Alexis spent well over an hour talking about the people he had met on his tour: people who are using the internet to be producers, not consumers. He talked about family farms that are using the internet to coordinate sales and design new livestock feed; craftmakers who sell their hand-worked wares on Etsy; a robotic toymaker in Colorado that exports to a ravenous market in Austria; an auto manufacturer that builds cars designed on the ineternet at a fraction of the cost and time that it takes traditional automotive manufacturers to bring a car to market. Each story was a fascinating and powerful example of individual initiative and voluntary cooperation, and the common factor, the glue between each story, was the open internet. Armed with these amazing stories, Alexis hopes to show lawmakers that internet regulation is a horrible idea because for what little good it might do, it will necessarily destroy the free flow of information on which these emerging businesses depend.

Perhaps more important than his message about internet freedom (and it is a very important message) is his message about the most effective means to achieve this end, and it is: innovate, don’t legislate. By creating value on the internet, and by demonstrating the powerful returns that open exchange and open information can produce, we can convince large corporations that it is in their best interest to participate and promote the free flow of information. We use the carrot, not the stick; persuasion, not force. (This is, incidentally, part of why I oppose Net Neutrality laws.)

Though the topic was heavy, the evening was peppered with a great deal of humor. In what may only be called a heroic attempt, Alexis attempted to draw a corallary between the open internet and “flabongos”.

And in what may be the only known recording of a room full of nerds singing a Nelly song, Alexis invited us to help him “drunk dial” a tour donor as a thank-you for their generous donation.

That the internet matters now, more than ever, cannot be doubted. The Internet 2012 message is important. Freedom, voluntary cooperation, and individual initiative are the foundations of a civial and prosperous society. And more importantly, they are the paths to self-realization. All of us can be awesome; the internet has given us a glimpse of what that can look like. Politicians talk a great deal about “fixing the economy”, especially now that we are so close to a presidential election, but the truth is that legislation and force and silver tongues full of promises don’t create wealth or jobs. We do. And it is our great moral, life-affirming obligation to support and protect our freedom to do so.

Fun with C# and Node.js

A co-worker was looking for a nodejs module to generate UUIDs the other day, and it inspired me to write one that leverages C# to generate guids.  I wrote a simple C# class and compiled it with Mono as an executable.  It takes a single argument which is the number of guids to generate.  This executable is executed with the ‘child_process’ module that comes packaged with node, and receives its arguments from my node module.  The console output is then read and parsed, and returned to the calling JavaScript code. I am definitely interested in further exploring a possible bridge for C# mono assemblies in node.  It seems that others are as well.

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.