2009-10-12

The Future

Nokia N900

I've touched it. Nokia N900 is awsome. The shape and size is that of a large phone, like the early Symbian smartphones. But it is very slick and is packed with features. It has a slide-out keyboard, a camera with a sliding cover, a leg to stand on the table, a Micro USB connector for power and data, a hardware key lock, several hardware buttons, etc.

The software side, Maemo 5, is also awesome. Looks very slick, feels responsive and ergonomic. And polished. But it's an open platform, based on Linux, X11, QT, GTK+, D-Bus. It looks like head-on competition to iPhone. Reminds me that companies the size of Nokia have the resources pull off almost anything. But it's really great that Nokia is doing it right -- in a way that is Open Source, community based, and iterative.

2009-08-20

Linux counter

Look what I have:



A five-digit, 11-years-old Linux counter number!

2009-03-12

Goodbye, Palm V

Palm Vx

Recently, my Palm died on me due to me neglecting to charge it and brought with it more than a year's worth of statistics of my car's fuel useage, petrol prices, and mileage. Surprisingly from today's standpoint, Palm's memory is not flash and has to be powered in order to keep its contents. If the battery discharges, the device returns to the factory state.

I have owned and used a Palm Vx since 2001. For the last couple of years I have been using it for only two applications: storing passwords in Keyring and keeping tabs on my cars' fuel usage with Fuel Log. Both of these programs are GPL licensed. I've migrated passwords to pwsafe on the laptop a couple of months ago. Now that the fuel log is gone, there's nothing binding me to it.
Sounds like a good opportunity to retire the Palm at last.

I will always have fond memories of this little device. A truly portable PDA, less than 1 cm thick, the weight that does not strain a shirt pocket, battery charge good for several weeks of standby time or 20 hours straight of reading of e-books (tried that). The screen is laughably low-res by today's standards (160x160 pixels). Nowadays most mobile phones have a higher resolution screen. However it was very comfortable on the eyes, and the green inverse backlight was very pretty, was very comfortable in darkness, but made the screen pretty much useless in twilight.

Oh, the thousands of pages of books I have read on this thing! It was so convenient. I had Palm with me at all times and could delve into the book I was reading at the time at each opportunity: a long line in the supermarket, in the doctor's lobby, in bed at night, sunbathing at the lake, anywhere! I could look up a rare word by just clicking on it and switching to the dictionary app. I could not agree more with everything John Siracusa has to say about the Palm e-book experience in his excellent article on the history of e-books.

Palm had a great set of PIM applications: Notes, Address book, To Do. These were really excellent and served their purpose very well.

Miraculously, my Palm's Lithium battery is still working, about 9 years from production! Other things have obsoleted the device: my current laptop (Thinkpad X61s) does not have neither RS-232 nor IrDA ports, and these two are the only communication channels on the Palm. The 8 MB of memory were enough 7 years ago to keep several books and an assortment of useful programs, but are laughable today. But even in its heyday, getting online not too comfortable: if there was no table around, you had to balance the Palm and the mobile phone on your knee with their infrared ports aligned, and the 9600 bps dialup on GSM was slow by any standards, and there was no web browser, at least a free software one.

Later offerings from Palm Inc. were faster, brighter, more capable, more powerful, and more expensive, but lost to Palm V in several important respects: size, weight, and battery life.

So, anyway, I need a new fuel log application, and I know the device where I want it. My S60 mobile phone. I also have it with me at all times, it's always on and ready to roll, and it holds its charge for many^H^H^H^Hseveral days. And i'm going to write it in Python.

2008-09-18

Hardware problems with OLPC XO-1: my 2 cents

Problem: my kid's XO wouldn't turn on. The power light would go on, but the screen would stay dark. And it wasn't just the backlight. There was no startup sound as well. Powering on while holding D-pad left did start the hardware diagnostics, but the machine turned off in the middle of the test and wouldn't come back up.

On the OLPC wiki I found excellent information on startup diagnosis, but my symptoms weren't there. The next step was to use the excellent disassembly instructions and look for a connection shaken loose or some mechanical damage.

