All posts by Mike

Lucid Programming Podcast – Writing Books About Python

I was recently interviewed on the Lucid Programming Podcast by Vincent Russo about writing books about Python.

You can listen to the audio here:

If you’d like to know more about how I write books, you might enjoy this article I wrote on the topic. I also wrote an article on the Pros and Cons of Indy Publishing.

Last week, I was honored to be on the Profitable Python podcast.


Related Podcasts

Other podcasts I have been on:

PyDev of the Week: Katherine Kampf

This week we welcome Katherine Kampf (@kvkampf) as our PyDev of the Week! Katherine is a Program Manager at Microsoft, specifically for Azure Notebooks, which is Microsoft’s version of Jupyter Notebook. She also recently gave a talk at EuroPython 2019. Let’s take a few moments getting to know Katherine better!

Can you tell us a little about yourself (hobbies, education, etc):

Sure! I am currently a Program Manager for Azure Notebooks at Microsoft. I joined the company in 2017 and started working on the Big Data team. After some time there, I decided to move closer towards notebooks and Python which led me to the Python Tools team which has been a blast.

Before starting at Microsoft, I graduated from the University in Michigan where I studied Computer Science. I also grew up Ohio so the Midwest was home for quite a while and will always have my heart. While at UofM, I was also lucky enough to TA our introductory computer science course which covered both C++ and Python. I loved helping folks learn new concepts, and I’m so glad I get to continue this in some form by speaking at conferences!

Nowadays, I’m based in Seattle and love living the stereotypical Pacific Northwest life. I tend to spend my weekends skiing in the winter and hiking in summer. In between those, I love to travel around and am working on visiting all the U.S. National Parks! I’m also a dog-enthusiast and am always working on being friends’ go-to dog sitter 😊 Continue reading PyDev of the Week: Katherine Kampf

Profitable Python Episode: Put Your Family First

I was a guest on the Profitable Python podcast this week. You can check it out here:

During the interview, I was asked how I would like to have Python runnable in the browser and I couldn’t recall the name of a product that makes this sort of thing possible. The product I was thinking of was Anvil, which while still not quite having Python in the browser, it’s close.

The other product I was thinking of was Microsoft’s Silverlight browser plugin that you can use IronPython in. Or at least you used to be able to. I haven’t looked into that in a while.

Here are some links to other things mentioned in this episode:

It was great to be on the show. I always enjoy talking about Python. Feel free to ask me any questions about anything mentioned in the Podcast or about the Podcast itself.

PyDev of the Week: Frank Wiles

This week we welcome Frank Wiles (@fwiles) as our PyDev of the Week! Frank is the President and Founder of Revolution Systems and President of the Django Software Foundation. If you’d like to know about Frank, you should take a moment to check out his website or his Github account. For now, let’s take some time to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

I grew up in a small town in Kansas, about 10,000 people, so computers became a hobby early in life. Other than that I really enjoy cooking and when I have time some photography, but these days it’s mostly just taking photos of the kiddos.

I attended Kansas University for awhile as a CS major and then switched to Business before ultimately dropping out during the dotcom boom.

Frank Wiles Continue reading PyDev of the Week: Frank Wiles

PyDev of the Week: Paul Ganssle

This week we welcome Paul Ganssle (@pganssle) as our PyDev of the Week. Paul is the maintainer of the dateutil package and also a maintainer of the setuptools project. You can catch up with Paul on his website or check out some of his talks. Let’s take a few moments to get to know Paul better!

Can you tell us a little about yourself (hobbies, education, etc):

One thing that sometimes surprises people is that I started out my career as a chemist. I have a bachelor’s degree in Chemistry from the University of Massachusetts, Amherst and a Ph.D in Physical Chemistry from the University of California, Berkeley. After that I worked for two years building NMR (nuclear magnetic resonance) devices for use in oil wells. In 2015 I was looking for a career with a bit more flexibility in terms of location and I made the switch to software development; one thing that is nice about the software industry is that tech companies are not afraid to hire people with non-traditional backgrounds if they know how to code.

