Book Drawing for C++ All-in-One for Dummies, 4th Edition

I’ve just released a new book, C++ All-in-One for Dummies, 4th Edition, and I’d love to give five people in the US a chance to read it for free (I can’t accept requests from other countries due to the amount of postage required to send a book to you). There’s only one catch. In exchange for the free book, I’d appreciate your review of it on Amazon.com. Your reviews are important because they give other people some idea of what the book is like outside of my opinion of it.

This new edition contains an amazing amount of changes from the 3rd Edition, many of which you requested. Of course, I started by updating everything, so you see the latest version of Code::Blocks used in this book. Working with Code::Blocks makes C++ coding a lot easier, but Code::Blocks tends not to hide the details or add any odd background code like some IDEs do. In addition to the updates, you can expect to see these changes:

  • Instructions on how to use your mobile device to write C++ code.
  • Updates on how to work with for loops.
  • Using functional programming techniques.
  • Employing new operators, such as the spaceship operator.
  • Understanding modifications to the Standard Library.

This new edition of the book comes in at a whopping 912 pages, so there is no expectation that you’ll read it cover-to-cover. What I would appreciate is your honest viewpoint on the topics that appeal to you most. If you’d like to participate in this drawing, please contact me at [email protected] by 8 March 2021 by email with a subject of “C++ Book Drawing”. I need your name and address. I’ll post the winners of the contest (sans email addresses) in a future blog post.

Writing Involves Reading

A lot of people think that ideas simply come into my head from nowhere and then I write them down. At some point, usually after three or four hours with several coffee breaks thrown in, I go fishing or do something else with my life. Somehow, the books just magically appear on sites such as Amazon and in the bookstores.

Unfortunately, writing isn’t quite that simple. During any given week I probably spend a minimum of 14 hours reading, often times more. I don’t just read computer science books either. In fact, many of my best ideas come from non-computer sources. It’s hard to say what will make a good source for ideas for my particular kind and style of writing. I’ve actually had poems influence me and more than a few fiction books. I once created a section of a chapter based on an idea I got from a Tom Clancy novel. The point is that writers are engaged in two-way communication. We get input from all sorts of sources, use that input to create new ideas and concepts, and then write those new bits of information down for others to read.

Reading differs from research. When an author researches something, the focus is direct and narrow. The goal is to obtain specific information. Reading is far more general. There really isn’t a focus, just communication. In reading a book or magazine, I might find a new technique for presenting information or a perspective I hadn’t considered before. The goal is to obtain experiences; to explore the world of print in an unfettered manner. The result is often enhanced creativity.

Of course, just as no one is able to get up in the morning and say, “Today I will be brilliant!” with any level of serious intent, reading may not produce any lasting effect at all. The communication may be an ephemeral experience of pleasure, joy, or some other emotion. Even in this case, letting the subconscious mind work while keeping the conscious mind entertained is a good idea. Sometimes a reading session, followed by a walk or some other activity, yields a solution to a writing problem that has nothing to do with the reading or the walking, but simply the allocation of time to the needs of the subconscious mind.

The bottom line is that if you want to become a writer, then you really must engage in writing activities because writing is as much about practice as it is talent. However, you must engage in other forms of communication as well or your skills will top out at some level and you’ll never fully realize your potential. Reading is truly a fundamental part of writing. Let me know your thoughts on reading as part of building skills in writing at [email protected].

 

Getting a Good Anaconda Install

Some people may have misinterpreted the content at the beginning of Chapter 3 in Python for Data Science for Dummies. It isn’t necessary to install the products listed in the Considering the Off-the-Shelf Cross-Platform Scientific Distributions section starting on Page 39. These products are for those of you who would like to try a development environment other than the one used in the book, which is Anaconda 2.1.0. However, unless you’re an advanced user, it’s far better to install Anaconda 2.1.0 so that you can follow the exercises in the book without problem. Installing all of the products listed in Chapter 3 will result in a setup that won’t work at all because the various products will conflict with each other.

Because Continuum has upgraded Anaconda, you need to download the 2.1.0 version from the archive at https://repo.continuum.io/archive/.There are separate downloads for Windows, Mac OS X, and Linux.  The chapter tells you precisely which file to download.  For example, for Windows you’d download Anaconda-2.1.0-Windows-x86_64.exe. The point is to use the same version of Anaconda as you find in the book. You can find the installation instructions on Page 41 if you have a Windows system, Page 45 if you have a Linux system, or Page 46 if you have a Mac OS X system.  Make sure you download the databases for the book by using the procedures that start on page 47.

