Today was a busy day! We had church, then we went shopping at a nearby mall after lunch at Red Robin. We came back and had a nap, followed quickly by dinner with Paul and Kara. Next up, Rock Band 3 for the rest of the evening! 🙂
Where the answer is almost always 42.
21
Nov
Today was a busy day! We had church, then we went shopping at a nearby mall after lunch at Red Robin. We came back and had a nap, followed quickly by dinner with Paul and Kara. Next up, Rock Band 3 for the rest of the evening! 🙂
Tags: NaBloPoMo10, novblopomo10, relaxation
20
Nov
A recipe for a great Saturday! Tasha and I grabbed lunch at Denny’s after dropping by to Black & Read so I could get the Gamma World RPG. (I’m running a session next week, so I had to get it so I knew the rules!) After that, it was over to the Ballews for D&D, and now I’m back home playing Rock Band 3 with the Waltons! Not much else to report at the moment, so it’s time to get back to rockin’!
Tags: NaBloPoMo10, novblopomo10, relaxation
19
Nov
Please come home. I miss you.
Today was the last day before a short week, and many people opted to take long vacations over the holiday. I’m not one of those people, opting to spend my vacation time for the Christmas holiday, and that means that I have many added roles over the next week. Unfortunately, people started bailing out early this week and I got stuck with a problem that I did not know how to solve. That had led me to just now getting off work, and unfortunately missing karate AGAIN this week.
I’m going out now to be with my friends and not think about work for awhile, so I bid you all good night.
Tags: NaBloPoMo10, novblopomo10
18
Nov
Today was a very big day. Tasha and I got to go to the doctor to find out the gender of our new baby, and IT’S A GIRL! More importantly, the baby is looking perfectly healthy according to the doctor. Tasha and I are both very excited now. Tasha says that it feels much more real now that we can think of the baby as a certain gender, we get to be excited about decorating, selection of the name (yes, we have options and no you can’t know what they are), and all the other fun elements of preparing for your new child.
There are new sonogram pictures, I plan to scan them in over the weekend and post something about them. This time we were able to get clear pictures of anatomical elements like the spine, the femur, a nice shot of the heart beating, and a new (blurry) profile. This is so cool!
Tags: baby, NaBloPoMo10, novblopomo10
17
Nov
Because 14 years ago today, I started dating my lovely wife Tasha.
Last year I went into great detail about my recollection of those events, I always like recounting that story because I can remember very distinctly the way I felt that day. I remember the initial rush, the smell of the cold air on the bus, and all of the excited trappings that come along with the start of a new relationship. I think this is part of the reason why walking around in cold weather relaxes me, it was my only means of conveyance back then and I was almost always walking to or going somewhere with Tasha.
This year is increasingly special because on Thursday we get to find out the gender of our baby. In case you didn’t read the linked blog post above, our first date technically took place on 11/18. It’s really cool when neat things continue to happen on the same day as time moves forward!
I love you, Tasha. Thanks for being such a great girlfriend and wife! Pretty soon you will be able to add “great Mom” to your list of accomplishments!
Tags: NaBloPoMo10, novblopomo10, relaxation
15
Nov
Over the weekend, I inherited some unit test code. This code was functional, but it was my job to inspect it to ensure that we had appropriate coverage. It covered a pretty broad spectrum, so after 10 hours of inspecting the code carefully I had come up with some observations that later led me to these handy unit testing guidelines.
When designing unit tests, ask yourself the following questions:
Let’s look at these questions in further detail to understand better:
Is my test setup concise, clear, and flexible?
The root of this question lies in lazy coding versus intentional coding. The code that I happened to be testing relied heavily on certain classes and did not have an overloaded constructor. This forced what should have been a 1-2 line constructor to build the object into a 10-15 line long block of setting arguments for the class after it had been created. To make matters worse, most of the code was using the same parameters each time the object was created, which just begged for refactoring. We spend a lot of time in our unit test code, in some cases MORE time than our actual production code (especially if you are practicing Test Driven Development) so you owe it to yourself to write concise, clean, and readable code. If not for you, then for the next poor schmo that has to read your code later.
By ensuring you have proper constructors and helper methods to make your default objects and allow setting of arguments, you don’t pull focus from what the unit test is actually doing by hiding it’s value in tens to hundreds of lines of test setup. In practice, I find myself questioning if my setup is concise enough if it extends much beyond 10 lines of preamble before I call the method I am testing. This leads nicely into my second point:
At a glance, is it clear what my unit test is actually testing?
Unit tests should either test a specific method’s output, or a specific business scenario. In both cases, you don’t want the actual method you are testing to be hidden amidst tens to hundreds of lines of setup. If you have that much setup, you need a helper class to enable quick setup of the objects and values that you need to test your method especially if you’re planning on doing more than one test or your QA team hasn’t gotten hold of the feature yet. (I could go on a rant here about test driven development and why it is important, but that topic is for another time).
Am I asserting the proper results apply for all relevant fields?
Last, but certainly not least, it is important never to lose sight of what a unit test is meant to do: assert, assert, assert. If you are testing an object, it does not hurt to assert each value that is relevant to the method that you are testing. Often times, it is easy to assume that another unit test somewhere else in the codebase is testing that field but I have found that often there is less coverage than expected. Spend the extra few lines and assert all of the return values in an object, especially if the case took a considerable amount of setup code to get rolling.
In this same vein, also be careful to think about scenarios how your code will be invoked or used. Often, unit tests do a good job of testing the individual puzzle pieces that make up your implementation, but sometimes if fit together incorrectly the feature still does not work properly. In our group, I recommend a combination of traditional unit level tests with more “functional units” that exercise the workflow to ensure that the piece of code I am testing plays well with the other bits of code around it. A good example is testing a method directly and then testing the client service that wraps it into a feature to ensure that the proper values are returned in both cases.
So that’s it! Three simple steps that help you toward writing better unit tests. If you find this type of thing interesting, let me know in the comments and I will write more!
Tags: c#, NaBloPoMo10, novblopomo10
14
Nov
Today started with Church, followed by lunch at Denny’s because the baby demanded Tasha to get scrambled eggs. The Church is doing a series on tithing (or giving of 1/10 of your income to Church or charity) and this has got me thinking. I’ve wanted to begin charitable giving for awhile, hearing inspiring stories from parishioners about how it has enriched their lives has me inspired to do the same. Tasha and I discussed it over lunch, and we agreed that once we had our emergency fund completed we would start giving more in addition to ramping up our own retirement savings.
The rest of the day was spent helping PW and Kara move some furniture for their upcoming floor staining and then cleaning up the house because they’re staying with us while the work is completed. We had a nice dinner out at Beau Jo’s pizzeria to break up the cleaning spree, and that about calls the Sunday a wrap. Tomorrow is going to start early with an important meeting, hopefully everything will go well. The blog posts may be short the next few days since I will be keeping Paul and Kara entertained, but more soon!
Tags: NaBloPoMo10, novblopomo10, relaxation
13
Nov
I am pleased to report a very productive after-karate evening. I came home and had my favorite guilty pleasure for dinner, Flavorite Beef Noodles. Shortly thereafter, I finished a tweak to a recent side job which took about an hour and moved on to fixing my ailing Media Center thanks to a package left on my doorstep by NewEgg. Once again that company impresses me greatly with their quick shipping and easy ordering system.
The video card was all that fried (as far as I can tell) and now I can boot it up, Remote Desktop to it, and connect via Visual Studio. I’m going to hold off on actually testing the Media Center features until tomorrow, mostly because I have some other things I want to do before bed tonight. Namely, I need to get the rabbit his medicine and then I’m going to surprise Tasha by doing some of her chores. I’ve been busy and distracted this week between work and a few side projects that I have going, and she deserves a little more attention. Since she’s sleeping, I will show my appreciation by making her day easier for tomorrow.
Speaking of tomorrow, I am going to work a flex day so I can get back to Illinois one day earlier. We have to allow for more travel time with the pregnancy and there is a deadline looming at the office, so this works in everyone’s favor. I’m off to do some more chores now, more soon!
Tags: media center, NaBloPoMo10, novblopomo10, relaxation
12
Nov
The title says it all… we had a very hard workout that started out with combinations. We did a three punch combination moving forward and backward, so a six punch combination. We repeated this combination about 50 times, and then moved on to a few different variations that added a front kick and a round kick amid the punches. A few dozen reps of this combination and it was time for segments of kata. We did forward and backwards sections from Gojyushiho Sho, Heian Yondan, Heian Sandan, and Empi.
After this, we worked on our individual katas by extracting out our own combination of our choosing that could be done forward and backward. I picked the knifehand block and kicking combination from Sochin and it worked pretty well. We then did a few katas, and after each we had to do pushups… first 10, then 20, then 30, then 20, then 10. I wished for death about midway through the pushups, it was terrible.
My stamina was really rough tonight. My lungs were screaming, my legs burning, and the pushups nearly did me in. I don’t know if I’m worn out, tired, sick, or out of shape but any way you cut it tonight was hard. The good news: I talked to Sensei Tarrant about the idea of training toward taking a Sandan exam sometime next year, mostly as a goal. He was very receptive, and asked to see the syllabus so he could help me train in a way that would help me get ready. That’s exciting, and he seems very eager to help me get back in fighting shape again.
That’s all for now!
Tags: Karate, NaBloPoMo10, novblopomo10
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |