Hangzhou

September 29th, 2011, 4:17 pm PDT by Greg

We have now had our first full day in Hangzhou (plus an afternoon after the flight). With apologies to the Beijingers out there: it’s better here.

Wednesday night (after the flight), we took a walk around the city: north along the lakeshore and back through the city. Somewhere in there, we realized we were all hungry and found this fast food place upstairs (at Yan’an and Qingchun roads for anybody keeping score).

When we went in, it was immediately obvious to Oli and I that ordering was impossible: you seemed to have to buy tickets (from a Chinese-text-only menu) and then go to the prep area and give them your tickets to get food. The text-only menu was a dealbreaker for us and we suggested moving on.

Kat and Tina went up to the food-getting area and started pointing at things. Some dude that worked there took pity on them, led them to the cashier, ordered the things they had pointed at, and took them back to get food.

Oli and I were left thinking “what the hell just happened? Why are we eating?” Then they somehow ordered seconds.

This illustrated the strategic difference between our coping strategies. I want to have a plan, like I did with the great wall driver: I’ll translate “lunch noodles” and then reply “yes” to whatever he says next. Kat is much more comfortable going in guns-blazing (with a note pinned to her chest that says “sorry I don’t understand Chinese”). I believe these strategies are complementary.

Other than that, good first day here: paddle around the lake and tour of the tea fields (by taxi). It’s pouring rain and I was really a lot wetter than I was comfortable with yesterday, and today promises more of the same.

Beijing: check.

September 27th, 2011, 7:26 am PDT by Greg

We’re leaving Beijing tomorrow at noon, so that pretty much wraps up this leg of the trip.

On Monday we got a driver from the hotel to take us to the Great wall (Juyongguan section). That was excellent.

After the wall, we were thinking about lunch, but the driver spoke no english. Through the magic of Pleco, I translated “lunch, noodles”, to which he responded (thanks to its handwriting recognition) something that translated like “noodles with bean sauce”. We said yes, and he took us somewhere back in Beijing. We convinced him to eat with us and had something I have since learned is called “zha jiang mian” and was amazing.

Pointers to good zha jiang mian in Vancouver would be appreciated, since the idea of not having it again makes me sad.

Today, we walked through Tiananmen square and the Forbidden City. Then back south through Wangfujing.

To Hangzhou tomorrow, where I honestly hope there is less to see, since I don’t think we can keep up this pace: I think the combination of walking everywhere (including up the wall) and mental overhead trying to figure out how to do things without sharing a language with the locals is taking its toll.

Pictures are being posted, daily(-ish).

China day 1

September 25th, 2011, 2:13 am PDT by Greg

After 24 hours on the ground in Beijing, it’s finally really settling in that I’m in a whole other country. For the first few hours, I was so tired I might have just taken an 11 hour plane ride to Richmond for all I knew.

But here we are: me, Kat, and our friends Oli and Tina. We’re staying at the hotel where Tina’s conference was. (The conference was the original seed of the idea for the trip.) The hotel is around NW 3rd ring road, near Peking and Tsinghua Universities, for those who care.

Today, we met a friend of a friend who grew up in this part of the city. He showed us around the two Universities. It really seems like they have a Harvard/MIT thing going on: Peking is the top-ranked school, but Tsinghua is right next door, a close second, and has more of an engineering/applied focus.

Kat and I always seem to swing by local Universities when we’re on vacation. Having spent just about exactly half of my life around Universities, there’s a comforting sameness about them. What differences exist are always glaring.

In the name of not packing too much into this trip, that was our day. We’ll probably do something after dinner: plans still unclear.

Need a CMPT 470 instructor

August 25th, 2011, 3:20 pm PDT by Greg

As many of you know, I’m the most frequent instructor for CMPT 470, Web-based information systems, at SFU. I love teaching the course, but it’s just not possible to do it every semester. In particular, it’s not possible for me to teach it in the spring (Jan-Apr 2012).

