17 August 2011

Scan of The Autobiography of WHD

Here, finally, is a PDF of Scan of the Autobiography of William Henry Donner.

It was quite an adventure trying to get Google (Blogger, Google Docs, Google Sites) to host a PDF without showing it in its own viewer. I ended up putting it up as an "attachment" on Google Sites and using a "Download" link in the management interface of Google Sites that I think/hope is actually usable by everyone.

You would think that sharing a PDF would be simple. Oh well, to err is human, to really screw things up requires a computer. I can't figure out whether this is Google's fault or, giving them the benefit of the doubt, somehow a result of their business strategy, which would somehow be impeded by easy hosting of PDFs viewed outside of their viewer.

Anyway, back to the content, I have definitely opted for content over form, inasmuch as those those two things can be separated.

In other words, this scan does no aesthetic justice to the original. I was concerned to keep file size small.

If you are fortunate enough to have access to one of the hundred copies of this book in existence, I highly encourage you to have a look. For the rest of you, here is the scan. At least I did the title page in color so you could get a sense of the use of red as well as black and I did the photo pages in gray scale rather than black and white.

I cropped the heck out of it so that a page contains pretty much only text. Though this ain't pretty, I thought it would make it easier to read in most programs on most screens.

There are lots of (small) blank pages sprinkled throughout; this is to make the PDF "just like the book," pagination-wise, including matching the content of what shows up int "two-up" viewing mode.

06 August 2011

Really different programming languages

If you have the luxury of time to learn a new programming language, here's my plug to learn a really different one. Though there is value in seeing a slightly different take on the same idea, like listening to a cover of a song, life is too short to spend time on that before you've exposed yourself to something really different.

Make sure you know what "really different" means, too. The popular discourse surrounding programming languages centers on what are really tiny differences. So you can easily get a false sense of what "really different" means. There's some truth to the idea that the brilliant success of our consumer culture is to make us think we have choice while in fact providing us with very little. That having been said, a language doesn't have to be unpopular to be really different, and of course not all unpopular languages are really different.

Some of the really different languages I've been exposed to were popular, but, importantly, not with people who consider themselves programmers. For instance, in my experience, languages used for musical applications tend to be really different. Perhaps I'll make another blog post to explore why this might be more than coincidental. But regardless, domain-specific languages are a good place to look for real difference.

I'll name a few, but these are just examples: my point here is not to promote specific languages. For music, Max. For signal processing and controls, Simulink and Stateflow.

Back to the category of good old general purpose languages for programmers, I'll give as examples Haskell, Prolog, and Erlang.

What is so important to me about Haskell is its purity. That is, its lack of implicit side-effects. Any functional language will open your eyes somewhat, and any language with type inference will do the same, but Haskell is the only one I know of that is pure. Laziness might be pretty hard to come by outside of Haskell, too. But to reiterate, because I want to be very clear on this point, I am not recommending Haskell. I am recommending being exposed to the big, really different ideas that Haskell represents.

Prolog and Erlang I myself have never tried, but they seem to represent big, really different ideas about programming, so I really want to try them, and I really want you to try them.

In closing, if you already know C++, try not to learn Java or C#. If you already know Ruby, try not to learn Python or Perl. In fact, if you know any of the languages I just mentioned, try not to learn any other of them. They're all object-oriented, imperative, textual languages. True, some are dynamically typed and some are statically typed. And true, the statically typed among them have different approaches to generic programming. And true, some have garbage collection and some do not. And C# has LINQ, which is interesting, and it has the capability to do things like LINQ, which is perhaps even more interesting.

Well now in my closing I've almost convinced myself out of my own argument. I guess I'll soften my argument to this, then: try to learn a really different language, but if you can't, when you learn a not-so-different language, focus on those features that are really different. As an extreme counter-example, I once saw a list of distinctive features of C# and it included easy quoting of strings with backslashes in them to make Windows paths feel more idiomatic. While I acknowledge that this may be of some pragmatic value, this is not the kind of thing that causes your mind to expand by learning C#.

Sorry to end on that negative note.

05 August 2011

Pleasant Software Development

During software development, I've often been tempted to say "you're doing it the wrong way." In a few cases, especially earlier in my career, I even gave in to temptation and said it. I may have even used a word considerably stronger than "wrong." I've certainly been tempted to.

I sometimes give in to a third-person form of this temptation by saying privately, "so-and-so is doing it the wrong way." I sometimes try to show a little self-awareness by saying, "I try not to frame things in terms of right and wrong, but in this case I can't resist saying that so-and-so is doing it the wrong way."

There are two problems with the idea of "the wrong way." One is that, to my continuing surprise, reasonable people vary widely with respect to what they think is wrong. The other is that even in those few cases where all reasonable people agree there is a wrong way, it is not productive to phrase it that way.

For the moment I'm only interested in the more common case, where there really is not a right and wrong, but it sure feels like there is. For that case, I've developed a bit of a mantra to calm myself down:
I can't say that this is wrong, but it sure is unpleasant.
This seems simple, or even obvious, but it had not occurred to me that I could validate my own feelings while still avoiding false and judgmental claims about what is wrong.

The reason I use the word "judgmental" is that the notion of "wrong" I'm trying to avoid has a moral dimension as well as a technical one. I care so deeply about these issues that I not only confuse truth with beauty, I also confuse technical and moral truths. Or, put another way, I confuse all three of the following things: what is right, what is righteous, and what is pleasant. I probably have something to learn from the Romantic poets, who I think struggled with such issues.

