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.

 

Working with Code in e-Books

Most of my technical readers now use e-books instead of paper books. Of course, there is a convenience factor to storing your entire library on a Kindle, even if it’s a software version of the Kindle. Of course, there are all sorts of e-book formats for your desktop system as well. The point is that electronic format makes a lot of sense when dealing with technical books.

However, e-books can cause some interesting problems and I’ve encountered a few with a number of readers now. The most important consideration is that you can’t cut and paste code from an e-book directly into your IDE and expect it to work. There are all sorts of reasons for this exclusion. For example, cutting and pasting may insert special characters into the output stream or the resulting paste may not have white space in the right places. A common problem is that publishers often convert regular single and double quotes into curly quote equivalents. The two kinds of quotes (both single and double) are completely different and the second type definitely won’t compile.

The best option when working with an e-book is to view the code in the e-book, but still get the downloadable source code for the book from the publishers website. I always provide a blog post detailing where to obtain the downloadable source for a book, when you need source code to use the book. If you can’t find the downloadable source, always feel free to contact me at John@JohnMuellerBooks.com. I want to be sure you have a great reading experience, which means having source code that actually runs in your development environment.

Another potential problem with e-books is that you may see unfortunate code breaks (despite the efforts of the publisher and myself). When you need to understand how white space works with a programming language, always review the downloadable source. The fact that the downloadable source compiles and runs tells you that all the of white space is in the right place and of the correct type. Typing the source code directly out of your e-book could result in added carriage returns or other white space errors that will cause the code to fail, even though the commands, variables, and other parts of the code are all correct.

As always, I’m open to your questions about my books. If you don’t understand how things work, please contact me—that’s why I’m here.

 

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

Python for Data Science for Dummies contains an error in the example that appears on the top half of page 124. In the first of the two grey boxes, the code computes the results of four print statements. The bottom-most print statement, print x[1:2, 1:2], is supposed to compute a result based on rows 1 and 2 of columns 1 and 2, and the bottom grey box seems to confirm that interpretation by the showing the result as [[[14 15 16] [17 18 19]] [[24 25 26] [27 28 29]]]. However, the answer provided for this example in the downloadable source code is [[[14 15 16]]], which doesn’t agree with that in the text.

The good news is that the downloadable source contains the correct code. The error appears only in the book. The last print statement in the book is wrong. Here is the correct code (with output) for this example:

x = np.array([[[1, 2, 3], [4, 5, 6], [7, 8, 9],],
 [[11,12,13], [14,15,16], [17,18,19],],
 [[21,22,23], [24,25,26], [27,28,29]]])

print x[1,1]
print x[:,1,1]
print x[1,:,1]
print
print x[1:3, 1:3]
[14 15 16]
[ 5 15 25]
[12 15 18]

[[[14 15 16]
 [17 18 19]]

[[24 25 26]
 [27 28 29]]]

Please let me know if you have any questions about this example at John@JohnMuellerBooks.com. I’m sorry about the error that appears in the book and appreciate the readers who have pointed it out.

 

Missing XMLData2.xml File

A number of readers have written to report that XMLData2.xml is missing from the downloadable source for Python for Data Science for Dummies. You encounter this file in Chapter 6, on page 108. The publisher has already added the file to the downloadable source, but you might be missing the file from your copy. If so, you can download it by clicking XMLData2.zip. I’m truly sorry about any problems that the missing file might have caused. Please be sure to let me know about your book specific question at John@JohnMuellerBooks.com.

 

Browser Support in My Books

A number of my books rely on browser output to show the result of various coding techniques, including Security for Web Developers, HTML5 Programming with JavaScript for Dummies, and CSS3 for Dummies. I try to keep up with changes in technology with my books and I’m currently testing the code in all three books with Internet Explorer 11. According to a recent ComputerWorld article, users of older version of IE only have six weeks to make an update to the new version. They can also use the Edge browser or move to a competitor’s browser. My books list the browsers I used for initial testing of the source code, but I do try to at least check the code with newer browsers to ensure you have a good reading experience. In this case, the check is critical because I can’t expect you to rely on unsupported software to use my books.

When I originally wrote each of these books, I had at least one technical editor and a number of beta readers checking my code under various conditions to ensure the code would run as advertised on the maximum number of systems. I no longer have the support, so I’m testing these updates on just my systems. If you encounter a problem with the source code of any of these books, please be sure to contact me at John@JohnMuellerBooks.com. Now, here’s the important part. Make absolutely certain to let me know that you’re using a newer browser—one not originally tested in the book so I can handle your query correctly and also provide an update on my blog. Your input will help other readers.

Whenever possible, I encourage readers to use the environment described in the book to write their own code. Doing so reduces the potential for problems because I know that the environment is tested by a number of people in a number of environments. However, sometimes using the original environment isn’t possible any longer, such as this instance where Microsoft is putting its collective foot down and forcing an update. Please be sure to write me if you have any questions about the source code for these book. Thanks, as always, for your continued support!

 

