C++ All-in-One for Dummies 3rd Edition Extras

A number of you have pointed out that the extras for C++ All-In-One for Dummies, 3rd Edition on the Dummies site are a bit confused at the moment. Thank you, as always, for your input. I always appreciate getting your e-mails on any topic that affects the usability of my books. The publisher has assured me that the links will be cleaned up. Of course, eventually getting the links fixed won’t help you today. With this in mind, here is a list of the actual extras for this book—the elements that I’ll support and that provide support for the book:

To access a particular extra, just click its link in the list. Of the items you can download, the items that I most strongly suggest you download are the code examples. Downloading the code examples will save you considerable time, reduce potential errors, and make your experience with the book a lot better. If you want to type the examples in by hand, try them first using the downloaded code and then type them in. Using this two-step process makes it possible for you to easily see typos that you make as you work with the code on your own.

Remember that this edition of the book uses a newer IDE, Code::Blocks 13.12. Even though some examples will work with the older versions of Code::Blocks used in the second edition, other examples won’t. Upgrading your copy of Code::Blocks to version 13.12 ensures that you see the examples as they are meant to work. A few readers have asked about the requirements for using the extras and you really do need Code::Blocks 13.12 to use them correctly. You can also get by with a compiler that provides C++ 14 support, but you’ll need to modify the procedures to use that compiler, rather than Code::Blocks. I don’t provide support for other compilers because I don’t have them installed on my system.

Please let me know if you have any other questions about the extras for this book. It’s important to me that you get the maximum value from your purchase. Report any problems to me at John@JohnMuellerBooks.com. Of course, I always want to hear your book-related queries as well.

 

Getting Your Beginning Programming with Python for Dummies Extras

On Monday I announced my latest book, Beginning Programming with Python For Dummies. This truly is the book you must have if you need to learn Python quickly and you don’t have a lot of experience. If you have already received your copy of the book or you’re simply curious, you want to check out the extras that come with this book. You can find them on the Dummies site at http://www.dummies.com/extras/beginningprogrammingwithpython. So, just what sorts of things can you get? Here is a list of the online content:

  • Cheat sheet: You remember using crib notes in school to make a better mark on a test, don’t you? You do? Well, a cheat sheet is sort of like that. It provides you with some special notes about tasks that you can do with Python that not every other developer knows. You can find the cheat sheet for this book at http://www.dummies.com/cheatsheet/beginningprogrammingwithpython. It contains really neat information like the top ten mistakes developers make when working with Python and some of the Python syntax that gives most developers problems.
  • Dummies.com online articles: A lot of readers were skipping past the part pages in the book, so I decided to remedy that. You now have a really good reason to read the part pages, and that’s online content. Every parts page has an article associated with it that provides additional interesting information that wouldn’t fit in the book. You can find the articles for this book at http://www.dummies.com/extras/beginningprogrammingwithpython. Here is a quick overview of the articles you find on the extras site:

  • Updates: Sometimes changes happen. For example, I might not have seen an upcoming change when I looked into my crystal ball during the writing of this book. In the past, that simply meant the book would become outdated and less useful, but you can now find updates to the book at http://www.dummies.com/extras/beginningprogrammingwithpython.
  • Companion files: Hey! Who really wants to type all the code in the book? Most readers would prefer to spend their time actually working through coding examples, rather  than typing. Fortunately for you, the source code is available for download, so all you need to do is read the book to learn Python coding techniques. Each of the book examples even tells you precisely which example project to use. You can find these files at http://www.dummies.com/extras/beginningprogrammingwithpython.

As always, I highly recommend that you download the book’s source code. Doing so will save you considerable time and frustration. In fact, when you write to me at John@JohnMuellerBooks.com, the first thing I’ll ask is whether you downloaded the source code.

Of course, you’ll also continue seeing extra content for the book on my blog. Always check out the Beginning Programming with Python for Dummies category to see new posts for this book. You’ll find all sorts of useful information in this category including: book fixes, source code fixes, answers to reader queries, and general Python news.

 

Prepare Your Plants for Winter

Ready or not! Here it comes! Winter is on its way! If you live in the Midwest, it is time to winterize your house and stock up your pantry. It is also time to bring in any plants that were taken outside for the summer. There was a radio talk show host in the late 90’s who had a rant titled, “Houseplants are HOUSEplants! They are supposed to stay in the house!” But for those of us who have sentimental plants that are precious but large, taking the plant outside is a necessity in the summer.

A peace lily in a white plastic pot sitting next to a window.
Peace Lily

