24 December 2008

Things I Learned About Python

Sometimes dictionaries are better than lists.

I had a huge list of numbers, and I was generating new numbers which I needed to check for membership in the list. So, I was doing lots of item in list. However this proved to be very slow. So slow that the program would have run for several days before completing.

So, I stuck all of the list items in a dictionary and did dictionary.has_key(item). The program ran in about a second.

Lesson: Use the right tool for the job.

14 August 2008

The Things that Make Me Weak and Strange Get Engineered Away

Yesterday, I read The Things that Make Me Weak and Strange Get Engineered Away by Cory Doctorow. It reminds me quite a bit of 1984, though with rather more tech-speak than newspeak. A few thoughts, then:

The Order of Reflective Analytics seems to be a fairly transparent analogue of Google, so much that the Order calls its premises 'campuses' and gives the monks '20 percent time', as it is with Google. I mention this only because I wonder whether this will be recognizable in five years or ten. For the purposes of the story, internally, this really doesn't matter, but it is important on the meta level. It's true that Google stores a huge amount of data--taking myself as an example, they have my email, my chat logs, my search and browsing history, a fair number of documents I've written, code I've written, my photos, this blog, and probably several more things that aren't coming to mind just now. Whether I can trust them to be 'not evil' is an important question, and the story wouldn't be quite the same without that association.

On a less serious note, the word 'pan' leaped out at me. After reading it a few times, I concluded that it referred to a Personal Area Network, but I do wonder what fraction of the story's readers will make that association. Unless something has happened lately that I'm not aware of, PAN isn't a very popular acronym. I suppose it's something of an easter egg--like I expect the Google references will be in a few years.

The story has a few inconsistencies, but they're the sort that wouldn't be too hard to write around, and I expect the story will be revised to correct them at some point. Reading the comments on the story was something like reading a mix of story reviews and bug reports--an interesting experience.

My opinion is that The Things that Make Me Weak and Strange Get Engineered Away is worth reading. Too, an MP3 is available for download of Cory Doctorow reading the story, for those who prefer audiobooks.

(Related Article)

31 July 2008

On the lifetime of a book

From the preface to the 1894 edition of Gypsy Breynton by Elizabeth Stuart Phelps:

"Having been asked to write a preface to the new edition of the Gypsy books, I am not a little perplexed. I was hardly more than a girl myself, when I recorded the history of this young person; and I find it hard, at this distance, to photograph her as she looks, or ought to look to-day.

...

And now, the publishers tell me that Gypsy is thirty years old, and that girls who were not so much as born when I knew the little lady, are her readers and her friends to-day.

Thirty years old? Indeed, it is more than that! For is it not thirty years since the publication of her memoirs? And was she, at that time, possibly sixteen? Forty-six years? Incredible! How in the world did Gypsy " grow up ?" For that was before toboggans and telephones, before bicycles and electric cars, before bangs and puffed sleeves, before girls studied Greek, and golf-capes came in. Did she go to college ? For the Annex, and Smith, and Wellesley were not. Did she have a career? Or take a husband? Did she edit a Quarterly Review, or sing a baby to sleep? Did she write poetry, or make pies? Did she practice medicine, or matrimony? Who knows? Not even the author of her being."

17 July 2008

Atheist Nexus

I've been catching up reading blogs in my aggregator, and I can across a moderately amusing incident: a social networking site for atheists was set up, but suspicions were raised that it might be a sham, set up by some religious person or other to trick atheists into joining, for some nefarious purpose. Fast forward a bit, and PZ Myers has declared that he is satisfied that the site is legit.

First, I must wonder just what evil purpose the site could have been used for--it seems to me the worst the owners could do is to spam the members, which is annoying, but all-too-common. Second, I am not at all certain I understand the point of these social networking sites. I've joined a few, and they don't seem to do anything. You join, you can add people to a friend list and send one another messages, and that's it. Nothing that I can't do with my email program and address book. There are also usually public or semipublic messages (I think facebook calls them 'wall' messages, or something like that), but I prefer to participate in other (topical) forums, so that seems little useful.

Well, useful or not, I've joined it. I expect after a week or so I'll never visit it again, but I'll give it a chance for now. We'll see.

I may write a post about transsubstantiation later, since the most recent developments in crackergate (see also here and here and here) have reminded me. Perhaps I ought to make a list of stuff to write about, since I know that there are dozens of other topics which have simply slipped my mind. If blogger supported the creation of non-post pages, I'd use one of those, but sadly it is not possible. Someday, perhaps.

07 July 2008

Time is an illusion. Lunchtime doubly so.

"Time, being an illusion, is infinitely malleable...it can be stretched...it can be contracted...what shapes it is the mind." --The Question, Issue #2 (1987-03), page 18.

20 April 2008

COBOL ON COGS

Today's youth is too willing to throw away the lessons of the past in favor of what's new. This disturbing propensity is nowhere more prevalent than in the areas of technology, and especially computer technology. That's why I'm so pleased to have discovered a new web application framework, based on a time-tested, classic language:

COBOL ON COGS

15 April 2008

Suddenly I have hope for humanity

Yesterday, I wrote about Dr. Sharman Lichtenstein's rather uninformed criticism of Wikipedia. At the time, I was worried that the general public wouldn't recognize the flaws in her statements, and that the press would end up repeating it uncritically.

However, I came across two new articles today, each responding to Dr. Lichtenstein: one, a post by Christopher Dawson to ZDNet Education, rebuts Dr. Lichtenstein with the usual points (students shouldn't be using any encyclopedia, and should be using more than one source), and makes a comment that closely mirrors something I said in the comments of my blog post. He writes:

I’ve become a big fan of the word “discerning” lately. I think it applies to so much of what our students experience online, so here’s my use of the word for the day: Students must become discerning consumers of information. Telling them not to use Wikipedia doesn’t cut it. Teaching them to use a variety of sources of information and to critically examine the information they encounter on the Web is a lifelong skill that we have a responsibility to teach.

This is exactly what I and many other Wikipedians have been saying for a while now. Wikipedia's unreliability, far from being a hindrance to teaching, ought to be taken as an opportunity to educate students to evaluate all of the information they discover, whether it comes from a supposedly reliable source or not.

Second, a post to Techdirt by Mike Masnick, which makes pretty much the same points. A nice quotation:

Furthermore, in a bit of pure irony, this professor doesn't seem to realize that by making all of these incorrect statements, she's showing just how little you can trust supposed "experts" in the first place. After all, she's going on and on about trusting "experts" over the masses, while showing that she doesn't even understand how Wikipedia works at all, showing her own wrong, incomplete, biased and misleading positions.

Seeing that people recognize the flaws in Dr. Lichtenstein's statements is really reassuring. With any luck, this particular sort of misinformation will die out in the not-too-distant future. However, I'm under no illusions that more misinformation won't replace it. We'll just have to keep on reading things critically, I suppose. How perfectly awful.