Following this process is the best way to ensure you get a good installation for Python for Data Science for Dummies. Luca and I want to make certain that you can use the book to discover the wonders of data science without having to jump through a lot of hoops to do it. Please feel free to contact me at [email protected] if you have any questions about the installation process.

 

Beta Readers Needed for Amazon Web Services for Admins for Dummies

I still remember Amazon Web Services (AWS) when it was simply a method for getting information about Amazon products, making sales, and getting product status. The original web service didn’t do much, but people absolutely loved it, so it continued to evolve. Amazon has put a lot of work into AWS since that humble beginning and now you can perform all sorts of tasks that have nothing to do with buying or selling anything. You can create an entire IT structure for your organization that doesn’t involve any of the micromanagement, hardware purchases, software purchases, and other issues that kept IT from doing what it was supposed to do in the past-serving user needs in the most efficient manner possible.

There are a number of AWS books either published or currently in the process of being published, but these books don’t really answer the one question that everyone appears to be asking in the forums online, “How do I get started?” However, in recent years this has changed with more blogs talking about the subject. You can even check out this great AWS blog for more information. As for books, most of the titles out there right now answer questions for a specific group after that group has installed the product and gotten started with it. AWS is immense and is naturally intimidating. Unfortunately, the getting started documentation from Amazon is incomplete, outdated, and hard to understand. Amazon Web Services for Admins for Dummies helps administrators (the focus group) and others (such as DevOps and developers) get started so that they can actually make use of that next level up book. Here are the sorts of things you see covered in the book:

  • Part I: Uncovering the AWS Landscape
    • Chapter 1: Starting Your AWS Adventure
    • Chapter 2: Obtaining Free Amazon Services
    • Chapter 3: Determining Which Services to Use
  • Part II: Configuring a Virtual Server
    • Chapter 4: Creating a Virtual Server Using EC2
    • Chapter 5: Managing Web Apps Using Elastic Beanstalk
    • Chapter 6: Responding to Events with Lambda
  • Part III: Working with Storage
    • Chapter 7: Working with Cloud Storage Using S3
    • Chapter 8: Managing Files Using Elastic File System
    • Chapter 9: Archiving Data Using Glacier
  • Part IV: Performing Basic Database Management
    • Chapter 10: Getting Basic DBMS Using RDS
    • Chapter 11: Moving Data Using Database Migration Service
    • Chapter 12: Gaining NoSQL Access Using DynamoDB
  • Part V: Interacting with Networks
    • Chapter 13: Isolating Cloud Resources Using Virtual Private Cloud
    • Chapter 14: Connecting Directly to AWS with Direct Connect
  • Part VI: Getting Free Software
    • Chapter 15: Using the Infrastructure Software
    • Chapter 16: Supporting Users with Business Software
  • Part VII: The Part of Tens
    • Chapter 17: Ten Ways to Deploy AWS Quickly
    • Chapter 18: Ten Must Have AWS Software Packages

As you can see, this book is going to give you a good start in working with AWS by helping you with the basics. Because of the subject matter, I really want to avoid making any errors in this book, which is where you come into play. I’m looking for beta readers who want to use AWS to perform basic administration tasks, even when those tasks are related to a home office. In fact, I have a strong interest in trying to meet the needs of the small-to-medium sized business (SMB) because many of the other books out there cover the enterprise to the exclusion of these smaller entities. As a beta reader, you get to see the material as I write it. Your comments will help me improve the text and make it easier to use.

As you can see from the outline, Amazon Web Services (AWS) is actually a huge array of services that can affect consumers, Small to Medium Sized Business (SMB), and enterprises. Using AWS, you can do everything from back up your personal hard drive to creating a full-fledged IT department in the cloud. The installed base is immense. You can find case studies of companies like Adobe and Netflix that use AWS at https://aws.amazon.com/solutions/case-studies/. AWS use isn’t just for private companies either-even the government is involved. That’s why Amazon Web Services for Admins for Dummies has a somewhat narrowly focused audience and emphasizes a specific set of tasks that it will help you perform. Otherwise, a single book couldn’t even begin to cover the topic.

In consideration of your time and effort, your name will appear in the Acknowledgements (unless you specifically request that we not provide it). You also get to read the book free of charge. Being a beta reader is both fun and educational. If you have any interest in reviewing this book, please contact me at [email protected] and will fill in all the details for you.

 

Is Your Car Green, Really?

It seems like I receive yet another brochure about the huge advances various government entities, enterprises, vendors, or energy companies making in protecting the planet every month. Everyone seems to think that their technology is going to be the next green thing, when the facts simply don’t bear them out. The previous post I wrote on this topic, More People Noticing that Green Technology Really Isn’t, discussed the issue that some informed people are discovering that all that green technology out there is really just designed to sell more products-not help the earth in any significant way. The problem is one of complexity, which is the case with the green car.