XO is really beautiful inside. Looks very sturdy, also it looks simple and sophisticated at the same time. Mostly everything is in the top part, behind the screen. There are only ~9 wires coming from the bottom: 2 from the battery, another small 2 wire connector (battery temperature sensor or something like that) and a 5-wire keyboard cable. It took me a minute or two to identify the problem.

Solution: remove the 2 cents coin from the SD card slot!

P.S. Also, I checked out the firmware easter egg (power up while holding D-pad right). Nice!

2008-06-22

The joys of Linksys WRT 54GL

On Friday there was a thunderstorm. Usually during the storms the surge protection in my radio link antenna's power-over-ethernet power supply trips up and needs to be reset by disconnecting the PSU from the mains for around 10 minutes. This time the usual measure didn't suffice. The lights on the adapter came up, but still there was no connectivity. I reported the problem to the ISP's tech support. The next day the engineer rang up and said that he can connect to the dish at my side.

I connected a laptop directly to the uplink cable, configured the static IP address. Lo and behold, the pings go through. Apparently the uplink Ethernet port on my OpenWRT router got fried.
Luckily, this router does not just have an uplink port and four lan ports, it has a programmable switch and an open firmware (OpenWRT 7.09 "Kamikaze") lets me tap into it.

I looked at /etc/config/network, and found the following lines at the top:

#### VLAN configuration
config switch eth0
option vlan0 "0 1 2 3 5*"
option vlan1 "4 5"


vlan0 is the internal lan, 0-3 are the external lan ports, and 5 is the host port. vlan1 connects the uplink port (4) to the router (5). The asterisk probably means packet tagging. As the router internally has just one physical ethernet port, the internal and external interfaces are virtuals employing the same physical interface. Their packets are distinguished by tags.

So, I changed the config thus:


#### VLAN configuration
config switch eth0
option vlan0 "0 1 2 5*"
option vlan1 "3 4 5"


I rebooted the router and plugged the blue uplink cable into the first LAN port (the numbering of the holes on the router is backwards). Tada! Here's my Internet connection again!

2008-06-19

Huawei E220 USB HSDPA modem on Linux

Tested on Ubuntu Hardy. When you plug the modem in, things happen:


[ 1872.829603] usb 5-2: new full speed USB device using uhci_hcd and address 11
[ 1872.988741] usb 5-2: configuration #1 chosen from 1 choice
[ 1872.998189] usb-storage: probe of 5-2:1.0 failed with error -5
[ 1872.998226] airprime 5-2:1.0: GSM modem (1-port) converter detected
[ 1872.998441] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 1873.006403] usb-storage: probe of 5-2:1.1 failed with error -5
[ 1873.006437] airprime 5-2:1.1: GSM modem (1-port) converter detected
[ 1873.006615] usb 5-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 1873.057365] scsi30 : SCSI emulation for USB Mass Storage devices
[ 1873.058803] usb-storage: device found at 11
[ 1873.058810] usb-storage: waiting for device to settle before scanning
[ 1876.078727] usb-storage: device scan complete
[ 1876.082294] scsi 30:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 1876.117573] sr0: scsi-1 drive
[ 1876.117674] sr 30:0:0:0: Attached scsi CD-ROM sr0
[ 1876.117754] sr 30:0:0:0: Attached scsi generic sg1 type 5


As you can see, we get two serial ports and a CD-ROM drive. The second serial port and the CD-ROM drive can be ignored. PPP works straight away with the following config:


noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/e220"
debug
/dev/ttyUSB0
230400
crtscts
defaultroute
noipdefault
user ignored
remotename whatever
ipparam whatever
usepeerdns


Here's the e220 chatscript (put in into /etc/chatscripts, replace the "****" with your pin code, replace "omnitel" with your provider's APN):


# Chat file for Huawei E220 HSDPA USB modem
ABORT BUSY ABORT 'NO CARRIER' ABORT 'NO ANSWER' ABORT DELAYED
'' AT
OK AT+CPIN="****"
OK ATX3
OK 'AT+CGDCONT=1,"IP","omnitel"'
OK ATDT*99***1#
CONNECT ""

