Entering Data in a Code::Blocks Window

Sometimes it isn’t very obvious how to enter data into a Code::Blocks window. One of the windows that seems to be causing problems for a number of readers is the Watches window. You open this window by choosing Debug | Debugging Windows | Watches. The purpose of this window is to let you view the content of variables in your application, which is an essential part of the debugging process. In order to view the variable (or other expression) content, you must enter it in the Watches window. Book III of C++ All-In-One Desk Reference For Dummies tells you all about debugging.

One technique for entering the variable is to select it in the editing window and the drag it to the Watches window. The variable will appear in the Watches window along with its value. However, this approach only works for variables and expressions that actually appear in your code. You might want to enter some other expression (or manually enter the variable, rather than drag and drop it). The Watches window consists of rows and columns as shown here.

WatchEntry01

The name of the variable or the expression you want to view appears in the first column. To enter a new value into the Watches window, click directly in the first empty left column cell. The row will turn blue and you’ll see a red insertion point appear in the cell as shown in the screenshot. Now you can type the variable name or expression you want to work with and press Enter. Let’s say your variable is named i. It might look like this:

WatchEntry02

Notice that the row is now white because it isn’t selected. However, you can see the name of the variable, i, it’s value 1983844706, and it’s type int. The row is in red because the value of i has just changed (unchanged values appear in black so you can see them easier). As you debug your application, you can now watch the value of i for changes.

Sometimes it isn’t obvious how to enter information into Code::Blocks (or any other application for that matter). When that happens, the focus turns to the application, rather than the work you need to do, and the experience becomes frustrating. Let me know about your book-related Code::Blocks questions at [email protected] and I’ll do my best to answer them. Because I don’t have a direct connection to the vendor, my ability to answer other sorts of questions is limited.

 

Regaining the Sense of Touch

A lot of my accessibility posts have focused on regaining function—the ability to perform a task using a prosthetic devices. Recently, there has been some development of touch. In fact, I reported on it most recently in my Continuing Development of Accessibility Aids post. Until now, the ability to feel has been limited to motor perception—how the prosthetic is moving through space and when it touches some other object. A new development makes it possible for the prosthetic to do more. The sense of touch can now include discovering the size and shape of items, as well as whether the item is hard, medium, or soft in consistency. The combination of motor, shape, and hardness touch makes it possible for someone to perform a considerably wider range of tasks using the prosthetic.

There are still quite a number of things missing from the picture. For example, a prosthetic can’t feel heat or cold just yet. It also can’t feel texture, except in the most unrefined manner. There is also no sensation of pain. So there is still a long way to go before the prosthetic could completely replace the biological equivalent, but the technology is getting closer.

The reason that this change is so important to readers of Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements is that this prosthetic has the potential to make computers truly usable for those with special mobility needs. With a refined sense of touch, someone with a prosthetic could potentially use a standard computer that doesn’t require any specialized hardware or software. In fact, it means that someone equipped with this kind of prosthetic device could use the entire range of input devices, including touch screens. In short, the playing field would finally be completely level for this group of people. I find the idea really exciting because it has been so long in coming.

Of course, the impact of such a change extends far beyond computer and other technology use. Imagine how it would feel to be able to pick up a grape or an egg for the first time after not being able to do so for an extended time-frame. It boggles the mind. We’re not quite to the same stage of development as presented in movies like Star Wars, but we’re getting there and at a relatively fast pace.

A bigger question is whether a prosthetic, no matter how functional, could ever really replace the biological counterpart. The answer to that question would have to be a resounding no. Even if the prosthetic functions exactly like a real human hand, or even extends what a human can do to some degree, it’s still not quite the same emotionally as having the real body part. Geordi LaForge (Star Trek) expressed the concept best when he kept seeking a counterpart to the visor he wore. Yes, the visor gave him eyesight. In fact, the visor presented him with eyesight that exceeded human capacity, but it still wasn’t the real thing.

What are your thoughts on the current trends in prosthetic development? Do you feel prosthetic devices will ever truly duplicate human functionality? Let me know at [email protected].

 

Your Security is an Illusion

