Python Tools for Visual Studio (PTVS) Released

As mentioned in my IronPython Finally Has Visual Studio Support post several months ago, there wasn’t much support for IronPython in Visual Studio when I wrote Professional IronPython. In the months since then, I’ve looked at the test version of this product in a number of posts that you can read in the Professional IronPython category. Microsoft has finally released PTVS to the public. You can now use this stable release for development projects without worry.

I downloaded and installed this latest version. The first thing I did was to try and load a few of the projects found in previous posts. For example, I loaded the example from the Using Generics with Classes post and it appears to work fine. I also tried out the debugging techniques found in the Debugging Using PTVS and Debugging Using PTVS (Part 2) posts and they appear to work as before.

As far as projects are concerned, you get the same projects as with the test version of the product. However, you’ll notice that there is now a separate entry in the list for Python-specific applications as shown here.

PTVSReleased01

I tried creating a Windows Forms application and was disappointed to find that there is still no designer support. Of course, this means you still need to create your user interface using code and then test to see if it appear as you want it to. It would be nice if a future update (or perhaps a third party add-in) would make designer support available.

The one thing I noticed during my testing is that this version seems to work a bit faster. I didn’t perform any timed testing, but it seemed quicker and more responsive.

Future posts will look at the released version in more detail. If you’re already using the test version of PTVS, then you also know how to use the released version. It would be a good idea to update your copy, as needed, to ensure you have the latest bits. Be sure to write me about any questions or concerns about this release at John@JohnMuellerBooks.com.

 

New Book Announcement: Start Here! Learn Microsoft Visual C# 2010 Programming

Have you ever attended a college course and found that you just didn’t understand what the teacher was trying to say? Worse yet, you found yourself dosing during a lecture? Many people require a hands-on approach to learning—they just don’t learn well using the college approach. Start Here! Learn Microsoft Visual C# 2010 Programming is designed to answer needs of anyone who has quickly become disenchanted with the way that colleges teach programming. You’ll start coding in Chapter 1 and won’t stop coding until you’ve completed the book!

Start Here! Learn Microsoft Visual C# 2010 Programming takes an entirely new approach to learning how to write code. You begin by writing some codeimagine that! Then, you use a special tracing technique to see how the code workswhat it does and how it does it. Instead of mind numbing sessions involving the discussion of keywords from a purely theoretical view, you jump right into using those keywords to do something useful.

You also don’t waste your time with silly Hello World applications. You get right into techniques that will prove useful later when you’re creating applications on your own. Chapter 1 starts things off right by showing you how to display an image from a Web site on the local desktop. Instead of spending hours trying to figure out looping mechanisms, you use the modern techniques provided by Language INtegrated Query (LINQ) to achieve your goals. You’ll do things like access a Web service and request weather information from it. There are even Silverlight and Windows Presentation Foundation (WPF) examples. Here is a quick overview of the book’s content:

  • Chapter 1: Getting to Know C#
  • Chapter 2: Developing a Web Project
  • Chapter 3: Using Simple Data Manipulation Techniques
  • Chapter 4: Using Collections to Store Data
  • Chapter 5: Working with XML
  • Chapter 6: Accessing a Web Service
  • Chapter 7: Using the Windows Presentation Foundation
  • Chapter 8: Working with Libraries
  • Chapter 9: Creating Utility Applications
  • Chapter 10: Using LINQ in Web Applications
  • Chapter 11: Working with Silverlight Applications
  • Chapter 12: Debugging Applications


You’ll also gain knowledge that many people spend years learning. For example, the tracing technique you use throughout the book naturally leads into the debugging information in Chapter 12. Debugging won’t be a mystery to youit’ll actually be a natural part of your work process so you’ll find it much easier to locate the bugs in your applications.

There is even a chapter on writing command line utilities. More and more administrators are returning to the command line because the GUI is simply too slow in today’s competitive world. Unfortunately, many developers don’t know how to write a really good command line utility, but you’ll gain this skill at the outset.

This book (my 88th) is truly designed for the complete novice. You do need to know how to work with Windows and perform basic tasks such as installing applications. However, you don’t need to know anything about coding to start using this book. In fact, people who already have a good starting knowledge of programming may find that some of the material is a little too simple. If you have any questions at all about my new book, please let me know at John@JohnMuellerBooks.com.

Obtaining Command Line Help

Both Administering Windows Server 2008 Server Core and it’s more diminutive counterpart, Windows Command-Line Administration Instant Reference, are reference manuals that tell how to use the command line to perform specific tasks. The first book is more complete, in that it contains many uncommon commands and utilities. The second book is designed to provide more hands-on help by supplying a significant number of actual usage examples. In both cases, you get a significant amount of help about the commands. As long as you have one of these two books by your side, you’re in great shape for knowing how to use the commands at the command line. Unfortunately, the reality is that most of us don’t stuff a library full of books in our back pocket. Even with an e-Reader, such as the Kindle, you can be sure of having the device available every time you need it. So, how do you get at least some quick help when there aren’t any resources available?

The first thing to remember is that you can get at least some useful information for any command or utility by using the /? or -? command line switches (some commands and utilities are peculiar in that they require either the /? or the -? command line switch, while many will allow you to use either). For example, when you want to discover how to use the Dir command, you type Dir /? and press Enter. Here’s typical output when using the /? command line switch.

GettingHelp01

This help screen is also typical in showing what you get. Help normally includes a short description of the command, the command line syntax, and a short description of each of the command line switches. You may also see usage examples for more complex commands. In rare cases, the help screen will provide an URL for additional help.

Some commands and utilities are complex enough that they require several help screens. For example, if you type WMIC /? and press Enter, you’ll see a list of help topics, not help of the sort provided for the Dir command. Let’s say you want to know more about the CPU topic. So, now you type WMIC CPU /? and press Enter. The help looks a little more normal now, but still isn’t very complete because you need to choose a subcommand. Perhaps you want just a list of CPUs on a system, so you request information about the List subcommand by typing WMIC CPU List /? and pressing Enter. Wow, now you see a number of listing formats. This time you add a listing format by typing WMIC CPU List Brief /? and pressing Enter. It turns out that you can also discover information about command line switches used with the Brief format. The final level in this case is to type WMIC CPU List Brief /Translate /? and press Enter. The WMIC utility is unique in providing so many levels of help, but other complex commands and utilities, such as Net, do provide multilevel help.

No matter how many help screens you see, sometimes it isn’t enough to give you the help you need. That’s when you need to find your copy of my book to get additional information. Of course, a single book can do only so much—some complex commands and utilities may require still more information. Technet is a good place to start. For example, you can find an excellent article on WMIC at http://technet.microsoft.com/library/bb742610.aspx. Knowledge base articles also provide useful information, especially when it comes to issues that Microsoft has solved for a given command or utility. For example, the Knowledge Base contains an article entitled, “How to find computer serial number” that relies on WMIC. Finally, make sure you look at third party articles, such as the one entitled, “WMIC: the best command line tool you’ve never used.”

Many people complain about not being able to remember all of the commands and utilities, and this is a problem. After you use a command or utility often enough, you tend to remember it, but the memorization process can take time. Unfortunately, there isn’t any single quick method of finding every command or utility on a system. However, you should start by typing Help | More and pressing Enter. (Using the More command lets you see the information that a utility has to provide one screen at a time, rather than seeing the information scroll right past.) You’ll get a list of common commands like this one.

GettingHelp02

Not all of the commands appear on this list and none of the utilities do. Another way to obtain the information you need is to type Dir *.COM and press Enter in the \Windows\system32 directory. (You can type CD \Windows\System32 and press Enter to get to the appropriate directory.) Every directory entry you see is very likely a utility. However, many utilities are in .EXE form, so you also need to type Dir *.EXE | More and press Enter. You can eliminate files that contain more than eight letters in the filename from the list in most cases because command line utilities usually rely on the old 8.3 naming convention. Check filenames that look like they could be what you want by typing Filename /? and pressing Enter (where Filename is the name of the file you want to test). Useful command line utilities will generally display a help screen.

Now that you have a better idea of how to get command line help when you need it and where to obtain a list of useful commands and utilities, you should take some time to try it out for yourself. What techniques do you use to obtain the additional information you need at the command line? Let me know at John@JohnMuellerBooks.com.

 

CFLs for Free

If you haven’t heard about the Compact Fluorescent Light (CFL) by now, then you haven’t been paying much attention. They’re talked about on billboards, the television, radio, magazines, and in stores. In fact, it seems as if you can’t escape the CFL. Yet, many people are still buying the old incandescent bulbs created many years ago by Edison. Yes, incandescent bulbs were a marvel at the time, but today they’re costing you money.

A CFL is basically a fluorescent tube light put into a compact form. They consume considerably less energy than incandescent bulbs and last longer too. When I talk to people about CFLs, the biggest complaint I hear is that they cost so much money to buy. (The second biggest is that CFLs output harsh light or that the bulbs have a short life expectancy, neither of which is true any longer.) Of course, the expense is a legitimate complaint—one that I plan to address in this post.

Rebecca and I have switched our entire house to CFLs. When we first moved into our home, our average monthly bill was over $120.00 a month. Today, due to a number of energy saving techniques, we often get by for $50.00 a month despite a lot of price increases over the years. CFLs are a big part of that savings.

There are some tricks you can use to make the changeover a lot more palatable. Start by investing in high quality CFLs. Avoid the cheap Chinese knockoffsget a good bulb from GE or Sylvania, even though the initial cost is higher. Track the amount the bulb saves you each month. You can do that quite simply by checking your bill for a reduction or you can do things more scientifically. Keep a log of how long you use the bulb each day for a monththis represents the hours you use the bulb, then use this equation:

 

Savings = ((Bulb Watts / 1000) * Hours) * KWH Rate


Let’s say that you replace a 100 watt bulb with a CFL equivalent and you use the bulb for 4 hours each evening for a 30 day month. Your KWH rate (available from your electric bill) is $0.12. The new bulb takes only 26 watts. The original cost of using that bulb is:

 

((100 / 1000) * 120) * 0.12 or $1.44 per month


The cost of the new bulb is:

 

((26 / 1000) * 120) * 0.12 or $0.37 per month


Your savings are $1.07 per month from just that one bulb. OK, you can pocket that $1.07 and buy half a cup of coffee with it, or you can put it aside. In one year you’ll save enough money to buy a 12 pack of 100 watt CFL replacements for free (at least, you will if you shop smart).  Now you can replace 12 incandescent bulbs and it won’t cost anything.

Here’s the payoff. Each of those replacements will also save on your electric bill. If you use each of those bulbs for the same amount of time each day, your savings increase to $13.91 each month, which means that you can buy the next package of CFLs in a month and end up with around $1.47 in change.

As you get new bulbs that haven’t cost you a penny because you would have spent that money on incandescent bulbs anyway, you can quickly replace all of those incandescent bulbs with CFLs that last longer, produce the same quality of light, and reduce your electric bill.

Now you can move onto other things. Start with a programmable thermostat. You’ll find that it saves you money each month as well. If you use your CFL savings to buy the thermostat, it won’t cost you anything. You can extend this to weather stripping and all kinds of other energy saving additionseach of which provides a payoff—an incentive for using it.

It took us about 5 years to replace everything we could in our house that would readily provide a payoff and achieve that energy savings that I talked about earlier. Now, we’re pocketing that extra money. The cost savings will help keep our costs low (and in this economy, who can afford to turn away extra cash).

Eventually, we’ll look at other technologies to reduce our carbon footprint. There are many technologies now that we’ve looked at carefully that don’t actually put any money in your pocket. For example, we looked at windmill technology. By the time you pay for your own personal windmill, not to mention batteries, inverter, and other requirements, you’ll have to wait way too long for payback. Hopefully, this technology will improve with time. The same problem occurs with solar power and some other promising technologiesthey have no payoff right now (they don’t put money in your pocket).

The next technology that does look promising is solar heated hot water. Right now you still have to replace the system before you get a payoff (the longest lasting setup I could find is about five yearsnot long enough for payoff), but I think this is going to change in the near future. As the reliability of these systems improve and more people use them, but the cost will come down and there will be a payoff for those of us who have to be concerned about payoff.

There are also some changes we’ll make simply because we have to, even if there isn’t a payoff. For example, we’re going to have to replace our windows at some point. The old wooden windows are literally rotting in place. When we do make a replacement, we’ll look into buying a higher quality window that will at least partially pay back its installation cost in reduced energy costs. What I’ll try to do is balance the expected energy savings against the additional cost to find that magic point where I get a payback of a sort (the windows won’t ever pay for themselves, but the energy savings will ultimately make the windows less expensive than if I had bought cheaper windows).

Do you often find that the people selling energy saving devices miss the point? I find that the brochures stop short of telling people what the payoff is and how to obtain the devices without spending anything. There is usually some message about doing the planet some good and saving it for our children. These are certainly laudable goals, but the question that concerns me most is, “What’s in it for me?” In our case, it has turned out to be about $70.00 per monthwell worth the effort involved.  Let me know your thoughts on using energy saving devices at John@JohnMuellerBooks.com.

 

Making Use of Those Oversized Zucchinis

You find it stashed beneath some leaves and it’s gargantuan—a zucchini that somehow missed your attention earlier. What do you do with this massive thing? Well, for one thing, you could eat it as normal. When you look at the nutritional benefits of the baby zucchini that most people eat, you might as well drink a glass of water for all the good it does you. The plant puts all its effort into the seeds, which aren’t developed at the time most people pick their zucchini. In fact, the seeds are simply packed with all kinds of good nutrition, including the highly sought Omega-3 and Omega-6 fatty acids. So, eating a larger zucchini has significant health benefits.

The secret is to learn when to pick your zucchini. We wait until they’re about 2 or 3 inches in diameter and the seeds are well developed, but you can still push a thumbnail through the skin. If you wait too long, the skin gets pretty tough. Yes, you can peel the skin off, but then you lose all of the wonderful fiber that zucchini can provide.

However, the subject of this post is to tell you about something interesting you can use those oversized zucchinis for. We use them to make a substitute for potato chips that provides some significant health benefits, yet taste absolutely amazing. Our technique isn’t completely healthy, but I’ll take them anytime over the store purchased chips. You begin by thinly slicing your Zucchini as shown here and placing them in a dehydrator.

Zucchini01

We sprinkle the tops of the zucchini with popcorn seasoning that we buy in bulk from a local store. The popcorn seasoning comes in four flavors: cheese, sour cream/onion, ranch, and bacon/onion. The cost for the product is extremely low when you buy in bulk quantities like this:

Zucchini02

A one pound container of the topping cost us $4.65 at the local bulk goods store. You don’t need to use a lot of the topping. Just a dusting will add a bit of wonderful flavor to the resulting chips as shown here:

Zucchini03

You can use any sort of zucchini to produce the chips. As you see, we have a variety in the dehydrator right now. However, our friends introduced us to the Clarinette Lebanese Squash, which has a light green exterior, and produces a superior chip. The chip retains its crispiness far longer and the zucchini itself is a better shape for chips in that it tends to grow bigger around in a shorter period without getting a hard skin.

To perform the drying, you set the dehydrator to 155º. Check the dehydrator every few hours. When the chips are crispy (in about six hours), the drying process is done. Rebecca packages the initial chips in resealable bags until she has enough, then she uses the Food Saver to store the chips in sealed bags that contain a little air to prevent chip breakage. Normally, she makes me two five-gallon containers of chips for the winter (along with two more five-gallon containers of apple chips that I’ll describe later). Here’s the preliminary result:

Zucchini04

We’ve never had any of our chips go bad. They should last at least a year if you seal them properly. So, what is your favorite alternative way to use zucchini? Let me know at John@JohnMuellerBooks.com.

 

An Update On Special Needs Device Hacking

I previously posted an entry entitled Security and the Special Needs Person where I described current hacking attempts against special needs devices by security researchers. In that post, I opined that there was probably some better use of the researcher’s time. Rather than give hackers new and wonderful ways to attack the human race, why not find ways to develop secure software that would discourage attempts in the first place? Unfortunately, it seems as if the security researchers are simply determined to keep chewing on this topic until someone gets hurt or killed. I never even considered this topic in my book, “Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements” because it wasn’t an issue at the time of publication, but it certainly is now.

Now there is a ComputerWorld article that talks about wearable devices used to jam the signals of hackers trying to attack those with special needs devices. What do we do next—encase people in a Faraday cage so no one can bother them? I did find the paper referenced in the article, “They Can Hear Your Heartbeats: Non-Invasive Security for Implantable Medical Devices” interesting, but must ask why such measures even necessary. If security researchers would wait until someone actually thinks of an attack before they came up with a remedy, perhaps no one would come up with the attack.

The basis of the shielding technology mentioned in the ComputerWorld article is naive. Supposedly, the shield lets the doctor gain access to the medical device without allowing the hacker access. Unfortunately, if the doctor has access, so does the hacker. Someone will find a way to overcome this security measure, probably a security researcher, and another shield will have to be created that deflects the new attack. The point is that if they want the devices to be truly safe, then they shouldn’t send out a radio signal at all.

The government is involved now too. Reps. Anna G. Eshoo (D-CA) and Edward J. Markey (D-MA), senior members on the House Energy and Commerce Committee, have decided to task the the Government Accountability Office (GAO) with contacting the Federal Communications Commission (FCC) about rules regarding the safety and security of implantable medical devices. I can only hope that the outcome will be laws that make it illegal to even perform research on these devices, but more likely, the efforts will result in yet more bureaucracy and red tape.

There are a number of issues that concern me about the whole idea of people wearing radio transmitters and receivers full time. For one thing, there doesn’t seem to be any research on the long term effects of wearing such devices. (I did find research papers such as, “In-Body RF Communications and the Future of Healthcare” that describe the hardware requirements for transmission, but research on what RF will do to the human body when used in this way seems sadly lacking.) These devices could cause cancer or other diseases. Fortunately, the World Health Organization (WHO) does seem to be involved in a little research on the topic and you can read about it in their article entitled, “What are electromagnetic fields?“.

In addition, now that the person has to wear a jammer to protect the implantable medical device, there is a significant chance of creating interference. Is there a chance that the wearer could create unfortunate situations where the device intended to protect them actually causes harm? The papers I’ve read don’t appear to address this issue. However, given my personal experiences with electromagnetic interference (EMI), it seems quite likely that the combination of implantable medical device and jammer will almost certainly cause problems.

In summary, we have implanted medical devices that use radio signals to make it more convenient for the doctor to monitor the patient and possibly improve the patient’s health as a result. So far, so good. However, the decision to provide this feature seems shortsighted when you consider that security researchers just couldn’t leave well enough alone and had to find a way for hackers to exploit the devices. Then, there doesn’t seem to be any research on the long term negative effects of these devices on the patient or on the jammer that now seems necessary to protect the patient’s health. Is the potential for a positive outcome really worth all of the negatives? Let me know at John@JohnMuellerBooks.com.

Every Year is a Good and a Bad Year

It’s easy to become discouraged in the garden sometimes. During the early spring you plant everything that you’ll hope will grow and produce plentifully. By August, you know which plants will fair the best and which didn’t survive at all. This year has been especially tough because I ended up getting gallbladder surgery first, and then, because we do everything together, Rebecca ended up getting gallbladder surgery as well. So, with both of us on our backs, our garden had a true test of being weed-bound. Unfortunately, that means that some plants didn’t live at all and some won’t produce well. Our corn was nice and tall, right before the wind blew it over. Many of our peas succumbed to the weeds.

Still, it’s a good year in many respects and that’s the aspect I choose to focus on. Good years fill larders with interesting vegetables and fruits. Apparently, this is a bean year. We planted the normal amount of green beans and Lima beans. However, the plants decided to grow twice as tall and twice as wide as normal. We’re now inundated with green beans and will soon have a bumper crop of Lima beans as well.

GardenEnough01

Not every year is a good year for every vegetable. In my Dealing with Overabundance post, I discussed how some years produce so much that you can hardly fathom what to do with it all. Last year and the year before were horrible blight-filled years for tomatoes. This year isn’t just good, it’s amazing. Our tomatoes have never looked quite this good.

GardenEnough02

Those are the same diminutive plants I wrote about in Mulching Your Garden. They’re over five feet tall now and loaded with so many tomatoes that we’re going to try pickling some green tomatoes this year. (Remember to try different preservation techniques whenever you can to discover new ways of dealing with overabundance.) The plants have obviously overgrown the tomato cages and are threatening the other plants in that plot. Unlike previous years, there is absolutely no sign of blight, even at the bottom of the plants (which are usually brown by now).

Many of our plants are late, but will most definitely produce. The egg plants and okra are of sufficient size that we’ll get the normal amount from them, or perhaps just a bit more than usual. As in most years, the egg plants are constantly under attack from flea beetles, but the lacing of their leaves hasn’t reduce their vigor much and we expect the normal crop from them.

GardenEnough03

The beets and kohlrabi look good this year as well. We fully expect to harvest enough to replenish our larder and even provide a little extra for next year. So, many plants are producing enough that we’ll most definitely not starve. It’s best to avoid focusing on the lack of corn this winter in the larder or the fact that there won’t be much in the way of broccoli (we will have an abundance of Brussels sprouts though).

It’s important to remember diversity in gardening. Don’t plant just one or two items—plant a variety of items so that at least a few of them produce well. This is our year for tomatoes and beans. Next year might be a corn year or the year of the mutant squash (we’ve had one of those lately and are still eating squash from that year). Each year is a good year for something, and an equally bad year for something else.

There is actually a health benefit to all of this. If every year produced copious quantities of whatever you planted, there would be no incentive to try something new. Gardens force people to moderate what they eat and to try new things. As someone once said, “Variety is the spice of life!” So, what has grown well for you this year? Let me know at John@JohnMuellerBooks.com

The Wonders of Queen Anne’s Lace

Sometimes, the best herb or edible plant is the one you didn’t plant. Nature provides a number of edible plants that grow naturally where you live. I’ve shared about the berries that grow in our woods before. There are blackcaps, blackberries, gooseberries, wild grapes, wild plums, and choke cherries available to anyone who wants to pick them in the woods. You can also find any number of usable mushrooms and other useful plants out there. However, the wild grass area also has abundance to offer. One of the most useful plants is Queen Anne’s Lace, also known as wild carrot.

QueenAnnesLace01

It’s quite possible that you’ve passed this plant by in the past because it normally grows in with the rest of the weeds. The large taproot is edible. However, you don’t want to dig it up mid-summer. It’s better to dig up a second year plant early in the spring or a first year plant late in the fall. Wait until the plant is dormant or you’ll end up with something that’s akin to shoe leather without much value. Older plants develop a woody interior (xylem) that’s most definitely unpalatable.

Some people actually use a tea made from the root for a number of medicinal purposes. When the root is used for medicinal reasons, the common wisdom is to dig it up in July, which is the same time the plant flowers in profusion.

Wild carrot is an ancestor of the modern cultivated carrot, but they’re different plants. In other words, it would require a lot of work to change Queen Anne’s Lace into anything resembling a domesticated plant and you should focus on the usefulness of the wild plant instead.

One of the most delightful uses of Queen Anne’s Lace is to make jelly from the flowers. You must pick a lot of fresh flowersthe more the better. I normally provide Rebecca with at least two shopping bags full of flowers to make jelly and it takes quite a while to obtain that many flowers, but the effort is most definitely worth it. The Queen Anne’s Lace flower looks like this.

QueenAnnesLace02

In some cases, the center of the flower will contain a purple floret, but I’ve found that the purple floret is somewhat rare. Before you go out and pick a bunch of flowers that look just like this one though, be aware that many flowers have precisely the same coloration and similar appearance. For example, the hemlock flower and fool’s parsley are easy to confuse with this flower. Fortunately, it’s easy to avoid the mistake. Hemlock and fool’s parsley both tend to grow in wetter areas, while Queen Anne’s Lace prefers a drier spot to grow. In addition, Queen Anne’s Lace has a distinctive carrot leaf like the one shown here (the photograph is courtesy of my friend William Bridges):

OLYMPUS DIGITAL CAMERA

When picking Queen Anne’s Lace, look for the flower in July, check the flowers carefully, and verify that the leaves are correct. If necessarily dig a plant up to ensure you’re getting the right one. The root will have a distinctive carrot aroma. If you take these four precautions, you won’t ever have any trouble.

There is conflicting information about the use of the leaves. I’ve never personally eaten the leaves and based on the conflicting information, I’d recommend not eating them. Here’s the Queen Anne’s Lace jelly recipe (courtesy of Rebecca).

Queen Anne’s Lace Jelly

2 qts Flower Heads, Rinsed
  Boiling Water to Cover
2 Lemons, Juiced
2 packets Certo
6 cups Sugar
Dash Cinnamon or Nutmeg

Infuse flowers in boiling water for 4 to 5 hours. Strain the result to obtain 5 cups of liquid. Add lemon juice, sugar, and spices. Bring the mixture to a boil. Add Certo. Bring to a full boil for 1 minute. Prepare the jelly according to the instructions on the Certo package. Can using a boiling water bath for 10 minutes.

The jelly has a subtle taste. It really is hard to describe, but think of something with an almost honey-like taste, but a bit of spiciness too. Add some tea and an English muffin, and you have a wonderful breakfast. The jelly ends up with a wonderful amber appearance.

QueenAnnesLace04

So, what are your favorite wild plants? Do you use them regularly? Let me know at John@JohnMuellerBooks.com.

Using Visual C++ 2010

We’ve finally come to the end of the trail! In the previous post, Using CodeBlocks 10.05 – Part 8, I was able to cover up to the end of Book VI of C++ All-In-One Desk Reference For Dummies. This post begins with Book VII Chapter 1. After you’ve read this post, you’ll have the complete story on code updates for my book unless someone comes up with additions I need to make, which will appear in future posts. You can find a complete list of these posts in the C++ All-in-One for Dummies category archive.

Book VII doesn’t rely on CodeBlocks 10.05. Instead, the original text relies on Visual C++ 2008. In the interest of completeness, I decided to test the code in this book with Visual C++ 2010just to make sure it works. I used the version of Visual C++ 2010 that comes with the full product and didn’t test using an Express edition.

 

If you have problems with an Express edition product, please let me know and I’ll do my best to accommodate your needs. However, you should know in advance the the Express editions are, by design, incomplete and the examples may not work no matter how hard you work. The idea is that you’ll buy the full version of the product to get the functionality you need.


Always open the Solution (.SLN) file associated with the project to get the best upgrade. Whenever you open one of the book’s projects using Visual C++ 2010, you’ll see the Visual Studio Conversion Wizard dialog box shown here:

2010Update01

Simply click Finish and the wizard will convert the project to work with Visual C++ 2010. After the conversion is complete, you’ll see a completion dialog box. Clear the Show the Conversion Log When the Wizard is Closed option and then click Close. You’ll see the converted project.

The converted project won’t display any source code files. So, you’ll need to open Solution Explorer. In Solution Explorer, open the Source Files folder and double click the .CPP file associated with the project, such as Hello World.cpp for the project in Book VII Chapter 1. At this point, you can set breakpoints and then click Start Debugging to see the example run, just as you ordinarily would.

 

Before you can use the debugger with any of the examples, you must recompile them using Visual C++ 2010. Otherwise, the debugger will report errors and not run. Choose Build | Rebuild Solution to rebuild you application.


Some of the examples may display a warning message such as this one when you rebuild them as part of the upgrade:

 

LINK : warning LNK4075: ignoring ‘/INCREMENTAL’ due to ‘/PROFILE’ specification
SimpleDialog.obj : warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/OPT:REF’ specification


This message doesn’t appear to cause any problem with the example working as described in the book. Please let me know if you experience any problems in this regard.

The SimpleDialog example found in both Chapters 2 and 5 requires a change to the CSimpleDialogDlg::OnBnClickedCheck() method to make the buffer work as expected. Use the following code instead:

void CSimpleDialogDlg::OnBnClickedCheck()
{
    // Obtain the input string from m_Input.
    CString ThisString = _T("");
    int len = m_Input.LineLength(0);
    m_Input.GetLine(0, ThisString.GetBuffer(len), len);
 
    // Release the buffer created for ThisString.
    ThisString.ReleaseBuffer();
 
    // Place the information in m_Output.
    m_Output.SetWindowTextW(ThisString.GetBuffer());
    ThisString.ReleaseBuffer();
}

This should be the only problem you encounter while working with the code. Please let me know if you have any questions about any of the examples in the book at John@JohnMuellerBooks.com.

Using CodeBlocks 10.05 – Part 8

This should be the next to the last post in this long running series. In the previous post, Using CodeBlocks 10.05 – Part 7, I was able to cover up to the end of Book V of C++ All-In-One Desk Reference For Dummies. This post begins with Book VI Chapter 1. I’m hoping to wrap up the coding differences for CodeBlocks 10.05 in the next post. You can find a complete list of these posts in the C++ All-in-One for Dummies category archive.

On page 638, you’ll find an example of the Functors category of the standard library. Likewise, on page 649 you find an example for working with temporary buffers. Neither example will compile in CodeBlocks 10.05 until you add another #include:

#include <algorithm>

On page 640, you’ll find a hash example. It compiles just fine, but you’ll receive this rather ominous sounding warning:

 

#warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.


It’s safe to ignore the warning for this edition of the book. In fact, you may see a number of these warningsall of which are safe to ignore for the time being. The example will run as before. The purpose of the warning it to tell you that a code update is necessary to keep pace with changes to the C++ libraries. I’ll be updating the code to use newer headers in the next edition of the book.

On page 641, you’ll find the hash map example, which won’t compile in CodeBlocks 10.05. This example requires the addition of another #include statement:

#include <string.h>

On page 647, you’ll find an example for using the random number generator. This example requires that you add the following two #include statements:

#include <time.h>
#include <stdlib.h>

On page 663, you’ll find an example for performing template specialization. You’ll need to add the following #include for this example:

#include <limits>

I tried the Boost examples in Book VI Chapters 3 and 4 using the latest version as of this writing (version 1.47.0). It appears to work fine with CodeBlocks 10.05 and the source code in the book. However, I’d like to hear about any problems that anyone has encountered using it.

If you encounter any other problems with Book VI, please be sure to let me know. In the next post I’ll start
with Book VII Chapter 1. In the meantime, keep those e-mails coming to John@JohnMuellerBooks.com.