Friday Jun 13, 2008

Not All DVI Cables Are Created Equal

Earlier in the week, I downloaded the Big Buck Bunny movie onto my wife's new MacBook. We wanted to try the new mini-DVI to DVI adapter cable that we'd bought (via the online Apple store), to hook it up to our TV and watch it on the "big screen".

Wasn't I miffed to find that the female DVI plug on the end of the adapter cable wouldn't connect to the male DVI plug on the end of the cable coming out of the TV. From the blurred pictures above, you can just see that the male DVI cable (first picture) has some extra pins above and below the "bar" pin and the female plug (second picture) doesn't have matching holes for them to go into.

Luckily that cable out of the TV nicely works with the DVI external monitor plug (third picture) on my Powerbook, but we ended up watching a lower-res version of the movie (not that big a deal).

So I have a multiple choice question:

Question: Why didn't this work?


  1. That's a really old cable you've got there (you idiot). The DVI standard nowadays doesn't have those extra pins around the "bar" pin on male plugs.

  2. That's a bad design for the mini-DVI to DVI cable Apple (you idiots). Didn't you realize that there are male cables out there with pins on either side of the "bar" pin?

  3. In order to get this to work with your existing cable, you are (somehow) going to need to remove those two pins around the "bar" pin.

  4. All of the above.

  5. None of the above.

If the answer is 3 or 4, how can I easily remove those bogus pins? Or should I just go out and buy yet another new cable?

Correct answers very much appreciated.



Wednesday Jun 11, 2008

eeeBook Reader

After deciding that the Amazon Kindle wasn't for me, and thinking that I could do the same thing with an Asus Eee PC, I've now had a chance to try it out. Apologies for the poor quality of the picture. My arms aren't long enough to take a better one.

I install acroread, rather than use Evince as the latter still has problems with several PDF files I've tried. I put a sample book on my SD card, plugged it in and displayed the PDF file, rotating the document 90 degrees clockwise and putting it into full screen mode.

