Programming Your Way

I’ve been working with Python for a while now. In fact, I’ve worked on three books on the topic: Beginning Programming with Python For Dummies, Professional IronPython, and Python for Data Science for Dummies. Of the languages I’ve used, Python actually comes the closest to meeting most of the programming needs I have (and a lot of other developers agree). It’s not a perfect language—no language can quite fulfill that role because of all the complexities of creating applications and the needs developers have. However, if any language comes close, it’s Python.

There are a number of reasons why I believe Python is a great language, but the issue I’d like to discuss today is the fact that you can actually use four completely different programming styles with Python. Care to guess what they are? In order to find out for sure, you’ll need to read Embracing the Four Python Programming Styles. Before I encountered Python, I never dreamed that a language could be quite so flexible. In fact, the single word description of Python is flexible.

Realistically, every language has potential issues and Python has them as well. For example, Python can run a bit slow, so I probably wouldn’t choose it to perform low level tasks on a specific system. It also lacks the User Interface (UI) functionality offered by other languages. Yes, there are a huge number of add-on libraries you can use, but nothing quite matches the drag and drop functionality provided by languages such as C#.

However, negative points aside, there aren’t any other languages that I know of that allow you so much flexibility in programming your way. You have four different styles to choose from. In fact, you can mix and match styles as needed within a single application. The ability to mix and match styles means that you can program in the way that feels most comfortable to you and that’s a huge advantage. Let me know what you think about Python’s ability to work with different programming styles at John@JohnMuellerBooks.com.

 

Understanding the Effects of Net Neutrality on Web Programmers

There has been a lot of hubbub about net neutrality. I even saw not one, but two articles about the topic in my local newspaper the other day. Of course the discussion has been going on for a while now and will continue to go on—eventually ending up in the courts. My initial interest in the topic is different from almost every other account you read. While everyone else seems to be concerned about how fast their app will run, I’m more concerned about getting new applications out and allowing them to run correctly on a wide range of systems.

Both HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies speak to the need of performance testing. Neither book covers the topic in detail or uses exotic techniques, but it’s an issue every good programming book should cover. Of course, I had no idea at the time I wrote these books that something like net neutrality would become fact. The developer now has something new to worry about. Given that no one else is talking much about developer needs, I decided to write Considering Net Neutrality and API Access. The article considers just how developers are affected by net neutrality.

If net neutrality remains the law of the land, developers of all types will eventually have to rethink strategies for accessing data online as a minimum. However, the effects will manifest themselves in even more ways. For example, consider how net neutrality could affect specialty groups such as data scientists. It will also affect people in situations they never expected. For example, what happens when net neutrality assures equal access speeds for the x-ray needed to save your life and that online game the kid is playing next to you? Will people die in order to assure precisely equal access. So far, I haven’t found anyone talking about these issues. There just seems to be this nebulous idea of what net neutrality might mean.

My thought is that we need a clearer definition of precisely what the FCC means by equal access. It’s also important to define exceptions to the rule, such as medical needs or real time applications, such as self-driving cars. The rules need to spell out what fair really means. As things sit right now, I have to wonder whether net neutrality will end up being another potentially good idea gone really bad because of a lack of planning and foresight. What are your ideas about net neutrality? Let me know at John@JohnMuellerBooks.com.

 

Using My Coding Books Effectively

A lot of people ask me how to use my books to learn a coding technique quickly.  I recently wrote two articles for New Relic that help explain the techniques for choosing a technical book and the best way to get precisely the book you want. These articles are important to you, the reader, because I want to be sure that you’ll always like the books you purchase, no matter who wrote them. More importantly, these articles help you get a good start with my coding books because you start with a book that contains something you really do need.

Of course, there is more to the process than simply getting the right book. When you already have some experience with the language and techniques for using it, you can simply look up the appropriate example in the book and use it as a learning aid. However, the vast majority of the people asking this question have absolutely no experience with the language or the techniques for using it. Some people have never written an application or worked with code at all. In this case, there really aren’t any shortcuts. Learning something really does mean spending the time to take the small steps required to obtain the skills required. Someday, there may be a technology that will simply pour the knowledge into your head, but that technology doesn’t exist today.

Even reading a book cover-to-cover won’t help you succeed. My own personal experiences tell me that I need to use multiple strategies to ensure I actually understand a new programming technique and I’ve been doing this for a long time (well over 30 years). Just reading my books won’t make you a coder, you must work harder than that. Here is a quick overview of some techniques that I use when I need to discover a new way of working with code or to learn an entirely new technology (the articles will provide you with more detail):

  • Read the text carefully.
  • Work through the examples in the book.
  • Download the code examples and run them in the IDE.
  • Write the code examples by hand and execute them.
  • Work through the examples line-by-line using the debugger (see Debugging as An Educational Tool).
  • Talk to the author of the book about specific examples.
  • Modify the examples to obtain different effects or to expand them in specific ways.
  • Use the coding technique in an existing application.
  • Talk to other developers about the coding technique.
  • Research different versions of the coding technique online.
  • View a video of someone using the technique to perform specific tasks.

