Science as Religion

I spoke with a friend this weekend who expressed that Richard Dawkins gives him the impression of advancing science as a religion. My knee-jerk reaction was that I have read and heard enough Dawkins to know that he tries very hard to give the opposite impression, that science is about reasoning on good evidence while religion is characterized (to some extent) by believing things on bad or no evidence.

Later on, however, I recalled some idea that had made its way into my mind (from a Ted talk probably? which I can’t find… help wanted!) that people identify with religion because of the kind of person they want to be. I’ve let this idea roll around my thoughts for a few months now, and it has helped me to understand my past beliefs. I followed Jesus because I believed he had the means and desire to improve the world. I think this is different than why my friends and family did and do follow Jesus, and I think this difference is linked to why my faith has changed relatively frequently and drastically, despite many of my core values remaining strangely in tact.

While it would be a horrible abuse of language to say, “Science is my religion”, there is a very valuable sense in which it is true. The spirit of science is bright wonder amid cold honesty, and that is the kind of person I want to be. The fruit of science is technology, and I turn first to technology now (as I turned to Jesus-and-technology before) for the means to improve the world. The great thing about science is that it is perhaps the most reliable thing we have available to us, and the fact that it doesn’t answer the questions we might be asking just strengthens the notion that it is part of the real world.

Posted in Uncategorized

The Liar Class

I have always been an honest person. My commitment to honesty was further bolstered a year or so ago when I read Lying (on audiobook). I now can say that I will only lie (deliberately deceive someone when they reasonably expect not to be deceived) to people with whom I am at war. 

I’ve observed that honesty is a privilege; some people are in difficult situations where they cannot afford to be honest, or they don’t understand the long-term effects of lying. Whatever the causes may be, the effects are that honest people comprise what acts similarly to a socioeconomic class. Honest people do business with other honest people and try to isolate themselves from liars. It’s a higher class and a liar class.

I learned recently that a friend of a friend, let’s call him Fred, was concocting lies in an attempt to make a girl stay interested in him. My reaction was so dismissive and so complete that I surprised myself, something like, “Assuming this is true, I want nothing to do with Fred until I see him again in a few years and he comes off completely differently.” I realized today that the change Fred would have to undergo before I would reconsider him is akin to upward mobility: it’s totally possible, but it’s really hard, it takes a long time, and not many people end up making it.

Tagged with: ,
Posted in Philosophy

Parsimony

I had a brief but profound thought today about Occam’s Razor: its application can be deferred.

Normally, the razor is applied to find the best hypothesis to agree upon before engaging in conversation about it. Unfortunately, some disagreements are not readily resolved until engaging in some conversation. It may be best to entertain two equivalent hypotheses of different complexity until the point at which the complexity comes into use, the point at which the conversation could be expedited by switching to the hypothesis of lesser complexity.

In software, this is closely related to canonicalization. Take file paths, for instance. My home directory might be represented by any number of strings:

  • ~
  • /home/brandon
  • /home/../home/brandon

Using a single tilde is convenient, but it is not an absolute path, so depending on context the tilde or an absolute path might be preferred. Of course, there are indefinitely many absolute paths to the same directory, using two dots to go back up to the parent, but there is only one “canonical” path to any directory.

It’s perfectly fine to use non-canonical paths, but there will probably come a point where a person tries to understand the path and gets frustrated that it’s not in a simpler form.

Similarly, if you want to believe that things fall to the ground because of Newton’s laws working in concert with your invisible friend Bill, that’s fine, as long as there is nothing observably different than some other correct theory that does not involve Bill. We can start the conversation. We can talk about things falling. As soon as you take time out of the conversation to describe what Bill is doing to a falling object, however, then I can object, based on my time you are wasting, for not describing the falling object using a simpler form of the theory.

Not all conversations require full hypothesis-canonicalization up front, but don’t we all find them more enjoyable?

Posted in Philosophy, Software

Patents

I read a lovely paper on patents today, by Michele Boldrin and David K. Levine. The following excerpt specifically engaged me:

We do believe, along with many of our colleagues, that a patent system designed by impartial and disinterested economists and administered by wise and incorruptible civil servants could serve to encourage innovation. In such a system, very few patents would ever be awarded: only those for which convincing evidence existed that the fixed costs of innovation were truly very high, the costs of imitation were truly very low, and demand for the product was really highly inelastic.

They go on to recommend their 2008 paper for a more detailed explanation, but I’m just writing a blog entry here, so I’m going to speculate for now without doing more research: could patent length be calculated from these three factors so as to be optimal to innovation? It’s a question of how to relate the following variables:

  • CI: the cost of innovation, which should be high for patents to be long
  • CC: the cost of copying (or imitation), which should be low for patents to be long
  • ED: the elasticity of demand for the product, which should be low for patents to be long
  • PL: the patent length, calculated as a function of the previous values

Naively, we could use:

PL = CI / (CC * ED)

However, the units don’t make sense. I imagine that ED would be a unit-less ratio, and that CC and CI would be measured in a currency. Perhaps subtract one cost from the other and multiply by some factor that converts from money to time. This would make clear the need for a factor like:

  • RF: the recuperation factor, the amount of monopoly time it would require to recuperate some amount of cost

A less naive formula would then be:

PL = RF * (CI – CC) * ED

