Sunny Sussex by the Sea to Boisterous Barcelona

September 11th, 2010, 12:54 pm PDT by Kat

My conference went well. It was quite weird giving a bird talk to a room full of people who study plants, but I think it went as well as could be expected. The point of my talk was to show the plant researchers using controlled environments (growth chambers, greenhouses) what kinds of other research can be done using the same chambers. The highlight of the 2-day conference was a visit to the Millenium Seed Bank and Kew Botanical Gardens at Wakehurst Place. The seed bank was amazing and quite beautiful. They were one of the first Millenium projects approved for funding. At present they are processing/storing the seeds of 10% of the world’s plant varieties. They dry and freeze the seeds and periodically test them to ensure that they are still viable. By 2020 they hope to have 25% of the world’s plant varieties stored there. It’s an important thing to do, and I’m glad someone is doing it. The botanical gardens were gorgeous too. We got a behind the scenes tour, which included the back growing plots and greenhouses. I was also able to see a Chinese tree that has only flowered twice while at the gardens – the first time was 27 years after it was planted at the gardens, and the second was this year. Apparently, the first time it flowered, the head gardener was on vacation, and he missed it! When we left “sunny Sussex by the sea” it was chilly and misty.

In contrast, the last three days we’ve spent in Barcelona have been sunny and hot. We’ve eaten our way around the city and have seen many of its breath-taking sights. We had fruit at Mercat de la Boqueria (food market), lunched in the Barri Gotic near the Catedral de Barcelona, had tapas just off of La Rambla (Taller de Tapas is very good!), saw the monument to Christopher Columbus (who happens to be pointing the wrong way if he’s supposed to be pointing towards the New World), had paella on the Barceloneta beach, and had traditional Catalan food. In between meals we found time to visit Antoni Gaudi’s unfinished Sagrada Familia and the Olympic stadiums and arenas on Monjuic. So yes, we’re definitely enjoying the food and the sights here in Barcelona. We’re saving La Ribera neighborhood, which has a Catalan gothic church and the first covered food market in Barcelona, for our last day in Europe.

It’s an interesting comparison between London and Barcelona. In London, we didn’t find the food all that exciting (although I did enjoy the pies and pasties), but then again, we really didn’t see any British people eat (just drink). In Barcelona the food is amazing, and everywhere you look people are eating (and drinking) at all times of the day.

Tomorrow we board the Norwegian Jade for our Mediterranean cruise. Looking forward to crepes in Nice, tripe in Florence (at least I am, not sure about Greg) and pizza in Naples!

Mmmm… England

September 7th, 2010, 6:34 am PDT by Greg

We’re currently ending the University of Sussex leg of the trip: Kat’s conference. She should probably be writing about that since it’s her party, but since I’m the one with my feet up all day in a residence room, I have more time to actually do it.

I’m actually enjoying what feels like a vacation from the vacation. I walked around Brighton and the university. Read a bunch. Surfed the web. Good stuff.

But as I near in on my third day at the university, I’m starting to feel like a hunter-gatherer: most of my time is being spent trying to ensure an adequate food supply.

I was prepared to come to England and learn that everything I had heard about British food was exaggerated. I really was.

But, the food options available to me (here and London) seem to fall roughly into three categories: (1) pub food, (2) pre-wrapped sandwiches, and (3) restaurants that are too expensive for an average meal. There is also a minor fourth category: (4) food from elsewhere on the planet, adapted to British tastes.

(1) The pub food is good, for what it is: unseasoned meat and starch. For example, pies (meat filling and crust) and fish and chips (right there in the name). I’ll also throw into this category the full breakfast and while there is a certain awesomeness to it, it’s still fundamentally meat and starch. This can only sustain one for so long: barely a vegetable to be seen.

(2) Douglas Adams was certainly exaggerating somewhat, but this quote rings true:

There is a feeling which persists in England that making a sandwich interesting, attractive, or in any way pleasant to eat is something sinful that only foreigners do.

‘Make ’em dry,’ is the instruction buried somewhere in the collective national consciousness, ‘make ’em rubbery. If you have to keep the buggers fresh, do it by washing ’em once a week.’