There are other methods you can use to work with my books, but this list represents the most common techniques I use. Yes, it’s a relatively long list and they all require some amount of effort on my part to perform. It isn’t possible to learn a new technique without putting in the time required to learn it. In a day of instant gratification, knowledge still requires time to obtain. The wisdom to use the knowledge appropriately, takes even longer. I truly wish there were an easier way to help you get the knowledge needed, but there simply isn’t.

Of course, I’m always here to help you with my books. When you have a book-specific question, I want to hear about it because I want you to have the best possible experience using my books. In addition, unless you tell me that something isn’t working for you, I’ll never know and I won’t be able to discuss solutions for the issue as part of blog post or e-mail resolution.

What methods do you use to make the knowledge you obtain from books work better? The question of how people learn takes up a considerable part of my time, so this is an important question for my future books and making them better. Let me know your thoughts about the question at John@JohnMuellerBooks.com. The same e-mail address also works for your book-specific questions.

 

Understanding the Continuing Need for C++

I maintain statistics on all my books, including C++ All-In-One for Dummies, 3rd Edition. These statistics are based on reader e-mail and other sources of input that I get. I even take the comments on Amazon.com into account. One of the most common C++ questions I get (not the most common, but it’s up there) is why someone would want to use the language in the first place. It’s true, C++ isn’t the language to use if you’re creating a database application. However, it is the language to use if you’re writing low-level code that has to run fast. C++ also sees use in a vast number of libraries because library code has to be fast. For example, check out the Python libraries at some point and you’ll find C++ staring back at you. In fact, part of the Python documentation discusses how to use C++ to create extensions.

I decided to look through some of my past notes to see if there was some succinct discussion of just why C++ is a useful language for the average developer to know. That’s when I ran across an InfoWorld article entitled, “Stroustrup: Why the 35-year-old C++ still dominates ‘real’ dev.” Given that the guy being interviewed is Bjarne Stroustrup, the inventor of C++, it’s a great source of information. The interview is revealing because it’s obvious that Bjarne is taking a measured view of C++ and not simply telling everyone to use it for every occasion (quite the contrary, in fact).

The bottom line in C++ development is speed. Along with speed, you also get flexibility and great access to the hardware. As with anything, you pay a price for getting these features. In the case of C++, you’ll experience increased development time, greater complexity, and more difficulty in locating bugs. Some people are taking a new route to C++ speed though and that’s to write their code in one language and move it to C++ from there. For example, some Python developers are now cross-compiling their code into C++ to gain a speed advantage. You can read about it in the InfoWorld article entitled, “Python-to-C++ compiler promises speedier execution.”

A lot of readers will close a message to me asking whether there is a single language they can learn to do everything well. Unfortunately, there isn’t any such language and given the nature of computer languages, I doubt there ever will be. Every language has a niche for which it’s indispensable. The smart developer has a toolbox full of languages suited for every job the developer intends to tackle.

Do you find that you really don’t understand how the languages in my books can help you? Let me know your book-specific language questions at John@JohnMuellerBooks.com. It’s always my goal that you understand how the material you’ve learned while reading one of my books will eventually help you in the long run. After all, what’s the point of reading a book that doesn’t help you in some material way? Thanks, as always, for your staunch support of my writing efforts!

 

Where is Python 3?

A number of readers have been sending me e-mail about Beginning Programming with Python For Dummies and why I chose to use Python 3.3 instead of one of the Python 2.x versions. In general, I believe in using the most up-to-date version of a language product available because that’s the future of programming for that language. So, it wasn’t too surprising to me that I noted in a recent InfoWorld article that Fedora 22 will have Python 3 installed by default. I’ve started noticing that Python 3 will be the default with other products and in other environments too. Choosing Python 3.3 for this particular book looks like a really good choice because anyone reading it will be equipped to work with the latest version as it becomes adopted in a wider range of environments.

I do talk about standard Python in Professional IronPython. Of course, this book is targeted toward IronPython users, not Python users, but talking about standard Python and how you can use both libraries and utilities from it seemed like a good idea when I wrote the book. You need to remember that a solid version of Python 3 wasn’t available at the time I wrote this book and that Python 2 was really popular at the time. If there are readers of this book who would like me to create a series of posts that discuss using Python 3 libraries and tools with IronPython (assuming it’s possible), you need to let me know at John@JohnMuellerBooks.com. I try to accommodate reader needs whenever I can, as long as there is an interest in my doing so. At this point, I haven’t had a single reader request for such support, which is why I’m making a direct request for your input.

This leaves my current book project, Python for Data Science for Dummies. It turns out that the Data Science community is heavily involved with Python 2. My coauthor, Luca, and I have discussed the issue in depth and have decided to use Python 2 for this particular book. The limitation is that the libraries used for Data Science haven’t been moved to Python 3 completely and the entire Data Science community still uses Python 2 exclusively. If it later turns out that things change, I can certainly post some updates for the book here so that it remains as current as possible.