Okay, I’ll let the econ guys work out the details, but it’s fun to think about. If your invention only deserves six months of monopoly time, are you really going to file a patent?

Posted in Uncategorized

My Three Questions

My friend Josh made my day yesterday by quoting me in a forum discussion about science and religion. I have constructed a series of three questions to use in such debates (well, not so much “debates” as friendly conversations; they can be asked with a friendly tone, discussed calmly, and still discredit bad ideas). He used the first one, and Russell Glasser (of Atheist Experience fame) called it “elegant”. Thank you Russell, and I agree. I figure that if he or his people like it and want to use it, I should make proper attribution possible, and I might want to join the conversation to a degree:

  1. Which came first, trees or stars? It’s only six words but it captures so much. Any science-minded person (after pausing to rule out trick questions) should answer, “Stars, duh.” It’s a grab-bag for Christians though, and thus a great way of cutting through labels and seeing how individual people think. Lots of Christians don’t have an answer immediately and need to be reminded of the text of Genesis 1: on day three, God creates (among other things) trees, and on day four, God creates (among other things) stars. I picked these largely because of how little wiggle-room there is in the text: they are mentioned by name, not by something poetic like “great light to govern the day” for the sun. Also, talking about the sun invites discussion of light and photosynthesis, which I don’t think is as productive of a conversation (especially since “light” is created on day one) as where carbon comes from.
  2. What in the world is a firmament? This is a similar question but with a different intent. Trees coming before stars is just a problem of order, and in case the Christian defending the Bible has some funky idea about how verses are aligned poetically so as to make order irrelevant, the firmament is something that demonstrably does not exist. Pretty much everyone says “I don’t know”, so I typically follow with the (admittedly hand-wavy) hypothetical, “You know how people would respond to that question 1-3 thousand years ago? They would say, ‘Everyone knows it’s the hard shell separating the realm of the earth from the realm of the heavens.'” It’s a feature of a defunct cosmology. It’s the Bible lending explicit support to a scientific anti-fact. There is no firmament, at least as surely as we have sent probes beyond the planets of our solar system, which should definitely be on the other side of said firmament, and they didn’t hit anything hard.
  3. Why do we think that the Bible is perfect or whatever? Maybe “we” is not the best pronoun, but I used it while I was still a Christian but not a creationist, and I imagine that it makes the conversation more contemplative and less adversarial than using “you”. Assuming two questions is enough to establish doubt at the data level, this question should force that doubt deeper into the level of basic assumptions. The point is to ask this question when it’s already clear that there are problems, so that dodging it is emotionally harder.

 

Tagged with:
Posted in Uncategorized

Shape Inheritance

I’m really impressed with how deep an interview can go over the seemingly innocuous example of shapes inheriting from one another.

First, it’s easy to start it off in a way that weeds out incompetent people without wasting competent people’s time. We can start with, “I’m going to name four classes, and I’d like you to describe the relationships or interactions you would assume they have, just based on the name, okay?” The classes we name off, in alphabetic order for lack of a better one, are: Canvas, Circle, Rectangle, and Shape.

Hopefully candidates come up with the idea that Circle and Rectangle inherit a method from Shape that takes a Canvas argument, because that’s how classes named like that normally behave. There’s a bit of room for reasonable deviance here; candidates who have never done any GUI work may reasonably assume that Canvas is a specialized kind of Rectangle and therefore inherit from it. We should be prepared to suggest clarifications and see how long it takes them to be coaxed into understanding the relationship. I wouldn’t be surprised if this somehow turns out to be a really good metric of hire-ability, some constant divided by the time it takes them to understand the relationship among these four classes. Of course, some teams may be satisfied with just this, but let’s assume that we want top talent.

What’s great is that this question can go in a number of directions when we actually get to code (I’m assuming Java).

  • If we want to test their algorithm chops, we can tell them that Canvas has a method to draw a point at a coordinate and have them implement the Circle.draw(Canvas) method.
  • If we want to touch on concurrency, we can tell them that every shape has a ReadWriteLock and that the fields should be accessed and modified appropriately.
  • If we want to put a little pressure on their class design muscles (or just weed out any Java programmers who haven’t learned anything new for a decade), we can tell them to use a class parameter as the type of their coordinates, like  <C extends Number>.

The way to really see if we’re dealing with thinkers, though, is to throw Square in the mix at some point. The natural idea is that, since all squares are rectangles but not all rectangles are squares, that Square should inherit from Rectangle, and perhaps this is exactly what we want from immutable objects. However, a mutable square poses a problem, namely that it cannot be modified like any old rectangle and still be guaranteed to stay a square. If a square inherits methods from rectangle to set its length and width separately, it’s probably busted. Now we have to, what, meticulously override these mutators to call multiple mutators from the super-class? I don’t like it; it’s not elegant. Sure, Square doesn’t have to inherit from Rectangle, but wouldn’t it be nice to have that polymorphism for read-only algorithms? (Not sure if anyone who mentions contravariance right around now gets bonus points or undying scorn.)

The conversation (no longer really an interview if it’s still going strong at this point) now brings us to questions of how to balance composition and inheritance, how to communicate to programmers about mutability through API design, and the obligatory esoteric contentions like how to use the term polymorphism correctly.

Well, if we only have time for one interview question, this may be a decent choice because it is versatile and gets progressively more selective.

Tagged with: , , , ,
Posted in Interviewing