Book Review: Software Architecture with Python

Packt Publishing approached me about being a technical reviewer for the book, Software Architecture with Python by Anand Balachandran Pillai. It sounded pretty interesting so I ended up doing the review for Packt. They ended up releasing the book in April 2017.


Quick Review

  • Why I picked it up: Packt Publishing asked me to do a technical review of the book
  • Why I finished it: Frankly because this was a well written book covering a broad range of topics
  • I’d give it to: Someone who is learning how to put together a large Python based project or application

Continue reading Book Review: Software Architecture with Python

PyDev of the Week: Aileen Nielsen

This week we welcome Aileen Nielsen as our PyDev of the Week. Aileen has been using Python in the data science field for a while now. She recently gave a tutorial on Time Series Analysis at PyCon 2017 and she also did a talk on NoSQL Python at PyData Amsterdam 2016. Let’s take a few moments to learn more about our fellow developer!

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

I’m a software engineer at One Drop, a diabetes management platform. We’re trying to help people better understand and manage their chronic conditions with the use of technology, data analysis, and expert coaching.

I spent a lot of time in school (law school, ABD in physics grad school), so I consider myself an eclectic person as far as academic interests, and I like to read non-fiction in lots of area. Right now I’m most interested in non-fiction books about spying and organized crime. My hobbies are traveling and hiking. When I’m not working, I try not to be in front of a screen.

Continue reading PyDev of the Week: Aileen Nielsen

Python 101: Working with Dates and Time

Python gives the developer several tools for working with dates and time. In this article, we will be looking at the datetime and time modules. We will study how they work and some common uses for them. Let’s start with the datetime module!

The datetime Module

We will be learning about the following classes from the datetime module:

  • datetime.date
  • datetime.timedelta
  • datetime.datetime

These will cover the majority of instances where you’ll need to use date and datetime object in Python. There is also a tzinfo class for working with time zones that we won’t be covering. Feel free to take a look at the Python documentation for more information on that class. Continue reading Python 101: Working with Dates and Time

ANN: Boomslang XML

I recently decided to start putting together some fun example desktop applications using Python. I’ve been using wxPython to create the cross platform applications. My first one is called Boomslang XML and is a basic XML editor.

The name, Boomslang, comes from a large venomous snake. It’s name basically means “tree snake”, which I thought was appropriate since the user interface uses a tree widget to represent the structure of the XML document.

The current features in Boomslang include the following:

  • Opening / Editing multiple XML files
  • Auto save on edit of the XML
  • Recent file support
  • Some keyboard shortcuts (accelerators)
  • Add new XML nodes or attributes
  • Edit nodes and attributes
  • Delete nodes

Currently this is fairly beta, but I thought other people might find it interesting. I am aware of a couple of issues with it currently, such as the inability to delete attributes or not being able to add an XML node with spaces in it But I will get those fixed soon. In the meantime, feel free to check out the project over on Github.

Note: This project was tested with Python 2 and 3, wxPython 2.9, 3.0, and 4.0 using the lxml package on Windows 7, Xubuntu 16.04 and Mac OSX Sierra.

PyDev of the Week: Amir Rachum

This week we welcome Amir Rachum as our PyDev of the Week. Amir is the author / maintainer of pydocstyle and yieldfrom. Amir also write a fun little blog about Python. Let’s take a few moments to get to know Amir better!

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

I’m an Israeli software developer from the Tel Aviv area. I have a B.Sc in Software Engineering. I spent three out of the four years of my degree working in a student position to get some real-world experience, which I believe made a huge difference to this day (a positive one for my skills, less so for my grades).

On my spare time, I enjoy playing board games with friends – I have over 200 board games in my collection, so far. Continue reading PyDev of the Week: Amir Rachum

wxPython: Working with Status Bars

Most applications come with the Status Bar. The status bar is the widget along the bottom of most applications that you use every day. They give you information about what line you’re editing in a text editor or when you last saved. In wxPython, you can add a status bar to your frame by using the wx.StatusBar class. In this article, we will learn all about how to use status bars in wxPython.


No Status Bars

It’s always good to start at the beginning. So we will begin our journey by looking at some sample code that shows what a frame looks like without a status bar:

import wx
 
class MainFrame(wx.Frame):
 
    def __init__(self):
        wx.Frame.__init__(self, None, title='No Statusbars')
 
        panel = wx.Panel(self)
 
        self.Show()
 
if __name__ == '__main__':
    app = wx.App(False)
    frame = MainFrame()
    app.MainLoop()

When you run this code, you should see something like the following:

Continue reading wxPython: Working with Status Bars

