My Blackberry

June 26th, 2008, 9:44 am PDT by Greg

The outcome of my new phone search was a Blackberry Pearl 8110 from Rogers (who was also my old carrier).

When I first got the phone, I knew it would be pretty reasonable, being a Blackberry and all. But, the more I use it, the more I think it may be the Best Phone Evar™.

  1. I can sync the contacts and calendar with Linux. OpenSync and the OpenSync Barry plugin do the job nicely. I had to edit one line in the Barry source for it to recognize the Pearl (which has a different USB product ID than earlier models). That’s way less pain than I thought would be involved.

  2. The interface isn’t exactly intuitive, but it is at least consistent. The trackball thing will move you around, the menu button will bring up a menu, the other keys will be used to enter characters or as shortcuts.

    Typing is quite easy because of the two-character-per-key QWERTY keypad (instead of 3–4 character alphabetical keypad on most phones), and “SureType” (their predictive text entry thing).

    Generally, it appears to be designed for people who want to get shit done, rather than for 17 year olds with ADD. This is no surprise, considering RIM’s heritage targeting the business market.

  3. It’s physically surprisingly small. It’s exactly the same thickness as my RAZR (when closed), slightly narrower, but a little taller. I think the RAZR is deceptive: it’s thin when open, but not crazy-thin when folded.

  4. It’s possible to install software on the phone (although I have to use the Windows connector software to do it). There are a couple of good sources of software: RIM’s software page, Blackberry Freeware, and probably others I haven’t found yet.

    The one thing I’d like to install but haven’t gotten to work is the Blackberry Facebook application: it’s installer uses some piece-of-crap ActiveX component that crashes every IE I’ve put it on and doesn’t work on any other browser (including the provided Rogers browser on the phone).

  5. Four words: Google Maps for Mobile. This is a free application that basically provides a nice phone interface to Google Maps. But, it’s clever enough to know where I am in two ways. First is the built-in GPS, which it picks up magically and puts a dot on the map where I am. Second, it can read info from the cell towers and estimate its location within some margin of error.

    That means that it always knows where it is, unlike most GPS units (that don’t work without a clear view of the sky). It can immediatey estimate its position from the towers and narrow once the GPS kicks in. Frankly, GMM makes me feel a little funny in my special areas.

  6. I have also installed Opera Mini which, as mobile browsers go, it quite nice. I’m actually shocked how usable it is.

  7. It’s made by RIM, a Canadian company that hires many SFU co-op students and grads.

Of course, many of these things aren’t unique to the Blackberry and would apply to most higher-end phones. There are certainly some imperfections, but I’ll hold off on writing about those until I’ve lived with the phone for a while: I’m sure I’ll find more.

I have a few technical things about the setup that I’ll blog about at some point as well.

Phone Help Wanted

June 17th, 2008, 2:25 pm PDT by Greg

Yay! Kat’s back!

But that’s not really what I want to write about. Since Kat’s back in Vancouver, she needs to get a Canadian cell phone. My RAZR is starting to slowly degrade, so I’m thinking about replacing it before it falls apart totally. So, we’re both in the market for phones.

There are two issues here: the phone and the service plan. As much as the mobile industry would like to confound those two decisions, I’m going to treat them separately.

I would appreciate any thoughts people have on how to satisfy these requirements…

Phone

For the phone, our needs are relatively modest. It should be able to… (in approximate priority order)

  1. make calls.
  2. send/receive text messages with a decent interface.
  3. be small and easily back-pocketable.
  4. sync its addressbook and calendar with a computer with open/free/common technologies. For me, that means Google Calendar (or an iCalendar file) and Linux. For Kat, it’s Apple iCal and a Mac. This is a dealbreaker for me, possibly not for Kat.
  5. send/receive emails in some suitably rudimentary way.
  6. take pictures, I suppose.
  7. maybe access the web, but I don’t hold out a lot of hope for mobile browsers not sucking.
  8. things that might be nice, but I don’t really care: speaker phone, GPS, wi-fi.

