Where gargoyles come from

Gargoyles are decoration for drainage. Gothic churches channeled water away from their walls to prevent erosion. The spout often emptied through the mouth of a sculpture.

These spouts are called gargoyles, from an old French word gargouille meaning “throat” (it is related to the English words “gargling” and “gurgling”). Other forms of grotesque sculpture used to decorate churches are commonly referred to as “gargoyles” but, strictly speaking, they are not, because they have no practical function.

Source: The Secret Language of Churches & Cathedrals

Photo licensed from The 3D Studio.

Fermat’s unfinished business

Fermat’s last theorem is so named because it was the last of his asserted theorems to be proved or disproved. But there are variations on another conjectures of Fermat that remain unresolved.

Fermat conjectured that numbers

F_n = 2^{2^n} + 1

are always prime. We now call these “Fermat numbers.” Fermat knew that the first five, F0 through F4, were all prime.

In some ways, this conjecture failed spectacularly. Euler showed in 1732 that the next number in the sequence, F5, is not prime by factoring it into 641 × 6700417. So are all the Fermat numbers prime? No.

But that’s not the end of the story. Now we go back and refine Fermat’s conjecture. Instead of asking whether all Fn are prime, we could ask which Fn are prime.

The next several values, F5 through F32, are all known to be composite. So we might turn Fermat’s original conjecture around: are all Fn composite (for n > 4)? Nobody knows.

Well, let’s try weakening the conjecture. Is Fn composite for infinitely many values of n? Nobody knows. Is Fn prime for infinitely many values of n? Nobody knows that either, though at least one of these two statements must be true!

Here’s why I find all this interesting.

  1. It shows how proof by example fails. Fermat knew that the first five numbers in his series were prime. It was reasonable to guess from this that the rest might be prime, though that turned out not to be the case.
  2. It shows how what appears to be a dead end can be opened back up with a small refinement of the original question.
  3. Like many questions in number theory, the revised question is easy to state but has defied proof for centuries.

Norris’ number

My friend Clift Norris has identified a fundamental constant that I call Norris’ number, the average amount of code an untrained programmer can write before he or she hits a wall. Clift estimates this as 1,500 lines. Beyond that the code becomes so tangled that the author cannot debug or modify it without herculean effort.

Related posts

Cartoon guide to the uninteresting

If you’re not interested in a subject, do cartoons make it more palatable?

My guess is that cartoons may help keep your attention if you’re moderately interested in a subject. If you’re fascinated by something, cartoons get in the way. And if you’re not interested at all, cartoons don’t help. The cartoons may help in the sweet spot in between.

No Starch Press has given me review copies of several of their Manga Guide books. The first three were guides to the universe, physics, and relativity. I’ve reviewed these here and here. Recently they sent a copy of the newest book in the series, The Manga Guide to Biochemistry.

I’m much more interested in physics than biology, so I thought this would be a good test: Would a manga book make it more interesting to read about something I’m not very interested in studying? Apparently not. It didn’t seem that the entertaining format created much of an on-ramp to unfamiliar material.

It seemed like the information density of the book was erratic. Material I was familiar with was discussed in light dialog, then came a slab of chemical equations. Reading the book felt like having a casual conversation with a lawyer who periodically interrupts and asks you to read a contract.

Someone more interested in biochemistry would probably enjoy the book. Please understand that the title of this post refers to the fact that I find biochemistry uninteresting, not the book. If I had to study a biochemistry book, the Manga Guide to Biochemistry might be my first choice. At times I’ve found biochemistry interesting in small doses, describing a specific problem. But it would be nearly impossible for me to read a book on it cover to cover.

O’Reilly’s “Head First” series is similar to the Manga guide series, though the former has more content and less entertainment. I enjoyed the first Head First book I read, Head First HTML with XHTML & CSS. Maybe I enjoyed it because the subject matter was in the sweet spot, a topic I was moderately interested in. The cartoons and humor helped me stick with a dry subject.

When I tried another Head First book, I was hoping for more that same push to keep going through tedious content. The books clearly had the same template though with different content. What was interesting the first time was annoying the second time, like hearing someone tell a joke you just heard. So at least for me, the Head First gimmick lost some of its effectiveness after the first book.

Career advice regarding tools

J. D. Long wearing a Panama and smoking a Dominican

A few weeks ago, J. D. Long gave some interesting advice in a Google+ discussion. He starts out

Lunch today with an analyst 13 years my junior made me think about things I wish I had known about the technical analytical profession when I was 25. Here’s some things that popped into my head:

The entire list is worth reading, but I want to focus on two things he said about tools.

  • Use tools you don’t have to ask permission to install (i.e. open source).
  • Dependence on tools that are closed license and un-scriptable will limit the scope of problems you can solve. (i.e. Excel) Use them, but build your core skills on more portable & scalable technologies.

I would have disagreed a few years ago, but now I think this is good advice.

In the late 90’s I used mostly Microsoft tools. That was a good time to be a Microsoft developer. Windows was on the rise; Unix and Mac OS were on the ropes. Desktop applications were the norm and were easier to write on Windows. Open source software was hard to install and hard to use. People who used open source software often did so for ideological reasons, not because it made their work easier.

Of course times have changed. Mac recovered from its near death experience. Unix didn’t, but it has been resurrected as Linux. The web made it easier to write cross-platform software. And above all, open source software has matured. The open source community is more positive, focused on promoting good software rather than trying to give some corporation a stick in the eye.

Now the advantages of open source are clearer. There’s not the same hidden cost in frustration that there was a few years ago. Now I would say yes, it’s a great advantage to use tools you can install whenever and wherever you want, without having to go through a purchasing bureaucracy.

It’s interesting that JD equates open source with scriptability. Open source software often is scriptable, not because it’s open source, but because of the Unix aesthetic that pervades the open source community. Closed source software is often not scriptable, not because it’s closed source, but because it is often written for consumers who value usability over composability. Commercial server-side products may be scriptable. If I were to restate JD’s advice on this point, I’d say to keep composability in mind and don’t just think about usability.

I appreciate JD’s attitude toward applications such as Excel. He’s not saying you should never defile your conscience by opening Excel. Some tasks are incredibly easy in Excel. The danger comes from pushing the tool into territory where other tools are better. There are still some in the open source community who believe that opening Excel is a sin, but I’m much more in agreement with the people who say, for example, that Excel isn’t the best tool for statistical analysis.

Portability is funny. In the early days of computing, there were no dominant players, and portability was important (and difficult). Then for a while, portability didn’t matter if you were content with only running on the 95% of the world’s computers that ran Windows. Now portability is important again. Windows still has a huge market share on the desktop, but the desktop itself is losing market share.

And portability matters for more than consumer operating systems. JD mentions portability and scalability in one breath. You may want to move code between operating systems to scale up (e.g. to run on a cluster) or to scale down (e.g. to run on a mobile device).

There’s also the aspect of career portability. You want to master tools that you can take with you from job to job. I would be leery of building a career around a small company’s proprietary tools. If I were in that situation, I’d learn something else on the side that’s more portable.

In closing, I’ll give the rest of JD’s career advice without commentary. These points could make interesting fodder for future blog posts.

  • Be a profit center, not a cost center.
  • Use tools you don’t have to ask permission to install (i.e. open source).
  • Dependence on tools that are closed license and un-scriptable will limit the scope of problems you can solve. (i.e. Excel) Use them, but build your core skills on more portable & scalable technologies.
  • Learn basic database tools.
  • Learn a programming language.
  • Your internal job description may say, “Analyst” but get something else on your business cards. Analyst is so vague as to be meaningless. My external title is currently “Sr. Risk Economist.” I like the term “Data Scientist” for now. I expect that term will be meaningless in 5 years.
  • Large organizations do not properly appreciate agile and smart analytic types. Time at large firms should be seen as subsidized learning. Learn lots, but get out.
  • Ensure you can explain any of your projects to your wife or non-technical friends. It’s good practice for board meetings later in your career.
  • Be sure you know the handful of things that you can do better than most anyone else. Add something to that list every year. Make sure you can explain these things to non techies.
  • Be a profit center, not a cost center. At least be as close to the profit center as possible. The chief analyst for the sales SVP is closer to the profit center than an IT analyst supporting billing operations.
  • Get really good at asking questions so you understand problems before you start solving them.
  • Yes, that bit about being a profit center not a cost center is in there twice. It should probably be in there 5 times.

John Coltrane versus Kenny G

My previous post began with a story about a performance by John Coltrane. Douglas Groothuis left a comment saying that he used the same story in his book Truth Decay. Before telling the Coltrane story, Groothuis compares the philosophies of Kenny G and John Coltrane.

Kenny G’s philosophy is as shallow as his music.

I just play for myself, the way I want to play, and it comes out sounding like me.

Coltrane’s philosophy, like his music, is more ambitious.

Overall, I think the main thing a musician would like to do is give a picture to the listener of the many wonderful things he knows and senses in the universe. That’s what music is to me — it’s just another way of saying this is a big, wonderful universe we live in, that’s been given to us, and here’s an example of just how magnificent and encompassing it is. That’s what I would like to do. I think that’s one of the greatest things you can do in life, and we all try to do it in some way. The musician’s is through his music.

As Groothuis comments, Kenny G only spoke of expressing himself, while Coltrane “expressed a yearning to represent objective realities musically.”

Nunc dimittis

In his book The Call, Os Guinness tells the following story of John Coltrane.

After one utterly extraordinary rendition of “A Love Supreme,” Coltrane stepped off the stage, put down his saxophone, and said simply “Nunc dimittis.” … Coltrane felt he could never play the piece more perfectly. If his whole life had been lived for that passionate thirty-two minute jazz prayer, it would have been worth it. He was ready to go.

Nunc dimittis is Latin for “Now dismiss.” These are the opening words of the Vulgate translation of the Song of Simeon, Luke 2:29–32. Simeon says he is ready to die because he has seen what he was waiting for, the promised Messiah.

