Saturday, May 30, 2009

Dumping DDLs directly from the commandline for Grails apps. Brilliant!

Burt Beckwiths little script was brilliant. (this is the kind of brilliance that goes unrecognized by those who haven't spent a few hours banging their heads against the problem that this script solves. There are lots of issues like that in programming).

Tuesday, May 26, 2009

I don´t like databases

From my favorite irc channel:
rmz don't like databases
rmz: they are nasty
rmz: data should be stored in RAM, ergo sum
lmiw: Amen!
Nuff said.

Wednesday, May 6, 2009

Note to self: How to do integration testing

When writing integration tests in Grails. First construct the data objects, then save them (and get error messages when consistency rules are violated), then finally construct connections and test integrations.

Just a practical note to all Grails developers

As you all know, testing is good for you. But you know, in Grails it is not just good for you; You absolutely positively need to add tests for everything and you need to do it up front. No exceptions accepted and severe punishment metered out to those who fail to follow this commandment.

Why? Well Grails, wonderful as is, when running in production mode probablyhas the least intelligible error messages in the known universe. Usually (or at least usually in my case) they consist of a mile-long stacktrace containing references to null pointers and bad servlet contexts and other things that will give you exactly zero clue about what you have done wrong.

The unit and integration tests on the other hand will give you intelligible error messages, so for that reason alone you should write tests like it was your religious duty to do so, which it probably should be anyway, so just do it.

Monday, March 30, 2009

Nework investments

Just a short notice this time.  From time to time i hear an argument that can be roughly paraphrased like this:
Building broadband  network infrastructure is expensive, and unless infrastructure owners have some way of getting their investment back, the growth of the internet will soon stop, so we had better find some way of letting the infrastructure builders get more money or we'll all suffer in dialup hell.
... or some version thereof.  I won't argue directly against the fact that network hardware is expensive, because it is.   However I do want to challenge the definition of who the "infrastructure owners" are, and through that the conclusion that investment in network infrastructure is doomed to halt. The reasoning goes something like this:

  • The first premise is that network infrastructure is no longer limited to routers and wires.  P2p networks and other types of overlay networks are becoming an increasingly important part of the net's future.  
  • In addition to, and in part also as a substitute for wires and routers, the overlay networks use storage and processing in their infrastructure.  A big local disk can make the need for a fat pipe less pressing. Not only that, but a big disk in the neigbourhood makes the  need for a fat pipe out of the neigbourhood less pressing. 
  • This means that not only will investments in p2p hardware make an individual's service better, it will also make the community and internet as  a whole's service better.  
  • Add to this that storage is dropping in cost quicker than  wires (and to some extent routers), we see that there is an increasing incentive for end users to invest in cooperative overlay networks.
The conclusion of this line of reasoning is that the network will continue to evolve. Investment will shift gradually (but probably never completely) from wires and routers purchased as a service from an internet service provider, to processing and storage infrastructure owned and operated by end users, and used by users local (by some network distance metric)  to each other.

I just needed to write that down, because I believe it is important ;)



Wednesday, February 4, 2009

Skynet infrastructure is arriving on schedule ;)

IBM is apparently planning to deliver a 20 peteflops supercomputer in 2011. Now twenty petaflops is 20 * 10^15 = 2 * 10^16 operations. This amount of computational power might be in the ballpark for emulating a human brain: Matt Bamberger (who I found from a random google search, don't know much about him) estimates that you need about 20 petaflops. Singularity-guru Ray Kurzweil estimates [1 p. 71] that you need about 10^16 calculations per second. Kurtzweil estimates that 10^16 operations will be reached "early in the next decade" (sometime after 2010). This means that Kurzweil's estimate on when the (assumed) necessary computational power is available is right on track. There might still be a small matter of programming the thing to actually emulate a human, but within a decade or so it seems that we can have a proper hardware substrate for a Skynet implementation if we so desire ;)

[1] "The Singularity is near- when humans transcend biology" Ray Kurtzweil 2005 (2006 printing). Duckworth publishers.

Wednesday, January 28, 2009

Reading Google's tea leaves

