Wired Up And Fired Up

           Software of distinction

Dec 2006
Testing xml-rpc with AppleScript
Recently I was debugging an xml-rpc web service in a Java application. It wasn't a particularly onerous task, but the compile/deploy/test loop was taking it's time and, well, I was getting bored so I decided to see if I could knock together a quick and simple test application in a scripting language. I briefly looked at Perl and Python to see what would be involved and it looked simple enough, but I'm kind of a Mac fanboy and I wondered how hard it would be to do what I wanted in AppleScript.

I didn't wonder for long, AppleScript turned out to be ideal for this kind of thing due to the Apple Event Manager having built in support for both xml-rpc and Soap messages (so much so that they could almost be considered first class constructs in the language). Well, I never...

I looked around for a public xml-rpc server to write some example code for the blog with and the most commonly used one seems to be http://superhonker.userland.com - it's also quite a neat server as it accepts both xml-rpc and Soap. So, without further ado onto the code...

Calling an xml-rpc service from Applescript.

tell application "http://superhonker.userland.com/rpc2"
return call xmlrpc {method name:"examples.getStateName", parameters:25}
end tell

Returns "Missouri"

That's it! A three liner. 'parameters' is a List. So should you need to send more it's just a matter of writing something like parameters:{25, "test", etc}

Given that basic building block, I wrote some quick scripts to test the service I was debugging and got the job done a lot quicker than I was anticipating. I've always had a soft spot for AppleScript, but occasionally it does something stunning that makes your day ten times better and you wonder what life would be like if you couldn't use a Mac for your development machine :)


|
Relaunch 1.3.6 released
The latest version of Relaunch features support for a couple of new applications and a new 'close all apps' menu item. It also rolls out of the Wired Up and Fired Up garage featuring a sporty new language - Italian. This is the first of many languages I hope to support and I'd like to thank Michele for translating it for me.

As you may have noticed, I've also increased the price to $10. This is mainly due to the increased costs of supporting and developing Relaunch as the user base grows. If you're an existing customer there is nothing more to pay, as it's always been my policy with Relaunch to continue giving away free upgrades.

I hope you continue to enjoy using Relaunch. There's still plenty of development work underway and I'll continue to release new versions so keep your software update preference checked :)
|
Get funky at the meta-level.
For a long time I've had a theory that subsequent generations of programmers should (and to a large part do) stand on the shoulders of their forebears. Each new generation of languages really being an abstraction layer on top of previous ones.

In biblical terms it would go something like: Assembler begat Fortran; and Fortran begat Lisp; and Lisp begat COBOL and his brethren ALGOL... and so on, and lots of forking around and incest later we end up more or less where we are today. The point is, that as we progressed complex things got abstracted away to make life easier for the next lot. Fairly quickly, registers, interrupts and dealing with hardware became something Joe Programmer didn't have to deal with directly, later memory management and now even mind bogglingly complex concepts are a mere API call away.

And, that's probably right.

Every time I see an ostensibly simple computing problem (and let's face it, the problem domain in many corporate environments is often will-shatteringly trivial) made (complex^2) by genius hero coders - well, a small piece of me dies and floats away. You only need take an occasional gander at The Daily WTF to see real life examples of this happening on a project near you.

There are, I think, two main profiles for the people who do this; those who don't know any better and those who are bored and so re-invent the challenge into something more interesting to get them through the day. And, I give a small tip of the hat to the second camp as I understand their pain.

However...

Have you seen those mashup sites the kids are making with Google Maps and flickr and god knows what else? I doubt, if you looked at the code for any one of them that you'd find an optimal binary search algorithm or Euclidian approximations for pinning the cute flags in the right place. Why? Because they're mashups. Google has done the hard work and they've just taken it, bent it and thrown it out to the world as fait accompli.

People in the previous generation will mutter under their breaths about how the young whippersnappers don't truly understand what's going on - 'how could they possibly understand the fundamentals of geolocation?' and the young whippersnappers stick two fingers up at the old guard and say, 'thanks for the tools - we're doing it our way now grandpa!'

I know. "How Post Modern!", you're thinking and you're right, I am. I'd never heard of Post Modern Programming until recently but a lot of what they're saying rings true - to me at least. There's been, what, 40 years of squillions of really smart people writing software and if you don't think there's anything in their output worth borrowing then I'm not sure you're in the right job. Of course, we all reuse code all the time, right? Well, if that's true then why do I keep stumbling across functions to determine the length of strings or sort an array? Sure, understanding the fundamentals is important but I'd argue that it's not as important as making the best use of the tools at your disposal and no, I don't necessarily think the first implies the second.

The reality of programming in 2006 is that you're mashing existing things together - be they 3rd party jars in your class path, web services, the Cocoa framework or even getting out a Knuth book and using his binary search algorithm rather than writing your own.

Most of the clever stuff has been done at the lower level by really smart people and it's now time to get funky at the meta-level.
|
Fake iPods...
Unbelievable but interesting story on MacBidouille about a fake iPod allegedly found in Thailand and manufactured in China.

The counterfeiters have clearly gone to a lot of effort, copying the anodized casing, Apple logo and so on. On closer inspection however, it doesn't look quite right and unfortunately there's no pictures of it running. I'd love to have seen what software they've put in it... Probably some knock off 'Super Lucky Happy Music Player' junk, but it would have been cool to see it.

I'm not really sure who the pirate copy is aimed at, coolness aside, the main reason most people buy iPods is because they're so damn nice to use. You can guess just by the crazy layout of the scroll wheel (compare it to yours...) that this one won't be.

|