Sunday, November 29, 2009

More LaTeX On The Web

Sometimes I find myself in need of a GIF image of an equation or two. I want to be able to generate them quickly and easily, but I find that my MikTeX setup on Windows isn't helping.

Fortunately, Google found a utility that converts LaTeX to an image at All I have to do is type in a snippet of LaTeX, hit the "convert" button, and I can see the equation rendered as an image. Even better, I can copy the URL and paste it into another HTML page as an image tag. Just what the doctor ordered!

Saturday, November 21, 2009

Coders At Work

I finished reading Peter Seibel's Coders At Work: Reflections on the Craft of Programming yesterday. I thought it was terrific and would recommend it highly to anyone who writes code for a living. It's an impressive follow-up to his Practical Common Lisp.

Peter drew his inspiration from the Paris Review Writers At Work. Great creativity is required to recognize an idea that's good in one context and reuse it in another.

The roster of interviewees is impressive, especially after having read the book. I only knew a minority when I opened the book. Only Knuth and Ken Thompson were long-familiar names. I knew of JWZ by hearsay. I have a copy of Peter Norvig's "AI: A Modern Approach", it's been over my head forever.

Donald Knuth is the biggest name; Peter holds him back for the last chapter. He seemed to me to be from another planet. I've written about my love of LaTeX; this is the man who spent ten years of his life coming up with TeX. I especially liked this bit on page 598:

With TeX I was interacting with hundreds of years of human history and I didn't want to throw out all of the things that book designers have learned over the centuries and start anew and say, "Well, forget that guys; you now, we're going to be logical now."

The more I learn about Peter Norvig, the more impressed I am. The people who are exposed to his genius at Google are fortunate indeed.

Guy Steele didn't disappoint. He's brilliant, but he can't help working the fact that he went to MIT into the very first answer he gives. My informal survey tells me that this is true of each and every MIT graduate I've ever known personally - except for one. (My friend is one of the most brilliant, most accomplished people I know, but I didn't hear that his Ph.D. came from MIT until after I'd known him for a long time, until I heard it from a mutual friend.) Thank you for another data point, Guy.

Some of these folks are younger than I am, but most are my contemporaries. All are far more accomplished as programmers and computer scientists than I am. They were doing their best work in this field when I was a mechanical engineer. I'm doing my best to try and catch up, but I still have a very long way to go. I envy them their accomplishments.

It seems to me that Peter Seibel struck a very nice balance between scripting his questions and letting the conversation lead him. There was a thread of common questions that ran through all the interviews (e.g., "How do you debug?", "Do you read code?", "Do you consider yourself a scientist, engineer, craftsman, or artist?", "How much math is needed to be a good programmer?"), but each interviewee contributed special insights that would have been hard to anticipate.

The book brought home two things to me: how much computing has changed since these people were in their heydays and how much wonderful stuff is being lost to time. I haven't read "The Art of Computer Programming". I feel like I should, but I'm not sure that it'll provide a payoff for all that effort in the corporate enterprise computing world in which I earn my living today. Those with the talent and good fortune to be working for Google and firms that value deep knowledge are a minority.

Every one of the individuals interviewed by Peter Seibel is a giant in the field. Is that so because they did their best work early in the history of computer science? If 2% of people are wired to be programmers, and there are 6.67 billion people on earth, that means there are about 133,400,000 potential writers of C#, Java, Cobol, Lisp, or what have you. Will we find giants to compare to the early ones?

I've read that Shakespeare and Babe Ruth stood out in their fields because there were comparatively fewer contemporaries who were their equals. Now that we have everyone blogging on the Internet and full-time professional athletes it's harder to stand out.

Programming is often compared to building buildings or manufacturing widgets or god knows what else. Like these other productive activities, it's often outsourced by American firms to be done by individuals in parts of the world that will do it for far less than their domestic counterparts. Will the next generation of great achievers come from their ranks? Will Peter Seibel have to travel further afield to hear about their exploits?

I enjoyed the book very much and recommend it highly.

Wednesday, November 11, 2009

Raking Leaves

The weather on the East Coast was unseasonably beautiful this weekend. It was sunny and warm both on Saturday and Sunday. It afforded me an opportunity to get the leaves off my yard and into a pile in the woods. My lot is 1.1 acres, with woods separating my house from the one behind me. There's a mountain of leaves taller than me in those woods tonight. It grew one tarp load at a time over the course of two days.

I always think of my father when I rake leaves. Some kids went to ball games with their dad; I raked leaves with mine.

