Archive for the ‘Book’ Category

How to be a Programmer

Saturday, July 10th, 2010

If you are, or want to be, a programmer, you should read “How to be a Programmer: A Short, Comprehensive, and Personal Summary” by Robert L. Read. You can read it free, as PDF or HTML, or buy it as a paperback book for around $12.

It’s 41 pages long (plus appendixes including the GPL), so it’s not all that short. But it’s concise, simple, direct, and packed with extremely useful information that you won’t find anywhere else.

It includes some excellent advice about programming itself, but much more than just how to write code. For example:

  • How to Deal with Intermittent Bugs
  • How to Work with Poor Code
  • How to Deal with Difficult People
  • How to Stay Motivated
  • How to Disagree Honestly and Get Away with It
  • How to Know When to Apply Fancy Computer Science
  • How to Handle Boring Tasks
  • How to Gather Support for a Project
  • How To Tell People Things They Don’t Want to Hear

Based on my own experience, everything he says hits the nail right on the head. I do not have a single major disagreement with anything he says. (I have a few quibbles, and a very few points are dated, as it was written in 2003.)

Here are a few pieces of advice, so you can see what kind of thing he talks about:

  • When debugging, you may see things nearby that need improvement, but don’t fix those at the same time. (I make this mistake often; it’s just so tempting.)
  • If your system has redundant components so that if degrades gracefully, it’s especially important to have monitors that let you know that this is going on.
  • The way you interview a programmer will affect how much he or she wants to work for your company.
  • At the end of doing a job interview, sell your company. But you are talking to a programmer, so don’t color the truth. Start off with the bad stuff, then finish strong with the good stuff.

Everyone has missed deadlines because they neglected to include all the factors that contribute to the time it takes to complete a task. Here’s a checklist compiled from various sections of the essay, that you might want to use:

  • Documentation
  • Unit testing
  • Integration testing
  • Demos
  • Planning itself
  • Internal team meetings
  • Communicating with other groups
  • Dealing with outsiders
  • Vacation time
  • Sick time
  • Mandatory company-wide training seminar
  • Scheduled periodic activities
  • Maintenance of existing products
  • Maintenance of the development environment
  • Some failure
  • What part will each which individual work on
  • Problems that cannot presently even be conceptualized

Make the time in your schedule to read this!

Coders At Work, by Peter Seibel

Sunday, November 15th, 2009

In his new book, Coders at Work, Peter Seibel interviews some of the best software developers in the world, asking how they work, what practices they follow, how they learned, and what advice they can offer. Because Peter is, himself, an experienced senior software developer, he knows most relevant questions to ask, the ones that have to do with how real programmers do their work. He engages in a real back-and-forth conversation rather than just presenting a questionairre. You feel like you’re sitting there with them, as he asks all the same questions you’d want to ask if you were there yourself.

How do you you find the best programmers? He ran his own little contest: he got a lot of nominations, and people voted. I am confident that this worked, because a lot of the people he interviewed are people I know to be among the best. I know Guy L. Steele Jr and L Peter Deutsch, and consider them two of the very best in the world. Most of the others I have heard of.

Peter is also the author of Practical Common Lisp, the best book to read if you want to write real programs in Common Lisp. His understanding of the language and its deep concepts are second to none. He has also done advanced software development at several companies, including BEA Systems and Kenamea. Having that kind of experience lets him ask probing and relevant questions that reveal what’s really interesting about how the interviewees work and think. There’s no other book like it.

How To Invest

Thursday, July 9th, 2009

Have you been looking for a good book about how to invest your money?  I have a big collection of such books, but most aren’t required reading.  Here’s my short list for anyone who has recently become interested in personal finance and investing.

First, read “The Only Investment Guide You’ll Ever Need; Expanded and Updated Throughout” (the latest edition) by Andrew Tobias, for the Big Picture of personal finance.  This takes the wide-angle view about how to deal with money.  In particular, it will help answer your first issue about investment, namely, how much money should you be investing in the first place?  It’s very easy and fun to read; Tobias is about as engaging a writer as you could imagine.  If you can’t get this edition, get the “Revised and updated”, probably almost as good.

Second, read “Unconventional Success: A Fundamental Approach to Personal Investment”, by David F. Swensen, 2005. This book answers your second question: given how much I’m going to invest, how much should I put into each asset class.  The book points out that deciding how to divide your money among asset classes is the most important investment decision you can make.  It’s something you can control and customize for yourself.  Security selection and market timing are much harder games to win, especially since you’re playing a zero-sum game against people who spend their entire lives doing nothing else.

He also explains why most mutual funds are bad news, and how to find the ones that are good news. In particular, pay attention to his high recommendation of Vanguard, which explains clearly why they’re so great.  I take this opportunity to thank John C. Bogle and Burton Malkiel, the individual investor’s best friends, for creating Vanguard and its valuable and innovative products.  (I have no connection with Vanguard at all; I’m just a satisifed customer.)

Swensen goes over a wide range of asset classes (different kinds of stocks, bonds, real estate, as well as exotics like hedge funds and venture capital), taking a hard look at each one and why you should or should not invest in them.  It’s written somewhat dryly sometimes, but it’s well worth reading anyway.

You can stop now; you’re all set.  However, if you insist on being interested in security selection, or just like this stuff (I do):

Your third book is “A Random Walk Down Wall Street” by Burton Malkiel.  Be sure to get the latest edition, as Malkiel carefully updates this book periodically; there is a Ninth Edition coming out soon (so the hyperlink above might not be the best one; look around).  Before you think about security selection (e.g. deciding which stocks to buy) you must, must, must understand the concept of efficient market (random walk) theory.  Markets are not efficient, but the best way to look at them is to start with the model of an efficient market and then look at how real life differs from that.  Malkiel covers some of the same ground as the first two books, with his own take on the issues.  Very readable and fun, just like Tobias.

In earlier editions, Malkiel proposed the concept of index funds: a mutual fund that would never underperform the Standard and Poor 500 because it would actually invest in the Standard and Poor 500!  This was such a good idea that it was implemented, and nowdays you can find index funds for all kinds of indexes.  The management fees (which matter a lot to you) are very low, since the buy/sell decisions are pretty much automatic.  Google for “bogle malkiel” for more about all this.

Here are some others, but please read the above three first and only go into these afterward:

“What Works on Wall Street” by James O’Shaughnessy, 1997.  (Thanks to Rick Tompkins, who told me about this book about ten years ago.) A hard and scientific look at how stocks have behaved in the past, and what stock selection strategies have worked over the very long haul.  Lots of data but quite easy to read and understand.  I have read many of the source materials of this kind, such as articles in the Journal of Financial Analysis (it’s so great that anyone can walk right into the MIT libraries!), and everything he says is consonant with the best research, as best I can tell.  If you are convinced, there are mutual funds based on his principles, formerly the O’Shaughnessy funds, currently known as the Hennessey Funds (Cornerstone Growth and Cornerstone Value), in which he puts his money where his mouth is.  I did very well with one of these for some years. However, the big problem is that it’s not clear that the strategy still works.  Things change, and the record of their funds has not been so great lately.

“The Intelligent Investor” by Ben Graham, the classic 1949 book on value investing.  A lot of the details are no longer up to date, but it’s a good explanation of the concept of value investing.  Warren Buffet, currently the world’s second richest man, was Graham’s principal disciple.  I think the biggest problem with following his advice is that these days, accounting allows so much adjustment of “income” that the “bottom line” means a lot less than it used to.  (See Jack Welch’s record of steadily-increasing quarterly earning at General Elecric for quarter after quarter; I mean, come on!)

If you get through those and want to know more, tell me what you want to know more about and I’ll recommend more in the comments.  Please add comments with your own favorites, along with explanations of why they’re worth reading to someone who has read the above books.  Thank you!

The Amazon Kindle: We Like It Very Much

Saturday, January 17th, 2009

This summer, my family went to Ecuador.  On the Galapogos cruise, you have a very tight budget for luggage.  Normally we bring lots of books on vacation, but this time there was no way.  The Kindle was the obvious solution.  I bought one, we tried it, and we got a second one.  There were three of us including my son, Adam (age 17), so there was some contention; fortunately we did bring a few print books.

My wife, Cheryl, although she uses PC’s all the time, generally hates gadgets.  But she loves the Kindle and uses it very heavily, even now that we’re back.  I like it a lot too, and if I had time to read more books (argh!) I’d use it a lot too.

The eInk technology is amazing.  It’s far easier to read a book on a Kindle than on a computer screen.  You can control the font size.  Those of us old enough to need reading glasses, and to forget where we put them (sigh), can read fine with the large type size.  You can’t change the font, but I don’t care. You can plug in earphones, and there’s also a tiny speaker.

About half of the new or new-ish books that I go to buy are available for the Kindle.  When they are, that’s what I buy.  Kindle books from Amazon are also less expensive.  I typically pay $10.  You can get a rather extensive free sample of the book, to see if you like it.

You can get quite a few out-of-copyright books in Kindle format from various sources on the web.  I have the complete works of Herman Melville.  Cheryl, who is an English major specializing in 19th century fiction, has quite a lot more.  It’s all entirely free.

There’s plenty of memory, and I put in an SD card so there’s now vast amounts of memory, in effect, since an eBook is pretty small.  You can also download audio (Cheryl sometimes uses this), which takes a bit more space, but with the SD card, there’s no space limit in practice.

It can go for a long time without charging.  We only had to recharge every five days or so; obviously this depends on how much you use it.  The user interface is good, although not perfect: the buttons for moving forward and back are nice and big, but they are so big that you can’t always grasp the device the way you’d like to.  But it’s not a big problem.  If you’re eating at a table, the Kindle takes a lot less space than a hardcover or trade paperback book, and you don’t need to hold the pages open.  After the vacation, We both got nice third-party cases (Tuff-luv) that let you stand up the Kindle like a desktop photograph frame, but that’s not necessary.

You can annotate text; the keyboard is small and there isn’t any word processing (much like the Notes application in the iPhone), but for its purpose it’s OK.  You buy books from the Kindle Store over the “Whispernet”, which is actually the Sprint cell phone network, but you do not pay anything for this (no “data plan”, no subscription charges at all).  It works very well.  There’s a dictionary so you can look up words you don’t know.  There’s a “search” function, although unfortunately is searches all your books; there’s no option to just search one of them.

There are three “experimental” feature:

  1. Basic web browser. It’s pretty basic, all right, but you can do some useful things in it, if you really don’t have any other way to get to the web.
  2. Ask Kindle NowNow. Itlets you send any question to Amazon, where someone will do their best to answer it and send you back an answer.  Their operators just do web searches, and are supposed to get back to you in ten minutes.  I have not tried it.
  3. Play music while you read. Copy MP3 files to the Kindle.  I haven’t tried this either, since I don’t listen to music while I read, but I’m confident that it works.

To transfer files to the Kindle (if you’re not just using the store), you plug a cable into it.  The other end is a normal USB. The Kindle appears as a device with three directories: books, audio books, and MP3′s. You just copy in the usual way. It’s very simple.

The Kindle does not support PDF directly.  However, there are ways to read PDF files:

  1. You can send email with attachments to <yourself>*free.kindle.com to be converted and emailed back to your computer at the email address associated with your Amazon account.  Then you can do a USB transfer.  Or, they’ll send it straight to your Kindle for ten cents.
  2. MobiSoft’s “MobiPocket Creator” converts PDF, Word, HTML, and plain ASCII to Kindle format, and does all sorts of other cool things.  It’s free. I haven’t gotten around to trying it yet.  See .  You need Windows, and Internet Explorer 7 beta 3.  When you install it, click on “publisher edition (for advanced users)”.  It’s not clear how well it works for very complex PostScript, or for PDF files with things like scanned pages.  Google “Kindle PDF” for even more on this topic.  There’s an application called “Stanza” for the Mac.

Objections I’ve Heard
Here are some objections I’ve heard raised about the Kindle, and my opinions.

  • It’s not “open”; that is, you can’t program it. The Kindle is not a computer.  It’s an appliance.  I can’t reprogram my digital watch either.  This just does not bother me.
  • eInk can’t be backlit, so it’s hard to read in dim light or the dark. That’s true, although it’s also true of ordinary books.  It would be nice if they could improve this somehow.
  • It’s hard to share a copy of a book, other than by sharing the reader. Actually you can move a book to the SD card, and move that to another Kindle.  It’s not hard.
  • Pictures do not render well. That’s true.  What’s more, at least one book we read was supposed to have a map that would have helped the reader understand the book, and the map was entirely missing.
  • You might lose your Kindle, and it’s not cheap to replace, although you do get all your data (books, your own annotations) back from Amazon.  That’s true, just as it is of my notebook computer.  This complaint really has to do with the whole concept of ebooks versus print books, not the Kindle specifically.

