Monthly Archives: January 2013

Book Review: Python For Kids – A Playful Introduction to Programming

I was approached by a representative from No Starch Press, the publisher of Python For Kids, to review their book. They provided me with a free dead tree copy and an eBook (PDF) version. This book appears to be in direct competition with Manning’s Hello World! Computer Programming for Kids and Other Beginners by Sande. I’ll do a quick review and then you can read the more detailed review after the jump if you’re still interested.

Quick Review

  • Why I picked it up: Primarily because I asked by the publisher to read it. However, I find these extreme beginner books interesting in their own right. I just didn’t want to spend my own money on it. It’s also a Python 3 book!
  • Why I finished it: Actually, I didn’t finish it. The book is quite good, but it’s a beginner book and I ended up skimming it after I read about halfway through. But this is a well written book with an engaging writing style.
  • I’d give it to: I would give this book to someone with kids in high school who are interested in programming in general or Python specifically.

Continue reading Book Review: Python For Kids – A Playful Introduction to Programming

How to Get a List of Class Attributes in Python

The other day, I was trying to figure out if there was an easy way to grab a class’s defined attributes (AKA “instance variables”). The reason was that we were using the attributes we created to match up with the fields in a file we parse. So basically we read a file line-by-line and each line can be split into 150+ pieces that need to be mapped to the fields we create in the class. The catch is that we recently added more fields to the class and there’s a check in the code that is hard-coded with the number of fields that should be in the file. Thus, when I added more fields, it broke the check. I hope that all made sense. Now you know the background, so we can move on. I found three different ways to accomplish this, so we’ll go from the most complex to the simplest. Continue reading How to Get a List of Class Attributes in Python

Top Ten Articles of 2012

I forgot to get this article done for the first of the year as I have in the past. I hope you find some interesting reading material from this tardy post. I also hope my readers have had wonderful holidays and are looking forward to the upcoming year!

Note: I use Google Analytics to help me figure out which articles are doing well and get lots of other interesting information. That is where this information comes from.

  1. Python 101: How to Open a File or Program (32,631 page views)
  2. How to Send Email with Python (25,573 page views)
  3. Python: Parsing XML with minidom (23,813 page views)
  4. A Simple Step-by-Step Reportlab Tutorial (22,260 page views)
  5. Python 101: An Intro to logging (16,171 page views)
  6. Python and Microsoft Office – Using PyWin32 (14,084 page views)
  7. A cx_Freeze Tutorial – Build a Binary Series! (12,724 page views)
  8. Python: A Simple Step-by-Step SQLite Tutorial (11,834 page views)
  9. Another Step-by-Step SqlAlchemy Tutorial (part 1 of 2) (10,207 page views)
  10. wxPython: wx.ListCtrl Tips and Tricks (10,142 page views)

I always find it interesting how the articles from the past still get so many hits. Seven of these articles are from 2010, one is from 2011 and only two are from 2012. Hopefully the articles I write this year will prove as enduring as the ones from years past. As always, I welcome suggestions on what to write about or Python books to review. I look forward to hearing from you this year!

Top Ten Lists of Yore