Friday, April 17, 2009

Nightstands...de 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

Rookies

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:

<?php
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.

<?php
header("Location: index.php");
exit;
?>


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.

Thursday, March 26, 2009

Email to Text Messages (SMS) with Celluar Carriers

Most cellular carriers allow you to send an email to a cell phone number and have it appear as a text message (SMS message). For AT&T, for example, you send an email to 1235551234@txt.att.net, obviously replacing the "1235551234" with the cellphone number you're sending to. On the receiver's phone, it appears as a text.

There are some tricks. For example, if the message length is very limited. It depends on the cell carrier, but 140 to 160 characters is about the max. You can run into problems if you violate this: for example, T-Mobile will silently drop emails that are longer.

Other problems can arise. For example, AT&T won't accept the email if there's no "From" address. I'm speaking from a coding perspective here (sending the emails from, say, PHP code), but I've found the following two things to be key:

1. Keep the email short. 100 characters is safe.

2. Always provide a "subject" line and "from" email address, even if older phones can't even see those fields or use them.

Tuesday, March 24, 2009

Random Pic Time

Child and I were driving to a friend's house when we pulled up behind this truck. We decided to try out the camera on my new iPhone. It takes pictures surprisingly fast--I was impressed.

No idea why this guy was carting an elk head around in the back of his truck...

Qwest v. Comcast: The First Month

After the first month of service, the first problem, and the first bill, who wins: Qwest or Comcast?

Qwest. No contest. (Yet.)

Setup

If memory serves correctly, it took us several phone calls, visits, and quite a bit of downtime to finally get Comcast working. Comcast eventually refunded two weeks worth of service, I believe, but I would have preferred forgoing the headache instead.

Qwest had me up and running when they said they would.


Service

I'm inclined to be a little more lenient to Comcast here, simply because our last apartment was old, as was the wiring Comcast had to deal with. However, even after they put brand-new wiring in, they couldn't keep my Internet connection up and running.

So far (knock on wood) my Qwest connection hadn't had any problems except a brief downtime that was fixed by rebooting the modem/router, but it's only been a few weeks. This is better judged over a series of months. We'll see...


Support

Qwest wins again. When my connection died, I called up customer support. Unlike Comcast, who refused to touch my wireless router (and enjoyed blaming problems they couldn't figure out on it), the Qwest support guy didn't even blink when I told him I had a wireless router hooked up to their modem. He simply walked me through rebooting it, in addition to their modem, which fixed the problem.

I can't go too far blaming Comcast for not wanting to deal with "unsupported hardware," but it certainly wasn't that difficult for Qwest, and it made all the difference in my opinion of them.


Billing

Again, this is better judged over a series of months, but my first Qwest bill was correct, and (helpfully) told me which month I was on in my discounted promotional period. Comcast rarely got a bill correct two months running.

Let's hope Qwest continues to impress.

Friday, March 13, 2009

Phones

When Child and I had been dating for a few months, Child bought a new cellphone, and gave me her old cellphone with strict instructions to get a plan.

Up to that point, I had been content with a landline, and avoided it as much as possible. Phone calls usually meant someone wanted me to do something, and I am very selfish with my time. Child was cute, though, so I didn't really have a choice, and followed her instructions.

After Child went through six Walmart Quik-Brak® phones over the course of three years, my work bought me an iPhone and I gave Child her original phone back. The screen is pretty scratched, and the "6" key is a little sticky, but other than that it's still going strong. It's been dropped, drowned, and pretty much everything else but burned at the stake, and it's still trucking.

FWIW, the iPhone is for testing a new mobile version of my work's website on. Work paid for the phone, and I pay for the T-Mobile data plan and do the jailbreak on the phone.

Wednesday, March 11, 2009

Cables 'n' Cords

I just finished organizing my "electronics box." Ignoring the handful of electronic gadgets in the box whose cords are attached, I have the following free-floating, unused cords:

7 power cords
4 CAT-5 (ethernet) cables
1 coaxial cable
2 car adapter cables
2 extension cords
8 USB cords, not including the USB cord to my camera, which spurred the digging through the electronics box to begin with.

Add in the cables and cords around my desk, and you'll add maybe 6 more. Add the cords attached to electronics gadgets (used and unused), and you'll add about 20 more.

Sunday, March 01, 2009

Washer/Dryer

Child and I bought a new washer and dryer. We got them from a Sears outlet store, where they sell less-than-perfect merchandise at nice discounts. Our washer and dryer are two different colors and both came with some aesthetic problems, but they're supposed to be functionally fine.

In theory. The dryer had some larger problems with the control problem (loose, sliding off), so Child and I decided to get the 3-year warranty on it. The idea was that if something went wrong with it, Sears would either fix it, or replace the dryer. Our hope was that something would immediately go so majorly wrong that Sears would replace it, and we'd get a brand-new dryer, and we could even get it in a color that matched our washer.

Well, the installers set it up yesterday, and it does have a few problems. The dryer door doesn't close completely unless you push it just right, and halfway through a dry cycle the control panel started flashing "F70". We have our fingers crossed that it's a horrible, unfixable problem, possibly involving the dryer gaining sentience and attempting to kill us in our sleep, so we can get a new dryer.

Comcast v. Qwest

In our new house here in Draper, an obliging neighbor is currently providing me with wireless internet, but I have my own hookup coming on Tuesday. Or Wednesday. I can't remember which now. Too much going on.

I'm giving Qwest a try for a couple months to see how I like it, and I can always switch back to Comcast if needed.

ISPs definitely need more competition.

Events

Child and I have had a busy past few days. Her father was recently diagnosed with lymphoma (cancer), then had a seizure Wednesday night and had to go to the hospital. Also on Wednesday, we moved from Provo to Draper and on the plus side, bought a washer and dryer. More on that later.

Yesterday, we visited Child's father in the hospital. On the way home, I was driving, and there was a sudden thump from under the car. I thought a car part had fallen off, and looked in the rear-view mirror to see a dog sprawled in the middle of the road and two adults and a kid standing on the sidewalk ten feet away.

Aw, nuts.

I pulled a U-turn and pulled up in from of the people. "Is that your dog?" I asked, and thank goodness they shook their heads. "Not ours," they said. Running over a dog is bad enough--doing it in front of the owners would be worse.

I parked the car and Child and I got out. To my surprise, the dog (a chihuahua mix) was able to stagger from the middle of the road over to the side. It looked like it just had a broken leg, and fortunately it was wearing a tag with a phone number. I called the number, and the owners turned out to live just around the corner.

While waiting for them to show up, the people on the sidewalk informed us that a cat had actually chased the dog into the road. Looking across the street, I could see the cat sitting atop a pickup truck, smirking at the scene.

The owners finally showed up, and were thankfully very nice. The lady apologized for not keeping her dog corralled, and said that some relative of hers was a vet tech at a local clinic. So all was well that ended well, and I was just glad the dog hadn't been injured worse. Apparently my karma from volunteering at the animal shelter caught up.

Wednesday, February 25, 2009

King's To You

Well played, God. Well played.

Thursday, February 19, 2009

Flame Wars...Commence!

I'm a pretty easy-going, laid back, non-confrontational sort of guy, so I don't get involved in online flame wars very often. A few days ago, however, I managed to start one of my own.

I play online "Werewolf" (also known as "Mafia" and probably many other names) with a group of people. At the beginning of the game, the Game Master secretly assigns several people to be "werewolves", while the remaining people are innocent villagers. The game sequences through day and night phases. At night, the werewolves choose a villager to kill. During the day, the villagers attempt to discover who the werewolves are and at the end, vote to lynch someone, hopefully a werewolf.

Depending on how advanced you want to get, there are additional roles; our usual ones are an assassin (allows people to take kill or protection contracts), a detective (can investigate one person each night), and a necromancer (gives "dead" people a half-vote until the necromancer also dies).

Each of the special roles (werewolf/assassin/detective/necromancer) has a special user account they can log in with, so they can post messages while remaining anonymous. In addition, there is a visible list of every currently logged-in user. Here's where things got messy.

Last round, I wrote a program that monitored the list of logged-in users, recording when each one signed in and signed out--all public and freely-available information . I was one of the werewolves, so my priority was killing the necromancer and detective.

Right off the bat, the detective logged in, an action recorded by my program. Going through the log, I noticed that a certain user had signed out right before the detective logged. Right after the detective logged off, the same user logged back in. From that, it was clear that that user was the detective, and my werewolf buddies and I killed her that night.

At the end of the game, I didn't hide how I had discovered the detective's identity, and the flame wars immediately began. It wasn't explicitly against the rules, but was it unethical? Was it fair? Should someone use a skill not everyone had?

It was quite a heated discussion, but in the end, a rule was made against it and we moved on. Now that I think about it, it's like the recent discussion over the new swimsuits introduced in the Olympics. Everyone has the swimming skill, some better than others, but is the use of the new, high-tech swimsuits cheating or unethical?

Not sure. Of course, I tend to think that I can use whatever skills I can bring to the table, as long as they aren't against the rules or illegal, but that view didn't seem to be shared by many people.

PulseAudio fix for Ubuntu

On my laptop running Ubuntu (Intrepid Ibex), I've had difficulties getting audio to work simultaneously in both Firefox (Flash, to be exact) and my music players. I can play music in RhythmBox or Movie Player, but if Flash, running in Firefox, manages to grab audio, then the music players can't get it back.

The following steps from here fixed the problem. (As usual, the most time-consuming part was identifying exactly what the problem was. Fixing took a few seconds.)

$ echo "default_driver=pulse" >~/.libao
$ rm -r ~/.pulse ~/.asoundrc*
$ sudo apt-get update && sudo apt-get dist-upgrade
$ sudo apt-get remove libflashsupport
$ sudo apt-get install libasound2-plugins padevchooser libao-pulse libsdl1.2debian-pulseaudio

Reboot.

The instructions on the webpage were more detailed, described the purpose of each step, and included other things to check along the way, but in the end it came down to the above steps for me.

Thursday, February 05, 2009

Hunger Games

I just finished reading a book called "Hunger Games." Child warned me that the end was a cliffhanger (with no sequel written yet!), so I was a little nervous.

As it turns out, it was just a cliffhanger in the romance part of the story, which I couldn't care less about. The Hunger Games themselves were tied up nicely and satisfactorily.

Tuesday, February 03, 2009

Poor Jasmine

Poor Jasmine. She was backed into just a few months ago, and now another car ran a stop sign and poor Jasmine plowed head-first into it. At least it wasn't bad; no one was injured, and there's only minor damage to the hood and front corner panel, which should all be paid for by the other driver's insurance.

That was at 9:30 this morning. When Child was finally returned safely to work, I took the car down to a car wash to spray off some mud and salt before the insurance adjuster comes over. The car wash wouldn't take the dollar bills I had, but our bank was only three blocks away, so I drove over and got a roll of quarters.

That took about three minutes. Returning to the car wash, I found the intersection I had just passed through clogged with a tangle of car wreckage. The accident was so fresh that a police car that had been driving behind me didn't even know it had happened until we reached the intersection, at which point I pulled over, he saw the wreckage, and flipped his lights on.

The car wash was on that corner, so I pulled in and rinsed Jasmine off. I was halfway done before the first "dispatched" police car arrived, along with a fire truck and ambulance.

It wasn't until then that I realized how lucky Child and I were. Child wasn't hurt, the other driver wasn't hurt, and both cars were drivable. Child's accident could have been a lot worse. I said a prayer of thanks for Child, and tossed in a quick prayer for the people in the accident I had just passed. May God watch over us all.

Sunday, February 01, 2009

SSH Passwordless Authentication

Since I do a lot of website work, I have to log into a remote server I run fairly often. In addition, I wanted to set up some scripts that would automatically back up stuff from my local computer to that remote server, and vice versa.

However, logging in to that remote server requires entering my password, which is a pain as often as I have to do it, and which would make it impossible for the backup scripts to run automatically.

I found a great overview of the steps necessary to set up passwordless logging in through SSH, and they're pretty simple. I'm posting the link here just so I can find it in the future.

Zion

Six players. $1.20 in prize money, given out in 10 rounds of 12 cents each. (We're trying to make a point here, not make the kids rich.)

Each player has a card with two choices on the two sides: share the 12 cents, or take it all. Players make their choice, then simultaneously reveal their cards. 10 rounds are played, as previously mentioned.

If everyone chooses "share," the money is divided evenly between them. If 1-3 people choose "take it all," the money is divided evenly between them. If more than three choose "take it all," they simply lose the pot. (We could have been even more mean and said if more than one person chose "take it all," then they lost the pot.)

If everyone had chosen to "share," they each would have ended up with 20 cents. As it stood, at the end of the game, the winner had 16 cents, and it went down from there. (The winner was the only one to choose "take it all" on the first round, so he took 12 cents from that. The remain nine rounds, he earned his remaining four cents.)

Our goal was to illustrate the benefits of a "Zion" community. Moses 7:18: "And the Lord called his people Zion, because they were of one heart and one mind, and dwelt in righteousness; and there was no poor among them."

It's really true. If you could get everyone to "live in righteousness," then you really wouldn't have any poor people (materially OR spiritually).

Parab(ola/le)

parable: a short allegorical story designed to illustrate or teach some truth, religious principle, or moral lesson. From the Late Latin "parabola."

parabola: the set of points in a plane that are equidistant from a fixed line and a fixed point in the same plane or in a parallel plane. See parable.

So what does a mathematical construct and a short story have in common, besides their Latin (and from there, Greek) roots?

No clue. But a teacher in Sunday School today pointed out the similar roots, and I thought it was interesting. He made some sort of point, but my thoughts went a different direction.


I think this is a pseudo-mathematical illustration of a parable. The more we study it (x-axis), the more understanding we gain (y-axis).

However, parables are not meant to be perfect illustrations of a particular doctrine, they're simply rough teaching aids. Therefore, if you start to scrutinize a parable too closely, or interpret it beyond the original intent of the teacher, you start losing understanding, and can even go negative (understanding it incorrectly).

This isn't a particularly deep post, but it was a thought that interested me, so I thought I'd stick it out here...

Saturday, January 31, 2009

Would Not Buy Again.

So three weeks ago, Child had me buy a birthday present for her friend's son. I bought it off eBay from oddbanana, a power seller with a 99.2% positive rating out of almost 100,000 ratings. I didn't think I'd have any problems. Boy was I wrong.

Three weeks, no present, an email, and two support requests later, I opened a PayPal dispute for "non-receipt of item". It took a couple days, but oddbanana refunded the money through PayPal (all $15.50 of it), with no comment or message.

One minute later, according to my emails, they opened an eBay "Unpaid Item case" for the same item.

Wow. Just...wow. The only explanation for the whole fiasco that I can think of is that they're using some sort of malfunctioning computer system to run everything. Regardless, it's highly frustrating (if not particularly financially debilitating), and I better not get stuck with some "Unpaid Item" mark against me.

Friday, January 30, 2009

Sounds like a...fun...class

Class outline:
April 15th: Classroom instruction
April 16th: Test & go over different equipment in the morning
April 16th: Shooting at the ranger in the afternoon.
At first I thought it was a typo, and participants would actually be shooting on some sort of gun range, then I remembered it was for a "chemical capture" class (read: tranquilizer guns), so perhaps it's correct.

Either way, I'm glad I'm not the ranger.

Saturday, January 24, 2009

250 Pushups

I think there's a tipping point in any skill where you've learned enough or advanced enough that practicing becomes fun instead of a chore.

I think I'm at that point with pushups.

My standard pushup limit used to be about 20 before I'd start hurting and give up. At a family reunion two (?) years back, we had a pushup contest, and I think I got all the way to 30 or 35 before collapsing. A few days ago, however, I did 65 pushups in a row. My practicing is paying off, and now it's fun to see how many pushups I can do.

The past couple days I've been doing 250 pushups in the morning. Not all at once, I do a set of 10, 20, 30, 40, 50, 40, 30, 20, and 10. It's a great feeling, feeling like I'm actually in some semblance of shape.

Wednesday, January 14, 2009

Facebook Scrabble

A week or two ago, Child got interested in playing Scrabble on Facebook, so I signed up as well so I could play.

Facebook Scrabble is a little different from regular Scrabble. You're not allowed to play incorrect words, so there's no challenging of words. In addition, there's a built-in dictionary that you can check words before you play them.

Scrabble purists might squirm, but I can see why Hasbro changed the rules. In a potentially non-real-time game, and with no face-to-face playing, there's no way to prevent people looking up words, and as many words as they want, in a dictionary.

Child takes full advantage of the new rules. On the Scrabble homepage, you can enter in the letters in your hand and the webpage will spit out all possible words you can build from them. I lost miserably to Child, so I decided to build a program to help me.

My new Scrabble program will track the board and the letters in your hand, and on your turn, it will sequence through a dictionary of 174,000 words and find the highest scoring one. It takes bewteen 20 to 30 minutes to run on each turn, depending on how full the board is, which is acceptable since there's no time limit between turns.

A couple things I've learned:

1. If your letters are bad (read: 1 point letters, instead of the nice Vs, Qs, Ms, etc.) then no amount of help will get you good scores.

2. Those high point letters are better used on a triple letter score than a double word score. It's obvious in retrospect, but I've always shot for the double word without stopping to consider whether a triple letter might actually get me a better score.

Ute Supporter?!

Last night, Child and I took Child's dad to see City of Ember. He's a fan of Orson Scott Card, and apparently OSC gave the movie a thumbs up.

The movie started at 5:20. After we arrived at the theater, we realized we had a few minutes before the movie started, so we went across the parking lot and got some Coldstone's ice cream. The time: 5:10.

This morning I was reading through the news, and discovered the following: "Cold Stone Creamery is the latest business to pledge part of its proceeds to help the University of Utah's marching band play in the Inaugural Parade: 25 percent of your ice cream purchase from 5:00 to 10:00 [1/13/09] will go to the trip."

Aaaiieee! I just supported the Utes! My purchase of ice cream could have been the last few dollars they needed to make it to D.C.! What have I done?!

Ah, well. I suppose I should wish them well, they've earned it. Good luck in Washington, Ute band. May your spit valves never freeze shut!

Saturday, January 10, 2009

Ultimate Scrabble Word

Here's your Scrabble word of the day:

pharmacokinetic

If you play it along an edge of the board, where the existing letters are pharmacokinetic (bolded letters are already there [note how they are proper words], unbolded letters are the ones you add), then by my calculations, you should score 914 points.

(3+4+1+(1*2)+3+1+3+1+5+1+1+(1*2)+1+1+3)*3*3*3+50

Setting up a valid board that will allow the playing of this word is left as an exercise to the reader.

Tuesday, January 06, 2009

New Year, New Class

Child and I teach the 13-year-olds at church. Last year, our class was 5 girls. They were nice girls, but had apparently slept through a few too many lessons. Getting them to stop chattering with each other and pay attention was like pulling teeth. They didn't know whether Genesis was in the Old or New Testament, and Child and I didn't even bother asking them to recite a scripture from memory.

At the New Year, we got a new class. We now have three kids, although only two showed up for the first Sunday. Both go to private/charter schools, they were highly intelligent, quiet, respectful, answered questions, and volunteered to read. Due to a mix-up in lesson manuals, we taught the lesson that they heard at the beginning of January last year--and they actually remembered it. One of them still had the handouts from the lesson in his scripture bag! Our last class could barely remember if they had even come to church the previous week!

It'll be a change, that's for sure. I'm looking forward to it.

Thursday, December 18, 2008

Scottish Rabbit

Thursday, November 27, 2008

Howling Houses

Maybe it's time for a new apartment.

This apartment is small, old, very uninsulated, has only street parking (which makes our car a perfect target for eggs), and has taking up a repetitive mournful howling.

Normally this howling is bearable. However, this time, the house decided to start at 5:45 in the morning. This howling is loud enough to be easily heard even outside the house, a deep foghorn voice that makes the floors vibrate. It happens at one-minute intervals and the whole series lasts approximately the amount of time it took for water to carve the Grand Canyon.

Incidentally, it's water that causes it. We can actually recreate the noise by turning on the cold-water faucet of our bathtub. If you turn the knob just a little, no water comes out, but the pipes start vibrating and a mournful yodel deafens everyone in a two-block radius. Crank it up a little more, or turn on the shower, and you'll finally get the requested water.

Due to the nature of the beast, I figured it was one of our four-plexian neighbors running a dishwasher or something (at 5:45 in the morning...) but a desperate escape from the house followed by a circumnavigation showed our neighbors' windows to still be dark. In the morning (alright, it's technically morning, but in the REAL morning, when I SHOULD be getting up on a holiday, after staying up late the night before) I will actually knock on our neighbors' doors and ask if they have decided to take a four-hour series of one-minute cold showers at 5:45 in the morning. If not, Child and I might be moving to Draper a month or two before we planned on it.

Sunday, November 09, 2008

Is Better the Best?

In the good ol' days, it was easy. Good or Evil: pick one.

Nowadays, it's choose from the following: Good, Better, Somewhat Good, Mostly Good, A Little Better, Probably Not The Best, Better Than The Last One, Good Except For That One Part, Decent, Probably Bad, Obviously Bad, and a dozen more shades in-between.

All these choices and the sometimes fine distinction between them can make it difficult--if not nearly impossible to choose. However, almost as bad as making no choice is choosing one and not continuing to look for a better one. Those people take a short-sighted view. "I already made a good choice, so there can't be a better one." Or, "I already made a good choice, so why should I bother looking for a better one?"

"I make enough money in my minimum-wage job to pay for cigarettes, so why should I bother looking for a better job?"

"I learned enough in high school to pass my driver's ed and get a slightly-better-than-minimum-wage-paying job, so why should I continue my education?"

"My boyfriend doesn't beat me, and he doesn't cheat on me very often, so why should I look for a different boyfriend?"

"I've already loudly proclaimed my political opinion to anyone who couldn't escape, so why should I consider that I might be wrong?"

"My church teaches good principles, so why should I consider that there might be even more good principles?"

There is more knowledge on Earth than anyone can learn, more experiences than anyone can experience, and an incredibly limited amount of time. Choose what you learn and what you experience wisely.

Simply Selfish

Henry David Thoreau famously said, "Simplify, simplify." I've always wondered why he didn't simplify that to a single "Simplify," but our lesson in church today got me thinking of something else.

While simplification is an admiral goal, and one I've tried to follow with regards to material possessions, if taken to an extreme, it can be a very selfish course of action.

Want a simple, selfish life? Don't get married. Don't have kids. Don't have friends. Don't get involved in other people's problems. Always put yourself first. Don't stand up for anything, and for heaven's (which you don't believe in) sake, don't believe in anything.