I have been playing with a phone finder, but don’t have much to report.

Motorola phones are totally out for me: the RAZR was a nice enough phone, but the software sucks hard. The browser is unusable (e.g. no way that I can find to enter a URL: I had to email a link to Google to myself so I could get there), the calendar won’t sync with anything as far as I can tell, and it generally won’t talk to anything computer-wise.

The worst example of its usability are the outside buttons. On the left of the phone, there is a rocker switch, and a single pushbutton (which you can see in this picture). The rocker switch is used to toggle ring setting/do nothing modes, and the pushbutton is used to scroll through ring settings. Let me say that again: the up/down buttons are used to toggle, and the toggle button is used to scroll. Dead to me.

Also note that the iPhone is totally out for me: the cryptographic signing of the database to eliminate any software other than iTunes is totally unacceptable and I won’t have anything to do with it, or any other Apple products as long as it’s there.

Plan

We are fairly light users and have a Vonage line at home, so these aren’t main phones. Things I would like (and I think Kat is fairly similar):

  • some reasonably small number of any-time minutes per month talk. (Rogers’ web site isn’t currently functional enough for me to check my recent usage.)
  • unlimited text (because there’s simply no excuse to charge money to send or receive 160 byte messages, and I don’t want to deal with any company that would do so).
  • no charge for call display (providers actually have to filter out call display information to not provide it if you don’t subscribe: I’m not paying them to turn off their antifeature).
  • some trivial amount of data for email reading.
  • A “family plan” for the two of us is a possibility.
  • Now that I’m looking at the Rogers web site for my recent account activity, I realize that a web site that didn’t suck donkey balls would be a plus.

Any suggestions on these? I will post updates below as I have useful insights to share.

Disk Benchmarks

May 23rd, 2008, 12:02 pm PDT by Greg

I recently decided that I needed more space to backup/archive data. So, I went out and bought a terabyte external drive ($240 at Costco). This drive is a WD MyBook Studio, which happens to come with USB, FireWire, and eSATA connections. I started to wonder how different those connections really are. The theoretical bandwidth of each is 60MB/s, 50MB/s, and 384MB/s, respectively.

First of all, I could have sworn my motherboard had a eSATA connector, but it doesn’t. So, that’s out.

I decided to do some benchmarking with Bonnie++. This seems to be the standard Linux disk benchmarker. I used the default configuration for all the tests, since I figure they knew what they were doing when they decided what the defaults were.

After seeing an FAQ about benchmarking RAID, I decided to also try tiobench. It tests multithreaded IO performance. I decided to look at 2 threads doing sequential reads and writes.

Then, I started to wonder how these stacked up against my internal drives. SATA is back, but internal, and with a different disk on the end. I have two internal drives, both 400 GB, 7200 RPM, 16MB cache. They are used along with the Linux software RAID stuff to create a RAID 1 (for even moderately important stuff) and a RAID 0 (a big bit bucket).

I also tried a straight-up non-RAID partition on an internal disk (and I had to temporarily degrade my RAID to do it—I hope you appreciate this). The last tests I did were on my laptop and its 60 GB, 5400 RPM disk.

Here’s what I came up with. In all cases, larger numbers are better.

Disk Benchmarking Summary
Disk Bonnie Block Read (MB/s) Bonnie Block Write (MB/s) Bonnie Seek (/s) tiobench Read (MB/s) tiobench Write (MB/s)
SATA non-RAID 70 54 250 44 46
SATA RAID 1 53 45 366 54 37
SATA RAID 0 62 89 207 43 56
External USB 32 29 172 29 28
External Firewire 37 33 188 32 32
Laptop internal 20 23 94 18 18

[Intel D975XBX motherboard, Intel Core 2 Duo 6600, 2GB RAM, Ubuntu Hardy, relatively idle system, ReiserFS 3.6 partitions. Laptop is a Pentium M 1.86 GHz, 512 MB RAM, Ubuntu Hardy, idle, EXT3 filesystem.]