Lord, now lettest thou thy servant depart in peace, according to thy word:
For mine eyes have seen thy salvation,
Which thou hast prepared before the face of all people;
A light to lighten the Gentiles, and the glory of thy people Israel.

Coltrane’s story brings several things to mind. First, it is awe-inspiring to imagine an accomplishment so fulfilling that you would say “That was it. I’m ready to die.”

Next, it’s interesting to ponder Coltrane’s eclectic spirituality. I knew Christianity was part of his spiritual gumbo, but I was surprised to hear that he made a spontaneous reference to Latin liturgy.

Coltrane was canonized by the African Orthodox Church in 1982. Truth is stranger than fiction.

Finally, I was interested in the name Nunc dimittis itself. I hadn’t heard it before. (I’ve only been part of non-liturgical churches.) I thought the name might only be familiar to Catholics, being a Latin term. But an Episcopalian friend informed me that the Anglican mass preserves many Latin titles even though the liturgy itself is in English. I suppose Coltrane encountered this Anglican name via the Episcopalian influence on the African Methodist Episcopalian Zion Church.

Related posts

Surprising applications of math

The comments in the previous post touched on surprising applications of math, so I thought I’d expand this theme into its own post. Below I’ll give a couple general examples of surprising applications and then I’ll give a couple more personal applications I found surprising.

Number theory has traditionally been the purest of pure mathematics. People study number theory for the joy of doing so, not to make money. At least that was largely true until the advent of public key cryptography. The difficulty of solving certain number theory problems now ensures the difficulty of decrypting private communication, or so we hope. (By the way, I’ve always thought Euler deserved part of the credit for the RSA encryption scheme. Maybe it should be called RSAE encryption. R, S, and A came up with the brilliant idea to apply E’s theorem to cryptography.)

Non-euclidean geometry started as a pure mathematical abstraction. Of course the physical world is Euclidean, but let’s see what happens if we monkey with Euclid’s fifth postulate. Then along came Einstein and suddenly the real world is non-Euclidean.

One personal application of math that I found surprising was using Fibonacci numbers in practical computation. Computing Fibonacci numbers is a computer science cliché, but I actually needed to compute Fibonacci numbers for a numerical integration problem. I wrote up the details in Fibonacci numbers at work.

Another application that surprised me was using the trapezoid rule for real work. The trapezoid rule is a crude numerical integration technique. It’s good for teaching because it’s very simple, but it’s not very accurate. Or so I thought. It’s not very accurate in general, but in the right circumstances, it can be extraordinarily accurate. I explain more in Three surprises with the trapezoid rule.

One surprising non-application has been differential equations. For the past three centuries, differential equations have been at the heart of applied math. One could argue that to first approximation, applied math equals differential equations and supporting material. But I personally have not had nearly as much opportunity to use differential equations professionally as I expected, even though that was my specialization in grad school.

When are we ever going to use this?

“When are we ever going to use this?” What a great question! This is a teachable moment. Too bad most teachers blow it. Instead of seizing the opportunity, they reprimand the student for asking. At least that was my experience.

Why would someone not explain how their subject is used? Often because they don’t know. Or they don’t know how to articulate what they do know. But teachers are supposed to know things and be good at articulating them. That’s their job.

Sometimes the student asking how a subject is going to be used is just a lazy whiner. He’s not asking a sincere question, and he will not find a sincere answer satisfying. But maybe the student is genuinely curious. Or maybe there’s at least a drop of curiosity in the whiner. Or maybe someone else sincerely has the question that the whiner insincerely asked.

I am not saying that content needs to be more practical. Attempts at being more “practical” have often been shortsighted. Many subjects that have been discarded as impractical are actually quite practical. We’ve just grown impatient, unwilling to wait for long-term benefits. I’m saying that more teachers should know and articulate the value of what they’re teaching.

It’s more difficult to convey the value of things that are not immediately useful, but it’s also more important.

Related posts

Productivity and negative space

My post Why programmers are not paid in proportion to their productivity has been getting a lot of buzz today. One of the arguments in that post is that the most productive programmers know where they can find software to do parts of their job. When they reuse existing code rather than writing their own from scratch, nobody notices. They probably don’t even notice themselves, at least not often.

The work you don’t do is a sort of negative space, like the shape formed by the empty space in a painting or the silence in a piece of music. It’s hard to appreciate what’s not there. It’s hard for a business to reward the unnecessary work that someone avoids doing.

Venkatesh Rao has a different take on what makes some people far more effective than others. In his post Thrust, Drag, and the 10x Effect, he says that the people who are 10x more productive are the those who allocate large, uninterrupted blocks of time to work on difficult creative tasks.

Rao’s observation would also help explain why super programmers do not earn super wages, and it ties into the idea of negative space. People who fracture their time putting out fires seem more productive, or at least more responsive, than the people who block out time to think. It’s harder to notice someone not being frantic. Thinkers don’t fare well in environments that reward activity more than accomplishment.

Related post: