Wednesday, December 14, 2005

Realistic Reaction System

I stumbled across a paper that serves as a follow up to my undergrad thesis project (Unreal Relation System) that I did in 2004-2005. It was written as Proceedings of the 2005 GameOn North America Conference, Montreal, Canada, August 2005. They have taken my work and used it as the core of their new work with artificial-intelligence in games. They have built on top of it some very interesting features like a 'Relation Manager' for accessing the 'Relation System' I architected in a more abstracted way. The manager provides implementations of certain heuristics for dealing with the core relation network data. They have also added 'Mood Filters' for handling how particular Non-Player-Characters deal with negative/neutral/positive relationships over time. For example an optimistic person might have a negative perception of another person but this perception may shift to neutral over a short time. The reasoning is that since they are optimistic it is likely they will give the person a second chance and not judge them forever on their actions. I find it quite exciting to see how development is progressing at such a rapid pace and will keep my eye on it in the future.

Monday, December 12, 2005

Coding Mistakes

I read an interesting article titled Coding Guidelines: Fact and Fiction this morning. Something interesting they brought up that I wouldn't think of in terms of 'coding guidelines' was the use of cognitive science in studying how we read and write code. A couple interesting terms:
  • knowledge failures - where developers don’t realize they have insufficient knowledge
  • performance failures -such as calculating an incorrect answer to a problem
The concept of knowledge failures is interesting to me. As I often maintain older code at my work this concept bites me time and time again. Now how does this fit into a coding guideline? Well the article goes on to say:
Possible solutions to knowledge-based mistakes include reducing the amount of information that developers need to know, or organizing the information contained in source code in such a way that there are fewer demands on developers to correctly recall or recognize information.
I see these mistakes made far too often. I'm working on a particular C based project and the bulk of the code is thrown into one large file with little care to even how it is ordered inside the file. Not to attack C code in general but I find this is the case more often with C code then some type of object-oriented code. I find coders who come from an OO background have distinctly greater desire to abstract and encapsulate code even when working with C. Two very important OO concepts that help drastically with the fight against knolwedge-based mistakes. Often OO coders spend the bulk of their time ensuring their code as an object makes sense, C coders spend their time managing memory and manipulating strings.

Sunday, December 11, 2005

More Gym Log

I scoured around a bit for what else is out there and here's what I've found so far
  • http://workoutlog.com - a commercial web based logging utility that charges by the month. A coach feature that lets a trainer build workout plans and communicate with athletes. Logging for a variety of sports and health but offers fairly basic log detail. Most activities are logged only by time spent and a short description. For weight lifting this means the athlete enters the number of minutes spent doing weights in total and fills in a comment box for what activities he/she did. Seems to be targetted towards someone who is training for tri/decathalon.
  • BSDI Fitness Analyst - a large scale commercial application for testing fitness, medical screening, exercise programming. Intended for use in organizations, not home use. Ability to print reports in PDF. Very advanced and very expensive.
I'm not concerned about any of the competition out there as they seem to have very different focuses. A big part of what will make GymLog a success is it will be free to use and free to extend. GymLog will focus primarily on weight training and offer in depth statistics for weight training alone. It will also provide the opportunity for mobile devices to enter the picture for logging sessions at the gym and uploading them to the GymLog community.

My ideal name for this project is of course GymLog. Unfortunately gymlog.com is taken as a forwarding URL for MegaFitness. However gymlog.net/org etc are available so Iregistered .net. It's possible MegaFitness may be willing to sell gymlog.com too.

Gym Log

