Mac Gatekeeper Error

This is an update of a post that originally appeared on March 21, 2016.

A number of my books ask readers to download an IDE or other code and install it on their Mac systems. The problem is that the Mac system won’t always cooperate. For example, you might see an error dialog like the one shown for Code::Blocks:

The Gatekeeper error tells you that it won't allow you to install software from unknown publishers.
Your Mac won’t let you install software.

The problem is one of permissions. The default permissions set for newer Mac systems restrict you to getting your apps from the Mac App Store or from vendors who have signed their files. Fortunately, you can overcome this problem either temporarily or permanently, depending on how you want to use your Mac. The blog post What is Gatekeeper & How to Disable Gatekeeper on Monterey? provides you with illustrated, step-by-step directions to perform the task using either method. Let me know if you encounter any other problems getting your Mac to install the software required to use my books at [email protected].

Announcing Beginning Programming with Python for Dummies

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

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

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

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

This is your must have introduction to Python. Of course, I’m sure you have questions and I want to hear from you about them. Please feel free to contact me about any questions you have at [email protected].

 

Announcing C++ All-In-One for Dummies 3rd Edition

I’m really excited to announce the release of C++ All-In-One for Dummies, 3rd Edition. This is the book that:

  • Provides all the updates you’ve been wanting
  • Relies on the latest version of Code::Blocks
  • Includes better support for Windows, Linux, and Mac installations
  • Contains all the latest techniques, including lambda expressions

This is the book update that I discussed in Beta Readers Needed for a C++ Book Update. Here’s the new book layout:

  • Book I: Introduction C++
    • Chapter 1: Configuring Your System (18 Pages)
    • Chapter 2: Creating a First C++ Program (20 Pages)
    • Chapter 3: Storing Data in C++ (30 Pages)
    • Chapter 4: Directing Your C++ Program Flow (26 Pages)
    • Chapter 5: Dividing Your Work with Functions (26 Pages)
    • Chapter 6: Dividing Between Source-Code Files (16 Pages)
    • Chapter 7: Referring to Your Data through Pointers (30 Pages)
    • Chapter 8: Working with Classes (38 Pages)
    • Chapter 9: Using Advanced C++ Features (36 Pages)
  • Book II: Understanding Objects and Classes
    • Chapter 1: Planning and Building Objects (30 Pages)
    • Chapter 2: Describing Your Program with UML (20 Pages)
    • Chapter 3: Structuring Your Classes with UML (12 Pages)
    • Chapter 4: Demonstrating Behavior with UML (18 Pages)
    • Chapter 5: Modeling Your Programs with UML (12 Pages)
    • Chapter 6: Building with Design Patterns (30 Pages)
  • Book III: Fixing Problems
    • Chapter 1: Dealing with Bugs (12 Pages)
    • Chapter 2: Debugging a Program (14 Pages)
    • Chapter 3: Stopping and Inspecting Your Code (12 Pages)
    • Chapter 4: Traveling About the Stack (10 Pages)
  • Book IV: Advanced Programming
    • Chapter 1: Working with rays, Pointers, and References (30 Pages)
    • Chapter 2: Creating Data Structures (22 Pages)
    • Chapter 3: Constructors, Destructors, and Exceptions (28 Pages)
    • Chapter 4: Advanced Class Usage (26 Pages)
    • Chapter 5: Creating Classes and Templates (32 Pages)
    • Chapter 6: Programming with the Standd Libry (38 Pages)
    • Chapter 7: Working with Lambda Expressions (16 Pages)
  • Book V: Reading and Writing Files
    • Chapter 1: Filing Information with the Streams Libry (14 Pages)
    • Chapter 2: Writing with Output Streams (16 Pages)
    • Chapter 3: Reading with Input Streams (12 Pages)
    • Chapter 4: Building Directories and Contents (10 Pages)
    • Chapter 5: Streaming Your Own Classes (12 Pages)
  • Book VI: Advanced C++
    • Chapter 1: Exploring the Standd Libry Further (20 Pages)
    • Chapter 2: Working with User Defined Literals (UDLs) (16 Pages)
    • Chapter 3: Building Original Templates (20 Pages)
    • Chapter 4: Investigating Boost (26 Pages)
    • Chapter 5: Boosting Up a Step (16 Pages)
  • Appendix A: Automating Your Programs with Makefiles (12 Pages)

As you can see, this new book focuses a lot more strongly on standardized C++ so that you can get more out of it. There isn’t any mention of Microsoft special features any longer. You can use this book in all sorts of environments now and expect the examples to work (with some modification depending on how well your compiler adheres to the standard). Most importantly, there is now a chapter specifically designed to help you get your system configured so you can begin enjoying the book in a shorter time.

As always, I highly recommend you download the book’s source code from http://www.dummies.com/extras/cplusplusaio/ (the source code appears at the bottom of the page, so you must scroll down). In addition to the source code, the site also contains a wealth of extras that you really want to check out as part of your book purchase. Of course, there is always room for additional information, so let me know about the topics you’d like to see covered on the blog as well. You can check out the current posts at: http://blog.johnmuellerbooks.com/category/technical/c-all-in-one-for-dummies/.

I’m really excited about this new book and want to hear from you about it. Please feel free to contact me about any questions you have at [email protected]oks.com.

 

Beta Readers Needed for an Updated Java Book

Quite some time ago I had announced the completion of Java eLearning Kit for Dummies. Well, sometimes things don’t go quite as planned in the publishing world and this edition of the book never quite got out the door. Fortunately, the book is still alive and those of you who eagerly anticipated the last book won’t be disappointed this time. What I’ll be doing is updating that previous manuscript to work with Java 8 and to include new Java 8 features such as lambda expressions.

Of course, I still want to avoid making any errors in the book if at all possible. That’s where you come into play. I need beta readers for this updated version of the book. You’ll get to hear about the latest Java 8 functionality and see it in action. This version of Java is really exciting because of the important changes it contains. As a beta reader, you’ll get to see the manuscript as I write it and make comments about the material it contains. In other words, you get to help shape the content of my book and make it a better product—one specifically designed to meet your needs.

Don’t worry about your credentials. In fact, that’s the entire purpose of the beta reader program. I want people who would actually read this book as participants, so your knowledge of Java is unimportant. This is a book for the beginner and doesn’t assume any knowledge on your part. In addition, the platform you use doesn’t matter. This book will address the requirements for using Java on the Mac, Windows, and Linux platforms. By the time you get done with the book, you’ll have gained new skills that you can use to better your position at work or to create applications as a hobby. No matter what your reason for wanting to learn Java, I’d love to hear from you as a potential beta reader because this book is for everyone who wants to learn something new about this language.

Anyone who participates will get their name mentioned in the Acknowledgements (unless you specifically mention that you’d rather not receive credit). The last edition of the book attracted 15 beta readers, all of whom contributed substantially to the high quality of that edition. If you’re interested in participating in this edition, I definitely welcome your input. Please contact me at [email protected] if you want to learn more about the beta reader program and this book in particular.

 

Java 7 Released for General Use

Developers have been using Java 7 for quite some time now for creating and testing applications with additional functionality. However, until May 2nd, Java 7 wasn’t made generally available for users. Oracle plans to upgrade the entire user base at this point, so now is the time to start thinking about deploying those applications you’ve been developing. Just in case you’re new to Java programming, you can use my latest book, Java eLearning Kit for Dummies to learn how to work with Java quickly using the Windows, Linux, or Macintosh operating systems. The accompanying CD provides a fully interactive environment that includes impromptu tests and animation, to make learning a lot more fun. You can read the Java eLearning Kit for Dummies Manuscript Finished to get more information about the book. Be sure to contact me at [email protected] if you have any questions about this new offering.