I receive a number of queries about security from administrators and users every month, and many of these questions have links to all sorts of security issues that have occurred recently-everything from National Security Agency (NSA) spying to the Target security breach (incidentally, a number of other businesses have been attacked in the same manner). The fact of the matter is that books such as Administering Windows Server 2008 Server Core, Microsoft Windows Command Line Administration Instant Reference, and Windows 8 for Dummies Quick Reference have been telling you all along that security is a matter of vigilance-that software will never do the job alone. Even so, readers keep sending requests for some sort of magic bullet that will allay all their fears and make the task of security automatic.

Maintaining a reasonably secure system is a matter of observing personal, data, and system-wide best practices, something that SeedboxCo.net could help with if you’re unsure about how to go about it. Many other authors have listed these best practices in the past, but here are some of the techniques that people fail to use most often:

  • Use complex passwords that are easy to remember so you don’t need to write them down-consider using a passphrase whenever possible.
  • Change your password reasonably often and don’t rely on the same set of passwords all the time.
  • Keep your passwords secret so that no one else can abuse them.
  • Encrypt your data.
  • Perform local data backups regularly.
  • Ensure your applications remain updated with the latest security fixes.
  • Update your system as needed to ensure it provides a full set of modern security features.
  • Install security applications that check the incoming and outgoing flow of data, and block anything that looks remotely dangerous.
  • Check your system regularly for any files, folders, software, or other items that look out of place.


This list doesn’t even include some of the common user foibles, such as opening e-mail from parties they don’t know. In addition, none of these techniques are automated. You have to perform the manually in order to get the benefits they provide. Yes, it’s true that some of the techniques are automated once you start them, but you still have to start them. For example, installing security software will automatically monitor the data flow on your system, but you still have to install the security software manually.

Even with all of these security measures in place, someone who is truly determined can break into your system. You should simply count on it happening at some point, even if you’re incredibly careful. When a security breach does occur, you need to have a contingency plan in place.

Any good contingency plan will include a method of evaluating the damage caused by the security breach. You need to know just what was compromised and what the fallout of the compromise will be. Make sure that you are open and honest with your customers at this time as failure to do so can lead to other consequences. Silencing employees who speak out is even worse – you don’t want to juggle a legal fight with a whistleblower lawyer at the same time as cleaning up a data breach – so remain open to conversation at this time. Even individuals experience fallout from security breaches, such as identity theft. Once the damage is evaluated, you need a method for fixing the problems it has caused. In some cases, you may actually have to format the drive and start from scratch, which is where that data backup is going to become critical.

There is no magic bullet when it comes to security. Over the years I’ve searched, in vain, for a magic bullet and it isn’t even possible to conceive of one. Therefore, it’s the user and administrator who are best prepared for the eventuality of spying and security breaches that are in the best position to handle it later. Let me know your thoughts on security at [email protected].

The Ongoing Evolution of Libraries

I read a news story this weekend that confirms some of the things I’ve been saying about the future of libraries. The story, Texas library offers glimpse of bookless future, describes a new library in Texas, Bexar County’s BiblioTech, that doesn’t actually contain any books. This library contains computers and e-book readers that people use to work with content electronically. The article states that a lot of people are looking at this library to see how successful it becomes because the cost of maintaining such a library is significantly less than a traditional library. In fact, advances in technology will continue to make it possible to further reduce the cost of maintaining this particular kind of library.

However, I’ve been exploring a question for a while now about the future viability of libraries as physical entities. I first described this particular issue in my A New Emphasis On Libraries post. For 3 ½ years now I’ve tried to expand on the theme discussed in the Future of Libraries? post. The problem with a library that serves up only electronic media is that it’s overkill. Eventually, such libraries will disappear because people will be able to find the content online. A national library that’s based on the Internet will eventually take hold and that will be the death knell for the local library.

Something that the article brings up is that this library serves a neighborhood where few people have the hardware required to read electronic books and there is no Wireless Fidelity (WiFi) connection in the area for them to use. At one time rural areas didn’t have telephones because it was too expensive to service them. Now rural areas have good satellite or Digital Subscriber Line (DSL) connections. It won’t be long before rural and less serviced areas in cities have WiFi connectivity. So, the first problem this library solves won’t be a long term condition. We’re in a transitional phase.

The devices used to read books electronically will continue to evolve and become less expensive. At some point, the government will figure out that it’s less expensive to simply issue a device to those in need, rather than build physical libraries. At that point, a virtual national library will become feasible and probably appear on the scene. Paper books will eventually be relegated to the niche market—sold to those who have the money required to buy such products.

I’m one of the few, I’m sure, who will miss the paper book when this change happens. Using e-books for technical reading really is quite nice, but the feel of paper when I read fiction just can’t be overcome by the convenience of using an e-book reader. At one time I predicted that paper would continue to be available and preferred to meet my fiction needs, but things have changed faster than I could have ever predicted. It may very well be that the transition to e-book as the only viable media will happen within the next few years—only time will tell.

What do you feel about the transition to e-books and virtual libraries? If you like the idea of being able to find any book and check it out using a virtual library, let me know how you envision this system working. More importantly, how will such a system compensate authors for the time and effort spent putting the books together? Send me your ideas to [email protected].

 

Understanding the Need for Perspective in Development

I have received a lot of e-mails over the years from developers who don’t quite get the idea behind application design. The problem is that developers are taught about tools, strategies, patterns, and all sorts of other technical details, but are never taught an essential lesson that all applications are essentially products and that it’s up to the developer to sell them. The societal claim that all developers are socially inept nerds who are incapable of communicating with other humans doesn’t help. The fact of the matter is that an application that doesn’t serve the customer’s need will never get used—it will never be successful. Developers need to get the idea that they’re creating a product that must satisfy customer needs in order to be successful.

Many applications today are akin to inflexible restaurants. Imagine how you’d feel if you went into a restaurant and ordered a single egg, fried, with white toast, and a side of sausage and the server says, “I can’t fulfill your order.” Your first question would be why the order is so hard and her response of, “It’s not on the menu.” takes you completely by surprise. It turns out that the menu specifies two eggs, not one. Many applications present users with precisely that sort of choice, yet developers seem surprised when users are less than thrilled. A response of, “It’s not on the menu.” was never a good or valid one, yet that’s the response developers have offered users for a long time now.

In order to be successful, an application must be flexible enough to meet user demand. A developer must understand the user perspective and create an application that can meet the demand for one, two, or even three eggs (or how many ever eggs the user wants). After all, it doesn’t matter how many of an item the user ultimately wants, as long as the user is willing to pay for those items. In order to gain that perspective, developers must talk to users, listen to what they have to say, and engage them in the development process. All other businesses that I know of engage their customers in some way to ensure their products meet customer needs and the computer industry must learn to do the same.

Many applications also make things entirely too complicated. It’s akin to going into a restaurant and not being able to order until you provide the secret handshake. Servers who say, “Talk to the hand because the head isn’t listening.” won’t stay employed for very long. A restaurant won’t stay in business very long with that attitude and neither will the developer. A user isn’t interested in the arcane science of development or how many cool widgets your application uses. The user is only interested in taking a picture or performing some other activity that has nothing whatsoever to do with development or even computers for that matter. As far as the user is concerned, your application should be invisible.

So, why my preoccupation with restaurants in this post? I was watching someone use one of those restaurant data entry programs this morning. After the server provided the secret handshake, she had to navigate no less than ten menus before she was able to complete the order, which then failed because they were out of a particular item. So, she had to cancel the order and reenter everything. Would it really have been all that hard to add a feature where the cook could simply tell the server that something was out of stock? Does an order really require navigation of ten menus to accomplish? It surprises me that this order entry system is actually installed somewhere—perhaps nothing better was available.

The day where a developer can offer inflexible solutions that don’t meet user needs and offer only complexity is over. As users become less interested in accommodating developer needs because there is always another solution to try, developers will need to accommodate the user’s needs. Actually, that’s what should have happened in the first place. No other industry would have tolerated what users have had to tolerate from the computer industry. Let me know your thoughts on gaining the user perspective at [email protected].

 

A New Type of Solar Panel

One of the things that has always caused me problems with solar panels is that they’re a limited technology here in the Midwest, unless you want yet another surface to clear of snow in the winter. In addition, finding places to put the solar arrays is problematic. Once you do find a place to put them, the installation itself is normally an eyesore. So, even though you’re getting power from the sun, you’re paying a relatively high cost for it in more than just monetary ways. Which is why this new solar panel that doubles as windows for the house is intriguing. You can find a quick overview of the technology in the ComputerWorld article entitled, Transparent solar cells could turn windows into generators. The MIT Technology Review article, A New Solar Material Shows Its Potential, provides a little more depth.

The main material used in this new solar panel is perovskite. There aren’t any panel that you can buy today with this material, but it does have a lot of promise. Even if this particular material doesn’t work out because it’s too fragile, a composite with the material or a material with some of the same characteristics could produce solar panels that double as window panes. Because window panes are vertical, rather than at an angle, they won’t suffer from many of the environmental issues that current solar panels do. You won’t see them as something separate from the house and it’s less likely that they’ll be damaged because the house partially protects the windows. Because the windows won’t angle to precisely match the angle of the sun, these solar panels are unlikely to be as efficient as standard solar panels.

Although these new solar panels have some benefits, I’d stick to the original solar panels which attach to roof tiles. A friend of mine recommended a Wisconsin Solar Installers company however I don’t think I’ll get any installed this year. I’m still undecided about the whole solar panel situation, to be honest. I feel it is too much of a hassle to make any kind of changes to the house right about now. Also, I must read up about the solar panel installation laws here to get a comprehensive idea about everything. That is sure to take up some time.

Perovskite is a kind of rare earth mineral. Actually, the term encompasses a number of rare earth minerals that exhibit a particular structure. These minerals are somewhat common in a number of locations worldwide. Of course, mining perovskite will still incur the environmental damage I discussed in my A Discussion About Green Technology Pollution and A Discussion About Green Technology Pollution (Part 2) posts. It’s important to realize that this technology reflects a small, but important, step forward.

Several of the articles that appear online indicate that this new technology should be a lot less expensive than current solar panel technology and more aesthetically appealing as well. These two factors bode well for this technology. People won’t use green technologies that cost more than current technologies to use and few people are willing to put up with unappealing yard ornaments. If the people working with this technology succeed, your next window upgrade could provide power to your house as well.

The one thing that concerned me about this technology is whether it would look like standard windows. From what I gathered in reading various articles, the panes can be tinted, just like standard panes. From what I’ve read online, the level of tinting won’t be dark enough to stop you needing blinds or curtains, making them even more like standard windows. If you do decide to invest in these windows, you may want to dress them with shutters. Here are the top-rated plantation window shutters London citizens can purchase, as an example. In addition, it’ll be possible to sandwich the panes with inert gasses, such as argon, to produce windows with high emissivity values, which means they should work great in colder climates. Adding shutters will also help in colder climates as they can help to keep the heat in along with the inert gasses.

Our green technologies still create way too much pollution, but it appears that we’re making progress. Let me know your thoughts about these new windows at [email protected].

The Pain of Current Hardware Updates

It’s no longer possible for the average person to install hardware on a system with any assurance of success and a few of us old hands are encountering problems as well! That’s my experience with a recent hardware update for my system. Yes, I got the job done, but it required more work than necessary and included several trips to the store. In one case, the store sold me the wrong part (not the part I requested) and I ended up having to go back to exchange it. One of the few significant advantages in owning a desktop system, the ability to update as needed, is being eroded by a serious deficiency in the quality of upgrade components.

When I first started building my own systems many years ago, the devices that went into the box came with beautifully rendered manuals, all the required software, and any required hardware. Of course, you could get cheaper products that didn’t quite include everything, but even in this case, the device included a getting started book and the required software. However, many people opted for the nicer vendor packages to ensure they wouldn’t have to continuously run to the store for yet another part. It was overkill in a way. For example, few people actually bothered to read the manuals end-to-end and simply used the getting started guide to get the hardware installed as quickly as possible. They’d then use the manual as a quick reference when problems occurred.

A few years ago I noted that even high end products no longer shipped with a paper manual. You received the getting started guide in paper form and could then use the manual that accompanied the DVD once you restarted the system. The devices still shipped with all the required hardware and software. Some storage devices had the software installed right on the device itself, but still, you received the required software. Even so, the new packaging technique achieved a nice balance between protecting the planet and still allowing just about anyone to perform a hardware upgrade.

You might have noted that the Monday post was missing. Well, that’s because I was offline wrestling with a hardware update that should have been quite easy. The replacement of my hard drive and display adapter should have taken only a few minutes, but ended up taking an entire day (starting Sunday afternoon) due to the lack of documentation, incomplete (but required) installation hardware, and lacking software. Today my system is running, mostly configured, and the new parts work beautifully, but the price of getting them installed was way too high.

There are a few new lessons that I’ve learned as part of this experience. The most important is to check the box to ensure you have absolutely everything before you get started. Yes, this has always been good advice, but the products of the past generally included everything needed to get the job done. Given the trend I’m seeing now, you’ll likely need screws, possibly a piece of installation hardware, cabling, and other items that are listed as optional in the documentation (even though the device won’t work without them). Check the installation hardware before you leave to the store to make sure they’re actually selling you the right part. For example, make sure the cable you buy is actually rated to handle the load you’re placing on it (a cable rated for 3 Gb/s may not work well for a device that is designed to transfer data at 6 Gb/s).

It pays to put any DVD that comes with the device into the drive on your working system and explore it before you take your system down to upgrade it. Make sure you print out any information you need for installation before you take your system offline. For example, you should print out any jumper information and cabling instructions. Once you have your system offline for the installation, it’s too late to print that information out. If you don’t have a second system to view the documentation at that point, you’ll find that installation is next to impossible.

Some devices no longer come with an installation DVD. In this case, you must go to the vendor site, download the required manual and software, and ensure you’re familiar with it before you take your system offline. Make sure the software and manual are put on removable media because you may need them before the installation process is complete.

Make sure you perform the upgrade in a manner that allows you to revert back to the pre-upgrade state when necessary. Actually, this has always been good advice, but it’s even more important now that the possibility of success is less. You may find that you have to reverse the upgrade to get a working system so that you can determine why the upgrade didn’t work.

Desktop systems have the advantage of allowing updates, but performing the update has become significantly more difficult because vendors no longer take the care in packaging products that they once did. What sorts of problems have you encountered? Let me know at [email protected].

 

3D Printed Horse Shoes

I seem to have captured the interest of a number of readers with the posts I’ve created on 3D printing technology. The latest of these posts is Potential Commercial Uses for 3D Printing. The more I read about the technology, the more I think it really is more than just a fad. A lot of you think so too because you keep sending me articles on the topic (and you can keep them coming if you like, just make sure they’re substantial articles and not hoaxes).

One such story told about the use of 3D printing for horse shoes. Of course, the story goes into other uses for 3D printing, but the horse shoes really did capture my attention. First of all, the base material is titanium, which is exceptionally durable. Second, the horse shoes are pink. Just how they managed to make the titanium pink isn’t discussed anywhere in the article. I wish the author had researched that particular aspect a little more. (If anyone out there knows how its done, please let me know.)

Naysayers have been downplaying the practical nature of 3D printing technology. It’s true, early uses of the technology were gimmicks of a sort. However, more and more stories are coming out of practical (albeit pricey) uses for the technology. In most cases, the useful applications focus on the adaptable nature of 3D printing—the ability to create output that is custom designed for a particular application. You start with a basic design for a somewhat common item like a horseshoe or an ear, but then the computer makes it possible to create output with the precise dimensions required for a particular application. So, while I continue to doubt that printed food will take off as a common table item, printed medical or industrial applications will become more popular.

The main barrier to generalized use of 3D printing right now is price. Creating a one off design is still quite expensive. However, as developers create software that doesn’t require an expert to use and the price of the technology itself goes down, I can see new uses for 3D printing.

For example, a really practical use for the technology is printing shoes. Shoes that provide a custom fit for each person’s foot are practical because each person’s foot is different. Imagine being able to go to a shoe store, have your foot scanned, and come home with a pair of shoes guaranteed to fit your feet perfectly. So, what is good for the horse today, might be good for humans tomorrow .

Thinking about what the future might bring is interesting and 3D printing is most definitely something that will capture everyone’s attention. What do you see as a practical use for 3D printing? Keep in mind that it needs to be something that really does require custom output. Let me know what you think at [email protected].

 

Technology Hoaxes Galore

Looking for insane uses of technology has given me no limit of mirth in the past. Whenever I need a good laugh, I’ll look at someone’s interpretive use of technology that couldn’t possibly ever work. Sometimes it makes for good entertainment, as in futuristic movies (where it can’t be proven that the technology won’t work that way someday), but some offenders just look silly.

I read an article some time ago and recently read it again today because it really did bring home the absurd use of technology in some situations. In this case, the author is pointing out the odd and nonsensical uses of technology in crime shows. You can read 6 Howlingly Unrealistic Hollywood Portrayals of Law Enforcement Using Computers for yourself to see if your favorite show makes obvious errors in computer use. The fact is that most people buy into these computer usage scenarios, even if they know better. There is a point where artistic license for the sake of making a show or movie entertaining ends and these shows definitely jump the shark. It would be just as easy to create a convincing scenario that might not be precisely true, but close enough to reality to make for a better program. (I recently did a review of Gravity—a movie that does the job right.)

However, you don’t have to look to the entertainment industry for examples of technology hoaxes (or gimmickry, such as Google Glass, that should be a hoax). The most recent example of such silliness is the Amazon.com plan to deliver packages less than five pounds via drone. A number of industry pundits enthusiastically embraced the technology—I’ll spare them the embarrassment of a public mention here. One person who wasn’t fooled in the least is John Dvorak who lampoons the attempt as nothing more than an advertizing stunt (and he does name names).

The act of perpetrating technology hoaxes isn’t new and you can count on more of them appearing in the future because people will remain gullible enough to believe them. (If I’m really concerned about a particular hoax, I’ll check it out on Hoax Busters or Snopes.com.) Using artistic license to explore what could be true is entertaining and definitely within the purview of good fiction. Purposely creating a hoax for the purpose of fooling the public into believing something that can’t ever work is something else.

At some point you have to point out the hoax for what it is. What is your view on technology hoaxes? Which technology assertions do you see as a potential hoax today? Let me know at [email protected].

 

MTBF and Software

Like many people, I sometimes need a bonk on the noggin to remember some essential bit of wisdom that I shouldn’t have forgotten in the first place. Such is the case with the relationship between hardware and software. In many cases, developers have lost their connection with the hardware. Even though it seems quite obvious that the software provides instructions that change the state of the hardware, developers don’t really seem to make the connection. Once you remember the hardware connection, it also begins to make sense that any aberration of the functionality of that hardware will also reflect in the reliability of the software. In short, the Mean Time Between Failures (MTBF) of the hardware also has an effect on the software that runs on the hardware and causes the hardware to perform specific tasks.

The issue that drove the point home for me is a simple hard drive. This particular hard drive came with the system and the vendor used a lower cost drive to keep prices low (normally I get really high quality hardware simply to avoid problems). What this means is that the MTBF of the drive is also quite low. Unfortunately, I encountered the MTBF late last week as a glitch that caused me to think there was a problem with my software. The software was just fine—it was the glitch with the hard drive that was the source of the problem. I only realized this fact after testing the software on another system. (Unfortunately, the hard drive got worse and took some of my system configuration with it, but I maintain backups, so the loss was minimal.)

However, the partial failure of the drive caused me to realize yet again that software can only operate correctly when the underlying hardware also operates correctly. I can’t remember the last time I read anything that even broached the topic of hardware as a potential source of software problems. It makes me think that there are probably developers out there right now trying to find the error in a piece of software that doesn’t even exist in the software, but is a matter of some hardware glitch.

It’s important to realize that hardware doesn’t always fail in a predictable manner either. For example, a glitch can occur when a hairline fracture occurs in the runs of a board. This sort of error makes its appearance when you start the system. When the board heats up, the failure goes away because the breach in the run is sealed. Expansion of the metal fixes the problem. I’ve actually encountered a host of incredibly odd hardware problems over the years, many of which could appear as an isolated software issue given the right circumstances.

The lesson relearned in this case is to always test software on multiple systems. It’s essential that these systems use different components. Doing so will eliminate a number of non-software issues as the source of a problem. For example, using mismatched systems can help you understand when an error is due to a particular device driver. The point is that you need to avoid shooting yourself in the foot by not thinking of all the possibilities. Complex software interacts with the hardware in a complex way, which makes it all the more likely that some insignificant hardware or firmware issue will cause you woe as a developer.

What are your experiences with odd hardware- or firmware-related behaviors? Have you even encountered such behaviors? Let me know at [email protected].