C++ All-in-One for Dummies Errata on Page 188

There is a mistake on page 188 of C++ All-in-One for Dummies, 4th Edition that is based on a supposed April Fool’s prank that was actually initiated on March 26, 2018 (see https://www.modernescpp.com/index.php/no-new-new) and spread throughout the Internet to sites such as: https://www.fluentcpp.com/2018/04/01/cpp-will-no-longer-have-pointers/.  The problem with pranks, especially pranks that linger because the people who perpetuate them haven’t removed them, is that other people tend to believe them, as in this post: https://stackoverflow.com/questions/59820879/are-new-and-delete-getting-deprecated-in-c#. Later, much later, as in the note on the Fluent C++ site, people admit that it was a joke, but still leave the errant material in place.

 After I had discovered that this information was a joke, I had meant to remove two sentences from the book, but somehow they stayed intact.  The two sentences in question appear in the “Understanding the Changes in Pointers for C++ 20” section:

Readers who already know something about pointers need to be aware of the changes in pointers for C++ 20, which is why it appears first. The essential thing to remember as you move to C++ 20 (where new is deprecated) and then to C++ 23 (where new is removed) is that pointers are going to change.

If you find any other references in the book that state that new is deprecated or removed, they too will be modified or eliminated during the next printing. I apologize for any problems that the error has caused, especially to readers who are new to C++, and have submitted an errata to the publisher so that the error is fixed during the next printing. If you have any questions at all about the book, please contact me at John@JohnMuellerBooks.com.

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

Five people now have a copy of C++ All-in-One for Dummies, 4th Edition coming their way. Please wait four to six weeks for delivery and let me know when you receive your book. These people are:

  • Eva Beattie
  • Thomas McQuillan
  • Michael Flores
  • Syam Poolla
  • Tom Tailor

I hope that each of you enjoys the book and will provide a review of it on Amazon. Thank you for your support, it’s really important to me. Your reviews will help other readers as well. If you have any questions at all about the book, please contact me at John@JohnMuellerBooks.com.

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 John@JohnMuellerBooks.com 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.

Internet of Things (IoT) Security Issues

In the past, I discussed how the Internet of Things (IoT) could eventually cause a wealth of problems on the Internet, including security breaches, in a number of my books and articles. Some of my strongest warnings came in Build Your Own PC on a Budget and Security for Web Developers, but I included warnings in other places as well. Unfortunately, the worst case scenario has occurred according to the ComputerWorld article, Armies of hacked IoT devices launch unprecedented DDoS attacks. Yes, your DVR or smart television might have turned into a zombie at this point and now works for someone else committing crimes. All it takes is a little negligence on your part and your device will take a walk on the dark side.

The article is worthwhile reading because the statistics sound like something out of a bad science fiction novel. If anything, my warnings were too tame and I should have used my imagination a bit more in exploring just how bad things could get. Yet, I’ve received e-mail from readers who found the warnings I did provide barely believable. It didn’t seem possible that something as simple as the router installed to provide broadband support for your digital telephone could possibly cause any sort of problem. After all, your old telephone system never went on the attack. The thing is, any device that connects to the Internet today probably has enough intelligence to do harm, especially the IoT devices that everyone assumes just work.

IoT devices are actually some of the best targets for hackers. The users who have them barely know how they work, have no clue that they should change the password, and wouldn’t care even if they could figure it out. After all, the goal is to see Sunday afternoon football, not to configure security for a device. This worry can even extend to IoT sex toys, websites like Lovegasm (https://lovegasm.co/blogs/sex/bluetooth-sex-toys-hacking-privacy) have a story on how hackers hacked into a person’s Bluetooth sex toy. Vendors share in the blame because anyone with even a modicum of common sense would know that users have no desire whatsoever to change device passwords. IoT devices should go out with a unique password printed in a place that the user can easily find on the device, should it ever become necessary to access the device (and it might not ever become necessary). If hackers faced a unique default password for every device, the IoT devices would likely remain relatively secure unless hackers could somehow figure a pattern out in the password assignments. Ensuring the unique password is printed on the device means the user won’t lose it.

It’s not as if changing IoT device passwords is easy anyway, so hackers have every reason to believe that the default password is still in place for the majority of these devices. A recent device purchase pointed out to me that some IoT devices view even password changes as unwelcome user fiddling-it took nearly 20 minutes of reading to discover how to change the password using an arcane set of remote control clicks. Until this situation changes, you must expect that hackers will continue to use IoT devices to perform various kinds of attacks and that device owners will continue to remain oblivious about their cherished device’s life of crime. Let me know your thoughts on IoT security at John@JohnMuellerBooks.com.

 

Missing Machine Learning for Dummies Downloadable Source Files

A number of people have contacted me to tell me that the downloadable source for Machine Learning for Dummies isn’t appearing on the Dummies site as described in the book. I’ve contacted the publisher about the issue and the downloadable source is now available at http://www.dummies.com/extras/machinelearning. Please look on the Downloads tab, which you can also find at http://www.dummies.com/DummiesTitle/productCd-1119245516,descCd-DOWNLOAD.html and navigate to Click to Download to receive the approximately 485 KB source code file.

When you get the file, open the archive on your hard drive and then follow the directions in the book to create the source code repository for each language. The repository instructions appear on Page 60 for the R programming language and on Page 99 for Python. I apologize for any problems that the initial lack of source code may have caused. If you experience any problems whatsoever in using the source code, please feel free to contact me at John@JohnMuellerBooks.com. Luca and I want to be certain that you have a great learning experience, which means being able to download and use the book’s source code because using hand typed code often leads to problems.

 

Apathy, Sympathy, and Empathy in Books

I’ve written more than a few times about the role that emotion plays in books, even technical books. Technical books such as Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements are tough to write because they’re packed with emotion. The author not only must convey emotion and evoke emotions in the reader, but explore the emotion behind the writing. In this case, the author’s emotions may actually cause problems with the book content. The writing is tiring because the author experiences emotions in the creation of the text. The roller-coaster of emotions tends to take a toll. Three common emotions that authors experience in the writing of a book and that authors convey to the reader as part of communicating the content are apathy, sympathy, and empathy. These three emotions can play a significant role in the suitability of the book’s content in helping readers discover something new about the people they support, themselves, and even the author.

It’s a mistake to feel apathy toward any technical topic. Writers need to consider the ramifications of the content and how it affects both the reader and the people that the reader serve. For example, during the writing of both Python for Data Science for Dummies and Machine Learning for Dummies Luca and I discussed the potential issues that automation creates for the people who use it and those who are replaced by it in the job market. Considering how to approach automation in an ethical manner is essential to creating a positive view of the technology that helps people use it for good. Even though apathy is often associated with no emotion at all, people are emotional creatures and apathy often results in an arrogant or narcissistic attitude. Not caring about a topic isn’t an option.

I once worked with an amazing technical editor who told me more than a few times that people don’t want my sympathy. When you look at sympathy in the dictionary, the result of having sympathy toward someone would seem positive, but after more than a few exercises to demonstrate the effects of sympathy on stakeholders with special needs, I concluded that the technical editor was correct—no one wanted my sympathy. The reason is simple when you think about it. The connotation of sympathy is that you’re on the outside looking in and feel pity for the person struggling to complete a task. Sympathy makes the person who engages in it feel better, but does nothing for the intended recipient except make them feel worse. However, sympathy is still better than apathy because at least you have focused your attention on the person who benefits from the result of your writing efforts.

Empathy is often introduced as a synonym of sympathy, but the connotation and effects of empathy are far different from sympathy. When you feel empathy and convey that emotion in your writing, you are on the inside, with the person you’re writing for, looking out. Putting yourself in the position of the people you want to help is potentially the hardest thing you can do and certainly the most tiring. However, it also does the most good. Empathy helps you understand that someone with special needs isn’t looking for a handout and that they don’t want you to perform the task for them. They may, in fact, not feel as if they have a special need at all. It was the realization that using technology to create a level playing field so that the people I wanted to help could help themselves and feel empowered by their actions that opened new vistas for me. The experience has colored every book I’ve written since that time and my books all try to convey emotion in a manner that empowers, rather than saps, the strength the my reader and the people my reader serves.

Obviously, a good author has more than three emotions. In fact, the toolbox of emotions that an author carries are nearly limitless and its wise to employ them all as needed. However, these three emotions have a particular role to play and are often misunderstood by authors. Let me know your thoughts on these three emotions or about emotions in general at John@JohnMuellerBooks.com.

 

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 John@JohnMuellerBooks.com.

 

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 John@JohnMuellerBooks.com if you have any questions about the installation process.

 

Continuing to Use Your Old Parallel Port Printer

A problem with building a newer system is that you may not always have the older ports needed to support older devices. In some cases, it pays to replace the device because you want to gain the added functionality that a newer device can provide. However, if you have a major investment in a device, such as a printer, that doesn’t necessarily provide additional support, then you need to find another solution. I cover all the major port types in Build Your Own PC on a Budget. However, in today’s post you discover a way around the whole issue of supporting an older, yet usable, parallel printer when all you have is USB ports on your new system.

One way around the problem is to connect the printer to an older PC that does have a parallel port. You can then share the printer through a network connection. Of course, this solution assumes that you have an older PC that you want to devote to print server duties and a network to use. However, it’s a solution that many organizations have used over the years with great success. As detailed by sources such as Marketbusinessnews.com, printing technology has rapidly evolved in recent years. If you are upgrading your PC, it is worthwhile to upgrade your printer at the same time to ensure that you are getting the best quality.

Another solution is to obtain a special connector cable, such as the Sabrent USB to Parallel printer cable shown in the following picture.

A USB to DB25F parallel port connector with 6 foot cable.
USB to Parallel Port Connector

It’s important to note that the parallel end of the cable is a DB25F. You need to ensure the parallel end of the cable is of the right type for the connection you want to make. The package contains just the cable with the appropriate ends. It also contains a tiny piece of paper with some contact information, but there isn’t any special software required.

Make the connection between the USB port and the printer with the system off. Power the system and the printer up and log in as normal. In most cases, the system will automatically detect the printer and install appropriate drivers for you (or ask you to supply the needed drivers). However, you may need to install the drivers manually on some platforms. The chance of successfully making the connection work do diminish when installing the drivers manually because it usually means that the printer and the system aren’t communicating properly.

The only complaint I had about this solution is that the female parallel connector has screws instead of nuts, which means that you can’t secure the male printer cable to the female USB cable. Yes, the connectors work just fine, but they aren’t screwed together, which means that they could become loose at some point and you’ll lose contact with the printer (probably at the worst possible moment). Even so, the solution does work well.

A side benefit of this solution is that it’s possible to use a longer cable. Depending on who you talk with, the maximum cable length for a parallel printer is between 15 feet for the older Centronics standard and 25 feet for the newer IEEE 1284 standard. Using this solution makes it possible to work with a longer cable. The length tested for this post was 31 feet and I haven’t noticed any glitches, misprints, miscommunication, or loss of speed. Let me know your thoughts about continuing to use older peripherals with newer computers at John@JohnMuellerBooks.com.

 

Automation and the Future of Human Employment

It wasn’t long ago that I wrote Robotics and Your Job to consider the role that robots will play in human society in the near future. Of course, robots are already doing mundane chores and those list of chores will increase as robot capabilities increase. The question of what sorts of work humans will do in the future has crossed my mind quite a lot as I’ve written Build Your Own PC on a Budget, Python for Data Science for Dummies, and Machine Learning for Dummies. In fact, both Luca and I have discussed the topic at depth. It isn’t just robotics, but the whole issue of automation that is important. Robots actually fill an incredibly small niche in the much larger topic of automation. Although articles like The end of humans working in service industry? seem to say that robots are the main issue, automation comes in all sorts of guises. When writing A Fuller Understanding of the Internet of Things I came to the conclusion that the services provided by technologies such as Smart TVs actually take jobs away from someone. In this case, a Smart TV rids us of the need to visit a video store, such as Blockbuster (assuming you were even around to remember these stores). Imagine all the jobs that were lost when Blockbuster closed its doors.

My vision for the future is that people will be able to work in occupations with lower risks, higher rewards, and greater interest. Unfortunately, not everyone wants a job like that. Some people really do want to go to work, clock in, place a tiny cog in a somewhat large wheel all day, clock out, and go home. They want something mindless that doesn’t require much effort, so losing service and assembly line type jobs to automation is a problem for them. In Robots are coming for your job the author states outright that most Americans think their job will still exist in 50 years, but the reality is that any job that currently pays under $20.00 an hour is likely to become a victim of automation. Many people insist that they’re irreplaceable, but the fact is that automation can easily take their job and employers are looking forward to the change because automation doesn’t require healthcare, pensions, vacation days, sick days, or salaries. Most importantly, automation does as its told. In the story The rise of greedy robots, the author lays out the basis for an increase in automation that maximizes business profit at the expense of workers. Articles such as On the Phenomenon of Bullshit Jobs tell why people are still working a 40 hour work week when it truly isn’t necessary to do so. In short, if you really do insist on performing a task that is essentially pointless, the government and industry is perfectly willing to let you do so until a time when technology is so entrenched that it’s no longer possible to do anything about it (no, I’m not making this up). Even some relatively essential jobs, such as security, have a short life expectancy with the way things are changing (see How much security can you turn over to AI? and The eerie math that could predict terrorist attacks for details).

The question of how automation will affect human employment in the future remains. Theoretically, people could work a 15 hour work week even now, but then we’d have to give up some of our consumerism—the purchase of gadgets we really don’t need. In the previous paragraph, I talked about jobs that are safer, more interesting, and more fulfilling. There are also those pointless jobs that the government will doubtless prop up at some point to keep people from rioting. However, there is another occupation that will likely become a major source of employment, but only for the nit-picky, detail person. In The thin line between good and bad automation the author explores the problem of scripts calling scripts. Even though algorithms will eventually create and maintain other algorithms, which in turn means that automation will eventually build itself, someone will still have to monitor the outcomes of all that automation. In addition, the search for better algorithms continues (as described in The Master Algorithm: How the Quest for the Ultimate Learning Machine Will Remake Our World and More data or better models?). Of course, these occupations still require someone with a great education and a strong desire to do something significant as part of their occupation.

The point of all this speculation is that it isn’t possible to know precisely how the world will change due to the effects of automation, but it will most definitely change. Even though automation currently has limits, scientists are currently working on methods to extend automation even further so that the world science fiction authors have written about for years will finally come into being (perhaps not quite in the way they had envisioned, however). Your current occupation may not exist 10 years from now, much less 50 years from now. The smart thing to do is to assume your job is going to be gone and that you really do need a Plan B in place—a Plan B that may call for an increase in flexibility, training, and desire to do something interesting, rather than the same mundane task you’ve plodded along doing for the last ten years. Let me know your thoughts on the effects of automation at John@JohnMuellerBooks.com.