Afghanistan and Iraq, August 2010
September 2nd, 2010 at 2:38 pm
Military deaths were down a bit in Afghanistan this past month, but not much Coalition deaths passed the 2000 mark, with little more than a brief mention in the news. I can’t stand thinking that the man I voted for is prolonging this war because of domestic politics, but I don’t know what else to believe. Obama doesn’t really expect anything good to come out of this war, does he?
As for Iraq, no real changes.
Despite what I said last month, I’ll probably continue to plot the Iraq data for the “residual” forces. 50,000 is a lot of advisors.
Elements v. Simplenote, Round 2
August 31st, 2010 at 10:48 pm
Last night, I was going to write a post comparing Simplenote to Elements. I’d already written a brief comparison of the two, but that was before the release of Simplenote 3. It seemed only fair to take into account the improvements in it.
But instead of writing the post, I got hooked on watching YouTube videos, and pretty soon the evening was gone. That turned out to be a lucky break, because when I opened iTunes today, I found that Second Gear had just done a small update to Elements. So now I can compare the latest and greatest of both apps.
If you’re the impatient type, here’s the bottom line: although I haven’t deleted Simplenote from my iPhone, I’ve stopped using it. All my notes are done in Elements now.
Simplnote
The primary new features in Simplenote 3 are:
The tagging of notes. A little flag/button appears at the top of each note, allowing you to add tags to that note for later searching. I have really no interest in this. To me a good title beats a set of tags any day.

A fullscreen viewing option. This is pretty cool; it gets rid of the top and bottom toolbars (or whatever they’re called) and lets you see a few more lines of the file.

That light floating button in the lower right takes you back to normal view.
Note statistics. Elements already had this, and it’s an easy to implement, so it seemed inevitable that it would come to Simplenote. Oddly, it only gives the character and word counts—no line count.

These additions don’t address the downsides of Simplenote I mentioned in my earlier comparison:
- Its own syncing solution, which forces you to use either a web browser or a restricted set of applications when you want to access your notes from a computer.
- No option for a monospaced font. Some text files are just better suited for display in a monospaced font.
Elements
The big change in Elements is that you can now use any font on the iPhone, not just the “Roman” versions. I immediately switched from Courier to Courier Bold. The font looked ridiculously thick at first because I’d gotten used to the spindly look of plain Courier, but now it seems OK, especially when combined with the Silver background.

There’s no question I’d prefer a nice sans serif monospace font, but unless there’s a way for Second Gear to package a font with the app, we won’t see a really good looking monospaced font in Elements until Apple gives us one.
Elements is not without its problems.
- The color choices for the text and background are, for the most part, ugly and don’t match either of the toolbars.
- It doesn’t recognize phone numbers in the notes and turn them into links to the Phone app.
- The enormously long list of fonts for displaying the notes could be organized better, allowing you to start by choosing a font family and then choosing a style—like every other program you’ve ever used.
These problems, though, don’t come close to outweighing the great simplicity that comes from Elements’ Dropbox syncing. I can use any text editor on my computer to create a file, save to the special Elements folder within my Dropbox folder, and it’ll be available in Elements on my phone in a minute or two. And for files edited in Elements, the syncing is just as automatic in the other direction.
Wrapup
As I said in my initial comparison, the two things that set Elements apart from Simplenote are:
- The text editor freedom provided by Elements’ Dropbox syncing.
- The ability to use a monospaced font to align columns in certain files.
That Elements can now display its notes in a font that actually looks black instead of light gray is just one more step ahead of Simplenote.
It’s true that Elements is $5, whereas Simplenote is free, but if that’s your overriding consideration, you might want to reconsider your priorities.
Checkcards on Github
August 30th, 2010 at 11:41 pm
My library loan tracking scripts, checkcards and checkcards.py, stopped working this weekend. After a bit of debugging, I came to learn that the library—or, more accurately, its software vendor—had snuck in a new <span> tag at the ends of magazine titles. My Python/BeautifulSoup code wasn’t expecting this and choked on it.1
The fix was fairly simple, but as I was editing checkcards.py, the Python script that does all the heavy lifting, I got a little too aggressive in tearing out the old code and had to reconstruct some of it from memory. It was then that I realized that I’d never put the checkcards scripts under version control. Now I have.
In addition to the README, the GitHub repository has three files:
checkcards.py, which communicates with the library’s website and prepares the email with the list of items checked out and on hold.checkcards, which runscheckcards.pyand pipes the result tosendmailfor emailing.com.leancrew.checkcards.plist, which tellslaunchdto runcheckcardsevery morning.
My login information has been redacted, and the README tells you how to customize it for yourself. Frankly, I doubt that this will be useful to anyone who doesn’t use the Naperville Public Library, but who knows? I think it makes pretty good use of the mechanize library to interact with web pages.
-
I swear this paragraph makes perfect sense. ↩
Never mind the crackpipe
August 30th, 2010 at 11:06 pm
Instead of writing a post on how the new version of Simplenote stacks up against Elements, as I’d intended, I spent the evening watching old episodes of Never Mind the Buzzcocks on YouTube. And found, in a show from the spring of 2004, a young, cute, and thoroughly delightful Amy Winehouse.
Sometimes goofing off pays dividends.
Spew
August 29th, 2010 at 7:00 pm
This column by Frank Rich in today’s New York Times has been mentioned favorably on some liberal blogs, but I don’t think much of it. First, it’s derivative of Jane Mayer’s recent article on the Koch brothers in The New Yorker. More important, it has some really tone-deaf passages.
Here’s the first:
Only the fat cats change — not their methods and not their pet bugaboos (taxes, corporate regulation, organized labor, and government “handouts” to the poor, unemployed, ill and elderly). Even the sources of their fortunes remain fairly constant. Koch Industries began with oil in the 1930s and now also spews an array of industrial products, from Dixie cups to Lycra, not unlike DuPont’s portfolio of paint and plastics.
Spews? Why use a derisive verb to describe a company that actually makes things? That’s something of a rarity in the US today, when everyone seems to want to be in the business of buying and selling money. Sure, if the company violates pollution laws, spews is a great word for what it puts into our air and water. Or if the products it makes are junk, then spews would fit the bill. But there’s nothing wrong with Dixie Cups and Lycra, or paint and plastics.
Make no mistake: the Kochs are evil bastards. But they’re not evil because they make Dixie Cups.
The problem here isn’t just that Rich is being stupid; it’s that he’s being stupid in a way that plays into conservative stereotypes about liberals. Frank Rich is a liberal elitist who thinks he’s too good for Dixie Cups, so he bashes the Real Americans who make them.
In the next paragraph, Rich mentions the Mayer article and pushes the stereotype again:
Her article caused a stir among those in Manhattan’s liberal elite who didn’t know that David Koch, widely celebrated for his cultural philanthropy, is not merely another rich conservative Republican but the founder of the Americans for Prosperity Foundation, which, as Mayer writes with some understatement, “has worked closely with the Tea Party since the movement’s inception.”
So first he slams the “fat cats” and in the very next paragraph he reports on a “stir” among the Manhattan charity ball crowd. Darling, did you hear our David associates with those dreadful Tea Party people? Worse yet, I hear he makes Dixie Cups.
Frank Rich knows the culture wars well enough to avoid crap like this. He’s presenting liberalism as a conservative cartoon.
Benchmarking password generation
August 29th, 2010 at 2:16 pm
In my recent post on password cracking, I mentioned in passing that I thought the values in this table of password generation times were a little high. In today’s post I’ll show why I said that and also prove that I can program, albeit clumsily, in C.

