Monday, December 15, 2008

Book Review - Bernard Clayton's New Complete Book of Bread

I thought it would be a good idea to do a quick review of one of my bread cookbooks, Bernard Clayton's New Complete Book of Breads.

I hate to say it, but right now this is one of my least favorite cookbooks. This is the only cookbook I actually edit before I use. There are a couple different methods of making bread: by hand, using a mixer, or a food processor. This cookbook annoyingly combines the three methods in the directions. I actually go through the recipe before I make it and put a line through all the instructions that don't apply, just to make it easier to follow.

Additionally, the directions are not always clear. Just as an example, the last recipe I made had and instruction to knead the bread for 8 minutes in the mixer, but at what speed? It seems like there would be a pretty significant difference between kneading at high and at low.

My final complaint about this book is that the ingredients seem a little dated. Several recipes call for shortening, which I don't use. Many recipes call for powdered milk. This has caused me to skip a lot of recipes. I think I will go back and substitute butter for the shortening and milk for the powdered milk, but it seems the recipes are showing their age.

One more comment about the book... everything is measured in cups. This is probably a personal preference, but I would much prefer measurements by weight. Of course a lot of bread making has to do with the air humidity and the moisture content of the ingredients, so perhaps measurement isn't as important as I think.

Even with all those complaints, I still use this cookbook. The sheer breadth of recipes is outstanding, and the brief stories that accompany each recipe are nice. It just bothers me when something could so easily be great, but due to flaws, is merely good.

A Bread Winter - Raisin Rye Bread

I've decided to bake more bread this winter. I'm going to aim for baking one loaf of bread a week, but I think that will be a difficult goal to meet.

This week, I decided to make the Raisin Rye Bread from "Bernard Clayton's New Complete Book of Breads". I'll follow up this post with a brief review of the cookbook.

I had a little trouble making the dough come together in the mixer. It seemed very wet and I kept adding flour. I shaped the dough into two baguette sized loaves. Next time I think it will be better make shorter, larger in diameter loaves, or perhaps rounds. Also, I forgot the egg wash at the end.

Aside from those issues, the bread was very good. The texture was great, the flavor was great and the crust was great even without the egg wash. It wasn't all that much effort either. I will definitely make this recipe again.

Wednesday, November 19, 2008

Ran through my first pair of shoes

Last week I was looking at my running log and decided to see how many miles I had accumulated on my running shoes. I did some quick math and realized I was up to 400 miles! I did a quick search on Google and found most people recommended replacing running shoes in the 300 - 500 mile range.

That is a first for me. I ran through my first pair of shoes. This probably isn't a big deal for most people, but it feels like a big accomplishment to me.

I went to my local running store, Marathon Sports, and looked around. My old shoes had been quite good and I was hoping to just get the same model again. Unfortunately, Brooks has since discontinued the model I had. So I got another similar model from Brooks. They are, as the sales guy put it, "very green".


You can see more info about them here.

So far, the new shoes are working out very well.

Thursday, October 9, 2008

Triathlon goals - shooting for average!

Okay, so here are my goals:
  • The big goal: Finish the sprint triathlon!
Secondary goals:
  • Finish the swim at a pace of 1 minute per 50 yards. If my calculations are correct, that would be about 18 minutes for half a mile.
  • Finish the bike with an average speed of 15 miles an hour. That would be about 45 minutes of biking for the ~12 mile course.
  • Finish the run with an average pace of 7:30 minutes per mile. That would be a little over 23 minutes for a 3.1 mile course.
If we add 5 minutes for transitions, that would put my overall time for the race at a little over 90 minutes. Of course, the overall time would be different if the race distances vary.

I really don't know my swimming speed or my biking speed, so I don't have any personal data to use as a basis for those goals. So, here's what I did: I found the results of a fairly large sprint triathlon and used the median result from my age group for each event. (You can see the race results I found here and here.)

The running goal is going to take some effort. Right now, my usual running course is a somewhat hilly 3.5 miles. If I push myself I can run it at a 7:45 min/mile pace. So, my goal for the triathlon is to beat that pace by a decent amount after swimming and biking. I think that is going to require a significant amount of training.

I am currently running 3 or 4 times a week. If I increase my workout frequency (not necessarily running) I think that will make a big difference in my running pace. I'm thinking about running 3 days a week and increasing my distance to about 5 or 6 miles, swimming 2 days a week and biking 1 day a week. It's just a thought right now, I'll let you know how it goes.

Wish me luck!

Triathlon here I come

Watching Kevin finish the Ironman in Wisconsin and following Ken's Ironman have inspired me to train for a triathlon. I'm not crazy, so I won't be aiming for an Ironman. I'm going to train for a sprint triathlon. It should be about 1/2 mile swim, a 12 mile bike ride and a 3 mile run.

It's too late to train for one this season, so I'll have to wait until next year before I can enter a race. I'm trying to get a bunch of people to do it, so if you are interested, just let me know.

I started consistently running at the beginning of last summer and I have really been enjoying it. Right now, my typical run is about 3.5 miles and I usually go 3 or 4 times a week. I feel very comfortable running, so barring injury, I don't think the run will be a problem.

All my biking is in the city, running errands, grocery shopping, going to the farmers market and the occasional recreational ride on the Minuteman bikeway. Depending on the race course, the bike portion of the triathlon may be difficult for me. I will need to train on the bike to make sure I am ready for it.

I don't have a road bike at the moment. I have a nice mountain bike for off road use and a heavy-as-a-tank hybrid bike for city use. I will have to keep my eye on craigslist to see if I can pick up a decent bike. The idea of building a road bike, including the wheels, is appealing. It could be a nice project for the winter, but it would be an expensive project.

For me, the most difficult part of the triathlon will be the swim. I can keep myself from drowning, but I am not very good at doing the crawl. I have started training for the swim portion of the race and so far I am enjoying it. I think it will be nice to go swimming in the winter when the conditions aren't favorable to running.

My next post will be my goals for the triathlon.

Thursday, September 18, 2008

Linq2Sql Designer error: Unspecified Error on table rename

At work today, we hit an annoying little bug with the Linq2Sql DBML designer in VS 2008 SP1.

When trying to rename a table in the designer, the rename would fail with the message: Unspecified Error

I found this thread on the MSDN forums and tried moving all the includes inside of the namespace (what a strange bug/fix) but that did not work.

So here is our workaround:
  1. Open the DBML file in an editor, not the designer. (Right click on the .dbml file, select "open with" and choose the XML editor.)
  2. Find the table you want to change and change the name attribute of the type element.
  3. Save your change - Visual Studio will regenerate the designer code with the new name.

Hopefully, this will save you some time if you hit the same problem.

Thursday, July 3, 2008

CSA: Week 2

On Sunday we went and picked up the 2nd week of our CSA share. Again, we got more greens, radishes, strawberries and beets.


When we pick up our share we walk down a series of tables of vegetables and get to choose which ones we want. For example, last week we were able to choose one item of each type - so they have red beets, and orange beets, and round beets and cylindrical beets. You choose what you want and shove it in your bag. (We went with the cylindrical beets and radishes this time.)

Soon they will start distributing the shares in boxes. I think most of the distribution will be done beforehand and we choose a couple items to customize our share, rather than choosing every single item. Right now, with everyone choosing every item, it takes a little while to get your share.

The share pickup location is next to our favorite bakery and it seems that most people come in twos. One person waits in the line to pick up their CSA share and one person waits in the line to get bread. It reminded me of when I was as a child, being told of people waiting in line for bread in the former Soviet Union.
It is hard to see, but there are 2 lines here. On the left is the line for the CSA. On the right is the line for the bakery.

Tuesday, July 1, 2008

CSA: Week 1

We joined a CSA this year. If you don't know, CSA stands for Community Supported Agriculture. Essentially, you pay a farmer upfront for a share of the crops during the season. You get whatever is in season at that moment. It is a good way of supporting a local farmer and eating locally grown foods.

We joined the Stillmans Farm CSA. I don't think the farm is 100% organic, but they call it "Conscientiously Grown". We signed up for a half share.

We have only had 2 weeks of crops so far, but it has been very exciting for us, since we are food nerds. I thought I would post some pictures of what we are getting. Right now the selection is a bit limited because it is early in the season.

We got radishes, beets, strawberries, chard, spinach, arugula, lettuce and some greens that I don't recognize.

I was out of town last week, so Kate had to eat all of this herself!

Tuesday, June 3, 2008

Great resource: Rob Conery's MVC screencasts.

In the past couple days I found a great series of blog posts/screencasts. They are from Rob Conery and he is posting an attempt he is making step-by-step to implement a website using the ASP.Net MVC structure with Test Driven Development.

I found it very interesting to watch him go through this. It is quite a nice break from the typical Microsoft demos which seem to be a little more marketing and less real world experience.

It is also interesting to see him code something in a different way than I might and to see how things unfold. I guess you could call it one way pair programming.

Anyway, I would suggest checking it out. Here is a link to his first post in the series:
http://blog.wekeroad.com/mvc-storefront/mvc-storefront-part-1/

And here is the list of posts in the category he has set up in his blog. You'll have to navigate back in this list to find the earlier posts:
http://blog.wekeroad.com/mvc-storefront/

