Improvements

Today I gave what will hopefully be one of the last CS11 lectures I have to create from scratch. It was for the Advanced C++ track of CS11, which is going through some minor changes.

The main issue was that I didn’t feel like it had a unified focus, or a contiguous flow from the Intro C++ track. My predecessor Ben probably had it all well in hand, but my first term teaching that track sure didn’t feel right!

So, I have been tweaking it around a bit. This week I created a brand new lecture, all about std::string and the C++ Stream-IO classes. I think it was a nice broad lecture, and probably won’t need major tweaking from now on. It also has the benefit of covering exactly what the homework assignment needs, which I think the students will appreciate, too.

As one point of interest, I explained the dangers of this code:

  char* getUserName() {
    string name;
    cout << "Enter username:  ";
    cin >> name;
    return name.c_str();
  }

People who are used to Java usually get snapped by this one!

Ugh, now if I could only force myself to grade homeworks! (Yes, this blog entry is me flicking…) Just gotta get some grading knocked out by 10pm so that I can watch TV guilt-free…

Leave a Reply