Monthly Archives: January 2008

New Hampshire Primary Votes, Election Fraud, and Recounts

After last week’s New Hampshire primaries, I’ve gotten a lot of email requesting my take on the uproar surrounding recounts and voting machines.

For those who haven’t heard, there’s been some chatter
about cheating in the election.
In polls leading up to the election, Barack Obama was
leading by a large margin. But he ended up losing the election to Hillary Clinton by a couple
of percentage points. The argument about fraud centers on the fact that there are two voting
methods used in NH: electronic optical scan machines, and hand-counted paper ballots. In the
districts that used paper ballots, the vote results tended to look more like the poll results –
significant lead for Obama. In districts that used optical scan, the results were strongly in
favor of Clinton. This discrepancy, combined with the pre-election polls, have led some people
to suspect that the Clinton campaign somehow cheated.

So, my take? It doesn’t look like there’s anything wrong with the results, but we should do an audited recount anyway.

Continue reading

Abstract Real Numbers: Fields

When I learned abstract algebra, we very nearly skipped over rings. Basically, we
spent a ton of time talking about groups; then we talked about rings pretty much as a
stepping stone to fields. Since then, I’ve learned more about rings, in the context of
category theory. I’m going to follow the order in which I learned things, and move on
to fields. From fields, I’ll jump back a bit into some category theory, and look at
the category theoretic views of the structures of abstract algebra.

My reasoning is that I find that you need to acquire some understanding of what
the basic objects and morphisms mean, before the category theoretic view makes any
sense. Once you understand the basic concepts of abstract algebra, category theory
becomes very useful for understanding how things fit together. Many complicated things become clear in terms of category theoretic descriptions and structures – but first, you need to understand what the elements of those structures mean.

Continue reading

The Genius of Donald Knuth: Typesetting with Boxes and Glue

Today is the 70th birthday of Donald Knuth.

If you don’t know who Knuth is, then you’re not a programmer. If you’re a programmer and you don’t know who Knuth is, well… I have no idea what rock you’ve been hiding under, but you should probably be fired.

Knuth is one of the most famous and accomplished people in the computer science community. He’s done all sorts of great research, published a set of definitive textbooks on computer algorithms, and of particular interest to me, implemented a brilliant, hideous, beautiful, godawful piece of software called TeX.

When I went to grad school, instead of being a teaching assistant, I worked for the department as a sysadmin. I ended up spending close to six years doing almost nothing but technical support for TeX, which explains my mixed emotions about it in the description above.

Continue reading

Wow. Just wow.

I was just perusing my stats on sitemeter – and to my amazement, I discovered that Good Math/Bad Math had its 2 millionth view this weekend. 2 million pageviews! I never dreamt that this little blog would ever see a number like that. Astonishing! Over 1.3 million visits to the blog so far!
Thank you all!

Censorship == They Won't Work For Me For Free!

Sorry, but as a software guy, I just couldn’t resist mocking the sheer insane
hypocrisy of this.

There’s a right-wing political site out there, called RedState.com. RedState
is serious far-right – constantly bemoaning the nanny-state, the culture of entitlement,
the virtues of personal responsibility, and so on. According to RedState, Social Security
is bad – people should save for their own retirements, not rely on the government to take care of them. Socialized medicine must be avoided at all costs: people should pay for their
own medical insurance, not expect the state to do it for them. And so on.

So, RedState initially set up their state on Scoop. If you don’t know, Scoop is
some software brewed up for a geek-news and discussion site called Kuro5shin. Scoop
is a free software, implemented in Perl, and distributed under that manifesto of
right-wing entepreneurship, the GNU Public License. (For those not in the know, I’m
being sarcastic here. While it’s generally silly to try to attribute political attributes to software licenses, I think it would be reasonable to say that if you characterized open-source licenses in terms of the political spectrum, the GPL would be solidly in the socialist area.)

After running for a while, Scoop wasn’t up to the load. So they switched to
another free package, called Drupal. Drupal is, like Scoop, free, and distributed under the GPL. But Drupal didn’t have as many features as Scoop, which frustrated
the RedState guys. So what does a good, responsible, self-sufficient, entrepreneurial
organization like RedState do when the free software that they’re using isn’t up to the job
that they want it to do?

Naturally: They whine about how no one will fix it for them for free, and how
the unwillingness of people to do free work for them is just a totally unfair
attempt by those nasty rotten liberals to censor them:

The bad news: our liberal “friends” – you know, the ones who believe so strongly in free speech and open debate – have done what they can to prevent us from making these improvements, so that our influence will be minimized just as we head into the 2008 presidential primary season.

No, our Blue State buddies haven’t succeeded in stopping us from improving our website. But they’ve made it more difficult and more expensive – which is why I’m coming to you for help.

Let me explain …

You see, when we started RedState in May of 2004, we used a website program called Scoop — the same program a lot of similar sites on the left used. But, as the number of visitors to our site grew, Scoop kept crashing on us.

If we’d been a liberal website, we would have been able to fix the problem quickly and relatively cheaply. The online left loves Scoop. Unfortunately, there weren’t really any conservative Scoop developers out there to help us. We kept crashing and were out of money. We had to close down or take drastic action.

Well, we didn’t close down. We ditched Scoop and moved to the best alternative at the time, a program called Drupal. But, in accomplishing the switch, budget constraints forced us to sacrifice some popular site features in order to alleviate the strain on our overused servers.

Needless to say, we always regarded those “downgrades” as temporary, and we hoped to restore the eliminated features – and to add new and even better ones – as soon as we could afford to.

Unfortunately, we still can’t afford to. But we’re convinced that America can afford even less to have us operating at anything less than our absolute peak potential during the coming presidential election season.

So we’ve decided to move ahead with our upgrades without delay, and despite not having the cash on hand – hoping and praying that RedState.com readers like you will help us make up the shortfall with a generous donation.

Continue reading

Simple Lempel-Ziv Compression in Erlang

I decided to do a little bit of something useful with Erlang, both to have some code to show, and to get some sense of what it’s like writing something beyond a completely trivial example. Because the capabilities of Erlang shine when you get into low-level bit oriented things, I thought that writing a bit of data compression code would be make for a good example. I’m going to present it in two parts: first a simple but stupid version of the algorithm; and then the encoding part, which into bit twiddling, and potentially gets more interesting.

I’m going to use a simple version of Lempel-Ziv compression. Before I get into the detail
of how LZ compression works, I’ve got an interesting story about how I learned about it. My first summer in grad school, I was looking for a job. One of my college friends worked for a subsidiary of Travellers insurance, and he got me an internship with them.

Our group (3 of us) worked on programs that ran on salepeoples’ laptops. Since this
was 1991, laptops were still pretty primitive. We had to run in 128K of memory, with the best machines having 10 megabytes of hard disk, and the worst machines having two floppies. So memory use was always a huge issue.

Being an insurance company, naturally things were pretty bureaucratic. They hired me to write a prototype of a new program. I don’t remember the details of what I was supposed to write. But the way things worked, they wanted to build this new tool for the salespeople. But the company wouldn’t let them propose a new project without having staffing for it. So they hired me to work on it. But because they hadn’t proposed the project before they hired me,
I had nothing to do while they proposed it, and worked out their requirements. So I worked for them for a total of about 12 weeks; and it took them about 9 1/2 weeks to get to the point where they had an approved project for me to work on. So I had over two months with nothing
to do. So I kept pestering the other two guys about what I could do to help them.

One of the things they wanted was a way of doing a splash screen. They had a GIF image of the company logo, and they thought it would be nice to be able to splash it on the screen whenever the sales app loaded. But they didn’t have an image viewer that they could call from inside their program. So they asked me to write one. GIF images are encoded using LZ. So I coded that up the LZ decoder to get the bitmap out of a GIF in C, and they were happy. Then I decided, as long as I had an LZ decompressor, I should write an LZ compressor, and then we’d have some generic data compression code. So I went ahead and did that, and added a
nice, effective set of data compression routines to our libraries. But the manager was actually pissed at me: I’d added a feature to our library – data compression – without getting permission. The right way of doing things was to write a proposal, and pass it around the various levels of petty bureaucrats for two months while I sat and twiddled my thumbs on the payroll.

Anyway… Back to compression.

Continue reading

Bad God Proofs: the Islamic Version

I’ve been sent Yet Another Proof of God. This one goes to rather a lot of trouble
to appear to be mathematical. I thought that it would be fun to rip it apart. For a change, this one is from an Islamic moron, rather than the usual Christian moron.
Alas, it’s pretty much as stupid and shallowly wrong as the usual christian one.

Continue reading

Common Sense: Math is the Root of All Evil (including Evolution)

Sorry that the blog has been so quiet lately; I managed to catch a vicious flu for the first time since I started getting flu shots, so I’ve been feeling too ill to write. I’m still far from recovered, but I’m feeling well enough to share a bit of delightful foolishness with you.

After seeing my recent post about a relativity denier, a reader sent me a link to another extremely amusing anti-relativity site. (In fact, I’ve recieved a bunch of links to anti-relativity sites; I’m only posting the most amusing ones.) This one has
several particularly amusing properties, but from my point of view what makes it
such a great target is that it uses the mathematical precision of relativity as part of its argument against it. You see, math is ultimately the basis of a grand anti-religious conspiracy to replace god with randomness and evolution!

The site is called “Common Sense Science”. Alas, the full range of their insanity isn’t available for me to view: they publish textbooks and journals, and to get the full details about their “theories”,
you must buy the books and/or subscribe to the journals. But there’s more than
enough there on the site to see what they’re going on about.

Continue reading