Small victories

My gratuitously long TODO list of projects hinges on the state of my beloved desktop, which also defines where I call “home”. But it started hard locking some weeks ago. Jaded by years of practice, I couldn’t be bothered diagnosing it for some time. From the age of about 12 I’ve had more computers than I could conceivably use at once (despite the efforts of some to stop me), so there was no rush. But as is expected, the frequency of the problem gradually ballooned. Eventually I realised that I was avoiding even turning the machine on because it was easier to just run away from the problem. At this point I also felt old, like a real adult.

And a dead machine wouldn’t be an efficient use of my minimal living space.

So I grit my teeth and begrudgingly pulled the thing out of its cubbyhole under my crammed-in desk. I prepared to pull everything out and run diagnostic checks until slowly, piece by piece, I could rule out what was and wasn’t broken.

Thankfully, after spending only single-digit hours running memtest86 on combinations of memory modules, channels and slots, I found the culprit: a recent acquisition of Corsair XMS3. Now, I’m pretty sure there were faults before I put this DIMM in, but I’m going to ignore that blissfully. For now I have hope that all order is restored.

I woke myself up earlyish this morning to go to the gym before work, but discovering this failing module had me too excited to leave – until now, an hour and a half later. I just had to fill out the Corsair warranty form, to smugly claim my lifetime warranty.

Posted in Uncategorized | Leave a comment

The ocean

I went swimming in the ocean when some dear friends came to visit. (I don’t normally go swimming in the ocean.) But after I braved the cold surf’s attempts rob me of my manhood, I realised that my monthly public transport pass had been in my pocket, and was no longer.

I looked around frantically, y’know in case it was just lying on the floor somewhere, just as it is most often when I lose things. I mean it would be futile, I thought, to bother searching for it in the ocean. Right?

But I did anyway. For 40 minutes. I hadn’t found it, so I gave up.

They told me it had been registered when I bought it, so I could retrieve it if lost and/or stolen. Conveniently I kept the receipt with the actual ticket in the same pouch thing, because I’d only bought it about 5 days prior. But after I called the government and explained to them my predicament, they told me that nothing could be done, because it wasn’t actually registered.

But whatever. In its own little way, it made me feel alive. It was like being stranded on a desert island and clamouring for the emergency beacon (or some other item crucial for survival) in the large ocean waves. Once I even think I caught a glimpse of it floating not to far from me, but just as I jumped to grab it, a rather obnoxious wave crashed down and dispersed any and all hope. It was kind of surreal. And it means I don’t need to pay tourist prices to experience this at a theme park ever so, I guess, I’m winning?

Posted in Uncategorized | Leave a comment

On: keyboard layouts

The backspace key is long. The backslash is under the backspace key, and about mid-sized. The Enter key is long, but only crosses one row.

The Enter key does not consume two rows, nor does it displace the backslash key. Crammed in between +/= and backspace is not a good place for the backslash key.

OKAY?

I have just added two to the pile I have of keyboards which are an absolute nuisance to use, owing to precisely such design “creativity”.

Posted in Uncategorized | Leave a comment

Undefined behaviour in C/C++

Hmmm. John Regehr’s posts on the implications of undefined behaviour in C/C++ are quite good. It seems like this is one of those reminders that should appear in highlighted, bold, capital letters every time I open a .cpp|.cc|.c|.h file. Maybe I’ll do that.

Posted in Uncategorized | Leave a comment

Keyboard volume control under awesome (window manager)

I recently (as in an hour ago) became frustrated with the process involved in pausing or muting music in order to respond to someone who was trying to command my attention. For instance, say I’ve got my sweet headphones on and I’m blasting Beethoven’s Moonlight Sonata really loudly into my ear canals. It is then rather painful to have to switch context to the other screen, mash the tag selection hotkeys until I land on the right “desktop” where audacious/mplayer/cvlc/xmms2 lives (because with 20 different views on tags you can easily forget where you keep everything), and finally to move my hand all the way over to the mouse, grab it, wave it around, and finally pause the music.

Then I noticed the volume control knob on this keyboard. So, after some Google-search-bashing, I managed to get it to work as my HP Pavilion’s keyboard did back in 1998 with Windows 95.

In awesome’s ~/.config/rc.lua, in the middle of the list of global hotkeys specified as the join of a list of these curious objects returned by awful.key():

...
awful.key({}, "#123", function () awful.util.spawn("aumix -v+") end),
awful.key({}, "#122", function () awful.util.spawn("aumix -v-") end),
...

Importantly, I found the keycodes for the control knob, 122 and 123, using xev. Run it, focus on the X window it creates, and observe the output for whatever input events you generate. You specify keycodes to awful.key with “#x”, x some (non-negative) integer, as discernible from the awesome FAQ.