Missing File from Python for Data Science for Dummies Downloadable Source

A reader recently contacted me regarding a missing file from the downloadable source for Python for Data Science for Dummies. This is the P4DS4D; 01; Quick Overview.ipynb you need for the first chapter. Simply click here to download P4DS4D; 01; Quick Overview.ipynb. I’m also asking the publisher to add the missing file to the downloadable source found on the Dummies site at http://www.dummies.com/store/product/Python-for-Data-Science-For-Dummies.productCd-1118844181,descCd-DOWNLOAD.html. If you encounter any other problems with the book, please be sure to let me know at John@JohnMuellerBooks.com. Thank you for your patience!

 

Download Site for Python

I recently received an e-mail from a reader who had a bad install with Python 3.3.4 on a laptop with 64-bit Windows 7 installed. No matter what the reader did, the installation wouldn’t work. The application would fail with an error stating that pythonw.exe was unable to start and it included an error of 0xc000007b. He had downloaded the code from https://www.python.org/download/releases/3.3.4/, which is the site mentioned on page 25 of Beginning Programming with Python For Dummies. However, downloading a copy from http://continuum.io/downloads#py34 or https://store.continuum.io/cshop/anaconda/ did provide a copy of Python 3.4.3 (not the version 3.3.4 that is used in the book) that does work on his system.

The problem with this solution is that installing a copy from this second site also installs Anaconda—a product that isn’t covered in the book. In order to work with the IDLE examples in the book, you must open a copy of IDLE in the Anaconda\Scripts folder of the Anaconda installation. You’ll likely find this folder in your personal folder of your system. If you do find that you can’t get the copy of the product from the Python download site to work on your system, try this second solution and please let me know about the issue at John@JohnMuellerBooks.com. I would strongly encourage you to try the setup found in the book, however, because using Anaconda will cause extra work for you and this book is truly meant to help someone who has little or no programming experience discover the joys of working with Python.

As a side note, I have tried the book’s source code with the latest Python release, 3.4.3 (the book was originally written to use version 3.3.4). All of the source code works on my test system, but I’d love to hear if it works on your system as well. You can obtain this updated version of Python at https://www.python.org/downloads/release/python-343/ or http://continuum.io/downloads#py34 (if you don’t mind installing Anaconda as well).

When using the 3.4.3 version of Python, your screenshots may vary some from those found in the book. All version-specific information will change, so you need to take this change into account as you read. Please let me know if you experience any problems using this updated version on your system. In the meantime, happy reading!

 

Java 7 Patches and Future

It’s always important to keep your software updated with the latest patches. This is especially true with Java because so many hackers target even the smallest weaknesses. According to a recent ComputerWorld article, Java 7 has reached the end of its public life for updates. You need to upgrade to Java 8 in order to continue receiving free updates from Oracle. The rapid pace of updates that vendors rely on now is made necessary by hackers who apparently create malware updates even faster. Even at the fast release pace that Oracle is using, the malware just keeps rolling out. In other words, as a developer you need to exercise proactive coding to keep security risks at bay, in addition to relying on Oracle and other vendors for help.

A number of people have asked me about updates to Java eLearning Kit for Dummies. As far as I know, the publisher currently doesn’t have plans for an update. Of course, that could change at some point. Until the next update, however, the examples I’ve tested with Java 8 work fine on a Windows system. I’ll be performing additional testing on both OS X and Linux. However, I don’t have quite the number of people testing the book code as I had when I wrote it. If anyone does encounter a problem with the code, I’d greatly appreciate hearing about it at John@JohnMuellerBooks.com. I can’t guarantee that I’ll be able to fix absolutely every issue, but I’ll try to find workarounds and publish them on the blog for you.

As always, please don’t send me your personal code—I only work with book-specific code. Using the downloadable source is always the best way to get the most you can from a book. I’ve also created the Using My Coding Books Effectively post to help you get the most from my books. It’s important to me that you get the most you can from my books.

 

Missing Source Code Files for Beginning Programming with Python for Dummies

A number of readers have written to ask about the downloadable source code for Beginning Programming with Python For Dummies. At one point, the downloadable source was featured on the Extras page and I provided a link to it as part of the Getting Your Beginning Programming with Python for Dummies Extras post. The other extras are still in place, but the source code has moved location. You can now find it on the book’s main page immediately below the initial book description on the Downloads tab. I’m sorry for any confusion that the site setup change caused, but it actually took me by surprise as well and I had to research the actual location of the code. Those of you who asked me about the download through e-mail have already received a response.

I always want you to have the best possible learning experience with my books. That means having access to all the resources that the book has to offer. I’ll also keep providing required updates and tell you when others find errors so that you don’t have to work through it yourself. Please feel free to contact me with any book-specific questions you might have at John@JohnMuellerBooks.com.