Wednesday, November 30, 2005

Goblet of Fire

Stardate 59113.0
We went to see Harry Potter and the Goblet of Fire on Sunday. It was good. Thomas covered his eyes at the more scary parts. The question on my mind is if Daniel Radcliffe, Emma Watson, and Rupert Grint will go for the next three movies. Rupert especially looks eighteen or nineteen now. One idea April has is to do a Peter Jackson and film all three at once. It would still need to wait for J.K Rowling’s last book.

Brannon Braga’s Threshold was cancelled by CBS last week. One review wondered tongue in cheek if he was going to blame viewer fatigue. I personally am getting that with Lost. The series seems to go nowhere, but adds new plotlines.

I loaded the log4net test project with the intention of figuring out what was wrong. I ran it to see where I was at, and it worked just fine. I changed some settings in the config file, and it picked them up. Weird. My guess is VS.NET was not copying the .config file I added until I restarted. This would not be the first time I found that sort of problem. I also played around with Craig Andera’s DirectX tutorial. The C# samples that Microsoft put out with DirectX 9a have a few problems with methods that don’t exist.

55 public bool InitializeGraphics()
56 {
57 try
58 {
59 presentParams.Windowed=true; // We don't want to run fullscreen

60 presentParams.SwapEffect = SwapEffect.Discard; // Discard the frames
61 presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
62 presentParams.AutoDepthStencilFormat = DepthFormat.D16; // And the stencil format

63 device = new Device(0, DeviceType.Hardware, this,
64 CreateFlags.SoftwareVertexProcessing, presentParams); //Create a device
65 device.DeviceCreated += new System.EventHandler(this.OnCreateDevice);
Error 1 'Microsoft.DirectX.Direct3D.Device' does not contain a definition for 'DeviceCreated'
\Tutorial5\texture.cs 65 12 Tutorial5

66 device.DeviceReset += new System.EventHandler(this.OnResetDevice);
67 this.OnCreateDevice(device, null);
68 this.OnResetDevice(device, null);

69 pause = false;
70 return true;
71 }
72 catch (DirectXException)

73 {
74 // Catch any errors and return a failure
75 return false;
76 }
77 }

Ok, and I wanted to show off some more improvements in the style sheets. I like the spiral notepad on the left. This is strange, since I don't the real thing. Writing left-handed, I end up bending the wire because I lean my hand on it.

At least with his I can get a spinning triangle. Ok, it’s not much, but learning something new is best started with basics.

End of Entry

Monday, November 28, 2005

Happy 41st Birthday

Stardate 59112.8
Happy Birthday to Me!
End of Entry

Sunday, November 27, 2005

Stardate 59112.7
One thing I forgot from the last entry. Patrick and I went to see Zathura about a week and a half ago. The movie is along the same lines as Jumanji, just set in space. I think the bigger difference is that there is not a big name star, which is something of a plus. For a show that takes place entirely within a house, it was pretty good. I liked the message of the show, although it could have used a bit more humor.

We had Thanksgiving dinner on Wednesday night, due to April working on Thanksgiving. This made the next day pretty relaxed, which is nice. Patrick had a soccer game Wednesday afternoon. He played goalie for a big part of the game. He was not too happy about it, but everyone talks about how good he is at it. We will have to talk to the coach and see if he can play the last part of the game as goalie, and other positions earlier in the game.

Thanksgiving day, as I said, was relaxed. The kids got bored pretty quickly, so I dug out all the Imaginext castle parts, and built a three story one. This occupied the boys for the rest of the afternoon. We made a bridge, too. I also put up the Christmas lights. This year the icicle lights actually make it all the way around the front of the garage, and I bought a snowman for out front. All in all, it’s the most elaborate display I have done.

Rachel received an early Christmas present in the form of a clock/radio/CD player. The alarm has been going off at 8 AM every morning, but at least it is getting her out of bed.

We bought an artificial tree Saturday. After 10 years of real trees, we decided to change. This one is also pre-lit. The kids, especially Rachel, were against the idea, but once we got it up, they warmed up to it. I grew up with one, but they have changed. Instead of the colored stems of branches that you plug into the pole, you fold out the branches. The tree was a little more expensive than what we have paid for a real one, but the fact we can use it year after year makes up for that. The ornaments give a history of Christmas past. Mulan, Harry Potter, Buzz Lightyear, Cinderella, Sleeping Beauty, Mike from Monsters, Inc, Scooby Doo, Anakin and Luke Skywalker, Yoda, Worf from Deep Space Nine (whom Rachel referred to as the bad guy when I got it), and Captain Archer. My Scorpion from Star Trek: Nemesis again does not fit the light socket for the tree. This year Thomas got a Clone Trooper and Darth Vader, Patrick Anakin’s starfighter, and Rachel got a polar bear. The Star Trek ornaments this year are Khan from the TOS episode Space Seed, Locutus of Borg, and the Enterprise –A. The Hallmark site lists Locutus as from First Contact, but Locutus was not in the movie.

