Decisions, decisions, decisions

I can be an awfully indecisive person at times. Often I’ve been in the grips of analysis paralysis unable to pick a course of action to take, crippled with choice.

When I was a student I read The Dice Man and was sorely tempted to make all my decisions by rolling a die or tossing a coin. Needless to say this is maybe not the best way for a person to navigate through life.

Recently I had to contemplate a specific yes/no situation and joked with the idea of tossing a coin to decide. It then occured to me that I could go one better and after a little bit of tinkering wth Objective-C this is what I made:

Decisions App - Yes

Upon touching the screen the text alternates between “Yes” and “No” and after a random period of time between 1 and 3 seconds it stops. Simple.

This app scratches an itch and it’ll likely never see any additional work though a possible future addition would be to allow a user defined number of free-text choices, maybe even with weighting towards one choice or another.

The source is on GitHub if you think it could be useful for anything.

An iOS client for my UK inflation app

After last week’s great Xcake meet I felt a fresh surge to take on new challenges and bend some less-familiar pieces of technology to my will.

Motivation

The first product of this enthusiasm was a prototype web app built to get a bit more experience with Python and Google App Engine. A few days later it got an API.

The resulting rapid feedback loop led me to pick up my copy of Beginning iPhone Development which had been sitting gathering dust for the last couple of years and get stuck back into following the examples.

Revisting Cocoa

I first dabbled with developing for Cocoa when I first started using a Mac and managed a range of “Hello World” apps, simple calculators and embedded WebKit views, but nothing substantial came of it. Thankfully a few of the concepts seemed to have stuck and after working through the first few chapters of the book again I felt confident enough to get started on something of my own and an iOS client for ukinflation.appspot.com seemed a logical choice.

This is the result:
UK Inflation App - Screenshot

What I Learnt

Even though this is a trivial app there have been a few aspects which have been useful from a learning perspective:

  • accessing an external API
  • decoding JSON
  • local data persistence with a plist file
  • interacting with view elements

These are all things which could make for useful reference material in the future.

Moving on

I’m not part of the paid iOS developer program at this time so I haven’t been able to test the app on actual hardware, which would have been nice. I may stump up the 99 bucks to get my hands on Xcode 4 and have the ability to run my code on a device. I may decide to have a crack at developing a desktop Mac app. Who knows.

The topic of push notifications was mentioned at the last Xcake so there’s another potential area of investigation involving both server and client technologies.

Stay tuned!

New site theme at last

I finally got around to replacing the default WordPress theme. Now it doesn’t look like I don’t care about my site :)

With so many freely available themes I found it difficult to choose but I stumbled upon plaintxt.org and my mind was made up: I needed one of those minimalist themes and I opted for the Barthelme which I am liking very much.

For posterity I took a screenshot of my old, hand-crafted design:

sickbiscuit.com - screenshot - old design - scaled

AjaxTerm

During my day job at $BIG_MONEY I’m behind a restrictive corporate firewall and as such can’t ssh to anywhere in the outside world. Which makes me sad. Step in AjaxTerm:

Ajaxterm - screenshot

What you are seeing is a screenshot of my screen session for a project I’m working on.

Editing a Perl script with vi in my web browser, I love it!

Fun with port forwarding

I’ve been having great fun with tunneling connections through SSH lately and today it dawned on me that I could close another hole in my firewall by connecting to my Jabber server via a tunnel. In the past, when I’ve been working remotely, I’ve made changes to my firewall by connecting to my public-facing machine; from there to my desktop machine through a DMZ-pinhole and once a presence has been established within the “green zone” browsing to the routers web-interface with lynx.

I decided to try something a bit different today. I started by forwarded an arbitrary local port with PuTTY on my windows desktop at work:

Fun by proxy - PuTTY configuration

Next up was to connect from my Slackware box over to my Kubuntu desktop and use it as a SOCKS proxy, using the previously forwarded port:

steve@substance:~$ ssh -D 8100 steve@192.168.0.2

Viola, my desktop was now acting as a proxy and was accessible through a local port. I added the details of my newly created proxy into the SwitchProxy extension for Firefox thusly:

Fun by proxy - SwitchProxy

I enabled the proxy and tested it out by browsing to whatismyip.com with both browsers available to me:

Fun by proxy - different IP addresses

Happy days. From there it was perfectly effortless to access the web-interface of my router and close the client-to-server Jabber port and to skip over to my download box and queue up a DVD to entertain me this evening.

The more I use Linux and the wealth of software bundled with the majority of distributions the more I see what is left out of windows by default. Instead of thinking “which application do I need to perform this task?” it is becoming more a question of “which protocol?” I love it!

Wikipedia HiJinks

I was reading this article on Wikipedia this morning and something didn’t seem quite right. See if you can spot it in this screenshot:

Wikipedia Screenshot

I had been up from early morning and thought my eyes were playing tricks on me. I read it and re-read it and still the words remained, I can’t say I was shocked but I certainly was surprised. My next thought was “hehe, who can I show this to?” quickly followed up by the more altruistic “how do I report this?” I then took a screenshot for posterity.

I didn’t have a Wikipedia account, so I quickly registered one and when I was returned to the offending article there was no mention of cream of any kind whatsoever. I was left wondering about the source of said text but decided whatever the source, it was beyond my bailiwick and just went back to what I was doing beforehand, which did actually involve the use of the plural of virus…

WinForm Woes

