Sunday, April 5, 2020

Raspberry Pi zero W on the go

I wanted a small computer that could be carried in my bag and that would provide USB master, WiFi, run Linux and I was fine with a headless setup.

The Raspberry Pi zero W has all those features for 10$. At that price it's easy to imagine using it for all kinds of other projects.
I paid more to get a complete starter kit with a wall charger, HDMI cable. It was worth it as it was so easy to get going.


Wednesday, April 14, 2010

New gadgets comparison

Well, I guess I can't resist talking about the Apple iPad. After all I have been interested in tablets for a while and I was tempted to buy a tablet instead of the EEE 701. I clearly remember the times when I wondered why Nokia could not sell a N800 with a bigger screen so I could browse on my couch.
So I really welcome the iPad even though it's not for me. That's because it defines a market that is quite close to what I wanted: a simple and reasonably cheap device that is touch enabled, can run additional programs, access the web and can be used on my couch.
To explain why the iPad is not for me, let's say I use my EEE 701 to code (python, Java), do some Skype, watch some videos, connect to USB devices and memory cards and seldom browse (because I don't have network access on the train).
Things I miss on my EEE:
  • fast browsing (at home)
  • instant on (the suspend to RAM uses too much electricity)
  • bigger screen
  • a lot of storage (to be able to have all my pictures with me)
  • good drawing capabilities (touch sounds nice)

So, even though the iPad does score a few points it's still not quite right for me and since Android tablets were available before the iPad (thanks Archos) and many new ones are going to be sold thanks to the iPad, it's pretty clear I should be able to get a cheap, light tablet where I can draw and code.

Tuesday, April 13, 2010

Old hardware is cool

I have a working prototype of my son's firefighting helicopter game in J2ME. It runs on my old Blackberry 8700. That's pretty cool as it means I might be able to find old J2ME-capable phones so that the kids can run the games easily.

The Leapfrog Didj has been sold by woot for 20$ and then 15$. That's cheap for a 393MHz ARM, 32MB of RAM and a QVGA screen... The first time around nobody was hacking it but now it has seen quite a bit of cool hacks (plug a serial console, SD card etc.) and was feature on Hack A day as part of their partnership with Woot. I think the machine could run little 2D games like the one I wrote for my son. I wonder if it would be easier to use pygames or try to run J2ME (gcj maybe?).

I also found my wife's old Palm Tungsten E in a drawer and it still works! The CPU is rather slow but it's a touch screen, and the device is really cute and pleasant. The IO possibilities are rather limited unfortunately: no WIFI, no Bluetooth, no camera, no accelerometers, no GPS, no USB host. I think I'll just install some drawing software for the kids and maybe put some MP3 on a card. There is also some IR capability so this could be used as a remote and maybe other fun uses.

Tuesday, March 9, 2010

Power Marketing

I thought I would avoid controversial subjects but I read the IBM's Power7 pitch deconstructed on The Register and they did not deconstruct enough for my taste.
While looking at the IBM slides the article showed I got the impression that some alien technology was feature as there were claims that the Power7 allowed for solutions that were 30 times better...
The article gave a few explanations but the comparison with the HP DL380 G5 really left me with the impression that something seriously wrong was going on. It was basically explaining that you could replace 71 of those servers (credited with a 36 specintrate 2006) with one Power 7 based 750 (credited with 1060).

As I was really puzzled I went to spec.org to check some numbers and did some fact checking. I indeed found a HP DL380 G5 with a specintrate of 36 but that was a 1 slot server when these machines make more sense for 4 slots (they can use 2KW after all...). The 4 CPU slot one had a score other 100...

So, obviously nobody would have 71 of DL380 with only one slot occupied.
Then the article also mentioned that the 71 machines were assumed to have a 20% load while the 750 was supposed to run at 60% thanks to the consolidation.

So basically, the slide compares the worst possible architecture to the new Power 7 to make it look like it offers out of this world performance.

With a decent architecture and a subset of the hardware envisioned, it's quite easy to see that the comparison would not be as dramatic. You could fill the 4 slots of the machines and consolidate some load to 50% load (very reasonable) and you would consolidate the bad architecture down to 7 servers.

So basically, the new Power 7 is 7 times better than some 2007 hardware on the specintrate...
It's not bad but it's not quite as impressive.

Then there is the fact that there is no specint (single threaded general benchmark) nor specfp (single thread floating point benchmark) information for the Power 7. I consider that to be very telling as IBM stopped publishing these results years ago when it was clear that their Power processors could not deliver the single thread performance of even a low end Intel or AMD processor. They had used specfp for a while but they stopped that too.
I have often used the specint to predict the performance of applications at work with good success. I can't say the same for the specintrate, though. So, I would tend to trust the specint first and get x86 hardware over Power any day.

In the end, it really looked like the slide was so artificial and tweaked that it was completely uninformative. I'll take note and know that next time I am invited by IBM sales reps I don't need to bother to attend...

Thursday, February 25, 2010

Back to Java

After writing a small Pygame game for my son, I was left disappointed with the deployment possibilities. I had to deploy python+pygame on any computer before we could play the game.
I was left thinking that web deployment would be nice. So I thought of Flash and HTML5. That's the natural cool and modern solutions.
But I don't have that many machines that can actually handle those. My older Blackberry in particular doesn't. I thought I might want to target Android too.
Then I had a shock. I could write it in Java! Something I thought was a bit passe actually.
But after a quick check the Blackberry 8700 has MIDP 2.0 which is pretty ok for 2D games. And I found a couple libraries to run MIDP code on J2SE and even Android. So turning the MIDlet into an applet that can run in a browser seems easy enough and I even get Android for free.
Better yet, I can get old BlackBerries with a broken radio from work, so I could actually give those to my kids, nephews and friends... I guess old-fashioned software has its advantages ;-)