So, it will likely be posted as a sessional (contract) instructor position. We have had sessionals do the course in the past, but I reckon I can make things a little more interesting: there’s a good web development community in Vancouver, and there a lot of people who would do a good job with the course. There is also an increasingly-large group of CMPT 470 alumni who have been out there in the world for a few years getting some experience: some of them would be good at this too.

I just have to find somebody and get them to actually apply. So, I’m putting the call out: anybody interested or know anybody who’d be good?

The course (as I approach it) is a survey of web development topics: markup and style, HTTP, server-side programming, client-side programming, architecture/speed/backend stuff, and whatever else I feel like talking about that semester. The big piece of work for the students is a group-based project which makes up a big chunk of their final mark.

Officially the appointment requires a masters degree, but a case can be made for somebody with industrial (and even better, teaching) experience. The course is scheduled in the evenings (Mondays 5:30-8:30) on the Burnaby campus, so shouldn’t interfere too directly with a day job. Pay is around $8500 plus benefits.

Of course, anybody teaching the course is welcome to my lecture notes, assignments, web materials, and anything else I have that would be useful. There’s no official posting yet, but I figure it’s a good time for people to start thinking about it. I’m happy to talk to anybody about the course.

Edit: I should point out that I’m not the one making the hiring decisions. I’m just an interested third party.

Version Control conundrum

June 4th, 2011, 12:27 am PDT by Greg

As most of you know, the School’s new course management system is my baby. It keeps track of many things, but what I care about right now is (1) who is in a course, and (2) what groups have been formed for assignments/projects/whatever.

Given those things, I have had this idea: It would make perfectly good sense for each of those things (every student in a course; every group in a course) to have a version control repository automatically created for them. The instructor and TAs would also have access, but wouldn’t have to set anything up. Students could use the repositories even in courses where the instructor doesn’t know what technology is.

I have used Subversion repositories for the project groups in CMPT 470 for years. The benefits from my point of view:

  1. Groups can collaborate in that way that version control systems allow.
  2. Students can work on code (even individually) in multiple locations and with versions kept.
  3. All of their code is safely backed-up on a server that we kind of trust.
  4. I can review what members of the group contributed what code.
  5. It’s a nice and easy way to submit code: just give me the SVN URL.

When contemplating technologies to implement my scheme, I went first to GIT (or possibly some other distributed version control system, since they’re all the rage). GIT also has a pile of nice management tools like gitolite that make creating thousands of repositories surprisingly easy.

But while experimenting, I realized that GIT inherently trusted the user-provided information about who they are. If I claim to be “Barack Obama <president @whitehouse.gov>” in my commits, then GIT lets me push those commits just fine, no matter who I have authenticated as at the central server. So, I pretty much lose benefit (4) in the worst cases (which are the cases I’m usually concerned with), which is pretty much a deal-breaker by itself.

The “distributed” nature of any DVCS gets me this problem one way or another—anybody could push the whole group’s work since they could be working for weeks without touching the central server. And having made that realization, I have to admit that (3) also disappears: they don’t have to push to the server very often, so a crash on their end could lose a lot of work.

Finally, knowing students the way I do, (5) is gone too. I’d give a lot to not have this conversation five times a semester: “I got a zero.” “You didn’t submit any code.” “Yes, I committed it.” “You committed it, but did you push it to the server?” “Yes, I pushed it.” “You typed the command ‘git push’?” “No, I use ‘git commit’. That puts the code on the server.” “No it doesn’t. You didn’t put any code on the server where I can get it.” “Yes I did… I committed it.”

Also, it’s my understanding that it’s not possible to give a URL to a subtree of a GIT repository: the only URL is to the project itself. That makes submitting with GIT much harder.

So, I’m left with this: distributed version control is at least as good for developers, but it’s very bad for instructors.

According to Wikipedia’s comparison of revision control software, the only open source, “actively-developed”, “client-server” VCS is Subversion. So it looks like I’m back to the totally-uncool and old-fashioned SVN?

Does anybody want to refute any of that?

