Sunday, January 22, 2017

What makes a good programmer? Or an enjoyable career in programming?

Going through my old magazines, I found What Makes a Good Programmer? by Cegielski and Hall. My nephew is considering a career in software, so I cut it out from my dead-trees issue and brought it with me on a visit. The article is rather academic, and in my mind the title is a bit ambitious. Here's the short version.
Students who took a course in object-oriented programming were given psychological tests before the course began, and the test measurements were compared with their performance in the (16-week) class. The authors concluded that three psychological factors correlated well with student performance in the OO programming course:
  • Theoretical value belief, a personality trait that values proof during the problem-solving process. Basically, theoretical value belief means you think the scientific method (form a hypothesis, run experiments to test your hypothesis, etc.) is worthwhile; you don't put much weight on ideas that aren't proven.
  • Cognitive ability, basically you're smart enough.
  • Personality, and these traits in particular:
    1. High self-esteem
      basically you think well of yourself. This might be important if, when you face a problem, you think you're smart enough to figure it out (rather than give up).
    2. High self-efficacy
      meaning you believe you can apply the resources needed to push through challenges.
    3. "Locus of control"--
      you see yourself as being able to make things happen; you don't see yourself as just a victim of circumstance.
    4. Low neuroticism
      meaning you don't focus excessively on negative aspects of yourself.
The authors had some assumptions, which have escaped me, but I think the surprising thing was that theoretical value belief was a better predictor of OO programming performance (in the class anyway) than raw cognitive ability.
Naturally I have a few comments on the article. Although performance in an OO programming class is easier to measure than success in a multi-year programming career, it really is a different thing. Come to think of it, studies have been done on longevity—comparing for example the proportion of male and female programmers who are still in the field N years after graduation, and so on. It might be interesting to correlate that with the psychological parameters mentioned in the 2006 article.

And as I mentioned to my nephew, one thing that wasn't studied, but makes for an enjoyable career in programming is, well, enjoyment of the programming process! This includes analysis, design, coding, testing, debugging, and documentation.

I obviously enjoy the craft; my latest recreational thing has been hacking a Python script to solve the soma cube. (I hesitate to mention this because you really don't have to enjoy it that much, really…) I was quite pleased to find that my script found 240 unique solutions. But that's already more than you wanted to know.

I also obviously enjoy writing about programming and debugging, too, as shown in this 2014 blog post about a freebsd kernel panic and other posts related to computers.

Oh, and this post from last August about my life as a computer guy.

Saturday, January 21, 2017

Why follow God if he doesn’t guarantee health or wealth?

During a spiritual conversation, I happened to mention that God doesn’t guarantee career success or wealth or health or those things people often call “the good life.” He said, “Then why should I follow God?” I emailed my answer, a trimmed version of which follows.
Dear Luke,
I’ve given more thought to your question, “Why follow God, if there’s no guarantee that things will go well?” We already talked about the inevitability of certain problems and the uncertainty of life, but I remembered this passage.
I have seen something else under the sun:
The race is not to the swift
or the battle to the strong,
nor does food come to the wise
or wealth to the brilliant
or favor to the learned;
but time and chance happen to them all. 
Ecclesiastes 9
There is no course of action that guarantees wealth, health, happy children, etc., but I can do things that make those outcomes more likely: love my wife (Ephesians 5), not exasperate my children (Ephesians 6), listen before speaking (James 1) and so on.

But the main thing I want to emphasize is the passage which says that in all things God works to make us more like Jesus (Romans 8:28-29). Just a simple example: suppose I was getting killed by a bunch of people. That happened to Jesus, and he prayed, “Father, forgive them, for they don’t know what they’re doing” (Luke 23). Or, back to Ephesians 5:

Husbands, love your wives, just as Christ loved the church and gave himself up for her to make her holy, cleansing her by the washing with water through the word, and to present her to himself as a radiant church, without stain or wrinkle or any other blemish, but holy and blameless. In this same way, husbands ought to love their wives as their own bodies. He who loves his wife loves himself. After all, no one ever hated his own body, but he feeds and cares for it, just as Christ does the church—for we are members of his body.
So, I want to be like Jesus, who gives his life for the church; who prayed, “Father, forgive them.” Sure, it’s nice to be rich and to have a good job, etc. But when I die, will I be happy to see God?

Will I hear him say, “Well done, good and faithful servant”?

Will I have real life (Jesus said in John 17: This is life eternal, to know the only true God, and Jesus Christ, whom he sent)?

If I say I want that, then I’ll want to follow him today.

Sunday, December 18, 2016

How is Jesus Christ the Savior? How does he save?

This time of the year, many of us sing or speak of the birth of Jesus Christ the savior. O Holy Night begins with these lines:
O holy night,
    the stars are brightly shining.
It is the night
    of the dear Savior’s birth.
One verse of Silent Night has a verse which ends: “Christ the Savior is born; / Christ the Savior is born. ”

Even a television show, A Charlie Brown Christmas, broadcast annually for the past half-century, includes an excerpt from Luke’s gospel:

8And there were in the same country shepherds abiding in the field, keeping watch over their flock by night. 9And, lo, the angel of the Lord came upon them, and the glory of the Lord shone round about them: and they were sore afraid. 10And the angel said unto them, Fear not: for, behold, I bring you good tidings of great joy, which shall be to all people. 11For unto you is born this day in the city of David a Saviour, which is Christ the Lord.
So what do we mean when we speak or sing of Christ the Savio(u)r?

Thirty or even twenty years ago I probably would have spouted some evangelical jargon about what happens after you die, the summary being that because of Jesus, your eternal soul’s prospects can be good rather than bad.

Today I think I’d begin instead by talking about life here and now, because that’s what Jesus spoke mostly about. The short version would be that by following him, I can live a fruitful, meaningful life and become a good (well, better anyway) person. After explaining a bit more about that, if by then you don’t think I’m a total whack job, I might mention the hope that I can be with him in the world to come.

I might begin like this. You can read a lot these days about paths to success. Recent articles on Linkedin and in print media describe ways to appear more competent or intelligent. The power of such suggestions comes from the nagging doubts we have: Am I really okay? If I do these things that make other people think I’m competent and intelligent, maybe that will quell my own fears.

Such doubts also energize advertisements: maybe I can feel better about myself if I have these gadgets or clothes or this car, or if I live in this neighborhood. And maybe I can overcome my doubts about parenting if my kids get these grades or go to these schools.

These doubts, these insecurities, can poison my life and my relationships. Maybe I’ll pressure my kids to go to absurd lengths in pursuit of some name-brand school; maybe I’ll try to enhance my self-esteem by taking on a mortgage I can’t afford, or spend so much on cars or clothes or gadgets that my family faces constant financial stress.

About those kids: maybe they’ll rebel against the pressure; maybe they’ll crack; maybe they’ll buy into my anxieties and make them their own. So that when they’re at that name-brand school—or even if they aren’t—they’ll contantly wonder, “Am I okay, really? Am I good enough?” That way my destructive legacy can live on—not a happy prospect.

What I’ve described is a kind of life that we need saving from, and by “we” I mean people like you and me. So how can that happen? How can you and I escape the pressure brought about by our doubts and insecurities?

The promise of salvation in Jesus Christ begins, for me at least, with the knowledge that I’m forgiven. Consider that famous verse from John’s gospel, “God loved the world so much that he sent his only son, that whoever believes in him will not perish, but have eternal life” (John 3:16). I’ll write more about eternal life in a bit; let’s consider the word “perish.”

When I think about “perish,” the image that comes to mind is an overripe banana. Now that’s perishable! In a way, all of us are perishable in the way that a banana is; one day, you and I and everyone we know will get to room temperature, and unless our bodies are burned or something, they will all rot.

There’s a picture, then, of a useless life: we live, we accumulate possessions, we become room temperature, and our bodies are burned or buried. That’s “perish.”

About “believe”: What does it mean to believe in God’s Son? What must we believe when we “believe in” him? Among many things said of Jesus in the gospels, the claim that he takes away sins is pretty important. In John 1:29, John the Baptist refers to Jesus as “the Lamb of God, who takes away the sin of the world.” I’ve written about this elsewhere (also here) but the short version is that unless we believe his promise enough to act on it, then it won’t have much of an effect on our lives.

In other words, it’s not magical in the sense that if I say some special phrase, the gods are compelled to do something; it’s more like if I’m hanging off a cliff by my fingernails and someone dangles a rope in front of me, the rope won’t do me any good unless I believe in it enough to grab it. The promise of forgiveness in Jesus doesn’t do me any good if I’m trying to find redemption through buying a bigger house or more toys, or by pressuring my kids to get better grades to get into a better school, or by looking smarter or more competent. I’ve got to accept forgiveness and stop my frantic pursuit of the false promise of so-called “success,” or I’ll continue to poison my life and relationships…

OK, now about eternal life. I don’t quite understand what form our immortal souls take, or what the world to come is about, but the New Testament authors make quite a big deal about it—almost as big a deal as modern evangelicals do!

All kidding aside, though, something I think of is the promise from 2 Peter 1, which talks about adding knowledge and other virtues to our faith; in verse 8 he writes “For if these qualities are yours and are increasing, they will render you neither useless nor unfruitful…” Let me invert that and say that we can be fruitful and useful with the qualities he mentions: faith, knowledge, goodness, brotherly kindness and so on. The point I want to make, though, aside from those qualities, is the goal of all that, viz., to have a fruitful, useful life.

If my life is fruitful and useful, then the effects will remain after I’ve left this earth. Which may not be eternal life exactly, but would, I hope, be better than having a life whose effects all perish with my corpse.

And that in the end is what I want to be saved from: a life that ends when the undertaker’s bill is paid off. And that’s what Jesus saves me from: by assuring me that my sins are forgiven, he makes it possible for me to become something useful, rather than the alternative of poisoning everything in a wrong-headed attempt to escape my demons.

Wednesday, December 14, 2016

How do you vote?

Frederick Buechner, in his marvelous Secrets in the Dark, recounts a few incidents of the kind Christians like: he receives strange encouragement in a time of stress; an odd phenomenon occurs after a departed friend appears in a dream—this sort of thing. Then he asks us how we would vote on the second most important philosophical question:
On Yes, there is God in the highest, or, if such language is no longer viable, there is Mystery and Meaning in the deepest? On No, there is whatever happens to happen, and it means whatever you choose it to mean, and that is all there is?
Buechner, p. 171sq.
Actually he used the word “bet” (rather than “vote”) but he points out that we actually bet our lives.
We may bet Yes this evening and No tomorrow morning. We may know we are betting or we may not know. We may bet one way with our lips, our minds, our hearts even, and another way with our feet. But we all of us bet, and it’s our lives themselves we’re betting with in the sense that the betting is what shapes our lives. And we can never be sure we’ve bet right, of course. The evidence both ways is fragmentary, fragile, ambiguous. A coincidence can be, as somebody has said, God’s way of remaining anonymous, or it can be just a coincidence. Is the dream that brings healing and hope just a product of wishful thinking? Or is it a message from another world? Whether we bet Yes or No, it is equally an act of faith.
op. cit., p. 172
Indeed, it’s not that Yes takes faith and No takes only courage and reason; it takes just as much faith to vote No as Yes—I might argue it takes more. Bertrand Russell had a lot of faith to bet No, as he expressed in a famous essay:
Man is the product of causes which had no prevision of the end they were achieving; that his origin, his growth, his hopes and fears, his loves and his beliefs, are but the outcome of accidental collocations of atoms; …
I confess mixed reactions to Russell’s view. On one side, if he’s right, then (as the Bible says) “Let us eat and drink, for tomorrow we die”; I can ignore my conscience and exploit anyone for any reason, or no reason …

But Kant says that’s not philosophically consistent, and Mill argues in the generalized version of utilitarianism that it’s a bad idea. Practically, one might feel the need to buy a lot of guns, because if everyone thought and acted that way, it would be like a Wild West sans law enforcement.

But I see two more big problems with Russell’s way of thinking. First, if someone sincerely holds those beliefs, and lives accordingly, what kind of life do they have? What kind of person do they become, if they think that your hopes and fears, your loves and beliefs, are but the outcome of accidental collocations…? A brief thought-experiment tells me that I don’t really want a life like that, and that I don’t want to be around anyone who lives that way either.

Another big problem is, as Lewis wrote, “If thought is the undesigned and irrelevant product of cerebral motions, what reason have we to trust it?” Indeed, Russell claims to be a random text generator, but I don’t actually believe him.

Back to the first question: how do you vote on Buechner’s question? Yes, there is some kind of real meaning in life? Or No, things just happen, and they mean whatever you choose them to mean?

Monday, December 12, 2016

Science and Faith (not by Mary Baker Eddy)

Yesterday's talk on "Science and Faith" was enlightening. A key insight was that some study science for many of the same reasons that some study faith. These sets overlap, as in the case of our speaker, Bishop Katharine Jefferts Schori, an oceanographer and former presiding bishop of the Episcopal Church. (I'll not comment on Jefferts Schori's theology, except to say it came up only peripherally in yesterday's talk.)

So why do people study science? And faith? For one thing, they (we) are inspired by wonder and a desire for understanding. We bring passion to our study: a love of beauty and excellence. An elegant theory is a beautiful one, in both fields.

Both science and faith have history and tradition; both are done in community. And in both fields, advancement comes from questions. (Questions can also bring trouble, which occurs to me just as I type these notes.)

Change is often resisted by the community, but if the community is healthy, new ideas are evaluated according to their merits. The Bereans, for example, upon hearing new ideas from Paul and Silas, judged these ideas for their content, rather than on their political implications (Acts 17:11). Contrast this with the reactions of the Thessalonians in Acts 17:5-7.

Science, too, has good examples and bad. The good examples we consider normative and typical, as we'd like them to be. But bad examples abound. Think of Semmelweis and hand-washing, Galileo and his debunking of Aristotle, or the chilly reception the Big Bang theory got in the previous century.

So religion and science have more similarities than I'm accustomed to think. This puts me in mind of a class Carol and I took some time back, "Encountering the World of Islam," where a key insight for me was that there are a lot more similarities than differences.

Differences there are, to be sure—fundamental differences in fact. But similarities abound. In science and faith, in Islam and Christianity, there are good characters and bad, those motivated by truth and those motivated by self-interest. Well, that's a bit simplistic; we all have mixed motives, but some are more willing, perhaps more able, to accept truth when it surprises them.

