Fog Creek Software
Discussion Board

Attending top university and writing good code

I went to Cambridge University and so have no gripe against people that went to the same university or any other one for that matter.

In my current place of work, they almost exclusively hire from top universities. I inherited a software development project written by two staff members that decided to leave the company shortly before I joined.

I've worked in the industry over 7 years and I've never seen such a mess of computer code in my life. I looked like they wrote some code that didn't work (not just buggy code, but unusably bad code) and continued to write more functionality without even the basic stuff working. The code passed on to me has huge clunks commented out or disabled and even if they were uncommented and bug-fixed they wouldn't work because of the total failure to think before writing code. They overrelied on the Visual Basic Variant type and at run-time tried to assign Variants to the wrong type. As such even trying to input data via a form fails with runtime type errors. They even assigned integer only values to doubles.

The overall aims are flaky as well. They combined rewriting core Microsoft functionality (even though they use Microsoft software) with a simple, common-all-garden business database application. In the end they got neither done.

I did speak to one of the two developers before he left the company. He was either putting in on, but he seemed unaware of the huge mess around him. I only got a little clue that he knew what was going on when he refused even to show me the application running when I asked for a demo.

The code I inherited was so bad, it can't even manage to put a number in the database properly from a user-interface form.

I've been working on this project for a few months. I've decided on implementing a major piece of missing functionality as a discrete piece of code relying on hardly any of their code. Now I've got that done and have a very limited demo that only stands up to a cursory view, I've extracted the code I've written and am rewriting the rest from scratch. They didn't manage to do that much and so rewriting their mess from scratch should take less than a month.

My reason for writing this message is to express surprise that people from a top university could produce such a mess. OK they didn't do computer science when they were at university, but I'm so surprised that they could be so clueless as not even bother to test the junk they spewed out while developing it. The man I spoke to seemed so unaware that very little worked.

Tuesday, January 20, 2004

Whether they attended university is orthogonal to whether they're good developers or not.

Managed To Sneak 'Orthogonal' Into A Post At Last!
Tuesday, January 20, 2004

"My reason for writing this message is to express surprise that people from a top university could produce such a mess. OK they didn't do computer science when they were at university"

Well maybe there's your answer... oh no, wait, I didn't do computer science at uni either, and I don't code like that.

OTOH I was very well mentored from the get-go. Is it possible that they were just chucked into their jobs with no experience and expected to be able to do it with no supervision?

Fernanda Stickpot
Tuesday, January 20, 2004

Welcome to the real world.

IMHO there is very little correlation between what uni someone went to and how good they are at coding.

Indeed, some UK institutions don't hire CS grads as they don't want to have to deal with the bad habits that they picked up at uni from their lecturers.

Recruiting from top universities is fine if the recruits studied a vocational degree and got a good pass. I remain unconvinced that a CS degree is much use (on its own) in IT. Proven experience in similar fields/projects is worth more that a CS First from any uni.

This is *not* meant to be a troll, I'm just voicing my opinion, based upon twenty years in IT and recruiting, and subsequently working with, dozens of IT staff (both contractors and permies).

Steve Jones (UK)
Tuesday, January 20, 2004

Well, from what you said it sounds as if the 2 people who wrote the code were absolute newbies writing commercial software for the first time.

I have personally mentored new people (fresh out of university) and my experience says that new people need to be taught a lot of things. And yes, basic testing of their own code is one of them. Second is regular code review of any code that they write, at least for the first couple of months. Most of the programs/projects done during univ are small scale when compared to commercial apps. Putting someone straight out of univ on a new project and letting them loose is ... well ... words fail me!!

From your mail it sounds as if these 2 people simply did not get good mentoring/counselling/management from their group leader/team leader/project architect. However, there is hope. A couple of bad experiences, some good introspection and/or a good team lead should get them on the way to producing good code.

And if everything else fails, I'm sure they'll move into management (Dilbert lives!!)

Tuesday, January 20, 2004

Orthogonal, hmm good word.

And indeed, I concur, attending uni is orthogonal to being good developers, not just a weak correlation.

Probably applies to other jobs too, but for developers you just can't beat experience.

Steve Jones (UK)
Tuesday, January 20, 2004

The University and/or the course are irrelevant.

Programming is more like musicianship where everybody has a basic skill (some higher, some lower) and then they need practise.  Lots of practise.

In fact, let's call it 10 years.

David B. Wildgoose
Tuesday, January 20, 2004