This new version of Java has a lot to offer. For example, it’s the first time Oracle has provided both the Java Development Kit (JDK) and JavaFX Software Development Kit (SDK) for the Macintosh OS X. You can find a quick overview of why you should upgrade to Java 7 on the Oracle site. A more complete, developer friendly, list of changes appears on the OpenJDK site. Long time Java developers say there is nothing earth shattering in the upgrade, but there are a wealth of welcome enhancements. Just which enhancement is most important depends on which developer you talk to. Java eLearning Kit for Dummies discusses which of these enhancements are most important to beginning developers—those targeted by my book. I would say that the feature that intrigues me most is the improved support for dynamic languages—a feature I may try out soon. You can find the official Oracle feature list on their site at http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html.

Of course, now that Java 7 is out everyone is already starting to discuss Java 8. (In fact, some people are already talking about Java 9.) As with any new project, there are a lot of ideas and vaporware right now, with a true lack of any substance. You can be sure that I’ll keep you updated on the progress of Java 8. In the meantime, if you choose to get my book, I’d love to hear from you. Let me know what you like and what you’d like to see improved in the next edition. However, whatever you do, don’t keep silent if you have a question. I really do want to help you get the most out of everything I write.

 

Considering the Performance Triangle

It has been at least ten years ago now that I was reading an article and considering its ramifications in light of my current book. The name of the article has fallen by the wayside over the years, but the book was entitled, “.NET Development Security Solutions.” I was considering two important questions in the creation of my book:

 

  • Is it possible to create a truly secure application?
  • What is the actual cost of a secure application?


They’re essential questions and the answers to them continue to have an effect on my book writing efforts. The answer to the first question is yes—it’s possible to write a truly secure application. However, in order to obtain such an application, it can’t have any connectivity to anything. The second that an application has any connectivity, whatsoever, with anything else, it becomes contaminated by that connection. Don’t just think about users entering incorrect data here. The data on a hard drive can be corrupted, as can the memory used to hold the application. For that matter, someone could probably make the argument that it’s possible to create serious problems in the processor. My readers are a truly ingenious lot, so I’m sure if I gave you enough time, you could come up with an application that has no connectivity whatsoever with anything, but the usefulness of such an application is debatable. What good is an application with no inputs or outputs? I came to the conclusion, after quite a few hours of thought, that the most secure application in the world does nothing at all, interacts with nothing at all, and is pretty much worthless.

As I considered this security dilemma, it occurred to me that a truly secure application has no speed and is completely unreliable, given that it doesn’t do anything at all. As I worked through this book, I eventually came up with a performance triangle, where these sides are based on:

 

  • Security: The ability of the application to prevent damage to the application data, application code, the host system, and any connected systems.
  • Reliability: The accessibility of the application by the user. A reliable application is available for use at all times and makes every possible feature available to the user in a manner that precludes damage to the data or the system.
  • Speed: The pace at which an application can accept input, perform tasks, and provide output.


In order to increase speed, you must remove code that provides security and reliability. (I’m assuming here that the code is already as efficient as you can make it.) Likewise, when adding security features, you decrease
application availability in some situations and also add code that affects application speed. Making code reliable (which infers accessibility) reduces security and speed. The performance triangle has worked out for me for many years now as the basis for thinking about how application code actually works and the tradeoffs I must consider while writing it.

The use of the performance triangle isn’t based on language or platform. Whether you work on a Macintosh, Linux system, or Windows, you need to consider the effects of the performance triangle on your application irregardless of the host system. Likewise, language choice doesn’t affect the performance triangle, except that some languages provide more features that enhance a particular triangle element more than others. For example, C++ provides a significant speed advantage over many applications, but at a known cost to both security and reliability because the programmer is made responsible to adding the required safeguards. C# provides more safeguards, which enhances reliability, but at the cost of speed.

