Category Archives: software

Why Python programs often have this: `if __name__ == “__main__”:`

If you were wondering why Python programs often have this: `if __name__ == “__main__”:` and then a call to a function, a good explanation is here.

In short, if your program is used as input to other programs, then you want to have that snippet of code in them. If your programs are standalone, you can get by without it.

A good article: Why I Am Not a Maker. With one comment by me.

If you hang around with or are involved in some way with IT people, you will come across individuals extolling the virtues of being a “Maker”. Making things (typically software or IT systems) is seen as a virtue, in some case one of the highest virtues, and the implication is that makers are virtuous people.

A well written critique of that is here: Why I Am Not a Maker – The Atlantic. If you consider yourself  a maker or aspire to be considered one, you should read it. A key point is this:

When tech culture only celebrates creation, it risks ignoring those who teach, criticize, and take care of others.

This is true: tech culture sometimes places little or no value on other activities, such as the ones that the article mentions.

My main criticism of the article is that it has a blind spot for the middle ground. I know plenty of creative people whom I consider makers that also take care of others, teach, manage, administer…you name it. Often time the things they make are superior to those of people who devote themselves to being makers.

Being a maker is a virtuous thing, for the most part. But so is teaching, providing care, managing, cleaning, coaching and many other positive activities. Find the thing you are good at and contribute positively in your own way.  If you can make some things along the way, all the better.

Some thoughts on recently teaching myself Python

I have jumped on the Python bandwagon lately. I did because I was finding that more and more of the examples provided for integrating with APIs and for working with new technologies were often in Python. So I decided, why not? At first I tried teaching myself by way of various web sites, but I didn’t find this a satisfactory way to ramp up my skills as well as I wanted. It wasn’t until I came across this book in my local bookstore, Python in 24 Hours by Katie Cunningham and started learning from it did I find my skills increased at the level I wanted. By the time I was through it, I found I was writing good (not great) Python code at the level I was happy with. Furthermore, I felt I had a pretty good handle on the language, its features, and what it can do.

I highly recommend this book, and Python too. If you are new to programming, or are thinking of picking up a new language, read this piece: Why Python Makes A Great First Programming Language – ReadWrite.

Git 201: how to get to the next level with git


There are quite a few really good introductions to git. I’ve written about them here. Once you get past “git 101”, where do you go to learn more and be more productive with git? I’d like to recommend this article:
developerWorks: Learn the workings of Git, not just the commands. It should help you get to the next level. I particularly like the diagrams: there are alot of them, and they help you better understand the flow that can occur when you really start capitalizing on git.

How to learn Python: fast, slow and somewhere in between

As one of my areas of skill development this year, I am teaching myself Python (the programming language). I had a number of different sites offering help with it, but I have found these three the most useful, so far. I have found each of them useful, but I have spent the most time on “medium”. If you are interested in learning Python, I recommend you check these out:

Fast: Tutorial – Learn Python in 10 minutes – Stavros’ Stuff. Great as a cheatsheet or a quick intro to Python or if you used to do work with Python but haven’t done it in awhile.

Medium:the Python Tutorial from python.org. If you know other programming languages, this is a good starting point.

Slow: Learn Python the Hard Way. Good if you don’t know much about programming and want to make Python the first language you know really well.

Are you trying to learn to code? Are you finding it difficult?

It’s likely not you. As this piece argues, Learnable Programming, there are limits to the approaches that online sites have which many can get by, but some cannot. If you are in the latter group, give this piece a read. Afterwards you might think: aha! That’s why I couldn’t get it!

With technology, if you don’t understand something, don’t assume the problem lies with you. It may, but most of the time, the problem lies with the technology.

‘Notability’ is App of the Week and is free this week. You should get it.

I just started using Notability in the last few weeks on my iPad and I love it. It allows me to quickly and easily capture notes while I am interviewing clients or jotting down ideas during work. I can type in text or I can use a stylus and draw/scribble my notes and drawings. I can also take photos of things and then scribble on them. I can capture audio if I want too. There’s alot of ways to capture information.

Once I capture the info, I can either leave it on my iPad, email it to myself, or use any number of cloud services (e.g., Dropbox) to save the output. The output can be PDF, RTF or other formats.

It’s a great app, and I didn’t hesitate to pay the $2.99 for it. But now it is free, there is no reason for you not to download a copy and try it.  I bet you will love it.

For more info, check out the iPad App Store or read more about it here: ‘Notability’ Named App of the Week, Available for Free – Mac Rumors