Celeb Spotting, London

Celeb Spotting Roundup

Since I’ve fallen behind we have:

Micheal Buerke, Shaftesbury Avenue, expensive raincoat, face like a blancmange in the process of slipping from his skull.

Alan Davies, Upper Street, Islington, tall, grey, with a copy of the Independent and a dyed blonde girlfriend. Less friendly looking than you might expect and looks more like a museli eater.

Kim Newman, Upper Street, not sure about this one. I only really know him from those awful talking head shows. 100 favourite ear syringings and the like.

Standard
Python, Scripting

Python Functional Programming

Something that is relatively new to me in Python is the lambda function that allows you to do a bit of functional programming. Today I created a Dictionary of functions and it all Just Worked. It reminded me a bit of C function pointers, Ruby closures and Java anonymous classes but it seemed more logical and natural than all of them.

Standard
Macbook

MacBook Memory Upgrade

I was a bit of cheapskate when I bought my MacBook and I’m not really ashamed to admit it. I had a budget and I deliberately underspec’d the machine because I wanted it to be light, cool and quiet.

However, the MacBook has easily been one of my best purchases this year and it is now in constant use. Moreover I didn’t realise when I bought that it would be running multiple logins constantly and there would be a lot of shuttling between users. The amount of security that is used has also risen from nothing at the start to “oh my god what would happen if this was stolen” in the last three months.

The machine was struggling to run the software I wanted to run and recently I have even been using to program more. This month I decided to complete my investment in the MacBook and fork out the necessary to upgrade the MacBook memory to its maximum capacity of 2GB. Crucial’s website promised me that it would be like a free upgrade and I know from my PC experience that it can make a big difference.

So the memory has arrived, costing under £200 but not by much. There were several tentative hits of the power button until I realised that when the manual says push till it clicks, it means it goddamn it. You have to be quite firm pushing the chips into place.

Having gone through the process though… I’m a very happy man. The whole system is much snappier and more responsive. I’m happier than ever with the MacBook. To me it is all-round a superior laptop. In fact I’m so impressed that when the MacMini goes CoreDuo2 I might be leaving the PC to just be an expensive games console.

Standard
Python, Ruby, Scripting

Starting Ruby and Python

This weekend I had a chance to start some Ruby and Python programming. My favourite scripting language to date is Perl and in terms of Java scripting I do actually like Groovy (although it has rapidly fallen out of favour with the Java crowd). Out of the two I have done currently done more complex stuff with Ruby but one thing is pretty immediate and that is that Python is very much on the back foot when it come to OOP scripting.

That’s not necessarily a bad thing though as actually scripting tends to be procedural and my Python script seemed to do a similar amount of work without the involvement of OO code. If I wanted something done quickly I would probably go for Python in the same way I go for Perl now. However if I thought something had legs and needed to be supported and expanded I would definitely go with Ruby.

One thing that both languages seem to have issues with is their big libraries. Most of my time with both languages was spent looking up how to perform some action. I was certain that neither of the languages required me to roll my own but I felt the situation was a lot like C and C++. C, like Perl, has the advantage of being syntactically very compact. You have to learn very little to know the language completely. Of course that means it lacks a certain power that comes from building on the capabilities of the language.

Perl answers this problem with modules which are a good idea as you only have to learn about standard libraries in little module sized chunks that match the problem you’re working on.

Python is kind of similar, in the sense there isn’t a lot in the core, but different in that, like C++ (and Java), you need to know your standard library if you are really going to get stuff done effectively.

Ruby is an altogether different beast. To get anything done you have to grapple with what feels, from my Java-centric point of view, like a very arbitrary API that is attached to every object. If you know the capabilities of a type then you have access to a lot of power. If you don’t, then you are swearing, scratching your head and reaching for the API description in the Pickaxe book.

One key thing that I feel is holding me back is the lack of variable typing. Having dynamically typed variables is cool, unless of course I know that I only want one type of variable (say an Integer). Maybe the code reflection and auto-completion features of Java are influencing me here but I do think it is helpful to be able to specify a type for a variable and then have the programmer’s editor or IDE be able to determine the API available to you.

Oh and yes, I might be making this complaint because I have already been caught out by the lack of automatic conversion between strings and numbers.

Overall my opinion at the moment is that Python is like Perl only cleaner and more legible. I think it would be really good for protoyping an application with a big team because there is a lot more consistency in the syntax and the style.