If you are in the habit of taking houseplants out for the summer, here are the best ways to assure that you don’t bring problems back into your house along with your plants:

  • Spray the plant for any insects that are common to the plant as a preventive measure. Relocating a plant to the warmth of your home will encourage insect survival.
    • Be sure that any houseplant spray you use will kill insect eggs. If it doesn’t kill the eggs, plan to spray 3 times at two week intervals.
    • Be safe by making sure that the plant you are spraying is listed on the label. Many plants are killed because they were sprayed with a chemical that was not safe for them.

If you want to use less chemical and have more effect, place the houseplant inside a trash bag while it is outside for spraying. Carefully spray the chemical into the bag. Quickly seal the bag with the plant and chemical inside. Leave it alone for 24 hours away from direct sunlight. After 24 hours, open the bag and air out the plant for about an hour. Then bring your treated plant in the house. This system can also be used inside.

    • Be careful to keep all chemicals away from pets or children.
  • Trim away any dead or dying leaves. The plant will continue to try to support any weak leaves. Removing them helps reduce insect and disease possibilities as both attack dying tissue.
  • Give your plant as much light as you can when you first bring it inside. As the plant adjusts to the new light source, you can slowly move it to its final location. This may mean that you will be moving your plants around inside a couple of times but your plant will be happier in the long run. If your plant has only one location that it will fit inside your home, consider using grow lights to help your plant make the adjustment from summer home to winter home. (You don’t have to do anything fancy, you can actually get grow lights that will fit in a standard light fixture.)
  • Pay attention. With houseplants it is very important to pay attention to them. Insect and disease problems often start slowly but spread quickly and if you are paying attention, the problem leaves can be removed and the problem remedied before it affects the whole plant.

Growing and caring for plants is a very satisfying way to pass the winter. Transitioning your plants from their summer home to their winter location is easy, but takes some finesse. If you really need to have blooms through the winter, search out paperwhite bulbs, zygocactus  (also called Christmas Cactus) or amaryllis. For easy greens choose spider plants, peace lily, or Norfolk Island pine. Whether they are Aunt Violet’s African violets or a new and exotic species that you discovered at the local greenhouse, plants are great company and worth the attention.

If you have any thoughts about bringing in plants for the winter or stories about the plants that you have inherited that have been part of your family, please add a comment to this post or contact John at  John@JohnMuellerBooks.com.

 

Announcing Beginning Programming with Python for Dummies

A number of people have written to ask me about the Beginning Programming with Python For Dummies books that I originally discussed in my Beta Readers Needed for Beginning Programming with Python For Dummies post. My copy of the book finally arrived on Friday and I can’t be more excited about how it turned out. This is the book you really need if you want to get started working with Python quickly and easily. As the title suggests, this is a beginner book—as in, you don’t need any experience to use it. Unlike most books, I don’t assume you already have some programming experience (although, you do need to know how to use your computer system). The really cool thing is that this is the book you need if you’re learning about programming in school and your school uses Python as a learning tool.

This book contains a wealth of examples, but you go through them using step-by-step procedures, so there isn’t any of the head scratching that occurs when you work with other books. The examples were tested on the Macintosh, Linux, and Windows platforms, but I’m sure they’ll work on other platforms as well. Any platform that runs Python and provides access to IDLE will be able to use this book. Here’s a list of the things you’ll learn:

  • Part I: Getting Started
    • Chapter 1: Talking to Your Computer
    • Chapter 2: Getting Your Own Copy of Python
    • Chapter 3: Interacting with Python
    • Chapter 4: Writing Your First Application
  • Part II: Talking the Talk
    • Chapter 5: Storing and Modifying Information
    • Chapter 6: Managing Information
    • Chapter 7: Making Decisions
    • Chapter 8: Performing Tasks Repetitively
    • Chapter 9: Dealing with Errors
  • Part III: Performing Common Tasks
    • Chapter 10: Interacting with Modules
    • Chapter 11: Working with Strings
    • Chapter 12: Managing Lists
    • Chapter 13: Collecting All Sorts of Data
    • Chapter 14: Creating and Using Classes
  • Part IV: Performing Advanced Tasks
    • Chapter 15: Storing Data in Files
    • Chapter 16: Sending an E-mail
  • Part V: Part of Tens
    • Chapter 17: Ten Amazing Programming Resources
    • Chapter 18: Ten Ways to Make a Living with Python
    • Chapter 19: Ten Interesting Tools
    • Chapter 20: Ten Libraries You Need to Know About

