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.