Ruben is not an XPT engineer

Travel

Photo of a CountryLink XPT courtesy of Axel Cheah

I had a thought this morning, and it hurt a lot. Not used to thinking so early in the morning.

Trains in Sydney are trains that are in Sydney

One of the variables both my sister and I (who can't drive) were really worrying about when we decided to move back in with our dad who was being transferred back to Sydney was how the trains would be. In Singapore the MRT is always full, but there are ultra clean stations everywhere, they keep building new lines, they're affordable and most importantly there's no timetable, just a frequency count with minutes measured in low single digits.

One of the more startling things about taking the train in Sydney is that… they're actually quite reliable and I can often get a seat on them when it isn't peak hour. I never, NEVER got a seat on the Singapore MRT or the LRT in KL! Part of the problem was I always felt guilty taking up a seat that someone older than me would need, so I just gave up and stood next to the doors.

Secondly, double decker carriages are awesome. The view from the top is great, and if there are noisy people, you can just walk downstairs or upstairs. That's huge in the afternoon when those <old man voice>loud teenagers get on and start yakking on their phones loudly about clothes and how their boy/girl friends aren't getting any.</old man voice>

Lots of people seem to have a negative opinion of the Sydney rail system, and it certainly isn't perfect, but fortunately we were able to get a house near a train station and its been a breeze. A 15 minute trip to get to the centre of town and only waiting 10 minutes for a train is mighty nice ^_^.

Sharing rhymes with pairing. Is pearing a word?

All of that last section may have been fine for some pointless rambling, but it wasn't what I intended to talk about!

The other thing that surprised me is just how much other rail traffic shares the rails with suburban trains. In Adelaide we'd regularly have huge container hauling diesel locomotives rumble right through the Mawson Interchange which was a bit unnerving (and LOUD!) but in Sydney the foreign guest that most frequently flies through is the XPT.

Back when I had a mad obsession with trains I studied the XPT, basically its a modified version of the British Intercity 125 double headed train that provides services to rural New South Wales and Brisbane, I think. Because of Australia's huge distances, the engines are diesel-electric because putting up catenaries (that always looks like canaries to me) would be prohibitively expensive, and Aussie governments don't give a rats arse about clean high speed rail because they're too busy pandering to airline companies. But I digress.

I'm not an engineer, but as I see these XPT trains rumbling and belching their fumes through these suburban stations, I can't help but wonder why they can't switch to catenary power when its available! The XPT locomotives use the diesel generator to power electric motors, so you could have pantographs to collect power and sidestep this process when it can. The diesel generator would act as backup power.

They do this on the Northeast Corridor in the New England region of the US, so its possible. I read Sydney uses some weird DC current for their electrical systems though, so maybe that wouldn't work for something with higher power demands like an XPT. In that case, maybe that needs to be changed too, or maybe it could just supplement the diesel generated power so it doesn't have to work as hard.

Unless they've done some hedging like the airlines (SIA is killer at this), I can't help but think all that diesel fuel wouldn't be cheap. But heck, what do I know, I'm not an XPT engineer ^_^. Off to have a grilled cheese sandwich :D.

Photo courtesy of Axel Cheah from Wikipedia.


Puts for old versions of Perl?

Software

Ruby developer complaining to me today that Perl doesn't have a puts method.

#!/usr/bin/env/perl -w
use strict;
my $goto = "K-K-K-K-Kathmandu!";
&puts("I think I'm going to…", $goto);
sub puts {
    print "@_n";
}

Problem solved! ^_^


Aussie internet provisioning provisions

Internet

Icon from the Tango Desktop project Sometimes it isn't necessarily that we're not making any progress, but that the progress is proceeding at such an agonisingly slow rate that it seems like I'm not making progress even though I am making progress, it's just progressing progressively with very slow progress.

Moving is what a cow does

When we moved into our new house in Sydney we were told we'd have the phone line provisioned in 3-5 business days and DSL with Internode within another 7-10 days. My old man was horrified having got used to the Singapore way of doing things where new phone lines, internet connections and grilled cheese sandwich catapaults are automatically provisioned and installed on the same day you ask for them, but having been studying in Adelaide previously it was what I expected. Our tax dollars at work ;).

Uh oh, this cafe is full and a women wearing full gothic lolita costume has sat at the same table as me. And she has an iPhone 4! What do I do!? I'm not programmed for these situations! She has epic hair!

Turns out it wasn't that simple (surprise!) because our house and the house of our neighbour were until recently sitting on the same plot of land, which means [insert long convoluted phone line connection problems here].

It’s like an unbreakable diamond tether!

When I got my fabulous new iTelephone 4 I was also told by the guys at Optus that I could use it for tethering. They were right, I just plug into MacTheKnife and he can be downloading emails for technical support questions they could look up on Google within minutes.

Two problems. First, in this new house I have a room for the computers and the signal is so poor in there it just doesn't work. Secondly, no matter where abouts in the house I am the connections are so unreliable I can barely sustain any connection at all without timing things out. Because I'm so security paranoid I have multi factor authentication with custom Yubikeys and the like on virtually everything, but it means by the time I log into things its already given up waiting for input! Oh yeah, and try running a FreeBSD portsnap on it ;).