It works well. The Eee is only two pounds in weight (lighter than the hardback I'm currently reading). I can click on the left "mouse" button to get to the next page, so "reading' is not to unnatural. After a while you do start to hear the little fan but it's not that loud.

I'll also be able to do a similar thing with FBReader for some of my other eBooks that are not in PDF format.

I realize that I won't have quite the ease-of-download that the Kindle provides, but I'll sure be able to do a lot of other things with my Eee besides just reading eBooks.

If you are wondering what the book is, it's called 100 Simple Secrets of the Best Half of Life. The basic premise is "don't worry, be happy". It made a nice change from all the depressing AARP literature that's been filling up my mail box recently.




Sunday Jun 01, 2008

Wii Wireless Now Working

What a difference 9 months and a system update makes.

Last August, when I tried wirelessly connecting to the Internet using our Wii, it didn't work. Instead, I ended up buying a Nin Wii USB->LAN adapter and setting up a wired connection.

Today Duncan wanted to try out a couple of the newer Wii channels, so we moved the Wii into the office again, setup the wired connection and he played around for quite a while.

While we were there, I did a Wii system update. I then tried the wireless connection again. Initially it failed, but I cleared out the settings, and got it to look for our access point again. I reinserted our WEP key and it found our wireless network!

The big test was to then take it back into the TV room, setup it all back up and try again. The TV room is quite a distance from the Linksys WRT54G. Amazingly, it's all working fine. I can only assume that Nintendo have found and fixed a bug when trying to connect to this type of router.

Duncan's happy. He's now lying on the couch trying to decide how to "spend" a 1000 Wii points.




Sunday May 25, 2008

Making Things Talk - Project 1

After going through the various Hello World programs that are described in chapter one of the in the Making Things Talk book, I moved on to the first real project. The goal here is to take a small pink monkey called monski, attach (or implant) a couple of flex sensors to its arms, and use them to control the two paddles in a video pong game running on your computer. If you don't have a small pink monkey, any other small stuffed animal will do.

I'm hoping with the various projects in this book, that I can do a lot of them with just the components that came in the kit I bought at the Maker Faire, or with stuff that I've bought or scavenged since I first became interested in electronics.

The kit didn't include any flex sensors, but there were a couple of pressure ones. With no pressure, reading these sensors returns a value of zero. As you apply pressure, that number increases. The highest value I got out of them was 750. What's also nice about these sensors, is that you can just plug them directly into the breadboard, so no stuffed animals were harmed in the making of this project.

I didn't have two momentary switches either, but I did have a couple of simple ones. I used them instead. They are used by the game to reset the scores and serve the ball. I also had a nice breadboard, and a wire jumper kit.

After assembling the circuit, I used the Arduino development environment to download their simple code to read the two sensors and two switch values.

From there, you progress to getting the video pong game (running inside the Processing development environment), talking to the serial USB port, reading the sensor/switch data and responding accordingly.

Final step is to establish a proper handshake between the video pong game and the code running in the microcontroller. In other words, when a carriage return in sent to the Arduino, it returns the values of the two sensors and the two switches, rather than the Arduino continually sending out the data and causing the Processing application to occasionally lag.

All the code you need is available to download. The author might automatically have the Arduino on serial port 0, but it was on port 2 for my old Powerbook. Because the pressure sensors are returning different values that those that would have been returned from the flex sensors, I had to adjust the min/max values in the code. Also, because a value of zero (no pressure) positions the paddle at the top of the screen, to make it look nicer, I moved the position of the two score values in a bit.

It's all working nicely. Purists will no doubt knock off points for not using red and blue wiring, but I went with what I had got available. The next step, is to build the Proto Shield, stick the tiny breadboard on it, and adjust the circuit to work with that.

Then onto project #2.




Friday May 23, 2008

Try Ruby! - An Interactive Online Ruby Tutorial

I spent some time today, starting to learn Ruby, something I've been meaning to do for a long time.

There is an interesting online tutorial available.

If you've heard of Ruby, but didn't know exactly what it is and you have limited time to find out, then this tutorial is a good starting place for you. It'll take about "15 minutes".

It helped that I knew Python, but there is nothing hard here. For me, it was a way of learning Ruby's syntax more than anything else.

The time estimate seems a little off. I also took a few notes as I was doing it, so I ending up spending way more than 15 minutes on it.

  • The bouncing prompt line, is very irritating.

  • Certain Ruby method and command names felt strange ('downcase' and 'require' for example), but it was fairly obvious what they did. Ruby's way of presenting arguments after the method name also felt strange. I'm so used to putting parentheses around them.

  • poem.delete didn't want to work for me (ArgumentError: wrong number of arguments). I wasn't sure if I misunderstood it, got it wrong or it was just plain broken.

  • I never did get the double dot prompt after typing in"/home/comics.txt", "a") do |f|. In fact it took me 2-3 attempts to get to the next tutorial page.

  • Being able to paste at the interactive prompt would have been nice, but maybe by not allowing this, it's forcing you to make sure you type the correct syntax.

  • Inconsistencies with the Regexp expression on one screen (/cadillac/i in one place and /giraffe/i in another).

  • I could not get it to continue past the page where it displays you blog entries in the popup browser. It's obviously looking for some trigger event that I'm not giving it.