So… what did we learn from that?

  1. I’m too lazy (and non-visual) to bother making useful graphs in situations like these.
  2. USB 2.0 and Firewire are close enough in speed that it’s not worth mentioning.
  3. Damn, I wish I had eSATA on my motherboard to see how that fared.
  4. If possible, keep your disks inside the computer where they belong. The external performance is pretty impressive, but much slower than internals.
  5. … unless your other option is a slow laptop drive, then the externals start to look pretty snappy. I didn’t try the external connected to the laptop, though. There might be a processor/bus bottleneck.
  6. The RAID arrays aren’t nearly as fast as I thought they’d be. This could be a result of the Linux software RAID slowing things down. I have never used hardware RAID controllers (either the ones on many motherboards or dedicated cards).
  7. Seriously… who’s stealing all my RAID performance? I want it back!

Edit [05/23]: I feel I should add: All benchmarks are crap. They are positively correlated with the thing you want and call “performance”, but are definitely not directly related.

Life Plan #3

April 18th, 2008, 12:00 am PDT by Greg

I know that a blog post with the title “Life Plan #3” should be preceded by life plans numbered 1 and 2. The thing is: life plans one and two have some actual realistic possibility of happening, so they aren’t as fun.

SFU’s CIO (Chief Information Officer) just quit. Or he “quit”. The rumours aren’t really clear. In any event, he don’t work here any more.

The CIO is basically an Associate VP Academic by another name. The position is responsible for the campus network infrastructure (including wireless), phones, computer store, email, WebCT, and a bunch of other stuff. Wait… there’s something else in there that’s important… what was it again… oh yeah!

The CIO is responsible for our information. The last guy was responsible for the purchase and subsequent support of PeopleSoft/SIMS/goSFU. You know: the millions-annually albatross around the University’s neck? Go ahead and read the “Peoplesoft in use” section on Wikipedia; I’ll wait. We bought in several years after those very public experiences. I have mentioned the SIMS project here before.

Amanda and a few others have opined that I should apply for the job. They forget two things: (1) I’m not qualified and (2) I don’t want to. I’m not qualified because one would need a hell of a lot more experience with managing both employees (I’d guess the headcount is easily >100) and budget (>$10M) than I have. Also, I’m pretty sure being an undergrad director isn’t sufficient qualification for being an associate VP.

The reasons I don’t want to do it are many. The biggest one is the most obvious: PeopleSoft. The only way to get away from PeopleSoft is to spend some money on another solution. There’s no money to do anything else because PeopleSoft costs so damned much. The person who gets the job is doomed to either spend even more money (in a time of cuts), or be the guy that keeps the shitty solution to the University’s biggest IT problem.

But (because Amanda knows me that well) I have been thinking about it. I’m the kind of guy that looks at the “Careers” section in the newspaper and thinks “CEO of a sporting goods company… yeah, I could do that. Maybe I should apply.”

If I had the job, I’d stop all development on SIMS and skim a quarter of the SIMS budget off for internal development of a replacement. The replacement would have to happen piecemeal, which would require a very clever architecture that could interface with the existing database. If other Universities in BC were willing to team up, it would make sense to join forces since our business practices are mostly similar and we could share most of the code.

Also, there’d be some modernization of the core campus IT infrastructure. Things like virtual machines and AFS would allow real-time replication of essential services across campuses, and leave us much less vulnerable to catastrophic system failures.

In summary: if they don’t hire in the first round and open up applications a second time, I’m going for it.

Facebook Application Update

April 4th, 2008, 1:46 pm PDT by Greg

The “SFU Courses” Facebook application has been up and running for about two semesters now. It ended up working just about like I imagined in my original plan: data comes from the goSFU database, and students can publish an automatically-updated list of their courses on their profile page.

