Saturday, August 25, 2007

Computer Science: Smart People Have Weird Hangups

Have you ever noticed that smart, interesting people have weird technical hangups? Often, they take a good idea to its logical conclusion in such a manner that it dominates their lives. For instance:

I'm an open source fanatic. I'll put up with a lesser product if it means the difference between being open source or not. For instance, I think Apple has a better desktop experience than Ubuntu does, and I also think they have slicker laptops than Dell has. However, I refuse to buy a Macbook because it's not open source, despite the fact that all the people around me have Macbooks--even my heros Guido van Rossum and Bram Moolenaar.

My buddy Mike C. hates OOP. Mike's a wicked sharp guy from MIT, so he's earned the right to his opinion. (As an aside, it's strange how vehement many Lisp hackers hate OOP, despite the fact that OO systems exist for Common Lisp.) It'd be one thing if he were simply a fan of Scheme over Java, but Mike often codes in Python and refuses to use OOP.

My co-worker Alex J. has many strange technical hangups. He's also been coding in Haskell for nine years, which I think qualifies him for "smart and interesting". Alex hates RDBMSs because of the way they use disks. Clearly in the 70s, RDBMSs were an important way to abstract disk usage, but he argues that memory is plentiful enough these days that we should no longer optimize for disk usage. The thing that irritates him most is that when you query a database, you don't know whether it's going to be able to answer the query from memory or have to incur several 9ms seek time penalties in order to answer the query. He calls this a "leaky abstraction". Sounds somewhat reasonable right? Except Alex takes it to the point where it literally pains him to work in any company that uses an RDBMS.

I have a previous co-worker named Jesse M. who hates the Web. He's a senior architect at IronPort Systems; he's the type of guy who can get big things done. Jesse's a user interface purist and he argues that the Web is a fundamentally broken user interface. The fact that every Web site looks and behaves slightly differently is horrible from a user interface perspective. His pet peeve is that text areas have scroll bars while the page itself also has a scroll bar. Personally, I had never thought to be irritated by that. It's reasonable for a user interface purist to gripe about the Web, but Jesse takes it to what might be considered unreasonable levels. He almost entirely refuses to use the Web. He occasionally has to write scripts to scrape data from Web pages so that he can avoid using a Web browser. In fact, he refused the adoption of a company wiki because that would require a Web browser.

My buddy Sam R. loves asynchronous networking, but hates writing asynchronous code. These days Erlang is popular enough that people are beginning to see that you can write asynchronous code without breaking everything into callbacks. However, Sam figured this stuff out years ago. He was the inspiration behind Stackless Python and wrote the mail server for eGroups (i.e. Yahoo Groups). There are cases where the performance benefits of asynchronous networking are simply unnecessary; cases where it'd be nice to simply use the built in server libraries. However, Sam would rather write everything from scratch--hacking at the innermost bits of Python--that put up with synchronous networking APIs or having to write Twisted code. By the way, I'm a convert to Sam's religion. I think Twisted is awful ;)

Guido van Rossum has an interesting hangup. He built restrictions into the very syntax of Python in order to force programmers to write more readable code. Did you ever edit a piece of C where the indentation didn't match the braces? Guido's response was to write a language where it's not possible to indent the code in a way that conflicts with the meaning of the code.

Similarly, in many functional languages, you can write code like
a = if winner:
1
else:
2
The "if" statement is itself an expression that returns a value. You can do this in all of the functional languages and in Ruby too. However, Guido feels that the following is more readable:
if winner:
a = 1
else:
a = 2
Guido's response: Python makes a distinction between expressions and statements that prevents you from writing the code in a way that Guido feels is less readable.

Well, since it's my blog, I can confess to one more over-the-top hangup. I love style guides. I think following style guides improves code readability. In fact, I have the style guides for C (BSD), Java, Python, and Perl mostly memorized. Sounds like a good idea, right? The problem is that I'm so obsessed with style guides that I have a hard time reading code that doesn't follow the style guide. During code reviews, if a chunk of code doesn't follow the smallest requirement in the Python style guide, I'm so distracted that I can barely focus at all on what the code does or whether it has any bugs.

It's interesting to see how smart, interesting people can often take reasonable ideas and take them to their logical conclusions in such a way that it dominates their lives. Sometimes, it's in a way that is not only disproportional to the subject at hand, but is even occasionally harmful to them overall.

43 comments:

Anonymous said...

A very interesting and perceptive post! I knew a guy once who hated computer mice; he called them 'rats' instead. He also hated scrollbars because of the way that when you pulled the mouse down, the information on the screen moved up.

Noah Gift said...
This comment has been removed by the author.
Noah Gift said...

This was a great article! I think it is a mixture of issues really. One issue is that as we age we are less receptive to change. Another issue is that smart people are smart because they are stubborn and figure out crafty ways of doing things while people laugh at them.

On your mac hangup, please see my response:

Zen of Mac

Anonymous said...

not using software because it is not open source is really stupid imo, sorry.

Will said...

I don't find these hangups particularly weird.

Anonymous said...

Not using software because it isn't F/OSS is really wise, IMHO. My data is too important to let some company hold it hostage. My time is too important for me to learn a tool that might be gone in 3 years. I've been burned by proprietary software in the past. Never again.

Anonymous said...

My hangup is scalability. Having designed and implemented systems that eventually had to scale up to many tens of millions of users I have probably spent a year or so of my life just re-writing things that were good enough when first designed or implemented but broke in some horrible way as things got larger. As a consequence I now tend to obsess about the scalability of just about every component in my code; YAGNI has been replaced with YouJustMightNeedItSoWhyNotDoItRightTheFirstTime with predictable consequences...

Anonymous said...

surely you can get a macbook and then install linux on it, but personally i wouldn't use ubuntu as i don't enjoy having nails driven into my taste in UI design

Anonymous said...

I think style guide is fine... I like my own code because I have an easier time to understand it (most of the time ;> ) and this is why i hate complicated code (namely, code of other people ;> )

Josh said...

I've recently acquired a new hangup: Performance.

I'm working on a project that deals with a lot of large files and image processing (not to mention restricted RAM and hard drive space) which is causing me to think more and more about performance. Not only does the install have size limitations, but the program has performance limitations too. At first, it was annoying, but now I'm thinking about how I can squeeze some extra speed or reduce RAM usage out of it all the time. It's bleeding over to other programs too. I am ripping clunky RDBMS's out of some of my programs in favor of flat files. You cannot imagine the speed increase. I'm even using 3rd party software to compile C# programs to native code (try this sometime, it really is stunning how slow bytecode is).

It reminds me of the argument between C/C++ and Java back in 1995-1997 range. All I heard was "Java is too slow." I thought, no it works fine and it's easier to program in (not to mention more attractive to look at). Now, I'm not so sure. I'm actively looking for my copy of K&R. I'm actually considering going back to C for certain things. Good thing Python and Ruby have good C interop.

Anonymous said...
This comment has been removed by a blog administrator.
orangepips said...

A foolish consistency is the hobgoblin of little minds.

- "Self Reliance" Ralph Waldo Emerson.

Shannon -jj Behrens said...

Hey, thanks for all the positive feedback, guys!

Shannon -jj Behrens said...

Noah, thanks for your "Zen of Mac" post. While I can surely appreciate the idea: "That is the Zen of Mac. You don’t think, it just works," I don't think it's necessarily appropriate for a computer scientist such as myself. I think the only way you get to be a Linus Torvalds is if you question everything about the software inside a computer. Nor do I think a great GUI is mutually exclusive with having access to the source. I want both!

I think you're absolutely right that "The reality is that you are more productive on solving your other problems when you don’t think about your computer, it just works."

Shannon -jj Behrens said...
This comment has been removed by the author.
Shannon -jj Behrens said...

Jesse reminded me of the quote:

The reasonable man tries to adapt himself to the world around, while the unreasonable man tries to adapt the world to himself. Therefore, all progress depends upon the unreasonable man. -- George Bernard Shaw

Carlos Ribeiro said...

This kind of stuff is not limited to tech people. Artists are often famous because of their idiosyncrasies. Musicians that only play with a particular instrument, painters that only paint with a particular type of brush, etc. Even business men can show it too, there are stories about bright people that lost big opportunities because they just couldn't stand something happening. "Normal" people usually tolerate this behavior, and associate it with a sign of intelligence, despite it being pretty annoying.

Anyway, the thing about it is that these hangups can be immensely counterproductive. During my early professional career I was a purist; it didn't help at all. I would only program with my own libraries, I had to write all my code, and it all had to be optimized. I could spend days refactoring code, or designing a simple dialog box. Were I more pragmatic, I surely could have done more (and better).

It took me a few lost jobs and a lot of effort (with professional help) to learn how to deal with it. I still have some minor hangups - I have trouble reading documentation that is not well structured, such as Word documents that don't use a style sheet, or any kind of document with irregular formatting (mixing lots of fonts, or fonts of several sizes). But getting over my purism helped me a lot, made me a better professional and a better (or at least less annoying) person.

Noah Gift said...

Shannon,

I agree with you. If your goal is to be a hard core Linux badass then you need to fight and understand every last nook and cranny. That is your deal...literally..your job.

I am more focused on purely writing code these days though, so I believe focusing all of my energy on that is better.

Joshua Haberman said...

This was an insightful and enjoyable read. My hangup is UI responsiveness, I practically flip out whenever I get a beach ball, and I'm really dissatisfied with every GUI since BeOS.

I don't quite understand your coworker's gripe with RDBMS's. Most of them will let you adjust the amount of RAM they should use, and will happily keep the entire DB in RAM if there is enough, but that's server-side policy. I suppose the server could vend this information to clients (eg. how many block reads did this query take), but performance problems are generally easier to debug from the server side anyway.

Anonymous said...

That has nothing to do with being "smart" and everything to do with being "people".

Gary Capell said...

Looks like Guido came around on the conditional expressions thing

austin said...

Quite an interesting post. :)