I was in the local KMCSC gym this afternoon on the ski machine, listening on Tanya's ipod, watching Ashlee Simpon on the TV and apparently somehow still was bored and my mind started wandering. I got to thinking about a software project idea I had back in 2004. At the time I was working out at the gym and thought it would be really handy to have a tool that could log my performance. People have been logging their stats for years on paper for years to track improvements, and motivate to set new records. A standard pen and pad of paper doesn't cut it when you're a computer science student though. I thought, hey it would be neat to have an application for a PDA that I could log my workout; what exerices I did, how much weight I lifted and for how many repititions. It would be able to present the user with their personal best for each exercise and possibly even automatically set new goals for increasing weight to lift. It could advise the user that they are overtraining one muscle group or totally ignoring anothe muscle. Once the stats are inputted into the PDA the user could plug their PDA into their home PC and upload their latest gym log to their PC and use something like Excel to draw graphs of performance over weeks, months, years, etc. So I imagine the technically inclined would find this pretty useful, but why didn't I follow up on it? Well I shelved for two reasons really:
  1. Not many people own PDA's, heck even I don't own one and I was going to write this app for one!
  2. Those who have a PDA might not want to carry an expensive PDA into the gym.
  3. Coding for a memory limited platform isn't all that fun (to me).
Fast forward a year and the idea has crossed my mind many times. I really want to track my performance, primarily as a motivator. It's easy to get into a rut and keep doing the same exercises and lifting the same weight week after week. Once your body adapts to a certain limit it no longer continues to build muscle tissue or increase your lung capacity. All you are doing is really burning calories.

So I'm revisiting my gym log idea from a slightly different angle. It's inspired by this very Blogger and Gallery 2.0 that I installed the other day on my website. The combination got me thinking about how a web based interface for a gym log mightwork. Like Blogger anyone could register to have an account. The user could log-in and have a variety of choices:
  1. Input their latest workout stats
  2. View their workout history; graphs, pesonal bests
  3. Set new goals
  4. View their friends logs
  5. Overlay a friends stats on top of their own graphs (competition!)
  6. Edit preferences ( add activities that aren't in the gym log by default i.e. dutch bike tossing)
Now I haven't even mentioned anything about my original idea of having a device to take into the gym like a PDA to replace the pen and paper. Why? Well my reasons haven't changed for not wanting to write an app for a mobile device. But! The mobile device still has it's place in this latest plan. You see...the web interface would be just one way to make input. When desiging the software I would make available a public API so that anyone could write their own application for inputting to the gym log. This would open the door for other software developers to write apps collecting data on PDA's, cell phones, Ipods, etc. The data could then be imported into the gym log using the public API! This relieves me from supporting the vast number of mobile devices out there. I figure that I will focus on making the web based side of the gym log as useful as possible and let the users write applications for their favourite cell phone or latest ipod, or whatever. These mobile apps that interface with the gym log will be the gravy that really make this thing useful. I can't wait for that day when I can take a mobile device into the gym, log my workout as I do each exercise, come home, plug it into my PC and then view the results on GymLog.

Saturday, December 10, 2005

Nederlands Fotograferen

I installed Gallery 2.0 this morning which was fairly painless. The first images I put online are my photos from my trip to The Netherlands last week. Enjoy.

Thursday, December 08, 2005

FreeDNS for all the good kids

I think I've finally got my dynampic IP troubles fixed with FreeDNS. I decided to use the inadyn client for doing updates of my dynamic IP whenever it happens to change.

Buh-Bye DHCP

Decided it was time to fix some annoyances with my home network. The wireless router/modem I got from Sympatico does the usual DHCP thing by default. I was getting sick of how DHCP assigns your PC *some* random IP each time. This becomes problematic when trying to SSH to other PC's in the house because I always have to consule the web based router software to lookup the IP of a machine. I feel guilty but actually didn't know how to switch frmo DHCP to static IP's in Windows so I googled around a bit. I found a useful article on About: Disable DHCP and Use Static IP Addresses To Protect Your Wireless Network. Now with static IP's in place, next was to edit the hosts file and give each machine a fancy hostname. There is no way am i bothering running a name server for 3 PC's, I'm quite happy with just editing the hosts file ~:>

Next up is getting FreeDNS straightend up, followed by apache.

Sunday, November 13, 2005

First Blog

So here we go. My first blog entry at leif.ca. Lets see how this looks shall we.