Getting the data took a little political wrangling, but ended up happening without too much trouble. Thanks go out to Richard MacLeod, the Director of Records and Registration, for running interference for me a couple of times when administrators got wind of this and fully misunderstood what it did. The consensus now seems to be that this is a legitimate thing to do with University data, as long as students give permission properly. For the first semester, I was half expecting the President to summon me to his office for a beating at any moment.

The data feed that I eventually got is a little circuitous. Of course, it starts with the live goSFU database. That database is replicated in real time to a backup server. The almost all of the data on the backup server is copied nightly to the “reporting database” that is used for all of the University’s reporting and data analysis stuff. The reporting database is used to feed a legacy database called “AMAINT” that is still used by several older systems around campus. The CS tech staff get a view into AMAINT that runs Gradebook, etc. I have a view to that which is used to update the application’s database.

Miraculously, all of that usually works and I get data that’s updated daily. This is used to update everybody’s profile box every morning with their most current course list.

In previous semesters, I haven’t received upcoming semester data during the registration period. This semester, Nathan from our tech staff got me summer courses almost as soon as registration started, so people could see courses as registration was happening.

There are currently about 1800 Facebook users who have added the application, and 1600 who have also authenticated as SFU users and authorized the relevant data release. The 200 person difference is curious: the application will do absolutely nothing for you if you haven’t agreed to release your SFU data. I have no idea who those 200 people are, or why they have the application.

Overall, I’m pretty pleased with the whole thing, particularly with the number of users. That’s something like of 10% of all SFU students. I can’t think of any other (optional) service the University has for students that has that kind of uptake rate. Maybe residence or orientation?

Anyway, I accomplished my goals: learn the Facebook API, make the University seem a little cooler, give students access to their own data in a useful way.

Programming Language Study Group

February 25th, 2008, 1:15 pm PST by Greg

As some of you know, I’m starting a one year sabbatical in September. There’s a lot to say about that, but for today, I’m going to limit myself to one of the plans.

I’d like to get to a point that I can teach CMPT 383 (Comparative Programming Languages). One of the things I’d like to do for that is expand my own breadth of experience with programming languages. I have worked with a bunch, but there are a lot more out there, and most programmers don’t give them enough thought. My goal for the year is to learn one language per month.

Of course, I wouldn’t have time to do a huge project in each. I’d like to get to the point that I could write some small (but functional) programs and know “the way” of the language. Here are some of the languages that come immediately to mind:

  • Haskell: I have used Miranda (which is similar), and took a functional programming course at SFU that used Haskell, but that was all a long time ago. I’d like to go through for a refresher.
  • Prolog: Again, I used Prolog back in the 383-like course I took in my undergrad, but it has been a long time.
  • OCaml: People who like OCaml really like it. That’s the kind of thinking that brought me to Python a few years ago, so it might be worth a look.
  • Lua: A lightweight scripting language that also seems to have some rabid fans.
  • Lisp: I find it a little odd that I’ve gotten this far in life and never written any Lisp. Time to right that wrong.
  • C#: The only language on the list that’s widely considered “practical”. I know it’s kind of just MS Java, but there might be something good in there. Plus, the Mono implementation seems to be working now, so I wouldn’t have to use Windows to do it.
  • Matlab or Octave: I like the array-based thing, and want to try some real stuff with it.
  • Erlang: You could say that Erlang is Just Another Functional Language, but it was developed by Ericsson for real practical stuff. That distinguishes it as interesting.
  • D: People like it, and it comes after C, right? That’s some good marketing.
  • Some esoteric programming language. These are mostly conceived as jokes, but that doesn’t mean there isn’t something to learn from them.

That’s ten without even thinking too hard. There’s a really great list of programming languages by category in Wikipedia.

I think the way to go about this is to create something like an informal Programming Language Study Group. That way, there would be other people hounding me to keep going (and vice versa). We could have a few little exercises for each language, maybe.

Who’s with me?

To: Eugene

February 1st, 2008, 12:59 pm PST by Greg

