Errors in Writing

I get upwards of 65 e-mails about my books on most days. Some of the conversations I have with readers are amazing and many readers have continued to write me for years. It’s gratifying to know that my books are helping people—it’s the reason I continue writing. Although I make a living from writing, I could easily make more money doing just about anything else. The thought that I might help someone do something special is why I stay in this business. When I actually hear about some bit of information that has really helped someone, it makes my day. I just can’t get the smile off my face afterward.

Of course, I’m constantly striving to improve my writing and I do everything I can to help the editors that work with me do a better job too. Good editors are the author’s friend and keep him from looking like an idiot to the reading public. In fact, it’s the search for better ways to accomplish tasks that has led me to create the beta reader program. Essentially, a beta reader is someone who reads my books as I write them and provides feedback. The extra pair of eyes can make a big difference. Beta readers who provide constructive feedback on at least three chapters receive my thanks in the book’s Acknowledgments and a free copy of the published book. (If you’d like to be a beta reader, please contact me at John@JohnMuellerBooks.com for additional details.)

You’d think that with all the pairs of eyes looking at my books, they’d come out error free. After all, it isn’t just me looking at the book, but several editors and the beta readers as well. Unfortunate as it might seem, my books still come out with an error or two in them. The more technical the topic, the greater the opportunity for errors to creep in. Naturally, the errors are amazingly easy for just about everyone else to pick up! (I must admit to asking myself how I could have missed something so utterly obvious.) When there is an error found in the book, I’ll provide the information to the publisher so it’s fixed in the next printing. The error will also appear on the book’s errata page on the publisher’s site. If the error is significant enough, I’ll blog about it as well. In short, I want you to have a good reading experience so I’ll do everything I can to hunt the errors down and correct them.

However, not every seeming error is actually an error. There are times where an apparent error is simply a difference of opinion or possibly a configuration difference between my system and the reader’s system. I’ll still try to figure these errors out, but I can’t always guarantee that I’ll fix things in your favor. After all, another reader has probably found still other results or has yet another opinion on how I should present material in the book.

The long and short of things is that despite my best efforts, you’ll probably encounter an error or two in my books and I apologize for them in advance. We’ll also continue have differences of opinion and that’s usually the source for new ideas and new ways of viewing things. I’m honest enough to admit that I do need your help in creating better books, so I’ll always listen to you and think about what you have to say. I hope that you’ll continue to read my books and do amazing things with the information you find therein. The results of your researches are truly the reason I remain in this business and I realize that we’re in this together. Thanks for your continued support!

 

Considering the Move to IPv6

I was getting my technical reading done this morning and ran across yet another article about IPv6 by Woody Leonhard entitled, “Caution: Bumps in the road to IPv6“. One of the main focuses of the article is that you should check your IPv6 compatibility using the features provided by Test Your IPv6 Connectivity. The article also assumes that you have IPv6 installed on your local system if you’re using a newer version of Windows. Of course, most people do have IPv6 functionality on their Windows 7 systems, but what if you don’t? How can you even check for IPv6 functionality?

Performing a local check is relatively easy. Open a command line, type IPConfig, and press Enter. You’ll see a listing of your IP configuration similar to the one shown here:

IPv601

In this case, you can see that the connections do indeed have IPv6 connectivity. If you need additional information, you can type IPConfig /All and press Enter instead. Of course, the presence of the information doesn’t always mean that the connections are working properly. In many cases, you can fix IPv6 problems by using the IPConfig /Renew6 command. There are separate versions of the command for IPv6 and IPv4—the IPv4 version of the command is simply IPConfig /Renew, so make sure you use the correct version.

The IPConfig utility is good for quick information and fixes. If you want to perform something a little more detailed, you need the NetSH utility instead. For example, if you want to install IPv6 on a machine, you type NetSH Interface IPv6 Install and press Enter. Interestingly enough, you need to simply know about this particular command because it doesn’t appear when you type NetSH Interface IPv6 and press Enter (which shows the other available IPv6 commands) as shown here:

IPv602