Marks and Spencer seem to have been able to step cautiously away from this advice, but one store can only stray so far outside the norm.

(3) We did have a very nice meal in London at a place that was a little too expensive to go to regularly. Oddly, it was still full of men standing around, drinking beer, but not eating.

(4) In an effort to break into option 4, I just bought a “mexican bean wrap”. Much to my dismay, it was actually a cleverly-disguised option 2 sandwich. It was a pita (!) containing about a tablespoon of bean-like substance (with the volume of the thing being made up by pita, not filling). The pita was stale enough that the term “steel reinforced” came to mind.

Really, Marks and Spencer has been keeping me alive. A few days ago, Kat and I got a couple of cornish pasties (pub-style meat + dough) and some prepared food from M&S to round out a meal. I took one bite of some pasta salad and realized that the parsley on it was both green and uncooked. I was so happy to have a vegetable (small though it was) that I turned to Kat and said words to the effect of “this is mine and you can’t have any!” I did eventually share.

London Wrapup

September 4th, 2010, 4:08 pm PDT by Greg

Our time in London is almost up: we leave tomorrow for the University of Sussex for Kat’s conference, which is the theoretical purpose of the trip.

We have covered London pretty well, considering the short time we were here: British Museum, Greenwich Observatory (and thus the Prime Meridian), Westminster Abbey, and we walked around/past Trafalgar Square, Westminster Hall, Buckingham Palace, Trocadero, Chinatown, Covent Garden, London Eye, St. Paul’s Cathedral.

Certainly the highlights for me were the British Museum and Westminster Abbey.

The British Museum (motto: “we’re going to steal your antiquities, but promise they’ll still be around in a hundred years, okay?”) has an awesome collection and I’m glad I had a chance to see it. The Westminster Abbey (motto: “if they’re important and dead, we have them here”) audio tour was narrated by Jeremy Irons, which alone was enough to put it near the top of the list. Also Newton and Darwin (and a bunch of kings or whatever) are buried there.

I have posted a few photos from the trip. More will appear when we get back (and Internet-access-permitting, through the trip).

But more importantly, I have several questions about British people, based on observations made in and while walking past British pubs.

Question 1: Do British people not eat? Every restaurant and pub we walked by were filled with guys drinking beer. I don’t think I saw more than a dozen people actually eating in restaurants the whole time we were here. That was consistent across the whole after-work time span. Do people skip dinner just to drink? Do they somehow rush home and eat before getting to the pub at 6:00?

Question 2: Following up from the previous evidence: Where are the women? Every pub I was in was about 3 men (drinking beer) to each woman (drinking white wine). I assume women do something and don’t all just sit at home when the men are out? Are there places somewhere with 3 women to each guy?

London, day 0.5

September 3rd, 2010, 12:16 am PDT by Greg

As I write this, it is the morning of our first full day in London. We got in yesterday mid-day.

So far, so good. We are saying in a hotel just around the corner from Trafalgar Square, which is walking-distance to a lot of stuff.

We found the hotel with not more than 10 minutes of walking in the wrong direction. After checking in, we walked the neighbourhood for a bit and walked by Buckingham Palace.

My initial impressions of London:

  • I miss streets that meet at right-angles. Take for example this intersection near our hotel. It appears on our pocket map as five streets that come together, but when on the ground, is 100 m of roundabout where “we want to go straight” is not a useful thing to have deduced from the map.
  • When in China, the dominant feeling was “wow, everything’s big”. Tienanmen Square, for example, is almost incomprehensibly huge. Here: everything so far has been smaller than I imagined it. Buckingham palace: not all that big. I think I should be more in the New York mindset: everything very dense and close together.
  • British pubs are funny places. Need to investigate further.

Europe!

August 31st, 2010, 11:09 am PDT by Greg

Earlier this year, Kat got invited to speak at a conference in England, which is awesome. What’s more awesome (from my perspective, at least) is that I’m not teaching in the fall. If you put two and two together, you can see that we have half of our trip to England paid for, and time to spend if we go.

So, we’re going.

We leave tomorrow, and are seeing London, Brighton (where the conference is), Barcelona, and a Mediterranean cruise. On the way back, we’re making a pit stop in Ontario to see my parents. All of that will take most of September: we return Sept 25.

