Natulte::Blog

Levels of abstraction

I promise, I can explain. It started out rather simply, then got a little out of hand. A week or so later, I'm still having an immense amount of fun.

It all started when Google gave me an awesome Christmas present: An HTC Dream. It's a very shiny mobile phone, and what's more, it's an unlocked developer edition. It's hacking time!

This is where things get a bit complicated. Lemme take you through the reasoning.

# · Lire toute l'histoire · Aucun commentaire

Black box says yes

This just in: following the discovery of the "diagnostic LED" of my black box, it took mere minutes to home in on the bug and eradicate it.

It's alive! ALIVE I SAY!

Oh, what was the bug? Let's just say that when you check, in the code of a driver, whether you properly told the power management driver to power up the chip you're driving, it would be wise to also check the code of the power management driver to make sure the power-up code is right. Because a chip with no power ain't gonna be driven nowhere.

In other news, powering up random peripherals unrelated to what you want to drive doesn't work either. No, really.

# · Aucun commentaire

Debugging the NXT startup: a binary printf()

(Warning: very nerdy rant about very geeky topic ahead)

Debugging a NXT that crashes during the bootup sequence is hard. Before the main AVR link comes up, there is no way to even get any sound. I've already done debugging by sound: during the early stages of NxOS a couple of years back, I would debug by playing bytes I wanted to check as morse-code-like dits and daas, one bit at a time, over the brick's speaker. It's extremely basic, but it's how I got the display driver to work.

But debugging a crash before the sound driver is in a working state is hard. You have a large binary black box. Either it boots and the sound driver works, in which case you don't have a problem, or it doesn't and you only get The Beep Of Death, the sound of the coprocessor periodically blipping the speaker to say "Your OS is screwed, I'm not playing any more".

Just now, attempting to debug one such crash, I discovered something interesting. If I initialize the sound controller and start an infinite loop of playing a tone, for some reason the pitch of the Beep Of Death changes by a few kHz for 2 beeps, then returns to its regular pitch.

This gives me a more basic equivalent of the morse code byte "printer": if the tone changes, I know that the brick booted at least up to the point of my infinite loop. If it doesn't, I know it crashed before that point. It's an audio diagnostic LED that tells me either "I managed to initialize the kernel up until this point", or "Nope, the crash occurs before execution gets to the bruteforce sound loop".

Therefore, by moving the sound loop around in the init code, I should be able to zero in on the exact crash site. The initialization black box is no longer completely black. A little information leaks out. Instead of "Everything works/doesn't work", I now have "Everything works/doesn't work up to the following intermediate point of my choosing".

And, sometimes, when debugging embedded systems without proper hardware debugging hardware, that tiny insignificant diagnostic LED is the difference between hope and despair.

# · Aucun commentaire

Airports of the world, take notice

Singapore International Airport rocks.

The shopping and restaurant center in the international corridor is bigger than the main commercial zone of many so-called international airports.

For 5 euros, you can grab a delightful hot shower, sheer nirvana after 10 hours of flying. For 15 euros you can enjoy a day in the ambassador lounge, complete with complimentary refreshments, a complimentary bed to nap, complimentary gym, complimentary showers, and free internet access.

Oh, yeah, the internet access. Get this. Free broadband wifi internet access for the whole airport. Yes, you read that right: airport; wifi; broadband; free. All in the same sentence. Until now I thought airports were a "pick three of these four" deals, but it does appear that at least one airport in the world does get it.

I'm only here for six hours or so until my flight on to Zurich, but I will long remember Singapore International Airport as the first airport that was not only bearable to dwell in for 6 hours, but actually pleasant. And that's just the international corridor, I dare not imagine the awesomeness of the rest of the place. Whoever runs this joint, bravo.

# · Aucun commentaire

3D cinema is not ready

I saw Journey to the Center of the Earth today, on a 3D ready cinema screen. That's the movies filmed with $200 000 stereoscopic cameras, presumably requiring a specialized projector, and the classic 3D glasses to watch. I thought that nowadays, these glasses used different polarizations to isolate the content for each eye, but the ones we were given had slightly tinted lenses, one green and one red, old skool. Maybe it's a combination of both, or neither, or something.

Anyway, my opinion on 3D cinema: it's an expensive way to purchase a headache. The imperfect stereoscopic effects of the lenses, combined with the fact that most movies I see that are made in 3D are actually not so good to begin with, and that the directors make use of the 3D to pull off cheap "wow" shots that scream "I have this new toy and I'm just messing with it"... It all adds up to a thumping migraine after an hour and a half of film.

My advice: if you have the opportunity to see a film on a 3D ready screen, don't. Hit the bar with your mates instead. For the same price, you can purchase a headache that's just as good (even better, during happy hour), and enjoy yourself while acquiring it.

# · Aucun commentaire

Books, books and more books!

I've taken the opportunity during my extended holiday of catching up on a lot of reading. Well, what else are you going to do during 3 hours of bussing? Sure, the scenery is nice, but it's not *that* captivating, not for a whole day.

So, I've been in and out of second hand bookshops, catching up on a few classics that I've been meaning to get to, rereading other brilliant novels, and generally having quite a good time in the realms of science fiction. And I thought I'd share a couple of my favorite reads of this past month. These aren't in chronological order, nor are they in order of preference. They're presented here in neurocausal order, i.e. the semi-random order in which my memory regurgitates titles. I've tried to avoid huge spoilers, but in commenting on each book I necessarily have to talk a little bit about each. It shouldn't spoil your fun though, and the alternative is for this post to degenerate into the semantically empty "reviews" we sometimes get on the back covers of books: "Stunning", "A great masterpiece", "Look, kittens!"

# · Lire toute l'histoire · Aucun commentaire

Dunedin

Dunedin, second largest city on the South Island. Named after the ancient Gaelic name of Edinburgh. A Scottish settlement and big student town.

All the way around the world, and they brought Scottish bloody weather with them.

Well, wet, cold and beaten around by the sea breeze, I still found a couple of geocaches, fun time.

But you'd think that in a Scottish settlement, they'd have bartenders who know how to pour a proper pint of Guinness, instead of serving a frothing mess with a head full of bubbles. Kids these days...

# · Aucun commentaire

Relativity

Relativity is a strange beast. For example, when you're falling, traditionally you think of it as the earth's gravitational pull dragging you down, or, at a larger scale, the combined forces of the entire universe pulling you towards the ground of the nearest massive body. But, from the frame of reference of your body, you are pulling the universe.

This week, I went and gave the universe a couple of tugs. I went skydiving and bungee jumping.

# · Lire toute l'histoire · 2 commentaires

Not keeping up, I know

I haven't been keeping up with the blogging, but since crossing over to the south island, things have been so beautiful and engrossing that, well, I kind of forgot...

Updates coming shortly. No, really.

# · Aucun commentaire

Wet in Wellington

I was due to fly out of Wellington today on a tiny Cessna across Cook Strait, to start my tour of the south island. However, it seems that the weather has decided to play silly buggers, and this morning I woke up to a massive storm. The kind where the umbrella flaps out the wrong way even before it's finished opening, where the wind is so strong that sometimes you just cannot go in the direction you want to despite your best efforts, and where you are soaked to the bone in a few seconds because your umbrella is unusable.

# · Lire toute l'histoire · Un commentaire

1 · 2 · ... · 50 · 51