And Also

I am not a real Kindle expert; I don’t read the blogs or anything.  There’s a great deal more information available at Amazon and many web sites.  One good one is “Top 25 Kindle Tips“.

I have not tried the Sony reader or any other book reader.  There are rumors about a second-generation Kindle coming out, but I don’t know anything about it.

Summary: It’s excellent.

Notes on the book: Supercapitalism

Sunday, January 6th, 2008

Supercapitalism: The Transformation of Business, Democracy, and Everyday Life, by Robert Reich, is the most interesting book on the American government and how it relates to our lives that I’ve read in a long time.

In a nutshell, the thesis is: “Capitalism has become more responsive to what we want as individual purchasers of goods [and investors], but democracy has grown less responsive to what we want together as citizens.” “Democracy means more than a process of free and fair elections. Democracy, in my view, is a system for accomplishing what can only be achieved by citizens joining together with other citizens–to determine the rules of the game whose outcomes express the common good.”

He makes what I consider an extremely cogent, well-written, and persuasive argument to support this. He explains why it happened, focusing on the history of the American economic and governmental structure starting in the post-War era (the fifties), and showing how major changes started in the Seventies and continued to the present.

He offers explanations for:

  • Why CEO pay has soared into the stratosphere and what prevented it from soaring before
  • Why inflation has become less of a threat than it was three or four decades ago
  • Why antitrust laws are less important today as a means of restraining economic power than they were previously.
  • Why there are so many more corporate lobbyists and lawyers in Washington, D.C.
  • Why politicians demand that companies be “patriotic” and put America before other nations
  • Why a bigger fuss is being made over corporate philanthropy when corporations were never set up to be charitable institutions
  • How someone can fret about the decline in hourly wages and simultaneously hunt for the best deal from China or India, which is often at the expense of an American’s wages or even job.
  • How someone can lament the decline of independent retailers on Main Street while at the same time do most of their shopping at big-box retailers and online.
  • Why a person who is deeply concerned about global warming might nonetheless buy an SUV
  • Why politicians like to publically excoriate CEOs but then enact no laws making what they did illegal
  • Why the move toward improved corporate governance makes companies less likely to be socially responsible
  • Why the promise of “corporate democracy” is illusory
  • Why the corporate income tax should be abolished
  • Why companies should not be held criminally liable
  • Why shareholders should be protected from having their money used by corporations for political purposes without their consent
  • Why large companies have less economic power now than they had three decades ago
  • Why the immense increase in corporate lobbying is due to a decrease in the market power of the corporations

You may be thinking about some of these points: “Oh, it’s obvious why.” But Reich’s explanations are often not what you’d expect.

None of this happened because of Ronald Reagan or Margaret Thatcher; the trends were clearly under way before they came to power, and the same trends can be seen in other countries to some extent. Neither were they caused by heroic or villainous CEOs; the changes are structural, not personal.

“The executives of Wal-Mart or any other large company are not brutally insensitive or ruthlessly greedy. They are doing what they’re supposed to do, according to the current rules of the game–giving their customers good deals and thereby maximizing the returns to their investors. Just like players in any game, they are doing whatever is necessary to win. But just as all games require rules to define fair play, the economy relies on government to set the economic ground rules. If government wanted to do something about the means Wal-Mart employs, it could change the current rules. In theory, it could enact laws to make it easier for all employees to unionize, require all large companies to provide their employees with health insurance and pensions, enact zoning regulations to protect Main Street retailers from the predations of big-box retailers, and raise the minimum wage high enough to give all working people a true living wage. All such measures would have the likely effect of causing Wal-Mart and other large corporations across the board to raise their prices and reduce returns to investors.”

Reich is not especially advocating that government should do these things. His point is to show what could happen, and why things are happening the way they are. He would like there to be more public conversation about whether or not to make these kinds of tradeoffs. The last sentence is “The first step, which is often the hardest, is to get our thinking straight.”

The writing style of the book is simple and direct, and fun to read. He has a lot of supporting facts and figures as well as good illustrative stories.

I believe that his overall point is extremely valid, and provides a useful framework for thinking about the vital issues of our economy and our government.