The style is bongly bongle dongle dengy diggy

Icon from the Tango Desktop projectThe (temporary) solution came last night when my father went to Hardley Normals and procured a Telstra NextG USB dongle broadband thingy, to lend myself the use of technical telecommunications parlance. They claimed it would take up to 24 hours to activate, but within an hour we confirmed it worked on our Macs without worries, and it even behaved itself on Fedora on my ThinkPad X40! I somehow think I'll have to work a little harder to make it operate on my Haiku box ;).

It's closed and evil and proprietary and black boxy and all that stuff, but for now it beats Optus tethering until we have proper broadband provisioned.

I had a dream a few nights ago about laying a Cat6 cable from our apartment in Singapore across the ocean floor to Sydney, then up through the Cooks River and across the street to our house. As with all dreams it made no sense, because I was able to detect a signal without any repeaters or anything, and I had a 6000 kilometre long ethernet cable.


Apple’s new September 2010 swag

Hardware

Apple has released new stuff, so because Slashdot and the like dub me an Apple fanboi it's my civic responsibility to discuss them… from my iTelephone. We still don't have home internet, you see :(.

iPod shuffle

Don't get me wrong, I adore Apple products because they're the only consumer electronics company that can design things (and yes that includes B&O!) but only Apple could remove buttons from something, make an advertising campaign out of it, then put the same buttons back and advertise it as a feature ;).

iPod nano

A very interesting change having a touch screen, but I wonder what impact it will have on usability, especially when you're walking around with your hand in your pocket. The ClickWheel was such a boon because you could operate it without looking, and you could memorise the order of the menus.

It also lost the ability to play video (which they heavily advertised in previous versions) and it no longer has a built in camera. In many ways its like the transition from the iPod Mini to the nano, they're two completely different devices. It's basically a slightly larger iPod shuffle with a screen.

iPod touch

There are lots of people who can't justify buying an iPhone 4 and an expensive new phone plan, and I know if I was one of them I'd be really considering getting one of these now that it has the "retina display" too. I mean I look at the screen on my iTelephone and look at every single other phone on the market and I feel like someone has rubbed grit into my eyes, or my glasses are really dirty!

Apple TV

It has an A4 chip which I think we were all expecting. They were able to keep the interface true to the original though. Unfortunately, I must be one of the few people in the universe who doesn't like black or think its cool, so the new colour is a bit of a shame. Oh well, I'm weird.

iTunes

For a brief moment in Leopard, iTunes looked like a Mac native application with a consistent interface. Now it looks different again, and I strongly doubt they've made it a Cocoa application either. Honestly, iTunes is the easiest application to use to organise lots of music (as the name suggests!) but it's also the most unstable, unreliable application Apple ships. People were asking about 64 bit, but that won't happen until it's rewritten in Cocoa owing to Carbon's 32 bit limitation.

I suppose they don't want to do an Objective-C rewrite because they have so much invested in the current codebase, and they still want to make it reasonably portable for Windows users. Bummer.

Ping

The new iTunes music social network thing. As someone who's worked as a network administrator, I shudder a bit at their choice of name. Oh well, if people use it and like it. I prefer the Whole Wheat Radio model, personally.

Conclusion

Some interesting changes, and its good to see Apple can still deliver stuff. I won't be getting any of it though. I mean, my iTelephone 4 has an iPod in it ;).


