educating software developers

Reading  Bjarne Stroustrup on Educating Software Developers really got me thinking – about questions I see from students at JavaRanch/reading, how my own education fits in and what I would like to see from new college graduates.

Yet while Stroustrup agrees that Java has been used to dumb down CS programs, ultimately, “the problem is one of attitude, more than an issue of programming language.

As the quote shows, he doesn’t just talk about a simplistic view of things.  It was one of the most thought out articles I’ve read in quite some time.

My view from JavaRanch and reading

Few students see code as anything but a disposable entity needed to complete the next project and get good grades. Much of the emphasis in teaching encourages that view.

This is definitely a problem.  One of the manifestations of it is students who try to get help on one specific programming assignment (or worse – purchase a solution.)  No thought is given to how not thinking about the assignment is going to hurt the student of future assignments or classes.  It’s like math – you can’t get away with not learning how to do algebra if you expect to do calculus.  Similarly, you can’t expect to write a complex program if you can’t write a simple one.

Better are the students who do the assignment of course.  But it’s still a disposable entity in most courses.  There are a few that build it up over the course of the semester such as the LISP course that I took.  In my mind, these are the best kind because they force students to look at code they wrote weeks/months ago.  Reading code instills an awareness of the impacts of style down the road.

Essentially all had their code littered with “magic constants.” They had never been taught that was bad style – in fact they had never been taught about programming style because the department “taught computer science; not programming.” That is, programming was seen as a lowly skill that students either did not need or could easily pick up on their own.

Showing examples of “good” and “bad” code is still rare in teaching programming.  This is true in both academia and in books.  When I read the Dietel Intro to Java book, some of the examples were quite long.  (The Swing methods spanned pages.)  I saw many instances of things that could have been extracted into methods.   Now this is a book that does teach programming so the “computer science” thing isn’t an excuse.  I’ve seen this in other books as well.  If the first lengthy code students see uses the “throw tons of code into one method” approach, how are they expected to know better?

Similarly, many books that teach JSP have examples with JDBC code in the JSP.  This is something that is considered horrible practice by industry and not a stylistic thing.  When people post questions on JavaRanch mixing JSP and JDBC someone will typically point out that is bad practice.  The poster usually comes back saying he or she read it in a book or that’s what the teacher said to do.  Again, how is a beginner supposed to know not to do things like this when all signs indicate this is how things work.

My education

As an undergrad, I was in a Computer Science program.  This covered the range of topics you would expect – theory, practice, programming (in a few languages, data structures, etc), database, networking, etc.

We did have a software engineering course where we built a larger system as a class.  While it covered the phases (design, etc), I don’t remember much emphasis on clean code or testing.  To be fair, I took this class the first semester it was offered.  It likely got better after that.  The current course description reads “Principles of software engineering including the software life cycle, reliability, maintenance, requirements and specifications, design, implementation, and testing.”  So I have hope that it teaches more of the important skills now.

As a graduate student, I studied “Computer Information Technology” which was a mix of more practical topics – general industry themes, management, communication, programming (one language) and design.

What really jumped out at me in the programming class was that we were asked to peer review each other’s code.  This is a good thing – code review is an important skill.  Then I saw the checklist.  One of the things we were supposed to check was “whether the code compiles.”  I attended grad school while working full time as a Java developer.  I had enough experience to know that code that doesn’t compile isn’t useful.  It’s better to have compilable/runnable code that doesn’t do as much.  I flat out refused to review code that didn’t compile.  My “review” of such code was one line long – “doesn’t compile – doesn’t work.”  The problem here is that academia is willing to accept and grade code that doesn’t compile in some instances.  Would that fly at your job?  It wouldn’t at mine.  Nobody can claim something is “done” if it doesn’t compile.

What I’d like to see

Education should prepare people to face new challenges; that’s what makes education different from training. In computing, that means knowing your basic algorithms, data structures, system issues, etc., and the languages needed to apply that knowledge. It also means having the high-level skills to analyze a system and to experiment with alternative solutions to problems

I absolutely agree with this.  However, I don’t think think education should conflict with training.  I’m all for training entry level hires and interns.  However, I don’t think it should be necessary to re-train them to unlearn bad habits taught by a college.

So, brush up on your communication skills.

Another thing that it would be nice for schools to acknowledge.  My business minor taught communication and writing.  My computer science major barely recognized they exist.

Learn your first language well. That means trying it for difficult tasks. Don’t obsess about technical details. Focus on techniques and principles.

Learn another programming language; choose any language that’s quite different from what you are best acquainted with. You can’t be a professional in the IT world knowing only one language. No one language is the best for everyone and for everything.

Don’t just do programming. Computing is always computing something. Become acquainted with something that requires your software development skills: Mediaeval history, car engine design, rocket science, medical blood analysis, image processing, computational geometry, biological modeling, whatever seems interesting. Yes, all of these examples are real, from my personal experience.

All good advice.  Learning multiple languages certainly makes you stronger.  And learning a business domain makes you able to relate programming to the real world.

3 thoughts on “educating software developers

  1. Having “whether the code compiles” on a checklist – agreed, that’s a big problem. In general, why would you want to put things on a checklist that can be automated? This extends beyond compiling to more stylistic type things that can be caught with static analysis tools. FWIW, more tips on building code review checklists are available on our web site: http://articles.smartbearsoftware.com/Checklists

  2. I had read Joel’s post on the topic. I think the problem is even worse than that. It’s not just that students are only learning one language (in some cases) – it’s that the aren’t even learning it well.

Leave a Reply

Your email address will not be published. Required fields are marked *