Monthly Archives: October 2010

Divisibility rules in hex

We all learn in elementary school that a number is divisible by 2 if the last digit is even. A number is divisible by 3 if the sum of the digits is divisible by 3. A number is divisible by

Tagged with: ,
Posted in Math

Weekend miscellany

Careers How John Grisham became a writer How Edward Witten became a physicist Travel Paris versus New York Math Down with determinants Education Disadvantages of an elite education Software development 30 lessons learned in computing over the last ten years

Posted in Uncategorized

Don’t be a goblin

From The Hobbit: Now goblins are cruel, wicked, and bad-hearted. They make no beautiful things, but they make many clever ones. Don’t be satisfied with being merely clever. Make something beautiful. Related posts: The beauty of windmills and power lines

Tagged with:
Posted in Creativity

Divisibility by 7

How can you tell whether a number is divisible by 7? Most everyone knows how to easily tell whether a number is divisible by 2, 3, 5, or 9. A few less know tricks for testing divisibility by 4, 6,

Tagged with: ,
Posted in Math

Why a computer buffer is called a buffer

Why is a chunk of working memory called a “buffer”? The word ‘buffer’, by the way, comes from the meaning of the word as a cushion that deadens the force of a collision. In early computers, a buffer cushioned the

Tagged with:
Posted in Computing

Weekend miscellany

Photography Water balloons without the balloons Inside the secret Soviet failed moon program Programming In-browser compiler for 40 languages The interruptible programmer Economics Great depression and the gold standard How to cheat with graphs Math Interviews with 2010 Fields medalists:

Posted in Uncategorized

Programmer problem solving sequence

From Phillipe Leybaert: 2010 developer’s problem solving sequence: Google Coworkers StackOverflow RTFM Think

Tagged with:
Posted in Software development

Approximations with Pythagorean triangles

A few days ago someone asked the following on math.stackexchange: Is it possible to get arbitrarily near any acute angle with Pythagorean triangles? A Pythagorean triangle is a right triangle with all integer sides. The sides of such a triangle

Tagged with:
Posted in Math

Paleolithic nonsense

The “paleolithic diet” has gotten more press lately. Paleolithic diet advocates say our ancestors lived in a state of gastronomic innocence, eating mostly meat, before they were seduced by agriculture and fell into eating grain. Some go further and say

Posted in Science, Uncategorized

Best rational approximation

Suppose you have a number x between 0 and 1. You want to find a rational approximation for x, but you only want to consider fractions with denominators below a given limit. For example, suppose x = 1/e = 0.367879… 

Tagged with: , ,
Posted in Math, Python

Good old regular expressions

Here are two examples that persuaded me long ago that regular expressions could be powerful. Both come from The Unix Programming Environment by Kernighan and Pike (1984). The first problem is to produce a list of all English words that

Tagged with:
Posted in Computing, Software development

Buggy code is biased code

As bad as corporate software may be, academic software is usually worse. I’ve worked in industry and in academia and have seen first-hand how much lower the quality bar is in academia. And I’m not the only one who has

Tagged with: ,
Posted in Software development

The Titanic Effect

Gerald Weinberg’s book Secrets of Consulting is filled with great aphorisms. One of these he calls the Titanic Effect: The thought that disaster is impossible often leads to an unthinkable disaster. If your model says disaster is extremely unlikely, the

Tagged with:
Posted in Statistics

Weekend miscellany

Math Quote from Benoit Mandelbrot (1924-2010) Math Fun Facts iPhone app Computing Unicode fonts for ancient scripts How unique and trackable is your browser? Science Insulin: The first wonder drug Exploring the world’s deepest caves Miscellaneous Public debt as a

Posted in Uncategorized

Kibi, mebi, gibi

Computers like powers of 2, people like powers of 10, and the fact that 210 is approximately 103 makes it easy to convert between the two powers. A kilobyte is 1000 bytes like a kilogram is 1000 grams. But the

Tagged with:
Posted in Uncategorized