Monday, December 10, 2012

Week 15 - Wrap Up (Dec 2 to Dec 9)

The final week of the semester has come and gone. This is the 7th time for me. One more year before I graduate and what I can say looking back is that I have somehow managed to find less time for myself with all of my classes. I feel like I keep taking fewer and fewer hours every semester, and I end up with more and more work.


The last test was trickier than the previous tests in my opinion, but that was to be expected because the material gets trickier and more nuanced as the class goes on and we have had less time to experiment and learn those concepts than we had for earlier concepts. I think the tests were fair. Although the daily quizzes could be a bit of a nuisance when the quizzes didn't cover the day's reading -- especially when a quiz covered a reading from several lectures ago and that reading is not fresh in your mind. Overall, the quizzes were another good tool to keep people on track with the material, encouraging students to study the tricky topics between every lecture, rather than waiting until the test is imminent.

Lectures



Overall I have a pretty positive opinion of the class. The lecture style was good for keeping everyone alert and learning, and was extremely clear. The papers were excellent reading. (The textbook on the other hand was dry and outdated.) The projects started off very simply and taught us the foundations of C++ and Object Oriented Programming (OOP), and then built upon those concepts. I wouldn't say the projects were particularly challenging on average, with the exception of the last project. Mostly they involved learning a simple concept and then building around that. I feel like I learned a lot about C++ and got some valuable experience and knowledge about C++ that benefitted me immediately because I was taking Computer Graphics this semester as well, wherein all the projects were in C++. Some knowledge of the trickiness surrounding certain concepts in C++ like copy constructors and copy assignment definitely bailed me out of some tricky problems that I saw other students [who had not worked with as much C++] struggle with. Immediate payoff is very validating.


One negative to the lecture style that poses a lot of questions to the students is that the learning is very instructor-driven, which can be a bit stifling to the types of learners that would prefer to digest an idea, interact with it (perhaps by experimenting with the code), and ask questions which explore tangential subjects. There were definitely topics that could have been explored in more detail and I wish I had been able to ask questions in the heat of the moment but we move pretty quickly through every detail that it's hard to really slow down and address some possibly interesting questions.

Programming Labs 



The programming labs were generally a good learning experience, at least as far as the implementation of the project was concerned. I understand that testing is important, but the fact that I spent nearly half of my programming hours devising unit tests is, I think, a problem. For instance, sometimes you want to create a function which encapsulates some extremely simple functionality. Maybe it wraps another method. There are a lot of circumstances where being required to write 3 unit tests per method, no matter how simple, is extremely frustrating. There are also functions which don't lend themselves to unit testing at all. For instance, functions that generate text output. Instead of writing directly to the console or a file, I found myself constructing strings in the unit test code which have to exactly match the output of the function, down to the number of newlines. Isn't that what acceptance tests are for? Weren't we running acceptance tests anyway?

I would recommend slightly relaxing the requirement for unit testing. Default constructors shouldn't need testing. Constructors which do trivial assignments of arguments to variables in the class and no other code, really shouldn't need testing either. Functions that output text shouldn't need testing. Functions that simply return the value of an instance variable most likely don't need explicit unit testing. The threat of getting a serious reduction in the lab's score scares us into doing all of these things, rather than focusing on unit testing the functions that are likely to be incorrect, and especially the functions that are more likely to break as the functionality is extended.

I even became aware that some people were attempting to circumvent the requirement to test all their methods by making "simple methods" into complicated #define macros! They engineered around the problem of testing simple code, but ironically they made their "simple" code much more likely to break (and more difficult to debug)! I hope examples like this help to expose the flaw in the requirement, and that the requirement will be relaxed to be something like "write at least 3 unit tests for non-trivial methods" (and define trivial methods as you see fit).

For Computer Graphics, I spent about 40 hours on one project. This project had many parts, and a lot of opportunities for exploring and expanding the programs for extra credit. Every half hour or so you feel like you solved an interesting problem, added a small feature, or fixed a funny detail of the code. I don't view any of that time as wasted, and it was so rewarding that I actually plan to continue to work on several of the projects from that class. Unfortunately, I hardly remember my solutions to any of the projects in this class except the most recent one, which I will surely soon forget the details of.

Sadly, the projects for this class were simply not inspiring. I suppose that is to be expected for a class which is essentially an introduction to C++.

Skills Learned