However, you do get a wealth of information from NetSH. Type NetSH Interface IPv6 Show and press Enter to see the entire list of Show commands listed here:

IPv603

One of the least appreciated and underused NetSH commands is NetSH Interface IPv6 Dump. This command creates a batch script for you that recreates the configuration on the current machine as shown here:

IPv604

So, if you type NetSH Interface IPv6 Dump > IPvConfig.BAT and press Enter, you end up with a batch file you can use to create a successful configuration on other systems. The Dump subcommand is available in a number of NetSH contexts and you should employ it freely. You can find myriad other uses for NetSH in Chapters 2 and 24 of Windows Command-Line Administration Instant Reference. The IPConfig utility appears in Chapter 9. Let me know about your unique uses for both of these utilities at John@JohnMuellerBooks.com.

Early Spring – The Flowers

If you look around my house right now, you’d think it’s still winter. After all, we have plenty of snow (even though the higher than normal temperatures have melted a lot of it). Here’s what it looks like around my house right now:

SpringSnow

Sure, we have plenty of bare spots, but the snow banks are still quite high. With the temperatures we’ve had this week though, I think the snow isn’t going to be around much longer. Of course, the ground under that snow is still frozen and we’re only now starting to experience the faint beginnings of mud season—that time of year when one can lose a hefty boot in the muck with ease.

Fortunately, there are plenty of signs that spring is arriving. On Saturday I looked at the flower bed around our well. I could see the humble beginnings of shoots coming out of the ground as shown here:

SpringFlowers1

You can see three little red shoots in the middle of the picture. Those shoots will eventually become flowers. Today I looked at those same shoots and they’re much bigger. In fact, the amount of growth is incredibly considering the ground is still mostly frozen. Here’s the growth since Saturday:

SpringFlowers2

In fact, the entire hill is bursting with shoots. Everywhere I looked I found more shoots. Here’s another area and it has green shoots!

SpringFlowers3

It won’t be long and winter will be a memory around here. The flowers are always the second sign of winter’s demise (the first being buds in the woods). So what is spring like where you live? Let me know at John@JohnMuellerBooks.com.

 

IronPython 2.7 and PTVS

The number of new features for Professional IronPython keep increasing as I discover more about IronPython updates from the community. You may have read my PTVS post the other day and wondered just how it was that the PTVS installer didn’t detect my IronPython 2.6.2 setup. It turns out that the PTVS installation currently has some problems. The best course of action is to uninstall PTVS and your IronPython 2.6.2 installation as well. (Make sure you reboot your system after you uninstall the old products.) What you really need is to download and install IronPython 2.7 Release Candidate 2.

Start the installation after you complete the download. You’ll see the normal licensing agreement and so on. However, the important feature to observe are the options on the Custom Setup page shown here:

IP2702

Notice the Tools for Visual Studio entry. Installing this feature ensures that you get all four of the templates in Visual Studio 2010. Once you complete the installation, you can check it out in Visual Studio. Here’s the updated New Project dialog box from my copy of Visual Studio 2010 Ultimate:

IP2701

So, now I have a number of new toys to play with. Future blog entries will describe what I find when I try the other templates out. In the meantime, I’d love to hear about your experiences with PTVS at John@JohnMuellerBooks.com.

 

Knitting for the Gentleman Farmer

The winters can get long here in the country; encouraging even the most determined person to eat to excess. From previous posts, you know that one of the things that I’ve accomplished is to lose a considerable amount of weight without dieting even one day. Part of my weight loss strategy is to find something to do that doesn’t involve excessive eating.

One of the crafts I’ve tried is knitting.  Unfortunately, I’ve found that knitting needles don’t work very well with larger hands (nor do crochet hooks it seems).  Fortunately, I’ve found a good substitute, the Knifty Knitter.  It’s a hoop or elongated loop with pegs sticking out of it.  I’ve found it very fast and easy to use.  There is an interesting history behind this device, but I’ll leave that for some other time.  I originally objected a four hoop set that can be used for a number of purposes such as hats.  However, with a little ingenuity, I’ve also been able to make slipper socks with it like these:

Socks

After a while, I also purchased several elongated looms.  I purchased the set, which works fine for garments such as scarves and blankets. In fact, just this weekend I finished this blanket for my wife:

Blanket

The blanket is made from four panels that I created with the longest (22″) loom.  It uses the double knit pattern, so it looks like it was knit on both sides and is quite thick.  My wife says it’s quite warm.  Because the blanket uses a double thread throughout, it’ll also wear quite well.

I’ve also made a number of sets for people. The biggest set I’ve made so far is a hat, scarf, and blanket set for my niece and her baby.  The set turned out quite nice and I was pleased that she seems to like it so much.  Here’s the set:

KnittedSet

Of course, this isn’t the only craft I’m involved with, but it’s the one that I can perform when I have just little bits of time here and there. Future posts will tell you about other sorts of crafts that I enjoy in an effort to keep the hands productively busy and the mouth free of food. Let me know about your crafts at John@JohnMuellerBooks.com.

Using the PTVS for a Simple Project

Well, I installed the PTVS I mentioned in yesterday’s post on my system and gave it a whirl. I must admit to being a little underwhelmed after the hype on the CodePlex site. However, the download does help and if you want to use Visual Studio for your development platform you should get it.  The process for creating a project is certainly easier than then one described in Chapter 2 of my book (although, that process still works fine for existing projects). The first thing you’ll notice after installation is that you get a new installed template as shown here.

PTVS01

As you can see, you do get all of the functionality that you’d normally get in a Visual Studio project, including the ability to add your application to source control, so this is a good start. After you configure your solution, the IDE creates it for you and you see a single file with some test code in it like this.

PTVS02

Don’t get the idea that you can simply click Start Debugging at this point and see something interesting. Before you can do anything, you have to configure the interpreter. Choose Tools > Options to display the Options dialog box. In the Options dialog box, select the Python\Interpreter Options folder. Here’s what the options look like; I’ve already configured mine for use on a 64-bit Windows 7 system.

PTVS03

I found that IntelliSense worked great. For example, when I typed raw_input(, I automatically received the proper help as shown here.

PTVS04

I played around with the IDE quite a lot more and was impressed with what the IDE does now that it didn’t do in the past. Of course, I’m going to have to play a lot more before I feel comfortable with everything this add-in can do.

So, where was the disappointment factor? Well, the first issue is that I was supposed to receive a total of four template types with IronPython according to the ReadMe.html file that comes with the product. I’m hoping there is a simple fix for this issue because I’d really like to tell you about the other templates that PTVS supports. The second issue is that the IDE didn’t automatically recognize my interpreter as it should. I’m assuming this is the reason why I didn’t receive the additional template. I’ll report back about these issues and show you more about PTVS as time permits. In the meantime, let me know your thoughts about PTVS at John@JohnMuellerBooks.com.

 

IronPython Finally Has Visual Studio Support

Months ago when I wrote Professional IronPython, I had to show you all kinds of workarounds for seemingly simple problems because the Visual Studio IDE didn’t provide the support required to do things like create an IronPython project.  For example, in Chapter 8 I have to show you how to create a Windows Forms application without using the visual designer.  That’s right, you need to write all of the component code manually, rather than rely on the GUI.  Microsoft’s decision not to support IronPython and IronRuby any longer seemed to put a nail in a great product’s coffin and I thought that perhaps the days of IronPython were numbered.

Fortunately, I was wrong. Microsoft has finally decided to release a beta add-in for Visual Studio 2010 that provides IDE support for both CPython and IronPython called Python Tools for Visual Studio (PTVS). You’re not getting any sort of new functionality from the language perspective.  The add-on relies on the underlying language features to perform its work.  The benefit to using this add-in is that it allows you to use the IDE to perform tasks such as creating an application using a template, rather than coding everything by hand.

Of course, the add-in provides far more functionality than simply creating projects.  The fact that I now get IntelliSense support is amazing.  You don’t know how helpful an IDE feature is until you try to write code without it.  Over the years, I’ve become somewhat addicted to IntelliSense because it helps me “remember” what it is that I want to do next.  Otherwise, I have to sit there and think about how things are supposed to go together; not always an easy task when you regularly work with multiple languages.

The add-in must be striking a chord with everyone.  It was only released on the 7th and there have already been 1,380 downloads (as of yesterday when I downloaded my copy).  If you program with IronPython and you often use IronPython to overcome procedural language limitations, this is a must have add-in for Visual Studio.

I’ll be working with this add-in over the coming weeks and will report back on what I find.  In the meantime, I’d love to hear your input on it at John@JohnMuellerBooks.com.

Working with Low Level Code

Working with low level code is becoming less necessary as Microsoft continues to improve the .NET Framework, but you sometimes still need to resort to direct Win32 API access using P/Invoke.  My book, “.NET Framework Solutions: In Search of the Lost Win32 API,” is a great place to learn about P/Invoke and the significant number of ways you can use it to access Windows features that Microsoft hasn’t made available in the .NET Framework yet.  For example, you’ll find a thorough discussion of the Windows messaging system in Chapter 4.  However, the discussion is a bit lengthy because there is so much you can do with the Windows messaging system.

One of the questions I get asked quite often is whether there is a quick start sort of guide I can recommend for working with the Windows messaging system.  With that in mind, I wrote a series of four DevSource articles some time ago.  Here’s the complete article list:


These four articles provide quite a bit of information about Windows messages that you might not know from a .NET perspective.  Using these techniques can save you considerable time, especially when you need to interact with other applications.  In fact, the final article reveals secrets you can use to interact with applications when you don’t have the source code; a significant problem for most developers.  So, how do you use P/Invoke?  Have you had to resort to P/Invoke to work with Windows 7 features that haven’t been added to the .NET Framework yet?  Let me know at John@JohnMuellerBooks.com.

 

Early Spring in the Woods

I’m sure many people are ready for spring. I know that I am. The ground is getting muddier by the second and the large drifts of snow have that decidedly tired and dirty look. Of course, winter will hang around for a while yet. We’re supposed to have another snow storm tonight. Just how much snow we get depends on the vagaries of nature. I don’t mind the snow; just don’t give me any ice.

Today was sunny and warm; well, warm for this time of year. I think the temperature got all the way up to 40 today, so there was more than a little melting underway. After checking my e-mail, getting all of my morning chores done, and making sure my wife didn’t need to go to town, I decided it would be a fine day to get up into the woods. I didn’t actually get there until afternoon, but I was still able to get quite a bit done. I keep cutting until the saw runs out of gas, then I start lugging the wood down the hill, 80 pounds at a time. Did I mention that my day in the woods normally involves walking six or seven miles (half of which involves lugging this 80 pound load)? It isn’t a bad workout for a 50+ year old man. This is the view from the hill where I’m cutting wood now.

WoodsToday

A day in the woods wouldn’t be complete though without some time spent looking at nature. I didn’t run into friend badger today. In fact, badger isn’t my friend and I try to give him a wide berth. I did see Woody though. Woody is the pileated woodpecker that hangs out in our woods. I tried to get a picture of him, but he’s shy. However, here’s a picture of his current favorite tree:

WoodysTree

Actually, Woody has a number of trees he attacks, most of which are snags like this one:

Snag

I have a personal rule that I don’t cut any trees that someone is using, so I’ll leave this snag in place. Eventually, someone will move into the holes that Woody has made. I’ve found all kinds of interesting things in trees over the years. We have several bee trees in the woods right now and I depend on the bees in them to help pollinate my garden and trees, so I definitely won’t cut the bee trees down.

One of the more interesting things I noticed in the woods today is that the buds on some of the trees are starting to swell. Of course, this is a sign that spring is near. The berry brambles are also turning quite red; another good sign. Here are some of the buds that I saw today:

SwellingBuds

I hope you enjoyed your tour of the woods today. I promise other trips as time allows. The woods is one of my favorite places to go. We not only get wood from there, but also a number of food items. I’ll show you some of them as I gather it this summer. Let me know about your favorite places in nature at John@JohnMuellerBooks.com.

 

Dealing with Overabundance

Gardening is never a precise science. In fact, there isn’t any way to make it a precise science, despite the best efforts of growers worldwide to do so. There are too many variables to consider and each season is unique. A heavy snow winter can delay spring, which reduces the time in which you can plant some early season vegetables. A humid, cool summer favors some vegetables; a dry, hot summer others. The presence or lack of insects makes a difference too. Too many cloudy days changes the environmental landscape, as do myriad other environmental factors. Every season is unique and brings unique challenges.

It’s hardly surprising then that some seasons tend to produce an overabundance of certain vegetables. For example, last year was an especially good year for okra. I don’t think I’ve ever seen our okra plants get that tall or produce such an abundance. That has partially meant having a lot of gumbo this past winter. Rebecca also made pickled okra for me, a delicacy I seldom get.

In many cases, overabundance means having leftovers at the end of the year. In fact, we usually try to plant with a three-year plan in mind. The tomatoes that grew so well this year, very likely won’t grow all that well next year. (Tomatoes are one of the few vegetables that you can count on producing something every year, even if they don’t produce enough to meet your annual needs.) So, during a good year, we can the excess because canned foods have a longer shelf life than frozen and once canned, they require no electricity to keep them fresh. According to eHow you can store high-acid foods for a year and low-acid foods for two to five years without any problem.  Practical experience shows that canned goods will keep longer than that when stored properly, but we throw anything over five years old into the compost heap to become new vegetables.

Try canning your food in various ways. For example, tomatoes are easily canned as whole peeled tomatoes, tomato sauce, salsa, tomato juice, tomato jam, ketchup, and in many other forms. Rather than buy these items from the store, make them up in advance during canning season so they’re ready whenever you need them. Now, whenever you need a quick meal, you already have it stored in your larder; making that trip to the fast food restaurant unnecessary.

Some food items won’t can properly or the loss of vitamins is so exorbitant that canning makes the result less desirable nutritionally. Anything that’s high in vitamins A or C, thiamin, or riboflavin is less desirable canned than frozen. Consequently, we try to freeze these foods more often than not to preserve their nutritional value. However, this choice has consequences too. Freezing incurs a constant storage cost and there is limited space for freezing in the typical home. Frozen food also has a significantly shorter shelf life than canned food. We try to empty the freezer by the end of each season and will can some remaining foods just to keep from losing them.

This is where many people end their efforts to store excess food. There are many other techniques you can use, however. One of the techniques we use is dehydrating the food. zucchini cans terribly and the frozen result isn’t much better. However, zucchini plants typically produce very well and they’re quite nutritional when you choose larger plants (rather than the baby zucchini favored by stores, which aren’t much better than drinking water). I’ve found over the years that much of the food value in squash is in the seeds. Dehydrated zucchini served in place of potato chips is an exceptionally nutritious (and tasty) snack food that I love and it provides an outstanding way to preserve excess zucchini. Eggplant also preserves well this way, as do many other plants. We dehydrate them and eat them as a low calorie snack food during the winter months.

Another interesting way to use excess vegetables is to make wine. I tried my hand at tomato wine this year for the first time and the results were amazing. Each gallon of tomato wine requires an entire quart of tomato juice, so it’s possible to preserve quite a few tomatoes using this technique. I’ve also made wine from excess pumpkin, along with all of the usual (and a few unusual) fruits. I understand many people use other vegetables to make wine. A friend of mine makes turnip wine.

You can always give your excess to other people. It’s interesting to note that not everyone in a particular area will have your success in a given year with a given vegetable. Last year was a horrible year for tomatoes and zucchini for us. Yes, we received some of each, but not nearly enough to meet the year’s requirement, much less enough to put away for the future. We were able to trade extra food such as potatoes with other people for extra food they had gotten from their gardens. The result is that everyone ended up with a more balanced larder.

These are just a few of my ideas for dealing with overabundance. What are the techniques you use? Let me know at John@JohnMuellerBooks.com.