Hacker News new | ask | show | jobs
by david-given 3593 days ago
I did some playing with a Kindle 3 a few years back --- I was writing programs that integrated into the native UI. I built an app which was a Javascript interpreter bolted onto a VT52 terminal emulator. You could type in programs and run them! Using the K3's fiddly little keyboard! Um, awesome. http://cowlark.com/kindle/javascript.html

This was on the 3.1 firmware, so it's likely all completely obsolete on modern devices.

...the 3.1 firmware was terrible. It was all Java based, but Java 1.4. No generics! No autoboxing! No foreach! People forget just how awful early versions of Java were in comparison to what we have today. I ended up building a toolchain using RetroWeaver to convert modern Java bytecode into something that would run on the Kindle.

Also, the firmware was based on the Personal Basis Profile 1.1. Think back, way into the past, before there were smartphones and Android and iOS... back to the heyday of the downloadable Java applet for your T9-based phone. Yup, that. Kindle apps were midlets, and anyone who remembers writing programs for midlets will be shuddering by now.

And it gets worse! The Kindle ran the entire UI, third-party applications included, in a single Java VM. It was as fragile as hell, and it tended to silt up with un-garbagecollectable data until it crashed and rebooted. If you left a thread running on application exit, it would crash and reboot. If your app hung you had to power cycle the device. I believe that the reason why Amazon never really opened up the Kindle to large-scale third party apps was mainly embarrassment.

Good times. Good times...

2 comments

I was an intern on a team that did some Kindle work in 2010 and the Java limitations at that time were definitely a very real annoyance for internal code: they didn't do anything like you are describing for Java bytecode conversion for 1p development to make it less annoying. The issue was maybe even deeper than you noticed, core parts of the API like String.substring() weren't implemented and would just throw a runtime exception.
You mean... you wrote Java 1.4 by hand?

I'm so, so sorry.

People forget just how awful early versions of Java were in comparison to what we have today.

Old school Smalltalkers don't. Especially when the CEO of the major Smalltalk vendor at the time decided to try and turn the company into a Java company. (This basically resulted in revolt and implosion of the company.)