Skip to content

The power of the shiny

I am prone to wanting new shiny gadgets.  It’s something of a problem.

So it’s not entirely surprising that after nine months with an iPhone 4S I’ve found myself gravitating to mobile phone review sites and ogling pretties on telco websites.

But it would be deeply unwise to go off and spend money when I have a perfectly functional phone which isn’t terribly old.  Thus, jailbreak!

Am only using two jailbreak apps and between them they add a nice bit of extra functionality, enough to appease the “new phone!” idiocy:

Auxo (link to Youtube video demonstrating Auxo), a replacement task-switcher.  It presents little card previews of each app rather than just their icons, and adds toggle controls for things like wifi, screen orientation lock, Bluetooth, you name it.

Zephyr (link to Youtube video demonstrating Zephyr), which provides gesture controls for multitasking.  It’s a bit like the Nokia N9, though not quite.  That video demonstrates the “swipe up from the bottom to display task switcher” and “swipe from the left or right to switch apps” gestures, but the author has since also added a “swipe up” “flick” type gesture to close the current app.

It also makes the notification centre a little more consistent with the task switcher, in that they now both appear to come from under the home screen — by default on iOS the task switcher appears in a layer underneath the home screen/current app while the notification centre appears over the top.  Small tweak.

Between them there’s enough “new” to fend off the impulse to go blow money on a Nokia Lumia 920 or something else similarly crazy.  For now.

Posted February 21, 2013 by matt in apple, gadgets, tech

ThinkPad X230, Windows 8

For work I just got a ThinkPad X230.  With the CPU specced up to what seemed like the most reasonable choice (the highest-end i5 Lenovo offers), the nicer IPS display, and the backlit keyboard.

And with the absolute barest minimum memory and storage — 2GB and 500GB respectively.

To make this a kick-arse machine, the latter were replaced with 16GB of RAM and a 256GB SATA-III SSD from Crucial.  These costing significantly less than simply ordering the machine similarly configured.

And here’s the thing:  I was expecting a bit of an ordeal upgrading this.

What I got was… not.

First off, whoever designs these machines really expects the owner to open them up and replace storage and memory.  The latter is easy enough on  most laptops, but Lenovo have made the memory bay roomy enough that the process is not fiddly.  And extracting the hard drive means taking out one screw, sliding the drive out in its caddy, unscrewing it from the caddy, screwing the SSD in to the caddy, sliding it back in, and putting the plastic cover back and screwing that in too.

An awful lot of the laptops I’ve dealt with over the years have not made things anywhere near this simple.

Now for the bit where Windows 8 is awesome.

I had expected I’d need to image the drive using True Image or a similar tool, then restore the image on to the SSD.  But True Image’s rescue disk won’t boot on this machine.

But! The stock Windows 8 “Create a recovery disk” tool does exactly that, to the point where I could simply swap in the SSD, power on with the USB flash stick I’d used, the machine booted the recovery tools from the flash stick, click a couple of times, go away, come back and the machine has booted Windows 8 from the SSD and is starting the account setup.

That simple.  Really.

Obviously not what you want if you’re upgrading to an SSD on a machine you’ve been using for a while, but with a brand-new unit?  Exactly what one needs.

Posted December 14, 2012 by matt in tech

Web crawling

May the gods have mercy on my soul, but I’m actively considering the merits of writing my own alternative to wget.

This is because there are some critical limitations in wget which give me considerable trouble.  The most obvious is that there’s no way to give it a maximum number of pages to fetch, something I’d been thinking of working around by writing a wrapper which watches the wget log and aborts the process when it has hit whatever the limit might be.

But today I’ve encountered a more significant problem.  Here’s a snippet from wget’s documentation:

       -X list
       --exclude-directories=list
           Specify a comma-separated list of directories you wish to exclude
           from download.  Elements of list may contain wildcards.

A naive reader would assume that this means you can use ‘-X’ to wildcard exclusions. But oh no, not quite, because ‘/’ is not matched by the wildcard, and thus if you are fetching a site which has a great many PDF files, all referred to with URLs ending in ‘.ashx’ because that’s just what the CMS does, and they are in a wide variety of directories but all of them have the term ‘PDF’, you can not in fact exclude ‘*/PDF/*’ and get a useful result that does not include a giant pile of PDF files.

It would also be helpful to be able to reject data based on content type.  If I’m understanding HTTP correctly then HEAD can be used to confirm the content type prior to starting a fetch, or I suppose that if one wants to be particularly obnoxious one could use GET, then immediately close the connection should a blacklisted content type be encountered.

I’m sure I could do an adequate job for my purposes, but it would be a case of getting side-tracked by something which is important but not urgent at a time when there’s plenty of urgent.

Edit: on further reflection, the thing to do would be to use wget to fetch a page complete with assets, then throw that at HTML::TreeBuilder and find the links, make decisions more flexibly in Perl, then add the appropriate URIs back at wget, recursively, until everything I want has been fetched.

This also means some basic support for annoying tricks like JavaScript links may be possible, up to a point.

Posted November 14, 2012 by matt in perl, web

Windows 8: let the whinging commence!

Well, not my whinging, but there’ll be plenty of it to go around.

I’ve installed it on two machines so far.  One was my mid-2010 MacBook Pro, on which OS X has been getting progressively less usable for my particular needs, not to mention the sheer awfulness that is Dropbox with half a million small files on anything but Windows.

The other was my gametastic Wintendo, bought at the start of 2012 from hand-picked parts.

The former was done by way of using Boot Camp to install Windows 7 on most of the disk, then using the upgrade assistant straight from the MS website.  Worked a treat, though there have been some complications, largely I think due to the Boot Camp device drivers.

Specifically, the trackpad does not work, and it was a bit crash-y until I installed the Hyper-V kit and updated the nVidia driver.  Mind, it goes back to being differently-crash-y if I actually leave a VM running…

The Wintendo was done as a clean install from media.  Again a slight hiccup courtesy of my prior Windows 7 setup using spinning rust to boot and the Intel SRT tools to use an SSD as a cache — Windows 8 didn’t seem to much like running the storage through the Intel RAID controller on the Z68 chipset — but once I switched it back to AHCI all was well.

Instead of using SRT I’m just using the SSD as the boot volume, then installing bulky occasional-access things to the slow disk.

It has thus-far been wonderfully stable on the Wintendo, and acceptable if a little quirky on the MacBook Pro.  With any luck there will be updated Boot Camp drivers in a month or two, and in the meantime, well, I can live without the trackpad as the machine is usually run with external input devices.

As far as general use goes, it’s fine.  You can quite happily use it just like a Windows 7 machine, with the minor detail of having a start screen rather than a start menu.  It’s just as keyboardable as 7 was, you have bigger mouse targets for launching applications if you’re a mouse-click-type person.  And the live tiles are nice, though it’s rather silly that the guys who wrote the Metro app for Australian weather didn’t bother making the tile live…

Metro apps are, well, some of them are quite nice.  I like the new Skype.  IM+ is rather good.  The website-as-an-app things aren’t so great for my use, though someone with better eyesight may well find things like the NYT and Wikipedia apps usable.  Appealing, even.  As always it’s down to app developers to provide some way to change the text size, and the types of people doing web/magazine-as-app things generally don’t.

“File History” works.  Not a lot more to say about it, really.  The interface isn’t as pretty as Time Machine, and it isn’t doing a full backup, just covering some specific directories plus anything in a library.  But it’s happy doing once-an-hour copies of all my documents to a network share.

Haven’t tried Storage Spaces.  The Ars Technica peice convinced me to leave that alone for now, though with any luck Microsoft will iterate on it and make it more robust, because it seems like a neat idea.

My main concern right now is that it looks like Metro apps can’t be captured by Airfoil, which I use to get Rdio out to my stereo via an Airport Express.  Hopefully they’ll figure something out — it’s not an immediate worry as Rdio, Spotify, and so on haven’t switched their clients to Metro yet, but that’ll probably happen eventually.

Overall?  Pretty happy.  Not yet regretting moving my work and development environment over from OS X.

Posted October 31, 2012 by matt in Uncategorized

Further madness

Just in case you were unclear on the reality that the copyright takedown thing has gone completely bonkers:

Screenshot from Youtube, copyright takedown notice on UK PMQs

Posted September 9, 2012 by matt in random

HTML parsing in Perl: getting it right

This stuff is actually in the documentation for HTML::TreeBuilder, if you read closely enough, which naturally I failed to do.

Anyway.  By default HTML::TreeBuilder will treat an incoming pile of text as Latin-1.  Which is mostly okay, most of the time, if you live in an English-speaking world and have no need to do anything wacky like “spot the bits where someone stuck in some Chinese characters”.  For example.

I spent far too much time going ’round and ’round in circles chasing my tail like a demented kelpie before someone kindly pointed out where I was getting this entirely wrong.  So here’s what you do to do this right:


use IO::HTML;
use HTML::TreeBuilder;

my $file = "file.html";
my $tree  = HTML::TreeBuilder->new_from_file(html_file($file));

Yes, really, it’s that simple.  IO::HTML checks out the first 1024 bytes of the file, figures out how it’s encoded, opens it with the right options, and passes the file handle back.

(Well, no, it’s not quite that simple, you also need to make sure the file exists and do appropriate error handling, but you get the gist.)

Now when you pull text back using HTML::Element->as_text() it’ll be properly encoded, and you can do stuff like scan it with a regex using Unicode properties.  The above case of “is there some Chinese in this?” becomes:


if ($tree->as_text() =~ /\p{Han}/) {
  # Do stuff
}

My code does of course do rather more than that, but again you get the idea!

Posted September 7, 2012 by matt in perl, web

Inconceivable!

A short note to Tony Abbott:

You keep using that word. I do not think it means what you think it means.

Specifically, “uncertainty”.

You keep going around banging on about how the carbon tax and the minerals rent tax are creating “uncertainty”, because that’s the term business leaders have been using.  However, you’re using it as though they mean “oh no, we’d have to pay tax so we won’t invest!”, while what they’re actually saying is “we don’t know what the tax landscape will be like in one or two years from now, so we can’t plan”.

Take a guess why they can’t make a firm-enough guess about the near-term tax landscape?

Yup, that’s right!  It’s because you, not the Government, have been creating uncertainty about the near-term tax landscape.

Posted August 24, 2012 by matt in politics

Startup culture is bad, m’kay?

There’s a bit of a thing about glorifying Silicon Valley-style startup culture in some parts of the geek world.  I’m not a fan of it for a bunch of reasons, mostly about why I’d not want to participate, but the announcement that Sparrow has been acquired by Google has me thinking some more about another reason I don’t much like it:  it’s bad for customers.

To backtrack slightly, the basic gist of the thing is that you have an idea, and you build something around that fairly quickly so as to get some users.  Then maybe you get venture capital funding, and you keep growing your thing.  But the end-game isn’t to make a really great product which lots of people will use and pay for (one way or another) and to use that revenue to keep growing the business and become another Google or Microsoft or Apple.

The goal is to get to a point where Google or Microsoft or Apple give you and your investors a pay-day, then your founders maybe go work for the new owner, and the thing you built, well, occasionally it gets folded in to the acquirer’s product portfolio but more usually there’s this nebulous “the ideas we had will become part of some other thing they make”.

The problem I have as a customer is that buying a product from a startup means running the risk that the business won’t be around in a year from now.  The new owner will most likely have killed off the product.  Maybe the things that drove the product choice in the first place will make their way to something the new owner does, but probably not.

The result is an endless parade of new shinies, which is appealing to my inner technological magpie, but is completely unsuitable if the new shiny is something central to my workflow.  So now I’m going to be much more cautious about trying something new which fills an important role, and maybe other people wise up and feel the same way about it, and now it’s harder for the new and interesting things to get off the ground because the potential customers are sticking with the people they know are trying to be Google or Microsoft or Apple, and that mostly means Google or Microsoft or Apple.

(Or, gods help us, Oracle.)

Posted July 21, 2012 by matt in random

Unrepairable

As a work environment I’m happiest with an OS X machine.  The accessibility is, for my purposes, exactly what I need, and there’s a lot less mucking-about required to do UNIX-type work than there is on Windows.

(Yes, yes, Linux, yadda yadda yadda.  For the sake of this post let’s just take it as read that I do in fact have a clue about what I’m doing, and that my experience has been that Linux doesn’t meet my needs.)

So I’m fairly worried by the complete lack of anyone-serviceable parts in the latest MacBook Pro.  The two items one is most likely to want to upgrade over the life of a computer are RAM and storage, and neither of these can be replaced on the “MacBook Pro with Retina Display”.

It’s not just a problem for upgrades though.  The bigger concern is that, once your warranty or AppleCare contract is over, any fault with that machine is now a replacement rather than repair job.  The RAM gone bad?  Sorry, you’ll have to buy a whole new multi-thousand-dollar laptop.

In the interests of shaving a millimetre or two off the chassis the RAM and storage are soldered on to the board.  Fixing either now requires replacing the whole motherboard, so a $100 repair is now a “throw it out and buy a new one” situation.  It’s effectively a three-year lifespan, with limited prospects for useful function beyond that.

As much as I like the platform, and the hardware, this just isn’t a good choice.  For the moment there’s still the non-Retina MacBook Pro, but how much longer is that design going to last?  Another upgrade cycle or two?

The whole thing makes me a sad panda.

Posted July 8, 2012 by matt in apple

Keyboards!

Oh great and mighty internets, please to be recommending a keyboard I won’t hate.

For many years my preference was for a nice loud mechanical keyboard.  IBM Model M descendants and the Das Keyboard with the lovely Cherry keyswitches.  Wonderful wonderful things, but alas, when one spends much of one’s time on the phone it becomes a problem.

Having had to spend time using laptops directly every so often I have adapted to the flat style, so long as the keyboard isn’t actively hateful.  At present the Macbook Pro keyboards as of the last four or five years have been a favourite, particularly compared to what Toshiba, Dell , and Asus have been foisting upon the world.

“So use an Apple desktop keyboard!”, I hear you say.  And lo, this very missive springs forth from such a device.

But winter is coming.  The days grow short, the nights grow long, and the amount of work to be done does not abate.  The illuminated keyboard on this machine is looking mighty tempting right now, except that it’s got a tiny screen and I am woefully poor-sighted.

So an illuminated desktop keyboard, USB wired because cordless doesn’t Play Nice with my KVM, and not built using lovely lovely mechanical keyswitches.  Surely not a lot to ask?

Apparently yes.

The probably-not-horrific options I’ve found so far are the Logitech Illuminated Keyboard and the Moshi Luna.  Both have fixed wrist rests, which is undesirable, but more problematically your humble correspondent is an Australian and neither is available in his native land: the former appears to be an old product, unrevised since 2008 and no longer sold by Logitech Australia, while the latter has simply not made it here.

The Logitech unit is available new from a few eBay sellers for AU$80 a pop, which is not entirely out of line with the US price, though really, isn’t that rather a lot for what is a fairly basic  and old-design USB keyboard which is probably horrible to type on compared to its similarly-priced cordless brethren?  The Luna can be had from B&H for about US$90, though there’s also the question of shipping:  keyboards are big, and consequently cost around $50 to get here.

And so before I proceed to spend upward of AU$100 on a keyboard which may prove to be entirely dissatisfactory, I beseech thee:  dost thou know of an alternative which doth not suck?

Posted June 20, 2012 by matt in random