I’ve had a number of interesting conversations in the last week or so with people about the value of bringing industry experience into teaching important computer science concepts. Some of the people I have talked to have been people who have moved from industry jobs into teaching. Others have been students of such people. One of the common threads of the discussion has been that “real life examples” have helped bring home the importance of various concepts. It is one thing to talk about the theory of concepts and how they work in practice. A couple of stories from my own experience come to mind.
One of my students called me up from his summer internship a few years ago. He said that the programmers he was working with were doing things I had taught him not to do. Specifically some of the programmers were allocating memory but not always de-allocating it. (This was in C++ BTW) I asked him how it was working out. He replied that when he ran his tests in a single iteration everything was fine. When he ran it in 5-10 iterations things got pretty slow. By the time he ran the tests in 25 iterations the application just flat out died. This was a story I got quite a bit of mileage from over the following couple of years.
Another example was a project I worked on where we hard-coded in a specific value. Yes we all knew better but we did it anyway. We believed people when they told us this value would never change. When it did change it took the seven of us about a month to find, change and test the change everywhere. This time we were a little smarter and used a constant variable in case the number changed again. Which of course it did. The next time the change took us little longer than editing a single value and rebuilding the software. Plus some testing time of course. Explaining to students just how much that seven man-months cost the company made a real impression on my students.
Not everyone has the chance to make or learn about important exemplary mistakes in industry. Small artificial applications demonstrate concepts but tend not to be as convincing to students. Students are often skeptical of their instructors – it’s part of being young. For this reason it is a great idea to look for opportunities to invite professionals into the classroom to tell of their experiences.
I used to work with a salesman who wanted his technical support to be a “swears by it.” What he wanted was someone technical to swear by the statements he made to customers. Sometimes a software or other professional can be a “swears by it” in the most positive sense in the classroom. Lots of professionals look forward to the opportunity to give something back by making an appearance in a classroom. If you as a teacher don’t know of any you may want to seek out the local chapter of ACM or the Computer Society of the IEEE. Those organizations generally know people who are more than happy to help.
When students hear professionals confirm the truth of what you are teaching them it becomes more than theory to them. Plus it can give you more credibility beyond just what the professionals say. Give it a try.