Watch out for #python dict-based string interpolation examples which look like this:

'Hello, %(name)s' % {'name': 'Otter'}

That s after the brackets isn’t pluralising one adorable aquatic mammal into a whole bunch of them, it’s actually part of the interpolation placeholder — the equivalent of

'Hello, %s' % 'Otter'

Note also that for some reason, python lets you put spaces between the closing bracket and the type signifying character. This can cause extremely weird bugs when the string being interpolated is also being translated. For example:

_('%(customer) shared a thing') % {'customer': 'Mr. Bean'}

If not translated, this will produce this confusing but fairly easy to debug output

'Mr. Beanhared a thing'

But if 'shared' is translated into a word beginning with, for example, d, you’ll just get an exception like TypeError: A float is required

There doesn’t seem to be a decent minimal, standalone websockets server for #python, and #golang doesn’t have a simple way of accessing I2C devices. Looks like I might finally have to jump on the nodejs bandwagon for my #raspberrypi schenanigans.

If you’re not sure which address a particular device is at, run sudo i2cdetect before and after plugging it in and see which address changed

If there are libraries available for easily talking to the device you’re using, make use of them. Do this first even if you want to learn about the lower level communications too to ensure that your device is working correctly.

Get to know i2cdump, i2cset and i2cget, they’re super useful for poking around in I2C devices

Spent ~3 hrs with the office arduino+ethernet shield and my old favourite pyo and I’ve got a light/flex controlled synthesiser over OSC. I dread to think how many weeks it would have taken me to implement this on a PIC.

Building a document templating and styling system in #python. Been meaning to do this for a long time, finally the awkwardness of using indesign for my contracts, invoices and estimates has become too stupid