CMPT 165: the revisening

September 28th, 2014, 3:15 pm PDT by Greg

I have recently been reviewing introductory web textbooks for CMPT 165. They seem to all show signs of having been written in 1999, and revised, and revised, and revised. This leads to weird anachronisms where things haven’t been revised exactly perfectly. I end up seeing a lot of things that would leave students confused about the “right” way to do things, how to approach designing a page, etc.

Then I look at my own CMPT 165 (Introduction to the Internet and WWW) materials. And I see the same things in a course that has been revised and updated several times since 1999.

So I have decided that it’s time. Time to start with a blank page and rebuild the course from scratch.

I have decided on a backbone that emphasizes the underlying structure of the web: HTML for content, CSS for appearance, and JavaScript for behaviour. For at least the HTML and CSS, I’m staying with a familiar formula: introduce structural markup and content/presentation separation without falling into the trap of explaining every tag/property.

On the programming part: (1) I want to start as soon as possible so students have as long as possible to get their heads around the idea of what programming is. (2) I want the JavaScript introduction to (as much as possible) have the flavour of real JavaScript client-side programming: most beginner tutorials are basically old-fashioned console I/O programming introductions shoehorned into the browser. I don’t think that’s compelling.

That lead me to a structure that involves introducing the Big Three (HTML, CSS, JS) as early as possible, and then building on the basic concepts of the three together. Also, it has to be a thirteen week course, accessible to people who have never opened a text editor before, teach some basic ideas of how computer science people see the world, hopefully contain a moderately-coherent chunk of material at the end: all the usual restrictions on such a course.

This is, of course, scary. You know that “fear of the blank page” thing? Imagine the fear of the blank textbook… that you have to fill… and you have already promised you’ll actually produce.

So to make it even scarier, I’m baring my soul and putting the whole thing on Github.

At this point, I’d be happy to get feedback on the course: what belongs, what’s important, how to actually do these things I have proposed? What is this “flavour of real JavaScript client-side programming” thing that I proposed to do a few paragraphs ago and how does it translate to a first-time programmer?

Learning Chinese

December 2nd, 2012, 1:07 am PST by Greg

I have now finished six credits (two regular courses) worth of Mandarin. I’m pretty pleased with how things went.

The word “fluent” certainly doesn’t come to mind as a description of my mandarin. Definitely “not totally ignorant” would be fair. I don’t see any way I was going to learn any more of the language in four months, so I’ll take that as a win.

Pleco was a big part of me learning as much as I did. If you’re learning Chinese, you need it. I know it seems like a lot to pay for an app, but screw that, it’s worth it.

At the end of the course, I have 336 flashcards (≈ vocabulary words) in Pleco, with 361 unique characters. I’d guess I can write most of those: maybe 275–300. Basically, that’s enough to occasionally see a Chinese student’s facebook status and figure out more-or-less what’s happening.

My spoken is somewhere between difficult and impossible for a native speaker to understand. It’s better if I’m concentrating on what I’m doing.

Let’s not talk about my listening comprehension. The best way I can describe it: I have enough brain cells to either hear the sounds or process what the sounds mean. I never seem to be able to do both at anything like a reasonable speaking pace.

