Iterators in Cocoa

One thing I’ve always liked about C++ is that when using the Standard Template Library, you can write loops over containers (or really between any range of iterators) very cleanly and simply, e.g.:

<br /> for (vector<foo>::iterator i = myVector.begin(); i != myVector.end(); ++i) {<br /> // do something with *i<br /> }<br /> </foo>

On the other hand, whenever I use Cocoa NSEnumerator objects, it drives me batty:
Continue reading

I want a sticker!

I voted in person for the first time this last month (a few weeks ago in the municipal primary, and today in the general). All my previous elections have been by absentee ballot. In California, I always saw everyone around me on election day with those little white “I voted” stickers with the American flag on them. I was always envious. So I figured now that I’m living here in St. Louis, and the polling place is just down the block, I can finally get one of those stickers. But so far, at neither election have they had stickers for me.

This is only a municipal election, and the City of St. Louis isn’t exactly rolling in cash; the roads need fixing more than I need my sticker. For now, I guess I’ll just have to wait for 2004 and hope that the state buys me a sticker.

Gag me with a JavaScript

There’s a municipal election today and I came across Elizabeth Crowley’s Web site. She’s running for school board. I’m not sure what bothers me most: That she decided to disable the right mouse button (context menu) on her Web site and have an annoying message pop up instead, that JavaScript allows you to disable the right mouse button, or that Mozilla implements that aspect of JavaScript.

Regardless, I think I’ll be voting for someone else.