Of course, you'll never know unconditional love, true joy, inner peace regardless of circumstances, the happiness from serving others, or anything else like that, but at least you'll have a simple life, right?

Pandora's Box

Last month, I went canyoneering through Pandora's Box in the Capital Reef area. Unfortunately, my long-time companion of three or so years of canyoneering finally bit the dust--or to be more precise, the sand. I was worming through a narrow crack and thoughtlessly left my camera case open. When I came out the other end, the case was full of sand and the camera was making funny noises. Shortly thereafter, it died a clicking death.

But I finally have a new camera! Almost identical to the old one, except with 1x more zoom (3x instead of 2x). This also means that I can finally plug in the memory card from the first half of the trip and get the pictures off it. Now, for your viewing pleasure...


Yes, these pictures are in reverse order. That's the way Blogger/I uploaded them, and I'm too lazy to reorder all 8.

This picture is halfway through the canyon. There were some sections that were very slot-y, but this was one of the more open ones. It still had some interesting rock designs, though.



I just liked the way this tree showed through the crack in the rocks.


This is actually the beginning of the slot part of the canyon. There was a little water at the bottom of the rappel, so we were switching from our hiking shoes to our canyoneering shoes.


Ironically, to get to the canyon, we had to climb to the top of a plateau. Here's a picture at the top.


