Feeding for Healthy Chickens

It’s essential that you maintain close contact with your animals to ensure they remain healthy. Even if you do all of the right things, It isn’t always easy to maintain good animal health. This seems to be especially true with chickens.

We decided to start raising laying hens this year after building a new chicken coop from recycled materials (see the series of coop-related articles). At first the chickens were quite happy and produced eggs regularly. However, with the excessive summer heat, we noticed that their egg shells (not the inside of the egg) seemed to suffer. The eggs weren’t quite as smooth as normal and the shells were thinner.

We had given the chickens oyster shells to eat and they have access to a wide variety of plants and insects, so we thought we were covered. However, it turns out that the chickens weren’t eating the oyster shells and that the summer heat was severely draining their calcium levels—yet another effect of global warming. Because we were inexperienced, we missed some warning signs and the chickens actually began eating their own eggs.

After a lot of thought, we finally found some solutions to fix the problems with our chickens that may be helpful to anyone else who is encountering this problem. Here are the things we changed in our coop and our chickens seem a lot healthier now than before.


  • Place the water feeder where it won’t get dirty (after all, chickens are birds and will fly to the water).
  • Mix the oyster shells into the feed at a ratio of 9:1 to ensure the chickens get enough calcium in their diet.
  • Collect the eggs several times a day.
  • Remove any broken eggs from the coop.
  • Add a vitamin D supplement to the chicken’s water during high heat times when the birds are less likely to get the full amount of sun they require (if you don’t want to use the supplement, then give the chickens vitamin D enhanced milk).
  • Provide fake eggs in each of the nest boxes (the chickens will peck the fake eggs, find that they won’t break, and be less likely to peck the real eggs as result).

Things could have easily been worse. We didn’t lose any chickens this summer and they do all seem to weigh about as much as they should. All of the chickens have remained active. We also didn’t make a few of the mistakes that novices can make, such as feeding the chickens raw eggs or eggshells (which will encourage the chickens to eat their own eggs). Even so, as with everything else we’ve done so far, this summer has been a learning experience and I expect that we have more to learn as we move forward.

Making sure your chickens have access to a variety of greens and insects is an essential part of raising healthy birds. However, there is more to it than that and unfortunately, chickens don’t come with a manual. You may find that you need to work with individual birds to get the most out of them. Let me know your thoughts about raising chickens at John@JohnMuellerBooks.com.


Windows Forms and Threading

A number of people have asked me about accessing Windows Forms controls and their associated events, properties, and methods using an external thread, a different language in the same application, or an external application. These are three completely different situations, but they all have one thing in common—it generally isn’t a good idea to access Windows Forms controls external to the thread that creates them because you encounter all sorts of threading problems. Windows Forms controls aren’t inherently thread safe. If two different threads were to try to access the control at the same time, you could force the control into an inconsistent state and your application would crash—if you’re lucky. If you aren’t so lucky, then you might experience other kinds of problems, including data loss.

Of course, you do encounter situations where you need to access the controls externally. In fact, there is a Microsoft sanctioned protocol for doing so and you can read about it in, “How to: Make Thread-Safe Calls to Windows Forms Controls.” Using this approach is time consuming, error prone, and requires a lot more code than simply keeping your application clean of external thread calls whenever possible. However, it does work reliably—at least, most of the time. Some developers still encounter problems, especially when debugging the application. The solution, in many cases, is to set the CheckForIllegalCrossThreadCalls property to false. Unfortunately, setting this property to false simply turns off the alarm that is telling you that something has gone wrong—it doesn’t fix the underlying problem. Often, the developer hasn’t dotted an i or crossed a t in the somewhat complicated code required to perform this task. If you want to see this technique in action, try out the example shown at, “How to: Use a Background Thread to Search for Files” (various versions  of the same example exist, so make sure you download the version for your setup). A wealth of other examples exists online to demonstrate variations on this technique, but you must proceed with caution because finding a bug in your code is incredibly hard.

