Thursday, April 30, 2009

The porn analogy

The other day a big storm arose in a Rails-sized tea cup about a presentation that used pornography (albeit softcore) as both an analogy and as slide material when talking about CouchDB.

I'm not going to go over the arguments about the offense caused by the presentation, but I think a point that's been largely missed is that using pornography as an analogy isn't just offensive to some, it's actually incorrect. So you both offend people by using it and fail to get your point across.

Why?

Pornography is fake.


When you say that "X is like a porn-star" you are implying that X is faking it. So when you say that CouchDB performs like a porn-star you mean that it's phony.

If you need a people analogy for your tech product, you should probably go with athletes. They actually do perform well, make a large amount of money, get respect from a wide community, work hard to get where they are, have impressive physiques, etc.

Another porn analogy is something called 'geek porn'. Just a few minutes ago Tim O'Reilly retweeted:

via @paulsalazar: Geek porn-big data statistics on Greenplum at eBay. 6.5 petabytes. 50 terabytes/day. 96 nodes. http://bit.ly/O0Wya

I agree that that's a lot of data and that's it's very exciting (for a geek like me) to see inside eBay's datacenters and understand how much data they are handling. But is it porn?

Pornography's aim is to sexually excite the viewer. Are geeks sexually excited by the eBay data? I'm not (but I'm just one data point). But I do get a lot of pleasure from the eBay data.

And pleasure comes from many things that are non-sexual such as eating, listening to music, doing exercise, or achieving a goal.

So let's swap 'geek porn' for a 'geek feast'. I'm happy to feast my eyes on the eBay data. It fills me up with fascinating information and makes me hungry to be able to work on data sizes like that.

And finally the other problem with using the word 'porn' when there are viable, better alternatives is that there is the risk of offense. Many people are uncomfortable with pornography and don't want pornography analogies in professional work. Why risk offending people you are trying to communicate with?

Labels:

Monday, April 27, 2009

Adding a # key to a British keyboard on a Mac

The British keyboard layout on the Mac was not designed for programmers. Real programmers need the # key and on US keyboards it's SHIFT-3. On the British keyboard layout SHIFT-3 is the £ (pound sign).

You can access # from 3 by typing ALT-3 (which some people call OPTION-3) but that just feels weird.

Happily, British Mac keyboards have a totally useless key just to the left of 1. You know the one, the one that has § and ± on it. I cannot recall ever having needed to type the section sign (I guess that's something lawyers want) or the plus/minus sign, so that key is up for grabs.

To remap it it's possible to use the program Ukelele to alter the keyboard layout so that the # sign is typed by that useless key.

Or if you are lazy you can just download my keyboard layout and install it in /Users/<you>/Library/Keyboard Layouts and then select it from the International menu on the Finder bar.

If the menu with the British flag on it is not available you can switch it on from the Input Menu section of the International pane in System Preferences. If the new keyboard layout (called British for Programmers) is not available in the drop-down menu, select it from the Input Menu section of the International pane and click the check box.

You will need to reboot your machine after copying the file into place.

Labels: ,

Wednesday, April 15, 2009

The Geek Atlas World Map

Here's a map of all the places in The Geek Atlas:



Once the book becomes available I'll make this navigable.

Labels: ,

Wednesday, April 01, 2009

The JavaScript Tsunami

If you are currently building rich Internet applications in Adobe Flash, Flex, AIR, Silverlight then it's time to realize that these technologies are about to be overwhelmed by The JavaScript Tsunami. Once considered to be a lame language used for rollover effects, JavaScript is about to become the most important programming language of all.

OK, I overstated my point there, but it's important to realize that a confluence of events is raising JavaScript's importance. JavaScript is undergoing an Innovator's Dilemma pattern: it's a weaker language than Java and it isn't as graphically capable as Flash, yet it is growing fast because it works in the browser environment and because people are demanding fast, rich, browser-based applications.

Here are a few of the reasons:

1. The Web Browser Won

If you are writing a new user-facing application today your default should be to write for the web browser as the platform instead of for a specific operating system. Although there are painful differences between browsers, the web browser on a recent computer is fast enough for most of the applications that people use.

Although desktop applications may be necessary where very high-speed processing is needed (e.g. for an application like Photoshop), most people are doing mundane things with their machines (such as browsing the web, reading email, instant messaging, editing documents) and those things can be achieved in the browser.

Given the death of the Java applet, it's a choice between a plug-in (like Adobe Flash) or JavaScript. Since JavaScript is the native language of the browser its performance is likely to outstrip the plug-ins (this is especially noticeable at load time when plug-ins have to initialize). Ultimately, native languages talking to native APIs tend to win.

Even Microsoft, who was always a bit of an outlier in the JavaScript world, is falling into line with Internet Explorer 8.

2. The Browser Speed Arms Race

JavaScript speed is important. It's so important that the major browser producers are in an arms race to speed up their JavaScript performance. Google Chrome has their V8 JavaScript Engine, Apple Safari has SquirrelFish, Mozilla FireFox has TraceMonkey and Microsoft and Opera are both optimizing their JavaScript engines.

And there are performance benchmarks for comparing browsers.

All this means that JavaScript performance will continue to improve.

3. JavaScript Goes Pro

JavaScript is a laughably badly designed language. And many JavaScript developers are webmasters turned coders. It's the Perl of the 21st century.

Or is it just a language that's sufficiently different from all the others that it's misunderstood.

It's actually a bit of both, but as JavaScript: The Good Parts points out, "There Is Still Good in Him, I Can Feel It!". Inside the messy exterior there's a gem of a language.

As professional programmers come to understand JavaScript, the language, and examples of how to write JavaScript, will become professional.

4. The JavaScript Library Community

The JavaScript library community is large and vibrant, and it's free and open source. If you want to see the future of software it's usually best to go where the geeks go, and that tends to be open source projects where they can win respect through technical excellence.

And major companies are putting muscle behind these libraries with initiatives like YUI.

Compare that to the offerings in the Flash Exchange which are very commercial and focussed on designers not coders.

5. Adobe Flash is missing on the Android, BlackBerry and iPhone

Yet, JavaScript is present on all three without having to install anything. That means that your Flash application is automatically unavailable on the fastest growing web-based platforms out there.


If you are not trying to learn JavaScript now, you should be. JavaScript will be the web platform language and as libraries and implementations become faster and richer it will challenge and topple the plug-ins.

Labels: