I am considering holding my own Funeral of Trite Ideas to bury some friends from our introductory computer science courses. Here are the friends I will invite:
Animal hierarchy used to introduce inheritance, and maybe his buddies Shape, Vehicle, and EmployeeSome of these friends are reasonable computations but are just overdone. Others are too contrived and don’t adequately illustrate the computational need.
Let me know if I should invite anybody else.
]]>Last summer we were reading the fifth book in the series. It ends with this challenge to complete a code snippet that draws a triangle, square, pentagon, hexagon, heptagon, and so on, up to an 18-gon:
My son Lewis said there was a bug in the provided code. Sure enough.
Can you spot it?
make "nsides (nsides + 1) needs to moved inside the repeat loop. As it stands, the completed code would draw a triangle 18 times.
I follow Gene Luen Yang on Twitter, and I suggested that Lewis message him to report the bug. Lewis did, and to our delight, Yang responded:
But that wasn’t all. Yang sent Lewis a copy of the book with this inscription:
Social media is the place where our heroes are made real. Thanks, Gene Luen Yang, for your passion, books, and investment in my son!
]]>Despite my interest in the Japanese language and culture, I am a fake for at least a couple of reasons. First, I have no interest in sushi. Second, I have watched very little anime.
I’ve been trying to rectify the anime situation. The modern stuff is fascinatingly different. But I’ve not been able to stomach the earlier classics like Akira. I don’t need dystopia and violence at this stage of my life. I’m trying to raise kids that haven’t lost all hope.
We just watched Ghost in the Shell this past weekend. I’m not better off having watched it. However, there’s one scene I haven’t been able to get out of my head. This one:
What I find most fascinating here is that the man is typing on a traditional keyboard. Instead of increasing human performance by improving the interface to technology, he has improved himself to adapt to the interface. 100% of the movie is an exploration of human augmentation, and I think this scene captures our myopic zeal to fix our “bugs” rather than the situation that manifests them.
]]>I won’t go into any of the book’s merits. Rather, I will focus on one non-essential part of it that has been bothering the computer scientist part of me. Consider these selections from the early chapters:
My mother…took the three of us to Horne’s and had us sit for our portrait. The photographer told her that all portraits taken that month would be entered into a contest for a Kodak camera and a lifetime supply of film and processing…
Three weeks later, when a package arrived for my mother, we were astonished to find that it contained both our portrait…and the news that we had won the camera. It was also enclosed, along with a dozen spools of film to get us started and some special envelopes for sending them in to be developed…
Every time the photographs came back to us, there were two fresh rolls in the package. Kodak keeping its word.
Let’s think about that replacement strategy for a second.
The book gets its title from the pits that hunters dug in the woods to trap wolves decades earlier. Pretty soon, Annabelle and her family will be the ones buried alive—by film canisters.
]]>
As a software developer, the highlighted sentence puzzles me. As a human, the highlighted sentence puzzles me. The implication is that the report was incorrect because it was made by a human.
Software is also made by humans. In fact, nobody would have been surprised if the sentence had read, “… the time of 9:59 PM came from a hotel report that was created automatically and was not accurate.”
]]>It’s probably one of those new Tesla trucks, given its builtin navigation buttons.
]]>This past week I gave them this snippet:
public static double ?(double x, boolean b) {
if (b) {
return x;
} else {
return x * 1.055;
}
}
After giving them time to consider the code, I asked, “What’s a better name for this?” Answer 1: returnX. Answer 2: pinocchio. Answer 3: addSalesTax. No more answers. We went back through these suggestions and discussed their relative merits. Answer 1 didn’t provide any semantic meaning and wasn’t always completely true. Answer 3 was appropriate. Our local sales tax is 5.5%, but not all items are taxable.
I asked the student who offered the pinocchio answer to explain himself. Certain that he was being silly, I was leveled by his justification: “Everytime the expression is false, x gets bigger.”
Computation’s chief strength is that through it we can mechanize human logic. When our thinking fails, the computer fails with us. In every field, we see that the more data we have, the more we have to summarize. We consider central moments, we extract principal components, we make wordles, we weight and sum to get down to a single scalar value. The complex plane is too complex. Give us a number line. We can make judgments there.
Juan Luis Borges considered our desire to “overmodel” in his short story (one paragraph short) On Exactitude in Science, translated by Andrew Hurley and ©Penguin 1999.
On Exactitude in Science . . . In that Empire, the Art of Cartography attained such Perfection that the map of a single Province occupied the entirety of a City, and the map of the Empire, the entirety of a Province. In time, those Unconscionable Maps no longer satisfied, and the Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and which coincided point for point with it. The following Generations, who were not so fond of the Study of Cartography as their Forebears had been, saw that that vast Map was Useless, and not without some Pitilessness was it, that they delivered it up to the Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is no other Relic of the Disciplines of Geography.
Suarez Miranda,Viajes de varones prudentes, Libro IV, Cap. XLV, Lerida, 1658
Data is not powerful enough to put a dent in our superstition and intuition. Data doesn’t say what’s good and what’s bad. I’m more impacted by a good piece of historical fiction than a social studies textbook. I’d rather develop emotions than crunch numbers.
]]>So I went to work, and here I must needs observe, that as reason is the substance and original of the mathematics, so by stating and squaring everything by reason, and by making the most rational judgement of things, every man may be in time master of every mechanic art. I had never handled a tool in my life, and yet in time by labor, application, and contrivance, I found at last that I wanted nothing but I could have made it, especially if I had had tools.
According to Defoe, the ingredients needed to make a computer scientist are reason, time, and willingness. I agree.
When I put my cursor into my code, the question I ask myself is, “What is true here?” Then I ask, “What do I want to be true after this line of code?” Then I type in the transformation, a process which has definitely gotten easier over time. These little transformations compound into big transformations, and the reward of a finished product is enough to keep me coming back.
]]>