This is what we had to climb to get to the top of the plateau. Before you get too impressed, people actually drive cows up it. It's hard to see, but there is a narrow trail--regardless, getting cows up it had to be an impressive feat. From a few bones halfway up, it was also apparently a non-perfect feat.


Going back in time, here is a picture from below the mesa. It was incredibly beautiful, which unfortunately doesn't come out in the pictures. As a matter of fact, I remarked to my friend that places like this was why pictures can never replace actually experiencing something. The scattering of stubby trees, loose boulders, crisp mountain air, amazing view...


And here is the view from the mesa.


There was a pretty long approach hike, so we started when it was still dark. It was beautiful seeing the sun come up over the mesa.

Friday, November 07, 2008

Acouchi

For all her surprising friendship with our neighbor's three dogs, Acouchi still does not like other cats.

We let Acouchi out the morning for a few minutes under close supervision. She eventually made her way to the backyard, realizing half-way there that she was being stalked by one of Bell's babies--now pretty much full-grown but still smaller than Acouchi (Acouchi is a good-sized cat).

At first it didn't worry Acouchi too much, but as the black cat continued to follow her, Acouchi finally stopped and had a staring match with him. Unfortunately, due to this staring match, she was unaware of a second cat sneaking up on her from the rear until the other cat had almost reached her. Acouchi finally heard the second cat and spun around, then realized she was surrounded. She hissed in several directions, then booked it back to our door.

Moments later, of course, she was back at the door wanting to go back out. Child and I decided to give her a bath, partly because she needed one, and partly because we hoped she would associate it with the outdoors and stop constantly whining to go out. She was not pleased with the bath, and spent the better part of the morning scowling at us.

Her day got worse. In the afternoon, Child brought over a kitten we are going to catsit for several days. If there's one thing Acouchi hates, more than dogs, more than full-grown cats, it's kittens. Acouchi hissed up a storm before fleeing to the bedroom, where I took her a chunk of cheese to apologize for bringing an intruder into her space.

Acouchi deigned to eat the cheese and I took her to our living room where Sushi was, and put her on top of a large box, out of Sushi's reach. She sat there and glowered at Sushi until Sushi fell asleep, then jumped down and ate Sushi's food. That accomplished, she crept up on Sushi but Sushi woke up, a crime apparently punishable by severe hissing and spitting. Sushi was still a little groggy and wasn't sure what was going on, and I told Acouchi to lay off. She jumped up on my desk in a huff and started shedding hair into my computer's fan, hoping to fry it like my last laptop, until I got her favorite cat toy and spritzed it with catnip to placate her. That granted me a few minutes of forgiveness, and both she and Sushi are now asleep. We'll see how the next few days go...

Tuesday, November 04, 2008

Voting

Child and I voted.

How do you vote in the Presidential Election and not vote for a president?

We also went to Krispy Kreme and got a free donut for having an "I Voted" sticker. Not for voting, because apparently that's bad, but for having the sticker.

NaNoWriMo Update

Well, NaNoWriMo is still going. I think today will be the first time (this is the third attempt) that I've completed five consecutive days. (I started a day early because the website where I'm posting my text started displaying a word a minute starting the first minute of the first day. If that made sense.)

Granted, I cheated a little--yesterday I was able to steal a few hundred words from the short story that I'm basing my novel on. Regardless, my novel is up to 8007 words now.

On a different note, I still have pictures from my last canyoneering trip sitting on a memory card. My camera died on that trip (my fault, I crawled through a crack with the camera case open and the camera tried to eat some sand). My laptop has a built-in card reader, but unfortunately Ubuntu can't or I don't know how to get it to recognize it. Although I like Ubuntu and the idea of a free operating system over Windows and all of Microsoft's dirty business tactics, I'm no zealot and don't mind saying that there are a few inconveniences that you have to put up with.

I COULD just buy a USB card reader, but I need to buy a new digital camera, which would negate the need for separate card reader. After looking at new cameras, I decided that I didn't want a new camera for two main reasons.

One, I can get a used one for a quarter of the price.

Two, at 3.2 megapixels, my old camera's pictures were plenty large and clear. If I got a new 8 or 10 MP camera, I would only gain the ability to blow my pictures up to GIANT poster-size instead of REGULAR poster-size, and each picture would take up three times the space on my harddrive.

Well, to be fair, with a new camera I'd probably get a little more zoom, and possibly slightly better video-taking abilities, but it's still not worth the extra price and increased filesize. Who knows. If I don't manage to win an Ebay auction in a few days, I might cave in and buy the new video recorder/camera I was looking for at Walmart.

Update: won the auction. Camera coming soon! When it does, I'll post pictures of the canyoneering trip.

Friday, October 31, 2008

Halloween

http://www.ksl.com/index.php?nid=148&sid=4668843

Read that and tell me it's not a company trying to pull a marketing scam. Or maybe that's just obvious, and the joke's just going over my head.

To save you the time reading the link, it's a theater company that reported (today, on Halloween) that they hear ghostly footsteps on the stage, and a wooden sign flew out the window or something, and a few months ago some employees watched a mug lift in the air and crash into the wall. (Sure you didn't mean "floor" instead of wall?)

On a different subject.

We live in a little house, which is actually a four-plex. In the kitty-corner downstairs apartment, there's a lady with three dogs. There's a small, yappy chihuahua; a medium-sized, yappy terrier; and a fat, old (thankfully quiet) heeler of some sort.

Anyway, Acouchi's favorite pastime is sitting on my desk, watching the dogs out the front window. She's experienced them in person once before, when they decided to take advantage of our front door being propped open and came into our living room, driving Acouchi up the wall (literally, and from there onto an end-table). That wasn't too surprising, since Acouchi is terrified of everything. Child brought home a tiny kitten once, and Acouchi wouldn't come out from under the bed for hours.

However, apparently Acouchi has learned a little more about the dogs' personalities from watching them so long. I had the door propped open again while I brought stuff in yesterday, and Acouchi took the chance to explore the front porch. The chihuahua spotted her and raced towards her, yapping. I expected her to dash back inside, but to my shock, she lunged at the chihuahua!

Startled, the chihuahua jumped back, then cautiously came forward again and they sniffed noses for a minute. I was still in shock watching her, since this was incredibly out of character for our cat. Then the fat heeler came over, and Acouchi sniffed noses with her too before the neighbor came over to get the dogs back.

Child suggested it was because our neighbors (different neighbors) have a crowd of tough, outside cats who constantly boss the dogs around, and Acouchi may have seen how they did it and realized she could too. Either way, after I brought her back inside, she spent the rest of the day meowing and pawing at the front door, wanting to go back outside.

Sunday, October 26, 2008

Maslow and Mormonism



I had an interesting epiphany today at church. The question someone raised, and which I've heard raised before, is "Why do Latter-day Saints spend money on building temples, when that money could be used to, say, feed poor people?"

I've never really had a good answer for that, until today. In 1943, Abraham Maslow outlined a hierarchy of needs, where in general, the most basic needs need to be fulfilled to move to higher levels of needs. For example, you're not going to worry about your job (a second-tier need) while you're not getting air because you're drowning (a first-tier need).

The idea is that every level of need must be fulfilled for a person to be a well-rounded person. The top needs are actually called "growth" needs, which meshes nicely with the LDS belief that the whole point of our earthly existence is to learn and grow. Just because a level of need isn't as basic as another, doesn't mean it's any less of a "need."

The epiphany was this: there are people at every level in the pyramid, so the church must address every level. Giving all their money to the poor focuses on a single level of need, and ignores other needs that are just as real and whose fulfillment is just as vital from an eternal perspective.

I think the reason the question is raised is because it's difficult for people with more basic needs to see the importance of fulfilling higher-level needs. It's natural for the person sick with palsy to think his physical needs take precedence over someone else's spiritual needs, and the bigger the gap between the needs, the harder it is to see the importance. However, Jesus knew that all levels of needs were important, and didn't spend 24/7 healing people and raising the dead, he also took time to teach.

Besides, if we take that approach that "no one leaves the bottom level until everyone leaves the bottom level," we're not only condemning everyone to a life on the bottom level, but we're ignoring reality. Realistically, there are people with every level of need, and those needs must be addressed.

Also, I would guess that the higher up the pyramid you are, the easier it is to pull other people up from the bottom tiers. It's a matter of leverage. If you gave every penny non-essential for your own survival to someone less fortunate, you'd never get an education, never have a family, never get a decent job. However, if you took a long-term view and saved some of that money, you could get all of the above, and end up helping far more people in far more ways than if you had taken a short-term view. Could the Church help four million people in 85 countries in one year if it took a short-term view on things? I doubt it.

The answer, as it often is, is moderation and a balanced approach. Focus resources on each level of need, proportionate to the needs. Give food to starving people, but save some money to build thrift stores to provide people with jobs and training, but save some money to build chapels where people can find spiritual fulfillment, but save some money to build temples where people can find beauty, inspiration, and self-actualization. In the eternal view, every need is as essential as the next.

Lots O' Things

Websites I'm currently working on:

1. http://circadiansaga.com/ I'm participating in National Novel Writing Month (NaNoWriMo), where I'll attempt to write 50,000 words in one month. I am making this website to automatically display one word of my work per minute, every hour of every day, until the end of November. I figure the more people that might be reading what I write, the more motivation there will be to continue and the less likely it will be that I'll give up.

2. http://utahvalleyanimalshelters.org/ The South Utah Valley Animal Shelter has started a joint project with the North shelter to make a combined webpage for people looking for a Utah County animal shelter. This page will then direct people to the proper website, North or South, for their area. Incidentally, if you click the link for the South shelter, I also built that website, but it's more-or-less done so I won't include it on my "Current" list.

Also, if you're a police officer, veterinarian, or someone else with access, you can log into the backend of the new website to an online animal license management section.

3. http://www.stormhorse.com/mole/ I built this website for Child's Saboteur games, and update it with pictures each time we play.

4. http://www.alpaca.net/ This is my latest weekend project. I hesitate to put the URL up because I had nothing to do with the "look" of the site--my work was in building them a back-end database-based manager for their alpaca herd. Granted, I'll also be replacing their "For Sale" and "Herdsires" pages with pages automatically generated from the database, but they wanted me copy their look-n-feel on those pages as well, so visually, nothing is really mine.

5. Top Secret URL. I have a business idea that I want to do, and I've started work on the website, but there's nothing I want to show yet. Sorry.

6. No URL. Child and I have been working on inventing a game, and I'm using making an online version of it as an excuse to really learn AJAX. However, it currently isn't accessible from anywhere but my computer. Since it's more of a learning experience for me, it'll probably never see the light of day, but it's still taking up time.

7. No URL yet. Child is working on starting an infant massage business, and I'll be making the website for it. Currently in the "thinking about what to do" stage.

8. And just to finish off the list, add another full 8 hours of work each day in my full-time job, where I work on dozens of different websites. With all this laid out, can I be forgiven for slacking off on blogging for a while?

Wednesday, September 17, 2008

Old Fashioned

So if you really need to buy a car, he says, "Go back to the old days a little bit and save up some money and have a down payment."


It's been harder getting credit to buy a car, so this is the solution a car salesmen offered.

Is saving money and making down payments really old-fashioned?

Wow.

Monday, September 15, 2008

Financial Advisors?

Speaking of Bank of America buying Merrill Lynch:

The deal will create "a company unrivaled in its breadth of financial services and global reach," Bank of America said.

"By adding Merrill Lynch's more than 16,000 financial advisers, Bank of America would have the largest brokerage in the world, with more than 20,000 advisers and $2.5 trillion in client assets," the bank said.


(CNN.com)

Wait--tell me why I'd listen to a financial advisor from a company which lost $17 billion and 65% of their share price in the last year?

Saturday, August 23, 2008

PHP-ExcelReader Solutions

PHP-ExcelReader is great for working with Excel spreadsheets in PHP code, but it has a few bugs and tricks. Here's a couple that I've run into, along with solutions.

Problem: Fatal error: Allowed memory size of [varies] bytes exhausted (tried to allocate [varies] bytes) in...

Solution: In my case, I was trying to work with a 1.3 MB file, and PHP-ExcelReader used the full 32 MB of allowable memory before dying. Yeah, apparently it's got memory issues. Anyway, increase the amount of memory allowed to PHP.

First, try adding the following code in your PHP script:
>ini_set("memory_limit", "64M");

If this doesn't correctly up the memory limit, due to some restriction on your host, see if you can edit your php.ini file directly (mine is located /etc/php.ini). Change the line that says "memory_limit = 32M" to something larger, such as "memory_limit = 64M"

Problem: Dates

Solution: My dates showed up in my spreadsheet as 06/03/09, but were obviously stored differently in the backend of Excel. When I would get the value from PHP-ExcelReader, they were simply numbers (39967, in the case of 06/03/09). A little research showed that the numbers were days, offset from (discovered by trial and error) 12/30/1899. Not sure if this will hold for everyone. Anyway, to convert them to proper MySQL date format, I used the following MySQL code:
>FROM_DAYS(39967+TO_DAYS('1899-12-30'))

Problem: Cells missing values

Solution: Perhaps this should be classified more as a warning than as a bug. Then again, warnings don't bite and bugs do, and this bit me.

When reading through the cells in a row, don't use "foreach". The cells will have sequentially numbered keys, but there could be numbers missing!

For example, a row of data in your spreadsheet like so:
aaa bbb ccc ddd eee
--- --- --- --- ---
111 222     444 555

...will result in a row of data like so:

array(1=>111, 2=>222, 4=>444, 5=>555);

Note how if you're sequencing through it with "foreach", expecting to get a blank value for key "3", you won't get it.

Old code: foreach ($row as $col_num=>$cell)
New code: for ($i=1; $i <= $num_cols; $i++)

Wednesday, August 13, 2008

It's your own fault, cat.

Our cat, for one of those reasons known only to the perpetrator, decided to go to the bathroom in our living room instead of in her litterbox. As a result, I locked her in her private room (without TV--remember that, parents, when you send your kids to their room!) which is a closet off our kitchen.

Acouchi decided to retaliate by kicking over her water dish, which I had newly filled this morning, but that plan backfired when she found herself standing in a pool of water. The only retreat was into her litterbox, which promptly clumped with surprising efficiency around her wet feet. Unaware of this, I finally decided she'd learned her lesson and I let her out, at which point she promptly streaked across the kitchen trailing litter.

She was heading for our bed, but I snagged her and carried her to the bathroom, where I filled the tub with an inch of water. Did you know that water is about as effective on cleaning litter designed to clump when it gets wet as it is on oil? I finally dried off Acouchi and let her go, but now I have a closet with a wet floor smeared with kitty litter.

And my wife's in California for 13 more hours.

Come home soon!

Thursday, August 07, 2008

Thesis Defense

My thesis defense is completed. I'm done! ...except for chasing down a dozen signatures, printing off copies of my thesis, running forms to various offices...I think it was easier to write the thesis.

Tuesday, July 29, 2008

Englestead

On July 26 a few friends and I hiked Englestead Canyon, dropped into Orderville Canyon, and finally dropped in the Narrows in Zion's National park.

Englestead was fun because of a giant 300-foot (91 meter) drop at the very beginning. You don't quite realize how high 300 feet is until you're hanging over the edge, and it takes well over four seconds for a falling rock (or body) to hit the ground...

Below is a picture at the head of the canyon. It's amazing how abruptly it starts, going from a slight slope to a sudden, 300-foot drop.


Below is us gearing up for the drop. Putting on harnesses, unpacking ropes, packing up everything else. We had a 300-foot rope for the rappelling side, and a 100- and 200-foot rope for the pull cord.


Here's our first person going down. The descent took probably 3 or 4 minutes, depending on how quickly you went.


Looking down the Big Wall from the top. I'm not even sure if you can see the bottom in this picture.


Once in the canyon, we were met by BOUSs (Bugs Of Unusual Size).


We had quite a few more rappels as well, but none close to the first rappel.


Once we dropped into Orderville canyon, water started appearing and things started getting a little greener.



Watch your head.



In the lower part of Orderville, we ran into a lot of tourists that hiked up the Narrows, and once we reached the Narrows themselves it was postively crowded.

Friday, July 18, 2008

Goals!

A couple weeks ago, I realized that I had a really hard time following through on things. There's a lot of things I want to do, but I'm terrible at sticking to a schedule and meeting goals. Here's just a sampling of things I'd like to do:
  • Exercise regularly
  • Write regularly
  • Regular morning prayers
  • Wash dishes regularly instead of letting them build up
  • Learn Spanish
  • Learn guitar
  • ...and several other things I can't think of at the moment.
My current goal is to become better at keeping goals.

I decided to start with something easy: a regular exercise program. Coincidentally, Lifehacker just featured a website completely devoted to helping people get into a push-up routine. Theoretically, if you follow the program, you'll end up doing 100 consecutive push-ups after six weeks.

That's my first step. Other goals will follow.

Disappointment

I didn't win the Writers of the Future contest, despite being a finalist.

Ah, well. On to the next story.

Recover Deleted Ubuntu File

While working on a Firefox extension, Firefox deleted a file I was using, "overlay.js". It was gone, but fortunately, a few minutes previous, I had manually deleted a temporary backup file that my text editor was using, "overlay.js~".

Since I had manually deleted it, it should have been in my Trash Can, but it wasn't, probably due to the "~" at the end of the filename which indicated that it was a temporary file. Even "Show Hidden Files" didn't make it appear.

However, by going to a command prompt and viewing my trash folder there, it appeared:

ls: ~/.local/share/Trash/files

So I'm not sure why the Trash Bin didn't show it, but it was there.

Thursday, July 17, 2008

Massage Chair!


For the last month or so, Child's store has been participating in a contest sponsored by one of their suppliers. Every time one of their dealers' sales associates sat a person down in a massage chair for a test drive, the customer could fill out an entry form and their name would be entered in a drawing for a free chair. If their name was drawn, both the customer and the sales associate would win a massage chair.

Last week, right before we left for our vacation to Texas (more on that later), Child received a call from her boss. "You won!"

Child screamed. We were in the car, stopped at a stoplight with the windows down, and got some curious looks from nearby cars. I rolled the windows up. Child was still screaming.

In short, Child had won a $4,000 massage chair.

Child's boss called up the customer who had won the chair, an older gentleman, but had a hard time getting the idea across.

"Sir, you won a free massage chair!"
"What are you selling?"
"Nothing! You won a free massage chair!"
"Yeah yeah, but what's the catch? I have to pay 'shipping' and 'warranty costs,' don't I."
"No, it's totally free!"
"Look, just tell me what you're selling."

Keylogger Firefox Extension


This is my latest Firefox extension I'm working on. There's been too many times when I've lost a post on a message board, or an email, or something similar because my browser crashed. This Firefox keylogger will record that, so I can retrieve the lost text. I added the "Minimum string size to log" so it won't save really short text--like passwords.

