Real Ultimate Programming

The Home for People Who Like to Flip Out and Write Code

Notes From PyATL 2011-08-11

News and Notes

Wow. Brandon is moving to Ohio in December.

It’s like he read my mind, because he’s talking about a PyGeorgia sort of event.

Beginning Python (Brandon Rhodes)

Clever way to associate county names with locations: use Inkscape to label the counties on the map and save it as SVG, then parse it with lxml.

I wonder if Brandon is really this paranoid, or if he’s exaggerating for effect.

I think he’s using an Emacs version of Solarized.

Clever Hack: when using print debugging, you can drop your value of interest into a list so you can tell the difference between strings and numbers, e.g., print [x] will give you ['123'] when x = '123' and [123] when x = 123.

Fighting in Unfamiliar Territory (Toby Ho) (sp?)

Why crack open the code to debug a third-party module?

  • Because you can!
  • The code doesn’t lie (even if it is confusing).
  • It can be faster.
  • It’s good practice (it’s harder to read code than to write it).
  • You want to be awesome and fix the bugs and submit them back.

Yet another reason to love pip: it installs the source, so it’s easy to dig into what’s going on.

squinting at Objects in Python (Brandon Rhodes)

squint is Brandon’s library for inspecting Python objects without triggering @property logic, etc. He wrote it after getting frustrated with things like ORM classes changing when he tried to inspect them.

I bet this thing was loads of fun to write. I can definitely see how it would be useful, though.

Back to flipping out…