Clouds and Sun

June 3, 2017

The clouds had been giving us rain, lots of rain, but now the clouds are being selfish. When I went for a walk Sunday morning there wasn’t a single cloud in the sky. Are they mad at us? Fortunately the Sun stepped in to fill the void. I wasn’t the only one to notice. Walking down the street I heard the Beatles’ tune “Here Comes the Sun” wafting out of an apartment window.



April 23, 2015

Recently at a supermarket a container of mixed berries caught my eye. Red raspberries, strawberries, blueberries and blackberries – all of my favorites in one clear plastic package. A no regrets  splurge.  When I ripped the top off I saw a red raspberry right on top. I picked it up and noticed that a blueberry had nestled in the hole of the raspberry. I popped it into my mouth, bit  down and was rewarded by a squirt of blueberry and raspberry combined. I spent the next few minutes sticking blueberries into raspberries and eating them. Yum.

This reminded me of dates and almonds. Pitted medjool dates are like candy to me and I like to  put an almond in  the space where the pit was. Biting through the sweet gooey date then the crunchy almond.  I need to add those to my shopping list.

Indenting code

October 17, 2013

Got some code to modify. The indentation was all over the place. I just spent two hours indenting it properly. As far as I’m concerned Pyhton got it right by enforcing indentation.

Something I don’t like in HTML5

January 17, 2013

I’ve been looking at HTML 5 a bit lately and was please to see that there was an input type of ‘date’. I was not pleased that there wasn’t a pure HTML way to set the default to the current day. I know this is easy to do in Javascript but why not add this simple feature?

PHP and undefined variables

January 10, 2013

I wish software wouldn’t fail silently.

At work I was recently assigned to a project using PHP which I’d never used before. I used Google a lot and never had trouble finding out how things worked. But there is one thing that exasperates me. If you use a variable that hasn’t been defined PHP doesn’t tell you. Misspell a variable name? Instead of finding out at compile time (C/Java/etc) or when you try to use it at runtime (Python) you have to figure it out for yourself. Something you should be able to fix in a minute can become a frustrating search through your code.

This is a bug in the language design.

Medical records fail

April 3, 2012

I moved to a new town last fall and recently got around to going to a doctor. Since I was a new patient I filled out several forms, one of which was medical history. During the visit the nurse and doctor entered stuff from the history into a laptop. I asked the doctor what percentage of their records were on computer. He said 90 percent. I told him that was a lot.

Then I asked him if it was making things better. He said it was a mixed bag. Prescriptions were easier – he shot mine off to the pharmacy electronically. He said he used to get writer’s cramp but now he gets carpal tunnel from typing. And when the internet is down they can’t get patients’ records.

They should have handed me an iPad to do my medical history which could then be uploaded to their database. They should have local copies of patient records. We know how to do this stuff – why aren’t we?

Finally fixing the null pointer misfeature

January 13, 2012

My current gig is working in C/C++ land which is a place I haven’t been in much for the last decade or so and I hadn’t noticed that C++11 was going on. Yesterday I read about the changes and most of them don’t interest me but the new “nullptr” is big for me.

C/C++ uses lots of pointers and plays fast and loose with them. The “null pointer” has been the concept of a pointer that doesn’t point at anything. In traditional C and C++ the null pointer has been the integer value 0 so you’ll see lots of code setting pointers to 0 or comparing pointers to 0 which is ugly and not type safe. Having an explicit nullptr will clean up a lot of code.

Bye Bye Paper Textbooks

January 12, 2012

The dead tree incarnation of textbooks is going away. Students are already using ebook versions of textbooks that provide all of the information in the print versions. But that’s not the biggest reason that textbooks will evolve. Ebooks today are mostly static presentations. The future is dynamic presentation.

Let’s say the subject is the history of the European colonization of the Americas. Imagine a map with North and South America which is animated by colors showing where each of the European countries established settlements starting in 1492 and changing over time. Now add a slider control so the student can choose any year and see the distribution of settlements for any given year. Touch the map and text will come up associated with that region.

In a physics textbook every diagram could at minimum be replaced by an animation. Beyond that many diagrams could have controls that let you change some parameter and watch what happens. Printed textbooks and most current ebooks can’t do these things.

Things are changing in ebooks. The EPUB 3 standard calls for Javascript support. Or you could just write iOS/Android apps and call them books.

A programmer’s bug as user’s feature

April 16, 2010

Shawn Hargraves has a blog post called ‘Bug or Feature’ about a game he worked where the users found some game play the programmers thought was a bug. They kept the ‘feature’ because the customers enjoyed the bug.

Hello world!

April 10, 2010

Welcome to “Bug or Feature”. This is my first post, so I thought I’d say a little something about the blog’s title.

Programs do lots of things. the things they do right are called features, the things they do wrong are bugs. But people may have differing opinions on what is right or wrong and therefore disagree on what is a bug or a feature.

In this blog I’ll post some of my own idiosyncratic opinions on software and hardware. I’ll even post code for people to insult.

Back to the blog’s title. One day I was writing some software that depended on a library written by a coworker, a solid programmer named named Mark, and managed to crash it. I yelled over the cubicle wall, “Hey Mark, is it a bug or a feature that your code crashes when I call it with the number 32?” He replied, “Today it’s a feature, tomorrow it’s a bug.”