skip to main content

Teaching Software Engineering Is Still Done Wrong

published icon  |  category icon education

tags icon software engineering academia conferences

When it comes to teaching software engineering, I’ve been thinking “We’re doing it wrong” for a while now, and the recent ACM Tech talk “Lessons From the Fifty-Year Quest to Turn Programmers into Software Engineers” only confirmed my suspicion. Adam Barr, a seasoned software consultant that was involved in major Microsoft products for years, gave a surprisingly sobering talk by serving us quotes from fifty years ago. How about this one from E. Dijkstra in 1972 (emphasis by Barr):

It would be very nice if I could illustrate the various techniques with small demonstration programs and could conclude with “… and when faced with a program a thousand times as large, you compose it in the same way”. This common educational device, however, would be self-defeating as one of my central themes will be that any two things that differ in some respect by a factor of already a hundred or more, are utterly incomparable.

Guess how we still teach software engineering—and computing in general? Right, small demonstration programs! Here’s a function:

int add(int one, int two) {
	return one + two
}

Write a unit test for it! Here’s one as an example:

TEST(AddTest, ShouldAddOneAndTo) {
    EXPECT_EQ(add(1, 2), 5);
}

There, you now know how to unit-test stuff. What’s next? Right, design patterns. Here’s a factory—etc, etc. Of course, you have to start somewhere, and syntax and ecosystems are usually the first trip wires students struggle to overcome, so throwing them in the deep end by presenting a huge project with thousands of unit tests or all too pragmatically implemented design patterns will be of little help here.

So we start out small. The problem is, we usually also end small and never neatly string everything together across courses. No way, that would mean collaborating with another teacher, woah there. Academia can be a sad state of affairs sometimes, and although this is not always the case, it’s much more common than you think. It’s somehow surprisingly hard to present a uniform picture to the students from the teaching staff as one team instead of a collection of individuals with their own style and preference for tooling, that causes further confusion.

Within my own courses, I try to relate the small examples to the work field by digging into source code from bigger repositories available at GitHub. It’s both educational and a lot of fun to dabble in the Quake 3 or BoardGameGeek app source code, looking for examples of dependency injection and smart usage of factory classes (or, in the case of Quake’s C code, structs). What is strange, however, is that this problem is far from new, if we are to believe Adam Barr. Here’s another lovely quote, from Harlan Mills in 1980:

If precision and scope are not gained in university education, it is very difficult to acquire them later, no matter how well motivated or adept a person might be at individual, intuitive approaches to problem solving.

It’s a quote I completely disagree with. I learned almost all the ropes after university education: both precision and scope. But still, it proves that in the eighties they didn’t quite yet solve the quest to turn programmers into software engineers.

Barr explains that academia overly focuses on what he calls “individual problem solving”: small subsets of algorithmic problems, that have little to nothing to do with real-life software engineering problems. Another classic example would be teaching and proving complexities of various sorting algorithms. Sure, they have their use, but mastering those problems by hacking away individually has little to do with team-based software engineering.

I used to think that the difference between the titles “programmer” and “software engineer” is just a matter of vanity, but in Barr’s context, a programmer will struggle to pick up the role of a software engineer, and in university, we’re teaching students to become programmers, while we actually need software engineers. Stop focusing on performance and algorithms. Focus on readability and code. The same is true for research, according to Barr: where is all the empiric software engineering research1 that focuses on how writing code in practice works? Instead, we’re publishing heaps and heaps of… individual program analysis results?

Isn’t it telling that in the seventies, both academics and industry experts like Dijkstra and Mills warned us that this ain’t the way to teach computing? Fifty years later, the situation apparently hasn’t changed much. This isn’t just according to Barr, or according to my personal experience with teaching, but also according to the research I’ve encountered and conducted myself by analyzing learning outcomes of computing-related course material across European universities.

There is no single explanation for this, but I feel that we aren’t really trying hard enough to solve it. Instead, we’re just minding our own business and securing our position by upping the P score through publishing stuff (anything goes!). I’ve been known to criticize how academia works before, and although I have little influence and am often wrong, I have the feeling the critical mass is way too small to radically innovate in that world.

Adam Barr warns academics that code bootcamps might take over—and perhaps rightly so. A few other observations that might contribute to the issue:

  • In academia, programs and code is mostly throwaway garbage—write-once objects to grab results and publish. This emphasizes the wrong aspects (Barr’s algorithms VS clean code).
  • There are too little entry points to conduct empirical software engineering research using “real people” instead of students as the test subjects.
  • The structure in academia is much too rigid. Its culture facilitates slow reactions, individualism, and focus on research instead of education, with little incentive to change.
  • There is surprisingly little real-world experience within academia. Many professors never really faced Dijkstra’s “a program a thousand times as large”, so how are they supposed to teach how to handle that?

Barr ended his talk with a few recommendations: let students taste real-world code by exploring open source projects, give them bigger open assignments, etc. These conclusions can be read in pretty much every single paper on computing education, and as good as this practical advice is, I wonder why it’s almost never taken to heart. Even if it is, will it be enough? I wonder whether other universities might be more progressive than the ones I have experience with.

All things considered, in my opinion, the future is looking bleak. I’m still convinced students only really start learning as soon as they graduate and start working (and by “work”, I mean in industry, not staying around and doing a PhD!). Hopefully they end up in a company that cares about life-long learning, assigns them an amicable coach, and employs pair programming to quickly bring their knowledge above the minimum level. The more I think about this, the less I think academia—at least in its current state—will be able to rectify this.

And without a critical mass, there’s little I can do besides getting even more frustrated.


  1. I’m not saying there isn’t anything like that: there’s among others the ICSE (International Conference on Software Engineering), where I also published. However, consider this: at our university, KU Leuven, one of the oldest and internationally well-respected Belgian universities with a huge computer science department, there isn’t a single research group with primary focus on software engineering. Some, like DISTRINET, say they research “software engineering”, but judging from their publications, it’s not the SE Adam Barr and I are talking about. Compare this to University of Stuttgart’s Empirical Software Engineering group, where exciting and genuinely interesting things on the subject are being put out. That proves it’s not impossible to get funded. ↩︎

I'm Wouter Groeneveld, a level 36 Brain Baker, and I love the smell of freshly baked thoughts (and bread) in the morning. I sometimes convince others to bake their brain (and bread) too.

If you found this article amusing and/or helpful, you can buy me a coffee - although I'm more of a tea fan myself. I also like to hear your feedback via Mastodon or e-mail. Thanks!

Academic Lineage

 |  What if you could apply the concept of genealogy …