I don’t have much to say about it at this point, other than this is why I haven’t been returning anybody’s emails: too much to get ready before we go, and no time to see anybody either.

We have given preference to hotels with internets, so there is some hope we’ll post some updates during the journey.

CMPT 470: feedback wanted

August 26th, 2010, 4:21 pm PDT by Greg

Along with my first offering of CMPT 383, I just finished my 13th offering (!) of CMPT 470. I haven’t changed the backbone of the course much in that time: it mostly feels good to me, and other than moving with shifting web technologies, I haven’t felt the need to change the course style.

But now I’m taking a good hard look at the course. I still like the overall flow, but there are some things I want to change.

I did a survey of the current students to get some feedback, but they lack perspective, having just finished the course. I figure I can get some eyeballs from course alumni here and am looking for some more meaningful feedback.

Question 1: Weekly Exercises and Grading Scheme

When I did CMPT 383, I gave weekly exercises, thinking that they might feel a little bit hand-holdey for an upper-division course. Much to my surprise, they worked better there than they do in 120 and 165: more-senior students are in a much better position to appreciate the micro-lessons that the exercises encapsulate and better understand why they are helpful. It’s also a chance to give problems on everything, not just a few things in major assignments.

I have realized that I want to do weekly exercises in CMPT 470, replacing the three assignments. The problem is: the assignments are worth 30% of the course. The weekly exercises would receive minimal marking and feedback (likely marking scheme: 2=most/everything correct, 1=some stuff done, 0=little/nothing done). With that little “grading”, 30% is too much to give to them: 20% is more reasonable.

So, I have 10% of the final grade to reallocate somewhere. Any suggestions about where an extra 10% of weight should be distributed? (The old grading scheme is online.)

[To give you an idea, I’m imagining that some of the exercises will be like “learn these three important CSS techniques and use each to style this sample page”; “find security holes in this sample mini-app I have created for you”; “pick Rails/Django/whatever and do the tutorial on their site”; “deploy your tutorial code on your group’s web server”; “do something with jQuery”]

Question 2: Content

I have certainly done my best to keep with the times, and talk about new web-related topics as they have become relevant. But like I said before: the overall backbone of the course has remained the same.

Are there things that I should have spent more lecture time on than I did? Things that took up too much time?

I definitely want to move JavaScript stuff a little earlier in the course: it deserves to be at least a little more front-and-centre than it has been.

Question 3: Other Stuff?

I have a few other smaller tweaks in mind, and am open to other feedback.

In particular, I plan to (explicitly) open the technology evaluation to a wider array of technologies: JavaScript frameworks, databases. This past semester, I started to realize that the server-side frameworks (Django, Rails, Cake, …) are all fundamentally the same (at the depth that’s possible in the techeval). There are other pieces of technology that are more interesting choices at this point, and they might as well evaluate those.

I’m happy to take any half-baked thoughts on any of this here, or by email.

And that’s how you teach CMPT 383

August 22nd, 2010, 10:48 pm PDT by Greg

I have now completed my first offering of CMPT 383, Comparative Programming Languages.

I had forgotten how much work a new course prep is, particularly as I am anal-retentive enough to not be able to make much use of any other instructor’s course materials. Other instructors just do things… wrong. The only way for a course to feel right is to do it my way, for myself. Giving lectures from somebody else’s notes is like wearing somebody else’s underwear: technically probably just fine, but you just feel dirty.

That’s not to say other people who teach the same courses I do do a bad job: they are generally excellent instructors teaching excellent courses. They just do it wrong, is all.

But, looking at my plan for 383, I came in pretty close to the plan. The final balance of topics was more like 6 weeks, 4 weeks, 3 weeks, but that’s astonishingly close for somebody who usually just stops somewhere around the midterm and thinks “does that feel like about half of the material? Okay good.”

Overall, I’m very happy with it. First offerings of a course are supposed to be bumpy and full of things that you wish you could have done better. Honestly, this was one of my favourite course offerings ever: there are tweaks I’d do for my next offering, but all are fairly minor.