Skills we learned in the class:
  • C++
  • CppUnit
  • Git/Github. I like that there is a class which actually requires using source control in a sane way (i.e. not in a way that involves pushing to an repository that belongs to the instructor, for instance, where you don't have direct control over problems that arise). Using a VCS, especially a DVCS, is a good skill to have. My opinion is that Git should be required for programming labs beginning with a freshman- or sophomore-level required class.
  • UML Diagramming. Nice to do, not too time consuming, good for designing solutions to OOP projects.
Skills we should also learn in the class (since we're already making the effort to learn Git):
  • Make (Makefiles). This doesn't even really need to be explicitly taught. Providing a Makefile with the project would probably be enough. Students will be smart enough to figure out how to update a simple makefile to add to the list of files that get compiled. My Graphics class did this and it worked very well. This allows students to turn in a project without worrying especially about how their files are named, because the grader will simply run "make" instead of a predefined build command, using the students' Makefiles.
  • Multiple-file projects (when you have a lot of classes, we should make additional C++ files and update the Makefile as above -- also, executable code should be by-and-large in .cpp files, not in .h files. Even though the latter makes compiling much easier, it is bad style and confusing to teach this way in a class where most students are seeing C++ for the first time.)

Workload



There are some classes that are really hard, and that difficulty translates to the time you're likely going to spend on projects and studying. And then there are some classes that are just very time consuming. I've had some of both in my time at UT. I'm happy to say that there is less busy work as time goes on, and that as the classes get harder they also get more interesting. I very rarely find that the projects I do these days are a poor use of my time.

Unfortunately, this class toed the line between productive learning experience and busy work. The first labs were helpful to get oriented in C++ but they took way too many hours for what they were. For the first couple of labs, 75% or more of my time was spent writing unit tests, or updating the issue tracker in GitHub.

I think the class website is very accurate about the amount of time you'll spend on this class, in all categories. I was just a bit disappointed that the hours spent programming were mostly spent in mechanically devising unit tests, rather than in solving interesting problems. I wouldn't have minded 20-hour-a-week programming assignments if the assignments were legitimately interesting, as they were in computer graphics.

I expected more interesting and inspiring projects from a class which is numbered as Senior-level (371) and named "Object-Oriented Programming." Most of the OOP we covered in this class is covered in a standard Data Structures class taught in Java, and there is so much more to learn about OOP. I wish we had gone into more depth in that regard.

I know I sound like I'm complaining about the class more than I am praising it. Simply put: what was good about this class was good, and there's not much more to say about it. In fact, most of the class was good. I'm simply hoping that students who take this class in the future will benefit from the professor's consideration of these criticisms.

Sunday, December 2, 2012

Week 14 - Off to the Races (Nov 26 to Dec 1)

This week was the combination of too much to do and the premature celebration of the end of the semester.

As we approach the end of the semester we all tend to get sucked into festivities. Celebrating the last midterm before finals, going out with your clubs for banquets, and hanging out with friends and playing video games because you can afford a little break. It doesn't always work out that you can afford that break, but you try to fit it in anyway...

So, this week, my honor society had officer elections -- which tend to drag on and on every semester (but at least there's free food!). Of course, I ran for President, and although I know I wouldn't be a horrible choice, I lost to a better candidate for the 3rd semester in a row. I wouldn't say I wasn't trying, but not getting elected is a favor to me because it means less unnecessary responsibility for next semester. I'll still have one more chance before graduating next December.

On top of spending an extra 3 hours for elections on Wednesday night (yeah, pretty inefficient), I had an exam on Wednesday afternoon in my hardest class, Computer Architecture (EE 460N). And of course, I had the Life project to finish.

Between working alone on this project, and Thanksgiving holidays filling up the weekend, I was no where close to done with the project by Wednesday morning and I REALLY needed to study for my test that afternoon. I was fully prepared to submit my half-baked solution on the project so that I wouldn't get a zero and I could just move on with my life, but when Professor gave us a key piece of code we needed for the project and announced a 24-hour extension, I felt like my life had been saved.

I managed to get the project done after spending several all-nighters this week, and ended up missing rehearsal because I took a nap that ran too long, but I think in the end it was worth it.

Next week I have a paper, two projects, and 3 tests. Gonna be FUN! [1]

[1] For certain definitions of fun.

--------

I've learned a few important lessons from this week:

* Don't take holidays for granted. Make sure you get your work done ahead of time or your neck will be on the chopping block.

* Don't work alone if you're given the option to work with a partner (unless you can't help it). The time you save just by having someone to keep you focused and prevent you from spinning your wheels is probably even more useful in a college setting than in a work setting, because HERE we are surrounded by a million-and-one things to distract us, not the least of which is our other classes. On the other hand, I didn't feel guilty about spending some time exploring some other concepts of the class which weren't strictly necessary for the project, because I didn't feel like I was wasting a partner's time.

* It's okay to make sacrifices for more important things. I'm going to go into more detail about this one, below.

If I had tried any harder to get the project done on time instead of studying for my test, I probably would have failed my test. As things were, I was well-prepared for both my test and the officer election. I would have learned the material from the project one way or another and I probably could have afforded that setback in my grade for this class. The test was way more important.

I also went into the Thanksgiving break knowing that it was important for me to spend time with my girlfriend, my parents, and my best friend while I can, and I will cherish the memories of a nice relaxed Thanksgiving break in the long run, no matter how I ended up doing on the project.

See, the things that stay with us in the end are the good memories, and those silly little setbacks we have along the way will always get buried in more important memories. Maybe you end up with a mediocre grade on your transcript, but 10 years from now you probably won't remember exactly how that happened.

Do what you need to so you don't fail your important classes, and no matter what grade you get, make sure you learn the material that is most important to you at the end of the day. Maybe it's okay to blow off a homework assignment every now and then so that you can take a sanity break and play some of that video game you bought in the Autumn Steam Sale. But remember above all to make time for the stuff that's important to you and the people you love.

Some wisdom from a legendary philosophy professor:
http://www.pickchur.com/2011/03/golf-balls-in-the-jar-the-philosophy-professor/