Math == Theology?

During the Q&A period after the talk, a man across the room said that with new ideas in science, we can test them via evidence. If people can run experiments similar to yours and get similar results, they can confirm the theory. But for theology, where's the evidence?

The bishop replied that there's the evidence of a life well-lived, but that the time scale is quite different.

But I was stuck on the idea of running experiments. You can run experiments in physics or chemistry or even psychology. Neuroscience. But mathematics? (I studied math in college.)

A mathematical proof is an argument by which you try to force the other guy to accept your claim. Well, all scientific proofs are, I guess, but you can't run math experiments very easily; you appeal to past results, you apply axioms and rules and theorems to one formula to get another, and someone can say you've made an incorrect inference, if you have. But there's no experimenting.

And theology? God doesn't necessarily cooperate with any experiments. You want a control? God won't be controlled.

Postscript: Questions

Jefferts Schori mentioned that advancement comes through questions, and it occurred to me while typing that questions sometimes bring trouble. We see this in Genesis 3, where an accusation comes in the guise of a question—a question asked by the devil in the guise of a serpent! I think honest questions that spring from honest curiosity—or even honest doubt—are great and must be encouraged. But we need to pay attention and to be discerning lest we drift away, as the writer to the Hebrews (2:1) warns.

The Lord himself said, be as shrewd as snakes (Matthew 10:16); the Apostle Paul wrote, "I want you to be wise about what is good, and innocent about what is evil." The Apostle Peter tells us to be on the alert (1 Peter 5:8)—not against questions, but against the accuser.

