RPC server

August 18, 2008

Just finished the first cut of my RPC server, which is coded in Python. Client JavaScript code running in the browser subscribes to Liberator subjects, which invokes a subscription request in the RPC server. The server sends cached static data back up to the client on the Liberator subject. The data is sent as a serialized Python dictionary. So on the server side we can just apply str() to the Python dict. When the data arrives in the browser we can do a JavaScript eval() to turn it into a JavaScript object. Simple and flexible !

ElementRenderer bug

August 14, 2008

Just fixed a renderer bug, so I feel like I’m getting traction with my Caplin Trader Firebug JavaScript dev environment. Fixing that bug has allowed me to invoke a DataSource subscription request via the Liberator in one of my server components. Which happily is coded in Python. With JavaScript in the client, and Python on the server side, we should have a very flexible environment for ad hoc client/server RPC.

The SL4B docs online at freeliberator are proving very handy. It’s easy to find stuff by pasting classes and methods into my Google toolbar. It would be good to see all Caplin docs fully indexed by Google…

Learning JavaScript

August 13, 2008

So since I’m building with Caplin, I’m learning JavaScript for Caplin Trader based UI implementation. I’ve been a Python coder since 2000, so I’ve long made the shift from C++/Java/C# style static type checking to dynamic type checking and a syntax that is free of type declarations. Which is a big shift in coding mind set. For me the big difference in JavaScript is prototype based inheritance.

Another major difference is debugging. If you run your JavaScript in IE, you can debug in Visual Studio. If you favour Firefox, then Firebug is the way to go. Getting the IE/VisualStudio debugging proved too much of a struggle for me, so I’ve settled on Firefox 2.0.0.16 with Firebug 1.0.5, which seems to be working well for me.

BlackBerry BrickBreaker

August 8, 2008

So I caved in recently and got a CrackBerry. It was the evening calls to team members in New York that did it – I didn’t want to make transatlantic calls from my personal mobile so signed up for the corporate electronic handcuffs. I swore to myself that I wouldn’t spend personal time checking and sending emails – it’s important to me that I use my commute time for reading. And guess what, I managed to refrain from compulsive email checking.

But I fell victim to a far more pernicious compulsion: BrickBreaker. BrickBreaker is part of the BlackBerry’s base set of applications, so everyone has it. It’s a variant on Atari’s 1976 classic Breakout. I’ve avoided video games for years, and haven’t really played them since I was a student, since I know I can get fixated. So I haven’t installed them on PCs, and I’ve stayed away from my kids’ Xboxes and PSPs. But BrickBreaker is pernicious because it’s always there – you can play on the train, or in a boring meeting. Since many who carry a CrackBerry are IT management types, they’ll have grown up playing classic Atari games like Space Invaders, Asteroids, Breakout, Pacman. So they’ll be especially vulnerable to a bout of BrickBreaker dependency.

Evidence of chronic BrickBreaker addiction is widespread. Plazmic, the creators of the game, have forums that carry detailed discussion, including the BrickBreaker basics primer – obviously written by a hopeless addict. The Plazmic forums also have Philip Bennett’s Diary of a BrickBreaker, which could be a case study in compulsive behaviour. Over on BlackBerry’s own BrickBreaker forum you can download a PDF detailing the layouts of all the levels, and the locations of the power pills: brickbreaker_v4.2_screenlayouts.pdf.

All addicts eventually have a moment of clarity, when they realise the wastefullness and folly of their habit, and resolve to break it. Mine came at the sandwich bar in our canteen. The lady behind the sandwich bar is used to seeing me with a book as I queue, and asked me why I wasn’t reading. I admitted I was playing BrickBreaker, and that I was hooked. That was the turning point…

PS Apparently there is a cheat. And here’s a guide to levels 16,17 & 18.