Specifics:

  • The weekly exercises were (to my mind, at least) a total win. My goal throughout was basically to say “remember that thing I talked about this week? Practice it” and I think it worked for the students. I liked them to the point that I’m planning that every course I teach from now on will have weekly exercises, including 470. (More on 470 in a later post.)
  • Some of the more involved examples I put together were among my favourite learning objects ever. (God, I can’t believe I just used the term “learning objects“. I have become everything I hate.)
  • I think I actually convinced them that Haskell was practical. Was that irresponsible?
  • Prolog sucks, but I’m still convinced it’s a worthwhile exercise.
  • The “language concepts” section felt a bit like a laundry list of topics. I don’t know that there’s really any way around that. Maybe I could re-order things a bit so they flow together better.
  • The project was interesting for all concerned. I’d probably cut down to three or four language choices in the future, just to keep the TA from losing his mind.
  • I’m not particularly happy with the exams, but I’m never happy with my exams.
  • Ted was an invaluable sounding board throughout the semester, taking time he didn’t have to listen to my meanderings on the course. Thanks be to Ted, who will do an excellent job teaching the course in the fall. (Excellent, but wrong.)

The feedback I have had from the student side has been very good so far (with the real teaching evaluations still outstanding). I have never before had so many students who had nothing to do with a course talk to me about it. Random students in the hall thought my project was a good idea; everybody and their dog knew about my first assignment; people with friends in the course want to know when I’m teaching it again.

I’ll take that as creating a “buzz” and call it a good thing.

P ≠ NP

August 7th, 2010, 8:21 pm PDT by Greg

An email I was recently forwarded (a couple of steps removed) from Vinay Deolalikar from HP Labs:

Dear Fellow Researchers,

I am pleased to announce a proof that P is not equal to NP, which is attached in 10pt and 12pt fonts.

The proof required the piecing together of principles from multiple areas within mathematics. The major effort in constructing this proof was uncovering a chain of conceptual links between various fields and viewing them through a common lens. Second to this were the technical hurdles faced at each stage in the proof.

This work builds upon fundamental contributions many esteemed researchers have made to their fields. In the presentation of this paper, it was my intention to provide the reader with an understanding of the global framework for this proof. Technical and computational details within chapters were minimized as much as possible.

This work was pursued independently of my duties as a HP Labs researcher, and without the knowledge of others. I made several unsuccessful attempts these past two years trying other combinations of ideas before I began this work.

Comments and suggestions for improvements to the paper are highly welcomed.

The paper is about 100 pages, and looks serious (but being a decade away from last thinking about complexity, I am unable to give any more useful evaluation than that). I’ll refrain from posting the paper itself.

Deciding P ≠ NP is a Millennium Prize Problem and I don’t think I’d get much argument to say it is the biggest open problem in computing science.

Update: I see someone else Deolalikar has uploaded the paper. I should point out that in the email thread I got, Stephen Cook said “This appears to be a relatively serious claim to have solved P vs NP.”

Update: Huh, slashdotted. I think “broke” the story is a little strong, but anyway… any media wanting comment on this story, I’d suggest my colleagues David Mitchell (whose work was cited by Deolalikar in this paper), Valentine Kabanets, or Pavol Hell (who also do research in this area).

Update 08/09: Richard Lipton is posting excellent commentary in his blog.

Everything I know about databases is wrong. Also, right.

June 24th, 2010, 12:48 pm PDT by Greg

I have been teaching CMPT 470 for six years now, with my 13th offering going on right now. Anybody doing that is going to pick up a thing or two about web systems.

I was there for the rise of the MVC frameworks and greeted them with open arms. I watched Web 2.0 proclaim “screw it, everything is JavaScript now” and listed with suspicion, but interest. I am currently watching HTML5/CSS3 develop with excitement but wondering why nobody is asking whether IE will support any of it before the sun burns out.

There’s another thing on the horizon that is causing me great confusion: NoSQL.

The NoSQL idea is basically that relational databases (MySQL, Oracle, MSSQL, etc.) are not the best solution to every problem, and that there is a lot more to the data-storage landscape. I can get behind that.

But then, the NoSQL aficionados keep talking. “Relational databases are slow” they say. “You should never JOIN.” “Relational databases can’t scale.” These things sound suspicious. Relational databases have a long history of being very good at their job: these are big assertions that should be accompanied by equally-big evidence.