Paul Ganssle

I have the typical assortment of “hacker” and “autodidact” hobbies – learning languages, picking locks, electronics projects, etc. One of my favorite projects (which has unfortunately fallen a bit by the wayside) is my HapticapMag, a haptic compass that I built into a hat. I had it up and working for 2 or 3 weeks, but some parts broke and I never got around to fixing it. My tentative plan is to start up some new electronics projects in 4-5 years, when my son is old enough to be interested in that sort of thing. Continue reading PyDev of the Week: Paul Ganssle

An Intro to Flake8

Python has several linters that you can use to help you find errors in your code or warnings about style. For example, one of the most thorough linters is Pylint.

Flake8 is described as a tool for style guide enforcement. It is also a wrapper around PyFlakes, pycodestyle and Ned Batchelder’s McCabe script. You can use Flake8 as a way to lint your code and enforce PEP8 compliance.


Installation

Installing Flake8 is pretty easy when you use pip. If you’d like to install flake8 to your default Python location, you can do so with the following command:

python -m pip install flake8

Now that Flake8 is installed, let’s learn how to use it! Continue reading An Intro to Flake8

PyDev of the Week: Raphael Pierzina

This week we welcome Raphael Pierzina (@hackebrot) as our PyDev of the Week! Raphael is a core developer of pytest, a popular testing framework for Python. You can learn more about Raphael by visiting his blog or checking out his Github profile. Let’s take a few moments to get to know Raphael!

Can you tell us a little about yourself (hobbies, education, etc)

My background is in 3D visualization and animation. After graduating from university with a Bachelor of Arts in Design, I worked as a software developer for a visual effects company for a few years and built applications for digital artists.

Fast forward to today, after having worked at a few other software companies, I’m now at Mozilla where I work on Firefox Telemetry. I manage projects to reduce Telemetry related blind-spots in our Firefox browser products and support our Software Engineers and Data Engineers in increasing the automated test coverage for the Firefox Telemetry component and our Firefox Data Platform. I wrote about my first year at Mozilla on my blog earlier this year in February, if you’d like to find out more about my work.

For fun, I like to run fast, read books, and enjoy the outdoors. 🏔 Continue reading PyDev of the Week: Raphael Pierzina

Using Twitter with Python and Tweepy

Twitter is a popular social network that people use to communicate with each other. Python has several packages that you can use to interact with Twitter. These packages can be useful for creating Twitter bots or for downloading lots of data for offline analysis. One of the more popular Python Twitter packages is called Tweepy. You will learn how to use Tweepy with Twitter in this article.

Tweepy gives you access to Twitter’s API, which exposes the following (plus lots more!):

  • Tweets
  • Retweets
  • Likes
  • Direct messages
  • Followers

This allows you to do a lot with Tweepy. Let’s find out how to get started!


Getting Started

The first thing that you need to do is create a Twitter account and get the credentials you will need to access Twitter. To do that, you will need to apply for a developer account here.

Once that is created, you can get or generate the following:

  • Consumer API Key
  • Consumer API Secret
  • Access token
  • Access secret

If you ever lose these items, you can go back to your developer account and regenerate new ones. You can also revoke the old ones.

Note: By default, the access token you receive is read-only. If you would like to send tweets with Tweepy, then you will need to make sure you set the Application Type to “Read and Write”. Continue reading Using Twitter with Python and Tweepy

PyDev of the Week: Eric Matthes

This week we welcome Eric Matthes (@ehmatthes) as our PyDev of the Week! Eric is the author of the popular book, Python Crash Course. He also created a neat set of Python Flash Cards that I reviewed earlier this year. You can catch up with Eric on his website or check out some of his work on Github.

Let’s take a few moments to get to know Eric better!

Can you tell us a little about yourself (hobbies, education, etc):

