The Future of Javascript — Who Cares?!?

Yesterday on Slashdot, someone posted an InfoWorld interview of Brendan Eich (the creator of JavaScript).  In the interview he lays out his plans of the evolution of JavaScript into what he calls JS2.  The discussion on Slashdot was over the details of whether the language changes made things better or worse.  The thing about programmers is that they won’t all agree on anything.  Everyone has their own understanding of how software should be written.  My critique isn’t on any of the details of the language changes, its the premise itself.

First of all, let me say that I don’t believe JavaScript to be the Holy Grail of languages.  It’s not perfect, there are things about it that I find irritating.  There are also things about it that I like.  This is true of any language with any competent hacker.

Why JavaScript Matters:

More and more software is being designed to run “in the cloud”.  The benefits are obvious.  Deployment is trivial, as are upgrades.  Developing for the web means not having to care about the users’ platforms.  Connectivity is becoming faster and more ubiquitous every day.  JavaScript matters because it is the language of the web.  It excels not on technical merit, but out of necessity.

In the 1990s, Netscape was in a unique position.  It essentially owned the web platform.  Whatever they decided became standard.  When Microsoft built IE, they had to include JavaScript support so their browser could compete.  Every new browser since then had to include a JavaScript engine.

In todays market, every computer has a web browser and therefore has a JavaScript engine.  JavaScript matters for one reason, and only one reason: it is ubiquitous.

Why JS2 Does Not Matter:

Although Mozilla acts as if they inherited Netscape’s mid 90s status as keeper of the web platform, this is not the case.  They say that it doesn’t matter is Microsoft adopts JS2 or not, they’ll just write an IE plugin.  This may work to increase JS2 adoption, but it doesn’t actually solve any real problems.  JS2 is a solution looking for a problem.

When building TileStack, my main problem with JS isn’t some language feature (native classes, typed variables, etc.) it’s the lack of consistency between browsers.  Granted this isn’t something the Mozilla Foundation can fix, but a new version of the JS language does more harm than good in this context. 

Why JS2 is Harmful to Mozilla:

While Mozilla has the best of their JavaScript team busy writing new language features, the competition is getting tough.  Apple continues to push the limits of WebKit.  The next version of Safari will smoke the competition when it comes to JS performance.  They are packing so much stuff into the browser, that web developers will start to question the need for Flash.  Meanwhile, Mozilla is working on the syntax for the “let” keyword.  Hey Mozilla, where’s mobile FireFox?  How come the poster boy for open source isn’t part of the first open source mobile phone platform (Android)?  Congratulations on all the downloads of FireFox 3.  Too bad it’s killer feature is that it doesn’t suck down resources like FireFox 2.  Wake up guys, you’re starting to lose!

I guess the point is that language syntax is one of the least important features of a platform.  Do developers use .Net for C#’s syntax?  Is Objective-C’s syntax the reason for Apple’s recent successes?  Will the declarative structure of JavaFX Script save the Java platform?  I could go on with more examples, but I wont.  The answer is a resounding NO!  There are much more important things to ensuring the success of a platform than language syntax.

I suppose this doesn’t really need to concern me.  The web as a platform will continue to exist and grow and mature.  It’s just frustrating to observe this waste of time and energy.

UPDATE: I want to give credit where credit is due.  My colleague Josh Gertzen was quoted in AjaxWorld magazine on the irrelevancy of JS2 in an article that ran on Slashdot for a while.

Sending Legitimate Bulk Email

This is for all those people who are trying to run a web business that need to send bulk email messages and don’t want them to go directly into their recipients’ spam folders.

