Course Title: How to Code – Systematic Program Design
Provider: University of British Colombia via edX
Effort: 5 hours per week, 5 weeks per course, 3 courses – about 75 hours
Completion awards: Verified Certificate for each of the three courses (USD$49 or $50, depending on which link you click on), automatically awarded XSeries Certificate if all three Verified Certificates are awarded
About the course:
Go. Sign up now. I don’t care if you hate computers or have been programming professionally for years. This is an amazing series and getting through the course is highly rewarding.
There’s a lot to say about this series. For one thing, the level of effort required is very real. It took me three or four weeks to get through all three courses, and I was staying up late for hours on end. And I’m considering working through it all again so that I retain it longer.
Beyond that, let’s start with the concept. The SPD course introduces the idea of designing a computer programme as an abstraction layer between the solution and the coding. It’s a tool for producing a template for a solution which is orthogonal to the language being used. And it’s genius.
SPD takes this method from the How To Design Programs book, by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. It focuses on data-driven programme design, which was a new concept for me. You define data, which informs what can be done with it, which influences function design, and so on. By the end of the course, there were still experienced code-jockeys decrying the lack of well-named variables, without realising that when you’ve clearly defined your data and what it can and can not represent, it’s irrelevant. You can’t possibly be confused what “variable c” means when you’ve stated that the only valid data type for variable c is degrees Celsius. If you’re an old hand at programming and haven’t used data-driven programme design before, it’s worth a look to evaluate why you do things the way you do them.
It uses its own beginner language that isn’t outrageously useful outside educational context. It is Turing complete, but it’s a bit of a pain to use in real situations. Its environment is also quite slow. The reasons for not using a commercially viable language are discussed early on, and I wholeheartedly embrace those reasons.
By the end of the first course, you’re already designing your own programmes using the data-driven model. It was around this point that I realised the beauty of defining the data and describing functions based on it. If data X has properties Y and Z, then I can write functions for X that read and/or modify Y and Z, either by itself, or in relation to other data. It dove-tails beautifully with object-oriented programming, but the course doesn’t cover application of its high-level theories to low-level techniques with other languages. (However, the ProgramByDesign project is also working on How to Design Classes which features at least a subset of Java.)
Professor Gregor Kiczales is one of the best technical instructors I’ve ever seen, and I used to do that professionally. His focus is on getting the programme design right, so that the code can flow naturally from that design.
It is an amazing foundation for how to approach programming design. Playing with Scratch, I didn’t imagine I could possibly apply the HtDP principles to such a strange and specific programming environment. However, I ran into a few bumps so I broke out data definitions and templating, and solved the problems in minutes. (Note: Never underestimate the power of testing well-chosen and well-defined examples.)
Anyway. Just sign up. Sure, it’s 50 to 80 hours out of your life, but it re-introduces you to the digital world in a way which will undoubtedly increase your comfort with it.