It also sounds like there was no "senior software developer" type to review the code.  Those two guys reported to a manager who doesn't know VB.


Matt H.
Tuesday, January 20, 2004

I doubt that the relationship between going to a good University and being a good programmer is orthogonal.  I'd bet that there is a negative correlation.  From my experience, the academy looks down their collective nose at software that is well-crafted.  They view people who hone the craft in much the same way they'd view plumbers.

Tuesday, January 20, 2004

Savage, maybe you could put into place a regular code review session and always make a style guide (or maybe you need something bigger than a style guide, from reading your problem) available on network drive?

Li-fan Chen
Tuesday, January 20, 2004

It's not even that these people have been to a top university. Basically the companies recruit people on how well they did at their A-levels (end-of-school exams, for non-UK residents). That decides which university you go to  and most graduate jobs explicitly ask for your results at A-level to be of a certain level as well.

In other words, companies are hiring people because of what they did in about 3 or 4 weeks when they were 18. Nothing more, nothing less, everything is set in stone after that. It's the new class system in Britain really. (Not to mention that A-level results are inflated. The average has gone up each year 20 years in a row, Who believes that?)

No wonder you hire crap people if you have such a twisted recruitment system.

And  of course, just like the original poster, all these people think that they are the bee's knees, just because they have been to "top" university, and are not really prone to self criticism or anything.

Tuesday, January 20, 2004

From my experience, they've just too much material to slurp with huge OS API and langage library to just spend the right time in software development and design.

This results in computer science illiteracy, even among the teachers themselves: spaghetti code, lack of factoring,  and so on.

Tuesday, January 20, 2004

Why don't you post some of the code. Just curious :-)

Tuesday, January 20, 2004

>> "Why don't you post some of the code. Just curious :-)"

This part really annoys me:

int i = 0;

Tuesday, January 20, 2004

Public v, v1, v2, x, y, z, xx, xyz, xzx, xy, yx, yz as Variant

private sub JustDoItMan(Object as Integer)
  v = v1 * x - xx + xyz - yz + yz / xyz + NOP"OneTableDB", cn)
  do while not rs.eof
    rs!AField = rs!BField * Val(v) + (v1 and v2) > 0
    exit do

  exit module


  'have to implement code here yet for stuff

end function

Tuesday, January 20, 2004

I've never understood the naive belief that anyone who goes to a good university is somehow going to be good at what they do.  Garbage in, garbage out.  It's that simple.

Tuesday, January 20, 2004

From the other side of the pond I'd have to say that 3 of the worst developers I've ever worked with were graduates of MIT's CS program.  I'm sure there are MIT grads who are very good, and I'm not trying to single out that school; just adding some more circumstantial evidence as to the lack of a solid correlation between "well-respected school" and "good developer".

Mister Fancypants
Tuesday, January 20, 2004

Re: MIT.

I interviewed one guy a couple of years ago who claimed to have worked for Microsoft, while at the same time studying for two PhD's at MIT, all completed within seven months.

When we quizzed him on it, he held firm and stated that it was all true.

Sadly, when we asked him even the most rudimentary of technical questions he had no answers, not even a guess.

I know some people inflate their experience slightly, to make their CV look better, but this was by far the most outrageous example I've even some across.

Steve Jones (UK)
Tuesday, January 20, 2004

Well, they did use routines, and I didn't see any numbered lines. What are you complaining about? :-)

Tuesday, January 20, 2004

Mister Fancypants: MIT was the source of X-windows. No need to say more.

Tuesday, January 20, 2004


Why initializing a variable at declaration time annoys you?
I don’t think there is any rule in the C/C++ standard that says that a variable would be initialized to default value (unless its type is a class, in which case the default constructor gets called).
BTW, un-initialized variables are one of the major sources of optimized builds vs. un-optimized/debug builds problems (since usually the optimized builds do not give any value to those variables)…

Tuesday, January 20, 2004


I'm just in the middle of rewriting a large piece of code from scratch. It was initially written by a person who finished masters of CS with honors in the best Israeli Uni, and now studies for his Phd in Stanford.

It's in C - a mess of kludge, huge-functions-with-static-hash-coefficients-changing-from-call-to-call-in-an-unpredictable-way-full-of-bugs-and-patches.

Eli Bendersky
Tuesday, January 20, 2004

I was a TA at MIT for two semesters, and from what I gathered about the curriculum, you can get a BS degree in EECS without writing any code after the first scheme intro course.

Tuesday, January 20, 2004

Hmgh. The dot product of going to university and writing good code is a positive number. Less than 1.0, but positive.

Dennis Atkins
Tuesday, January 20, 2004

Normalized vectors used for comparison, of course.

Dennis Atkins
Tuesday, January 20, 2004

Thinking about it now,  I'm not sure I've ever read deep enough into a resume to know where the candidate went to school.

Tuesday, January 20, 2004

Going to a good university doesn't mean you write good code, because that isn't what good universities focus on.  They're called research institutions for a reason.  And unless you hire someone who is doing research into Software Engineering there, don't expect to get a top-notch coder.

To add anecdotes (I might have told this one before), I know a grad-level person (Masters, maybe PhD) whose a straight-A student.  But when he was given a set of code to implement some algorithms for him ( a nice, well-defined API ) instead of calling the functions directly where needed, he copied the relevant sections of each function into each of the *more than 6 places* in his code that he needed them.  Scary.

Hang out in a CS computer lab for a while and you'll see tons of examples of this.  graphics programs that are over a thousand lines all implemented in main(), etc etc.

In fact, as part of my Masters in CS, I'm thinking of creating a 'programming effectively' class, based around The Pragmatic Programmer book, and a few other gems.  Students would get graded on the quality of their code, the amount of unit tests, etc.

Andrew Hurst
Tuesday, January 20, 2004

Top schools (research institutions) deliberately don't teach applied computer science, they teach theory. Engineering practices and applications can be learned over time on the job, or from books, whereas theory you can't really pick up yourself.

MIT Geek
Tuesday, January 20, 2004


I thoght that your statment hods true for every CS school (I studied CS in Europe and as far as I could tell that was the case for any CS school over there).

Tuesday, January 20, 2004

I had to drop out of MIT in order to learn anything other than how juggle courses in order to keep a high GPA.

MIT dropout
Tuesday, January 20, 2004

I'm amazed you could go 7 years in this industry before seeing such god awful code.  I've been fixing code like that from day 1.

Consider yourself extremely lucky.

must be a record
Tuesday, January 20, 2004


Europe is probably more enlightened... some of our state school CS programs here have courses like "Intro to Database Programming" or even just a language like Java as an entire class and part of the core curriculum.

And in a lot of those schools you can get a CS degree without math more advanced than "Intro to Calculus," which doesn't give you much of a platform to build from when you try to cover theory.

MIT Geek
Tuesday, January 20, 2004

>> "Anon, Why initializing a variable at declaration time annoys you?"

Actually, DP, it was just a lame attempt at humor.  I picked the most innocuous, least offensive line of code imaginable, and pretended that it was annoying.  Apologies for my sense of humor - or lack thereof.

But, funny that you should bring it up.  I much prefer languages that demand declarations and initializations. 

Tuesday, January 20, 2004

int i=0 has several problems with it. For one, it's not portable.  Are we talking about 16 bit integers, 32 or 64? No telling. Big Endian? Little Endian?  Who can say. Second, it is not explicitly signed or unsigned. Implicitly it is signed, but how do we know that was not inadvertant as is often the case. Third, what is meant by the magic number '0'? We don't know because there is no context. Fourth, the use of single-letter variables such as 'i' is strictly amateurish.

Dennis Atkins
Wednesday, January 21, 2004

Critically relevant link:

Kib O'Reilley
Wednesday, January 21, 2004

I think the correlation between going to a "top university" and being able to write good code is positive. But ...

1. Some people get to a "top university" and find that the work is too difficult, and flounder for three years before escaping with a dubious degree. They might be people who weren't quite up to it, or people who are just as clever as the ones who did well but whose style of learning doesn't fit the university's style of teaching, or ... well, lots of other possibilities. Anyway, those people will end up not having learned anything. Learning nothing at Cambridge (*either* Cambridge!) is no better than learning nothing at [fill in your favourite not-very-good university here].

