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.

Down Time: Register.com Down?

As many of our readers may have noticed we went down for over an hour on Saturday, but in all my years of hosting this is the first time I’ve seen such a large outage caused by the domain registrar failing. Apparently, a number of Register.com’s partner name servers went down (although Register.com itself stayed up). This affected not only my accounts and web servers, but the partner’s main websites themselves. In other words, I couldn’t even visit the affected registrar’s website for support information or to open a ticket. Luckily, I found the company’s phone number buried in Google’s cache. Upon waiting 25 minutes on the phone, I finally spoke to an operator who informed me they were ‘aware of the problem’ and gave me to a few alternative links to use to access my account information, none of which worked.

I’m not sure what happened today but I can only imagine the number of websites that must have been affected if an entire group of registrar’s were offline.

Cablevision Hijacks DNS Error Pages

I just noticed Cablevision’s Optimum Online service has begun hijacking DNS Error pages with, you guessed it, ad-sponsored results:

And apparently I’m not the only one that noticed: Justin Flood and Dan. As Justin Flood reported Cablevision has secretly adjusted their TOS to reflect this morally questionable service:

The preceding search results page is displayed to you as a result of the specific Domain Name Service (DNS) servers used by Optimum Online to look up domain names. If you misspell or mistype a web address, dead-end “no such name” errors can occur. However, the DNS servers used by Optimum Online are designed to eliminate dead-end “no such name” error pages you can encounter as you surf the web. By displaying the preceding search results page, users know that the web site they’ve attempted to navigate to does not exist, and are presented with suggested sites they may have been seeking. No software is installed on your computer for this search service to work.

Don’t they realize the dangers of replacing DNS errors with content pages? Aside from hurting the underlying stability of the Internet, there have been instances where hackers have used such tools against customers. I know Road Runner customers have had to deal with this for a couple months now, although at least they have an outlet to turn it off. I did find this broken disable button on the “About This Page” link:

Upon clicking it, you see a message “You have successfully opted out of the DNS Assistance service” although it appears to be broken as the service is still in effect. Defective by design perhaps? Rolling out morally ambiguous feature with a broken disable link? Sounds like the same people that send spam messages to me.

Update: From user comments it seems clear most (soon to be all?) ISPs are doing the same. I’m just surprised after the fiasco with VeriSign, this issue has been ignored so often in the IT community. I guess better to better to have a choice which ISP hijacks your URLs?

Another Update: Maybe I’m the only one who’s having trouble opting out. Or perhaps I need to restart my router. Either way its definitely not working on multiple browsers and computers.