PyDev of the Week: Andrew Godwin

This week we welcome Andrew Godwin (@andrewgodwin) as our PyDev of the Week! Andrew is a core developer of the popular Python web framework, Django. Andrew maintains a blog of his adventures but if you’re more interested in his code, then you’ll want to check out his Github profile. You can also check out some of his projects here. Let’s take a few moments to get to know Andrew better!

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

Well, I grew up in suburban South London, and initially started programming on my mum’s Palm IIIx in BASIC when I was bored during holidays and longer trips, along with trying out my hand at HTML at the local library. Eventually this turned into me doing Computer Science at Oxford (I almost went for physics, but changed my mind as I wanted an easier life), where I learnt a decent amount of theory that I almost never use in practice, and instead draw on my time writing open source software since I was about 15 and what it’s taught me about maintainability, software architecture and the importance of helping other people.

Hobby-wise, I probably have too many; the one I spend most time on apart from programming (both open-source and noodling away on the occasional game) is probably flying (as in, piloting light aircraft) and then traveling (as in, flying on other people’s aircraft). On the side, I also do electronics, 3D printing/making things, riding my motorbike, archery, photography, cinematography, baking, and when the season is right, snowsports. I’m also on a rough quest to visit every state and territory of the US as well as all 59 of the National Parks, so I have my work cut out.

Continue reading PyDev of the Week: Andrew Godwin

PyDev of the Week: Terry Peppers

This week we welcome Terry Peppers (@club_is_open) as our PyDev of the Week. Terry has been a very active member of the Testing in Python group and is quite active as an organizer for PyCon USA. You can get a feel for what projects interest him over on Github. Let’s take a few moments to get to know Terry better!

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

I am the Vice President of Engineering for Leapfrog Online based in Evanston, IL.

I went to Loyola University, Chicago and have a degree in Psychology, English and Sociology.

I like to run, read, cook and spend time with my family. My current guilty pleasure is the first person shooter Destiny by Bungie. I play on the PS4 and have been playing for a really long time. My best Destiny/Python crossover was playing with Python core committer, Brett Cannon!

Why did you start using Python?

I’m not a classically trained computer scientist. From the age of 11, though, I had been a bit of a dabbler in a bunch of different programming languages; I have had a lot of phases of learning/struggling Bash, Perl, PHP and even Ruby. A lot of the time I felt like those languages were programming me and I wasn’t programming with them, which was frustrating.

One of my first real software engineering tasks was doing browser automation for testing, which is really fancy way of doing screen scraping. I had been using a library in Ruby and was really struggling with its performance. Our Senior Software Engineer on staff at the time, Jason Pellerin, looked at my code and said, “I bet it would be easier if you did this in Python.” And while the learning curve was similar to other languages I knew, I finally felt like I was fully leveraging a language and its capabilities. Python really just fit my brain.

Continue reading PyDev of the Week: Terry Peppers

PyDev of the Week: Harrison Kinsley

This week’s PyDev of the Week is Harrison Kinsley. Harrison is the creator of a popular Python Youtube tutorial channel. He also maintains a website that is kind of a text version of his video tutorials here: https://pythonprogramming.net/. Let’s take a few moments to get to know Harrison better!

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

As cliche as it will sound, my biggest hobby is programming without a doubt. That said, I also enjoy running, scuba diving, and performance driving. There are various tracks (think: F1 racing) that you can take your street car to, some are actual F1 tracks. I tend to track my car (Honda S2000) once or twice a month over the weekend.

As for education, I have no formal CS or related education. I double majored in Philosophy and Criminal Justice.

I am married, live in Texas, and have a couple large dogs.

Why did you start using Python?

It’s funny, I actually disliked programming for a long time. I had wanted to learn to program since I was about 12 years old, I kept trying, but I just hated it. Too tedious, too annoying, too confusing.

Fast forward to college, by this point I had a few online businesses, but was always just paying developers to work for me. This time, my idea was to track sentiment for stocks for investing/trading. I didn’t know anyone who could do that for me, so I revisited programming yet again with this goal in mind. I tried quite a few languages again, was left pretty bummed out overall, but then a friend of mine mentioned that a programming language called Python had a natural language processing library called Natural Language Toolkit (NLTK). I quickly found their book on nltk.org/book, and it was perfect for me, since it was exactly what I wanted. I went through the book, and that’s how I learned python and begun my journey. That project still exists today as sentdex.com (sentdex = sentiment+index), and that’s also how my “Sentdex” e-name was formed.
Continue reading PyDev of the Week: Harrison Kinsley