Sunday, November 27, 2016

Ripping an unplayable CD and burning a new one

We bought an audio CD (stop smirking please) on a recent trip, played it once or twice at home, and... now it won't play.
…which reminds me of John Hartford's "Don't leave your records in the sun" but we didn't leave our CD in the sun.

Anyway, I remembered that there was a program that would try really hard to read damaged CDs, but I couldn't remember its name. After some web searching I was delighted to find the name "cdparanoia" but discouraged to read that development had stopped in 2002. Further searching revealed a 2008 update, so I tried this on Debian jessie:

$ sudo apt-get install cdparanoia
Hooray! It was found! Then after RTFMing I typed:
$ sudo cdparanoia -sQ
cdparanoia III release 10.2 (September 11, 2008)


Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.    27945 [06:12.45]        0 [00:00.00]    no   no  2
  2.    24852 [05:31.27]    27945 [06:12.45]    no   no  2
  3.    33420 [07:25.45]    52797 [11:43.72]    no   no  2
  4.    29895 [06:38.45]    86217 [19:09.42]    no   no  2
  5.    23468 [05:12.68]   116112 [25:48.12]    no   no  2
  6.    14717 [03:16.17]   139580 [31:01.05]    no   no  2
  7.    15945 [03:32.45]   154297 [34:17.22]    no   no  2
  8.    14255 [03:10.05]   170242 [37:49.67]    no   no  2
  9.    16288 [03:37.13]   184497 [40:59.72]    no   no  2
 10.    20465 [04:32.65]   200785 [44:37.10]    no   no  2
 11.    66120 [14:41.45]   221250 [49:10.00]    no   no  2
TOTAL  287370 [63:51.45]    (audio only)
$
NOTE: the first few times I tried that, it told me it couldn't read the drive/disk. I typed random things and then the above worked. Maybe it was just the -s? Anyway, after more RTFMing I decided to rip the CD into separate files, but first I wanted to find a nice place to put the files. Would the home directory be okay?
$ df .
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda6      882859164 174497320 663492076  21% /home
$ mkdir finland-cd 
$ cd finland-cd
$ 
It occurred to me that maybe it wasn't necessary to say sudo so I tried it without:
$ cdparanoia -B -- -11
cdparanoia III release 10.2 (September 11, 2008)

 
Ripping from sector       0 (track  1 [0:00.00])
          to sector  287369 (track 11 [14:41.44])

outputting to track01.cdda.wav

 (== PROGRESS == [                              | 027944 00 ] == :^D * ==)
… you get the idea
$ ls
track01.cdda.wav  track04.cdda.wav  track07.cdda.wav  track10.cdda.wav
track02.cdda.wav  track05.cdda.wav  track08.cdda.wav  track11.cdda.wav
track03.cdda.wav  track06.cdda.wav  track09.cdda.wav
$
Now, about burning: I didn't remember the command for that, either. A web search led me to brasero, whence
$ type brasero
brasero is /usr/bin/brasero
$ brasero&
I clicked on "Audio Project" or maybe "Audio CD", and fumbled around a bit before noticing the "+" sign near the top; this allowed me to add those 11 files to the project. NOTE THAT the order of tracks reflects way the files appear in the dialog box. So if you've got the file selection box set to show newest-first, then track 1 will be the newest file, etc.

