Jun. 1st, 2005

bcholmes: (Default)

On alternatives to genre categories:

To give each reader an annotated author-list of whatever their fiction addiction is, so they can go find the books on the shelves, is a perfectly fair solution, offered by many libraries. But addicts don't like it. They want books to be easy the way fast food is easy. They want to go to the shelf and stick out their hand and get a fix.

-- Ursula K. LeGuin, "Genre: A Word Only a Frenchman Could Love", from The James Tiptree Award Anthology 1

bcholmes: (Default)

Some time ago, someone I know was showing me some Python code, trying to convince me that I should give a damn about Python. One of the things I found a little off-putting was Python's use of exceptions. Like this:

    try:
      for blah in something.getBlahs():
        if ...someCondition...:
          raise Found
    except Found:
      ...

I found it quite odd that someone would use an exception in this case, given that, y'know, it's not really an exceptional case. To be honest, I've never been too fond of exceptions, thinking them pretty much the equivalent of a goto. Generally, I reserve exceptions for cases that are real programming errors, or infrastructure failures. That's exceptional.

I think this article articulates a lot of what bothers me with exceptions: that, often, a piece of code that has considered the impact of exceptions is indistinguishable from a piece of code that hasn't considered the impact of exceptions.

That's a real maintainability problem, y'know. If you can't rely on the eyes of another programmer to see a particular problem, then you've made the problem harder to adequately manage. This article by "Joel on Software" really addresses this idea well.

Profile

bcholmes: (Default)
BC Holmes

February 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
2324252627 28 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Powered by Dreamwidth Studios