Your Car and Your Dignity
Afternoon watch, 5 bells (2:48 pm)

Okay, dignity lesson #1: This guy is a total loser.

Yes, I like the whole Star Wars thing, but come on, dude, it's your car...

Leave a Comment »
Remedial Coding
Posted in General
Afternoon watch, 5 bells (2:37 pm)

Well for some retarded reason, our shopping cart shouldn't display numbers with decimal points anymore (I guess we're past having things for $n.95 or $n.97 on it). They wanted me to remove all the decimals from displaying. So I had to modify the database that stores them all. I set it up to handle integers, figuring that's what they want, that's what they get. Unfortunately, they want to sell just one item at $15.95. It is now for sale for $16. Exceptions to the rule tend to get overlooked.

Also, we had to have commas showing the thousands place in larger dollar amounts. Apparently the majority of people out there don't understand $1895, and need to see $1,895. So I had to write a function (in PHP) that converts integer amounts into formatted strings so they look nice:

function stringprice($price) {
  $s = (string)$price;
  $m = $s;
  if(strlen($s) > 3) {
    $m = substr($s, 0, 1);
    $m .= ",";
    $m .= substr($s, 1);
  }
  return $m
}

Obviously, this makes some pretty basic assumptions, such as not having numbers higher than the one's place in the thousands. But that would mean someone was spending more than $9,999 at our online store (note the comma for readability). So today's lesson, kiddies — hack away. It doesn't matter...

Leave a Comment »
Trivial Pursuit
Posted in General
Forenoon watch, 4 bells (10:17 am)

Last night, after working out, and after L was done with her obligations, I headed over to the inn and hung out with her and her parents. We watched TV for about 45 minutes, then went in search of a game to play. We found Trivial Pursuit (Lord of the Rings edition), and settled on that. Some of the questions are hard. L almost won, but I was lucky and got a couple easy questions in a row and stole it out from under her.

We almost started reading the Harry Potter books, but since it was already midnight, and I had to work this morning, I figured it was best that we start tonight instead. We're going to trade off reading chapters, it'll be fun. Saturday is bowling night, then next Wednesday she's making me dinner.

Leave a Comment »
Yesterday’s workout
Forenoon watch, 4 bells (10:14 am)

Yesterday MP and I did our normal weightlifting, but he was tired and I was still a bit tired myself, from all the working out I've been doing lately, so we did only 3 sets instead of 4 for bench presses. Not a big deal, really. Afterwards, we played a game of racquetball, towards the end JP waved at us through the window wondering if we'd play cutthroat with him. We invited him on down, and played 2 games with the three of us. It was good, we had some excellent volleys. My legs felt wobbly after the martial arts training lately, combined with all the running on the racquetball court. Hopefully that'll pass soon. I expect tonight will hold more stance training for me, as I have recently started the "Five Wheel Stance" form with JT.

Leave a Comment »