I first used amixer, too. The command to increment/decrement volume was amixer sset Master 2dB+ (and 2dB-, respectively). Unfortunately, if I decremented below 0dB the volume ended up at -99999.99 dB and no amount of incrementing could resurrect it. I claimed that this was a bug and moved on, instead finding aumix, which is much simpler: aumix -v+ to increment, or -v- to decrement.

Posted in Uncategorized | Leave a comment

Beethoven’s Moonlight Sonata

Wikipedia tells me it’s actually “Piano Sonata No. 14 in C♯ minor “Quasi una fantasia”, Op. 27, No. 2″. I will learn to play the piano all over again if for nothing other than this piece.

Posted in Uncategorized | Leave a comment

How to fail at buying ThinkPads/life

My father told me once that I cannot make money buying and selling things to which I am too attached. They are just things. That means that any endeavour to buy and sell cool computer technology is, for me, futile.

But I don’t give up. Yet, for all the tricks I’ve learnt, the one thing I haven’t mastered is patience. Whether it be in chess, or in buying ThinkPads. I’ve decided now to moan publicly about it instead of internalising my anguish.

Disclaimer: I do this for a myriad of complicated psychological reasons that I’d love to explore in more depth just as soon as I’m done complaining…

FUUUU

Exhibit A. I paid only $200 less for a much more common machine that this not long ago. Unfortunately, it turned out that there were about 40 or 60 of those machines for auction. Grays did the very cunning thing of selling them in lots of two per day over the course of several weeks – truly flooding the market. (I ended up trying to lower my average entry cost by buying another identical model for $200 cheaper still at the end – does anyone need a brand new W510?) Then this comes along. Top of the line, flagship, and something I’d actually want to waste money owning. It made me regret the previous three W510s. I mean, what’s the point if you can’t collect the best…

FUUUUU - again

Exhibit B. I paid $909 for one of these machines two weeks before a bulk lot of them turned up out of nowhere and sold for $784-$809. Dammit. My mistake was classic: I forget to check the auction just before I knew it closed. I remembered 8 minutes late.

In both cases I purchased a machine early because I didn’t know enough about the market. Coming from NZ it was easy to assume that anything you really wanted was scarce. It’s hard, though, when you have no idea how many of these models they’ve got available to sell. If you don’t buy early you might never get one at all. To an uninformed observer, it’s but chance…

Posted in Uncategorized | Leave a comment

Happy post

I noticed my posts were unreasonably negative, so…

THIS IS A HAPPY POST. A LOUD, HAPPY, POST. IT IS THE CANONICAL EXAMPLE OF GOODNESS AND HAPPINESS AND SUNSHINE AND ROLLING MEADOWS and oases and giraffes and rainbows and moonlight and the xylophone.

Posted in Uncategorized | 2 Comments

eBay is just crap

eBay has a lot of faults, but by far the most significant is its refusal to auto-extend auctions. The point of an auction, I thought, was for interested parties to bid the highest amount that they’d be willing to pay to secure to item, naturally depending on how much value they perceive the item to have (to themselves or otherwise). It is therefore in the seller’s best interest to extend the period of the auction to allow as many bidders as possible to make as high bids as they wish, so that they may receive the greatest amount for it.

Of course there should be some limit to this extension, so as to ensure that the auction doesn’t proceed indefinitely. In a real auction, or at least all of the ones that I’ve seen, once the reserve has been met and some time passes between bids, the auctioneer makes it clear that the bidding is drawing to a close and invites additional bids before his hammer falls. If he/she sees interested parties, he or she will make allowance for them to think and place a bid. Crucially, if you want to outbid someone, you are not limited in doing so.

Not on eBay, though. On eBay, last bidder wins, absolutely. There is no auto-extend. There is no ‘going, going, gone’. There is just a single hard deadline and if you want to win, you need either a very fast internet connection with low latency and fast reflexes, or an automated script, such as the many available.

It’s moronic.

TradeMe does it right. GraysOnline does that part even better.

Few things anger me more than banks. Losing auctions for Cisco routers I would’ve paid good money for, had I been there 1 minute or even 12 seconds earlier – or even, as the case was the time before, if I wasn’t waiting for the page to load – are some of those things.

Another is TPG and its technical incompetence (but that’s another rant).

Posted in Uncategorized | 3 Comments

Advice for prospective postgraduate students

I wish I’d read this three years ago. My previous (two) attempts at admission to MIT failed, miserably, for reasons that over a year later become painfully clear. (It’s a long story, but I’m going to write it down… later.) It’s still churning – indeed reading that entire document right now is too painful – but soon I will become my quest to achieve what it is that I want to achieve. As Mr. Harchol-Balter point out, though, one has to first be very sure of what one wants to achieve.

Posted in Uncategorized | Leave a comment