Category Archives: Uncategorized

A Bittorrent Dream last night

I had a dream last night (and I'm not making this up) that I went to the CBS.com website and was annoyed by a whole lot of pop-up windows
containing hash-key signatures for the Bittorrents of all their TV shows.

In my dream I thought “Gee, it's strange that a TV channel is offering Bittorrents of its shows”, but then I remembered reading about
how the TV channels were seeding Bittorrent with their own shows – including the advertisements – to combat people who were seeding the shows
without ads – or worse – with the advertisements replaced with other companies ads. Apparently a whole marketplace had sprung up around
remixing TV shows to with paid advertisements.

It wasn't until ten minutes ago that I remembered the dream and realized that it hadn't really happened.

Random thoughts coming from that dream:

  • I live in Australia (so I don't get CBS). However, over the last few months my wife and I been watching more TV (mostly The Amazing Race and
    The Apprentice – and Survivor, hence CBS, I guess) via Bittorrent than via our stupid TV channels here, since it takes them 6 months to show
    things that have been on in the US.
  • What happened in my dream actually makes sense. I suspect CBS does okay from licencing fees for Survivor, but it might actually make economic sense for NBC
    to loseWeight Exercise the licence fees for The Apprentice (which tends to show at random, late night timeslots here) and pick up the extra (Bittorrent) viewers for their ads.
  • What will the first Bittorrent TV channel start? The economics of it probably make more sense than a normal TV channel – production costs would be similar,
    but the capital investment would be much less.
  • Despite the fact I've been using Firefox for a year I still have an irrational fear of pop-up browser windows.
  • I can recognize a SHA-1 hash in my sleep.

Changing Jobs

After four years at my current employer I've resigned to do some new – still Java related – stuff.

It's been a good four years, I've learnt a lot (including a bit of Java programming) and worked with some very smart people. I think my biggest accomplishment was being able to hand over leadership of my old development team to another developer on the team and have it continue to function smoothly.

For those of you who have it, my work email address is now deprecated and I won't have access to it after Christmas. nlothian at apache dot org is the prefered way to reach me after then.

Jakarta Commons Transactions

More a note for myself than anything, but it does look to be a useful library:

Commons Transaction aims at providing lightweight, standardized, well tested and efficient implementations of utility classes commonly used in transactional Java programming. Initially there are implementations for multi level locks, transactional collections and transactional file access. There may be additional implementations when the common need for them becomes obvious. However, the complete component shall remain compatible to JDK1.2 and should have minimal dependencies.

I believe that this is an off-shoot of the Jakarta-Slide WebDAV package. I do wonder why people continue to keep JDK1.2 compatiblity, though. I think even Websphere has moved on from that now, so I don't think there can be many environments left with only JDK1.2.

All Web Services should be run over HTTPS

If you are creating a publically available webservice, make sure it is available over HTTPS and encourage people to use the HTTPS version.

There are way too many badly behaved firewalls and proxies (from companies that should know better) that munge things in ways that are very hard to debug.

For instance (just as a totally random example that I swear has caused me no pain what-so-ever over the last few weeks…), Checkpoint's NG55 firewall has built in “Cross Site Scripting Protection”. Unfortunately, it failes to check MIME types, SOAP actions or ever the user agent header – it just blindly drops any content that contains various defined keyword. It's a stupid, stupid idea (especially since it doesn't seem to check unicode versions on the same strings) that is best protected against by running over HTTPS.

If you don't do that then when a client ever rings up and tells you that your software has broken and they are sure they didn't change anything now you have yet another thing to check for.

Damn it! This XML over HTTP thing was supposed to be easy.

Malcom Gladwell's writing

Ted Leung points to Malcom Gladwell's essay on Ketchup.

I hadn't realized until now, but Gladwell also wrote two of my favorite articles: The Naked Face (about reading involuntary facial expressions) and Blowing Up (“How Nassim Taleb turned the inevitability of disaster into an investment strategy”)

In the summer of 1997, Taleb predicted that hedge funds like Long Term Capital Management were headed for trouble, because they did not understand this notion of fat tails. Just a year later, L.T.C.M. sold an extraordinary number of options, because its computer models told it that the markets ought to be calming down. And what happened? The Russian government defaulted on its bonds; the markets went crazy; and in a matter of weeks L.T.C.M. was finished. Spitznagel, Taleb's head trader, says that he recently heard one of the former top executives of L.T.C.M. give a lecture in which he defended the gamble that the fund had made. “What he said was, Look, when I drive home every night in the fall I see all these leaves scattered around the base of the trees,?” Spitznagel recounts. “There is a statistical distribution that governs the way they fall, and I can be pretty accurate in figuring out what that distribution is going to be. But one day I came home and the leaves were in little piles. Does that falsify my theory that there are statistical rules governing how leaves fall? No. It was a man-made event.” In other words, the Russians, by defaulting on their bonds, did something that they were not supposed to do, a once-in-a-lifetime, rule-breaking event. But this, to Taleb, is just the point: in the markets, unlike in the physical universe, the rules of the game can be changed. Central banks can decide to default on government-backed securities.

Blowing Up

Struts Shale Proposal

It concerns me a little that the Struts 2.0 (Shale) proposal is tied to the Servlets 2.4 spec. I'd prefer to see it abstracted away from the servlet spec so it could provide better support for Portlets.

One day I mean to write about how annoying the Portlets spec is to integrate into an existing MVC framework because of the way it already has its own semi-MVC API (the do* and processAction methods). It is possible – the Spring Framework portlet support has had a few more advances since my patches – but generally it makes it difficult because of how tightly most frameworks are tied to their own dispatching mechanisms

The first two laws of Software Engineering

From a guy at work:

The readability of generated code is inversely proportional to the readability of the code which generated it.

The first law of software engineering (and until I heard the one above the only one I thought existed) is:

((U+C+I) x (10-S))/20 x A x 1/(1-sin(F/10))

(See also http://www.news.com.au/common/printpage/0,6093,11009375,00.html
for an expanded explaination of that formula..)

Seriously, though – is it better to have readable generated code or readable generation code?

Got bandwidth problems?

A few people have been complaining about the bandwidth things like PodCasting take up ( Duh!).

I'd recommend they look at using the Coral cache. If you haven't tried it, it is a free content distribution network (think Akamai). It does run on port 8090, so people behind some firewals can't use it, but for for a lot of people it will both give them quicker downloads and save you bandwidth.

For instance, the Coralled version of this page is http://www.mackmo.com.nyud.net:8090/nick/blog/.