I would say you are generally right. Being direct and having a clear thought of how something is done in such a manner is a good way to get things done; opinionated people can do this (ex: torvalds.) You have a clear view of what things should be like, so it's much easier to grasp and create than it would be if your vision is blurred with indecisiveness.


Generally I would say the hangup I normally have is on UI. I am a big proponent and fan of dynamic window management like in wmii and xmonad, and on my linux machines I use the terminal exclusively. It provides me with a no-fluff environment that's straight forward to comprehend and use, and generally I've found my work efficiency is much improved by mitigating things like mouse usage and needing to deal with windows myself. (At the very least, this manfiests when I'm coding something; I happen to be a pretty happy XP user as well.)

Nick Mudge said...

Interesting points.

Anonymous said...

Thanks for the interesting post! I've recently started work for a company where the chief technical guy is both extremely smart, and holds very idiosyncratic views about certain things. As a result, the company tends to reinvent the wheel a ridiculous amount. Sometimes that's a good thing, but it can frequently be detrimental.

But yeah, it's good to think about our hangups and to work out when and where it's worth compromising our principles/preferences. I also have an open-source hangup. I've never been seriously disadvantaged in using open-source tools, but I'd consider compromising if the disadvantage was too great in a circumstance of any significance to me.

Wu Ming said...

Thanks for such a fantastic post!
Let me tell you: I do not find any of those hang-ups weird. Quite the contrary.
In fact, I even have a favorite one: the web guy.
We need to be reminded sometimes that what everyone believes to be right may not be that right after all.
He is so right that the web is a broken interface, what's weird about that? He's right.
Anyway, thanks for such a great read. Your blog has been bookmarked, that's for sure. And thanks to Noah for linking to it, that's how I ended here.

Neil Anderson said...

"One issue is that as we age we are less receptive to change."

The older I get the less tolerant I am of intolerant people. :)

