Monday, November 8, 2010

Teaching Algorithms and Data Structures

I'll be teaching algorithms and data structures (A&DS) at CSUMB in Spring 2011. I have (essentially) complete freedom in teaching the class and choosing a book. So far, so good.

I always like to consider first principles, so I wanted to address three issues:

  1. What A&DS will I teach, and why these?

  2. How will I convey the importance of the material? What is its relevance?

  3. What language will I use for teaching the course?



Address the third question, and something of the first two, I had an idea. You can script The GIMP to do just about anything, and it uses a scheme (and therefore lisp) variant as a scripting language. Brilliant. Not practical to teach, but wow, what a class that would be.

However, there's a simple problem; there is no scheme A&DS book in print. Nor a lisp book. In fact, if you want to teach A&DS, there are three language choices for books in print:

("Algorithms and Data Structures in Books" from Amazon for a more complete list)

Oh, nominally there are pascal options, and MIT Press has published a pseudocode-based A&DS text. But the basic problem is that neither C nor lisp are options.

I will probably go with Java, although Python is tempting, tempting, tempting.

Friday, November 5, 2010

MacBook Air

It's been forever since I last updated. As Jim Anchower says, "Hola, amigos, it's been a long time since I rapped at ya."

I've been thinking about the new MacBook Air. It's a fantastic piece of machinery, although perhaps the word "machinery" is wrong here, as the product is entirely solid state. Wow. A modern laptop with no moving parts. Of course, this isn't the first one: the old portables from Tandy were solid state, and that was almost 30 years ago, but for a machine that suffers as much use as a portable computer, sold state is the way to go.

Hmm, I don't know if it has a fan... if so, scratch the word entirely, but the rest of the statements still apply. A fan can be replaced.

Of course, you don't get a full-fledged computer. You get a recent, but slow, Core 2 Duo. It's clocked down (obviously) to lower heat production and increase battery life. Still, it's an old processor family.

The problem is that there isn't a processor that sits between the Core i3 and the Atom. WHat that would look like might be a multicore Atom.

There's an open question here, and the answer doesn't lie in hardware: is software really ready for multicore? Regardless of what some might say, concurrency is hard to do well.

It looks like I will be teaching algorithms and data structures in the Spring, and I've decided that I MUST teach multithreading. We may not spend much time on it, and it may be toward the end, but if you can only think of algorithms in single-thread mode, then you will lose out as a developer. Sure, we can use up CPU cores with multiple applications, but when you are doing something like decompression, optimal performance will come from using as many cores as you can to preemptively decompress data. Not all that different from double-buffering, really. Does anyone remember that? Before the days of GPUs? Hmm...

Wednesday, May 26, 2010

NOT Upgrading my MacBook

As you know by now, Apple has released a new line of MacBook Pros (or is it MacBooks Pro?).

I'm not upgrading. Here's why:

  • I want the smallest form factor (13.3")
  • The 13" MBP still has a Core 2 Duo process
  • That is all


Why do I care so much? Well, the thing is that I do intensive data processing, and the Nehalem-based Core i5 (and i3 and i7) is just that much faster. It really does make a difference.

The reason Apple is giving is, well, reasonable. The Core i5 basically doesn't fit, physically or power-wise or heat-wise. Intel is in some kind of dispute with NVidia (and others) about making a proprietary northbridge or some such dispute. Apple has publicly said that, for most users, the much faster video will show a more significant speed improvement.

My current first-gen MB has a Core Duo, which is a) not x86-64, and b) getting slow. I think I'll wait, though, another few months, before I upgrade. If you are reading this, you know I now have a sometimes-zippy little Asus Eee netbook. I think that's sufficient computing options for on-the-go. If I didn't have money constraints...

Thursday, April 22, 2010

MacBook Docking Station

These rock (at least on paper).

Even More About the Netbook

So after a couple of weeks with the netbook, I'm quite satisfied.