Subject: Re: WANT

So, Eugene is eyeballing a digital SLR, specifically Canon’s recently-announced Digital Rebel XSi. I have the old Digital Rebel XT, and the model in between is the Rebel XTi.

There are a few differences through the product line. There’s a nice feature comparison of the XTi and the XSi to look at.

Sadly, I’m going to give Eugene the advice of his prototypical photography nerd and say that blowing money on the new body isn’t worth it. If it was me, I’d get the XTi body on sale and save a couple of hundred bucks.

The only feature that I see on the XSi that I would personally pay more than a few bucks extra for is the 3″ LCD. The display on my XT is 1.8″ and I find it a bit small (and thus the review image small and not as useful as it could be). But the XTi has a 2.5″ display, so I don’t think the XSi is worth much on top of that.

The mirror-up functionality might be nice, but I suspect it’s more of a gimmick: I can’t imagine using it very much. The spot metering is a little confusing for me: I think the thing my XT does is called spot metering; I can’t imagine they dropped it for the XTi.

The simple fact of digital photography is that the metering isn’t usually all that critical: you have immediate feedback on the levels because of the display. If the metering was off, adjust and take another shot. I think I end up flipping to manual exposure more often than most: in a difficult situation, decide what exposure should be, set it, take shots, adjusting a little as necessary.

Yes, my advice is to spend on glass. I’m quite happy with my Sigma 18-50mm f/2.8, and I just ordered a 30mm f/1.4 for even lower-light goodness.

For the love of god, don’t use the kit lens. Would you buy a $500 graphics card and hook up an old 14″ CRT to it? I took a couple of quick comparison shots with my Sigma zoom and an old Canon kit zoom I have last night. I didn’t have time to get much useful stuff, so I can’t really post comparisons. Maybe I can do something once my prime 30mm comes.

My initial thoughts after last night: my Sigma zoom isn’t appreciably clearer than the kit lens (but a prime lens might be). The colour for the Sigma lens was noticeably better (with the same exposure, lighting, white balance, etc).

Five things I hate about Python

January 29th, 2008, 10:15 pm PST by Greg

A while ago, I stumbled on somebody else’s blog entry Five things I hate about Python. The game (apparently) is to pick your favourite programming language and pick five things you don’t like about it.

This seems most common among the Python crowd: Python 2, Python 3, Python 4. It’s probably because everybody loves Python. But, I did manage to find a few others: C,
Vista, Linux.

So, here are my five things:

  1. No parallelism. The Python interpreter has a global lock that makes it impossible to parallelize execution. My processor has two cores, multiple pipelines, and a vector unit. Wouldn’t it be spiffy to use those? I have used the Parallel Python module to get around this (by spawning multiple interpreters), but it’s a hassle, and only applicable in certain cases.

    To be fair, this is a common problem in imperative languages, which force the programmer to precisely specify how thing are calculated. It’s much easier for a compiler to parallelize things in functional language, which have the programmer specify only what is calculated. Maybe Haskell is the answer to all of our problems? Hey… why are all the 383 students looking at me like that?

  2. Late Binding. This is the mechanism that allows the beauty of duck typing, so it’s probably a net win. It comes up in situations like this:

    def add(a,b): return a+b

    Until the function is called, there’s no way for Python to know whether the + there is addition, string concatenation, or something else. So, when each statement executes, Python has to decide what operators (or whatever) to use at that moment. The net result is slowing the language down a lot.

    Apparently PyPy has some improvement here, and Pyrex allows extension modules with early binding.

  3. Type confusion. I don’t know if it’s the duck typing or weak typing, but beginning programmers (aka CMPT 120 students) often have problems getting the type that a particular value has. I very often see students converting a type to itself. For example:

    name = str(raw_input("Name: "))
    count = int(0)

    That indicates some serious confusion about what’s going on. Or maybe I’m a bad teacher. I’d accept that as an explanation.

  4. GUI libraries. The standard Python install comes with only a Tk binding for GUI development.

    I really wish wxPython came with the default install. Then, we could all use it and assume it would be there. It would make Python a pretty serious contender for cross-platform GUI development.

  5. Standard library. One of the principles of Python is that “the batteries are included”. In other words, the libraries you need are there by default.

    That’s usually true, but there are a few things I wish were always there. The Python modules that I seem to have to install the most often are: Biggles, Imaging, Numarray/Numeric, Parallel Python, PyGame.

    As an aside, maybe if the Imaging and PyGame modules were accepted into the standard library, there would be some pressure to get some good documentation going for them.