There is another way to affect the controls in a form and I’ve used it reliably on a number of situations. Ultimately, any application you create relies on the Win32 API—at least, if you’re using Windows 7 and older. In this case, you have the option of ignoring .NET altogether and interacting with the form outside of the .NET environment. There is even less documentation on this technique, but it also works reliably if you’re careful when creating your application. I documented this approach in a series of four articles that I discuss in my Working with Low Level Code post. In this case, you can access the form and its controls even if you don’t have the application source code (and the technique works equally well with managed and native code applications). In addition, you can do it without using a .NET language. The only requirement is that the language you choose be able to work with the Win32 API. In addition, you must get used to the idea of working with the Windows messaging system, rather than directly with events.

Eventually, new programming strategies will replace the existing Windows Forms approach to creating applications. Older versions of Windows will give way to newer products that allow multithreaded access to controls. Until that happens, keeping your code as clean as possible is an important part of the strategy for making applications robust and error free. Before you decide to access a control from another thread (no matter where that other thread might reside) consider revamping your code so that the access isn’t necessary. Let me know your thoughts on multithreaded control access at John@JohnMuellerBooks.com.


A New Kind of Recycling – Bicycling

I try to keep up-to-date on as many of the current recycling efforts as I possibly can because I feel strongly that reusing resources is one of the most important ways we have of reducing pollution, or at least dealing with it in a way that reduces the damage caused by the resource usage in the first place. One of the resources that see a lot of usage is cardboard, yet I often see the resource wasted in various ways or simply added to a dump somewhere. That’s why an article entitled, “Cardboard bicycle can change the world, says Israeli inventor” attracted my attention. The fact that the bicycle looks nothing like cardboard is interesting, but even more interesting is that this inventor plans to use cardboard for a wealth of other products where metal is traditionally used today.

I find it interesting that the inventor thinks he might be able to use cardboard for items such as cars. I’m not sure what the ramifications of such use would be, but it’s definitely going to prove interesting. For example, what would happen to a cardboard car in an accident? The point is that people are finding ways to use items that would be traditionally labeled junk in all sorts of ways that make the item useful again. At one time the world practiced reuse in significant ways and it looks like we’re headed in that direction again today. It’s no longer possible to waste resources as we have in the past.

What would you think about riding a bicycle made of cardboard? Can you think of other uses for resources such as cardboard that might reduce the burden on landfills? In fact, can you think of a way to reduce trash to the point where landfills aren’t even necessary any longer? The idea of recycling absolutely everything isn’t quite possible today because of the way things are packaged. However, with some effort and clever thinking, it may become possible to recycle absolutely everything at some point, but then we’ll need to have people willing to buy the recycled products. Let me know your ideas at John@JohnMuellerBooks.com.


Interesting Additions to the Dummies Site

I’ve written a number of Dummies books over the years so I check on the Dummies site regularly to see what sorts of things the publisher is currently offering. Of course, there are always new books to read in a broad range of categories. Sometimes I like to browse just to see some of the interesting topics people have come up with over the years. For example, there is a book specifically for Yorkshire Terrier owners named, “Yorkshire Terriers for Dummies.” I keep hoping to find a Dummies book on Border Collies, but so far, no one has taken up the topic. Perhaps I’ll suggest such a book in the future since we work quite a bit with that particular breed. Keeping up with the wide range of books makes it a little easier for me to recommend books to my readers when they ask and I sometimes get a new idea or two simply by browsing through the topics pursued by others.

There are a couple new additions to the Dummies site that you might find interesting. First, if you really want a tee-shirt, coffee mug, or key chain (amongst other items) to show your love for Dummies products, you can get them at For Dummies Merchandise. I was a bit surprised to find that the site doesn’t offer hats at the moment, but perhaps that will change in the future.