Official Firefox add-On page: https://addons.mozilla.org/en-US/firefox/addon/8261

Quick-link to download: http://stormhorse.com/keylogger-1.1-fx.xpi

Updates

It's kind of curious how the more stuff that happens, the less regular I am about updating.

First things first, I can't even remember if I already posted about this or not, but I have a full-time job now. It's doing web programming with a real-estate company in SLC. I go into work on Mondays, and work from home the rest of the time. That's fortunate, because the office is 45 minutes of nasty interstate away, and I wouldn't have taken the job otherwise.

My advisor isn't too pleased--I know he's afraid I'm going to stick with web programming instead of getting into robotics, which would be a waste of my M.S. degree. However, my brother-in-law is working on starting up a robotics company, and I'm hoping he'll need an employee soon. If that's the case, I don't want to be committed to a more permanent job.

I think I'll put each chunk of update into it's own post. No one likes reading longs posts.

Saturday, July 05, 2008

Give It An Hour...

I went to the shelter this morning. There were only two workers there, and they had been the only two working yesterday (the Fourth) as well. Apparently everyone else had taken a long weekend.

Experienced Employee had been warning New Employee that the Fourth was a crazy-busy time, what with all the pets getting scared by the fireworks and running off. When they had arrived at the shelter that morning, however, they had been surprised to find a single cat in Intake.

"Give it a few minutes," I said. "Animal Control is just starting their day."

A few minutes later, Spanish Fork pulled up with a dog. Then Provo. Then Springville. Then County. Two hours later, we had a packed Intake room and were processing dogs left and right, looking up microchips, and calling owners.

One guy had been watching his friend's dog, and it had escaped. Not only did this guy have to pay the impound fee, but the dog wasn't licensed, so he had to pay for a rabies shot and license as well. I wonder what his friend would think when he got home and found out his dog had been licensed in his absence?

I called another owner, and he informed me the dog belonged to his son. "Oh. Can I talk with your son then?" I asked.

"He's a minor," he said. Okay. Does SOMEONE want to come get the dog?

The man mentioned that his son was planning on breeding the dog, a female German Shepherd, while I was looking at the computer screen. Apparently the dog had been picked up by Animal Control in March, April, and now July. Three impounds meant the release fee was now $70, but it irked me that someone as irresponsible as this son obviously was, was planning to bring a whole new crop of dogs into the world. Take care of the one dog you already have, yeah?

Thursday, July 03, 2008

Speed Racer

This evening, Child and I saw Speed Racer. (Tiny spoiler alert.)

Let me stop here and say that sometimes, Child and I have very different taste in movies. She likes things like "depth" and "plot," while I go more for things like fat men spinning ninjas around over their heads. It was funny, because while he was doing it, throwing stars started flying out of the ninja's clothes, then his car keys flew out and impaled themselves in the wall! Ha ha!

So, yeah. I liked the movie, while Child thought the only thing funny about it was me thinking it was funny. :)

Line of Fire

Child and I live in a four-plex. This morning, we were walking to our car when our neighbor, who was also the landlords' daughter, walked by.

"Laying low? Out of the line of fire?" she asked.

I stared at her. "Is something going on?" I asked.

"Oh, if you haven't heard, I probably shouldn't say," she said, and kept walking.

Aaiiiee!! What?! What's going on? Do we need to worry? Is it something to do with our apartment? Will we be living on the streets tomorrow?!

Tuesday, July 01, 2008

Programming

In today's digital age, knowing how to program is a great ability.

In the past couple months, I've built Google gadgets to show Child and I how much money we have left in our bank account, and how many minutes we have left on our phone plan (see below).


(Most of the content [text/images] is grabbed directly from our account at tmobile.com. The black and white bar across the gauge is a custom addition, however. It marks where we should be for the time in our billing cycle--currently we have minutes to spare.)

I've also built custom RSS feeds for some forums and sites I frequent. This has a downside, however. In the past, whenever I'd get bored, I'd browse my collection of sites. Now, however, any updates to the sites are delivered right to my door, so it takes me 10 minutes to scan all new content, and I'm bored again.

My most recent project has been learning how to build Firefox 3 extensions. As my first example, I built a word-replacement extension. It can run automatically, or you can run it per-page from a right-click menu item. It replaces a list of words with replacement words on all webpages you view. Good for cleaning up forums with a lot of bad language, replacing common misspellings or abbreviations, etc. Something maybe parents might be interested in.



The first comment someone posted after I submitted the extension to the extension-directory was as follows:
First- I find this hysterical... not because it exists, but because I have a list of friends that I could get to transfer from IE to Firefox just for this extension. (I live in Utah- and all my friends are Mormons- turns out the stereotypes are true)
This person doesn't know that I'm also a Mormon living in Utah. :)

I found the comment amusing, but I'm really not sure why people are so (egotistical? self-centered? close-minded?) that they think everyone else in the world shares their exact same moral standards.

I don't laugh at, look down on, or denigrate your use of language on your (website, blog, whatever). You didn't ask me to read it, and I accept you for who you are. So why do I get laughed at or looked down on for holding to my own moral standard?

Friday, June 27, 2008

Polygamy

Does anyone else find it ironic that the American Public is so rabidly against polygamy when our culture (primarily media such as movies, sitcoms, and music) implicitly condones, if not outright advocates sexual promiscuity?

I don't think you could find a bigger double-standard if you tried. Sure, be outraged about exploitation of minors or people being forced into polygamy against their will. That's fine--and the only real reasons I could find that anyone should be concerned about the FLDS compound.

But don't complain about the institution of polygamy itself. For the Christians: at times it's condoned by God himself in the bible. Go look it up. For the secularists: at least when polygamists sleep around, they do it after being married and the man sticks around to support his family.

Despite my own belief that the Lord has commanded that we NOT practice polygamy at the current time, I do NOT believe there is inherently anything wrong with it.

Saturday, June 21, 2008

I lied. And I want the dog back.

When I arrived at the shelter, it was 9:15 and the shelter was still closed. I went around back and only found one car there. I knocked, and Pat opened the door. Apparently the person who was supposed to open with her (at 8:30--a half hour before the shelter officially opens) called to say she would be late...for about the 10th time in the last month.

Even worse, she didn't call Pat to tell her because she didn't want to face Pat's wrath, but called the shelter and left a message, knowing that no one answered the phone before 9:00. Something tells me this person will not work at the shelter for much longer.

As a result, Pat was glad to see me, because then she could open the shelter and call the inmates to come over and start working. When the phone rang, I answered it and there was a lady looking for a dog. Apparently, her daughter-in-law had gone into the hospital, and the step-father was stuck with caring for a half-blind Jack Russel terrier. As far as she knew, he had tried to get it euthanized at a vet clinic, they had refused because it was healthy, then he had gotten rid of it somewhere else.

The problem was that she didn't call it a Jack Russel, she said it was some strange breed, and I didn't see that breed in our book of occupants. I told her we didn't have it, so she said she would keep calling around.

However, later that morning, the step-father came in. He didn't beat around the bush. He walked up to the counter and said, "Last night I brought a dog in. I said it was a stray, but I lied, It's my step-daughter's dog and now I need it back."