Restore iTunes 10 window controls

Software

Fire up the Terminal and type this:

defaults write com.apple.iTunes full-window -1

I'm on tethered internet so I can't (and don't feel compelled) to download iTunes 10, so I can't check if this works or not. If it makes your Mac explode, don't come to me for a replacement. I would replace it for you, but I've got a lot to do right now you see.


#Anime Endless Eight Haruhi time travel

Anime

Straight from the source:

Chen_no_Striker: Today is the day that Endless Eight ended in the Haruhi World? I never knew that.

To keep with all the moral outrage people had about that whole debacle I claimed I hated it too, but to tell the truth… it was kinda fun. I suppose I really am weird ;).


A replacement for work

Thoughts

Rather than working on all the stuff I'm supposed to do this week, I spent half an hour drawing a diagram, then removing the titles. This was more fun. Diagrams are fun ^^. That is all.


Started as a post on a tethered iTelephone

Internet

You know what’s interesting? Tethered internet. Here’s a long story to read if you have nothing better to do.

Well, with an introduction like that!

For those interested, our house this morning just had the phone line connected, which means we can finally have ADSL provisioned. At least, given the state of Aussie telcos and ISPs we can never be too sure, but there you have it. So there are just nine more things to sort out before the end of the week. Easy!

Anyway during this time I’ve been using the tethered internet connection on my brand new, shiny iTelephone 4 which, ironically, I haven’t been able to change the signal reception on no matter how I hold it. I plug it into the Mac, enable Tethering on the phone, and let her rip. Well, not literally, I had to sign up to another contract with Optus to get it so I don’t want to cause it any damage.

The house reception issue

While certainly better than the reception we had at our family’s friend’s house in Normanhurst (the poor chaps), mobile phone reception at our new house here is also patchy at best. I’m a computer science student not an engineer, but I find it fascinating that a few centimetres of plasterboard can have such a dramatic effect on mobile performance, in some cases even making the difference between getting 2G and 3G reception. And it gets stranger, our kitchen area is an absolute dead zone, but the loungeroom which is separated from it without any walls at all gets several bars of 3G.

It’s unfair to compare the gargantuan task of blanketing a country the size of Australia with decent phone reception with Singapore’s compact, high density size and population, but the difference is amazing. I get 3G reception in lifts and emergency stairwells in Singapore, back here in Australia I can be walking in broad daylight and have a dropped call. Wait, I don’t walk in broad daylight, the sun is evil, but you get my point.

Mmmm, pointy

Have you ever wondered why pencils are needed to be so sharp? I mean, the first thing you think of when you see a fragile, thin substance such as paper is lets put something really sharp up against it! Unless when people say "sharp" they’re referring to intelligence, in which case I’m nervous that intelligent pencils could jump out and stab me. I mean, they’re sharp!

Our first television at home was a Grundig, but we replaced it with a Sharp when the dial failed on it. I often wondered what it must be like to live in a country where to export your products you would need to name your companies in a foreign language. I wonder if businesses in the United States, Canada, Australia, Ireland, oh heck the English speaking world, would be so successful internationally if they had to all be named in Africaans. The Dutch and South Africans would have all the huge conglomerates then, and we’d be bailing them out instead.

Consuming sounds like comestible. Wait, no it doesn’t

While we’re on the subject of malfunctioning robots (just keep taking pictures!) have you ever wondered why the sky is blue? I know it has to do with refraction of light, but that explains how it is blue. I’m not sure where I read that, but its been consuming my thoughts for weeks.

Thoughts that burrow into your head and refuse to budge like that are the closest thing we can come to Inception without using a team of architects, designers, pharmacists and a trippy thought connection machine that would make any Vulcan shake his or her head. Have you ever noticed how few female Vulcans there were on any Star Trek? And T’Pel doesn’t count. Well okay she probably can count, otherwise she wouldn’t be terribly smart.

I wonder if she was sharp.

That Sharp television we had was a strange beast. At times the picture would jump to the side and start jiggling around with flashes of primary colour and snow. No wait that wasn’t that Sharp TV, that was my first computer monitor. The only high tech solution was to give it a small but firm smack on the side a few times. It would lurch, then correct itself.

