Friday, May 06, 2011

Yard Sale!

In about a week, my dad will be driving from Utah to Mexico to take part in a service project.  On the way, he's going to stop here in California to pick up my brother and help with some projects around the house. 

One of those projects is trimming some palm trees.  He's bringing a chainsaw, but until today I haven't had much luck finding an extension ladder.  On our way out the door to visit the beach, however, we spotted a yard sale literally a block away from our home. 

Normally I never stop at yard sales, but for some reason I decided to pull over, even though we were late.  There, lying in the grass, was an extension ladder!  And a dolly, which I've been wanting (probably thanks to all our moving), and a carpenter's square, and a little tricycle, and some horseshoes.  Thanks to Child's shrewd bargaining, we got the whole lot for $57.  Definitely a good find.

Friday, April 29, 2011

Punishment

Day 1 Friend: "Could you do me a favor? I need someone trustable and unswayable such as yourself to change my minecraft account password and not give it back to me until after finals. If I try to convince you to give it back to me before the semester is over, just tell me to work on my homework or to do something productive."
Me: "Sure. Done."

Day 2 Friend: "The new minecraft update is out! Let me have the password, just to check it out. Pls?"
Me: "No."

Day 3 Friend: "Man, giving my minecraft password to you was both the best and worst decision, depending on how I'm feeling about it. I know you'll never give it back, and so I'll have to stay on task... but then I know I'll never be able to convince you to give it to me either. Well now, you should try the game out yourself. heh heh"
Me: "And turn into an addict like you? Nuh uh."
Friend: "I'm not an addict! I like wasting time by assembling virtual blocks in fun shapes."

Day 4 Me: "I'm changing your profile picture to a picture of Sean Hannity." (Okay, maybe I baited him a little.)
Friend: "Curses! You'll ruin my reputation!"
Me: "Well...I can make it Glenn Beck if you'd prefer."

Day 5 Friend: "Can I minecraft for a bit? I want to check out the new features."
Me: "No."
Friend: "Dreeeeeek!"
Later Friend: "I'm dying of productivity, I've already gotten 2 assignments done early. Just a little minecraft wouldn't hurt..."

Day 6 Friend: "Can I have my password? I have nothing to do this weekend."
Me: "Except study?"
Friend: "Study? I'm done with homework!"
Me: "I would have thought you'd have forgotten about minecraft by now."
Friend: "Well I've given up trying to guess the thing you changed the password to."
Later Friend: Offensive emoticons
Later Friend: "I'll buy you your own account, just give me the password"
Friend: "I thought I could trust you"
Friend: "WHY THE HECK DID I DO THIS!"

Day 7 Friend: Suspicious silence
Day 8 Friend: Suspicious silence
Day 9 Friend: Suspicious silence
Day 10 Friend: Suspicious silence
Day 11 Friend: Suspicious silence
Me: Checks minecraft account. Can't log in.  Friend must have reset password.
Me: "Can you look me in the eyes and say you haven't played minecraft in the last week?"
Friend: "A person needs balance in their life..."

Right-handed rotation matrix for roll/pitch/yaw

Specifically, an three-dimensional orthogonal matrix corresponding to a counter-clockwise/right-handed rotation where roll is the rotation about the x-axis, pitch is the rotation about the y-axis, and yaw is the rotation about the z-axis.

You wouldn't think this would be hard to find online, but go figure.

Thanks to Phaedrus for his explanations and...well, doing most of the work.

Note: this matrix effectively yaws first, then pitches, then rolls.  For the opposite order (and the one I ended up using), look below.

[ cos(pitch)*cos(yaw) -sin(yaw)*cos(pitch) sin(pitch) ]
cos(yaw)*sin(pitch)*sin(roll)
    + sin(yaw)*cos(roll)
-sin(yaw)*sin(pitch)*sin(roll)
    + cos(yaw)*cos(roll)
-cos(pitch)*sin(roll)
-cos(yaw)*sin(pitch)*cos(roll)
    + sin(yaw)*sin(roll)
sin(yaw)*sin(pitch)*cos(roll)
    + cos(yaw)*sin(roll)
cos(pitch)*cos(roll)


 And to put it another way:

//Top row
rotation[0][0] = cos(pitch)*cos(yaw);
rotation[0][1] = -sin(yaw)*cos(pitch);
rotation[0][2] = sin(pitch);

//Middle row
rotation[1][0] = cos(yaw)*sin(pitch)*sin(roll) + sin(yaw)*cos(roll);
rotation[1][1] = -sin(yaw)*sin(pitch)*sin(roll) + cos(yaw)*cos(roll);
rotation[1][2] = -cos(pitch)*sin(roll);

//Bottom row
rotation[2][0] = -cos(yaw)*sin(pitch)*cos(roll) + sin(yaw)*sin(roll);
rotation[2][1] = sin(yaw)*sin(pitch)*cos(roll) + cos(yaw)*sin(roll);
rotation[2][2] = cos(pitch)*cos(roll);

Note: this matrix effectively rolls first, then pitches, then yaws.  This turned out to be the one I used for my system.

[ cos(pitch)*cos(yaw) -sin(yaw)*cos(roll)
    + cos(yaw)*sin(pitch)*sin(roll)
sin(roll)*sin(yaw)
    + cos(yaw)*sin(pitch)*cos(roll)
]
cos(pitch)*sin(yaw) cos(yaw)*cos(roll)
    + sin(pitch)*sin(yaw)*sin(roll)
-sin(roll)*cos(yaw)
    + sin(pitch)*sin(yaw)*cos(roll)
-sin(pitch) cos(pitch)*sin(roll) cos(pitch)*cos(roll)


//Top row
rotation[0][0] = cos(pitch)*cos(yaw);
rotation[0][1] = -sin(yaw)*cos(roll) + cos(yaw)*sin(pitch)*sin(roll);
rotation[0][2] = sin(roll)*sin(yaw) + cos(yaw)*sin(pitch)*cos(roll);

//Middle row
rotation[1][0] = cos(pitch)*sin(yaw);
rotation[1][1] = cos(yaw)*cos(roll) + sin(pitch)*sin(yaw)*sin(roll);
rotation[1][2] = -sin(roll)*cos(yaw) + sin(pitch)*sin(yaw)*cos(roll);

//Bottom row
rotation[2][0] = -sin(pitch);
rotation[2][1] = cos(pitch)*sin(roll);
rotation[2][2] = cos(pitch)*cos(roll);

Thursday, April 28, 2011

Nudist Beach

Sunday, April 17, 2011

Equations

Am I the only one who finds it amusing that recreational drug proponents clamor for the "freedom to choose" to do something that removes their freedom to choose?

And does anyone else find it laughable that one of their primary arguments is that it "doesn't affect anyone else"?

Foot in...pot?

Yesterday we had an early Easter celebration, since Child is going to be in Utah over Easter while I remain here in CA and work.  While we were outside hunting eggs, I noticed our back-fence neighbor out watering his ducks and chickens.  I went over to say hello.

Mr. Chicken seemed a nice gentleman, although it quickly became apparent that he didn't have a very high opinion of the previous residents of our home.

"Apparently the low opinion is universal," I said.  "A few days ago I met Mr. RV, our next-door neighbor, and one of the first things he asked me was if I was growing pot!  Ha ha!"

Mr. Chicken didn't blink.  "I'm growing pot," he said.

Mr. Chicken clearly wasn't joking.  "Just two or three plants," he added.  "I have a lot of neurological problems and it's medicinal.  I grow it legal."

Oh.  Okay.  Note to self: you live in California now.

