The Mandatory “My First Year With” Post

So, about a year ago, I got a new job and dove into Python.

Prior to this, you could count on 1 hand the LOC I’d written in Python. I “knew” exactly 3 things about Python:

  • It had namespaces, because every Python person brings that up immediately in any language argument on Reddit or Hacker News
  • Significant Whitespace, aka The Whitespace Abomination, which is why I’d generally avoided it like the plague in the first place
  • Python advocates seemed like a dour, hyper-conservative bunch (technologically speaking)

I cut my teeth on the TIMTOWTDI world of Perl and then spent years in the fever swamps of PHP and Ruby; correctness and conservatism were not in my DNA.

I started learning by doing the Python Koans, which I enjoyed immensely, and then pretty much diving right into real work. 

So where am I today? Glad you asked.

First, regarding the items above:

  1. Namespaces are great and all but I simply cannot figure out why they are the first thing people start crowing about in language arguments. Maybe my time in the namespace-less world of PHP made me sensitive to the criticism (FWIW, I argued for namespaces in PHP and was pretty vocal about the use of \ as separator as a horrible idea)
  2. Significant whitespace is absolutely awful for about a week and a half, mildly annoying for about a month, and then fades into nothing at all after that. It’s really the worst thing in the world for all of 5-7 days, but really, you get over it. I’ve love insight into the coding habits of people who can’t manage to get their head (and fingers) around it.
  3. Python advocates are a dour, hyper-conservative bunch (technologically speaking).

The last point is not intended to be flame-y; I’m just re-spinning the Steve Yegge bit here. It is, nonetheless, how the Python world looks to me. There’s a noticeable lack of fun or whimsy at Planet Python. You will be hard-pressed to find a more dry Planet aggregator. (Fun is obviously not a requirement of professional software development, but compare with the general happy vibe at, say, Planet Mozilla.)

In terms of technology, oh, you know, whatever. PHP is a complete crapload, but it’s far easier to crank out web apps with PHP than Python. The amount of setup boilerplate (among other fiddly bits) is frustrating; but that’s how a generally poor language like PHP managed to work its way into the web stack. It simply is of the web, whereas Python requires a lot of work to bridge that gap.

(The counterpoint is that Python is simply a better language, in so many ways, that once I really have all the rough edges sanded down I’ll stop caring. This is probably true. It’s going to take a lot of work in 2013 to sand those edges down, both in my internal “IT” apps and our products, but I’m starting to see a coherent picture of how to do it.)

I’m still not very good at Python. I forget which namespace things live in (os? os.path? ffffuuuuuu); I forget that you have to ask if a key exists in a dict, instead of just ‘if key equals value’; I totally suck at structuring large packages; I don’t understand metaclasses. But it’s only been a year, so I’m positive about losing the remnants of my other-P-lang habits, and generally improving.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s