What programming language should I learn?

May 20th, 2011, 11:56 am PDT by Greg

I recently had a former CMPT 165 student email me and ask essentially if Python was the best language to learn [first] from a practical/employment standpoint. This was my response, that I think was good and would like to expand on here:

Certainly the traditional view of the world is “C/C++/Java for big projects or where speed matters; higher-level languages like Python/Perl/VB for smaller projects or automation.” Certainly many of my colleagues continue to see the world in this way.

The programming language world has changed in some subtle ways in the last few years and I don’t think that attitude is really valid anymore. If I was starting a big project today (like writing a word processor or something), I would probably start with Python (or something similar): it’s easier to write and get things done and it’s possible to bridge to code in Java or C if you need to.

If I had to honestly summarize the world today, I’d say “C++/Java/C# for big companies who want to make a ‘safe’ choice of programming language; Python/Ruby/JavaScript/Scala/etc on smaller projects where the developers make the choice and want to get things done and enjoy their lives.”

A few footnotes on that: (1) the result is there are probably more Java/C# jobs in the world than other languages; (2) the Python/Ruby/Javascript jobs tend to be in smaller companies and are probably more fun; (3) after you learn to program, learning a new language isn’t nearly as big a deal as learning your first–most of the concepts are always the same.

By “the programming language world has changed in some subtle ways”, I mean mostly:

  1. Languages we always though of as “slow” have been made shockingly fast by just-in-time compilers like V8 and PyPy.
  2. Mixing languages in a project (e.g. calling C from Python, or using one language’s standard library from another) seems, to me at least, to be an easier and more mainstream thing to do if you need to.
  3. Frameworks/libraries are used much more heavily. If you spend 90% of your time calling some GUI library, the speed of your code doesn’t matter much: the speed of the GUI library is what matters. (And, who’s to say the library is written in the same language you’re writing? See 2.)
  4. C isn’t the “fast” language anymore. That’s probably more controversial, but basically, C is really good at single-threaded performance, but multithreading and heterogeneous processor environments are a real pain. Today’s reality is that new processors aren’t improving single-treaded speed by very much. Those who want their computation to happen really, really fast seem to be increasingly reaching for computation-specialized tools like Go, OpenCL, or Hadoop. It turns out that the explicitness of C starts to become a burden if you have to smack the mutexes around by hand.

My assertion that “C++/Java/C# for big companies who want to make a ‘safe’ choice” is really just a gut feeling. I understand and even agree with the desire for static typing in a huge project, but I honestly don’t think that’s why companies choose Java or C#. Companies choose these language because they are enterprisey: they are the kind of language that checks all of the CIO’s boxes and have comforting professional certifications that the HR department can look for.

Also, big companies probably think Oracle’s ownership of Java is a good thing. They haven’t reached the conclusion that I (and I suspect many others have): Oracle will slowly strangle the life out of Java until it truly becomes the new Cobol.

So where does that leave us?

You might as well look for a language that’s (1) fun to write, and (2) easy to actually get shit done with. For me that’s Python, but I can certainly accept Ruby, Lua, Scheme, and friends. I could accept PHP and VB (if I had enough drinks in me) or even C# and Java (if you had an explanation grounded in the language design/features and didn’t contain the words “enterprise” or “corporate”).

Wackiest spam ever

May 11th, 2011, 11:19 pm PDT by Greg

So I got this random email reporting a broken link on my CMPT 470 web site. It’s a little unusual to get an email like that from someone who was apparently not a student, but not totally crazy.

From: angela.hill88@gmail.com
Subject: Found a broken link on your page

Hey Greg,

I found a broken link on
[web page on my course site] and since I
was researching computer science and needed the page, I found an updated
article online. 

The broken link to "Howto for Python" is
[the once-working link] and I found an article on the front
page of [some not-totally-related web site] if you wanted to fix it.
Click the tab "Beginner Python Tutorials" to get to the article.

Figure I'd send you an email because others may need that link for the same
reasons!

Thanks!