I have now started to look into Java Micro Edition and some things are pretty nice:
  • simple APIs
  • the Java Wireless Toolkit from Sun runs fine on my EEE PC on Linux
  • the phone emulator even works fine on my EEE PC
There are a few things that are really odd.
First, Netbeans requires an emulator and does not provide one through a simple emulation of the libraries in Java. For some reason it does not automatically offer to get the Java Wireless Toolkit for you. I would really have expected that this would have been made into a Netbeans plugin.

Second, the J2ME classes have not been added to the Standard Edition. This seems crazy to me.
It would probably not have made SE noticeably bigger and the cost of implementation would have been really low. That would also have provided a reference implementation for all ME classes. Also, it would mean that J2ME is a plain and simple subset of SE. Defining related libraries in terms of subset or superset is really the best way as it's simple to understand provides the best interoperability. It would make development of ME apps simpler : no emulation, you just run your program with SE.

Another issue is that most handsets have partial or buggy implementations and only have some of the JSRs or only this or that version. There are databases that describe the various handsets and what is available but you have to pay for most of the information. This really goes against "run anywhere" part of the Java promise. The only good point is that if you have the device you can easily go to a version information screen that lists the available APIs, which is probably ok for a hobbyist.

Another platform that does Java is the kindle. My wife has one and I really like the screen so I find myself thinking of ways to deal with the slow and monochrome display.

Thursday, January 7, 2010

A little fireman game

I just started working on a fireman game for my son who is turning three soon. He likes helicopters and firefighters so I wanted to find a Leapster video game about that but I couldn't.
Then I thought I might be able to do some homebrew for the leapster. I found out that they might be using embedded flash but in the same post I learned that Leapfrog did not want any homebrew.

So I thought I would just use what was most convenient and easiest for me and installed pygame on my EEE PC. Pygame makes it really easy to work with sprites and offers a pretty good level of abstraction (sprites, transformations of 2D images, collision routines and custom events).

My graphics are pretty lame at the moment. I have not drawn on a computer since my Atari ST days and I am afraid I wasn't really awesome at the time either. I am using Kolourpaint as Gimp and Krita seemed to complicated for me. I miss the layers though, so I might switch back later on.

Sound is pretty hard. I always thought I could voice pretty cool helicopter sound effects but when I listen to myself in Audacity or in the game I am less impressed actually. I also have issues with looping as I can hear a click.

Still, I am pretty happy with my results so far and I have more ideas for educational games for my kids.

The current one is really simple: press 'w' and the helicopter goes to a lake to fetch water in its bucket, press 'f' to go drop the water on the fire. Iterate. When the fire is gone, you can press 'l' to land at the firefighter station.

I think this game is still pretty good for a really young kid and I hope it will be motivating enough to let my son learn letter/key associations.

I have other ideas:
- firetruck with ladder game. Use number pad to lift the ladder to the right level on a building
- helicopter game seen from above to teach my son about maps as he has shown some interest and understanding when looking at Google maps on my Blackberry.

Tuesday, December 22, 2009

Aiming for the Moon

This year was the 40th anniversary of the first man landing on the Moon. I have been very moved by this Apollo anniversary and it got me thinking.

I first took a picture of the Moon with my Ixus during day time actually. It was pretty impressive to start seeing details I had never noticed. Then I tried with my EOS and a 300mm zoom and managed to see actual craters.

Then I realized something pretty obvious when I managed to find the name of some craters online. The features are part of reality. That's pretty obvious I agree. But it's really striking that something so remote and that can be so easily ignored in our daily lives is actually real and that I will observe the same features that other people saw hundreds of years ago.

I have started looking into how to see more detail with some image processing. It's pretty interesting actually. A common practice is to stack pictures to improve signal to noise ratio and even increase resolution.

A rather obvious way to see more detail is to get a telescope. I have found that 25inch is about the maximum that you could buy without remortgaging your home. Obsession Telescopes sells Dobsonian telescopes for 14000$. That's 7 times more than a 16inch telescope apparently, so it's not exactly affordable. That machine resolve at about a millionth of a radian which means that one can see details of about 400 meters.

I was also impressed by how much more volume and relief I saw on areas where the sunlight was almost tangential to the moon surface as it cast long shadows. This made me wonder how much more detail one could extract by combining pictures where the sunlight is coming at different angles.

Currently it's way too cold and I don't really have the time to work on image processing but I looked into using my EOS350D and a 300mm to capture a lot of images. I plan on using gphoto2 to drive the capture.
I would like to stack the pictures geometrically: I plan on tracking the moon in the pictures and assuming the camera is steady enough I would stack the pictures based on when the pictures were taken and the speed of the moon.
The main issue with this plan is to keep the camera steady as both the mirror and the shutter can cause vibrations that can cause shifts of several pixels according to comments I have seen online.
To improve the timestamping of the pictures (1 second in EXIF), I thought of recording ambient sound and detecting the shutter sound. This provides a rather obvious and cheap way of dating the frames down to a couple milliseconds.

I guess this post must be pretty boring but to me every paragraph sums up thoughts that were a lot of fun to entertain.