Mar 5

As part of my university group design project I’m creating a functioning mock-up of a student module picking system. Coded in CodeIgniter, a PHP framework, It’s taking shape pretty quickly.

Trying to get this project out the door ASAP each function is getting a very modest amount of code to it, for example…

function logout()
{
    //Can’t logout without being logged in
    $this->requirelogin();  
    
    //  If logout successful, redirect with confirmation
    if ($this->user->logout())
        $this->redirect(‘You have been logged out’, ’success’, ‘login’);
    //  Else redirect with error
    else
        $this->redirect(‘Logout failed.’, ‘error’);
}

As part of testing the system, what happens when a user triggers the logout function when not logged in…

error

Well it gave me a laugh anyway… I haven’t the heart to fix this bug (if you care to call it a bug).

Feb 19

It’s no secret that OS X apps aren’t the single unified entities as they portray themselves as- but are in fact each representing a directory- or ‘package’. Building applications in Xcode you start to define the files that will make it into this bundle as resources for the actual binary file buried within the hierarchy.picture-1.png

One of the steps in making in an application is of course outlining the user interface in Apples own imaginatively titled ‘Interface Builder’ app. The result is one or more .NIB (Next[step] Interface Builder) files -again, ironically a directory masquerading about as a single file!

More confusingly the package contains more .NIB objects however these files are actually files in the form of plain text XML. Most importantly by default they stay as XML files in the compiling process and are bundled straight into the application package. This is where you can have some fun…

With nearly all apps you can dig out these interface files within the package and freely edit them with Interface Builder. No matter whether its closed or open source; 3rd party; or Apples own utilities; any changes you made to these files are reflected at runtime.

Before you go ahead and hack apart all your apps there are a few hurdles. I came across some NIB files that were not editable, I assume a developer can optionally encode the UI to a non-XML format. Whilst you can make new objects like buttons and give them working functions don’t expect to do anything unique- interface builder works with predefined actions and outlets set out in the compiled class headers. Oh and some apps do check you haven’t tinkered with the NIB files.

That said, I liked cleaning up the interface of a few apps. Here are some uninspiring before (left) and afters (right)…

Split & Contat

SMC Fan control

I’m sure you could come up with something a bit more creative… just remember to backup the app first!

Jan 24

Ok, imagine you’re in a computer lab with colleagues all collaborating on some code. It’s late and you have your terminal at one hand and a can of red bull at the other. You each want to have open access to the entire source code tree in one central repository and know progress of what others are working on at a glance. Simple, you use SubEthaEdit -or even better, Coda.

Now, to understand the situation I’m in, replace your computer lab surroundings with a student bar. You’ve got a pint at one hand and a MacBook at the other. Your still working on the same thing with your colleagues however your unenlightened co-worker’s are trapped in the Windows world. What now?

What I’m painfully trying to strain out is that world of collaborative real-time editors is a lonely one. Whilst the Mac community have access to one great, albeit proprietary, solution not even fingers-in-all-the-pies-Microsoft have jumped on this ludicrously obvious bandwagon.

However, the open source community have produced a godsend called Gobby. It doesn’t have all the bells and whistles but hell it’s free and it works on Windows, Linux & OS X. To get Gobby on your pc is easy- two simple installers. I had a very different experience on the mac…

DockWhile is not uncommon for one to be faced with compiling software in the Linux world, us mac users are usually provided with a universal-binary to download ready to go. Gobby is one of those exceptions. But that’s no problem right? Get an xcode project, or at worst three or four commands in the terminal to get your app- but alas Gobby is based on nine libraries that equally require downloading and compiling. So rather than faff about, an app called Fink will download Gobby and its dependencies then compile the lot. Great huh? Although ironically you have to compile Fink first! While that was churning away I got FinkCommander so that I didn’t have to stare at a command prompt for too long…

Dock

Much to my despair whilst Gobby needed nine libraries, those libraries had dependencies and those dependencies probably had further dependencies and this went on until I was faced with a list of 167 open-source projects I required!

A 300mb download later and a four-hour compile, it failed! Some bloody sound library had an issue- I shall remind you I’m basically trying to compile a no-frills text editor here! A few tweaks and I finally got it to compile, gleefully finding a working 2.7 MB executable and a collection of libraries it probably barely utilises.

No wonder nobody posted a pre-compiled version of Gobby on the project page…

Dock

Oct 30

It’s about time I realised this weblog of mine is never going to achieve the up-most pinnacle of journalistic triumph, and so communicating coherently about any deranged opinion of mine that crosses my photoshop-warped mind is merely in vain as nobody is really going to go out of they’re way to get past reading the mind-numbing post title. So I might as well retire my under-whelming professional journalism pinstripe hat before setting fire to it; replace it with my eccentric sombrero of silliness; eventually sell my sense of judgement on eBay; recklessly abandon punctuation, spelling and grammar; and finally start using phrases gleefully out of context again. When in Rome.

 

The first topic I’m going to metaphorically bludgeon you over the head with is public transport. My stance on such a system is so indecisive your probably get more consistency out of a sexually confused Big Brother contestant- and chances are they will own a motor vehicle unlike myself.

 