A problem in the current application design environment is that developers often focus on one element of the triangle (normally speed or security) at the cost of the other two. In order to build an application that performs well in a specific situation, the developer must consider the ramifications of all three triangle elements—an incredibly difficult task in some situations.

Even the questions that developers ask about the three elements of the performance triangle are often flawed. For example, many developers equate reliability with up time, but up time is only part of the reliability picture. An application that produces inconsistent results, denies required access to the user, or damages data in some way is unreliable. Robust applications explore all of the elements fully.

In the end, developers are usually faced with an imperfect scenario. Conflicting requirements and real world necessities often serve to weaken a good application design so that the developer must carefully craft the application to meet the maximum number of these requirements with the fewest possible faults. The situation comes down to one of weighing risk. A developer needs to ask which issue is most likely to cause the most harm and then write code that addresses that issue.

What sorts of design issues are you facing when developing applications? Do you use something like the performance triangle to help you consider the risks incurred when choosing one course over another in application development? Let me know your thoughts at [email protected].

 

Java eLearning Kit for Dummies Manuscript Finished

Nothing excites me more than to complete the manuscript for another book. I actually completed the Java eLearning Kit for Dummies manuscript last week Wednesday, but there are always last minute things to do. Today I’m considering the manuscript for book number 89 done. Maybe I should consider adding the fact that eLearning is worth 200 billion per year into the books. It is hard to tell, though. At this point, I’m working on Author Review (AR)-a process where I interact with the various editors. I answer any questions they might have about my book’s content and also check their edits to make sure no mistakes have been introduced.

This book is really exciting for a number of reasons. First of all, it’s a carefully crafted tutorial. Even if you’re a complete novice, you should be able to use this book. Every term is defined, the code is fully documented, and you shouldn’t run into any unpleasant surprises where the author assumes that you know something that you don’t. In fact, this book had a total of 15 beta readers involved in reviewing the material, in addition to my ever faithful editors. Of course, being precise and careful doesn’t mean you won’t have questions and I always welcome your questions about any book I write.

Second, this book is intended for use on multiple platforms. It doesn’t matter whether you work on a Linux, Macintosh, or Windows machine-you can use this book to learn how to write basic Java applications. Creating a book that works on so many platforms is exhilarating in the extreme. I couldn’t have done it without the support of my beta readers and I wish to thank every one of them publicly. You’ll find the names of the beta readers who didn’t mind me mentioning them in the Acknowledgements when the book is released.

Third, this book is the first I’ve ever written that comes with an interactive CD. You don’t really have to read anything if you don’t want. I estimate that you can get upwards of 85% of the content of the book simply by listening to the CD. Of course, books on tape have been providing this service for a long time. The difference with this book is that the CD is interactive. Not only will you hear the text, but you’ll see animations demonstrating the various things you need to know about Java. A number of different quiz types will test your knowledge of Java as you progress through the book. Finally, you’ll work through hands on exercises in order to build your skills. In short, this book includes everything that some of the newer interactive books include, but in a form that works on any computer system.

It’s important for any buyer to understand that this book truly is intended for novice readers. You aren’t going to get an intense Java workout by reading this book. In fact, here is a list of the lessons in the book:

 

  • Lesson 1: Starting With Java
  • Lesson 2: Using Primitive Variables
  • Lesson 3: Using Object Variables
  • Lesson 4: Formatting Variable Content
  • Lesson 5: Working with Operators
  • Lesson 6: Working with Conditional Statements
  • Lesson 7: Repeating Tasks Using Loops
  • Lesson 8: Handling Errors
  • Lesson 9: Creating and Using Classes
  • Lesson 10: Accessing Data Sets Using Arrays and Collections
  • Lesson 11: Performing Advanced String Manipulation
  • Lesson 12: Interacting with Files
  • Lesson 13: Manipulating XML Data


