click to see the pics.
picture of my wife.
picture of Elma.
pictures from InterDrone.
I write this post as a means to dump my brain to paper. I have been meeting with a co-worker on a weekly basis with the purpose of allowing this person to gain an understanding of the process of writing software (test driven development, engineering practices, etc.). This person is Mr. Mattie Righter (http://matthewrighter.com/). In meeting with Matt weekly, I have asked him to start the process of writing with the sheer purpose of capturing his thoughts. I believe writing down his thoughts and opinions over time allows each of us to see his growth.
A couple of days ago I was reading this article on paired programming. I knew he was somewhat challenged by the process and had opinions he felt were differing from others within the company. And differing from others in the profession as well. After reading this article and feeling it was well written and well thought-out and information that would probably be well consumed by the populace, I tweeted it to all the people that follow me. It is with great pleasure that I going to say that many people have retweeted and made very positive comments about his writing style and content. So I’m writing this blog post in hopes that others in similar situations as Matt will take the opportunity to start documenting their thoughts and their beliefs. The process of documenting anything allows a person to solidify their opinions about many things. If you follow me on a regular basis or if you do not for that matter and you just happened to catch this blog post via my Twitter feed, please take a few minutes and cruise over to Matt’s website and read his post on pair programming. I have attached the link. Do not feel obligated to leave a comment, but if you enjoyed the read or did not, leave some feedback. When someone is documenting their thoughts and beliefs, this feedback, whether positive or negative is a good litmus as to the content they are publishing. Thank you for your patience as I post this type of information and hopefully promote one of my very talented co-workers.
as part of my weekly get together with Mattie Righter, he and I are working through the ever craft kata.
I have not made quite as good of progress as he, although I am slowly making it through it. I’m spending most of my time attempting to make the kata purely functional with no side effects of any kind.
can get and set Name So, I have already decided to violate/change the requirements of Feature 1. I to not like the idea of a character possession the ability to change their name. I am deciding to prevent the ability to change your name.
can get and set alignment alignments are Good, Evil and Neutral I decided to create a ‘sealed trait’ for Alignment with the possible values of Good, Bad and Neutral.
I like the idea of not seeing string values within the code. This also makes it very clear when reading the code and prevents others from accidentally creating unwanted ‘Alignments’.
I have decided to default a newly created character to an alignment of ‘Neutral’. I have not provided a constructor for anything other than Neutral. If the character is to be anything other than Neutral, then setting after creation will be required.
has an Armor Class that defaults to 10 has 5 Hit Points by default Nothing crazy here… I just followed the directions.
roll a 20 sided die (don’t code the die) roll must meet or beat opponents armor class to hit I created an Attack ‘sealed trait’ that will confine the possible Attack types to ‘Hit’ and ‘Miss’.
When a character attacks an opponent, the roll (1-20) is used to determine if the opponents hit points and the roll constitute an attack of ‘hit’.
If attack is successful, other character takes 1 point of damage when hit If a roll is a natural 20 then a critical hit is dealt and the damage is doubled when hit points are 0 or less, the character is dead I am debating if the ‘attack’ should be part of the character. It seems like it should be a separate class that takes two opponents and a role value… and returns the result. This way the opponent is not required to own the attack logic.
Abilities are Strength, Dexterity, Constitution, Wisdom, Intelligence, Charisma Abilities range from 1 to 20 and default to 10 Abilities have modifiers according to the following table:
| Score | Modifier | Score | Modifier | Score | Modifier | Score | Modifier |
|---|---|---|---|---|---|---|---|
| 1 | -5 | 6 | -2 | 11 | 0 | 16 | +3 |
| 2 | -4 | 7 | -2 | 12 | +1 | 17 | +3 |
| 3 | -4 | 8 | -1 | 13 | +1 | 18 | +4 |
| 4 | -3 | 9 | -1 | 14 | +2 | 19 | +4 |
| 5 | -3 | 10 | 0 | 15 | +2 | 20 | +5 |