2. Let's assume for the sake of argument that going to a "top university" means you're exceptionally clever. That may (especially if you're also exceptionally arrogant, which some top-university graduates are) just mean that you write exceptionally obscure code -- after all, if *you* don't have any trouble understanding it, what's the problem? *sigh*

3. In any case, it's only a correlation. It's hardly a surprise if it breaks down sometimes.

For what it's worth, the people I know from "top universities" whose code I've read have generally been very good, but I've certainly seen problem #2 above more than once.

Full disclosure: I'm a graduate of a "top university" myself :-).

Gareth McCaughan
Wednesday, January 21, 2004

Dennis Atkins states:
>>"the use of single-letter variables such as 'i' is strictly amateurish."

Actually, what is amateurish is when goofballs have loop variables like 'iCountOfRows'.

Wednesday, January 21, 2004

I hope you realize my above post was satire.

Dennis Atkins
Wednesday, January 21, 2004

I think I could have easily labelled my original post as "How could anybody write such bad code regardless of what university they went to".

I test code as I develop it. The jokers I took over the project from piled on more and more code that could never possibly work. I guess they both left because they could not stomach being around when the client found out. It is a pity management didn't look farther than a user interface. User interfaces are created just by dragging controls onto a form. The code beneath has to work and it their case they wrote joke quality code. It was more than using Variants all the time and bugs crashing the program even in normal usage. The whole thing was self inconsistent and would never fit together. The only functionality they wrote was commented beneath the user interface was commented out.

They never peeked out to look at what their code would have to interface with. As such even if they finished their code and if it had the multiple bugs removed, it wouldn't work.

Wednesday, January 21, 2004

I have always felt graduates in Computer Engineering (esp. digital electronics) tend to make far better programmers than their CS counterparts . Anyone who has a fundamental understanding on how microprocessors work, how to design them and program them, can intuitively appreciate the higher-level abstractions of OS and language/compiler design (memory management, addressing, multi-threading, blah blah....) This will always result in better development practice, because the programmer will have an insight into how exactly his/her high-level code will perform on any given platform.

IMHO, schools should introduce students to CS with a course in Assembly language. Real-world programming is then reduced to a bunch of semantics which any good reference book can help fill the knowledge gap.

Thursday, January 22, 2004

>> "I have always felt graduates in Computer Engineering (esp. digital electronics) tend to make far better programmers than their CS counterparts.  Anyone who has a fundamental understanding on how microprocessors work, how to design them and program them, can intuitively appreciate the higher-level abstractions... "  888

Couldn't be further from the truth.  It's important to know the nuts & bolts - agreed.  But in my experience, it's precisely the people who are weaned on the low-level stuff that are absolutely unequipped to handle abstraction of thought.  Ever catch an engineer in a math class?  Absolutely incapable of grasping abstract notions like realms of infinity.  "Heh, heh.  The real world ain't really got no infinity.  If I can't see, it ain't really real."

And I have to bite my tongue every time I hear an engineer say he's taken higher math.  Note to engineers:  A sophomore differential equations or linear algebra course isn't higher math!!!

Thursday, January 22, 2004

About engineers -- our local engineers are the ones who write "feature complete" code, where feature complete means "I think I wrote all the appropriate functions, and they compiled, good luck.  Well, at least it sounded good.  Sucker."

Then again our local business major tends to say, "Well, testing hasn't reported any bugs yet."  Which means... "I intimidated the testers into shutting up and not doing their jobs long ago.  Not my fault, testing's still their job not mine.  But at least it sounded good.  Sucker."

And my habit of saying, "No, not done yet, not gonna be done Friday either," just means that my (rather nonconfrontational) manager no longer asks me.

But, the other local CS major also throws up major changes that haven't been proven to work once.  Looks like you can be irresponsible no matter your degree program, so long as you're in an environment that encourages / tolerates it.

Thursday, January 22, 2004

Engineer vs. CS major doesn't really have a lot to do with a person's ability to write good code.  And stroking your ego by whining about the usage of the nebulous phrase 'higher math' adds nothing to the argument.

I have a Comp. Eng. degree, as well as 10 years of professional experience.

I have found that learning about low level languages is akin to understanding things from first principles.  Assembly language and digital logic courses I took in my undergrad days help me understand the consequences of the code I write in C.

But aside from this, I think that several things are important:
0)  Communication.  This means:
      a)  understanding requirements
      b)  listening to fellow programmers
      c)  not fearing to ask questions
      d)  trying to internally 'talk through' what you are trying to do
1)  Design. how do you approach a new problem?
2)  Intellectual honesty.  ie, don't cut and paste code you don't understand.
3)  Iteration.  Nothing that flows from our hands/minds is perfect the first time.  Like great writers, a good programmer's work gets better by revision.

Some of these things benefit from professional experience, and others by how much you put into your craft.

The Professional
Monday, January 26, 2004

*  Recent Topics

*  Fog Creek Home