It snowed a few inches Saturday night, so the kids and I went out to play. The paper says the snowfall is showing drought again. It seems early in the year to predict that.

End of Entry

Tuesday, November 22, 2005


Stardate 59112.2 (11-22-2005)

The fun part about the Internet is that you can find solutions to things when you are not looking for them. I had a bad time formatting the code solution to a puzzle I was given a month ago. I stole some CSS from Phil Haack as I was looking at his code for a class factory from a description in an app.config file. The solution is at the bottom so you don’t have to scroll past it to read the rest of the entry. Config files have been a big source of frustration this last week or so. I have been working with log4net and NHibernate. I can get log4net working with a default configuration, but if I add setting to the config file, I don’t get anything. Same with NHibernate. I am feeling rather stupid at this point.

This last Sunday morning I woke up with a bad stomachache. Most of the day and Monday I spent running to the bathroom every hour or so. I was also running a fever. It’s passed now, much to my relief. Since I didn’t eat anything those days, you would think I might lose a little weight, but no such luck. It’s been sneaking up slowly but surely.

Patrick’s indoor soccer team has been doing well. They lost their game on Monday, but he played really well. I go out to dinner with my dad on Mondays, so I don’t get to see the games. I cancelled last Monday since I could not eat anyway, and took the opportunity to see a game. Patrick was on offense most of the time, and I was impressed. He can control and handle a soccer ball as good as any player on his team. Several times I saw him take the ball away from an opponent. He seems a long way from the five year old I coached.

Patrick has also taken an interest in playing catch with some baseballs we got at a game in Ohio. He is pretty good with throwing and catching, but he needs more practice with a bat. Even more interesting, the first time we played catch, it ended with my throwing one to him that bounced out of hit mitt and off his upper lip, cutting and bruising it. He wanted to go back out and do it again the next day.

On Mondays, as I said, dad and I usually go to Sizzler for dinner. It’s cheap, fast, and pretty good. He won’t go to many other places, and seems to think the only thing I want is steak. There’s a restaurant called El Matador opening up just outside of where he lives. It’s an established name, but Costco bought the land the old place was on. It looks like they got a good deal out of it, the new place is elaborate. It’s Mexican, as I keep pointing out to my dad as we pass. He has said he’ll try it. Anyway, last Monday, the server at Sizzler told us she hadn’t seen us there is a long time. We got a confused look, and told her we had been here every Monday for the last month or so. I guess it’s good that someone remembers us, but I don’t remember her, and I have seen the same faces.

Rachel was honored with a Student of the Month award. Her GPA is 3.95. She is doing very well in school this year. April and I went to Parent-Teacher conferences two weeks ago. Everyone is doing well in school. Thomas is having a little trouble paying attention and stop talking when he needs to, but Mrs. Platz says he fine otherwise. Apparently he is now comfortable with school. Patrick isn’t pulling the wool over his teacher’s eyes like I thought might. Mrs. Fenton is also the Vice Principal for the campus and I imagine she has seen his tricks before. He has also admitted he can’t see the board very well, and he has started wearing his glasses again. Rachel seems to like Mrs. Key. She not frustrated this year as she was last year. Not that Mrs. Higgs is bad, but her style of teaching did not work with Rachel.

Bob Allen’s fiftieth birthday was celebrated at the last Senior Officers Meeting for the Ticonderoga. Lori got the blame, but it was more Tonya’s idea. Next year the business meetings will move from Saturday afternoon to Wednesday night. This leaves us free to play activities for different days and times. The 3 PM time on Saturday left us with no time to do some things such as go swimming or to a museum.

Speaking of museums, Patrick went to the Hill Air Force Base Museum the Saturday before last with his Cub Scout troop. He was not too excited since he has been there before. This time the flight simulators were open, and the boys were fascinated with the F-16 cockpits attached to an F-16 Falcon software.http://beta.blogger.com/post-create.g?blogID=35868783

That’s about all I can remember for the last couple of weeks. I am sure there is much more, but this is long enough.

Music: The Pink Panther Theme by Henry Mancini
Mood: Ambidextrous (Latin for hopelessly confused)
Favorite Quote: “Agile programming does not just mean doing more work with fewer people” Scott Adams/Dilbert

using System;

namespace MissingValue
public class MissingValue
private int[] n;
private int[] a;
private int sum_n;
private int sum_a;

// No default constructor
private MissingValue()

public MissingValue(int array_length)
// Allocate array of ints to requested length
n = new int[array_length];
// Allocate 'missing' array as one less
a = new int[array_length - 1];

// Fill array with unique values from 0
// to length of array

for (int x = 0; x < n.Length; ++x)
n[x] = x;

// Seed a random value
DateTime d1 = DateTime.Now;
Random rand = new Random(d1.Millisecond);
// Get a random value in the range from 0
// to array length

int num = rand.Next(0, a.Length);
for (int x = 0; x < a.Length; ++x)
if (x < num)
a[x] = x;
a[x] = x + 1;

public int FindMissingValue()
sum_n = sumArray(n);
sum_a = sumArray(a);

return sum_n - sum_a;

private int sumArray(int[] a)
int sum = 0;
foreach (int x in a)
sum += x;
return sum;

/// The main entry point for the application.

static void Main(string[] args)
MissingValue mv = new MissingValue(100);

Console.WriteLine("the missing element is {0}",

// Output:
// the missing element is 35

Tuesday, November 08, 2005

What Action Hero Would You Be?

Stardate 59110.8

You scored as Indiana Jones. Indiana Jones is an archaeologist/adventurer with an unquenchable love for danger and excitement. He travels the globe in search of historical relics. He loves travel, excitement, and a good archaeological discovery. He hates Nazis and snakes, perhaps to the same degree. He always brings along his trusty whip and fedora. He's tough, cool, and dedicated. He relies on both brains and brawn to get him out of trouble and into it.

William Wallace
Indiana Jones
Batman, the Dark Knight
Lara Croft
Captain Jack Sparrow
The Terminator
Neo, the "One"
James Bond, Agent 007
El Zorro
The Amazing Spider-Man

Which Action Hero Would You Be? v. 2.0
created with QuizFarm.com
I like the results, although I would wish Captain Jack Sparrow were higher. It's probably due to the fact I don't have to have flamboyant clothing.

Members of the Ticonderoga, Kelly, and others went to the Space Education simulator last Saturday. I brought along the CD for Spamalot, the Broadway play with Tim Curry and David Hyde-Pierce with roots in Monty Python. My passengers enjoyed it. I'd love to see the whole play. I hope they make it on DVD.

The simulator was fun, although I think we would have done better if we understood the controls and who did what. I was wishing for a stop button, or some feedback from the computer when I hit the thruster controls. But that's beside the point. I was impressed by how well we worked together, and the acting on the part of the people running it was great. I felt like it was real. The options given at the end were perfecty valid, although I admit they did not occur to me. That's a little embarassing, but it was a good learning experience.

I have watched a few movies over the last few weeks. Wallace and Grommit was good, although I was a little bored. Thomas loved it. Chicken Little was better, I got a few laughs out of it. I tried to watch Bewitched with Will Farrell on DVD, but stopped about halfway through. I.Robot was interesting, but I think Issac Asimov's original stories were better.

Yes, I have not posted the solution to the problem. Formatting code for a web page has turned out to be difficult.

End of Entry

Tuesday, November 01, 2005


Stardate 59110.1
Gotta get going on pictures and such. But Halloween was good. We went the same place as last year. Lots of kids running around, lots of costumes. Rachel was a gossomer ghost, Patrick was Darth Vader, and Thomas was Anakin the padawan. The sitter commented that the boys costume reflected their personalities. Patrick and his friend ran from house to house, with Thomas close behind. Rachel and her friend tagged behind.

Back in our neighborhood, all but a couple of houses were dark. We were actually invited to the trunk or treat this year, but I favor the traditional Halloween of going house to house. The other way seems boring.

The kids and I carved pumpkins on Sunday. Thomas's was the most elaborate, although I craved it. I roasted the seeds, and they turned out to be pretty good. Rachel carved her own design (well, it was from a pattern, but she did the holes and the saw). Mine was really simple this year, mainly because by the time I got to it, I had a splitting headache. It's muscle spasmed where my neck muscles enter the skull, which cause pain to shoot across my head. The doctor put it down to tension. A little heat, and it's better.

Yeah, the array puzzle. I have a solution, but it is sitting on my work 'puter, and I just don't want to go get it. I did make another small discovery: it's pretty hard to make a random set of unique numbers.

Gas is down by almost thirty cents a gallon. This is still nowhere close to what it was last year. The positive point of view is that it puts pressure on the administration to fund alternate energy. I've never been a fan of increasing the supply of oil to lower the cost. I'd like to move to a more environment friendly transportation source.

End of Entry