Some thoughts:
1. The keyboard is awkward, but not terribly so. It's usable, just take some adjustment. I have a chiclet keyboard on all of the other computers I use, so it's really just a size issue. If you hate chiclet keyboards (think: keys are separate, and there are space between the keys), then consider a different option.
2. Performance is mediocre if you do lots of media. HTML/JPEG rendering is fine, but video taxes the machine, and HD video is unplayable (literally, it won't play).
3. I'm using Linux as a principal OS for the first time in a while. I really am impressed with the quality of Ubuntu (in this case). I really am not sure why anyone would use Windows. I haven't booted into Windows in a few days, although I don't anticipate blowing away that partition. I need Windows to run iTunes, I suppose. I need tuneranger, or some other tool to sync my iTunes library.
4. Battery life is unbelievable. I charge this thing less often than my phone. Now, it's NOT my principal machine, except on the road. However, I carry it around as much as is useful. Incidentally, I'm NOT writing this on my netbook. Hmm...
5. Perfect for the cafe lifestyle. I will probably work at a cafe tomorrow, and am actually looking forward. I'll probably bring my mouse.
6. The touchpad is useful, but not great. Actually, the touchpad is very good (although of course small). I prefer edge scrolling to two-finger scrolling, and it supports both (under Linux!). The touchpad itself isn't exactly a separate surface; it's a nubbly region of the same material as the wrist-rest. Oh, and touch-to-click works well. The problem is the button; they've used one long surface for the button, rather than two separate buttons, and it takes a little too much effort to both position my thumb and to press.

I had planned on purchasing a new MacBook Pro, but I like the 13" form-factor, and that size didn't exactly get a real processor upgrade. There are some good articles (macrumors|tuaw|artechnica) on why, but the nutshell is that Apple went for the typical user, who watches a lot of video and doesn't compile much. So for now, no

Thursday, April 8, 2010

iPad First Impressions

I'm a little late (almost five days) in the first impressions category, but I thought I'd post these. A colleague and friend got one from, of all people, Woz, because he's a senior docent at the Silicon Valley computer museum.

1. It's heavier than I expected, and felt heavier than the less-than 1Kg advertised weight.

2. Typing is awkward, but, as on the iPhone, Dragon speech recognition works well. I thought that the much-bigger keyboard would make it possible to actually type, but that's not the ideal interaction. I haven't tried a bluetooth keyboard.

3. No problems with wireless, or anything else, for that matter.

I think it's neat, but for me, it would be a toy, and wouldn't replace a computer. That's why I got the netbook. It's not a workhorse, but it will replace a computer on my upcoming trip. We'll see how that goes. If it goes well, I'll keep it.

So what would the iPad be good for? It would be an ideal infocenter in a car. It could serve as a head unit for music, and as a great GPS (screen is large), but what it would need is much, much more voice interaction. In fact, that's my single favorite feature on the iPhone 3Gs (voice dialing).

Oh, you can watch movies on it, but this whole streaming/cloud thing is not appealing to me for long movies. Also, I need closed captioning/subtitles.

More on My Netbook

It took forever to get Linux installed. The first problem was getting my Asus to rad from a USB boot device. The whole idiotic partitioning scheme took probably an hour to solve. Essentially, you can only have 4 primary partitions, but what must be a primary partition is not clear. So I made my second and third linux partitions (/home and swap) as part of an extended partition.

Now begins the fun of:
a. running Windows
b. updating everything
c. installing software

Overall, I love the package. However, it's sloooooooooow.

The Asus has an Intel Atom N450 processor, which exchanges performance for low power use. As that's the big purpose of a netbook, it's not surprising, but installing and configuring seems to take longer than I'd like. For example, I want to install a licensed copy of Office 2007. I downloaded it from the work repository, and then I have to uninstall the free trial (which left behind several language packs that have to be uninstalled separately, and now in a foreign language, so screw it). I've never liked the installation process on Windows.

I'm still happy; it's just that my happiness is increasing slowly.