Python is an exception to the rule when it comes to languages. There are currently two viable versions of the language, so I can understand that some readers are completely confused. I encourage you to contact me with your thoughts, ideas, and concerns regarding the use of specific Python versions in my books. I want you to feel comfortable with the decisions that I made in putting the books together. More importantly, your input helps me decide on content for future books, articles, and blog posts. Unless I know what you need, it’s really hard to write good content, so please keep those e-mails coming!

 

Getting Python to Go Faster

No one likes a slow application. So, it doesn’t surprise me that readers of Professional IronPython and Beginning Programming with Python For Dummies have asked me to provide them with some tips for making their applications faster. I imagine that I’ll eventually start receiving the same request from Python for Data Science for Dummies readers as well. With this in mind, I’ve written an article for New Relic entitled 6 Python Performance Tips, that will help you create significantly faster applications.

Python is a great language because you can use it in so many ways to meet so many different needs. It runs well on most platforms. It wouldn’t surprise me to find that Python eventually replaces a lot of the other languages that are currently in use. The medical and scientific communities have certainly taken a strong notice of Python and now I’m using it to work through Data Science problems. In short, Python really is a cool language as long as you do the right things to make it fast.

Obviously, my article only has six top tips and you should expect to see some additional tips uploaded to my blog from time-to-time. I also want to hear about your tips. Make sure you write me about them at John@JohnMuellerBooks.com. Be sure to tell me which version of Python you’re using and the environment in which you’re using it when you write. Don’t limit your tips to those related to speed either. I really want to hear about your security and reliability tips too.

As with all my books, I provide great support for all of my Python books. I really do want you to have a great learning experience and that means having a great environment in which to learn. Please don’t write me about your personal coding project, but I definitely want to hear about any book-specific problems you have.

 

 

Beta Readers Needed for Python for Data Science for Dummies

Data science is the act of extracting knowledge from data. This may seem like a foreign concept at first, but you use data science all the time in your daily life. When you see a pattern a sequence of numbers, your mind has actually used data science to perform the task. What data science does is quantify what you do normally and make it possible to apply the knowledge to all sorts of different technologies. For example, robots use data science to discover objects in their surroundings.

Of course, data science is used for all sorts of applications. For example, data science is used with big data to perform tasks such as data mining or to predict trends based on various data sources. The fact that your browser predicts what you might buy based on previous purchases rests on data science. Even your doctor relies on data science to predict the outcome of a certain series of medications on a illness you might have.

Even though data science first appears easy to categorize, it’s actually huge and quite difficult to pin down. It relies on the inputs of three disciplines: computer science, mathematics, and statistics. There are all sorts of sub-disciplines used as well. Because of the depth and width of knowledge required, a data scientist often works as part of a team to tease out the meanings behind the data provided to solve a problem.

Python for Data Science for Dummies provides you with a beginning view of data science through the computer science discipline using a specific language, Python. The capabilities of Python as a language make it a perfect choice for this book. While reading this book, you’ll see these topics explained:

  • Part I: Getting Started with Data Science & Python
    • Chapter 1: Discovering the Match between Data Science and Python
    • Chapter 2: Introducing Python Capabilities and Wonders
    • Chapter 3: Setting Up Python for Data Science
    • Chapter 4: Reviewing Basic Python
  • Part II: Getting Your Hands Dirty with Data
    • Chapter 5: Working with Real Data
    • Chapter 6: Getting Your Data in Shape
    • Chapter 7: Shaping Data
    • Chapter 8: Putting What You Know in Action
  • Part III: Visualizing the Invisible (2 Pages)
    • Chapter 9: Getting a Crash Course in MatPlotLib
    • Chapter 10: Visualizing the Data
    • Chapter 11: Understanding Interactive Graphical and Computing Practice
  • Part IV: Wrangling Data
    • Chapter 12: Stretching Python’s Capabilities
    • Chapter 13: Exploring Data Analysis
    • Chapter 14: Reducing Dimensionality
    • Chapter 15: Clustering
    • Chapter 16: Detecting Outliers in Data
  • Part V: Learning from Data
    • Chapter 17: Exploring Four Simple and Effective Algorithms
    • Chapter 18: Performing Cross Validation, Selection and Optimization
    • Chapter 19: Increasing Complexity with Linear and Non-linear Tricks
    • Chapter 20: Understanding the Power of the Many
  • Part VI: Parts of Ten
    • Chapter 21: Ten Essential Data Resources
    • Chapter 22: Ten Data Challenges You Should Take

As you can see, this book is going to give you a good start in working with data science. Because of the subject matter, I really want to avoid making any errors in book, which is where you come into play. I’m looking for beta readers who use math, statistics, or computer science as part of their profession and think they might be able to benefit from the techniques that data science provides. As a beta reader, you get to see the material as Luca and I write it. Your comments will help us improve the text and make it easier to use.

In consideration of your time and effort, your name will appear in the Acknowledgements (unless you specifically request that we not provide it). You also get to read the book free of charge. Being a beta reader is both fun and educational. If you have any interest in reviewing this book, please contact me at John@JohnMuellerBooks.com and will fill in all the details for you.