Nothing here is earth shattering, but you do get a good basic knowledge of Java. By the time you’re finished, you’ll know enough to move on to the harder to understand tutorials you find in books and online. In order to demonstrate all of the techniques in these topics, you’ll find 101 fully documented examples. Each one is designed for you to work through and interact with so that you fully understand precisely how Java works on your platform.

I’ll be working on the CD for the next while. As soon as it’s finished, I’ll provide you with an update about the CD content. For example, I’ll let you know a bit more about the kinds of exams I’m providing. Let me know if you have any questions about my new book at [email protected].

 

CodeBlocks on a Macintosh – Part 2

In an earlier post I had provided what I had hoped were great instructions for getting CodeBlocks to work on a Macintosh so that you can work through the examples in C++ All-In-One Desk Reference For Dummies. The instructions do, in fact, work for most people, but they don’t work for everyone. So, part of the reason for this post is to ask for your input. If you’re a Mac user who has encountered problems getting CodeBlocks to work, but solved the issue in a way that differs from my previous post, please let me know all the details about your technique (including the symptoms and step-by-step solution) at [email protected].

In the meantime, I have discovered a few new pieces of information. For one thing, you can verify that you have the GNU GCC compiler installed by opening a terminal, typing gcc -v, and pressing Enter.  If GNU GCC is installed, you should see some version information along with some compiler instructions. A failure message will look something like this:

My-MacBook-Pro:~ someone$ gcc -v
-bash: gcc: command not found

If you don’t have the GNU GCC installed, there seems to be all sorts of conflicting information online on how to resolve the problem. Most of the advice suggests a rather lengthy download and installation process because apparently GNU GCC isn’t shipped with all versions of the Mac (I’m of the opinion right now that it definitely didn’t ship with any Mac OS X version prior to 10.4, which is why the download at http://www.codeblocks.org/downloads/5 won’t work in this instance and doing things like resetting the compiler will also result in failure.)

One of the best pieces of advice I can offer is to check the CodeBlocks Wiki for Mac-specific information. The current advice is to download the Xcode developer tools from http://developer.apple.com/technologies/tools/, which apparently is a large downloadin excess of 4 GBso be prepared to do something else while you wait. I found similar advice on sites such as Tech-Recipes and the nixCraft forum. If you have a better solution, please let me know and I’ll be all too happy to share it here on my blog.

As a final note, if someone could let me know the actual installation directory for GNU GCC on the Mac, I’d really appreciate it. I understand that the installation directory is probably /usr/bin/gcc, but I’d like to be sure.

 

CodeBlocks on a Macintosh

You probably read the post entitled, “Getting CodeBlocks to Work” regarding my book, “C++ All-In-One Desk Reference For Dummies“, and immediately thought it didn’t apply because you have a Macintosh. Rather than write a single confusing post, I decided to write a second post just for Macintosh developers.  Here are the instructions for the Macintosh:

  1. Go to this page: http://www.codeblocks.org/downloads/5 .
  2. Download the Macintosh version of the compiler, codeblocks-8.02-p2-mac.zip. That contains the compiler.
  3. Double click the file once the download is complete and follow the instructions to install the compiler.
  4. At this point, start the CodeBlocks compiler.  Once it has started up, select Settings -> Compiler and Debugger. In the Compiler and Debugger Settings dialog box, click the “Selected Compiler” drop down and choose the GNU GCC Compiler option.  You should be good to go at this point.


I wrote these instructions with the help of a friend with a Macintosh. While the examples in the book work just fine on a Macintosh, I don’t have a lot of Mac experience. If this fix doesn’t work, we may have to work together a bit to come up with a solution.  This solution did work for two other Macintosh readers, so I’m hoping it also works for you, but I’m more than happy to work with you to make sure you get a working setup. Feel free to write me at [email protected] with your ideas and suggestions for a better procedure. You must have a copy of Mac OS X 10.4 or later to use CodeBlocks!