Driving an electric car might seem like the right way to reduce emissions. However, recent studies show that your electric car might actually be worse for the environment. I say might here because it all depends on how the electricity is generated. In some cases, your electric car actually is better than gas at the first level. That is, the manner in which the electricity is generated produces fewer pollutants than driving a car with a gas engine would be. For example, sunlight and wind are both plentiful in Nevada, so driving an electric car could make sense there. However, as I’ve noted in previous posts, solar and wind power both rely heavily on special materials, the mining of which actually produces a serious amount of pollution. The studies available right now also assume that the manufacturing processes for the supposedly green cars are actually no worse than the older technology they replace.

However, in reality, it is crucial to remember that there is always an element of chemical risk at each stage of production of a car regardless of whether the resulting vehicle is gas or electric powered. It is no secret that the manufacturing processes involved in producing engines, plastics, and various other elements of a car require the use of hazardous chemicals such as adhesives, acids, bases, and cleaning chemicals. Furthermore, the majority of these products are corrosives or irritants and most of these chemicals are handled in laboratories.

Put simply, whether a car is powered by gas or electric, there is thus a constant risk of projection and chemical spill during the manufacturing process. With all of this in mind, it is vital that car manufacturers make use of chemical storage solutions to prevent chemical spillages or leaks. To address this issue, most car manufacturers use bunded storage. Essentially, a bund is a secondary containment area in a tank or a drum that can collect any spilled liquid if the initial storage container is inadequate. Due to the diversity of chemicals used throughout the manufacturing industry, there are several unique bunded storage containment options available for industrial users. You can discover the benefits of these bunded storage and containment solutions by taking a look at this useful guide on the Storemasta website.

Consequently, even though it might appear that your electric car is a win, it may not be right now. There are many defectives that both non-green and green cars have in common. For instance, you may find that a green or electric car might not hold the same charge capacity. There are a few cars that have been reported to develop defects that may not appear in a brand new car, so if you decide to get an electric second hand, you may find you are dealing with a lemon. Luckily, if you find yourself in that situation, you can always make a lemon claim for a used car.

A problem with all the entities making the promises and telling you just how good they are at fulfilling them is that they lie. Sometimes they even get caught. For example, the EPA finally caught VW in the act of lying about its emission test results. The only problem is that those cars are still out there producing millions of tons of lung killing smog. In fact, it’s hard to tell whether any of those green technologies actually do anything at all, except make you pay a lot more when buying the vehicle, and to run and maintain it later. Add to this the fact that some people are now saying that the solar industry is dying (and would already be dead were it not for government subsidies) and you have to wonder just how long these green cars will even maintain the appearance of being green.

Some people are saying that we should simply get rid of cars, which is obviously not going to happen. Systems like adas are only growing as people have more and more need of a car in their life. If people really wanted to use mass transit, it would have happened already. In addition, there isn’t any evidence that mass transit actually reduces pollution either. The vehicles are often poorly maintained and spew a horrid amount of pollution out of their exhaust (as evidenced by the stench when you drive behind a bus). In addition, mass transit only works when you live in or around a major city, which won’t work for those of us who live in the country.

The best way to create a green car is not to drive it any more than necessary. I’ve taken to planning out my trips so that I drive the fewest possible miles. Because I’m self-employed, I don’t even start my car five days a week (getting everything done in just two days). Not only does my strategy save time, but I’ve reduced by gas bill by half in the last two years. Green often equates to not using a resource such as gas. Using the resource will inevitably produce some sort of pollution. Through careful planning, you can significantly reduce the number of miles you drive and you can drive more of them at once (a warm engine normally works more efficiently and produces fewer emissions). You also want to reduce gas waste by starting up slowly, stopping over a longer distance, and keeping your engine from idling. In fact, there are a wealth of tips you can find online for making your car more efficient (such as removing all that junk from the trunk).

You can make the world a cleaner place and still keep your car. All it really takes is planning and careful maintenance. This can be done better using websites like https://www.czokbrand.com to give guidance on proper car maintenance. Unfortunately, there is no magic that will just make the problems with pollution go away. Driving that electric car or paying more for a vehicle with dubious emissions extras isn’t going to do much. What it really takes is a bit of self control. Let me know your thoughts about green cars at [email protected].

Old Laws, User Privacy, and Vendors Caught in the Middle

I’ve talked a number of times about researchers creating security busting software just because they can. The software often gets out into the wild where people who wouldn’t normally have a clue as to how to overcome security features can now use it to break the latest security in some product or application. Now the government is trying to force Apple (and probably other vendors) to write such software in pursuit of information hidden by encryption based on the mandates of a 227 year old law written at a time when no one had any idea that modern digital devices would even exist. The decree issued by the judge in charge of the case seems quite reasonable until you consider the fact that once Apple writes the software, it could end up in the wild, where hackers will almost certainly find ways to use it to overcome the security of legitimate users—making it impossible to ensure private information, such as credit card data, really does remain private.

The iPhone comes with some interesting security features that make it a relatively secure device. For example, tampering with certain device hardware will brick the device, which is the sort of security feature more devices should have. Modifying the security hardware should cause the device to lock down in order to protect the data it contains. The encryption that Apple offers with the iPhone is also first rate. No one but the user has the key used to unlock the encryption, which means that only the user can create a security problem by handing the key out to others.

The government is trying to change this scenario to make it easier to learn about anything it can about the data on Syed Rizwan Farook’s iPhone (one of the two San Bernardino shooters). On the surface, it seems like a good idea, if for no other reason than to potentially prevent other shootings. However, the manner in which the government has pursued the information opens the door to all sorts of abuse and then there is the matter of that software getting out into the wild. The issue here is that the law hasn’t kept up with technology, which is a recurrent problem. The government doesn’t have a law to cover the need to break encryption in a reasonable way, so it resorts to a 227 year old law that was never intended to address this need. The fact that the government is using the same law to try to force Apple to breach iPhone security in at least twelve other cases means that the argument that this is a one-off requirement doesn’t hold any water. Once Apple cooperates even once, it sets a precedent that will allow the government to force additional cooperation, even when such cooperation decidedly damages the privacy of innocent parties.

Tim Cook has rightly refused to cooperate with the government. There really is too much at stake in this case and even the government should be able to figure it out. What needs to happen is that our government needs to catch up with technology and write laws that everyone can live with to deal with the need to preserve the privacy engendered by encryption, yet make it possible for the government to obtain information needed to solve a case.

The question here is more complicated than simply managing information properly. It’s also one of keeping good technology (such as that found in Security for Web Developers) working properly and ensuring that government entities don’t abuse their positions. What is your take on the San Bernardino shooting and the information needed to pursue it? How do you feel about keeping your private data truly private? Let me know at [email protected].

 

A Fuller Understanding of the Internet of Things

You can find the Internet of Things (IoT) discussed just about everywhere today because the Internet has become pervasive. IoT is part of most business applications today as discussed in Security for Web Developers and part of any PC you build as discussed in Build Your Own PC on a Budget. It appears as part of smart TVs and Blue-ray players. In fact, you find IoT employed in a lot of places you might not have thought possible even a year ago. The point is that IoT is here to stay, especially when there are some great xfinity internet packages available, and we need to consider some of the ramifications of it on every day life.

One of the issues that hasn’t surprised me too much is the issue of security. Both my smart TV and smart Blue-ray player require me to enter a password to access the Internet through my wireless router (mostly because the router is configured to require one, whether I’m using 2.4ghz vs 5ghz range on it). So these devices do employ security to some extent. However, they remain logged on at all times, so the router is also configured to disconnect devices after a certain time. Each time I turn the devices on, I must reenter the password. It’s a level of security, but not necessarily the best security. Some devices, such as Apple Watch, lack any form of security. (In the case of Apple Watch, the device authenticates through an iPhone, so it still has some level of security, but not security that is part of the device itself.) Some industry pundits are saying that these devices will eventually kill the password, which means that some other form of primary authentication is needed.

The problem is increased by the proliferation of headless devices (products that lack any sort of display, such as a door lock, security system, or robots). In these cases, you can’t enter a password. No one is really sure how to secure these devices, but a solution really is needed and soon. Unless we find a solution, the issues surrounding intentional hacking will increase. A recent InfoWorld article, Welcome to the smart home … of horror!, emphasizes some of the sorts of things that could happen due to a lack of security.

Security and configuration problems aren’t just limited to outsiders gaining access to your home, office, business, or other location due to holes in IoT security. It also turns out that smart devices aren’t particularly smart, so sometimes you lose access to your network and its connected devices due to a combination of security and configuration issues when a failure occurs. In the ComputerWorld article, The Internet of Things: Your worst nightmare, you can hear about one person’s attempt to recover from a simple router failure. It turns out that simply replacing the router wasn’t enough-everything connected to the router needed reconfiguration and sometimes the task was less than easy to perform, though understanding your 192.168.100.1 Address can at least help with this quite often.