2008-06-08

New phone

Got a new phone

I got a new phone on Thursday, Nokia 6120 classic. It is my first Series 60 phone. I have been a loyal Nokia user for around four years now, mostly because of the ubiquity and universality of Nokia chargers. During the whole time they were producing GSM handsets, Nokia has changed the charger connector only two times. Each time the change was motivated by miniaturization.

Series 60 3rd edition is very nice. The UI metaphor is different from Series 40, but it's quite intuitive and comfortable. Surprisingly, there's no stopwatch app, but of course there already are too many Stopwatch apps for S60 on the web. Should I write another one? :-) There's a snag that this phone is not yet supported by Gnokii/Gammu/Wammu, so I had to install the Nokia PC suite on Windows in order to transfer my contacts from my old Nokia 6230i. Know what? It was not flawless. Getting the contacts from the 6230i was easy (if we ignore the constant Vista disk grinding), not so with restoring the backup on the 6120c. It took Nokia PC suite 3 attempts to create the Bluetooth pair, install the drivers on the PC and on the phone, and connect to the phone.

The phone has all the 3G technologies: UMTS, HSDPA. During my first Internet connection test on a late Thursday evening speedtest.net indicated 1.2 Mbps down and about 100 kbps up with a 3.5G (HSDPA) connection. On a Saturday night though the speed fluctuated between 300-600 kbps on average, and it took a couple of attempts to establish an HSDPA connection, I would get EDGE instead. I'm using the Bitė GMS network. We'll see how things will go with Omnitel.

Yesterday I installed Python on the phone. I set up and played with a Bluetooth console. The Hardy bluez-utils are broken (see Ubuntu bug 211525), so I had to install bluez-utils from Sid. The Bluetooth console is much more convenient than banging in Python code on the phone keyboard, but it does not have readline.

I got an impression that Nokia wants people to use Python on Series 60 very much. They try very hard to make it easy, provide all sorts of docs, even multimedia tutorials. Probably they see the ease and accessibility of Python as a path to widespread platform adoption. The Python API has easy access to most of the phone's functionality, including the GUI toolkit, camera, bluetooth, networking, messaging, contacts and so on. I have an impression that cooking a homebrew contacts backup/restore application in Python will be pretty trivial. I cannot start hacking away as Python looks for modules on the flash card, and I haven't bought a microSD card yet. On a positive note, it's nice that this time Nokia didn't include a cheap claustrophobic-sized card. They're useless after you buy a real card, but hard to throw away, so they contribute to cruft accumulation in life.

Unfortunately, Nokia only provides the platform SDK for Windows, but there are ways to use the GNU toolchain in combination with the SDK and some Wine.
The SDK is needed in order to package Python scripts as SIS installable files. Even then, I'm not sure it will work, as Series 60 3rd ed. only accepts packages signed by a registered developer. There should to be a way to play with your own software, no idea yet what's involved.

2008-04-30

Seasonal headache: ABBYY eFormFiller 2.5 on Linux

The beginning of May (May 6 this year) is the deadline for income tax declarations in Lithuania. Our tax inspection accepts paper forms, has a lame web interface, and offers a Windows program that looks nice, calculates all the derived values for you, and has validation. There are some problems with running it on Wine. Last year I tried getting it to run for a couple of hours, then gave up and booted Windows on one of the laptops.

This year around, I made an effort and finally got it to run. Here are the commands that made the cut for me (Ubuntu Hardy, Wine 0.9.59):


mkdir /tmp/formfiller
cd /tmp/formfiller
wget -nv http://deklaravimas1.vmi.lt/eFormFiller25v6_2008_03_06.zip
unzip eFormFiller25v6_2008_03_06.zip
wget -nv http://kegel.com/wine/winetricks

export WINEPREFIX=~/.wine-eFF/
wineprefixcreate

sh winetricks dcom98
sh winetricks win98
sh winetricks riched20
sh winetricks vcrun6
sh winetricks wsh56

wine setup.exe /q

wine $WINEPREFIX/drive_c/Program\ Files/ABBYY\ eFormFiller\ 2.5/FormFillerLight.exe


