Paper or eBook?

This is an update of a post that originally appeared on February 17, 2011.

When I originally wrote this post 12 years ago, I thought I’d eventually go all digital. For me, there is still nothing better than sitting by my wood stove, coffee cup next to me, reading a favorite work of fiction. Of course, I’m talking about a hard cover or paperback book. Nothing quite matches the feel and smell of paper, especially when you’re reading a book for leisure. The hours I’ve spent reading books have been pleasurable to the extreme. I’m transported to worlds of mystery in some cases, worlds of the future in others. Fantasy, science fiction, techno-thriller; they all hold a certain thrill.

Actually, I have five reading stations in my house, one of which is on my tablet. Yes, I really do read some books now in digital format. Normally, these books are works of fiction that I read somewhere other than home, perhaps at a coffeeshop or restaurant. The easy chair and woodstove with their associated collection of paper books still call to me and I’m thinking now they always will.

It’s a different matter when I start working with technical material. I’ve whittled my collection of technical materials down to a few hundred essential books. Most of the material I read today is online in digital form and I read it at my computer desk so that I have tools like my Integrated Development Environment (IDE) available. In fact, I’d go so far as to say many of the materials I read are in article format, rather than book format now. Still, at this very moment, reading station 3, the dining room table, has a paperback technical book called Microservice Patterns on it. I’m finding it useful for brushing up on my Java as well as learning a few new techniques.

If I need historical information that I know appears in my paper tomes, finding what I need can be hard. Unfortunately, no book cataloging system in the world will solve my problem. I could catalog each of my hundreds of books and still not find the information I actually need with any speed. Of course, the ability search quickly is one of the benefits of digital format. If I had my books in electronic format, I might avoid the hours upon hours of search time for that one piece of information I actually need. Then again, I’ve accidentally found many pieces of useful subsidiary information during such searches, so it’s not possible to discount paper as unworthy. Still, speed is of the essence while I’m working on my next project.

For now, it appears that my future will rely on two media for books: paper for leisure and electronic for work related materials. It’s a sad thing for me to admit, but the paper book has become a bit too cumbersome for a world where search speed is prized above all.

Handling Source Code in Books

This is an update of a post that originally appeared on April 4, 2011.

One of the biggest conundrums for the technical writer is how to handle source code in a book. The goal is to present an easily understood example to the reader—one that demonstrates a principle in a clear and concise manner. In fact, complexity is a problem with many examples—the author tries to stuff too much information into the example and ends up obfuscating the very principles that the reader is supposed to obtain.

There is also the problem with pages because books have a limited number of them. The technical writer must balance the depth and functionality of the examples against a need to present as many examples as possible. Even if a book is balanced, some readers are going to be disappointed that the book doesn’t contain the example they actually needed. So, very often simplicity must win the day in creating application source code for a book, despite the desire of the author to present something more real world, something with additional glitz and polish.

Because the goal of an example is to teach, very often the examples you see in a book have more comments than those that you see in real life. An example in a book must include as much information as possible if the code is going to fulfill its purpose. Of course, book comments should illustrate all the best principles of creating comments in real code. In short, if real world code looked a bit more like book code, then its possible that developers would spend far less time trying to figure code out and more time making changes.

Some readers will take the author to task because the code may not always provide the error trapping that production code provides. In fact, as with many teaching environments, the safety features in code are often removed for the sake of clarity. This problem plagues other environments too. In the past, it was common for woodworking magazines post a note near the beginning of the magazine telling the reader that the safety devices have been removed for the sake of clarity and that no one in their right mind would actually work with woodworking equipment without the safety devices. Likewise, the code you see in a book often lacks sufficient error trapping, making the principle that the code demonstrates clearer, at the cost of fragility. You can usually cause book examples to break easily, but no one in their right mind would create production code like that.

Choosing good examples for a book is hard, so getting your input really is important. I may not be able to provide precisely the example you need or want, but I may be able to provide something similar in the next edition of the book. Of course, I won’t know your needs or wants unless you tell me about them. I’m always open to hearing your ideas. However, I’m not open to providing free consulting in the form of troubleshooting your error code unless you’re willing to hire me to do so. Please keep the discussion to ideas that you’d like to see in book updates by contacting me at [email protected].

Introducing Machine Learning Security Principles

Are you a manager, researcher, or novice data scientist who works with data regularly, yet can’t really understand the technobabble found in security books that are supposed to help you secure the data you work with? Machine Learning Security Principles is all about providing you with full disclosure of all of the security threats that can affect your data in a detailed way that is also understandable. The idea is to understand the threats and understand the players in the security arena so you can create a strategy that will ensure your data remains safe without feeling completely lost in the language used by most books today.

Machine Learning Security Principles looks at data from every possible perspective, which means that you’ll learn more than just collection and storage methods. It isn’t just the hackers and disgruntled employees that are the problem. You now have to deal with governments that tell you how to collect data properly and face the wrath of the pubic at large when the data is collected in a less than ethical manner, even when no laws have been broken. In addition, it’s more than just the data, it’s also the system that holds the data, the application the uses the data, and the users who enter the data that can become problematic. With this in mind, here are some things that you’ll learn when reading this book:

  • Learn methods to prevent illegal access to your system.
  • Discover detection methods when access does occur.
  • Employ machine learning techniques to determine motivations.
  • Mitigate hacker access using a variety of methods.
  • Repair damage to your data and applications.
  • Use ethical data collection methods to reduce security risks.

A major complaint with most books on the market is that there is an expectation that you’re not only an expert coder, but that all you want is to see code. That’s fine if you’re already a seasoned security expert, but then seasoned security experts really don’t need books like this one. Machine Learning Security Principles provides you with several ways to learn about security issues:

  • References to actual security break-ins and the results of them.
  • Block diagrams showing how various kinds of security issues occur.
  • Explanatory text that helps you understand what precisely can happen and how to prevent.
  • Example code that you can use to discover how various security techniques work.
  • Example data and the techniques you can use to work with it.
  • Resources that you can use to augment your security plan.
  • Online tools you can use to more fully explore security issues.

In short, Machine Learning Security Principles provides you with several methods of learning about security in an easy to use manner. It doesn’t take a one size fits all approach. Please let me know if you have any questions about my new book by contacting me at [email protected].

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 [email protected].

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 Taylor

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 [email protected].

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.