Something I've been pondering on given a couple of articles I read recently: I find I dislike (and have done for a while) developers who get entrenched in what they know and thereby deem everything else as being wrong. It's the worst kind of rut. They become immune to new ideas, new developments, new methodologies.
The first article was a paper published in the Communications of the ACM called A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World by Bessey et al that talks about how Coverity built and marketed their static code analysis tool. The whole paper is fascinating to read, but it's completely hilarious when the authors talk about the discussions they had with developers regarding the bugs they found. Here's a sample:
For this use-after-freefree(foo); foo->bar = ...;
[Developer said] "No, that's OK; there is no malloc call between the free and use."
As a final example, a buffer overflow checker flagged a bunch of errors of the formunsigned p; ... p = 1;
[Developer said] "No, ANSI lets you write 1 past the end of the array." After heated argument, the programmer said, "We'll have to agree to disagree."
I am gob-smacked that a simple test case would be enough to disprove both of these two developer-asserted truths and yet the devs "knew enough" to not even bother checking, to not even change their mind. I remember on the first day I started at a particular job, I saw that the new system being written in C# had finalizers on every single class: the devs assumed that they were the same as destructors in C++. Not so, I said, and explained why. It took a good two weeks before the finalizers were removed (well, OK, commented out), presumably because the GC was going bananas in their tests and not because I had pointed out the error.
The second article is by Ted Neward, Don't Fear the dynamic/VARIANT/Reaper..., as a robust counter-argument to a commenter on one of Scott Hanselman's blog posts. Here we have Rob dissing dynamic in C# 4 (and, in passing, the Variant type of yore in VB and anybody who would dare to use them). A better example of developer entrenchment I have yet to see, complete with all the carefully chosen adjectives: horrible, ridiculous, loosey-goosey, etc. The kicker is the final paragraph:
I'm just saying, it's a shame that popular "nerd celebrities" like you (and I mean zero offense by that!) - endorse all this loosey-goosey typing. I say that becuase [sic] I've never seen a single case where weak typing or late binding: A) made a design better or B) where it didn't make the component or application worse, because it was a looser design.
Ted's reply is hilarious, showing all those awful things that the C# compiler will let you do -- with nary a warning -- even before you think of using that horrible dynamic type.