The world is in a age of transformation. The ride will be bumpy and the problems severe. When you consider the immensity of the things that are changing, the future looks incredibly different from anything that has gone on in the past. Not only is there IoT to consider, but the whole issue of robots and other technologies that are coming to fore. As these new technologies become part of everyday life, we have to ensure we can use them safely and that ability of someone to hurt us through them is curtailed. Let me know your thoughts about IoT security and configuration at [email protected].

3D Printing – Fad or Practical Tool?

For a while, it seemed as if 3D printing would take the world by storm and that we’d all have 3D printers in our homes pumping out anything we needed. However, since my last article on the topic, 3D Printing Done Faster and Better, the number of articles about 3D technology have decreased noticeably. In fact, the trade press has been a lot quieter on the topic, which makes some people wonder whether 3D printing is actually a fad. The problem with much of the new technology that becomes available is that people initially think there are all sorts of uses for it, but then discover that those uses aren’t practical or that they’re too expensive, and they end up dropping the technology (rather than revise their vision).

You can still find some fanciful uses for 3D printers. For example, the Washington Post recently ran an article recently ran an article on how 3D printers can change the presentation of food. The idea is that you really can have the food presented in a manner that is both pleasing and unique. The idea is to make food in unusual shapes, sizes, and colors, so that it appeals to a larger group of people. However, the original vision was to combine ingredients to actually make the food—this application scales the idea down to a more practical level.

It also looks like 3D printing will see practical use for various higher end needs that aren’t quite professional, but are out of reach of the home owner. Think of printers like the da Vinci 1.0 Pro 3D as a middle ground for experimenters (see the ComputerWorld review). The price is out of reach for the general consumer, but definitely within the range for experimenters and early adapters. Again, the vision is scaled down, more practical, and infinitely more usable.

The military is also using 3D printers to perform practical tasks. Having been a sailor myself, I can tell you without reservation that I would have loved to have been able to print some of the items I needed. Waiting to get back to port before I could even order parts meant serious delays and downed equipment. Imagine having the ability to print a new drone or other needed items while out to sea, rather than waiting for a supply ship or in port visit.

Of course, the medical and other high end uses for 3D printing continue to evolve. For example, 3D printed hands are becoming ever more usable. Expect to see all sorts of new medical uses for 3D printing evolve because humans are notoriously difficult to fit. I envision a day when it becomes possible to print just about any body part needed in the right size, color, shape, and characteristics. New printing strategies may even make the use of organ replacement drugs a thing of the past.

The point is that 3D printing is expanding, growing better, becoming more practical, and still evolving. Yes, you might eventually have one in your own, but don’t expect it to happen anytime soon. Practical uses for 3D printing are becoming more common. Until 3D printing becomes a must have technology for industry, science, military, medical, and other industries, the price won’t come down enough for the home user. To answer my initial question, 3D printing is becoming more practical tool than an interesting new technology, which is why you hear a lot less about it today. Let me know your thoughts about 3D printing at [email protected].

 

Python for Data Science for Dummies Errata on Page 221

The downloadable source for Python for Data Science for Dummies contains a problem that doesn’t actually appear in the book. If you look at page 221, the code block in the middle of the page contains a line saying import numpy as np. This line is essential because the code won’t run without it. The downloadable source for Chapter 12 is missing this line so the example doesn’t run. This P4DS4D; 12; Stretching Pythons Capabilities link provides you with a .ZIP file that contains the replacement source code. Simple remove the P4DS4D; 12; Stretching Pythons Capabilities.ipynb file from the archive and use it in place of your existing file.

Luca and I always want you to have a great experience with our book, so keep those emails coming. Please let me know if you have any questions about source code file update at [email protected]. I’m sorry about any errors that appear in the downloadable source and appreciate the readers who have pointed them out.

 

Python for Data Science for Dummies Errata on Page 145

Python for Data Science for Dummies contains two errors on page 145. The first error appears in the second paragraph on that page. You can safely disregard the sentence that reads, “The use_idf controls the use of inverse-document-frequency reweighting, which is turned off in this case.” The code doesn’t contain a reference to the use_idf parameter. However, you can read about it on the Scikit-Learn site. This parameter defaults to being turned on, which is how it’s used for the example.

The second error is also in the second paragraph. The discussion references the tf_transformer.transform() method call. The actual method call is tfidf.transform(), which does appear in the sample code. The discussion about how the method works is correct, just the name of the object is wrong.

Please let me know if you have any questions about either of these changes at [email protected]. I’m sorry about any errors that appear in the book and appreciate the readers who have pointed them out.