September 2005 - Posts
I’m addicted to Kung Fu class like I’ve never been to any exercise. I actually miss it when I’m away. I remember telling people how much better I felt when I was going out and riding 20–30 miles a time a few times a week or swimming miles of laps a week. I feel a bazillion times better after a few months of Kung Fu.
I’ve never been good at sports, and it has always been a disappointment and frustration to me. I remember learning to play baseball as a child just terrified and frustrated with the whole process. As much as I tried I could never swing a bat or throw a ball to save my life. It was never the same swing, never the same throw. I choked up on the bat, I choked down, but I never internalised any of the motions. My first time on base was from getting whacked in the head with the ball. It didn’t matter, baseball, soccer, basketball I was miserable at all of them.
Cindy talked me into signing up for Kung Fu, and now I see where I went wrong. I didn’t know how to stand, or breathe, or even move without getting out of balance. I’ve been fighting my own body most of my life and I never even realized it. The stance work, the balance and the forms of Kung Fu along with the great instructors at Shaolin-Do have really given me a new perspective on my own body.
I just wish I had gotten a full program like this when I was younger. The Montessori classes I was in when I was a child had some of this with the balance boards and balance beam, but it was only for short periods of time. You can’t force your body to re-learn to hold itself up until you have exhausted the muscles which are holding you the wrong way and make yourself put effort into standing the right way.
All this and it’s only been 3 months. I can’t wait to see where this leads.
As far as fitness stats go, I jumped up to 193lbs. for a while and now I’m back down to 191lbs. My scale says I dropped 3% body fat to get down to 21% which is major, and I can see it in my gut and all over. I know the scale isn’t that accurate, but it definitely confirms I’m heading in the right direction. I can also touch my toes at any given time, and grab my sole if I put some streach into it.
The new design didn’t last very long. I’ve gone back to a very simple layout and I have to say I like it better. There are still a few formatting kinks to work out, but overall I like it a lot better.
It just emphasises the point, don’t break the rules until you know when to break the rules, and my design skills just aren’t up to the task. I’ll see how long it takes me to get bored with this one. Hopefully it will be a while. It’s pretty sad when you change your site layout more then you change your site. I’ve been doing nothing but ACL this weekend. Check out Cindy’s summary at:
http://brummerfamily.com/blogs/cindy/category/6.aspx
Well, I’m off to check out pong, Bob Mould and Franz Ferdinand, plus so many other great bands I can’t even keep track of them. This year, it’s covered in dust so if you are going, a bandana is highly recommended.
The other day I answered a question in a programming forum about how to tell that an operation on a worker thread completed. I answered that you need to create an event to signal that the operation was complete. Others suggested that you can just wait on the thread. I really didn’t like the answer but at the time, I didn’t have a good response other then it being a waste of resources. Thread pools are better since threads have a decent amount of overhead.
Raymond Chen brought up some really good points with his blog about the WAIT_ABANDONED return value of WaitForSingleObject. When a thread exits you don’t know why it exited. That’s the real problem with just waiting for a thread, you won’t know what the actual state is when you wake up. You have to check the results of your worker thread because it could have exited for any reason.
This was one of the biggest headaches I had to deal with when I wrote a connection pool for piccolo objects. Piccolo is an API for connecting to server processes on a Tandem mainframe. One of my tasks was hooking a web front end up to a Tandem and querying what were massive databases at the time. The connection objects had a strange threading model. They could be shared on multiple threads, but they had to be closed by the thread that created them or havoc would ensue.
To manage that I created a single constructor/destructor thread whose only responsibility was creating and destroying these connections. Every call to construct an object had to signal a create event and then wait for a created event to read the new connection handle. It all worked fine except when you took errors into account. The requesting thread always had to wait on the creator thread and the event. It also had to check to see if any exceptions were passed back instead of a valid handle. A lot more code was written to deal with marshalling all the error conditions then actually handling the connection.
I’d like to see a threading framework that does a better job of managing this type of state. A call similar to a try catch which only exits after another named block on another thread completes, either through an early exit or the code actually completing.
WorkerThread:
block TaskItemBlock
{
//Do something
}
Main Thread
onComplete TaskItemBlock
{
//Use results of something
}
blockCatch(Exception ex)
{
//if TaskItemBlock throws an exception it is caught here.
}
invalidExit
{
//In an unmanaged world this is possible
}
A worker thread or a thread pool is a strange construct because it is running something for somebody else, so every result of the code should be able to be bundled up and sent to another thread. I’ll have to look around and see what varous languages do to deal with this situation.
I've been busy with other things over the past couple of weeks and I haven’t had the time to just sit down and put my thoughts down. Mostly because I’ve been doing Kung Fu non-stop and I’ve had a full plate at work. The good thing is that my kicks have been showing improvement, especially my side kick.
I’ve done 3 rides since I last posted, all short around 7–12 miles. Mostly up and down shoal creek. I need to be better at sitting down just after the ride and getting my stats in.
Keeping steady at 190.4 lbs.
More Posts