All the basics are here. By the time you complete this book, you can perform essential Python programming tasks and even use your new found knowledge in practical ways, such as sending an e-mail or storing data in files. Of course, there are limits to most books. This one doesn’t cover advanced topics—instead, it serves as your introduction to such books. Instead of spending hours just trying to figure out the jargon in these advanced books, you can move right along with doing something interesting.

This is your must have introduction to Python. Of course, I’m sure you have questions and I want to hear from you about them. Please feel free to contact me about any questions you have at John@JohnMuellerBooks.com.

 

A Question of Balancing Robot Technologies

The question of just how robots will affect us in the future consumes quite a bit of my time because I’m so interested in how they can be used for good. For example, robots are currently used to fight fires and to keep humans out of inhospitable environments. We also rely on robots to build some of the goods we enjoy and as a result, there are fewer assembly line accidents today than there were in the past (the quality of the output is also increasing). In the future, you can count on robot technology to help you remain independent, rather than ending up in a nursing home. There are even cars that rely on robots to drive them today and if things turn out as I expect, everyone will eventually use this sort of vehicle because robots will actually follow the traffic laws and reduce accidents as a result. In fact, it’s not too surprising to think that robots will appear in a lot of different situations that you don’t see them in today.

Humans are afraid of change. So, I’m also not surprised to find reports online that range from robots stealing jobs to terminator type robots killing us all off in order to save us (as in I, Robot). The fact is that robots really are under our control and as long as we exercise even a modicum of judgement, things will remain that way. I’m not saying that we couldn’t create a terminator-style robot. Recent advances in chip technology make it quite possible that we could create such a robot, but it’s important to ask why we’d ever do such a thing. In order for a new robot to become successful, there has to be a commercial reason to develop it and no one is interested in creating a terminator to destroy the human race.

What I think is more likely to happen is that robots will become companions to humans—devices that are both willing and able to take the risk out of human existence. The reduction of risk is an essential element in the robot/human relationship. We’ll continue to increase our use of robots as long as we can see a significant benefit to our personal lives. For example, it would be nice if we could eliminate the use of nursing homes altogether—that people could continue to live in their homes using robotic assistance. And, because those robots would be dedicated to the humans they serve, the standard of caregiving would increase dramatically. Of course, we have to get used to the idea of talking to a mechanical contrivance. Wait, we already do that—just consider how people interact with applications like Apple’s Siri.

Of course, people are asking what humans will do in the future if robots take on all of the tasks we have them slated for. For better or worse, the human condition has been changing at an ever more rapid pace over the last several years. If you look at just one statistic, you’ll miss what I’m trying to say here. For example, humans now live to an average age of 80 in many areas of the world—the average age will only increase barring some major change. People have children later in life now and focus more on career during the early years. Schools focus on getting kids to college and the college courses are becoming more challenging. In short, the environment in which we live today will change significantly in the next 40 or 50 years—to the point that most people won’t recognize the future as being any part of the past.

The change that has grabbed my attention most though is how much technology is now incorporated into humans (and the pace is only increasing). Yes, most of the technology currently does things like help people walk—it meets accessibility requirements. However, it’s only a matter of time before the technology will be used to help extend life and potentially make humans better adapted at excelling at tasks that we can’t even imagine now. So the question isn’t one of robots stealing jobs or killing us off terminator style, it’s one of understanding that humans are changing is a significant way and we’ll actually need robots to excel in the future. Let me know your thoughts about robots and our future at John@JohnMuellerBooks.com.

 

Baby, It’s Gonna Get Cold!

It’s only September and yet the thermometer has dipped into the 30’s. Since we live in a big old farmhouse with lots of character, we have consciously changed it as little as possible. In a perfect world, we would have all of the original storm windows. But unfortunately, we don’t live in a perfect world. We have a mixture of old wooden storms, some aluminum and a couple of windows that have been missing the storm for years. But we have learned how to button up this old fashioned house using some old techniques and developing a couple of new ones by trial and error.

  • First and thankfully, a previous owner had the foresight to completely surround the framing of the house with insulation from the attic to the basement. That addition is key to keeping any house warm during the Wisconsin winters. There are several ways to insulate the walls in all price ranges. Many of them can be done by a do-it-yourself enthusiast.
  • The next most important thing that can be done to keep the drafts out of an old home are tight windows. A previous owner installed aluminum double hung windows. We check them over every year (washing them when possible) to make sure that there is a tight seal. If the caulking has hardened or fallen away, we replace it. There are also some of the original wood framed storm windows that we check over every year—re-caulking as necessary. We put the storm in the window and go inside with a candle to check for any draft. If there are drafts or the window feels loose, we fill it in with rope putty.
  • For windows that have the storm completely missing, we use the plastic window kits. In order to be effective, they are best installed on a calm, warm day so that the adhesive is tacky enough to stick well. For any window that is going to be subject to lots of wind, it is a good idea to install plastic on the inside and outside as well. Follow the directions for the window product.
  • Lastly, the simplest thing to do to help the house be warmer in the winter is is the same as when our ancestors did it. Open the shades during the day! Capture the solar energy inside on sunny days, then close the drapes at dark and hold the heat in!