Google isn't like other companies, at least not in every way (more below ;). One difference is that they usually do not announce their strategic intents very clearly, by normal standards. Interpreting their intent is a bit like reading tea leaves. You mix present world facts, history, guesses about the personalities of the involved people and hope to get an interpretation. The sources I look in daily are:
In addition I read other things, and talk to people. The thing to keep in mind is that Google is a very technical company, and in order to understand what they are doing one must understand a lot of technical details in order to make educated guesses about the intent behind the interest in those issues. I guess the average journalist or business analyst does not have these skills, hence Google's reputation for being very tight-lipped about their plans. I don't find them to be. I am very seldom (much) surprised by what they eventually announce. The thing is that Google does say a lot. Metaphorically they leave a lot of dots around in clear sight, but they leave it to us observers to connect these dots to form coherent pictures. Of course it helps if you can recognize what a dot is, and that you can read the technical literature to make educated guesses about what types of lines the particular dots tend to be endpoints for :-)

Right now I'm interested in Google the phone company, so I'm interpreting tea leaves every day to see what I can divine about the subject. The last few weeks a few things has popped up indicating that Google is preparing a massive onslaught on the telecommunications industry.

The facts:

Google already has the Google mail, Google Talk and Grand Central services established.

The Android mobile platform is really hot. I got my hands on a G1 developer handset last week, and apart from a few issues with battery lifetime that my contacts in the G1's manufacturer HTC assure me will not be present in production models, it is hot. There are a few warts and wrinkles but this is normal for all new phone models, and there is a sequence of upgrades planned (the first one called "cupcake") so I'm not really worried about this. Just about every major handset manufacturer except Nokia has announced that they are going to produce Android handsets. The apps in Google's appstore is, as expected, a mix of great and bogus. But there are a lot of great little apps there. I predict that Android will be a winner. In some ways the situation is similar to the PC market when Microsoft arrived with MS-DOS. Finally the coupling of handset hardware and software seems to loosen up, which in turn opens up for greater specialization in the industry, which in turn leads to better and less expensive products. To be sure, Nokia is the largest manufacturer (a billion handsets or so sold in 2008), but that doesn't matter in this picture: If most of the competent developers in this world create interesting and useful stuff for the Android, Nokia will be reduced to insignificance within five years (give or take a few years).

Then there is the case of Google's reductions and changed recruiting policy. They are closing down a bunch of engineering offices, firing temporary workers and axing projects. I won't discuss if this is a smart thing to do or not, but I will point out that the relatively anonymous Grand Central service does not seem to be affected by the reductions. It is a little like the dog that didn't bark in the Sherlock Holmes story. What doesn't happen can have greater significance than what does happen, and I think it has in this case.

Finally there is the rumor that Google is again considering to buy Skype. Skype has turned out to be a bad fit with eBay's other business, but I agree with eBay's assessment that it is a great standalone business. However, it is an even better business if combined with Google's offerings:

Grand Central is a great telephony product with superb configurability and call filtering, but it is currently only availalable in north america, still in beta, and has a limited user base. Skype is a great telephony product with world wide presence, it is so out of beta and mix traditional and IP telephony in a superb manner, but has very limited configurability and phone filtering opions. This is perfect complementarity if I ever saw it.

The chat and video conferencing options are more or less equivalent to what is available in Google Talk. There is some room for technical consolidation, and certainly no showstoppers when contemplating this. Complementarity, but not super-compelling.

Skype has recently announced a fairly decent mobile offering both for java based phones and Android. Google has a thoroughbred mobile effort. I'd say this is another perfect match. (Update: They didn't buy Skype, but bought Gizmo5 instead, cute move :-)

In conclusion

In sum, from a functional perspective, an aquisition of Skype could be of great benefit to both Google and Skype and would be a long step towards creating a world wide comprehensive phone service integrated with Google's infrastructure.

Google's growth in advertising revenue is declining, this means that Google is maturing as a company. Maturing companies as a rule see decerasing returns on their main product lines, but the market still impose an imperative of growth. One of the few sectors that is both a match with Google's core values and capabilities, and that has the kind of numbers that would make Google interested is the telecommunications industry. The Telecom industry is dominated by huge, mature companies that to a large extend depend on yesterday's technologies to deliver the day before yesterday's products (voice telephony on synchronous digital synchronous networks to be specific ;). I'd say this is also a good match for Google with its superb engineering capabilities, highly efficient internal infrastructure and an existing revenue base that will not be cannibalized by entering into telecommunications.

The way I read the tea leaves is that Google at present is pointing its guns at the telecom industry. They are doing so in broad daylight so everyone who looks can see, they are just not announcing it in clear text. The dots are visible, but we have to draw the pointing gun ourselves.