Active Reactor watches

November 8, 2005
1 comment Misc. links

Active Reactor watches This is definitely unique and you can guarantee that if you have one of these you'll get so much close-range attention and comments like "you're weird". It'll also be a guaranteed ice breaker conversation topic. Or like they say on their website:

"Stranger than your mother-in-law, the all new Radio Active watch just hit the stores in Japan, featuring an all new unique way to display the time. Looks hard at first but trust me after about one day, you can tell the time almost as fast as a regular watch. Guaranteed that everyone who sees it will ask you about it."

It's only ¥11900 ($100 US dollars or £60 British pounds) and my watch is starting to fall apart. Perhaps this is what I should get next!

Screencasting the unix way with Python

November 5, 2005
0 comments Linux

Yesterday I wrote about my first screencasting test but I've now found something even cooler. It's called pyvnc2swf. It's a Python script that intercepts a VNC connection to record the screen. I haven't tried it yet but I will soon because as I mentioned in my previous post Camtasia Studio only works on Windows and I only use Linux.

If you want to see it used in action, check out Ian Bicking's screencast about ajaxy exception catching

Screencasting test

November 5, 2005
0 comments IssueTrackerProduct

I think there's a lot of potential in screencasting. As far as I've understood, screencasting is when you make a movie recoding in some manner of what happens on the computer screen. To test this I downloaded Camtasia Studio 3 and as a demo I created a new Issue Tracker instance on www.issuetrackerproduct.com. The next time I do this I'll make sure I plan what I want to do instead of just making it up after I've started. On this windows computer that I tried this it lagged so incredibly much that it was to move the mouse because it didn't move smoothly. Perhaps there are some further options to free up some resources to make it run better.

If you want to see the result (as a Flash movie) follow this link (1.2Mb)

Truncated! Read the rest by clicking the link below.

Whitelist blacklist logic

November 2, 2005
7 comments Python

Tonight I need a little function that let me define a list of whitelisted email address and a list of blacklisted email address. This is then "merged" in a function called acceptOriginatorEmail(emailaddress) which is used to see if a particular email address is acceptable.

I've never written something like this before so I had to reinvent the wheel and guess my way towards a solution. My assumptions are that you start with whitelist and return True on a match on the blacklist, then you check against the blacklist and return False on a match and default to True if no match is made.

This makes it possible to define which email addresses should be accepted and which ones should be rejected like this:


whitelist = ('*@peterbe.com', 'bill.gates@microsoft.com')
blacklist = ('*@microsoft.com')

Truncated! Read the rest by clicking the link below.

www aliases set up

November 1, 2005
1 comment This site

I've now set up alias to www.peterbe.com such that ww.peterbe.com and wwww.peterbe.com both redirect to www.peterbe.com.

We'll see what effect this might have and if it's worth. I guess 99% of all visitors on this site get it right but this tightens the "fool-proofness" even more. Google have one such alias set up on ww.google.com but not wwww.google.com

Using MD5 to check equality between files

October 28, 2005
11 comments Python

To some Python users this is old-school old-news stuff but since I've never used it before I found it worth mentioning.

I have a script that scans a rather large tree of folders filled with files. None of the folders have the same name but they can mistakably contain the same files eg:


folder XYZ-2005-11-27/
   email1.bin
   email2.bin
folder CBA-2005-07-10/
   email1.bin
   email2.bin

Sometimes two different folders contain the same file names exactly. Sometimes, the file sizes as equal too. But in some of those cases, even though the file sizes and names are the same they are different files. But! If they are the same files just in different locations I want to find them. How to do that?

Truncated! Read the rest by clicking the link below.

Shane's Bit Mountain

October 25, 2005
0 comments Linux

Ever worried about how to handle a 20 Petabyte (that's roughly 21 million Gigabytes) digital archives? Shane Hathaway has. As far as I can see it's only a research project without any beta code so far but it sure is geekily exciting in a way.

He mentions one of problems with this and for that you don't need a double PhD to understand:

"Power is a large concern. 20 PB worth of spinning hard drives would incur a power bill in the neighborhood of $100,000 per month. Over time, that power bill could even exceed the hardware acquisition cost."

Even though it's just a rough estimate it's still quite fascinating.

Pandora (followup) Neat error messaging

October 23, 2005
0 comments Misc. links

Yes, Pandora is great but it too can make mistakes. All software make mistakes. When that happens it's important that you deal with the mistake/error in a constructive manner. Firstly you have to have your debugging tools set up to alert the developer(s) of the error with full details and correct integrity and secondly you need to report back to the innocent user a message (and in some cases a good plan of action for the user to take).

Pandora seemed to be struggling today when I started it and since I haven't seen that before I took a screenshot of the error message and here I write about it. What's good about this error message?

  • it's honest ("We're having unexpected technical difficulties")
  • it's informative with a twist (they're informing the user about what they're doing about it with a comical twist "scrambling to fix things")
  • it's instructive ("Please try again later")

Pandora - a great Internet radio

October 21, 2005
0 comments Music

I've been using Pandora for a while now. It's a Internet radio station where you create your own stations. When you start you enter an artist or a song or something and it then tries to play songs that are similar to that one you entered. So, I enter "Frank Zappa" and now it's playing songs that sound like Frank Zappa songs (and some Frank Zappa too of course). Songs do repeat I must admit, but it's not very often. It's not a free service like so many other Internet radio stations but unlike others, on this one you can fast forward. If there's a song you don't like, you click the little album icon that is shown and select "I don't like it". This skips that song and I hope to believe it remembers this and doesn't try to play that song again in a long time.

Likewise, if there's a song you like, you click and say "I like it" which just means it'll be played again fairly soon.

Truncated! Read the rest by clicking the link below.

"Increment numbers in a string"

October 20, 2005
2 comments Python

I've just uploaded my second Python Cookbook recipe. It's unfortunately not rocket science but it's application is potentially very useful. With this little function you can generate the next number in a string that contains at least one number.

The mini unittest is quite interesting perhaps:


$ python increment_strings.py
from 10dsc_0010.jpg to 10dsc_0011.jpg
from dsc_9.jpg to dsc_10.jpg
from 0000001.exe to 0000002.exe
from ref-04851 to ref-04852