Suppose you need to evaluate the function f(x) = log(1 + ex). The most obvious code to write something like this in C: double f(double x) { return log(1 + exp(x)); } This is so simple you don’t even test…
Suppose you need to evaluate the function f(x) = log(1 + ex). The most obvious code to write something like this in C: double f(double x) { return log(1 + exp(x)); } This is so simple you don’t even test…
Here’s a quote from the Greek physician Galen (c. 130-210 A.D.) All who drink of this remedy recover in a short time, except those whom it does not help, who all die. Therefore, it is obvious that it fails only…
XHTML is essentially a stricter form of HTML, but not quite. For the most part, you can satisfy the requirements of both standards at the same time. However, when it comes to closing tags, the two standards are incompatible. For…
This weekend I stumbled across the book Houston Deco at the library. The book is filled with photos of Art Deco and Art Moderne architecture in Houston and the surrounding area. I had no idea how much Art Deco architecture…
I submitted an article to Code Project yesterday, Simple Random Number Generation, describing a small C# class called SimpleRNG that uses George Marsaglia’s WMC algorithm. The article was posted around 5 PM (central US time) and comments started pouring in right…
When users find spelling and grammar errors in your software, your credibility takes a hit. But apparently very few software projects review the text their software displays. I imagine the ones that do review their text use a combination of…
Sometimes making a task just a little simpler can make a huge difference. Making something 5% easier might make you 20% more productive. Or 100% more productive. To see how valuable a little simplification can be, turn it around and…
It’s easy to decide what you’re going to do. The hard thing is deciding what you’re not going to do. Michael Dell Clutter kills WOW. Tom Peters Any intelligent fool can make things bigger, more complex, and more violent. It…
According to a Science Magazine story, it looks like humans have been in North America one thousand years longer than previously believed. New DNA evidence suggests people were in North America by 12,000 B.C. The study also suggests that the first Native…
I was reading a statistical article the other day that used the word “important” when I thought the author should have said “urgent.” Since I was in a statistical frame of mind, I wondered whether importance and urgency are positively…
I found the following comment inside the source code for TeX in the preface to a function creating Roman numeral representations: Readers who like puzzles might enjoy trying to figure out how this tricky code works; therefore no explanation will be…
On it’s surface, Unicode is simple. It’s a replacement for ASCII to make room for more characters. Joel Spolsky assures us that it’s not that hard. But then how did Jukka Korpela have enough to say to fill his 678-page book Unicode Explained?…
Learning is not the same as just gaining information. Sometimes learning means letting go of previously held beliefs. While this is true in life in general, my point here is to show how this holds true when using the mathematical definition…
According to the latest Scientific American podcast, there is no scientific evidence to back up the common belief that everyone should drink eight glasses of water per day. Nor is there scientific evidence to back up many of the claimed…
Here’s an interesting graph from Marko Pinteric comparing Microsoft Word and Donald Knuth’s LaTeX. According to the graph, LaTeX becomes easier to use relative to Microsoft Word as the task becomes more complex. That matches my experience, though I’d add a…