So, I’m going to try to talk some of this through. Let’s start with the non-relational database types. (I’ll stick to the ones getting a lot of NoSQL-related attention.)

Key-value stores
(e.g. Cassandra, Memcachedb) A key-value store sounds simple enough: it’s a collection of keys (that you lookup with) and each key has an associated value (which is the data you want). For Memcachedb, that’s exactly what you get: keys (strings) and values (strings/binary blobs that you interpret to your whim).

Cassandra add another layer of indirection: each “value” can itself be a dictionary of key-value pairs. So, the “value” associated with the key “ggbaker” might be {"fname":"Greg", "mi":"G", "lname":"Baker"}. Each of those sub-key-values is called a “column”. So, the record “ggbaker” has a column with name “fname” and value “Greg” (with a timestamp). Each record can have whatever set of columns are appropriate.

Document stores
(e.g. CouchDB, MongoDB) The idea here is that each “row” of your data is basically a collection of key-value pairs. For example, one record might be {"fname":"Greg", "mi":"G", "lname":"Baker"}. Some other records might be missing the middle initial, or have a phone number added: there is no fixed schema, just rows storing properties. I choose to think of this as a “collection of JSON objects that you can query” (but of course the internal data format is probably not JSON).

Mongo has a useful SQL to Mongo chart that summarizes things nicely.

Tabular
(e.g. BigTable, Hbase) The big difference here seems to be that the tabular databases use a fixed schema. So, I have to declare ahead of time that I will have a “people” table and entries in there can have columns “fname”, “lname”, and “mi”. Not every column has to be filled for each row, but there’s a fixed set.

There are typically many of these “tables”, each with their own schema.

Summary: There’s a lot of similarity here. Things aren’t as different as I thought. In fact, the big common thread is certainly less-structured data (compared to the relational style of foreign keys and rigid data definition). Of course, I haven’t gotten into how you can actually query this data, but that’s a whole other thing.

Let’s see if I can summarize this (with Haskell-ish type notation, since that’s fresh in my head).

data Key,Data = String
memcacheDB :: Map Key Data
data CassandraRecord = Map Key (Data, Timestamp)
cassandraDB :: Map Key CassandraRecord

data JSON = Map Key (String | Number | … | JSON)
mongoDB,couchDB :: [JSON]

data Schema = [Key]
data BigTable = (Schema, [Map Key Data]) -- where only keys from Schema are allowed in the map
bigTableDB :: Map Key BigTable -- key here is table name

The documentation for these projects is generally somewhere between poor and non-existent: there are a lot of claims of speed and efficiency and how they are totally faster than MySQL. What’s in short supply are examples/descriptions of how to actually get things done. (For example, somewhere in my searching, I saw the phrase “for examples of usage, see the unit tests.”)

That’s a good start. Hopefully I can get back to this and say something else useful on the topic.

Computer Woes

June 10th, 2010, 10:32 am PDT by Greg

My computer at home has been locking up occasionally for the last few weeks. This has been happening since my upgrade to Ubuntu 10.04/Lucid, but I suspect this is a coincidence. (1) The lockups are hard: even the SysRq magic doesn’t do anything, so I deduce that the problem is in the kernel or below. (2) I haven’t seen any reports of the new Linux kernels being flaky. (3) I tried an upgrade from the i386 to amd46 (32-bit to 64-bit) system which I had been meaning to do anyway: no change even with a significantly different kernel.

Thus, I am of the opinion that I have a hardware problem.

As a computer scientist, I don’t enjoy hardware problems, so I’m thinking about buying my way out of them. (Also, my current system is mostly 3 years old, so it’s not a crazy time to upgrade.) My current thinking:

For about $700, that would leave me with the same case and power supply (an Antec Sonata II, 450W), my video card (nVidia 7600GT, but don’t game so who cares), my Hauppauge PCI TV tuner, and my recently-upgraded hard disks.

So, the questions for the crowd: Does my “it’s hardware” assessment sound right? Is it likely that the processor/mobo/RAM swap will fix my problems? Any other suggestions for hardware purchases?

« Previous Entries   Next Entries »