He was an Irish immigrant who came to this country with the equivalent of a high school education. He got a job working for the water company in town. He was a member of the crew that worked to maintain the system of pipes and valves buried under the roads. They led from the treatment plants situated next to the reservoirs to the metered 1" diameter copper pipes that were the "last mile" into each and every house in town. He knew every pipe, both size and material, every valve in the system, because he had either put them in place or repaired them at one time or another. He had an unmatched encyclopedic knowledge of roads in town. He could associate each one with one job or another: "We had an 8 inch main break on Sinoway Road last night."

It was a good union job, but with six kids at home he didn't mind hustling for a few extra bucks. So on Saturdays he would go out and do yard work for people. He had regular customers that would have him cut the grass in the summer and rake the leaves in the fall. It meant getting up early on Saturday mornings and spending the day going from house to house. The last stop was always my grandmother's.

I was his eldest son. By my best recollection I was nine or ten years old the first time I went with him on a Saturday morning. I was less than useless. I didn't have the strength or stamina to help much in the beginning, but young legs can serve a purpose when you don't want to walk back to get a tool. He was easing me into the idea of helping.

As I became capable of contributing more, I remember going more frequently. I can't recall anymore how regular I was about the task. I'm sure that my faithfulness fell short. But I do remember going on more than a haphazard basis. I knew the names of all the customers, and they knew me. I can still point out the houses that haven't fallen victim to time and been knocked down to make way for McMansions.

These were quiet trips. We'd both get up early on Saturday mornings, load the appropriate tools into the car, and go on our appointed rounds. We didn't get coffee or chat a lot. He would thank me for helping, but whatever checks exchanged hands went into his pocket. I never questioned the arrangement. It was understood that it was my duty to help.

My father was very methodical and meticulous about raking leaves. He always had a large tarp that we'd spread out on a part of the lawn that was covered with leaves. "Don't rake onto a piece that you've already cleaned," he'd tell me. He would start in one corner and work in one direction, sweeping the area until there wasn't a leaf to be seen. He bought a gas-powered blower, the first one that I'd ever seen, that would speed the work and spare our hands the raking until we had a pile worthy of pushing into the tarp to be carried away.

After I went to college I didn't join him on Saturdays anymore. It's been too long - I can't pinpoint when he gave it up. Perhaps it was after my grandmother passed away. I never asked if the task fell to either of my younger brothers when I dropped the torch. I don't remember any of them joining us on Perryridge Road.

As I look back on it now, I like to think that I was chosen to go because I had the temperament for it. Maybe he liked doing it with me as much as I was proud to be chosen by him. It was something that I did with my father that no one else did.

Some kids went to ball games with their dad; I raked leaves with mine.

I still carry that experience with me to this day. I rake leaves the way he taught me. He would have been happy with my handiwork this weekend. At the end of a day of work - the sky red from the setting sun; the chilled air reminding me that it's the waning of another year; the dead silence at the end of a late autumn day - I think of my father.

Monday, November 9, 2009

When Everything Changed

I've finished reading Gail Collins' "When Everything Changed: The Amazing Journey of American Women From 1960 To The Present."

Amazing, indeed.

I've lived through the period described by the book, although I was awfully young for the earliest years. I remembered as I read, but having the changes spelled out so clearly was astonishing. Seeing how much has changed in such a short period of time, I had a feeling of disbelief as I read: "Did we really live like that? Is that what people thought back then?"

I can't fully identify because of my gender, but I can appreciate the difference as the father of two daughters. My sisters had to fight the good fight to go to college; my daughters grew up with the expectation that they'd go. Such a difference in the span of one or two generations.

Gail's writing style mirrors her columns on the editorial pages of the New York Times: part historian, part educator, part wry observer, all glued together by a dry wit. I happen to love it. I laughed out loud in places.

Of course I'll have my daughters read the book. It'll be a good lesson for them to see how their choices have expanded. I recommend it highly.

Sunday, November 8, 2009

jsMath: Typesetting Math In A Browser

I just became aware of jsMath, a JavaScript library from the Math Union for typesetting mathematics in a browser.

The content from the web site says it far better than I will, but it looks like jsMath was inspired by the slow adoption of MathML support in browsers running under Windows, Mac, and *nix machines.

The examples that the web site offers look beautiful. It's based on TeX, so it's no surprise that the results look so good. I didn't get a chance to dive into it this weekend. Unseasonably nice weather on the East Coast made it possible for me to clean up all the leaves that were covering my yard, so time to program was hard to come by. But I'll be looking into this gem soon. It's a nice complement to my recent rediscovery of LaTeX.

It amazes me to see how smart people can come up with things like this. It's also another example of the increasing reach of JavaScript. Brendan Eich's language is becoming more important every day.