I’ve been finishing off the next release of vdaExtensions seemingly forever and have had all the functionality sorted out for ages and without much in the way of trouble but I’ve been struggling with the user interface. The only contents of my main form are a MenuStrip and the meat of the app, a DataGridView.

Throughout the use of the program the DataGridView can change dimensions: information can be added/changed/removed and I’ve also added the ability to show/hide the various columns of the control, with the constraint that at least one column must be visible at all times. The difficulty I’m experiencing lies in having the WinForm fit the DataGridView snuggly, displaying all the cell contents and preventing any empty space around the control:

WinForm Woes - DataGridView I Curse Thee

The control is docked to the form and I’ve taken care of any empty horizontal space by setting the AutoSizeMode of the right-most visible column to Fill, however I’m still left with some vertical empty space as you can see in the screenshot. All the rows are displayed perfectly when the form is resized vertically to it’s maximum, but whenever all the rows cannot be displayed and the vertical scrollbar is visible the control can display some of it’s background along the bottom. This is the last thing on my TODO list for this version and it has been bugging me for at least a month now.

I’ve tried setting the background colour of the control but the empty space was still noticeable, only it was the same colour as the cell backgrounds. I can’t find any row properties that will cause the last row to fill up the available vertical space, like with columns and all screenshots I’ve found online have included a bit of the control’s background.

I might have to accept that what I want to achieve is just not possible using this control but I’m itching to move onto something else so come Monday I’ll probably publish the solution and commit the code to SVN. Perfectionism hurts!

XP on Kubuntu via VMware via VNC

I finally got around to doing something today that I had been meaning to do since I got Kubuntu installed on my home desktop, namely, setting up a virtual machine running Windows XP so I can perform DVD encoding/editing/authoring. I’m a relative novice when it comes to these techniques and I haven’t put enough effort into finding the equivalent native Linux applications, so it is a case of better the devil you know for the foreseeable future. If I ever gather any significant skills in Linux application development I would love to create ports of the almighty VobBlanker and the venerable IfoEdit. As for DVD ReBuilder Pro and Cinema Craft Encoder, one step at a time, eh?

Getting VMware Workstation installed didn’t prove as difficult as I thought it would be, the only things I had to do was get the kernel header files, GCC and associated tools and it was more or less plain sailing from there, just requiring me to run the vmware-install.pl and /usr/bin/vmware-config.pl scripts. Cheers Ubuntu Forums!

I fired up VMware and created a new virtual machine and allocated 256MB of memory and 8GB of disk space; I also gave it access to the drive containing my software archives which I had to do via VMware’s shared folders feature instead of just pointing it at the drive itself, but this might just be because I didn’t launch VMware as root. The only thing left was to get the system to use an .iso image as the virtual machine’s CD-ROM. I powered on the machine and it booted off the cd image with no difficulties; I was eventually prompted to select my installation partition which I choose to format as NTFS:

XP Select Installation Partition - Screenshot

I got the installation process underway and when I next checked back the text-mode stuff had finished and the graphical installer was in action:

XP Graphical Installer - Screenshot

The installation seemed to stall at this point and when I came back from my coffee break it was still declaring that the process was 37 minutes from completion. I was regretting only giving the vm 256MB of memory, but I restarted it and the installation resumed itself ok. Entering the product key was the next major step:

XP Enter Product Key - Screenshot

I clicked through all the device driver dialogs, set the localisation info and was greeted by a near ready windows:

XP Welcome - Screenshot

Setting up networking and Windows Updates were the last couple of things to do before the installation was complete and I was presented with a virginal desktop and start menu:

XP Start Menu and Desktop - Screenshot

If you look closely you might be able to see the Windows Genuine Advantage tray icon, needless to say it was swiftly dealt with. Windows Update grabbed all patches issued since September (the rest were handily slip-streamed into the installation CD,) the machine rebooted itself and I promptly took a snapshot of it’s state in case I need to roll back to a pristine copy of XP. The only thing left hanging is accessing the shared folder I setup, but that is a problem for another day.

The world of .IFO, .VOB, .BUP files and even the likes of Photoshop is now back within my reach and what I got a kick out of was that I setup an XP virtual machine on my home Linux desktop from my XP workstation in the office, Russian Doll style. Nice.

Firefox 2

I’ve just installed Firefox 2 on my XP workstation at the office, a week after my colleague Kevin installed IE7.

The installation went smoothly and my extensions copied across ok and eventually got updated, but the theme I had been using wasn’t compatible, a new version of it wasn’t found by the add-ons manager and I didn’t like the default, so the first thing I did was look through the available themes and one that caught my eye was Mostly Crystal as it uses the Crystal SVG icon set I’ve come to love. A bit of reading on the author’s site provided me with a few tweaks to userChrome.css, which I hadn’t heard of before, and I’m content enough with the result.

Firefox 2 - Screenshot

The first difference I found was when I started to write this post and discovered that Firefox now has a spell-checker for form fields. I’ve also stumbled across the ability to open recently closed tabs which I think will come in handy. My main hope with this version is for improved memory management. As much as love, promote and endorse Firefox I’ve found it to be an absolute memory hog, to the extent that it has left my home desktop crawling at a snail’s pace when left open overnight monitoring my usenet client.

I might try to get this version running on my amd64 when I get home, either that or wait until it becomes available through the Ubuntu package system, after all, 2.0 is better than 1.5, right?