The table came from this LifeHacker article by John Pozadzides and purports to show how long it would take to generate all possible passwords of various lengths. Implicit in the table’s construction is the assumption that each password takes one one-millionth of a second to produce. Pozadzides says this represents what “an average computer” can do.
I thought that was a little slow, so I wrote this program to check it out.
1: #include <stdio.h>
2: char pw[] = "12345";
3: int i, j, k, l, m;
4:
5: int main(){
6: for (i=97; i<123; i++) {
7: pw[0] = i;
8: for (j=97; j<123; j++) {
9: pw[1] = j;
10: for (k=97; k<123; k++) {
11: pw[2] = k;
12: for (l=97; l<123; l++) {
13: pw[3] = l;
14: for (m=97; m<123; m++) {
15: pw[4] = m;
16: printf("%s\n", pw);
17: }
18: }
19: }
20: }
21: }
22: }
A few things to note about this program:
It’s written in C, a language I’ve actually taken a class in but haven’t programmed in in years. The logic of the program was a snap, and I’d even remembered the format for the
forloop (probably because of my years of Perl programming), but I’d forgotten a lot of the basics. Like how to declare a string and that a program needs amainfunction. Fortunately, this kind of information is just a short Google away.So why did I use a language I’m unused to? Because I didn’t want the overhead of an interpreted or semi-compiled language. A real password cracker would certainly be compiled.
- It’s written specifically to generate lowercase passwords five characters long. A more general program would probably use a recursive function, but I didn’t want to spend the time or effort to do that.
- It does print the generated passwords to standard output in Line 16. Omitting that line would make the program run faster, but I didn’t think that was a fair test, as the purpose of a password generator is create a list of passwords for later testing.
I compiled the program with gcc and then timed its run with the time utility. Here’s the session on my old 1.2 GHz PowerPC G4 iBook (the dollar sign is my Terminal prompt):
$ gcc -o lower5 lower5.c
$ time ./lower5 > pw5-c.txt
real 0m8.451s
user 0m3.206s
sys 0m0.998s
Now you see why I said Pozadzides’ numbers looked slow. Even a creaking, ancient, six year old machine can whip up a list of passwords in less time than his table says.
After writing the post, I compiled and ran the same program on my 2.16 GHz Intel Core 2 Duo iMac and got these timings:
real 0m1.666s
user 0m0.835s
sys 0m0.282s
This computer—which I consider to be my “new, fast” machine, even though it’s nearly four years old—generated passwords nearly an order of magnitude faster than the “average computer” of Pozadzides’ table.
None of this is meant to dispute Pozadzides’ main point, that longer and more complicated passwords are much harder to crack. Nor is it meant to suggest that passwords have become easy to crack with modern computers. Just don’t believe everything you read, and when you can easily check something out, you should.