I have yet to purchase a car as I fail to acquire enough silver pieces to set up my own piggy-bank entitled “Hais’ Bugatti Veyron saving account”. Instead I find myself saving up for a rainy day but there are so many of those here in England it’s hard to get the balance past 20p before you blow it all on that new colouring book you oh-so-desperately wanted- eventually being kicked in the nuts when you realise you didn’t own any crayons in the first place, other than that brown Crayola buried in deepest confines of your drawer which never gets used unless you happen to draw a lot of poop.

 

Anyway, undoubtedly public transport is a quite useful method of getting from A to B. Sometimes skipping B and finding yourself at Z because you fell asleep and missed your stop, not knowing how to get back to A and finding Z to being a hybrid of the roughest part of town and Narnia- minus the hookers and talking wildlife. Your even more infuriated knowing that if you didn’t decide to have that late colouring-book session of the previous evening you wouldn’t have fallen into that un-wakeable coma on the in the first place.

 

I actually quite like using the Train however I find myself using buses more. Mainly as, at the time of writing, there is no hourly Great Eastern service departing from outside my house; calling at Tesco’s, the shopping centre or the local night-club. But the thing about trains is, for something so linear as moving across a pre-set railway track with no unexpected obstacles, they still manage to get lost and give up all hope in reaching any intended destination which I find all quite perplexing. A lot like why a train requires a driver. I envision the cabin manned with a wannabe bus driver, entertained with with a rubix cube still attempting to be solved since its inital purchase in the late 70’s, spending each pay packet on getting high on LSD, periodically stopping the train because he or she spotted an mesmerising vein pattern on a leaf laying across the track and decided to take a closer look- much to the dismay of the passengers on the locomotive being ‘driven’.

 

While the boffins get round to working out why such a thing occurs and finish working on the cure for cancer, my employers have got me working on a temporary solution, one that I shall share with the world when it gets out of beta testing- to which it first has to get out of alpha testing. Personally I’d prefer it to work down the whole of the latin-prenounced Greek alphabet until it reaches omega, but lets face it, by then were have that cure for cancer and I’ll be driving my Bugatti to and from Tesco’s. As for now- perpetual beta is all the rage still isn’t it?

Sep 22

iPhone UKHuzzah! That overlooked mobile phone from Apple is indeed coming to the UK soon. As expected it costs the same as a 16GB iPod touch at £269, although it would have been nice to see it closer to £232.22 which is the cost of the iPhone in the US plus VAT but I guess it’s close enough.

Before any hint at a looming iPhone back when I was duelling with my ageing, yet somewhat indestructible, Sony Ericsson P900 I thought to myself I would most likely be an early adopter- then again my expectations were simply a mutant hybrid of iPod Nano and mobile phone, not the highly priced wonder device that eventually spewed out of Apple.

One problem is that I refuse to commit to a £35-55/month contract when I very happily get-by on £10/15 a month on Pay As You Go. With no mention of such a solution offered by O2 and being tied down to iTunes activation before the device will do anything useful, maybe I’ll be with my recently purchased K800i for a while longer.

However, those Yanks can get prepay (with a slight trick) so maybe not all hope is lost for my no-strings-attached-iPhone. Oh funnily enough turns out AT&T prepay customers also suffer with balance notifications after every transaction like on O2- but I’m sure the iPhone isn’t rendered useless while the notification is displayed, unlike my K800i.

SMS Address BookOn a side note there’s a useful feature my current mobile has that apparently the iPhone lacks for now- ability to remotely send/receive SMS and phone-calls over bluetooth via OS X Address Book. Something I’ve recently grown quite fond of.

Oh finally, I should point out the main reason I’m buying an iPhone is to develop next generation web 2.0 apps for it, not just for the shiny technology- actually screw it, you know that’s a blatant lie, I could just get a cheaper iPod touch but I want an iPhone dammit!

Sep 13

No? Neither here. But when presented with a series of 360-degree VR hi-resolution photos I found myself clicking anyway.

Large Hadron ColliderThe Large Hadron Collider as I expected is a big 17 mile long piece of something located somewhere in Switzerland whose scientific advantages baffled me. Very quickly I ended up on Wikipedia to find out what the hell this oversized appliance will do. Here is where I ran onto something that caught my eye about the monstrosity in question, other than it claims to produce something called god particles?!

Anyway, turns out many doomsday observers closely watch this piece of kit. Yes that’s right, Apocalypse anticipators read on! The LHC could be capable of destroying the Earth or even the entire Universe when activated- and if Wikipedia says it then it must be true!

Apparently when some science boffin flicks the power on around May 2008 a cautious few believe that it may produce a gravitational monster known as a black hole which could be large enough to suck up the earth and all around it into a mysterious void. Though admittedly a black hole is a scientific theory in itself.

Now I doubt were all pencilling-in ‘The end of the world’ in our calendars however it’s still something to make you wonder.

Yeah I know, for a first post it’s pretty lame.