Category Archives: Random thoughts

Random thoughts

End of Summer – Thank you!

This summer was a big one at for CDOT (Centre for Development of Open Technology).  We had almost 30 RA’s working on many many different types of project.  Yesterday was our final cdot presentation day for the summer.

For those unfamiliar, CDOT is an applied research group within Seneca College.  Over the years we have worked on many different projects related to open technology in various areas.  I am one of the faculty members involved with CDOT.  Projects tend to run over the course of a semester or two.  Students are hired either while they are studying or just after they graduate.

My team worked on projects related to 3D web graphics.  This summer I had two projects.  The first was a project with Box, to implement a 3D data visualization tool.  The second was with a Gorilla Productions.  The project was to implement realistic cameras for three.js.  (cameras that behave as real world cameras do).  In total I had 4 awesome research assistants working for me (Andrii, Barbara, Dmitry and Koji).  They have done a fantastic job on their projects.

However, aside from my two projects, CDOT also hosted many other projects.  One of the reasons the reasons that CDOT exists is to provide experiential learning opportunities to our students.  A chance for them to work on real projects and develop skills.  One of those skills is the ability to talk about their work.  Thus, each Thursday was we have “Demos”.  During that time, the teams will talk about their project and what they have been working on, problems they encountered, solutions they found.  Yesterday, was the last day and everyone had a chance to talk about thoughts of on their summer’s work.

Generally the comments were all very positive. However, there did seem to be a few themes that were shared by multiple students.  These were:

  1. Being surrounded by other very smart people working on interesting projects has helped them develop as programmers
  2. Demo days helped them learn from other teams even when they were not working on remotely the same thing.
  3. Demo days made them less nervous about speaking in front of crowds
  4. CDOT provided opportunities to work on something important with a great amount of freedom to design and implement their work
  5. CDOT experience has helped them to either find a job (a couple of students will start in new positions right after labour day) or the confidence that they will be able to find one shortly.

I truly believe that CDOT is one of those places that are unique and special.  We have students that do very interesting work on a wide variety of projects.  Our students are very bright, and I have always admired their ability to exceed my expectation.  Many of you have taught me things I did not know.  To all the RA’s at CDOT, know that you are the ones that make CDOT special.  When I see what you do, when I see what you have accomplished, I am reminded of why I teach.   Thank you!

On Code Documentation

There are two major problems that I see when I look at my student’s documentation for their code.

  1. no documentation … we are talking about not even having a header with their name on it here for assignments
  2. too much documentation – repeat all code in comments!

Both of these are problems.  One may not seem like a problem but it in fact is.

The lack of documentation in its entirety is just a job of incompleteness.  Most students understand that when they don’t do it, they will lose marks.  They know they should but for whatever reason they didn’t.   Its like knowing you should exercise but you don’t…This post isn’t about that.  The complete lack of documentation is relatively simple to address.

This post is addressed to those that document everything.  I know students who do this are very proud of their work and they put a lot of effort in it.  I get that.  I’m not knocking that.  However, I would like to ask you to please please please please please stop doing it.  Don’t do it.  It isn’t better.  A bad comment is worse than no comments at all.

Here are a few commenting guidelines:

  1. please don’t repeat your code in your comments… your code is there… anyone reading it sees what it does if they need to know it.  “this is a for loop” is not useful.  “this loop runs 10 times” completely silly.  “assign 5 to x”….please stop. please stop.
  2. I have found that comments become sacred over time.  programmers do not hesitate to alter code… and yet comments…well you can’t touch those (sarcasm).  So, with this in mind, I encourage you to write as little comments in the body of your code as possible!  Your code should be clear enough to read.  Unless you are doing something very very tricky, don’t put in a comment in the body of the code.
  3. Comments that are useful explain reasoning, that may not be immediately obviously.  In my first programming job I was trying to hunt down a bug in a program and I saw this comment “find first sunday in april and last sunday in october”… I could tell thats what the code was doing… that wasn’t hard.  I then spent a day trying to figure out why they needed to do this and whether or not it was the cause of the bug.  What they did and how they did it was clear… the code said as much.  I couldn’t figure out why it was that this was something that needed doing.  Finally, I realized the why and changed the comment to “adjust time calculations for daylight savings times”… to me this makes way more sense.  I’m not saying how to do it (and the how has changed since then as the time of year that daylight savings time comes into effect has changed).

Here is are the three things you should document:

  1. Have a header!  State who wrote the code, major modification dates, versions etc
  2. state the intention of each function (not how but what it is suppose to do), its parameters, expected return value and restrictions.
  3. document unclear variables, units  of measurement etc.

That’s it.  Let the code speak for itself.

Thank you to my teachers

Recently I got a tweet from a former student saying that they really liked my Data Structures class. It was really good to hear that and filled me with warm fuzzy feelings. It also got me to think about all the wonderful teachers in my academic career. There have been so many. I don’t know if I have ever expressed my gratitude at the time but I think it would be good for them to know (although I’m not sure if any of them will ever see this blog… but they say that nothing ever gets erased on the internet so maybe). So here is a small list of teachers/professors/instructors who have made a difference in my schooling.

Dr. Dekang Lin – My thesis advisor. The one who spent countless hours trying to explain grammars and parsers to me. You have taught me so much and provided me so much support. I thank you from the bottom of my heart.

Dr. Helen Cameron (Univeristy of Manitoba) – who was very tough but incredibly fair. I never worked so hard to get things done as when I had two courses with you in the same semester.

Dr. John Bate (University of Manitoba) – I never directly used what you taught me (digital logic) but it was the course that made me really understand how computers work.

Al Marshal (University of Manitoba) – my own data structures prof… clear, concise with a sense of humor too.

Dr. Bill Kocay (University of Manitoba) – my other data structures prof who helped me to understand all about suitcases 🙂

Dr. Neil Arnason (University of Manitoba) – who helped me out a lot when I started teaching and made it easy for a newbie like me to transition into this career

Dr. John Anderson (University of Manitoba) – who gave me my worst grade on my transcript but you were my first CS prof and you always did a fantastic job teaching… and you know I mean it when I say this since you gave me my worst mark 😛

Dr. Russel (University of Manitoba) – The mandarin classes were awesome.

Mr. Doug Silzer (Cedarbrae Collegiate, Scarborough Ontario) – who taught me to reason through problems and never gave me a straight answer.   Thinking through to a solution is important after all :).

Mr. French – who taught history and not French :P.   Your class was amazing

Mr. Horkoff (Ken Seaford Jr. High) – a teacher who grew my love of science.

Mr Thies (Ken Seaford Jr. High) – a teacher who taught me to do my homework even when I thought I knew what I was doing already because a good student do their homework. I believe that were it not for this enforcement of homework doing, I would not have been able to so easily continue my studies at higher levels.

An ESL teacher in Meadows School in Brandon Manitoba (sorry I forgot your name, it was long ago, I was really really young, and I was only there for 3 months)  who taught me that the “th” sound required the sticking out of the tongue to be properly pronounced. “The” not “De” :).

Miss Jenny Smith – awesome exchange teacher from England who taught at James Nisbett in Winnipeg for one year. You were awesome.

So, if anyone reads this and knows any of my former teachers, please pass on my message of gratitude.  You have my thanks.