Angela Hill
angela.hill88@gmail.com

I googled the sender, and found this essentially-identical broken link report with the same “correct” URL. There are a few other examples a Google away. It’s freakin’ link spam!

If anybody really wants to find the target page (that I’m not going to link to prevent bumping their pagerank for any reason), it’s “onlinecomputersciencedegree” with a “www” and a “com”. The site itself is entirely content-free: all external links to other pages.

Somebody’s plan must be:

  1. Crawl tech link pages.
  2. Link-checking all of their links. (The examples I have are actually broken links.)
  3. Finding the creator’s email and first name on the page. (or accessible somewhere else nearby?)
  4. Emailing that address with the spam link come-on.
  5. Hoping they blindly link to your site without noticing that it’s entirely worthless.
  6. Profit?

How is this possibly a thing? Am I missing something?

Elections, ugh

May 2nd, 2011, 11:17 pm PDT by Greg

So here I am in a hotel room in San Francisco, concerned primarily with an election in the homeland. We seem to be looking at a conservative majority and NDP opposition. Here’s my thoughts on how we got here…

I feel like the republicans in the states are mostly to blame for the NDP gains: there has been a lot off talk there about how health care and generally governments doing… things… is evil socialism. I think a lot of Canadians looked at that and said to themselves “that seems okay…we need us some socialism.”

As for the conservative gains? Here’s my glass-half-full take on that: three reason Harper is so popular is that he has been in a minority government and hasn’t actually been able too *do* anything. Given a few years of Harper being Harper, I don’t think the poll numbers will be quite the same.

As for the liberals… well… you picked Igatieff all by yourself.

Where’s the Beef?

January 28th, 2011, 11:22 pm PST by Greg

Step 1: Taco Bell sued because their “Edible Beef-like Taco Substance” contains only 35% meat, instead of the 40% required by law to call your product “beef” in the United States.

Step 2: Taco Bell president publishes a letter saying “no, our product is 88% beef, and the other 12% is unicorn jerky”.

Aside on terminology: there are three similar terms floating around here. I’m going to use them as such:

  • beef: muscle tissue of a cow.
  • “beef”: things that can be sold with the word “beef” on them, and apparently have to be 40% beef.
  • “Edible Beef-like Taco Substance”: what Taco Bell serves.

Step 3: I think to myself, 88% is a suspicious number. I mean, I have seen what comes in a Taco Bell taco, and it ain’t 88% cow, and claiming it is is a bit of a stretch.

Step 4: Waitaminute… “beef” has to be 40% beef. Is Taco Bell saying that their “Beef-like Taco Substance” is 88% “beef”, not actually 88% beef? But “beef” only has to be 40% beef.

88% × 40% = 35%

So, the President of Taco Bell just announced to the world “claims that our taco filling is only thirty-five percent beef are completely inaccurate. It’s actually thirty-FIVE percent beef, and I’d stake my career on it! No lawsuit that claims otherwise will ever succeed!”

Um… clever?

Loudness… I mean LOUDNESS!

January 27th, 2011, 11:15 pm PST by Greg

Okay, seriously… am I the only one with ears? I’m hardly an audiophile, but I’m increasingly finding new music unlistenable purely as a result of the loudness war. If you don’t know what that is, this YouTube video has an excellent description of loudness wars.

I have songs that I don’t like listening to because I know there’s a better song in there somewhere: I just can’t hear it because all the interesting stuff has been clipped.

Most recently, I found myself thinking that the Alicia Keys vocal Empire State of Mind is totally muddied. It would probably sound awesome if the vocal wasn’t squished in with everything else, but everything is too loud to let that happen. [You can certainly find it on your favourite file sharing service—don’t pay for it, it’s not worth it.] Most annoyingly, the video on youtube actually has better audio (to my ear at least) than the album version.

Screw it. I’m just going to listen to Gordon over and over forever. I ripped it myself from a CD I bought sometime in the middle 90s and it sounds awesome.

« Previous Entries   Next Entries »