By reclassifying most things from wrong to unpleasant, I don't mean to to minimize their importance. Far from it. In fact, when you realize that you and your coworkers have a difference of taste, not a disagreement about what is right, that usually means it is time to walk away. Be civil, e.g. say goodbye, but walk away. You're not going to change someone's taste. At the risk of being over-dramatic, I think the Serenity Prayer is relevant here:
God, grant me the serenity to accept the things I cannot change,
Courage to change the things I can,
And wisdom to know the difference.
What do I mean by "walk away"? Maybe just end the conversation. But maybe it is time to look for another group at your company whose tastes are more like yours. And maybe, just maybe, it is time to move to a new company altogether.

Now for a final note on a big question: why are there so few facts about software development that most things come down to a question of taste? My gut reaction is that there are more facts out there to be learned, but it is very hard to study these questions. I mean no offense to those who study such questions, but I have to say I pay little attention to their results because I am inherently skeptical of them. They are doing that kind of work that is both really important and really hard.

It is perhaps telling that The Mythical Man Month is still one of the most important books about software development. I think the reason is both that it is a great book and that we haven't learned a lot since it was published in 1975.

Something I read claimed that computer science was still in its infancy and had not yet found its Newton. My initial reaction was "no, it has; Turing is its Newton." But then I got to thinking... Turing's greatest result is a negative one, about what computers can't do! Can that be analogous to Newton?

It is a fun debate to have, but to get back on topic, what I wanted to say was if computer science is in its infancy, then software engineering is positively embryonic.

I initially bristled when The New York Times told me that editorial policy prevented me from being listed as a software engineer in my wedding announcement, because editorial policy is that there is no such thing as software engineering. But then I got to thinking... Maybe those editors are really on to something. If usually all I can say is "It's not wrong, it's just unpleasant," am I an engineer?

Recycling may be garbage

I am skeptical of the value of recycling. But perhaps my greater concern is not whether recycling is worth it, but whether we can really have an informed debate about recycling and similar pressing issues in our society. Sadly, my guess is "no."

I think there are a lot of people who believe recycling is worth it and are not willing to question that belief. In that sense recycling has been one of the more dramatic successes of the environmental movement. In a short period of time, they've brought about big changes to people's behavior and governments' policies. It is all the more impressive that they've been able to bring about these changes despite unclear evidence of their value.

Maybe recycling will turn out to be like the profession of medicine: quickly popular and only eventually deserving of that popularity. Long before doctors could really help with much, they convinced society as a whole that they could help, and created a culture of clinics, hospitals, and general doctor-use and doctor-respect. Then society was all ready and primed when the time came (roughly speaking, the 2nd half of the 20th century) when they could actually start helping.

Anyway, back to the lack of questioning, perhaps it is telling that the best anti-recycling reference is still the 1996 New York Times Magazine article "Recycling is Garbage," by John Tierney. In other words, I would really have hoped to find more recent good mainstream references on the subject. Maybe there are, and I just haven't found them. Or maybe that was such a great article that there's no more to say on the subject. Or maybe it was so clearly wrong that no one else has bothered to pursue it. Or, most probable (and perhaps worst) of all, maybe questioning recycling is viewed as uninteresting or actually taboo.

Though they are in the minority, it is important to note that there are plenty of people on the other extreme; they believe recycling is not worth it and are not willing to question that belief. For instance there are a lot of frustratingly-conservative people who view any change with not just skepticism but derision and certainty of its foolishness.

What we really need, as always, are people who are in between, i.e. people who, regardless of what they currently believe about recycling, are willing to question those beliefs. We also need a few people who are equipped to perform the careful analysis of costs and benefits that is sorely needed. Plus they need to be equipped to communicate this analysis to the rest of us! The results of this analysis must be made as simple as possible, but no simpler. For example, I suspect the results of this analysis cannot be as simple as "it's worth it" or "it isn't."

I suspect that the costs and benefits of recycling vary greatly depending on things like the following. What materials are being recycled? Where is the recycling being done? How is it being done? How do you subjectively value some of the costs and benefits that are hard to assess objectively?

For example if in your area water is plentiful, that may lower the cost of water. Water is often used in both recycling and manufacturing from scratch. An expert could tell you which one uses more, but only you can say how much you think water truly costs. Perhaps you believe the market for water works perfectly and the true cost of water is the same as its market price. But I think not everyone feels that way. I certainly hope not.

Perhaps in your area water pollution is more costly than water use, or viewed by you as more costly. Then for you water pollution is more important than volume of water used. Perhaps climate change is your greatest concern; then CO2 emissions may trump anything having to do with water.

My point in these examples is that an expert can't be asked to say whether recycling is worth it. An expert can only be asked to say whether recycling uses more of various resources than manufacturing from scratch. Unfortunately it is up to you to decide the relative costs of those resources. What you really need then is not so much an expert but a person who you feel shares your values who has carefully considered the experts' more-or-less objective analysis.

In closing, I encourage you to Google for "Recycling is Garbage," since as far as I can tell it is the touchstone for all subsequent discussions of the topic.

P.S. I want to give a quick "shout-out" to a book I got from Greenhaven Press' Opposing Viewpoints Series, Garbage and Recycling. I see there is a new 2011 edition available. The whole series looks really great, and I think the U.S. would be a better place if kids read more stuff like this. Or, for kids who don't like to read, I recommend Morgan Spurlock's "30 Days" TV series, for non-polemic looks at some of our county's most important current issues.