Second, if you’ve ever wanted to create your own Dummies book, you can at least generate the cover now at The Official For Dummies Cover Generator. What you’ll get is a novelty cover that includes your title, bullet points, and art. Personally, I found some of the sample covers hysterical, so it’s worth a look even if you don’t intend to generate a cover. You’ll find titles such as Training Your Cat to Play Fetch for Dummies. Interestingly enough, our cat Smucker does, in fact, play fetch. So that particular cover caught my eye immediately.

The point behind these offerings is to have a bit fun with Dummies products. Even though the books cover serious topics, they’ve always done it is in a fun way, which is one of the reasons I’ve enjoyed writing for them so much. Let me know about your favorite Dummies site addition at John@JohnMuellerBooks.com.


An Experiment in Noise Pollution Reduction

I’ve been trying an experiment over the past year. It includes trying to reduce the amount of noise pollution I endure during the day. No, I haven’t buried myself in an anechoic chamber. What I have done is consciously reduced the noise around me, including the sound levels of all sorts of sources. As I’m able, I’m reducing the sound levels of my music and of the television (for example) or turning them off completely. What I’m finding is that the sound levels I listened to when I started sound absurdly loud to me now. I don’t have enough medical knowledge to know whether someone’s hearing can repair itself, but I do know that turning down the sound has forced me to pay attention better when I want to hear something. The difference in focus has had a profound effect.

Reducing sound levels has both health and monetary benefits. The health benefits, at the least, are improved hearing. The monetary benefit is that I find I’m using less electricity to produce sound that I didn’t really want to hear in the first place. In addition, because I’m able to focus on a task with all of my energy, I complete tasks faster and with fewer errors, which usually has a positive monetary impact (or, at least gives me more time to do something else). These are the effects that I thought I would achieve when I started my experiment and they have proven to be quite easy to justify. Most importantly, I now find that I can hear things that I would have missed in the past. For example, if my wife requires aid, I can actually hear her more often (she’s incredibly soft spoken).

I’m finding a few surprise changes as the result of my experiment. For one thing, my blood pressure is less on days where I have fewer noise sources to contend with (as much as 15 mmHg), which bodes well for my long term health. I’m also finding that I suffer fewer headaches and that I appear to have more energy. So far, I haven’t seen much difference in my heart rate, which is something I had expected given the other changes I’ve noted. I wish there were some way to quantify how much of this effect is due to sound reduction and how much is due to overall health improvement due to our self-sufficient lifestyle, but I have to think that the sound reduction has a significant effect.

There are a few negative effects to the sound reduction experiment. The first is that I find that I wake easier at night. Sounds that I didn’t notice before are quite obvious now. So, when an animal is killing a rabbit outside, I wake now, rather than sleep through it. The disruption of my sleep does have a negative health effect, but I think the consistent positive health benefits I’ve received outweigh this somewhat negative effect (given that I fall back to sleep quite easily). The second is that I sometimes find myself straining to hear a sound that isn’t there. This psychological effect will likely become less pronounced as time goes on, but for now, it causes some level of stress when it occurs, which is only occasionally.

I haven’t completely cut out sound sources. For most of us, the complete loss of sound sources isn’t obtainable, desired, wanted, or even needed. What I have done is made a conscious effort to reduce the loudness of sound sources when I can. For example, instead of listening to the television at the 35 level, I’ll listen at the 25 or 20 level instead. I’ve cut music sources down to half their previous levels and I turn the music off completely in the afternoon when I’m focused most on writing. I also use hearing protection now even if the sound source isn’t what most people would consider absurdly loud (when using the lawn mower, for example).

Noise pollution poses serious health risks to people today. It isn’t just annoying, it causes all sorts of health, environmental, and monetary problems. While I have always advocated the use of hearing protection when working around loud equipment (wood chippers, weed whacker, chainsaw, blower, circular saw, and so on), this is my first foray into reducing sound levels from all other sources. The effects have been pronounced and I’m now beginning to wonder just how far I can take this and still maintain quality of life. There is a balance to things, after all. Have you considered the effects of noise pollution in your life? What can you do to reduce it? Let me know your thoughts on noise pollution at John@JohnMuellerBooks.com.


