Monthly Archives: March 2014

A Few Notes on Python’s Built-In Container Types

I’ve been learning Python recently, as I’m planning to use it for some future projects. One of the things I’ve initially found a bit confusing is the different types of built-in containers that Python provides: Lists, Tuples, Sets and Dictionaries. So this post is just a few notes for myself on how these work and what they’re useful for. There’s nothing here that you can’t get from the excellent documentation at https://docs.python.org.jar Continue reading

Idea: BusyFlag

In one section of Peopleware, they talk about how destructive interruptions are to the state of flow, and how important uninterrupted time is for getting work done. They describe what happened at one of their client sites after they started measuring the ratio of uninterrupted hours to time spent in the office (what they call the “E-Factor”):

…there was a nearly organic phenomenon of red bandannas on dowels suddenly sprouting from the desks after a few weeks of E-Factor data collection. No one in power had ever suggested that device as an official Do Not Disturb signal; it just happened by consensus. But everyone soon learned its significance and respected it. Continue reading

Code Coverage with QUnit and Blanket.js

I’m a big fan of automated unit testing. I don’t always develop test-first, but I do always try to make sure I end up with a good set of tests for whatever code I’m writing. For JavaScript (in the browser), I’ve settled on QUnit as my unit testing framework of choice. It’s easy to use and works well.

Ideally, you’ll have tests that cover every part of the code. For some projects, it’s pretty easy to tell when this is the case. But if you find yourself writing tests for a complex piece of code that didn’t have many (or any) tests beforehand, as I did recently, then it can be good to know exactly how much of the code is being tested, and which bits still need to be exercised through tests. This is where a code coverage tool comes in. Continue reading

Idea: Smart Paste Tool

One of the first things I install whenever I find myself in front of a new Windows PC is PureText. It basically gives you a shortcut keyboard combination for “Paste Special -> Unformatted Text” which is something I find myself doing quite a lot. I hate pasting from one application into another and having all the formatting come with the text, and PureText solves that problem really easily. I now use it just about every time I paste. I think of paste as Windows-V now, instead of Ctrl-V. I felt a bit lost when I got Windows 8 at work and PureText didn’t work at first (it’s been updated now!)

idea

PureText works by modifying the contents of the clipboard before pasting. This got me thinking about how else you could manipulate the clipboard when pasting. I thought it might be useful to have a utility which allowed you to set up a list of items. Each time you paste, the next item from the list would be placed into the clipboard ready for the next paste. Instead of lists, you could also set up expressions which the tool uses to create the next item, with some useful variables available, such as the index (the number of pastes you’ve done so far). Continue reading

Time Management

I’ve read a few time management and productivity books, such as those by David Allen and Mark Forster. And there are a lot more out there I haven’t read, as well as lots of blog posts and other articles. I think these books have a lot of value and useful ideas for so-called “knowledge workers”, but I also think it’s a specific type of knowledge work that they are most useful for, and I’ve never found them to be completely applicable to the work that I do.

To-do list

Often these books contain the subtle (or not so subtle) message that theirs is the One True Way of managing your time and tasks. It’s easy to get really enthusiastic while reading these books and think that you need to throw out what you’ve been doing and implement the new system to solve all your problems! Continue reading