Thursday, June 5, 2008

This Blog Has Moved!

This blog has moved to my new website:

chad-meyer.com.

Please update your links and feed subscriptions. See you there!

Thanks!

Thursday, April 17, 2008

In Loving Memory

Erma K. Meyer
October 29, 1919 - April 12, 2008

MONTICELLO - Erma Meyer, 88, of Monticello, died Saturday morning, April 12, 2008, in the Monticello Nursing and Rehabilitation Center, following a brief illness. Services: 10:30 a.m. Wednesday, Peace United Church of Christ, Monticello, with the Rev. Peter Wenzel officiating. Interment: Oakwood Cemetery. Friends may call from 4 to 8 p.m. Tuesday at the Goettsch Funeral Home, Monticello.

Thoughts, memories and condolences may be left at www.goettschonline.com

Surviving are two children, Bill (Linda) Meyer of Monticello, and Lila (John) Hancock of Shellsburg; two daughters-in-law, Janet Meyer of Monticello and Lois Meyer of Murphy, Okla.; 12 grandchildren and 21 great-grandchildren.

She was preceded in death by her parents; her husband, Clarence; two sons, Ronald and Clarence Jr.; two sisters, Edna Grace and Bess; and two brothers, Oscar and Vernon.

Erma Kathleen Lee was born Oct. 29, 1919, in Wick, Iowa. She was the daughter of Oscar and Ruth Cox Lee.

Erma married Clarence Meyer on May 15, 1937, at Galena, Ill. Erma worked at the Reliance Shirt Factory in Anamosa and the Button Factory and Hoag Duster in Monticello. She retired from the John McDonald Hospital in 1979, where she worked for many years. Clarence preceded her in death on July 29, 1973. Erma had been a resident at the care center since December 2007.

The family would like to thank Above and Beyond Hospice and the staff at the Monticello Nursing and Rehabilitation Center for their dedication and wonderful care.
I'll miss you Grandma.

Friday, March 21, 2008

March Madness 2008 - 1st Round Simulation

Well, unfortunately I didn't get a chance to add the database backend to my simulation program. I got caught up in a couple other web programming projects for a friend's internet radio station. I guess there's always next year...

...but wait! Against all odds (and sensibility), I decided to simulate the tournament anyway -- entering all the stats into the source code by hand. Well, not completely by hand. That would just be plain old nuts. I created an Excel spreadsheet to help me format the lines of code (arrays) properly. It's still waaay labor intensive, hence I've only simulated the first round so far.

So how is my program doing? Not so hot it turns out.

At the end of the first round, it's predicted 17 out of the 32 games correctly -- just barely over 50%. Basically no better than random chance. Ouch.

Keep in mind these simulations are based purely on box score statistics, which can be deceiving. Box score stats don't take into account a lot of factors, not the least of which is the level of competition the team has faced to achieve those stats. In general, teams in weaker conferences may tend to have their stats "over-valued" or artificially inflated in comparison to teams that have played stronger competition throughout the year. This is obviously a fundamental limitation of my program that I've been putting a lot of thought into trying to remedy recently. Not an easy task. There are other limitations, and even some known flaws in the code that need to be fixed, so I wasn't expecting a whole lot anyway. I was just curious to see how it would do in its current state.

I'm not going to post the predicted scores of each game, because it's pretty pointless with the known issues (ahem, bugs). Instead, I'll post predicted winning percentages, which is probably still somewhat pointless, but hides the known issues a little better. ;)

Yellow Highlight: Outcome predicted correctly
Red Text: Outcome not predicted correctly
Percentage in parenthesis is predicted winning percentage
1000 games simulated per matchup

EAST



MIDWEST


SOUTH


WEST


So, as you can see...not so hot. Definitely room for improvement.

As I said before, I'm doing this semi-manually, so it's taking a good amount of time. I don't have anything beyond the first round simulated yet, and will be gone this weekend for Easter. I'm hoping to get the rest of the tournament simulated before the Sweet 16 games start next week.

I can't wait to see who this program picks to win it all...could be interesting. :P

Stay tuned!

Tuesday, January 15, 2008

Brrr...do you feel a draft?

I'm just going to straight plagiarize this from Cindy, since she can explain this stuff better than I ever could:

here's the latest....

we brought charlie home yesterday from isu hospital.
his surgery went went well. they completely removed
the meniscus and did a tibial plateau leveling osteotomy.
in layman's terms, they basically cut the top of his
shin bone in half, then move it upward to meet the
thigh bone (in order to stop the bones from rubbing since
the acl is torn), then use a bone plate and screws to
hold the bone in place. can you say ouch? the amazing
thing is they allow dogs to actually walk on that
leg!! that means he's walking on a broken bone,
which is why his activity level is so restricted.
the vet said that dogs are powerhouse healers, and
that's why they allow them to weightbear on the leg
if they want to, and why this surgery is not done
in people.

charlie is on strict cage rest for 4 weeks, then
5 minute leash walks the next 4 weeks after that.
we go to the vet here in des moines for staple
removal in 7-10 days then, we go back to isu for
xrays in 6-8 weeks, then they will adjust his
activity level. basically, he can't run, jump,
or be off the short leash for about 12 weeks.
it will be a quiet 3 months around here!

to add insult to injury, his leg is shaved
from his hip all the way down to his foot.
that bare little chicken leg sure gets cold
outside! we have to put a towel under his
belly like a sling to help him walk outside
to go to the bathroom, but then still keep
the leash tight so he doesn't try to walk too
far. it's kind of a circus. i can tell
charlie is starting to feel better, since he
is starting to get more stubborn on the leash.
it will be a long 12 weeks for mr independent!!

i sent a few pics of the chicken leg for your
viewing pleasure. i hope his hair grows back fast
since january in iowa is not the warmest month
outdoors! i will keep everyone updated! :-)cm




Tuesday, January 1, 2008

Simulation Remake -- Update

Well, I've finished the PHP stats script. Yay!

Here's a video of the final version:



It still just grabs one team's stats at a time. I thought about trying to automate the gathering of an entire conference at a time, but decided against it. Due to the uncertainties of the (sometimes) unreliable internet, there really needs to be user confirmation of the stats along the way so garbage doesn't get inserted into the database. Screen scraping for information is not always 100% reliable, unfortunately.

It was a bit of a learning process -- dependent form elements, passing arrays between forms, etc., but I finally got it figured out. And I learned a few tricks on the way.

It's definitely not optimized, and probably a little slow, frankly. I'm sure if an experienced programmer looked at my code, they'd probably cringe or roll on the floor laughing (or maybe both). But you know what...it works, and that's all I care about. All-in-all, I like the way it turned out.

Now...on to the database connectivity inside the executable! Oh joy!

Thursday, December 27, 2007

Simulation Remake - UPDATE

Just a quick update on my progress so far:

  • Schema for database backend has been created using MySQL
    • Currently using three tables
  • Installed MySQL ODBC driver so connection to database can be established in executable (connection yet to be established)
  • All conference and team information has been entered into the database
    • 32 conferences
    • 341 teams
  • Started a PHP script to scrape player statistics from popular sports website
    • Statistics scraping currently done by team, one team at a time
    • Team selected using drop-down list -- all 341 teams are available
    • Statistics scraping code completed successfully, but still need to add code to insert stats into database
That's pretty much it. All-in-all, it's been a pretty productive few days of work. I plan on adding the database insertion code to the PHP script tomorrow. Should be fairly straightforward -- just need to take care not to duplicate player stats when inserting. After that, I'll begin to tackle the database connection inside the executable.

EDIT - Here's a quick little video of the PHP stats script. My script is in the left pane, and the website the stats are being extracted from is in the right pane. If the video quality weren't so poor, you'd see it successfully retrieve the stats. Since the making of this video, I've enhanced the on-screen output of the retrieved stats by putting them in tabular format -- looks much cleaner. ;)

Note: If you're using FireFox, the video may not play completely. Not sure why. Seems to work OK with IE though. Make that semi-OK. Or maybe it's just my computer...hmmm...

Tuesday, December 18, 2007

Simulation Remake...yay!

About 13 +/- years ago, a group of four enthusiastic geeks set out to create a computer simulation of an NCAA basketball game as a project for their business math analysis class (lovingly abbreviated as "anal bus math"). The goal was to simulate that year's Iowa vs. Iowa State basketball game prior to the event, and compare the simulation results to the actual outcome. This would serve as a measurement of their ultimate success (i.e., their grade).

The Geeks
Jerry, Norm, Corey, Me

The Project
Programming Language: Applesoft BASIC
Computer Hardware: Apple IIe and Apple IIGS
Workhorse Programmers: Jerry and Norm. Corey and I were familiar with programming basics, but Jerry and Norm were the real experts. We helped where we could, but ultimately the workhorses pulled the majority of the weight. Not that it probably would have made much of a difference in the ultimate workload sharing because Jerry and Norm were obviously more equipped to do the work, but the development environment with BASIC was not very conducive to multiple programmers. It wasn't like the object-oriented languages of today, where you can easily break off chunks of the code to be put in separate modules and coded by separate people. I suppose we could have done that, but it would certainly have been a lot more cumbersome.

The Results
Unfortunately, the program was not finished prior to the Iowa/Iowa State game, but it did end up getting finished. I don't recall exactly how close we actually got to the final score, but I seem to remember it wasn't too far off. Of course, we already knew the final score, so I'm sure we tweaked our code a smidge here and there to get reasonable results. Doing so was not necessarily a bad thing, even though we were being graded on the results, as calibration with the real world is definitely needed for something like this. Plus, it's not like we stole the answers - everyone (including the teacher) recognized that working backwards to the solution was an available option.

In the end, we presented the program to our class, and a math class in a neighboring town (Cascade - "The Mecca of all learning and knowledge" according to Mr. Strang). I think we ended up with an "A". If we didn't, we should have. ;)

The Remake
It's not known what eventually became of the masterpiece we created. It's probably sitting in a box somewhere collecting dust in one of our parent's homes; the disk surely succumb to failure. So sad.

In late 2001, I set out to recreate the masterpiece; this time using Visual BASIC 6. I plugged away at it here and there in my spare time, and finished the basic logic of the program sometime in late 2002 or early 2003. It has sat dormant ever since. I've decided now is the time to finally finish it -- hopefully, before March Madness 2008.

In it's current state, it is hard-coded with the stats from the 2002 National Championship Game between Maryland and Indiana, which I used as a start for the underlying calibration of the code. Certainly more calibration is in order. This makes it quite tedious to simulate other games, as it requires delving into the code itself to input new statistics; a fatal flaw suffered in the original code as well. The last major task at hand is to implement a database backend for storing all the statistics, making it possible to easily input and edit statistics and simulate a game between any two teams, with the ultimate goal being a simulation of the entire NCAA tournament in one fell swoop. Now that would be sweet...

I hope to post updates of my progress now and then, but we'll see how that goes. In the meantime, here's a quick video of the current program:



As of right now, it can simulate 100 games in about 5 seconds (10 seconds if the line-by-line results are chosen to be displayed). Definitely a LOT faster than the original, which I think took about 20-30 minutes for just one game, if I remember correctly. The increased simulation speed is certainly more a result of faster computers moreso than better or more optimized code.