I think one of the most interesting ideas I've picked up from his posts so far is the way he is composing filters using the IQueryable<> interface. For example in his data access layer, he has a method called GetCategories() that returns IQueryable. Then instead of adding a separate method to get a category by an id number, like GetCategory(int id), he creates an extension method, .WithId(int id) that extends IQueryable so the full call looks something like:
Category c = dataLayer.GetCategories().WithId(4);

And, because LINQ only executes queries when needed and these filters are part of the expression tree, the filters are reflected in the actual query that hits the database. In this example only the category with id = 4 is pulled back -- the filtering is done at the query level.

It is a very interesting approach. It cleans up the LINQ code a bit and makes it quite readable. I'll have to fool around with the idea in my own code to see how I like it. You can see some of the filter code here.

If you have some time and you are interested in the ASP.Net MVC project and test driven development/design, I would highly suggest watching his videos.

Friday, May 9, 2008

Review: Enjoy Barcelona apartment: "The Amparo"

A couple weeks ago, we went to Spain on vacation. For the first week we rented "The Amparo" apartment from Enjoy Barcelona in the Barceloneta section of the city.

The week in Barcelona was a lot of fun, but our apartment was not what we thought it would be. The website lists the apartment with 3 stars - I think that is way too generous. Also, the pictures on their web site are a bit misleading.

The apartment was dirty, smelled of sewer gases and was quite a bit run down. The toilet top was broken. The bathroom sink and shower were very slow to drain. Floor tiles were popping up in the kitchen. The kitchen was not properly stocked with pots and pans. There were cigarette ashes in the silverware drawer. The sheets were clean, but the blankets smelled. In one room the curtains had fallen off the window and were shoved behind the door.

It was basically the same level of accommodation as a one star hotel or a hostel, maybe a little worse.

I think this apartment was overpriced for the condition it was in. It is quite unfortunate because the apartment is in a great location, and with a little work the place could be great.

I would not stay in this apartment again, and I don't think I would use Enjoy Barcelona again. Their employees were friendly, but I think they are misrepresenting this apartment.

One good thing that came out of the apartment was that every place we stayed in afterward seemed like luxury. ("These blankets don't smell like body odor! Wow, how fancy!")

Monday, April 21, 2008

Bad picture of Lance in the Boston Marathon

I went to the Boston Marathon today and I took this horrible picture of Lance Armstrong. You have to look really closely to find him. He was running in a pack of people and I couldn't pick him out in time to get a good photo.

Monday, March 10, 2008

ClickOnce Error: DeploymentDownloadException File Already Exists

ClickOnce is OnceAgain acting up. My project was building and publishing fine, but when I went to run the application, it would fail while downloading the new version. The complete stack trace of the error is:

System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file://[snip].dll.deploy did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.IO.IOException
- The file 'C:\Users\[username]\AppData\Local\Temp\Deployment\[snip].dll' already exists.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)

I immediately suspected some recent changes involving the deployment settings. A coworker added some project references to the solution for this application. This resulted in some strange compile errors that basically said the referenced assemblies had to be signed to be marked as prerequisites to the project. When checked the application files (project properties -> publish tab -> application files button) and the assemblies were set to "Include (Auto)" like pretty much everything else. I changed them to "Include" and the application built fine.

The deployment error above was for one of those assemblies. On a whim I decided to create a new "Download Group" in the application files dialog. That seemed to solve the problem. Why that solved this problem, I don't know.

As much as I like ClickOnce, it seems to be getting more and more finicky.

ClickOnce Error: The signer's certificate is not valid for signing.

Today when I was trying to publish a ClickOnce application that we use internally, I got the following error:

The signer's certificate is not valid for signing.

After looking around and some searching on Google, I was able to find the problem and resolve it. My problem was that the certificate I had been using to sign the ClickOnce deployments had expired. You can view the status of your certificate in Visual Studio, in the project properties window, on the signing tab.

To fix the problem just create a new certificate by clicking the button titled "Create Test Certificate..." It will prompt you for a password, which I left blank. Once you have the new certificate created you should be able to publish once again.

Tuesday, February 26, 2008

Review: Samsung LN-T3735H

About a month ago my girlfriend and I decided to buy a new television. We had been thinking about his for a while.

I researched different sizes and models. I liked the price of the ViewSonic LCD televisions, but there seemed to be quite a few bad reviews on NewEgg.com. We decided to go with Samsung. According to Best Buy employees and Consumer Reports, Samsung has a good reputation for LCD televisions.

We looked at different size televisions and we decided that a 37 inch diagonal was good enough. More on that a little later. The Samsung T3735H was exactly what we wanted. It has 3 HDMI inputs, which will be handy to plug in a new DVD player or media center. One of the HDMI inputs is on the side not the back. The screen is 720p. 1080p would be nice, but we probably wouldn't be able to see the difference on a 37 inch screen.

This Samsung model isn't sold in many places. There were only a couple sites online that sold the model and when you considered shipping and handling all the prices were about the same. We decided to buy the TV from BestBuy.com*. After some trouble, we were able to schedule delivery for the TV and we got a free wall mounting bracket, which is nice. The price for the TV was around $1050 on sale. After shipping and taxes the price came to right around $1200.

We also bought a new component audio/video cable to connect the DVD player to the TV. We bought the cable from monoprice.com and I am very happy with it. Cables and accessories tend to be high markup items at retailers like Best Buy. The cable I got from monoprice was very cheap and seems to be very high quality.

The television was delivered. We moved our old 27 inch TV out of the way and put in the new shiny LCD. Both of us had the same initial reaction: Oh no, this TV is way too big. At the store the 37 inches TVs seems a little small. It seems like 40 inches is the middle of the road. Now that the TV is in my living room, I can't imagine getting a TV any larger than 37 inches.

I am not a TV expert, but I think this TV is great. HD shows look fantastic. Standard TV looks fine to me -- it seems to be a common complaint that standard tv looks horrible on LCDs. Using an antenna made from a coat hanger (really) I was able to pick up several local HD channels -- all the major broadcast networks. I live in an urban area and the antennas are only about 5 miles away according to antennaweb.org.

The on screen menus and controls for the TV are quite easy to use. There are 3 presets for viewing, each tuned for different environments. Dynamic for brightly lit rooms, standard, and movie for watching TV or movies in low light. I think the remote control is decent, if a bit big. I have an Samsung DVD player that came with 2 remotes. One remote had every button, the second remote just had the commonly used buttons. I wish they had provided a smaller remote for the television.

There are 2 features which are purely cosmetic. There is a sound that plays when you turn the TV on and off. There is also a blue glowing light on the bottom of the TV. The sound is cute at first, but quickly becomes annoying, espeically late at night when you don't want to wake your neighbors. Luckily, both features can be turned off using the menu system.

The one thing that is a little odd about this TV is that seems to be not well known. There aren't many places selling it and it isn't even really listed on the Samsung website. I'm not sure if the model is being discontinued or if there is something else going on. With the experience I have had so far, I highly recommend this television.

* The fun part is that many years ago I work as a consultant on the BestBuy.com website. Also, one of my friends worked on the system that was used to schedule the delivery of the TV to my apartment.

Thursday, January 24, 2008

WCF error: The socket connection was aborted.

I got this error when I called my WCF service:

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9921880'.

One of the things I've noticed with WCF is that some of the error messages are not very helpful.

The actual problem here was that the message was too large and it was exceeding the settings for the binding. I updated my bindings and everything is working fine now. In the MSDN docs, it says these settings are to limit denial of service exposure, so maybe that's why the error message isn't very helpful.

Here are the settings I updated:
  • maxReceivedMessageSize
  • maxBufferSize
  • maxBufferPoolSize

I updated these settings on the client and server.

Warning: I have not done any research into these settings to see exactly what they are. It is quite possible that changing only one of these settings will work and it is also possible that changing these settings may have an adverse impact to your system.

So, here is the section from my new config file:

<binding name="MyCoolBinding" maxreceivedmessagesize="10000000" maxbuffersize="10000000" maxbufferpoolsize="10000000">

Good luck!



Wednesday, January 16, 2008

Samsung - Not supported mode with DVD player

I was trying to connect my DVD player to my new Samsung TV last night and I kept getting a "Not Supported Mode" error. Nothing I found in the user manual or on Google helped me. Well, after a little trial and error I figured out the problem. I had accidentally connected the cables incorrectly. I am using component video cables and I had switched the red and green cables. I swear I'm not color blind.

I this helps anyone else that has a similar problem.

Wednesday, January 9, 2008

makecert.exe error: Can't create the key of the subject

I hit a snag while trying to create a certificate for WCF work today. I was following directions on another blog, but every time I tried to create the certificate I would get this error:

Can't create the key of the subject ('<some guid>')

Each time I tried, the GUID would change.

I'm not sure why it is happening, but I did find a workaround. The directions I was following were to create the certificate in the "LocalMachine" certificate store using the following command:

makecert.exe -sr LocalMachine -ss MY -a sha1 -n CN=Client -sky exchange -pe

After some trial and error I discovered I was able to create the certificate in the current user store instead using the following command:

makecert.exe -sr CurrentUser -ss MY -a sha1 -n CN=Client -sky exchange -pe

I thought I would post this message to hopefully save others the effort.
Note to the makecert developers: Please provide more useful error messages.

UPDATE:
I discovered the source of the problem! For some reason, I did not have the appropriate permissions to the directory where the certificates are stored. If you are getting the same error that I was getting, try granting your account (or the admin group, etc.) full control permission to the following directory:

C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

For more information, see Microsoft KB article Q278381