Maintaining Your Chainsaw

It’s wood cutting season and I’ve already been in the woods a couple of times. Nothing is quite as nice as a fresh breeze, wonderful scenes, the feel of nature, and the smell of freshly cut wood. I choose the wood carefully, as described in Choosing Wood Carefully. However, no matter how carefully you choose the tree, the task is only as easy as the condition of the tools you use. The tools must be the right size, fully maintained, and inspected carefully. Of the tools I use, the one I worry about most is my chainsaw. A failure of my chainsaw at the wrong time could mean death.

I know a lot of people maintain their saws personally. However, given that my small engine experience is limited, I normally take my saw to a professional for its annual maintenance. This includes everything from cleaning the air filter and changing the fuel filter, to making sure the saw is clean and has a sharp chain on it. This annual workup is enough for my needs because I’m not using the saw professionally. I cut just enough wood to meet my heating needs each year, plus stock up a bit of emergency wood.

However, I do perform certain types of maintenance every time I go out to cut wood. This frequent maintenance may seem like overkill, but I really don’t want to end up dead due to an equipment failure, so I perform these checks absolutely every time I use my chainsaw:


  • Clean the exterior of the saw.
  • Inspect the saw for damage.
  • Check the sharpness of the chain and replace it if necessary.
  • Clean the area that houses the chain when I have the chain off.
  • Verify the chain is at the proper tension.
  • Grease the bar sprocket.
  • Fill the chain lubricant reservoir.
  • Fill the gas reservoir.
  • Check my safety equipment, which includes safety glasses, hearing protectors, and heavy gloves.

Even performing all of these checks, it’s possible that you’ll have an equipment failure, but it’s a lot less likely. If you’re smart, you’ll continuously check for potential problems while you’re working in the woods. Make sure you check the saw every time you refuel it and always ensure that you add bar chain lubricant when you gas up. It also doesn’t pay to be cheap in this case—use high quality lubricant and make sure your gas is fresh and has the proper two-cycle engine oil in it.

It often amazes me that people don’t take more care when they prepare to go into the woods. Even though I feel that the woods are one of the most beautiful places on earth, I also give them the respect their due and you should too. Let me know your thoughts on chainsaw maintenance at John@JohnMuellerBooks.com.


Exciting Applications Mean Happy Users

At one time a developer could create a command line application with the most horrid and undocumented interface possible, and still get people to use it. That’s because the users were other geeks who loved the complexity of working with computer systems. For these users, part of the thrill of using a computer was the fact that it was hard to do. They saw the skill of using a computer as something that almost made them part of a secret society or possibly magicians of a sort. In fact, it was Arthur C. Clarke who stated, “Any sufficiently advanced technology is indistinguishable from magic.” Today, computers are no longer magic—they’re a well-understood commodity, and users are no longer geeks for the most part, they consist of everyone else who would rather view all technology with the same lack of attention as a light switch. In order to garner attention for your application, you must create usable interfaces that generate excitement—something that many developers have a hard time achieving and a topic that is sadly lacking from college courses.

That’s the reason I wrote, “Creating Excitement for Your Next Custom App.” Most developers can create interesting and useful applications that perform specific tasks, but they have a hard time making the application exciting because they can’t view things in the same way that the user does. This article provides simple techniques that you can use to make your next application a lot more exciting to end users. The focus of the article is to help you see things from the same perspective that your users do so that you can better relate to user needs and become a lot more successful in your development efforts with a lot less work.

We live in a world of extremely short attention spans, sound bites, constant stimulation, and people who have no desire to rack their brains thinking about anything. If you want to be a successful developer today, you really do need to generate the kind of attention that attracts users. It doesn’t matter how interesting your application is if no one tries it. In order to gain a following, you must first interest users in working with your application. Once a user sees how useful your application is, he/she will tell others and your application will become a success, but you won’t go anywhere without generating the needed excitement first. Let me know your thoughts about the article and techniques you use to generate excitement at John@JohnMuellerBooks.com.