In short, this interactive tutorial, is a nice idea, but it needs a few more tweaks and a bit more bullet-proofing to make it easier for newbies like me. But at least it gave me a feel for the language (even though I know I'm just scratching the surface).


Wednesday May 21, 2008


Make3D converts your single picture into a 3-D model, completely automatically.

To quote their web site:

It takes a two-dimensional image and creates a three-dimensional "fly around" model, giving the viewers access to the scene's depth and a range of points of view.

How does it work?

It uses powerful machine learning techniques to learn the 3-D structure of a scene as a function of the (single) image features. The team at Stanford University, led by Ashutosh Saxena and Andrew Y. Ng has made the code available online; see more details here.

Here's a gallery of their public 3-D generated images.

You can also download their source code and learned parameters (needed for running code).

I thought I'd give it a try, but just via their web site. I uploaded an image taken in Monterey in February last year.

I was informed that conversion is a batch process, I was #11 in the queue, and that I'd get an email when processing was complete.

That was 11 hours ago. Hmm.

Maybe I should download their source code, build it and try it myself. It could be quicker.


Monday May 19, 2008

Laptop Shuffle

Last week, my wife got a new MacBook (maxed out at 4GB memory and 250 GB of disk). A really nice computer. Duncan now gets her old iBook (768 MB memory and 60 GB of disk), and I get his old HP pavillion xt125 (256 MB memory and 20 GB of disk).

I don't plan to use it as my main laptop (I have a Powerbook for that), but I thought I'd set it up as a spare laptop that can be used around the house.

I thought about putting OpenSolaris 2008.05 on it, but the system requirements say you need a minimum of 512 MB of memory. Ouch.

I looked at Ubuntu 8.04 LTS (a.k.a. Hardy), but the recommended minimum requirements is for 384 MB of memory (although it does say the bare minimum is 64 MB, but "it is unlikely that the system would run well").

I burned the latest live CD for Damn Small Linux, all 50MB's of it, and there is no doubt that this boots fast and runs well, but most of the graphics look so 1980's, and it's unclear that the hacked on version of Firefox would be able to cope with some of the latest Web 2.0-centric web sites. Not for me.

I used the Kingston Memory Searcher to see if I could find some memory for it, but it doesn't know anything about this machine.

So I just put Windows XP back on it, from the initial set of CD's that HP supplied with the laptop. All 7 of them. I took off all the crap that they insist on installing, and loaded up essentials like the latest Firefox, iTunes, Quicktime and Acroread.

It started doing it's Windows updates. I had a quiet chuckle on one of the Security Updates ("Installing 1 of 92").

So I have a nice old clunky laptop that can be used to browse the web, play music, read eBooks etc. It's also one I don't mind taking in the garage and using to display build instructions (such as these), the next time I want to put something together.

But it's clear that the days are numbered for laptops such as these.



Tuesday May 13, 2008

Making Things Talk - Hello Worlds

I've been reading Making Things Talk that I bought at the Maker Faire ten days ago. As well as the book, the kit I purchased included an Arduino and various other electronic components that would be useful with said microcontroller platform.

Chapter 1 of the book is a variety of Hello Worlds to make sure that everything is working okay. Thankfully all the source code examples used in the book are available for download.

The first thing to get working is Processing:

"Processing is an open source programming language and environment for people who want to program images, animation, and interactions."

It's based on Java and was easy to setup and run the two sample programs. It looks like a fascinating language. I could see myself tinkering with it quite a bit.

I initially started trying to do all this on my Ubuntu Hardy system, but one of the other things that had to be setup is the Arduino Development environment and that's got a problem with Ubuntu Hardy by default:

"You need to uninstall braille support if you want to use /dev/ttyUSB0: just remove the package brltty in Adept, and the USB port will be available for communication with Arduino."

As I need Brltty for my day job, that was no good, so I just swapped over to using my Mac laptop and got the Arduino software (and Processing) working there. I plugged the Arduino into one of the USB ports, added a red led between pin 13 and ground, uploaded a small example program to flash it every second. That all worked fine.

The other main Hello World in this chapter was to setup a machine as an Apache server and enable PHP. That was about two minutes work (including downloading and installing the software) using Hack #96 in the Ubuntu Hacks book.

Before I go on to the first real project in the book, I'm going to build the Proto Shield that also came in the Maker Faire kit. Ladyada has some really nice instructions that should make this easy. Let's hope I haven't forgotten all my soldering skills.

More when I get into doing really interesting Arduino stuff.




Thursday Apr 03, 2008

Reading uif And chm Files Under Ubuntu

I came across two files types earlier this week that I hadn't seen before. <filename1>.uif and <filename2>.chm. Luckily there is a nice web site that has a potted history of them (uif chm).

There is a Windows program called MagicISO that will allow you to extract files inside a uif file. And it "just works" via Wine on my Ubuntu Horny Hippo system.

With the chm files, there is a wonderful little Google Code program called chm2pdf that will nicely convert the files to PDF which I can then read with evince. It's still got a couple of things that need to be fixed. The page numbering is all shoot to pieces and it really doesn't like it if the original chm file has spaces in its name, but I can live with the first one and a simple rename before trying to do the conversion solves the second one.

(I also found that FBReader nicely reads chm files too).


Sunday Mar 30, 2008

You Know You're Tired When ...

you bring up a screenshot of a desktop which has windows on it with scrollbars, and you keep clicking on the scrollbars and wonder why they don't scroll the window contents.

Time for a nap.

Friday Mar 21, 2008

Amazon Pet Peeve

Or maybe just "kudos to Google".

You've all seen when you do a Google search and you accidentally spell something wrong (and also when you have a spelling that's not the normal one), then Google will prompt you with a "Did you mean: ........" link.

Why can't Amazon do that? Maybe just in the case where it doesn't find any results. Yesterday I was trying to find their web page for Ripley's Curioddities. I kept misspelling it. Rather than come back with a "Did you mean:" page, it comes back with "Your search "ripley's curiodities" did not match any products.'. Then it displays three best seller links, like I'm going to have a bout of attention deficit disorder, forget what I was searching for, and go off and buy something else.

How hard would it be to actually really help the customer here?

On the same page, I see they have a "Have a shopping question? Try askville, it's free". Maybe I should ask there, though I suspect I already know the answer.




Monday Mar 10, 2008

New Chief Maintainer For Gcalctool

I just announced this on the GNOME devel-announce-list mailing list. I'm not sure who that goes to, so I thought I'd announce it here too, so that at least readers of Planet GNOME will get to see it.

Starting with GNOME 2.23, Robert Ancell will be taking over as the chief maintainer of gcalctool, the default calculator that comes with the GNOME distribution.

For GNOME 2.22, Robert did an excellent job of converting the gcalctool UI to use Glade, becoming intimately familiar with the code in the process. Since then he has continued to support gcalctool, and I thank him for his time and enthusiasm.

I know he has lots of great ideas for future work too.

I will still be around to make sure that the transition is as smooth as possible and to occasionally provide a bug fix or two.

The first version of this calculator was written in 1986. It's still out there on the net. It's come a long way since then. It's certainly more that 300 lines of code and 1/2 MB in size nowadays.

I'd like to thanks everybody who has helped make [g]calctool what it is today. See the AUTHORS file in the latest source distribution for a potted history.



Friday Mar 07, 2008

Free Simple To Use Video Editing Software?

Duncan has a book report presentation on Monday. One of the options is to create a video rather than speak directly to his class. He'd like to do that.

Last night with the help of an iSight camera attached to my Powerbook, QuickTime Broadcaster and the excellent instructions on the O'Reilly web site, we worked out how to capture the video in MPEG 4 format.

That's fine, but there are some bits that we'd now like to remove. I'd also like to add initial titles and if possible, fade-out / fade-in between "scenes".

If you haven't realized by now, all of this is new to me. If I had the luxury of more time, I'd be happy to use something like the Digital Video For Dummies and try a few experiments. For now, I'm looking for free, simple to use software that will make these tasks easy and quick.

I copied the video over to my Ubuntu system and loaded up Avidemux and worked with their wiki and was able to successfully cut out some of the pieces that we didn't want, but due to my inexperience, it was a bit of a hit and miss affair. I still haven't worked out how to do the other things.

Anybody got any recommendations for free, easy to use alternatives? For Windows Xp, Mac OS X Tiger or Ubuntu Hardy.

I thought there would be a time when I'd have trouble helping my son with his homework, but I didn't expect it to be while he was still in fourth grade.

Any pointers would be very much appreciated.



Thursday Mar 06, 2008

What's In Gcalctool For GNOME 2.22

We'll all be cutting our tarballs for GNOME 2.22 on Monday. This release will see several major changes to the default GNOME desktop calculator. Many thanks to Robert Ancell and Sami Pietila for their help in making these improvements.

