XML is not a Programming Language, Ohloh!

One of the open source projects I created is rbKarel, the REALbasic version of Karel the Robot, which uses its RBScript built-in scripting environment to provide the Karel interpreter.

This was indexed at Ohloh and shows why it is such a dumb idea to claim XML is a programming language. Ohloh now asserts with some appearance of authority that the source code has few comments and makes other discouraging claims. Mild slander on what is now the top hit for rbKarel in Google :-(

Continue reading

Clouds and Key-Value Databases

I was watching an interesting video on Computing Strategy in the Cloud Era, by Lew Moorman, CSO of Rackspace, speaking at the Glue conference.

In the Questions section at the end he talked about lock-in and mentioned the new generation databases such as SimpleDB as representing lock-in because they aren’t standardised.

I did some quick skimming and found an interesting debunking article on these key-value databases.

The enthusiastic response to these databases makes me wonder, apart from the obvious Google must be right attitude, if a sloppy view of the world as a soup of key-value pairs is actually an inherently comfortable way for many people to think about data? Is it appealing because this is a level of complexity we can think with more naturally?

CRUD and REST idioms

Just reading a very interesting article on REST and CRUD idioms

I chipped in with a couple of points. I skimmed the article initially and it made me think a lot more about the web services we’re working with and the implications of PUT as an update – do we want to have an empty element as the way to specify that a PUT clears part of the content?

I found another good discussion whilst trying to clarify my own thinking and see if there is a consensus on how to do partial updates.

iPhone development on PPC

I’m off to WWDC in a couple of weeks (via Milwaukee) and travelling with my trusting Powerbook 12″ which is still a great airline machine.

A large part of the reason for getting back into Cocoa and attending WWDC is wanting to do some iPhone development but I didn’t expect to be able to do that until back in Perth.

After a few searches for others in like circumstances, Alex Blewitt came to the rescue with a neat script that made installing the iPhone dev kit on PPC a smooth experience, thanks Alex.

Platform-specific web plugin? Oh My!

GameSalad is a very sexy-sounding game creation toolkit for iPhone and Web delivery. Their tag is Game Creation for the Rest of Us™

It feels almost hypocritical to complain that their web delivery requires a plugin, which is only available for OS/X. In fact, adding a little insult to injury, it appears that the rest of us only have Intel machines.

Continue reading

Seeking Virtue Through Test Quantity

from  an interesting thread on Stack Overflow about Unit Testing failures, I loved this anecdote:

As a note of caution re: unit tests, when a customer is literally yelling at you because an application is not done, it is inadvisable for a junior developer to blurt out “but we’ve written 5 times as much test code as actual code”. Whether you use unit tests or not, you have to admit that it can be a tough sell to the customer

and this gorgeous phrase from rich:

I guess it’s a matter of helping management and the customers to see the green bars at the end of the tunnel.

SproutCore – Impressive but it is still just a Web App UI experience

PaperCube is touted as a great example on the SproutCore blog, PaperCube is a great example of using SVG and advanced CSS rendering to create a rich graphical experience. It’s a bit shocking when you use this app to realize that he has created this entire experience using only JavaScript and native web technologies. Who says you need Flash or Silverlight for a great visual experience!

I was led to the SproutCore blog by one of a series of postings in Roughly Drafted which raves on about how much SproutCore solves problems for web developers with some hyperbole: If you were waiting for the resurrection of Yellow Box or Cocoa for Windows, stop waiting and start coding. SproutCore brings the values of Leopard’s Cocoa to the web, domesticating JavaScript into a functional application platform with lots of free built-in support for desktop features.

Being based on open web standards and being open source itself means SproutCore will enable developers to develop cross platform applications without being tied to either a plugin architecture or its vendor.

It took me only a few minutes with the PaperCube example to see that, whilst it is a pretty example of a web-app, it’s still nowhere near a desktop experience.

I find it extremely ironic, after decades of people bashing the Mac for its single-button mouse, to see so much pressure for web apps which often abandon the right-button and often the scroll-wheel, for other than scrolling the page (if the app doesn’t fit).  Google apps, such as maps, make good use of the right-click context menu as well as scroll-wheels. Another superb example is Kerio’s webmail interface.

When it comes to development, SproutCore is a JavaScript framework. The develop is still going to have to work in a radically different framework and probably different programming language to write the backend data processing, for most business applications. The dancing bear is more graceful, but there is still an elephant in the room.

XML Bigots and Ant-bites

There’s been an interesting thread over on the Artima Forums – How Will You Use XML in the Years to Come? I’m not writing this post on my Artima Blog because I wanted to bring XML issues to a different audience and there seems to be a fairly bigoted crowd over there, largely from the Java community. I can get into fights with enough people there on the comment threads.

The funny thing is, when I’ve become involved in similar threads in the past, it seems many of the people commenting are anti-XML because of experiences either dealing with relatively small configuration files or other domains where the benefits of schema checking aren’t perceived due to the small file size. It may be that Java developers are soured on XML by the Ant syntax but the whole configuration files in XML debate isn’t really about XML so much as it is about the issues of wholly-declarative make files. Martin Fowler has a nice bliki entry The thing with build scripts is that you need both declarative and procedural qualities. The heart of a build file is defining tasks and the dependencies between them. This is the declarative part, and is where tools like ant and make excel. The trouble is that as builds get more complex these structures aren’t enough. You begin to need conditional logic; in particular you need the ability to define your own abstractions.

One of the perennial issues that crops up with XML is the painful redundancy in having to enter those closing tags, raised by people with a Lisp background (simple parens instead of opening and closing tags) and indentation fans such as the YAML crowd. It was ironic to read a posting recently from someone encountering the main reason for the redundant closing tags – they catch your errors! But one thing which came in handy which I didn’t expect was that because of XML’s redundancy, the parser caught my mistakes in missing closing tags and pointed them out at the location that they occurred.

The posting is worth reading as it starts as someone speaking with no agenda and seeming surprised by the conclusion they come to – XML ain’t that bad.

Whatever is being used, I want my configuration and other exchange data to provide two characteristics:

  1. I can effectively subclass the existing code by being able to add my own annotations and nested clauses in the data, without worrying about breaking their parser or having to maintain their code.
  2. Bits of data should survive being copied and pasted from emails and web pages. This happens very often as we reuse advice from web pages or passed on by friends or mailing lists. Anything relying on whitespace for meaning is under threat (yes, I include Python, which I use happily in many circumstances but has a real problem here).

Given that XML satisfies these two conditions and has lots of free tools out there including stuff for command-line validation (given schemas), I don’t feel the desparate need to replace it. I’m not exactly a fan of the W3C XML Schema XML-based language for schema definitions but it serves a reasonable job much of the time and again, there’s a substantial body of tools that avoid having to write schemas by hand any more. People in the OGC (geo-spatial) community typically work in visual models and generate XML Schema.