ePaper vs. iPad

2010-01-29

Sick of hearing about iPad yet? I am :-) Nonetheless …

Whether it is or isn’t a glorified iPod Touch, what’s most interesting about the device, for me, is that it _isn’t_ an ePaper device (like the kindle, &c). It’s battery life is pretty good anyway, but I guess the idea is you’d use it much like your phone … use it on batteries, but recharge early, recharge often.

It’s a pity though, because if anyone could carry off a stylish, minimalist user interface specifically designed for touchscreen ePaper, it’s Apple. Love them or loathe them, they do do design well.

Always on. No buttons. Just the bezel. Gestures at the edge of the display. Hand-drawn icons in charcoal. That kind of thing.

hmmm.

PS: just bought an iPhone, I wonder how it’ll go as a book reader?


Merry Whatever, and a Happy New Thing

2009-12-24

Whatever it is you’re celebrating at this time of year, happy *that* :-)


thinkpad x301 linux setup tweaks

2009-11-16

I’ve got Ubuntu 9.10 Karmic (64 bit) running on the laptop now, and its a big stablity improvement over the previous.

There’s a couple of little tweaks I had to put in place to get things to work perfectly:

Bluetooth Power on Resume

Write the following to: /etc/hibernate/scriptlets.d/x301_bluetooth

x301_bluetooth_enable() {
logger "Waking up Bluetooth"
echo 1 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable
}

AddResumeHook 33 x301_bluetooth_enable

… and on that note, how many times must that particular rc.d wheel be reinvented?

(more later)


Milestones …

2009-11-11

Years ago, a personality test told me that there were two kinds of people: Process-oriented people and Goal-oriented people. Shortly thereafter, it told me that I was the latter. (It also told me I should become either a Mad Scientist or a Park Ranger, so I’m not sure how much credibility to assign it. I think it might have predated the era of Software Engineering in any case.)

Anyway, so: 3000 lines of hopefully not too awful Perl, another 3000 lines of HTML/CSS/JS. 450 commits. 63 closed bugs (and a bunch more little ones which never made the bugtracker, of course). This B2B client project I’ve been working on over the last year or so has finally finished “Phase 1″. It’s actually out there, being marketed hard by the client and currently being used by 250 or so customers.

Sure, it needs a bunch of stuff rewritten, refactored or just plain rethought. There’s some infrastructure work needs doing if its going to scale to 10,000 customers. But I’m pretty damned proud of it anyway, and its great to get to this point.

There’s 28 features currently labelled as “Phase 2″, so the job isn’t over yet …


Thought for the Evening

2009-10-29

Any sufficiently flexible methodology is indistinguishable from doing it however you feel like.


ssh tunnels with tap and -w

2009-10-23

My earlier article on ssh trickiness didn’t include mention of the newish “-w” option, which turns ssh into a full-on VPN solution rather than just a port-at-a-time port forwarder.

The useful piece of information which I haven’t seen elsewhere is this: you don’t need to allow root ssh logins to use it. Instead, you can use ‘tunctl’ to preconfigure tun or tap devices on each end with the -u option to set their permissions to a non-root user. The easiest place to do this, on Debian/Ubuntu systems, is in /etc/network/interfaces, for example:

in host1:/etc/network/interfaces

auto tap9
iface tap9 inet static
    pre-up tunctl -u nick -t $IFACE
    post-down tunctl -d $IFACE
    address 10.1.9.1
    netmask 255.255.255.0

in host2:/etc/network/interfaces

auto tap9
iface tap9 inet staticĀ 
    pre-up tunctl -u nick -t $IFACE
    post-down tunctl -d $IFACE
    address 10.1.9.2
    netmask 255.255.255.0

Now you can ‘ifup’ those interfaces, and then start the VPN by running:

user@host2$  ssh -o Tunnel=Ethernet -w9:9 host1