I clicked on "Name" to sort by name (I might have had to click twice), and got track01.cdda.wav as the first track, track02.cdda.wav as the second, etc.

Then I selected Project→Burn, or maybe the "Burn" button in the lower-right corner of brasero's window. It worked perfectly; I'm listening to Bach now.

Sunday, November 06, 2016

The way of power, and the way of love.

This morning's sermon included some words from Henri Nouwen's book, In the Name of Jesus. I didn't quite start crying, though the words obviously made an impression on me—particularly Nouwen's comments about his powerful self vs. the vulnerable self. The powerful self can produce things, accomplish things, prove things, influence things. The vulnerable self finds itself in feeling loved by Jesus.

That's profound, but where I almost lost it was the story of Henri and Bill's trip to Washington DC, which I'll copy/paste from this page:

Once when asked to speak at the Center for Human Development in Washington, D. C., on Christian Leadership in the 21st century, Nouwen decided that to be true to what he was going to say, he should go in partnership — two by two as the Gospel says — with one of his mentally handicapped friends, Bill Van Buren. So he told Bill, “We are doing this together. You and I are going to Washington to proclaim the Gospel.”

Together they flew to Washington, got settled in their hotel, and went to the conference. When the time came for the address, after being introduced, Nouwen took out his handwritten text and began his talk. At that moment, he noticed Bill had left his seat and come up to the podium, planting himself right behind him. Thought Nouwen, “It was clear that Bill had a much more concrete idea about ‘doing it together’ than I did.” Each time I finished a page, he took it away and put it upside down on a small table close by.

When Nouwen began to speak about the temptation to turn stones into bread as a temptation to be relevant, Bill interrupted and said loudly, for all to hear, “I have heard that before!”

When Nouwen came to the second part and was reading the words, “The question most asked by the handicapped people with whom I live was, “Are you home tonight?” Bill interrupted and said, “That’s right, that is what John Smeltzer always asks.”

Then, said Nouwen, “After I had finished reading my text and people had shown their appreciation, Bill said to me, ‘Henri, can I say something now?’” Said Nouwen, “My first reaction was, ‘Oh, how am I going to handle this? He might start rambling and create an embarrassing situation?’”

Bill took the microphone and said, with all the difficulties he had in speaking, “Last time, when Henri went to Boston, he took John Smeltzer with him. This time he wanted me to come with him to Washington, and I am glad to be here with you. Thank you very much.” Everyone stood and gave him warm applause.

On the way back, on the airplane, Bill said, “Henri, did you like our trip?” “Oh, yes,” I answered, “it was a wonderful trip, and I am so glad you came with me.” Bill looked at me attentively and then said, “And we did it together, didn’t we?”

Said Nouwen, “Then I realized the full truth of Jesus’ words, “Where two or three meet in my Name, I am among them” (Matthew 18:20) In the past, I had always given lectures, sermons, addresses, and speeches by myself. Often I had wondered how much of what I said would be remembered. Now it dawned on me that most likely much of what I said would not be long remembered, but that Bill and I doing it together would not easily be forgotten.” (In The Name of Jesus: Reflections on Christian Leadership, Henri J. M. Nouwen, Crossroads: New York, 1989.)

From https://skokiecentralchurch.wordpress.com/2010/08/22/2010-08-22-“all-bent-out-of-shape”-luke-13-10-17/
Love and grace are evident here, in abundance. This story, and Nouwen's words about the powerful vs. the vulnerable self, put me in mind of the words from John 1: and of his fullness all we have received, and grace for grace. For the law was given by Moses [but] grace and truth came by Jesus Christ: truth in the sense of my true self (vs. the powerful yet false self) and grace in particular by being a conduit (not a sink) for the unmerited favor & love I receive every moment of every day. As a conduit of grace, I am called among other things to be gentle: A bruised reed he will not break, as the prophecy says, and a smoldering wick he will not snuff out.