Snowy Night

January 28th, 2008, 12:45 pm PST by Greg

It snowed in Burnaby yesterday (but somehow not most of the rest of the lower-mainland). After the last snowfall, I had looked out of the window at night and thought that the snow under the streetlights looked cool. Unfortunately, I didn’t have the presence of mind to do anything about it.

So last night, I grabbed my camera and panoramic tripod head and set out.

I walked north a few blocks to get away from Hastings (figuring that farther from Hastings would mean less traffic). My first stop was smack in the middle of a street for a full 360° panoramic shot:

street panorama

[You can click the link there for larger versions. If you have a Java plugin working, you can click the “View Panorama” link on the left of that page for a nice drag-around viewer.]

Making a panorama like this requires 40–50 separate frames (with the lens I have) that are then stitched together. Everything has to be set to manual on the camera (exposure, focus, white balance). The whole process takes 10–15 minutes for a single “picture”.

In this case, each frame was exposed for 1 second at f/5.6, ISO 1600. I left the white balance set for for tungsten light. That’s why the image has the orange colouring from the sodium streetlights. I only had to move our of the way of a car once during that shot.

Having had enough of dodging traffic, I found myself a convenient traffic circle for the next one:

traffic circle panorama

The camera settings were the same, except this time I set a custom white balance so the snow is actually white. That is exactly what I was hoping for when I set out.

On the way back, I saw some drops of water that had frozen on a little tree, and couldn’t resist stopping for one last shot of them. I set the aperture to f/2.8 for that shot for maximum Bokeh goodness.

Finally, with frozen fingers, I went home and fired up Hugin to get the panoramas together.

Edit 22:00: Shrunk the panoramas in the gallery. The Java VM seems to have a memory limit that wouldn’t let the originals display.

OMG, toys!

November 12th, 2007, 3:30 pm PST by Greg

Pay attention to this sentence, because it’s not one you have probably heard before: This week, I bought three new laptops for $800.

This morning, the One Laptop Per Child project opened up their give one, get one program, and I was there. For US$400, I bought two OLPC XO laptops. One goes to me, one to some kid in a developing country.

So, I suppose that’s a halfway decent thing to do. But, I mostly wanted to get my hands on one of these things that we have all heard so much about.

Second, I ordered an ASUS Eee. For $400, it’s a more-or-less fully functional Linux laptop and about the size of a small hardcover book. I’m hoping this one has a little more real utility.

The specs sound a little thin for a modern laptop: 900MHz, 512 MB RAM, 4GB storage (flash, not hard drive), 800×480 display. But, that would have been a pretty snappy laptop 4 or 5 years ago. How much has my workflow really changed in the last 4 years? [A laptop isn’t a primary PC for me. It’s a thing to use when not in my office or at home.]

I know low-end mainstream laptops are bumping down in the $500–600 range, but there’s that part about weighing less than a kilogram and fitting in my man-purse. How could this not be ideal for travelling?

I’m also hoping it can ride on a iRobot Create and run Player for a sweet little autonomous robotics platform. If they come out with the $200 model, that would give us a full setup for <$500 that high school kids could play with.

BTW, thanks all for the interest in my CMPT 120 assignment. I went with controlling the ghosts in a pacman-like game. That should keep ’em busy.

« Previous Entries   Next Entries »