I sent the following to Davyd Madeley for inclusion in the GNOME Release Notes. Note that these are just the highlights. There have been a lot more bug fixes integrated as well.

  • Gcalctool now uses Glade for its user interface. This will make it easier and quicker in future to make UI fixes or add new UI features.

  • The number of significant numerical places has been increased to 99 and the number of displayable digits has been increased to 200.

    (Note that if you have problems seeing the first digit in the display area, this is Gtk+ bug #482688).

  • The keyboard shortcuts for the hexadecimal digits have been changed back to "a" - "f".

    With copy/paste operations, where the user is pasting a string into gcalctool, the copy buffer is now iterated over. If an "A", "B", "C", "D" or "F" character is encountered, it will be converted to its lowercase equivalent. If an "E" is found, and the next character is a "-" or a "+", then it remains as an upper case "E" (it's assumed to be a possible exponential number), otherwise its converted to a lower case "e".

    Displaying of hex digits in the gcalctool display will still be in uppercase. Displaying of the "e" in an exponential number will still be in lower-case.

  • The following functions have also had their keyboard shortcuts changed:

          [A] - Set accuracy
          [C] - Change sign
          [D] - Double-declining depreciation
          [E] - Enter an exponential number
          [F] - User-defined functions

  • The way to enter exponential numbers in arithmetic precedence mode has changed. The following four examples should show you the new correct syntax:

            1  2  Exp + 8  =              1200000000
          - 1  2  Exp + 8  =             -1200000000
            1  2  Exp - 8  =              0.00000012
          - 1  2  Exp - 8  =             -0.00000012
  • In both left-to-right precedence and arithmetic precedence modes, if the user enters a numeric digit that is incorrect for the current numeric base, this isn't allowed and is not entered in the display.

  • There is now a cursor in the calculator display area. It understands the Home and End keys. This is in arithmetic precedence mode only. You can also "hand edit" the display by moving the position of this cursor.

  • A "Reset to Default" accuracy menu item has been added.

  • When the bit calculation extension is enabled, a message now appears in the status bar.

  • The Delete key is now used to delete the character to the right of the cursor in the display area. To clear the display area, use Shift-Delete.

  • The help menu shortcut has changed from Ctrl+H to F1 to match the Human Interface Guidelines (HIG).

  • There have been many changes to the online help. They include:

    • The various screenshots have been updated to reflect all the latest changes.

    • Square root documentation has been updated. The entry now includes examples for both arithmetic precedence and left-to-right precedence modes.

    • The logical operations, And, Not, Or, Xor and Xnor now use uppercase letters (AND, NOT, OR, XOR and XNOR) for both the buttons and in the display area in arithmetic precedence mode.

      The result for the AND example is now correct.

      The syntax for using NOT in arithmetic precedence mode is different then for left-to-right precedence mode. The online help example has been updated to show both examples.

    • Updated the documentation for bit calculating extension.

    • Updated the documentation for Changing Modes Clears Calculation.

    • Added in a new section titled "Changing The Display Area" and updated the keyboard shortcut for the Clear operation.

    • Adjusted "monthly interest rate" to "simple monthly interest rate" for two of the financial examples.



Whither Decent/Working Amazon API For Amazon Associates Web Service?

I have several small Python scripts that use the Amazon E-Commerce Web Service 3.0 to do things like read my Amazon wish lists and lookup books via their ISBN numbers.

Last week I received an email from the Amazon Web Services folks. It states:

We are writing to remind you that the Amazon E-Commerce Web Service 3.0 will be deprecated on March 31st, 2008. Our monitoring indicates that your Subscription Id was passed into calls to Amazon E-Commerce Service 3.0 between February 17th and 24th, 2008. After March 31st, 2008, we will no longer accept Amazon ECS 3.0 requests. Please upgrade to the Amazon Associates Web Service (previously called Amazon E-Commerce Web Service 4.0) by then to ensure that you or your customers are not affected by the deprecation (if you migrated your application after February 24th, 2008, you will be unaffected). Please also note that none of the links you generate from Associates Central are affected by the deprecation. Any links, widgets or banner ads that you may have on your site will continue to function after March 31st.

Their meaning of "deprecated" is obviously different than the Java API's, where deprecated methods continued to work for several years.

It's true that Amazon have given fair warning about this change which was announced in February 2007. They even point to a migration guide.

My usual approach to things like this is "if it ain't broke, don't fix it", but it really looks like this is going to break in about 3-4 weeks, so I've been doing a bit of research.

I see nothing in the Amazon migration guide that points to new Python API that would help here. I have been using pyamazon and on that web page it states:

Kun Xi is starting a fork of PyAmazon to support some of the new features of AWS 4.x. This project is being hosted on Sourceforge. Initial code is available at:

The link is wrong. You can find it here.

I had a look at that. I got his example to work, but it really does seem incomplete. (He calls it pre-alpha for a reason). The documentation is sparse, and there aren't a lot of examples. Because of this, perhaps I'm not understanding how it fully works, but I don't see the equivalent of pyamazon calls like:

       books = amazon.searchByASIN(asin)

So what are people using to access the new Amazon Associates Web Service? Is there a simple decent working Python API? Is there something somewhere that can easily map the old pyamazon API calls like:

        books = amazon.searchByASIN(asin)
        results = amazon.searchByWishlist(amazonWishListID, page=pageNo)
        books = amazon.searchByAuthor(author, page=pageNo)

to similar easy-to-understand new ones?

Inquiring minds wanna know...







« July 2016