Yesterday, I (and several others) dedicated several hours to the task of determining why every email we sent went directly into the spam folders of those we were trying to reach. When you search Google for information about spam filters, you find plenty of information about blocking unwanted email, but hardly anything about making sure your legitimate bulk email is not discarded with the trash. We were able to solve our issues, and so I thought I’d share our findings with the community.

  • Send only plain text. Attachments and HTML content raise flags with content filters.
  • Set the message header: “Precedence: bulk”
  • You must set a subject, body, from address, and reply-to address (not having reply-to was my problem

In addition, if you are hosting your own mail server you should:

  • Publish an SPF record in your DNS configuration
  • Configure your MTA to and DNS to use DKIM. (Acronyms FTW!)

I hope this info is helpful to someone. I wish I had it.

Sources:

ThinWire 1.2 Release Candidate 2 Available Now

ThinWire, the framework that provided my acclaim in the technology space, has just announced Release Candidate 2 of version 1.2 with promises of a final release within the week. This is very exciting news for anyone that uses the framework. It continues to get better and better over time. Congratulations Josh!

Download Link

Blatant and Shameless Book Promotion

Yesterday at OSCon, Prentice Hall announced the launch of the Sourceforge Community Press.  It is a special line of eBooks (called Shortcuts) that feature open source projects and are written by the developers themselves.

It is my pleasure to announce that one of the four titles available at launch is the ThinWire Handbook: A Guide to Creating Effective Ajax Applications, co-authored by yours truly.  It is available now for the price of $12.99 as a downloadable PDF, and it is also available through the Safari Bookshelf.

In the book, Josh Gertzen and I provide an overview of the entire framework.  Our goal is to describe the essence of each piece that makes up the complete framework, as well as to document features that may not be obvious to most developers.  So, if you’re into that sort of thing, go pick up download a copy, and start learning the awesomeness that is ThinWire.

Safari 3 For Windows — First Impressions

As soon as I heard the announcement, I downloaded the public beta of Safari 3 for Windows.  So far I’m pretty impressed.  The memory usage seems to come in between Firefox (the worst) and Opera (the best).  ThinWire, my web application framework, works beautifully.  Gmail works fine, but Yahoo Mail has some issues (I get lots of JS errors).

I did a quick performance benchmark.  ThinWire has a Grid component that can display lots of data.  I fired up my benchmark app for the Grid, and added 10,000 rows.  Here’s the performance results:

  • Internet Explorer 7: 1 minute 33.66 seconds
  • Opera 9: 27.93 seconds
  • Firefox 2: 23.24 seconds
  • Safari 3 Beta: 18.91 seconds

I realize that there is only approximately a 4 second improvment over Firefox 2 in this test, but 4 seconds is a lifetime in terms of waiting for a web application to load.

Also, while the Grid was loading, the rest of the app was still responsive; I could even start browsing and scrolling the Grid.Also, a quick look in the install directory reveals some interesting libraries.  WebKit was there as expected, but also CoreFoundation (Apple’s base C library) and CoreGraphics (the main OS X graphics library).  Very interesting.

How To Make Windows Update Not Hog the CPU

Every morning I come into work, plug my laptop in, and turn it on.  It quickly resumes from hibernation, and then forces me to wait for about three minutes while svchost.exe dominates the CPU.  This morning, however, the process never finished.

Several hours and searches later, I had my computer back as well as a new disdain for Microsoft Update.  Windows Update is a standard feature of every version of Windows since 98 (I think).  Starting with XP service pack 2, we gained the “option” to have the updates auto-downloaded.  This works fairly well.  The problem occurs when you opt to “enhance” your Windows Update and turn it into Microsoft Update.  It sounds like a good idea.  You get the Office updates and any other MS product updates.  Unfortunately the update process isn’t the most efficient.

As a software developer myself, I have learned restraint in criticizing others’ design.  I will, however, let the community speak out on this: [link]

Basically, whenever you start your machine, MS Update (via svchost.exe) checks every app that was installed with Windows Installer 3 to see if there are any updates available.  This takes forever.  I did, however find a fix, courtesy of the MS community forums [link].

Here’s what you do:

Now If only I could make Windows use less RAM.  (500 MB on startup vs 70 MB on my ArchLinux system at home)