Isn’t it interesting how acronyms mean different things in different places? That computer monitor was an SPC brand from Taiwan, which in Singapore is also the acronym for an oil company, and in Australia they tin peaches.

Millions of peaches. Peaches for me. Millions of peaches.

Its so quiet here at night

Slumbers.

UPDATE: I thought I hit the Publish button last night, but I hit Draft instead. I have since corrected this obviously terrible mistake, though probably the difference was minor to the overall value of this site.


Okay okay, I’ll start using Ruby again!

Software

With this huge move and all the unexpected problems we’ve had, I’ve had very little time these last couple of months to do much programming… or blogging! I can’t wait, I’m posting this from my phone.

More history you don’t care about

When I left high school in 2005, my first proper job was to write Perl scripts for possibly the friendliness boss I’ve ever had. He absolutely loved the language, and his enthusiasm rubbed off on me! I learned to LOVE CPAN and though I never did submit any of my own ACME modules I sure created lots of them! If I were learning the language today, I’d write one that just prints The Bird is The Word until the hapless user types Papa Ooom Maw Maw Maw. ACME::Trashmen, I can just see it now!

Anyway after that I started part one of my studies and was inundated with Java. I use the word inundated because it did feel like a flood! I could understand what was going on and appreciated how the language was in some ways self documenting, but the huge, narly long lines of camel case drove me batty. Features like linked lists and generics<T> seemed nice, but felt more like a tacked on after thought in an attempt to look more like C#, a language I did in high school when I was a .net guy and didn’t really care for.

Then my mum really went south and programming took a back seat to amateur nursing. Then when she left I went through what I’ve retroactively dubbed The Ruben Troubles. But enough about that.

Yukihiro Matsumoto is really cute

Around that time while I was taking a break from university for aforementioned family reasons, I picked up the second edition of the pickaxe book and fell in love. Ruby was like Perl but was so schweet… to the point where I was thinking "this can’t be healthy!" If you’d been reading my blog for a while you would have read that I came this close to implementing my site in Rails at the time.

I don’t quite know why, but as if my brain is terrified of becoming specialised (and therefore successful) despite really liking Ruby I kept tinkering around with Python as well, and eventually grew to like it more. Despite the terrible design of my site here and the fact I like to ramble on continuously without not so much as one cohesive thought or succinct statement, I’m a huge fan of minimalism and Python is such a clean language. Not only that, it uses the white space for something! I mean, we all indent our code, it makes SO MUCH SENSE to USE it! Ruby still needs end statements or braces just like C and Basic, what’s up with that!?

Oh yeah now I remember why I got into Python: Django. Django is one of the nicest frameworks I’ve ever used. We just clicked. I really tried to like Rails and did my fair share of work with it, but we didn’t click. Despite what some mathematicians and computer scientists say, I think programming is a deeply personal thing, and sometimes things just click, and sometimes they don’t. I’ve done equal amounts of work in Ruby and Python (and WAY MORE in Perl and Java, groan!) and it just makes more sense to me.

This heading is just as useless as the other two

Ruby has some very beautiful language constructs (the iteration block is so friggen elegant and nice I want to give it a huge hug), but an equivalent Python application will [often] be smaller, a boon for people like me who do most of their development hunched over a small ThinkPad at a coffee shop or an Apple computer that has a screen that sacrifices vertical space to make it wider.

Nonetheless, for its lucrative advertising potential (RUBEN DOES RUBY!) and to shut you all up (Ruben… why don’t you do Ruby? Hey Ruben, do Ruby! Hey Ruben, Python isn’t for you, Ruby is! Hey Ruben, your name is a total fit! Ruben, where did I leave my keys?) I’ve decided to give it another shot and submit my next assignment in it instead of Python. Who knows, it’d be great to do some RubyCocoa stuff :).

#!/usr/pkg/env ruby -w

class MugiChan
  def to_s
    return "Can Yui have this guitar cheaper?"
  end
end

if __FILE__ == $PROGRAM_NAME
  waifu = Mugichan.new
  puts waifu
end

Sent from my iPhone
(one of these days I'll get rid of this thing)


Status update and all that

Internet

Hi everyone,

We'll have internet at our new address by early September. Until then, these people write more interesting blogs anyway.

Peace, health, happiness and all that,
Ruben