Author: sbrandt

  • Enter the Tweed Jacket….

    This morning I received word that the faculty of the computer science department at LSU voted unanimously to make me an adjunct professor. This does not involve an increase in pay, nor is it tenure–but it marks a new education component to my career. The august rank of “Professor” is not something I ever expected to attain, but I won’t let the success go to my head. I’ll still wear T-shirts with cartoons on them instead of the cliched tweed jacket.

  • I Stitched a Sequin onto Elvis’ Coat…

    Well, i did the equivalent thing in the C++ world. Back in 1986 and 1987 I worked in the C++ group at Bell Labs. I was trying to debug my program, but could not understand what I was seeing from the linker–mangled symbol names generated by cfront. The documentation I was reading said I could use the demangler to figure out what the output meant, but I could not find it. In frustration I sent out an email to the group and got a message back from Bjarne Stroustrup saying something like, “It hasn’t been written yet, would you like to write it?”

    The program I created was called c++filt. The way it worked was to read standard input and try to demangle every c identifier it found. This meant we could fix the output from the linker without actually hacking it in any way. It seems that there is still a program floating around called c++filt and it works mostly the same way. I was never able to prove that I did this until recently, when a co-worker, Bryce Leblach, found a reference to me on page 197 of the AT&T documentation from cfront. Okay, so I didn’t invent C++ or any important language feature, but I did make a tiny contribution to the history of the language, one little glittering sequin on the dazzling C++ coat.

  • Geekiness

    Java is a great language, but it’s missing a feature present in its cousin languages, C++ and C. The feature is the builtin macros __FILE__ and __LINE__. These are often quite useful for debugging, etc. Well, even though Java doesn’t have them as builins, you can still make your own.

    public class MacroHack {
       public static String __FILE__() {
          return new Throwable().getStackTrace()[1].getFileName();
       }
       public static int __LINE__() {
          return new Throwable().getStackTrace()[1].getLineNumber();
       }
    }
    
  • Life

    Over twenty years ago my daughter was born. The pregnancy was very difficult. My wife had to lay on her left side for several weeks prior to delivery (her blood pressure was very high and it was slightly lower when she was on her left side). At one point the doctor mentioned that abortion was a possibility, but it neither one of us wanted to consider that.

    My daughter was born nine weeks early by ceasarean section and weighed just a little more than two pounds. I was not (and am not) an expert on fetal development, but I was surprised to see how normal the delivery was–the doctor lifted the baby up by her legs, spanked her once, and she started crying. I had imagined some sort of “pre-baby,” something that did not quite seem alive or ready. What I saw was a little person who was just like a full term baby only smaller.

    Of course, another difference with a full term baby is that premies (premature babies) have trouble retaining body heat. My daughter had to be kept in an incubator for a month before she could come home with us. Fortunately, the hospital was just across the street from where I worked and I could go visit her during lunch. She could almost wrap her hand around my little finger. In a way I felt that parents of full term babies missed out. They didn’t get to see their children when they were very small.

    Unfortunately, the problems that led to our daughter’s early delivery made a second pregnancy a dangerous prospect, and so we sought to adopt. People’s experience with adoption is not uniform, but in our case it was a grueling ten year process. We were judged and tested in so many ways, many of them (I think) arbitrary and unfair. We had heart-wrenching near misses and one person tried to con us. In the end, though, we finally got our son. Unlike a pregnancy in which things slowly develop and you have time to prepare, the adoption was more like ten years of hopelessness followed by sudden joy. I think it was about a week from when we found out there was a baby to when we took him home.

    Our son’s birth mother has a number of problems (and we don’t know all of them), but she has some level of faith. She did not consider abortion, and she asked that her baby be placed in a Catholic home.

    I am grateful to my wife and the woman who carried our son to term, whoever she is. May God bless them and all the mothers who choose life.

  • Word of Honor

    I’m a character in a novel, I give you my word of honor. Literally. Nelson DeMille used my name in his book. Of course, I’m neither a medic nor have I been to Vietnam.

  • A Green Belt in Paranormal

    I’m always interested in the stories of how people go from unpublished to published. Here’s a self-published success story.

    The real problem I have with this process, as well as submitting to agents or editors, is that failure does not usually offer any insight into what to do better. If we can design a system where people can learn from their mistakes maybe literature as a whole will improve.

    I like to imagine a publisher that offers a continuous writing contest in which anyone can sign up to be an editor or writer, and at the end of each round of competition, the winning books are published and sold.

    Writers and editors each get royalties from sales, both authors and editors have a ranking. Authors gain rank by getting good scores from editors. Editors gain rank by identifying stores that are widely liked, and by giving feedback that authors consider useful. That way people can say, “I’m still not published, but I have a green belt in paranormal now.”

  • Roku Application

    Since we lost the controller for our Roku, I’ve had a bit of fun after discovering that you could control it by telnetting to port 8080 on the device and sending it commands such as “press up”, “press right”, etc. To make this easier, I created a small application which you can access here.

  • How Long Should a Query Letter be?

    If you’ve finished your novel and are on to figuring out how long your query letter should be, I believe I have a scientific answer!

    Using the data from the “Successful Queries” column , I have found that successful queries are 239 words on average with a standard deviation of around 91 words (based on 41 examples).

    While there’s more to success than word count, the winners of the query battle seem to be between 240 and 420 words.

  • Computers that Feel

    Many believe that human consciousness is algorithmic, that self-awareness is simply the emergent property of a large number of logic gates. It must at least be partially true. Our brains do share a great deal of common traits with computers, and efforts to mimic neurons have yielded useful algorithms in computer science. Yet this misses a critical aspect of our self-awareness: our ability to feel. Are logic gates adequate to create the quality of the experience of seeing a color, hearing a note, feeling pain or pleasure? They seem more appropriate when considering our faculty of reason than when we ponder feeling.

    It is important to distinguish the experience from the behavior. One could easily imagine a robot that perfectly duplicates the pain reaction without actually feeling anything.

    I think that when we use the term “consciousness” we are describing a fusion of the ability to process logic and to feel, to attach emotional content to ideas. I think the ability to feel is the more fundamental mystery to consider when trying to understand consciousness, and the more difficult thing to define or explain.

  • Universal Zombie Care

    I predict that zombie repairs will prove to be the fatal flaw in Obama’s universal health care plan. In no time there will be a massive shortage of fresh gooey brains.