Another item that must be attended to before the winter sets in is making sure that your furnace is in good working order. It is a good idea to leave this to the expert. Your favorite furnace guy can come out and inspect and or repair your furnace. There may be a charge for the service but compared to an emergency call in the dead of winter; or worse yet a fire call, it is well worth the price!

  • Smoke detectors need their batteries changed twice a year. Utilizing the  biennial time change date will help jog your memory. If your smoke detectors are old (anything over ten years), it may be time to replace the whole unit rather than just the batteries. (If you want to test your smoke detector, use a spray tester, rather than the smoke from a match or candle, because the smoke can actually cause the detector to fail.)
  • CO (carbon monoxide) detectors are inexpensive and useful tools that have been proven to save lives.
  • Outlets are often a source of secret heat loss. Insulating liners are available that can be installed behind the outlet cover that can help keep these sneaky heat thieves from creating cold spots in the room.

Some people dread the fall, knowing that it is the precursor to winter. Others, like me, revel in the beauty of the fall colors and the smell of the crisp leaves. I thank the good Lord for the reminder (and the time) to prepare for the cold season. Good planning and good preparation leads to a great party! So this winter, prepare for Old Man Winter and Party On!

If you have tips for preparing for the fall preparation I would love to hear from you! Please respond here or send an email to John at John@JohnMuellerBooks.com.

 

Comments and CAPTCHA

In my Using CAPTCHA for Comments post, I described the need to use CAPTCHA to help keep spam under control. Using CAPTCHA has dramatically reduced the amount of spam the blog is receiving and provides a nicer environment everyone. In a perfect world, I wouldn’t need CAPTCHA, but the spammers have other ideas. So, this is one of those situations where everyone has to pay for the misdeeds of the few and I truly am sorry I had to implement this solution.

Of course, anti-spam solutions are only good if they actually do the job. This solution does keep the spam under control and many readers have written to tell me that it works better than the CAPTCHA solutions used on other sites. I want things to be easy and workable for everyone. This solution also seems to be doing a better job of keeping the spammers at bay than other solutions I’ve tried, so it’s both easy and effective—a rare combination.

A reader mentioned yesterday that he couldn’t get the CAPTCHA I selected for the site to work. The CAPTCHA solution doesn’t want to accept the input he’s providing. What I’m trying to do at the moment is track down what is happening because I want everyone to be able to post comments as needed. If you’re having problems using the CAPTCHA on this blog, please let me know at John@JohnMuellerBooks.com.

Please provide specifics on what you’re seeing to make it easier for me to hunt the problem down. If you could also let me know which OS and browser you’re using, that would be helpful. I need as much information as possible to determine whether I can fix the problem or whether I have to work with the CAPTCHA provider to fix it. I’m hoping the problem is limited to a few people and that there will be an easy fix, but I need good information to make this determination. Thanks, as always, for your help!

 

Using Hypermedia to Your Advantage

Many developers are familiar with the task of making a request to a server and receiving a response. We’ve been performing the same task since before the PC even appeared on the scene. So, it’s hard to imagine that anything new has come up. Hypermedia is that new thing, but before we go to far, let me fill in a few details.

When working on the Web, these requests normally go through a Web service that relies on a technology such as SOAP or REST. The essential idea is always the same—send a request, receive a response to that request (even when the response is an error). Of course, the Web adds it’s own wrinkles to the process. For example, most Web services rely on text-based data transfers, rather than the binary transfers used in the past.

The problem with this request/response scenario is that it assumes that the Application Programming Interface (API) used to make the transfer of information happen is well-documented by the provider and also well-understood by the developer. Unfortunately, documentation is often poor and understanding is even poorer. Wouldn’t it be nice if along with the response to a request, a developer also received a list of things that the result allows. Hypermedia performs precisely that task. When you make a request to a service that provides hypermedia support, not only do you get the information you requested, but you also get a list of things you can do with that information.

Hypermedia has just started picking up steam in the last year, so it doesn’t appear in any of my current books (you can bet it will in the future). However, I recently wrote an article about it entitled, Working with Hypermedia APIs. The article provides you with a good overview of what hypermedia APIs can do for you, why they’re an important new way of working with services, and what you can expect from them. Still, hypermedia APIs are in their infancy and I’ll eventually need to provide additional information about them.

Precisely what I do depends on your response to the article and to this post. For example, it may eventually be a good idea to get into the design criteria for hypermedia APIs. On the other hand, it may be better to start with existing hypermedia API services so that you can better see how they work. I’d like to hear from you about your interest level in the topic so that I know how to proceed. Make sure you write me about hypermedia APIs at John@JohnMuellerBooks.com or provide a comment to this blog post.

 

Python Used for Common User Interface Needs

My upcoming book, Beginning Programming with Python For Dummies, describes how to start working with Python. You discover how to perform all the basics and I even provide a few real world examples. However, once you’re done with the book, you might ask how Python can be used for real world programming of the sort that you need to do. One of the most common tasks is creating a user interface. Just about every application out there requires a user interface and it has become popular to make user interfaces touchable. Fortunately, Python developers have access to a huge number of libraries to make seemingly hard tasks simple. In fact, that’s one of the advantages of using Python—the immense number of really practical and useful libraries at your disposal. It’s possible to find a library for just about any need.

One of the more interesting libraries available for Python is Kivy. This library makes it possible to create multitouch applications without having to do all the heavy lifting yourself. The interesting thing about using Kivy for this task is that it helps you avoid some of the problems with other sort of multitouch application environments, such as using a combination of HTML5, CSS3, and JavaScript (where a less than compatible browser can ruin your chances of making the application work properly). This is a native code library that works on the Linux, Windows, OS X, Android and iOS platforms, so you have a good chance of finding precisely the support you need in a package that will perform well on the chosen platforms. Like all Python applications, the application you create on the Mac will work just fine on Windows too.

Of course, there are tons of libraries for Python, so why did I choose to talk about this particular library? It turns out that Kivy is proactive about obtaining as much developer support as possible, to the point of running contests (yes, that’s more than one of them) to see what sorts of things people can do with Kivy. I’ll admit it, I was bedazzled looking at all the eye candy on this site. What I thought was a five minute scan of the example applications turned out to be more than an hour of perusing what’s possible with Kivy and Python. All you need to do to try one of the applications out is to click its link, download the code, and start running it. Nothing could be easier (or time consuming as it turns out). Soon, you’ll find your days consumed by checking out Kivy applications too.

Fortunately, Kivy is also free. All you need to do is download the copy for your platform and install it. So, you get this great library that you can use for your business applications and it doesn’t cost you a dime. What I’d most like to hear about is whether someone is using Kivy in a large scale business application and how its performing for them. Speed is always an issue with Python, despite all the other amazing features it provides, so finding libraries that use every bit of speed Python has to offer is essential.

I take a lot of time looking for various tools, libraries, applications, and other resources for readers to use with my books. I’m not looking for anything cheesy, crippled, or difficult to use—I want well written, popular, and preferably free resources I can share. If you have a resource that specifically meets the needs of my readers, please let me know about it at John@JohnMuellerBooks.com.

 

Working at the Command Line

I maintain statistics about each of my books. Lately, I’ve noticed a trend with my command line reference books. More people are sending me e-mail about Microsoft Windows Command Line Administration Instant Reference and Administering Windows Server 2008 Server Core. However, the questions are becoming more diverse and less technical. Rather than the targeted questions about administration needs, I’m getting what I think are probably power user questions as well. People see my blog posts about commands, such as FindStr, and they naturally want to know more.

Someone recently wrote to ask me about what I thought the trends regarding the command line are. Based on my statistics, I would think that administrators are continuing to use the command line and more power users are rediscovering the command line. However, basing an opinion solely on book-related e-mail isn’t always the best idea and it certainly isn’t very scientific. Statistically, the e-mail is probably skewed to some extent because people aren’t speaking in general about their feelings—they have specific questions.

So, today I come to you with a request. Could you either comment to this blog post or send me e-mail about how you use the command line, or whether you use it at all? Microsoft is doing everything it can to move people to PowerShell. You can do quite a lot with PowerShell, including writing scripts that are more robust than those you can write at the command line. In addition, there are sites, such as PowerShell.com, that cater to the needs of the PowerShell user.

Even though it would seem at first like PowerShell is the future and the command line is passé, the command line has the advantage of simplicity and long term stability. In addition, there are still more resources available for the command line than there are for PowerShell. I generally use the command line for all my needs because I simply haven’t had a need for the additional resources that PowerShell provides. Let me know your thoughts about the command line and whether you generally see PowerShell as the required replacement for it at John@JohnMuellerBooks.com.