However Ruby’s object-orientation does mean that it would be an obvious choice for trying out OO Java ideas. Particularly if something like JRuby helped bring the benefits of both languages together (as well as making the most of my heavy investment in memorising huge chunks of the Java API).

Standard
Art, London

Trip to the Tate Modern

The slides at Tate Modern are so popular that I think either people have a hitherto unappreciated hunger for interactive art or alternatively there aren’t enough slides in London.

This trip was also my first chance to have a look at the rehung galleries. I also spent a lot longer than I normally do, usually the crowds tend to drive me spare very quickly. The Warhols are always enjoyable but since there are so many of them sometimes you can feel underwhelmed. The Cubist section also had a few excellent pieces by George Braques including one of the finest of the Cubist pieces I’ve seen. It was also good to see some Salvador Dali and Francis Bacon for the first time. By that point though I was feeling very ill and probably need to schedule a revisitation to properly appreciate the surrealist gallery.

One particular area of interest was the room dedicated to the Stalinist 5 Year Plan propaganda “USSR under Construction” featuring Rodencko and Littivesky’s work. I tend to prefer the earlier Soviet material but this was particularly strong on the photo-collage and very rewarding for a relatively small selection of material.

Standard
Computer Games, Games

Neverwinter Nights 2

Well my first reaction is one of deja vu, particularly at the 100Mb of patches that were downloaded within a couple of days of the release. Then there is the click issue whereby instead of attacking someone you find out that you’ve actually told your character to run right past them. There is once again the panicked keyboard mashing as a door or chest flags red just as you’ve clicked on open. Doorways prove to be the most dangerous obstacles you can put in a dungeon and pathing still seems questionable.

The game is right at the edge of what my PC will comfortably run but the graphics (while better than NWN1) do not seem to be in the same league as something like Oblivion so I assume that the game engine is a lot more demanding. I have to say that settlements seem more populated and it is good to be able to have a big party again after the slightly claustrophobic experience of NWN1.

The key thing though is story and in the first chapter alone I have already had a big hiccup. The story starts off pretty well but there are a number of false starts. For example your companions are replaced between the tutorial section and the first chapter. The story trail also failed for me slightly as I was repeatedly defeated in the undead section which seemed to be the logical progression. Instead I had to gain another level through the atmosphere destroying repetition of an earlier sector and skip the undead in favour of attacking bandits who were more susceptible to rogue sneak attacking. It all felt like I was playing the mechanics of the game rather than the game itself.

There was a shockingly bland side trip level and some pretty transparent NPC saving which indicates some design issues but you know overall, I would rather have it than have nothing.

I’m now onto Chapter 2 and hopefully things will settle down, the party is established. The Neverwinter setting is more compact and the storylines seem a bit more focussed.

Standard
Macbook, Software

NeoOffice Beta Patch 8

So I downloaded Patch 8 tonight and since I was critical in my last post on it I thought I would say that in fairness Patch 8 uses a lot of resources but it does actually put them to use. This revision felt much faster and more responsive. In fact I was able to use it happily for a good two hours without any issues apart from some funny focus business after a autosave and even that wasn’t really that annoying.

An Aqua OpenOffice is a great thing but so far this has been a bit of a back and forth experience, more so than I would expect for a Beta. This sometimes feels like more a “Nightly Build” affair.

Standard
Java, Macbook, Software

NeoOffice Beta Patch 6

I really enjoyed using NeoOffice Beta 3. It was fast and had the full OpenOffice functionality I know and love but in a nice OSX compatible wrapper. However after downloading and installing Patch 6 it seems that the application is current three steps back on the development cycle. The application is a horrible memory hog and seems to want to grab every resource on the machine it can. Despite this it is also extremely unresponsive to actions I would consider to be trivial such as cut and paste.

Of course I could get more memory for my MacBook: I deliberately underspec’d the machine due to Apple’s high memory prices but still 1Gb of memory for a word processor is excessive. It is easily the most demanding application I’m running at the moment.

Standard
Java, Work

Eclipse Parameter Prediction

I’ve switched back to Eclipse as my IDE for work for various reasons (but the major one being that I know more about coercing existing source bases into Eclipse than how to do the corresponding project buggery in NetBeans).

I decided to rack up the Code Assistance, Auto-Completion and templating. To my delight in short methods I now sometimes feel that the machine is actually writing the code rather than me. The predictive parameter completion rarely makes totally wacko choices and the only real glitch I feel is that there is no way to suggest that certain String parameters are actually intended to be literals.

Since switching it on I feel a lot more productive!

Standard