Spaces in Paths

A number of readers have recently written me about an error they see when attempting to compile or execute an application or script in books such as, C++ All-In-One for Dummies, 3rd EditionBeginning Programming with Python For Dummies, Python for Data Science for Dummies, and Machine Learning for Dummies. Development environments often handle spaces differently because they’re designed to perform tasks such as compiling applications and running scripts. I had touched on this issue once before in the Source Code Placement post. When you see an error message that tells you that a file or path isn’t found, you need to start looking at the path and determine whether it contains any spaces. The best option is to create a directory to hold your source code and to place that directory off the root directory of your drive if at all possible. Keeping the path small and simple is your best way to avoid potential problems compiling code or running scripts.

The problem for many readers is that the error message is buried inside a whole bunch of nonsensical looking text. The output from your compiler or interpreter can contain all sorts of useful debugging information, such as a complete listing of calls that the compiler, interpreter, or application made. However, unless you know how to read this information, which is often arcane at best, it looks like gobbledygook. Simply keep scanning through the output until you see something that humans can read and understand. More often than not, you see an error message that helps you understand what went wrong, such as not being able to find a file or path. Please let me know if you ever have problems making the code examples in my books work, but also be sure to save yourself some time and effort by reading those error messages. Let me know if you have any thoughts or concerns about spaces in directory paths at John@JohnMuellerBooks.com.

 

Selecting a Programming Language Version

Because I have worked with so many programming languages and reported on them in my blog, I get a lot of e-mails from people who wish to know which language they should use. It’s a hard question because I don’t really have inside information about the project, their skills, their organization, or the resources at their disposal. Usually I provide some helpful guidelines and hope that the sender has enough information to make a good selection. Of course, I’ve also discussed the benefits of various programming languages in this blog and direct people here as well. The next question people ask is which version of the language to use.

Choosing the right programming language version is important because a mistake could actually cause a project to fail. I was asked the question often enough that I decided to write an article recently entitled, How to Choose the Right Programming Language Version for Your Needs. This article helps you understand the various issues surrounding programming language version selection. As with choosing a programming language, I can’t actually tell you which version to choose and for the same reasons I can’t select a language for you. At issue are things like your own personal preferences. In many cases, the language version you choose depends as much on how you feel about a specific version as what the version has to offer you as a developer.

An interesting outcome of programming language selection requirements is that I have one book, Beginning Programming with Python For Dummies that uses Python 3.3 and another book, Python for Data Science for Dummies that uses Python 2.7. Of course, I’ve had books that cover two different versions of a language before, so there is nothing too odd about the version differences until you consider the fact that Python for Data Science for Dummies is the newer of the two books. The reasons for my selections appear in Where is Python 3?. The point is that even book authors need to made version choices at times and they’re almost never easy.

Precisely how do you choose language versions in your organization? Do these criterion differ from techniques you use for you own choices (if so how)? Let me know your thoughts on selecting a programming language version at John@JohnMuellerBooks.com.