And the tunnel will be up and running, without needing to create the tunnel as root. You could easily take this one further for an automatic tunnel, setting up an guest user ‘vpn’ in a chroot or similar who exists only to manage the tunnels.


Virtual Localization: new work

2009-10-22

So I recently reworked my mesh network simulator to merge the “hardware” code in with the “simulator” code … so that they can share the implementation of the actual Virtual Localization algorithm. There’s some new VRML files based on simulation on mesh.zoic.org … and hopefully, in a week or so, the same code will be running on 30+ actual hardware nodes in the lab. The intention is to use the hardware nodes to provide a baseline, tune the simulation to match the hardware, and then scale out the simulation. It’ll be an interesting experiment, anyway.

screenshot


SyntaxError: keyword argument repeated

2009-09-22

This one is amusing … the case of the mysterious syntax error … turns out that repeated keyword arguments (kwargs) were illegal in python 2.4, ignored in python 2.5 and illegal again in python 2.6. This means that if some have crept into your codebase, you’ve now got a handful of syntax errors!

For example, here’s test.py:

    def foo(**kwargs):
        for k, v in kwargs.iteritems():
            print "%s: %s" % (k, v)

    foo(a = 1, b = 2, a = 3)

And here’s what happens when you run it under 2.4, 2.5 and 2.6:

    nick@pluto:~/tmp$ python2.4 test.py
      File "test.py", line 5
        foo(a = 1, b = 2, a = 3)
    SyntaxError: duplicate keyword argument
    nick@pluto:~/tmp$ python2.5 test.py
    a: 3
    b: 2
    nick@pluto:~/tmp$ python2.6 test.py
      File "test.py", line 5
        foo(a = 1, b = 2, a = 3)
    SyntaxError: keyword argument repeated

How could this creep in? Most likely through revision control mergers. Function calls with lots of kwargs are often laid out like:

    foo(
        kwarg_with_a_long_name=1,
        another_self_documenting_flag=False,
    )

Alice adds a kwarg for yadda="yadda yadda", at the start on the kwargs list, before kwarg_with_a_long_name. So does Bob, but Bob adds it at the end. The revision control system will happily merge these two changes without conflicts as:

    foo(
        yadda="yadda yadda",
        kwarg_with_a_long_name=1,
        another_self_documenting_flag=False,
        yadda="yadda yadda",
    )

And under python 2.5, neither Alice or Bob are likely to notice … after all, yadda=”yadda yadda” just as they intended.

But when the underlying system is upgraded to python 2.6, a mysterious “SyntaxError: keyword argument repeated” appears.


VRML: Very Odd.

2009-08-18

So the VRML rendering thing isn’t panning out so well. “Making the simple things simple by making the difficult things impossible”.

We’re talking, here, about a language which has a clock, but no way to display the time. You can display strings on billboards, and the billboards even point at the camera most of the time. But you can’t cast the float time to a displayable string, without calling out to Javascript anyway, and I never could get that to work the same way twice. So I made a little analogue clock where a sphere slides along a cylinder And that sort of works. Sort of. Of course, it doesn’t stay quite still either which makes it rather difficult to read.

You can interpolate the position of Things. But you can’t interpolate points in IndexedLineSets, so my poor nodes are floating there in space without the links showing. Maybe if I interpolated the center and the lengths of a cylinder for each link, perhaps? But really, surely, that’s too much work to go to for something that’s meant to be a visualization tool, not and end to itself.

Also, like it’s little friend HTML, it never renders the same way on two different platforms. And never tells you why. Argh.

Anyway, that’s my rant. There must be some way to do this. I’m sure it’d be a very simple Java applet. There’s lots of them out there. Surely someone else has DONE this.

Here’s the closest thing I can get to a VRML animation of 10 nodes converging

EDIT 2009-09-02: And a sightly nicer one with 12 nodes converging


Linux / X301 Redux

2009-08-11

So I’ve had this thing for a month or so now, and it is very very good. Some comments:
Read the rest of this entry »