(Edit: I should add that Mr. Duck called me up this morning and asked that I meet him by our back fence.  There, he presented us with the nicest flat of 18 eggs from his chickens, as well as bacon, hash browns, and a jar of raspberry jam.  He's a very nice neighbor.)

Friday, April 15, 2011

Low Expectations

I met one of my neighbors today. He was climbing out of his RV as I left for work, so I jumped out of my car to say hello.

ME: "Hello! My name is Drek. I just moved in next door."
HIM: "That's nice. Are you growing pot over there?"

Apparently the previous few occupants have greatly lowered his neighborly expectations.

Of course, some of his initial assessment of me may have had to do with the fact that our plumbing is broken so we haven't had running water, much less hot water for shaving, showering, and washing wrinkled work clothes, for over two days now.

He also suggested I fix the gopher holes in our yard. Apparently whenever it rains, the water pools in our yard, then drains out through the holes into his yard, which is at a lower elevation.  That didn't make a very convincing case for fixing the holes--in fact, it suggested that putting out gopher treats might be a great idea from a landscaping perspective. 

Overall, he seemed like a pleasant, friendly gentleman, at least once he understood that I was not, in fact, growing pot in my new house.

Thursday, April 14, 2011

Port Forwarding

The post is more for my own remembering than anything else, although I'm posting it here just in case someone stumbles across it and finds it useful

The goal: allow a remote computer to view a website hosted on my local computer.
Steps:
  1. Set up an account with dyndns.org
  2. Install ddclient on my Ubuntu machine to periodically notify dyndns.org what my IP address is
    1. Don't prepend "http://" to your domain name in the ddclient setup!
  3. On my router, assign my computer a static IP address
  4. On my router, forward incoming traffic on port 8080 to the new static IP address
  5. On my computer, port-forward port 8080 to port 80, where my apache webserver is listening
    1. sudo iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80 (add the port forwarding rule)
    2. sudo iptables -F (flush the rule)
    3. sudo iptables -t nat --list (view the rule)
    4. sudo bash -c "iptables-save < /etc/iptables.rules" (save the rule to a file)
    5. sudo echo -e '#!/bin/sh\niptables-restore < /etc/iptables.rules\nexit 0' > /etc/network/if-pre-up.d/iptablesload (to create a script to restore the iptable rules every time the network interface comes up)
    6. sudo chmod +x /etc/network/if-pre-up.d/iptablesload (to make the script executable)
  6. Visit my site in a browser at http://subdomain.dyndns.org:8080
iptables: https://help.ubuntu.com/community/IptablesHowTo

Sunday, April 10, 2011

First Impressions

My plan was simple, really: trick the Lord into giving me a prime job at church.  We finally moved into our very first house last Monday, so today was our first Sunday in our new ward.  The idea is simple: wear a really nice suit the first day at church, and make sure you shave and comb your hair.  The Lord thinks you've turned a new leaf and inspires the Bishop of your new ward to give you a calling commesurate with your new duds, like...well, anything but nursery worker.  The Bishop wouldn't dream of sending you to a room where little grubby paws would wipe boogers and animal cracker crumbs all over your sparkly suit, right?

I think I may have blogged about doing this when we moved into our previous ward and it actually worked out pretty well.  I got called to be the Elder's Quorum secretary, where the worst thing I had to deal with was no one turning in their home teaching reports on time.

Apparently the Lord got wise to me.  Maybe I shouldn't have blogged about it.

So this morning I shaved and combed my hair for the first time in--well, however long it's been since the first Sunday in our previous ward.  I pulled my dusty, unused-since-the-first-day-of-church-in-our-previous-ward suit from the closet and put it on.  Church time rolled around and I put Ash in her car seat, blissfully unaware that as I gave her a bottle, I was setting in motion events that would result in my doom.

We arrived at church, made a good first impression as we strolled confidently into sacrament meeting, and found our seats near the front where everyone could admire the back of my combed head and the Bishop and his counselors could get a good look at my shave and slightly-wrinkled suit.  We sang the opening song, said the opening prayer, conducted a little ward business...then the Lord pulled the trigger.

Ash peed on me.

Child was apparently in on the plot.  Before I could move, she whisked Ash and the diaper bag away and was gone up the aisle.  I was left completely exposed, with nothing to hide a giant wet spot in the middle of my lap.  Disaster!  Ash had hidden my scriptures as we were rushing out the door that morning so I didn't even have those.  They were all in on it!

The boy carrying the sacrament tray was coming from the left!  The man who counted attendance was coming from the right!  The person in front would turn around to introduce himself at any moment!

I thought fast, grabbing a hymnal and opening it on my lap as if I were deeply absorbed in the lyrics to "I Believe In Christ."  Three ice ages later, Child returned with Ash and I was able to snatch her back and make a hasty, damp exit from the chapel.

So the Bishop's only impression of me was what he got from the all of five minutes I spent in sacrament meeting.  "Must be a less-active member," he probably thought.  "Maybe not a member at all.  Probably just came because his wife nagged him to be supportive on her first day in a new church.  Wonder why he was reading that hymnal?  Bit of an odd fish.  Nice hairdo, though."

So...yeah.  Nursery for me for sure.  No way the Bishop is going to trust me with a calling that deals with anything above the most rudimentary gospel principles.  So much for that plan.

Monday, March 28, 2011

And don't get me started on the service

Only five pillows on my bed?! And they call this a four star hotel...

Saturday, March 26, 2011

Halfway decent v. Not that bad

Our check engine oil light has been flickering for a while, so I finally decided to get the oil changed before I left for Boston tomorrow.  (I didn't want the transmission to fall out on Child while I was gone.)

We just moved here to CA a few months ago and Child took the car in last time in needed an oil change, so I didn't have any particular place I liked.  I called the Valvoline Instant Oil Change place in Vista and the person who answered the phone sounded so sullen and short that I immediately decided to try a different place.  My second phone call was to Firestone Complete Auto Care, and the way the clerk there answered the phone was like night and day.  He was bright and cheery and suggested I look on their website for a discount coupon.  I immediately decided to go there instead.

Unfortunately, that was the highest point of the experience.  Not that anything went particularly bad, but there were several areas they could have improved.  Like all auto places, they tried to upsell me on several more services, but they went even further than most places by throwing in a credit card offer.

Of course my tires were bad so they wanted to replace those, as they always do, but the man who helped me (different than the one who answered the phone) seemed genuinely peeved that I didn't take him up on his offer.  "But I'm giving them to you at cost plus a buck!"

I understand it's a great deal.  I've bought tires before.  But regardless, I just don't have $250 in the budget to drop on tires right now.

The other annoyance was that even though there was supposedly only one car ahead of me, and I was assured that they would be done by 11:30 AM at the latest, I didn't walk out until 12:30.  That was 2 1/2 hours on my Saturday gone.  I expect that at a doctor's office, but changing tires and oil isn't brain surgery.  It shouldn't be terribly hard to estimate time-to-completion, especially if there's only one other car.  (Of course there were more--I could see them in the bay.)

Would I go back?  I really, really wanted to like them after the way that first man answered the phone.  But I've been to better places, and would probably look around first.  Although actually, now that we have a house (or will in a few days) I'm going to try changing my own oil.  It'll save money, and after the first couple times, I've no doubt I'll save time too.

Sunday, March 20, 2011

Nobel Peace Prize

Nobel Peace Prize, here I come.  I have just solved world hunger.

All we have to do is send our daughter's booster seat to a country currently experiencing famine, and all their food problems will disappear.  At any given meal, it will easily amass three times the amount of food that was actually served at the meal.

As I tipped the chair on its side and shook it in preparation to sweeping the floor after dinner this evening, it produced:
  • Raisins
  • Avocados
  • Spaghetti
  • Spaghetti sauce
  • Bread
  • Cheerios
  • A cat
  • Orange
  • Granola
  • Potato
  • Apple
  • Plastic St. Patrick's Day clovers
Everything but the plastic clovers looked edible, and much of it actually looked better than many of the meals I ate as a college student.  I see no reason why the booster seat's particular capabilities couldn't be put to good use.

And who knows?  Maybe the living room recliner will come up with plan for world peace.

Love Unfeigned

In our men's group at church today, we had a new person show up.  He was obviously not your usual church-going type, and when he was asked to introduce himself, he said some things that made it clear he had some mental issues, probably schizophrenia.

Later in the lesson, the teacher asked a question and this man answered with a rambling response that ended with him saying he wanted to have a family, and how should he go about doing that?

Everyone in the room listened until he was done talking, and I expected everyone to do what I was planning to do: humor the man while maintaining a polite expression, then turn back to the teacher and let him guide the lesson back on-topic.

Instead, to my surprise, a couple of men in the class answered with very thoughtful, serious responses.  The marine with the grenade stickers on his truck explained that the man's first goal should be to make himself right with the Lord then blessings like a family would follow, while the silent man at the back of the room spoke up and gave encouragement for starting with the small things like coming to church.  Before the class was over, the man had been invited to a church activity, lined up with a ride, and shaken hands with half the class.

I was ashamed of my initial reaction of brushing off the man, while simultaneously rejoicing in belonging to an organization that built men like the ones who had just taught me a lesson.  Next time, I'll hopefully be a little more Christlike thanks to their example.

Thursday, March 17, 2011

Robotic Rodeo -- Day 3 -- Murphey backs off

So after I blogged about day 0, 1, and 2 of the Robotics Rodeo, life intervened, and I never got to day 3.  However, when John mentioned that Davin mentioned that my blog post about 5D Robotics stealing some lady's bag from airport security was on the first page of Google results for "5D robotics," I figured I better tie up a few loose ends.

First, we returned the lady's stolen bag.  We had left my phone number with Delta so they could give it to the lady if she called them, which she did.  As it turns out, the lady was moving from CA to GA, which somehow equated to carrying a carry-on full of brand-new clothes and 50 garbage bags, but she wasn't particularly inconvenienced by the bag being stolen.  We promised we'd leave it at Delta on our way home, and they would see that it got back to her, which they did.  (After we spent ten minutes convincing the Delta employee we were in fact returning a stolen bag rather than looking for a lost bag of our own.)

Second, we almost ran over Boeing's robotics team.  They were standing in a small group making snide remarks about the clearance and overall appearance of the Segway robot I was driving when it accidentally swerved towards them.  They managed to scatter in time to avoid getting ran over by 240 pounds of steel and clawing tires, but only barely.  Fortunately we had the velocity capped on the robot.

Third, the demos went marvelously, and not just because our CEO didn't like my blog post about the previous day's disaster showing up on the first page of Google results for our company's name.  They actually went really well.  Antenna Products pulled out a wireless spectrum analyzer and found us a channel that was fairly free, so our radios worked much better.  We were actually able to demo our robots for some important people that Davin roped in, and the Segway representative only mistook one middle-school boy for a girl.

So all-in-all, it ended up being a positive experience.  We had sushi for dinner, John didn't get tazed even once on the way home, and we got the next day off work to catch up on sleep.

Day 0
Day 1
Day 2

Tuesday, March 08, 2011

Favorite Baby

Last night, Child and I were in bed.  Ash was sleeping in her bed beside ours.  Child and I laughed about something and in her sleep, Ash laughed also.  Child and I thought that was pretty funny.

Wednesday, February 23, 2011

Foot, meet mouth

Following is a cautionary tale on never saying anything in private you wouldn't want repeated publicly.  Names have been changed.

We here at 5D have an intern working for us...we'll call him Scone.  Coworker John, Scone, and I all work in the same room, although we can't see each other because of the dividers between us.  This fact led directly to the incident.

Scone is a smart and articulate kid, so I sometimes forget that he just doesn't have much programming experience yet.  He came to me with a programming problem, so I told him the solution.

"Well, the obstacle avoidance behavior file is conditionally compiled based on the mission flag in the CMake file, which is currently set to mission_dave in your virtual machine.  Since the behavior should be unconditionally compiled in now, you'll have to move it out of the conditional and into the normal list of included files."

It makes perfect sense, right?  Apparently not, because Scone gives me this blank stare like I was talking in German.  That was doubtful, since I don't speak German, and I realize it just went right over his head.  I go over to his desk and walk him through what he needs to do, although I'm a tiny bit annoyed because I'd rather him play around and attempt to figure it out on his own for a few minutes before coming to me.

A few minutes later, someone walks out the door heading in the direction of the break room.  For some reason, I think it is Scone, which means John and I are left alone in the room.  I start talking, which incidentally is where a lot of my problems throughout my life have come from. 

Me: "John, do you think I'm helping Scone too little?  Or too much?  Because I just don't think he's getting anything I'm saying."

Scone: "Um..."

Me: "Um..."

So yeah.  There were a few frantic moments while I mentally went over what I said, trying to think if it was too insulting or patronizing.  Had I said Scone wasn't the sharpest knife in the drawer?  Had I mentioned anything about a light being on but nobody being home?  Because I could have easily said something like that, just joking of course, but not the sort of joke you'd want to say to someone's face.

And apparently, not the sort of the joke you'd want to say if you're not absolutely 100% sure of whose face you're talking to.  And even then, probably not, because you don't know what your listener might pass on, or what microphones are hidden around, or who might be just around the corner.

Sunday, February 20, 2011

Living Truth

Since our daughter has been sick (she seems mostly better now!), I've been doing a lot of reading about healing blessings and miracles.  There is a wealth of knowledge and information in the archives of Latter-day Saint church talks that is fascinating--even more-so when it applies personally to yourself given your particular circumstances.

Something struck me just now while reading.

Every now and then when I channel surf on the radio through the lower end of the dial where my NPR news likes to hang out, I stumble across some religious speaker.  I listen on occasion, and it brings back memories of attending various other religions' sermons while I was a missionary in Tennessee. 

There is a striking difference between those sermons and the ones I've been reading online.  The average sermon from a pastor will take an incident in the Bible and delve into it: history, background, various teachings or takeaway messages from it, etc.  Sometimes the sermons will be topical, drawing from a variety of Biblical references to make an interesting or helpful point on a specific subject.

These sermons are good, as is anything that lifts, enlightens, and gives direction to peoples' lives.  They can only rehash Jonah and the Whale so many times, though.  At some point they reach the end of what the Biblical writers managed to jot down and there they have to stop.  In the end, they're all missing a critical element: living revelation. 

Contrast this to a talk on, say, healing blessings given by an Apostle.  The Bible mentions several incidents of healing blessings, but doesn't go very much in depth into how they're done, who can do them, prerequisites, requirements, expectations, and limitations.

The Apostle isn't limited to the Bible, however, or even to the Book of Mormon, the book of Doctrine and Covenants, or revelation from a variety of modern prophets and Apostles, living and dead.  He has his own personal revelation as a mouthpiece of the Lord. 

As I've read through a half-dozen or so talks over the past couple hours, it keeps striking me how clearly and understandably the doctrine is laid out, how simple and organized it is, and most of all how much knowledge is added above and beyond any existing canon.  In short, a sermon given by an apostle or other inspired church leader has an incredible power impossible to find anywhere else.

RedBox

While getting a movie from RedBox yesterday, I watched the person in front of me walk away with five movies in hand.  Either they were planning to watch 10 hours of movies in the next 24 hours, or they were going to rack up some nice charges on their credit card.

Who knows.  Maybe the lady lived a hundred miles from civilization and this was her annual excursion to The Big City to "see what-all is goin' on."

Sunday, February 13, 2011

Haircut

My wife had a little accident last night.  I have to admit--I had a hard time keeping a straight face and murmuring the proper sympathetic phrases. 

Besides, it could have been worse.  She could have been shredding paper instead of cutting it.

Saturday, February 12, 2011

Updates

A hot-green motorcycle in our parking lot has the word "Ninja" painted in black letters on the side, with a giant grenade stencil beneath it.  Because when I think of ninjas, the first weapon that comes to mind is a grenade...

--------

Every time I go outside in the morning to leave for work, when there isn't much activity, a crow sitting in a tree along the sidewalk will give a brief caw, presumably to alert any other crows who cared that a human was nearby.  Another lookout crow did the same thing on our way to the park today.

--------

Yesterday evening I finally got another robot driving.  I was pretty excited since I had been working on it for the whole past week.  Child called me about 5 pm and asked when I was coming home.  It was a good thing she called, since I was so into my work that I probably would have worked until 7 pm before I realized what time it was.

On a related note, the company that built the robot apparently has no idea what a "standard" is.  If you decide to use the JAUS architecture for the nice standardization it brings, it's a little counter productive to put the left wheel speed in the "velocity" field, and the right wheel speed in the "turn rate" field.  It's wrong, and it defeats the whole purpose of using the standard to begin with.

--------

My writing group is great.  They gave me some good ideas for how to progress my characters and make them more realistic.  I like where my current novel is going.