I’m still trying to cut down on the number of books I have in my apartment. That still feels wrong, but the shift to ebooks is making it a little easier. Now I’m getting rid of books that aren’t big favorites of mine, weren’t given to me as gifts, and aren’t in the poorly-defined category of “classics I want to keep”.
Because I’m a pack rat and a data geek, I have a hard time getting rid of books if I haven’t recorded the metadata about them I want to record. Unfortunately, I’m not always diligent about noting that info as I read the books, so the majority of the books I wanted to give away or sell were books where I hadn’t done so—and I really didn’t want to go through them one by one.
Modern technology to the rescue…
I upgraded this blog today, the first time I’ve done that in over a year. Everything looks okay.
I’ve become slightly less paranoid about it; I still back everything up first, but I no longer preview the upgrade in my development environment, instead being prepared to restore from backups if something goes wrong. This might not be wise, but I’ve been lulled by the smooth upgrades the past few times.
I hate giving up on projects. Especially projects that I’ve spent a lot of time on, that have had some success, and that have come close to being finished without making it the final, crucial steps. I really wanted to get a new version of sfmagic.org written, in Python, with good web development practices from top to bottom, but it’s far past time to let that go.
I’ve mentioned pandoc once before, and it’s again proved rather useful. I’ve been looking for more ways to use it, as I love its core principle (although I naturally wish that it focused on reStructuredText rather than Markdown) of being a comprehensive text format converter. It might at one point be the answer for getting from reST to PDF—something that the current reST tools don’t help me with because I insist on using Unicode, and XeTeX isn’t yet supported. But today pandoc helped with a different task: going from reST to plain text.
I once again had eight goals for 2010, and it’s not too likely that any more of them will be accomplished before the end of the year.
Chad Birch has written a fantastic dive into some of the guts of Pac-Man’s ghost behavior mechanics, and found it highly enjoyable and illuminating, despite not having played Pac-Man in years. Definitely worth reading. I’d previously read Susan Lammers’ interview with Toru Iwatani, which Birch refers to in his post and which I’m happy to see is available online.
If that’s not enough depth about Pac-Man for you, there’s also an entire “dossier”.
This post is actually aimed more at my less technical readers than my programmer friends.
Google Refine, formerly Freebase Gridworks, is a data cleanup and transformation tool. These days, though, it seems as if everyone has to work with messy data. Lists of addresses, employment rosters, film collections, sports stats, and/or any amount of public material. Such data is rarely clean, and that’s precisely what makes a tool like Google Refine so useful.
Sometimes it’s the little things that make life better, the small victories in ongoing daily battles.
I recently did an overhead squat at 185 pounds (or about 84 kilos, or 13 stone 3); I weigh a little under 180 (that day, 178 pounds) and so that was a bodyweight overhead squat. It actually represents two achievements, because in order to get the bar into the overhead position, I had to push jerk it from behind my neck to locked out above my head, which counts as my best push jerk ever, albeit an unorthodox one. From the overhead locked out position, it’s down into a deep squat and back up; the harder part for me was going down, as once I was at the bottom it wasn’t hard to keep my balance coming back up.
I frequently run across the need to add key/value pairs to a dict subject to some condition. The “traditional” version of that pattern looks something like this:
my_dict[key] = value
Because of my stylistic preferences, I don’t like that, and want to do this:
my_dict[key] = value if condition
That doesn’t work, though, because then key will be set to None in the dict, which is an unwanted side effect.
These aren’t anything particularly major, just some things I’ve found to improve my editing experience.
This post is about keyboard shortcuts, remappings, application switching, and a little bit of workflow, primarily in the context of OS X and Vim, so it might not be of interest to all readers.
I’ve been slow in upgrading to MacVim 7.3, which came out about a month ago. I’m happy with it, but there are only a couple of features that really matter to me so far:
- Python 2.6 support.
colorcolumn lets you specify columns that will have a different background color—this is primarily useful for source code where you want to stick to line length limits. This is one of the few features I was still missing from jEdit, although I think jEdit’s solution was nicer: in jEdit the visual line was thin and went between the columns, so between columns e.g. 79 and 80 you could have a line; in Vim 7.3 either column 79 or 80 would have a “line”, i.e. a different background color. Still better than the kludge I use now, though.
Python 2.6 support is nice due to the number of Python scripts I’ve written for Vim, which used to have to be compatible with Python 2.3. The main things I really like here are the ability to use .format on strings, conditional expressions, built-in set support, and generator expressions. That list is inspiring me to edit some of my old scripts right now.
The official announcements are out, and my former employer Metaweb no longer exists. I’m happy that the ideas, and most of the people, have found a home, but it feels strange that the company is no longer a distinct entity. In many ways it makes a lot of sense for Google to end up owning them, and I hope the former-Metaweb-now-Google employees prosper.
One of the great things about unit testing is that you can get into a game-like mode where you make incremental but measurable progress—“flow”, basically—but what if it’s just not similar enough to a game for you?
Install Unit Testing Achievements, a Python package that works with nose, unittest, and Django. Somewhat crazy, definitely hilarious. Some of the achievements themselves are excellent, such as My God, It’s Full of Dots: The suite has at least 2,001 passing tests.
Sadly not yet working is another one I like, Heisenbug: Make a passing suite fail without changing anything.
As a geek of my generation, I cannot help but find an eight-bit map of San Francisco (there are maps of other cities too) a wonderful thing. It became even cooler when I found out it was programmed in Python.
I got an iPad for work on Friday, and have been playing around with it. I would not have bought one for myself, and have grave misgivings about the device, primarily due to its highly proprietary, locked-down, walled-garden approach.
That being said, I think it’s an extremely slick, well-designed device, and may represent the first steps towards a new phase in accessing computer and/or internet artifacts.
After a highly enjoyable, productive, and extended period, it’s time for me to return to the world of paid work.
I’m quite happy with the things I’ve done during my time off. Many of them are important only to me, but then, it’s been my time off.
Permalink 3 Comments
, document formats
, text editing
This post could be summarized as “regular expressions are a lot faster than naive for loops”.
I’ve been working on improving the script I use for live wordcount in Vim, partly for performance and partly so that I can package it up as a plugin and share it with other people. Along the way I’ve improved the speed of the script rather significantly, and will go through the key part of that change here.
I’m going to compare seven different ways in Python to make one list out of several lists containing different numbers of elements, something that strikes me as a common but not necessarily everyday operation.
The philosophy of Python is that generally there should be one obvious and reasonable way to do things. I really like this philosophy—except when the Python way isn’t the way I prefer, of course.