NumPy and SciPy Support in IronPython 2.7 – An Update

Since I last wrote about NumPy and SciPy support in IronPython (see the NumPy and SciPy Support in IronPython 2.7 post), I’ve received some additional e-mails from readers on the topic. It turns out that there are some twists and turns to this support issue. Some readers have noted that the use of ironpkg-1.0.0.py file from Enthought actually causes problems with the Visual Studio IDE. You may very well see an assertion error. The error shows up when you attempt to type clr.AddReference(. As soon as you type the (, the IDE displays the assertion error. I haven’t personally experienced the error, but you can find discussions of it at http://pytools.codeplex.com/discussions/349615 and http://pytools.codeplex.com/workitem/656 (amongst other locations).

The issue is that the NumPy and SciPy support is strongly compiled to use a specific version of the IronPython libraries. In fact, a few authors have gone on to suggest that you use the version of IronPython supplied by Enthought, which seems like a good idea to me. I’m using IronPython 2.7.3 downloaded directly from the Codeplex site without any problem. For the time being, I’ll continue to use this version for your support questions so that I can provide the best possible information. If you encounter problems using this version, you may have to download the Enthought-specific version of IronPython to ensure NumPy and SciPy support works (or go without these libraries).

Simply installing the Enthought version of IronPython won’t be enough to fix the problem, unfortunately. You must remove the NumPy and SciPy library files completely using the ironpkg –remove command (specifically ironpkg scipy –remove in this case). You must then uninstall the copy
of IronPython that caused the error, which includes physically removing
the folder that contains the IronPython files. After you remove everything, restart Visual Studio to ensure that your IDE is working properly. Then you can install the Enthought version of IronPython and reinstall the NumPy and SciPy libraries. Following this procedure should fix the assertion error if you’re experiencing it.

I’ve been told that there will eventually be a fix for this problem, but when you think about it, the fix can’t be complete using the current programming strategy because you’re relying on low level routines to perform a specific task. Remember that you must start your application using the -X:Frames switch or you’ll most definitely run into problems. Let me know if you encounter any other issues with this particular issue at John@JohnMuellerBooks.com.


Exploring the TimeCheck Application (Part 14)

Today we’ll wrap up the discussion about frmConfigure. If you remember from the Exploring the TimeCheck Application (Part 13) post, we’ve finished up the major configuration controls, but there are three areas that you still need to know about:


  • Constructors
  • Form Loading
  • Form Closing

All three of these elements appear in this post. Let’s begin with the constructors. The application can either create frmConfigure by defining a blank form or by passing information needed to populate the form with data. The following code shows both of the constructors needed to fulfill these tasks:

// Create a variable to hold the user data.
public UserSettings UserData;
// Create a variable to hold the group data.
public GroupSettings GroupData;
public frmConfigure()
   // Perform the default configuration.
   // Check for the user data.
   if (UserData == null)
      // Initialize the user data.
      UserData = new UserSettings();
   // Check for the group data.
   if (GroupData == null)
      // Initialize the group data.
      GroupData = new GroupSettings();
   // Fill the administrator provided task and project lists.
public frmConfigure(UserSettings UserData, GroupSettings GroupData)
   // Perform the default configuration.
   // Check for the user data.
   if (UserData == null)
      // Initialize the user data.
      this.UserData = new UserSettings();
   // Otherwise, use the supplied settings.
      this.UserData = UserData;
   // Check for the group data.
   if (GroupData == null)
      // Initialize the group data.
      this.GroupData = new GroupSettings();
   // Otherwise, use the supplied settings.
      this.GroupData = GroupData;
   // Fill the administrator provided task and project lists.

In both cases, the constructor must create the UserData and GroupData local variables that you’ve seen used for so many purposes in the application. When the caller supplies the required data, frmConfigure uses it. Otherwise, frmConfigure creates new, blank variables that the application can fill with data. No matter how the data are supplied, the constructors call FillLists() to fill the user interface with data so that the user can see the settings (if any).

The form isn’t completely populated with data, nor is it stable at this point. The application raises the FormLoad() event at some point, which calls this event handler:

private void frmConfigure_Load(object sender, EventArgs e)
   // When there is user data to use, display it.
   if (UserData != null)
      // Configure the form fields.
      cbProjectName.SelectedText = UserData.DefaultProject;
      cbWorkType.SelectedText = UserData.DefaultTask;
      txtNetLocation.Text = UserData.NetworkPath;
      chkCustomProject.Checked = GroupData.CustomProject;
      chkCustomWork.Checked = GroupData.CustomTask;

At this point, the form is ready for the user to interact with. We’ll be looking at some additional code later to handle the requirements for working with administrators, versus standard users. For now, just consider that the form is ready to use. The user does whatever he/she needs to do, and then clicks either Cancel or OK to close the form. Now, some actions automatically save data because you simply don’t want to take a chance that the user will close the form in some other way and lose settings. However, it’s important to save the data one last time when the user clicks OK to ensure absolutely every change appears on disk. That’s the purpose of the two event handlers shown here.

private void btnCancel_Click(object sender, EventArgs e)
   // Close this dialog box.
private void btnOK_Click(object sender, EventArgs e)
   // Save the changes to the user data.
   if (cbProjectName.SelectedText != "")
      UserData.DefaultProject = cbProjectName.SelectedText;
   if (cbWorkType.SelectedText != "")
      UserData.DefaultTask = cbWorkType.SelectedText;
   UserData.NetworkPath = txtNetLocation.Text;
   // Save the changes to the group data.
   GroupData.CustomProject = chkCustomProject.Checked;
   GroupData.CustomTask = chkCustomWork.Checked;
   foreach (String Item in lstStandardProjects.Items)
      GroupData.ProjectList.Add(new Project(Item));
   foreach (String Item in lstStandardTasks.Items)
      GroupData.TaskList.Add(new Task(Item));
   // Close the dialog box.

As you can see, clicking Cancel simply closes the form. However, when you click OK, the application saves the data as it appears on screen. This is important because it’s possible that things could have gotten out of sync as the user interacted with the form. The result of the btnOK_Click() event handler is that the data on disk appears precisely the same as the user saw it on screen.

At this point, you have a basic frmConfigure completed. The next post will focus on the code used to make frmMain work. In the meantime, let me know if you have any questions about any of the frmConfigure code at John@JohnMuellerBooks.com.


Information Overload – The Conclusions

I’ve been
discussing the issue of potential information overload with my blog entries for the past several weeks now (see Information Overload) and it’s time to come to some conclusions. Several of you wrote in to tell me that you’d actually like me to write more. As nice as that would be, my current schedule won’t allow for it. In order to provide you with a high quality of writing, I need to focus my attention on a few good posts, rather that a flood of mediocre ones.

I received a total of 117 e-mails. Three of those e-mails wanted me to publish posts six days a week. Because that wasn’t one of the options, I chose not to chart them as part of the output you see here.


Strictly speaking, most of the blog readers would prefer that I publish posts four day a week. As you can see though, the numbers are pretty close. What I’ve decided to do is publish four posts a week from this point on, unless I happen to have an excessively easy week (when I’ll publish five) or an excessively hard week (when I’ll publish three). I’m hoping that the new schedule will meet with everyone’s approval.

As far as content is concerned, I only receive a few messages that talked about it at all. Most people seem quite happy with the content that you see on the blog now. There are some people who like the technical articles best and others who like the self-sufficiency articles best, but even amongst those who expressed a preference, they usually added that they liked at least some of the posts in the other category. For the moment, I’ll continue to post the mix of articles that I do now. Of course, I’m always happy to hear from you about blog issues. Feel free to contact me at John@JohnMuellerBooks.com if you have any questions or concerns about the blog at all.