Great things I’ve never done

I regularly have ideas that are impossible, or forget within hours, have no clue how to implement, or no time, or all of the above. I really should make a list.

  • A squeak wrapper around the Gecko HTML rendering engine.
  • A simple, high quality probabilistic gossip based P2P framework (I actually started a Java version but got bored).
  • A tuple space implementation on top of the aforementioned simple P2P framework.
  • A mobile-code mechanism for the tuple-space, so arbitrary tasks can be submitted. The Jini model uses jars downloaded from a webserver, which isn’t really ‘grid’ enough somehow.

Programming as Literacy

In what’s typically called ‘the western world’, before literacy became essentially ubiquitous it was limited to a select few. Monks originally, then scribes. These individuals possessed a truly remarkable skill. They could make marks on paper that could remember things. They could capture information and retrieve it later. Associated with this skill was the ability to make marks that could perform complex computations and produce an answer. People with these skills were hired by nobles and merchants to increase business value.

You know what I’m going to say next of course.

Programming appears to have many parallels with literacy in medieval times. It is a somewhat arcane skill known to a select few, who typically put that skill to use for others in return for remuneration. There are very few scribes left nowadays, although I’m sure at the time they felt that as there would always be a need to write things down, that there would always be scribes.

It’s not technical

A counterpoint to this post from my colleague Sam.

It’s not technical. Languages don’t succeed for technical reasons. If this were true we’d all be programming in Lisp and Smalltalk. Java became popular by riding the internet (specifically the web) wave. .Net became popular because Microsoft have billions of dollars to spend on marketing. Both of these platforms have something in common – they are aggressively marketed by a big industry name.

Write once, run anywhere. Sun coined the term, and successfully won the mindshare. Developers working in Lisp & Smalltalk wondered what was so special about that.

Garbage collection. Most work in garbage collection was done in the 70’s and 80’s (possibly even earlier – Lisp has been around since the 60’s). Again marketed heavily by Sun, while the aforementioned Lisp and Smalltalk programmers looked on nonplussed.

Lisp didn’t take over the world because (to my knowledge) there was no big name vendor marketing it, and everyone outside the Lisp community thought it was just for AI.

Smalltalk didn’t take over the world because of infighting between vendors, and a failure to see the threat of Java. They were too busy competing with each other to notice that Java was about to swamp all of them.

Having said that, there are places where Smalltalk and Lisp are thriving, and those companies are more than happy for everyone else to remain distracted by Java and .Net while they consistently outperform them in time-to-market of new features.

Immovable Type

Looks like the Sixapart, the creators of Moveable Type, have gone all commercial and VC funded on us. I look forward to explosive growth followed by burnout, collapse and recrimination. Maybe they’ll get lucky and be the 1 in 10 that make it.

Freaky Friday

Woke up this morning convinced, convinced it was thursday. Someone on the tv just mentioned that it was friday, and it was like I’d been given a huge and unexpected present. Bonus. What a great way to start the day.

Can your Rails do this?

Don’t get me wrong, I love Rails. Its great to see something that isn’t .Net or Java gaining traction. ThoughtWorks has an internal mailing list about it and the traffic has been impressive so far.

Its just that now more than 25 people have heard about it, well, it feels like its gone all mainstream.

So I’m splitting my cool-new-dynamic-language-based-web-application-framework bandwidth between Rails and Seaside.

Today I saw something in Seaside that gave me one of those ‘Dude, that so totally rocks‘ moments.

There’s an innocent toolbar option in Seaside called ‘Toggle Halos’ that switches on a visual representation of the components on a page, with some icons for each one. One of the icons looks like a spanner (wrench), and when clicked on, shows you the code for the component in your browser, and lets you edit it!

Oh yes. Welcome to really rapid application development.

We need one of these

The software industry really needs an equivalent to Perry’s, the chemical engineering reference guide. This book more or less contains all the information needed to build your own functioning oil refinery or other chemical engineering construct.

One thread per cpu

Hyperthreading notwithstanding, one thread per cpu will give you the highest application performance. Having more than that means context switching and contention, which means the cpu is spending time on tasks other than running your program.

For this reason, the fastCGI approach to web application servers is definitely a good thing – prefork a fixed number of single-threaded processes to handle requests, one per cpu.

So why spawn more threads or processes than cpus? Blocking. If a thread blocks, its out of action until the thing its waiting for is ready. With 1 thread per cpu, if a thread ever blocks, thats a whole cpu idle. To implement an application that never blocks, especially when it needs to make network calls (eg. to a database), or read files, is more challenging than doing the same thing with blocking calls and many threads.

CyUnit

Bought the 1st series of the remade Battlestar Galactica yesterday. Much darker and edgier than the original. None of the characters appear to be all-bad or all-good, and most of them have ‘issues’ of some kind.

One of the characters was working on a Cylon detector (Cylons are the bad guys, robots that look like people and want to wipe out humanity, although some are programmed to think they’re human), and there’s a scene where we see the UI for the first time: red bar / green bar!

Introducing CyUnit. Red bar, failing test, you’re a Cylon. Green bar, you’re human. Made me laugh, geek that I am.

Cool technology, bad name

The combination of DHTML, Javascript and XMLHttpRequest has been making weblog headlines recently. My experience with it predated the hype by about 6 months (we were porting a rich client system to the web and hit upon using XMLHttpRequest specifically as a solution to some of the responsiveness issues). I was a little slow to realise just how unknown the technology was in the wider world, but I don’t mind that, so much as the appalling name its come to be known by.

Ajax? It sounds like a brand of detergent. Oh wait. It is.