Anonymous said...

A rather roundabout way to say you think you're smart ...

Shannon -jj Behrens said...

Awesome! I made it onto DZone again! :-D

Shannon -jj Behrens said...

> Even business men can show it too, there are stories about bright people that lost big opportunities because they just couldn't stand something happening.

That reminds me of how Edison hated AC electricity so much he invented the electric chair to show how dangerous it was.

> It took me a few lost jobs and a lot of effort (with professional help) to learn how to deal with it. I still have some minor hangups - I have trouble reading documentation that is not well structured, such as Word documents that don't use a style sheet, or any kind of document with irregular formatting (mixing lots of fonts, or fonts of several sizes). But getting over my purism helped me a lot, made me a better professional and a better (or at least less annoying) person.

Wow, that sounds like me. Thanks for the advice!

Shannon -jj Behrens said...

> I don't quite understand your coworker's gripe with RDBMS's.

The problem is that you just don't know whether it's going to talk to the disk or not. It's a random 9ms penalty ;)

He likes memcached. He's the leader of the HApps project. Imagine a clustered memcached where you can talk to the data *in-process*.

Shannon -jj Behrens said...

> Looks like Guido came around on the conditional expressions thing

Yes, but in the same way he came around on lambda--in a grudging restrictive way. You can use an if statement as an expression or a lambda as an expression if and only if it only contains expressions. Hence, you can't use a print statement in a lambda.

Shannon -jj Behrens said...

As for BeOS and dynamic window management, strangely enough, those have been on my mind a lot lately too! Thanks for telling me about xmonad.

Shannon -jj Behrens said...

Whee! For a brief moment, I was #1 on http://programming.reddit.com/

Noah Gift said...

Sorry, I gave a dead link Shannon:

Zen of Mac Link

Quite a few people are coming your way from that article :)

Adam U. said...

Man, you're not even scratching the surface of your odd hang-ups, ha ha ha! I don't think I have hangups like the rest of your posters but your opinion may differ ;-)

Either way, great post! Quirk on, smarties!

- A

Kim said...

Nice observation, thanks. I don’t visit your blog every day, but when I
visit your blog I enjoy browsing through your old posts and try to catch up
what I have missed since my last visit.

The Boss said...

Just curious, where did your friend Alex program Haskell? Not too many Haskell coders, and not too many Haskell projects (I love the language, though)...

Shannon -jj Behrens said...

> Just curious, where did your friend Alex program Haskell?

Alex hires other people to work on his Haskell project HAppS.

ZaidaZadkiel said...

Are you sure you don't mean obsessive compulsive ?

Xichekolas said...

More likely the Lisp crowd hates OOP because they associate it with CLOS and other OO implementations in Lisp that are so controversial.

Could also be part of the superiority complex too...

Shannon -jj Behrens said...

> CLOS and other OO implementations in Lisp that are so controversial.

Can you tell me more?

> Could also be part of the superiority complex too...

I figured as much. Statements from Lisp programmers like "design patterns are stupid" irritate me. I think that DSLs are a design pattern, and clearly they're not stupid.

shopping cart said...

surely you can get a mac book and then install Linux on it. it very helpful.

Shannon -jj Behrens said...

Yep, that's what I did ;)

It's not entirely pleasant. A Thinkpad is much better supported, but it does work (aside from a bunch of gotchas). Suspend works, and I get a lot of battery life--so that is really nice.