I hope it will be useful to somebody.

Update: naaaah, it works with the last year's income tax form, but doesn't with this year's. Time to boot Windows again :(

2008-04-02

Oh, the convenience!

I was browsing around for hotels close to the Europython 2008 conference venue (Reval Hotel Lietuva). I remembered that the classic Soviet-decorated Neringa hotel is 10 minutes away, just across the pedestrian bridge between the banks of Neris. Unfortunately, Scandic Neringa does not have any rooms available for the duration of the conference, but they suggested another hotel nearby.



Your daily commute: 1250 km in each direction.

2008-01-11

Schneier on open WiFi

I've been running an open WiFi network at home (and at the office as well). Turns out, the security guru Bruche Schneier does the same, as he writes in his article "Steal This Wi-Fi". Not only Schneier puts down in words my own vague moral arguments for doing so, but also assesses the risks associated with the practice of running an unsecured wireless network.

So, whenever you come by my house, be my guest and use the WiFi. By the way, my ESSID conveys this in Lithuanian: "Skanaus".

2007-12-19

So true

Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly. -- Steve Yegge

2007-10-05

Personal DNA

I took the Personal DNA test today.

2007-10-03

Bugs on da house

As promissed:






Façade-salade

Last week we had the façade of our house painted. We wanted a lively colour, but misjudged the one we've chosen a bit. Now our house glows in sunlight like a green pack of Skittles. The photos don't convey the real intensity of the colour. Ladybugs and caterpillars are mistaking it for a giant off-season lettuce leaf. Photos of said insects might follow.

2007-07-05

Learn from the Masters

Here's a little gem of a Python line from Phillip Eby (setuptools.package_index):

self.index_url = index_url + "/"[:not index_url.endswith('/')]

Kids! Don't do this at home!

2007-06-15

Nabokov invented the smiley in 1969!


Alden Whitman: How do you rank yourself among writers (living) and of the immediate past?

Vladimir Nabokov: I often think there should exist a special typographical sign for a smile-- some sort of concave mark, a supine round bracket, which I would now like to trace in reply to your question.


Nabokov's interview. (11) The New York Times [1969]

2007-05-31

My Honda Civic

My CivicI got myself a red '91 Honda Civic (4th generation) at the end of April. Why would I go and buy a 16 year old car? Well, my brother got a black one in winter. I figured it's a hell of a car for 2000 Lt (around 750 USD). A neat, high tech, lean burning, economical 1.5 L engine that cranks out 66 kW (90 hp). Double wishbone suspension on all four wheels. Great overview in all directions. Low center of gravity and driving position. A peculiar, even a bit awkward, design. And it just about fits a 250 cm windsurfing board along the passenger seat!

Another intriguing thing about Honda Civic -- there's a whole subculture of modding enthusiasts. Honda's D series engines are all pretty similar in many ways, allowing relatively easy "swaps" of the whole engine or its parts in order to achieve more power or better fuel economy. So, once I get a garage with power, I'll swap my dual point injection for a real full injection system. About $100 worth of parts, a bit of wrench work, some wiring changes, and -- tada! -- 10 hp more.

I bought mine without having tested it on the highway, so there was some work needed to get it accelerate better than a trolleybus. :-/ Now it's still far from the official manufacturer figures, but better than it was.

2007-04-19

Debugging page templates in doctests

Sometimes you get a page template error in doctests. The traceback does not point to the place in the page template that caused the error. Here's a quick, dirty and effective three liner to figure it out:

>>> import traceback
>>> from zope.exceptions.exceptionformatter import print_exception
>>> traceback.print_exception = print_exception

Hello world

CatapultSo, here is my new blog. Welcome, readers!

What will this blog be about? I have no intention of centering on any particular topic, so expect an eclectic mix of posts on my interests: Zope 3, software development in general, windsurfing, photograpy.

A couple of words on naming. alga and albertas blog names on blogspot.com are taken by selfish irresponsible people who have posted one entry three years ago. LTU-42 is my sail number, so at least my windsurfing companions will recognize this as my id.