Monday, April 27, 2009

Open Source Annoyances

Every now and then I'll make a little computer program, usually to experiment with a technology or to make my life a little easier, then release it on the Internet for other people to use.

It obviously comes with no guarantees, promises, or anything else, but apparently some people don't realize that. That, or they're just rude, or at the least, lacking politeness.

Example 1:

Email Subject: Bloomberg Gadget
Email: Why has this gadget died? It is a great gadget. Please fix it.

Commentary: The "Bloomberg Gadget" was a widget I built to go on a Google Homepage ( It was one of the first widgets I built, and I actually did it to help me learn how to build Google widgets.

At least the emailer (a reverend, actually) had the courtesy to mention briefly that it was a "great gadget," and he even threw in a "please," but it still came out as an order. Not only that, but he's not giving me any sort of clue as to actually went wrong except for the completely vague "it died." How am I supposed to figure out his problem based on that?

Example 2:

Email Subject: Keylogger not working after a few weeks how to fix?
Email: Hey there, How are you doing? I've had your keylogger addon for a few weeks now, and all of a sudden it stopped working. Do you know why? And how can I fix it?

Commentary: This was a Firefox add-on that logged keystrokes so if your browser crashed, you wouldn't lose whatever you were typing. At least this guy was civil in his email; the problem is that like the previous example, this guy gave me nothing to go on. "No, I don't know why it stopped working. Is your computer plugged in?"

Example 3:

Email Subject: keylogger addon
Email: I was looking for a keylogger that I can use to monitor the activities of my teenaged daughters (hereafter referred to as “the monsters”), and stumbled across the experimental version of your application. For this purpose, because the monsters are not stupid, I am looking for something that works pretty much surreptitiously. I noticed that the description indicates it will not be hidden. I am not a programmer or other IT professional, and would never consider changing an application, as some have indicated they have done to accomplish this [ed. note: the whole point of making an application open source is to allow anyone to modify it however they want]. Will there be a “parental supervision” version of this add-on that will allow me to be sneakier than the monsters?

Commentary: At first, I wanted to respond, "Seriously? You're an adult? And a mother?"

In the end, I wrote the following:

I'm sorry, there are no plans to create a "Parental Control" version.
You may use it to monitor your children, but far more often,
technologically-savvy children would use it to steal their parents'
usernames, passwords, and bank account numbers.

Honestly, your best bet would be to have your computer in a public
place (such as the kitchen or living room), and educate your daughters
on the various online dangers. It's a losing battle getting in a
technological war with today's generation. It's just a thought, but I
suspect that the first time you show them evidence from your
monitoring, they will realize what you are doing and either retaliate
(perhaps by installing a keylogger of their own) or simply move their
computer use to a friend's house where you have no control instead of
the small control you have now.

Good luck with your situation! I don't envy you the difficult job of
dealing with teenagers, and wish you the best in your parenting.

Sunday, April 26, 2009

Mormons and Education

A non-LDS friend recently asked on his blog if anyone knew of someone his age (25 or so?) and educational level (M.S. degree in computer science) who had converted to the LDS church.

I couldn't think of anyone off the top of my head, but it made me curious and I did a little research. Apparently, Latter-day Saints are somewhat unique among religions in that education makes us stronger in our religion instead of weaker.

"A study by Stan Albrecht and Tim Heaton published in the Review of Religious Research in 1984 reported that opposite to the experience of most churches in the United States, members of the Church of Jesus Christ of Latter-day Saints become more religiously active as they become more educated."

Not being on campus, I don't have easy access to the study in question, but it's titled, "Secularization, higher education, and religiosity," Review of Religious Research, 1984.

I also found something more recent:

"Consistent with previous research, we did not find education to have a secularizing influence on Mormons, but rather to have a positive association with religiosity for both Mormon men and women."
- "Lack of a Secularizing Influence of Education on Religious Activity and Parity Among Mormons", Journal for the Scientific Study of Religion, Vol 42, Iss. 1, pp 113-124, 2003

Unfortunately, there's no real data I could find on educational levels, majors, or similar things.

The Great Rattlesnake Escape

Here in Draper, Child and I teach the 6-year-old Sunday School class. At the beginning of Sunday School, all the classes meet together for "Singing Time."

On our row, I had three of our kids on my right, and Child and another kid on the left. The current song required us to stand up and "wiggle like a rattlesnake." I was momentarily distracted by Child's laughing at my shaking my bum like a rattlesnake, then Child pointed to my right. I look over to see the three six-year-olds who used to be standing to my right now halfway across the room doing an impressive army crawl, apparently taking the "wiggle like a rattlesnake" a little too literally. It took three or four teachers to surround them, but we finally got them returned to their seats.

By the way, I have to throw in a Faith Promoting Experience. The other night, my entire nose was stuffed up beyond belief with allergies. I had to breath through my mouth, which made it impossible to sleep (and gave me a sore throat), and it was 2 AM in the morning. "Just give me one nostril," I finally prayed. "Enough so I can breath through my nose long enough to fall asleep."

10 minutes later, I had one nostril open, and was able to fall asleep. Go God!

Friday, April 24, 2009

Garden 2

In our ongoing battle against the lack of sunlight in our tiny backyard, we've tried two things:

1. Raised the boxes off the ground, so they can get a precious hour of extra sunlight.

2. Cut down the sides of the boxes in the direction of the sun. This won't make a difference when the plants get a little taller, but for now, the plants originally shaded by the side of the box will now get an extra few minutes of sunlight as well.

We're also starting to hit a few days of cooler weather, so our plants get well wrapped up at night. Incidentally, the weather report on says, "Current Temperature: 60 degrees. High: 59 degrees."

Saturday, April 18, 2009

Garden 1

A few weeks ago, Child and I read a story on KSL about "urban gardening," basically, growing a garden on a porch, balcony, or small backyard. We had already been planning on doing our own as soon as it stopped snowing, so we read the story with interest.

The story was more like a human interest story featuring a guy who started a garden on his apartment balcony. It was an interesting read until the second to last paragraph, where it said, "It cost Joel about $700 for the garden, including pots, plants and instruction on how to care for everything."

$700?! What was this guy growing, gold bars? Reading the story a second time, we caught something we hadn't the first time through: he had hired a guy to do a custom garden for him. Having grown up in a family which constantly had a garden, I would never pay someone to plant a garden for me, much less $700 for a few pots on a balcony, but to be fair, I'm assuming the apartment owner had no experience with gardening.

I still think he could have read a couple books (there are dozens about "square foot gardening"), and there's no way he's going to get enough food out of it to cover the cost, but perhaps he's more concerned about the organic-ness and environmentally-friendly side. Either way, I hope he sees how easy gardening really is and does it himself the next year. He's already got the pots and dirt.

Anyway, on to our own garden. We made our first real strides today, getting our dirt and plants. It's still a little early to plant, although if I remember correctly, our peas don't mind the cold, so maybe we'll plant them at least.

When it comes to containers, we're trying something unique, which could fail horribly, but has an outside chance of working and the benefit of being cheap (free). Dismayed at the price of containers ($5 for a cheap plastic storage tub that we could drill drainage holes in, up to $100 for decorative ceramic planting pots), Child and I looked into building some simple wooden boxes.

Wood is expensive as well, and I started thinking. Since we're only planning on living here one growing season, we don't need something permanent. What about cardboard boxes? They're free, and they decompose. Obviously an ordinary cardboard box wouldn't be strong enough or last long enough, but a banana box (the lid and bottom combined to give it double strength) might just hold out for a few months.

So we decided to give it a try. Worst case scenario, the cardboard starts falling apart and I end up buying the wood after all and building a wooden box around the cardboard boxes.

As far as plants, we decided on tomatoes, bell peppers, sugar snap peas, zucchini, yellow summer squash, carrots, and green beans. The tomatoes, bell peppers, and carrots need a little more depth, so they'll end up in a double-tall banana box.

The double-tall boxes were pretty easy to make. First, we popped open the flaps on both the bottom and lid of the first box. Second, we slid the flaps of the bottom between the bottom and lid of the second box (note from the picture how I cut off a wedge from the flaps of the first box so it would slide in easier). Push it all the way down and it'll rest solid. Finally, simply slide the top of the first box over the top of the whole contraption and push it down. Presto: a double-tall box.

Total cost so far: $42.50
  • Dirt: $10 (Mountain topsoil)
  • Shovel: $6 (Lowes)
  • Trowel: $1 (Lowes)
  • MiracleGrow plant food: $8 (Lowes)
  • Plants/seeds: $10.50 (Lowes) and $7 (Walmart)
Quite a bit less than $700. Not only that, but the shovel and trowel are one-time expenses, as the dirt would be if we weren't moving/don't move. The plant food is non-essential as well, Child and I decided to buy it mostly as an experiment to see if we really saw that big of a difference between my parents' plants and ours.

Anyway, what it boils down to is that assuming we have no more expenses, we need each of our 7 varieties of plants to produce at least $6 worth of food to break even. I think we're pretty safe. That's a handful of tomatoes or peppers from Harmons.

My biggest worry for our garden, after the cardboard boxes falling apart, is sunlight. Since we have a tiny backyard (12' x 20'), with a two-story townhome on the south and a 5 foot tall privacy fence on the other three sides, not a whole lot of light gets into our back yard. We'll see what happens.

Here's a slightly more complete picture:

To date, getting the dirt was the hardest part. The pioneers would laugh at the fact that we had difficulty finding dirt, but that's modern times for you. Child found a couple people who were giving away "free dirt" on Craigslist, but at the one house we made it to, the dirt was a solid yellow clay/rock mess. Not gardening soil by any stretch.

We finally ended up taking our car to a topsoil company in Lindon (Mountain Topsoil). I felt a little out of place with our little Saturn in a line of pickup trucks and trailers, but we had the guy driving the Bobcat dump a half-cubic yard of dirt into a row of banana boxes. I stuck those into our back seat, then took a shovel to the remaining pile and loaded it into our tarp-lined trunk. We were riding pretty low and slow driving back to Draper, but we made it without any difficulties.

I have to add: this was all done on our way home from two hours of Ultimate Frisbee in Provo, so I was already tired. And from comparing a handful of links (e.g. this one), it's pretty fair that a cubic yard of topsoil weighs one ton. Since we got half a cubic yard, I had to lift and shovel a thousand pounds of dirt into Jasmine. Then, once we got home, I had to unload all of that and carry it to our backyard.

I'm tired. And Child gives amazing massages.

Friday, April 17, 2009 muerte!

Child wanted some nightstands. "Find a garage sale," I said. "Buy some from DI. Heck, buy some from Ikea."

No, she wanted me to build her some. Our bed is on risers, so it's pretty high, and she wanted a nice tall nightstand to put stuff on. After some complaining and grumbling, I finally agreed to do it. Step one was deciding on a design:

Nothing too hard, right? A little woodwork, a little metalwork, some welding, and you have a nightstand.

I learned three things.

1. Woodwork is hard.

2. If you pay for crooked wood, you get crooked wood. If you get crooked wood, you get the Leaning Nightstand of Pisa.

3. While shopping at Lowes, if you can't remember the size of screw you already have at home, you will buy the exact same size.

Although I blame any aberrations from linear cuts on crooked wood, without admitting any personal responsibility, I will say that if I had a table saw instead of just a circular saw, the end result may have looked more like the above design. As it was, this is what Child ended up with:

Not...exactly like the design.

I don't think it was exactly what Child had envisioned either...okay, when she got back from shopping, she walked in the door and shrieked with horror, stumbling backwards and clutching her heart. When she had had a little time to recover, and a class of cold water, she managed to choke out faintly, "That's very...wooden."

Acouchi may take a few more days to recover, cowering under the guest bed with her terrified eyes fixed on the door as if afraid the shelves (they ended up too tall to be called nightstands) would lunge in like stiff (if slowly toppling) zombies.

You win some, you lose some...and some, you bomb so spectacularly that your wife never asks you to do woodworking projects again, which was pretty much what you wanted in the first place, so it actually ends up as a win.

Monday, April 13, 2009


This morning, I was trying to figure out why one of our customers couldn't upload a picture to her website. She was using a form I had built, so fixing the bug was assigned to me. After some digging around, I found out that the problem was actually in another programmer's code library that my form used.

"Rookie mistake," I thought to myself. "He forget to lowercase the file extension." What that meany was that someone could upload an image called "test.jpg" just fine, but "test.JPG" would fail.

I fixed the bug, chuckling smugly to myself, then went back to my form to try uploading the picture again. It failed. What?! As it turns out, I had made a mistake even more rookiesh in my own code, trying to display the new picture BEFORE actually uploading it. Oops.

It's incidents like these that keep me from getting too cocky.

Tuesday, April 07, 2009

Speed v. Safety

When programming, you have to walk a fine line between getting code out, and making code secure.

I'm actually not talking about general security issues, although there are unfortunate circumstances when you (as an employee) don't have the option of taking the time to make your code (or your predecessor's code) secure.

I'm talking about coding for things that should "never happen." I'm talking about coding for that particular sequence of actions you think no one will ever do, or that edge case that no one will ever hit, or even that thing you think can never happen.

I try to be reasonable with what I do, although I like to err on the side of caution. For example, here's a bit of PHP code:

header("Location: index.php");

Theoretically, that is supposed to redirect the visitor to the index.php page...say, if they weren't authorized to be on the current page. I always assumed it always worked, no exceptions.

However, back in the mists of my early programming, some person, or webpage, or something suggested putting an "exit" statement afterwards, just in case it didn't. That way, if the person wasn't redirected to the proper page, the current page would just die. It's better than having an unauthorized person viewing the page.

header("Location: index.php");

So I've always done that. Better safe than sorry. I found out the reason for doing so today: apparently, it's up to the web browser (or web crawler, etc.) whether or not it wants to obey the headers, including the "Location" one in the PHP code above. I knew that, I just never really made the connection between that fact and this situation. So, if a browser or crawler doesn't obey the header, the page will just die.

You learn something new each day. I'm glad I was already writing secure code (for that situation), even if I didn't know why...

Monday, April 06, 2009

March Madness

This is why I don't gamble:

47th out of 49. In my defense, most of the other people had several entries.