Sure! I grew up in southern New Hampshire, on the outskirts of Boston in the early 1980s. My father was a software engineer at DEC around that time, and I first learned to program on a kit computer in our basement back then. I am so grateful to my father for sharing the technology he had at home, instead of telling me to keep away from it all. It has been amazing to watch computers evolve from the early days of almost no one having a home computer to almost everyone having multiple computers in their lives.

I loved math and science in high school, and I went into undergrad as a chemical engineering major because I loved AP Chemistry. But I soon found that engineering was really about learning to solve other people’s problems. I enjoyed my physics classes though, because they were all about understanding the universe, from the very large to the very small. For a while I naively worried that if I stayed with physics long enough I’d start to find the world less interesting as I understood it on a deeper level. It was a joy to discover that the opposite was true: the more I learned, the more fascinating everything around me became.

I continued to learn new programming languages throughout my educational experiences. I took a variety of programming classes, and always had a few projects going for fun. I wrote a 3d graphing program in C during spring break one year in college.

I wanted to be a particle physicist, but I didn’t want to be a student forever. I decided to try teaching for a couple years, and quickly found that the intellectual challenge of trying to reach every student in my classes was just as satisfying as doing hard science. I loved teaching, and decided to stay with it.

In 2011 my son was born, and a month later my father died. It was a really hard time, but it was also a formative experience for me. My mother asked me to look through my father’s computer and let her know if there was anything worth saving. It was a really intimate experience, looking through all the projects he was working on, and reading through his notes. I used to visit him in his office whenever I went home, and as long as his computer was open and running that day I still felt directly connected to him. It was sad to realize these projects would never be finished, and would never be used by anyone. In the weeks that followed I realized that if I died you’d find a bunch of half-finished projects on my computer as well. I made a commitment to start using the skills I’d learned to build something meaningful.

I wanted to build tools that would bring greater equity to public education. I gave a talk at PyCon 2013 about how much the educational world could gain from the open source model, and Bill Pollock of No Starch Press approached me afterwards. “I hope you build what you described, and if you ever want to write a technical book let me know.” I went back to my classroom and saw a poster hanging on my wall: “What’s the least you need to know about programming in order to start building meaningful projects?” It was a list I had made for my students of the smallest set of things they needed to know in order to be able to build the things they cared about like games, data visualizations, and simple web apps. I realized that was the book I wanted to write, and the question on that poster became the guiding question for Python Crash Course. I hadn’t intended to write a book, but I realized that in five years of trying to teach programming to high school students, all the resources I found were either aimed at young kids, or assumed more technical knowledge and experience than my students had. I decided to write a book for anyone old enough to not want a kids book. It has been immensely satisfying to see that Python Crash Course works for almost everyone in that anticipated audience: young kids motivated enough to want a more serious book, high school students, undergrads in all majors, grad students, working adults, and retired people who are curious to learn programming at an older age. I was surprised to find it even works well for people who are already fluent in another language, and want to pick up Python quickly. Continue reading PyDev of the Week: Eric Matthes

Summer Python Book Sale

It’s summer time and now is a great time to learn Python! To help with that, I am running a sale of my Python books for the next week. The sale ends August 6th. All books are $9.99-$14.99 on Leanpub!

All My Python Books


Creating GUI Applications with wxPython

Creating GUI Applications with wxPython is my latest book. In it you will learn how to create cross-platform desktop applications using wxPython. Use this link or click the image above to get a discount.


Jupyter Notebook 101

The Jupyter Notebook is a great teaching tool and it’s a fun way to use and learn Python and data science. I wrote a nice introductory book on the topic called Jupyter Notebook 101.


ReportLab – PDF Processing with Python

Creating and manipulating PDFs with Python is fun! In ReportLab – PDF Processing with Python you will learn how to create PDFs using the ReportLab package. You will also learn how to manipulate pre-existing PDFs using PyPDF2 and pdfrw as well as a few other handy PDF-related Python packages.


Python 201: Intermediate Python

Python 201: Intermediate Python

Python 201: Intermediate Python is a sequel to my first book, Python 101 and teaches its readers intermediate to advanced topics in Python.