My top three most annoying things about Chinese:

  1. It’s not written phonetically. I thought this would be my biggest problem going into the course. It definitely makes learning vocabulary harder since there are kind of two things to learn for each new word. But somehow it wasn’t a huge irritant as the semester went on.

    I know there are little phonetic hints here and there: I know 吧、把 and 爸 and they sound similar, so I could take a pretty good guess at å·´. Still, there isn’t much of that for a beginner, so I’m not counting it. Also, if I guessed how to pronounce 色 the same way, I’d be very wrong.

  2. No capital letters. I have a surname that happens to also be an English word and that has never been a problem. I have never known anyone to read “Baker” and think about a pastry chef, because that’s written “baker”.

    On the other hand, if I come across the sentence “我觉得笑茵很好”, I have to stop and think “I know everything but 笑茵… what is that? Is it a word I should know? Is it a verb/noun/adverb here? Can I guess what it means from the context? The characters contain the bamboo and grass radicals: maybe it’s something about plants?” Basically, I’m screwed out of understanding that sentence.

    If there was some hint that 笑茵 is a girl’s name, then I’d be totally fine: the speaker thinks some girl with that name is pretty. There is no such hint.

  3. No spaces between words. Goddamnit anyway, this is no way to run a language.

    Here’s an example to illustrate: “å­¦” (to study) and “生” (to be born/give birth). Thus with no other information, I’d see “学生” and think “studying birth… they must be talking about obstetrics.”

    But no, “学生” is one word: student. How do I know that? Because I know it: nothing about the way it’s written gives me any hint if it’s one word or two. How do you say “to study birth?” Damned if I know. Maybe “学习生” would do the job, but likely some other term. I’m sure there are other examples where the ambiguity is worse and/or harder to clean up.

    That’s probably the computer scientist in my worrying about an ambiguous grammar in that sense. It’s probably my biggest “you guys need to fix your language” thing, though.

Surprisingly not making the list: the tones. Sure, we don’t have anything like them in English, but we don’t have that consonant sound from 词 (cí) either and nobody bitches about that. I wouldn’t go so far as to say that I can reliably hear the tones, but that always seemed pretty far down the list of problems.

I have a solid list of things I like about the language too, but that’s going to have to wait for another post.

The Life Of A Student

October 2nd, 2012, 11:34 pm PDT by Greg

For reasons that are better left to another blog post, I am not teaching this semester. I have some project students, and am supervising a distance ed course.

Rather than have free time (like a normal person would opt for), I decided to prepare for my semester in exile by taking a Mandarin course.

Being on the other side of the lectern is weird.

And not just any Mandarin course, naturally. I’m taking the intensive course that our DDP students take. It’s basically the regular SFU Mandarin course at double-pace. This means that I’m going to learn a decent amount before I go, but it’s a little like drinking from a firehose.

The instructor has done a really good job of organizing the course to make it all bearable, but there is just a mountain of vocabulary to deal with.

Surprise #1: the written language doesn’t bother me so much—I’m actually pretty good at remembering characters, which I did not expect.

Surprise #2: I’m being a much more kinesthetic learner than I would have ever expected in my learning. The characters are less a picture than a series of motions to draw them. I often remember the tones of words with a motion in my head.

Surprise #3: I recently got a Chinese name (吴君睿/Wu Junrui) and a Renren account (the Chinese facebook equivalent). Using social media with only Google translate and conventions to guide you is a challenge. Doing the CAPTCHA to open the account took me like 20 minutes.

Current mood: cautious optimism.

Going Into Exile

August 16th, 2012, 10:24 am PDT by Greg

As I was just mentioning some kind of professional journey, I guess this blog post is overdue…

My department has a joint Dual Degree Program with Zhejiang University in Hangzhou. To be honest, I really had my doubts about the program when it was created, but the more I see, the more I like it. There have been some difficulties, but certainly an overall win for SFU and the CS department.

We have visited ZU twice. When we got back the last time, I decided to put my name on the list for the faculty exchange that is part of the program: every year one person from each school goes to the other for a semester.

I had imagined that there was a multi-year waiting list, and thus imagined that the offer was somewhat abstract. The program director responded with “how about next year?”

So, I’m going to China for the ZU summer 2013 semester: end of February to start of July.

I’ll be teaching two courses when I’m there: a discrete math course for DDP students (those originating from both the Canadian and Chinese sides), and a web development course much like CMPT 470.

The discrete math course should be easy enough. I have taught MACM 101 here, and the course is basically that with a little extra. The Canadian students are just going to be thankful that I’m speaking English. The Chinese students are going to be worried about the English, not the math.

The CMPT 470-like course should be… interesting. First of all, the DDP students are already at SFU by fourth year, so the students in the course will just be rank-and-file ZU students. They won’t be the special cohort with extra motivation to learn English, and an international outlook. Just senior CS students who are willing to give a shot to a course that some foreign instructor is teaching in English.

Problems I see arising: (1) the whole development world at ZU seems to be focused around the big-vendor tools: Java, C#, C++, Visual Studio, etc. I’m going to arrive and insist on Ruby or Python (or similar), since that’s the way things are done in my world. (2) These students have spent their whole lives behind the firewall, and we’ll likely have pretty different ideas of what good web sites are.

Basically, I’m alternating between “wow, what a wonderful opportunity” and “what the hell have I gotten myself into?”

Life of a Journeyman

August 10th, 2012, 9:09 am PDT by Greg

We were watching some No Reservations the other night, and Tony referred to himself as “essentially a journeyman chef”.

For some reason, the word “journeyman” stuck in my brain as one of those words that I don’t really know what it means but probably should. As usual, Wikipedia has an excellent description:

someone who has completed an apprenticeship and is fully educated in a trade or craft, but not yet a master. To become a master, a journeyman has to submit a master work….

And from Merriam-Webster:

an experienced reliable worker, athlete, or performer especially as distinguished from one who is brilliant or colorful

Now the idea was really stuck in my head, because it so perfectly fits a problem I have been having. Occasionally a student says something like “thanks, that course was great”. I have an uneasiness about the word “great” for a reason I can now articulate.

I see myself as a journeyman lecturer.

My courses are those of someone who is fully educated in his craft: they are fairly well designed and executed. But, they fundamentally present the obvious material in the obvious way and aren’t exactly mind altering. Basically, experienced and reliable, not “brilliant or colourful”. None of them are anything I would consider calling a “master work”.

This is exciting, because it means there may be a master work out there somewhere in my future, and I don’t know what it is yet. Note to self: find master work.

So I continued to read the Wikipedia article:

spending time as a wandering journeyman (Wandergeselle), moving from one town to another to gain experience of different workshops, was an important part of the training of an aspirant master

Traditionally, a journeyman well… journeys. A journeyman tradesman would put on the traditional costume and go out, hoping to make enough money working for a master to make his way to the next town. [Important point: the guys in that picture are not historical reenactors. There are still tradesmen in Germany who do this.]

Perhaps there is some professional journey I could take. Let’s come back to that.

[Forgive the gender-loaded vocabulary, but “journeyperson” just isn’t a word and wouldn’t have the same ring to it if it was.]

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.

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”).

Ten Years

November 29th, 2010, 12:44 am PST by Greg

As of the end of August 2010, I have been employed as a lecturer at SFU for ten years.

On the basis of Peter Norvig’s excellent essay “Teach Yourself Programming in Ten Years“, I extrapolate that in the past ten years, I must have learned how to do this thing that I claim to be my profession.

Because I like Norvig’s examples, I will add my own: Queen formed in 1971, and played the Queen Rock Montreal show in 1981. Just look at that performance, just look at it! I’m convinced Freedie was an alien from the planet of excellent stage performers and was exiled for making everyone else look bad.

While I’m not Freddie Mercury, I think I’m doing okay. I have felt my lecturing style change, even within the last year. It’s somehow just easier; more comfortable. I’m more likely to leave a lecture and think “anybody that thinks they could have done that any better can go fuck themselves,” usually on days when I have coffee, which does funny things to my brain.

I still think of myself as a better course designer than actual “lecturer”, but that’s another story.

By the numbers: (all values as close as I can figure without really looking that hard)

  • Students taught on campus: 4900
  • Students supervised in distance sections: 2200
  • Time spent lecturing: 1600 hours, or two straight months
  • Time spent watching exams: 220 hours, or one icepick lobotomy
  • Sections of CMPT 120: 4
  • Sections of CMPT 165: 14 on campus, 17 distance
  • Sections of CMPT 470: 13, with 153 project groups
  • Projects supervised: 9 (capstone, directed studies, etc.)
  • TAs supervised: 125
  • Emails sent and received: 150,000 (wild guess)

Okay… I’m tired just looking at that. Must be getting old.

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.

« Previous Entries