Personally, I though we should have charged him for the owner release that he should have paid for the previous evening, then charged him for an adoption. However, Pat let him off easy with just paying for a night of boarding and a rabies shot (we couldn't even charge for the licensing since he lived out of our jurisdiction).

As he filled out the paperwork to get the dog back, he told us what he had done. Apparently, he hadn't been looking forward to caring for this dog by himself for an indefinite period of time, so he had taken it to a vet clinic to get it euthanized. They had refused since it was a healthy dog. Failing that, he decided to bring it to our shelter and claim it was a stray, but asked the vet clinic to say they had euthanized the dog if his wife called. They had refused that also.

Predictably, his wife had called the vet clinic, but all they could tell her was that her husband had taken the dog to a shelter somewhere. She didn't know which one it was, so she had been calling around. Apparently she had finally put enough pressure on him, and he came in to get it back.

Some people are crazy.

Incidentally, a second lady called asking if we had her cats. According to her, he had been dumping horse manure in her pasture, so she yelled at him. He had retaliated by trapping her cats and taking them to the shelter so she had to pay to get them out. She called him on the phone to yell at him, then he came over to her house to yell at her. Then he had apparently trapped her cats again, and she pondered aloud the possibility of going over to his house to beat him up. I told her to wait until he came to her property again to do that. :)

Friday, June 20, 2008

Fox-Face

So what kind of dog is this? It has the shelter a little stumped.

Monday, June 16, 2008

Underhanded C Programming

A couple days ago, Slashdot posted a link to The Underhanded C Contest. The idea is to write a program that redacts part of an image while making it possible to recover the lost information. The trick: it has to look innocent to another programmer reviewing your code.

My first version has the following output:

BeforeAfter

Here's the pertinent part of the code:

Redact to black (the "right" way):

p.rgb[R] = 0;
p.rgb[G] = 0;
p.rgb[B] = 0;

Redact to random noise (an acceptable way, see image on right):

p.rgb[R] = rand();
p.rgb[G] = rand();
p.rgb[B] = rand();

Nefarious redaction to random noise (see image on right):

p.rgb[R] ^= rand();
p.rgb[G] ^= rand();
p.rgb[B] ^= rand();

The key is using "^=" rather than just "=". The "^" will perform a bitwise XOR, and XOR has an interesting property. If you XOR A with B, and XOR the result by B a second time, you get back A.

So all we have to do to get the proper image back again is use the same sequence of random numbers, and that's easier than it sounds. It's customary to seed the random number generator using the following code:

srand((unsigned int)time(0));

But the file we're spitting out has the timestamp it was created--the exact time we're using as the seed in our RNG!

(If you're worried about the timestamp changing as the file is copied and passed around, then simply embed the time as a comment in the file--not nefarious at all.)

Wednesday, June 11, 2008

Moonshine?

I swear our neighbor just had moonshine delivered to their door. Child and I are leaving this morning for Wyoming for my grandmother's funeral, so I was up early packing things in the car. A flatbed pickup truck pulls up in front of our fourplex, and an old man in jeans and a jean jacket gets out. He walks around the passenger side, opens the door, and pulls out two quart Mason jars of clear liquid. He nods and walks towards our neighbor's door, while I head back inside. As I look back, I can see into his truck cab, and there's several more quart jars, along with a few gallon jugs. What other clear liquids get delivered in quart Mason jars? It has to be moonshine.

Saturday, June 07, 2008

Family Reunion

Well, Grandma's in the hospital. As a result, the family reunion got moved from Colorado to here in Provo. At least everyone already was planning on gathering, so they can all see Grandma.

In other news, Child's coworker called up the manager of the store late at night to tell her that he was quitting, effective immediately. I don't think he warned her he was leaving rather than just disappearing out of any kindness of his heart, since he and the manager hate each other, it was probably just to gloat.

It turned out to be a bad move, however. The manager promptly drove down to the store, where she found that this employee had stolen not only a carload of products from the store, but also some files that showed he owed the store owner money, as well as other customer files. On top of that, the owner had bought a new car and had sold this employee his old one, since the employee's car had been impounded a few weeks previous, and the employee was planning on taking off without paying for that.

And last but not least, the Rent-A-Center had called the store a couple weeks ago to verify this employee's job, so the manager decided to call them back and let them know the employee had been planning to flee the state and head to the west coast. As it turns out, this employee had about $5,000 of Rent-A-Center stuff in his moving van that he had been planning to take.

All sorts of excitement! Especially since the owner is out of town at the moment. And guess who gets to deal with everything, covering for this now-missing employee. The manager of the store, whose responsibility it is? Of course not! Child! And since we're not longer going to be in Colorado, the manager is able to call Child to come in whenever she wants, even if we still have a family reunion going on.

Wednesday, June 04, 2008

Previous Post

Yes, that previous post was grossly oversimplified, completely inaccurate, and highly one-sided.

Still, that's how I felt.

:)

Frustration.

A = B. B = C. Therefore, A = C.
I don't believe it.
Why not?
I just don't.
But why?
Because I've seen cases where A != C.
Did both A = B and B = C in those cases?
I don't know. I don't have that data.
Well, okay, but in cases where A = B and B = C, then A = C.
I don't believe it.
Gah!

Tuesday, June 03, 2008

Weird Clocks

At the shelter today, three volunteers were giving a dog a bath. When they were done, they stopped at the clipboard on their way out to sign on. On the clipboard there's a place that says, "Sign out time."

The girl who was signing out looked at that, then up at our analog clock at the wall. It was one of those dime-a-dozen Walmart clocks, big white circle, black hands, you know the kind. She stared at the clock for a minute, then looked at me. I kid you not, she said, "What time is it?"

I looked at the clock. "Uh, 3:45?"

She bent over and wrote it on the clipboard. "Those clocks are weird," I heard her mutter.

Are analog clocks really that old?

Getting Money? Easy. Giving? ...

Yesterday I posted about raising $700 for Aspen and Patches. That turned out to be the easy part.

This morning, Child and I drove to Zions Bank with $700 in hand to deposit in the Aspen Granath Fund. Our local (Provo) branch couldn't find any record of the fund, so they started calling every branch in Ogden to see if anyone else knew of the fund. We're sitting in the drive-through this entire time. 20 minutes later she comes back. "None of the other branches have record of the fund."

Okay. We now have $700 and no one to give it too. We'll try the bank again tomorrow--hopefully it's just taking a little while to propagate through their system, or perhaps Aspen's dad just hasn't gotten around to setting it up yet. Worst case scenario, we'll get someone up Ogden-way to hand deliver it.

Monday, June 02, 2008

Amazon

Word on the street is that Amazon wants to fly me to HQ for another interview. A little bird said they might fly Child too if I ask nicely.

To Amazon, or not to Amazon?

Aspen and Patches

Today, Child was reading a story about a cat, Patches, who needed an amputation. The owner, Aspen, was selling lemonade to earn the money for the operation. The operation was expected to cost $500, although it could have gone as high as $700.

Child suggested I use the donation capabilities of http://ucpets.com, so we put a notice on the homepage that all donations during the next week would go to Patches.

It took about 4 hours. Donations from KSL and Standard readers poured in, and we reached $700 and then some. The power of good people in large numbers can't be underestimated!