I’ve decided to teach the Programming Methodology course to first year Computer Science & Engineering students as from next academic year. I love programming. And I want to share my enthusiasm to the young people who join the CSE department. For me, programming is art and, fortunately, I am not alone to think that.
This is the course outline from the official CSE programme:
Pseudocode; Structured Programming Techniques; Program Structure; Simple Data Type; Control Structures; Modularity; Structured Data Types; Introduction to Object Oriented Programming; Programming Style and Testing, Abstract Data Types, Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Operations on Trees and Graphs.
(Astute readers will have noticed that ; (semicolons) are used initially and , (commas) afterwards – this is an indication that this one year-long course is the concatenation of two previous semester-long courses – Programming Methodology and Data Structures)
Lately, I have been discussing with some colleagues about the reasons why many of our current students have lots of difficulties to tackle this course. One reason might be that many of them have chosen CS for the bad reasons (I don’t want to get into that…) and they don’t have the necessary skills to be good programmers no matter what we do. Another reason might be the way the course is taught by focussing a lot on programming language constructs instead of solving problems. Another possibility might be the actual programming language used (i.e. C++) etc. etc.
I’ve realized that one good way to teach programming is to use the same techniques used in the best universities in the world. Naturally (and this has been pointed out to me by one colleague), there is a risk that what is good for exceptional students (like what you have in top universities) might be catastrophic for our Mauritian students but, personally, I don’t buy this. The first reason is that we are trying to teach art and, as far as I know, to learn art, one needs to have taste (aka aptitudes aka interest aka resonance etc.) That’s it. No need for 3 A’s at A-Level. The second reason is that we are a university and not a university– and therefore we should not lower our standards to accommodate more students. I’ll be direct. If the student cannot follow a university-level course, then he/she has no place in a university. Once I asked a professor from a South-African university about how to handle students who don’t like to read and she told me:
Throw them out!
Ok. This is drastic. But this is how universities become top universities. And this is how they help create the Silicon Valley.
Anyway, I looked at what is taught in top universities and I found out the following:
- Harvard’s Introduction to Computer Science I – The course has three goals (i) to teach problem solving through the development of algorithms (ii) to teach computer programming as a means to express algorithms (iii) and to convey a broad picture of the different aspects of computer science in the real world. The programming languages used are C and Ruby. According to me, C is a beautiful language to understand what a computer is and Ruby is perfect to write algorithms solving complex problems as the language is so expressive.
- Cambridge’s Foundations of Computer Science – At the end of the course, the student should (i) be able to write simple programs (ii) understand the importance of abstraction in computing (iii) be able to estimate the efficiency of simple algorithms (iv) and know how to use currying, higher-order functions and lazy evaluation. The programming used is the functional language ML.
- Stanford’s Programming Methodology – The course covers fundamental programming concepts and software engineering techniques. It uses Karel the Robot which is a simulator to learn programming in Java.
- And finally MIT’s Structure and Interpretation of Computer Programs and Berkeley’s version – The course is an introduction to computer science, with particular emphasis on software and on machines from a programmerÃ¢â‚¬â„¢s point of view. It concentrates mostly on the idea of abstraction, allowing the programmer to think in terms appropriate to the problem rather than in low-level operations dictated by the computer hardware. The programming language used is the functional language Scheme and the textbook is obviously the world-renowned SICP.
This is what I understand:
- Focus is on solving problems (and not in low-level operations dictated by the computer hardware)
- Very high-level languages (or environments) are used: Ruby, ML, Karel the Robot and Scheme. Interestingly, Harvard uses Ruby and C I guess to give the student a grasp of both worlds.
- Three of the top five universities of the world use functional programming languages to introduce programming. I may be on the right track after all in my quest to learn Haskell. Incidentally, the first programming language I used at university when I was a student was Scheme.
- Python is not used by the top 5 (Pascal Grosset won’t like that). Must be because it’s not different enough from C (apart from the syntax) i.e. it is not very high-level.
- Those top university are not afraid to use non-mainstream languages and environments. This is an indication of being intelligent by the way: the people there think different!
Let’s see. First of all, I’ll propose that the course be very progressive but ultimately tough. I’ll try to propose to my colleagues that we completely rework the lectures and lab sessions to focus on problem solving. I’ll also propose that we use a very high-level language. Scheme is great (especially DrScheme) but it might be a little too much for my colleagues. Haskell (and especially Hugs) might also be a little too much. Ruby is the next best choice. But I better find a good interactive and multiplatform and free environment first. Any idea?
(Artwork by Piet Mondrian)