tadhg.com
tadhg.com
 

Posts concerning coding

2012 Goals

11:47 01 Jan 2012

I’m deliberately giving myself fewer of these this year, partly because I particularly don’t want to start the year feeling as if I’m already behind, so I’m trying to make the first quarter, at least, one in which I don’t have a pile of self-imposed tasks. So, this year, a shorter list of goals.
[more...]

Permalink     Comment     [, , , , , , , ]    

2011 Goals Review

13:41 25 Dec 2011

I feel as if I did worse than usual on my goals for 2011, but that could be due to getting a bunch of them done early, with not many coming in the second half of the year.
[more...]

Permalink     Comment     [, , , , , , , , , ]    

Steve Jobs

23:47 09 Oct 2011

I wasn’t a big Steve Jobs fan; despite my working almost exclusively on Mac hardware for the last several years, I disagreed strongly with the direction I thought he was moving computing in. I was surprised to find myself feeling very sad at the news of his passing.

I’m not entirely sure what drove the extent of that sadness.
[more...]

Permalink     Comment     [, , , , , , , , , ]    

Telehack Interview

23:54 16 Jun 2011

Most of you who need to know about Telehack doubtless already do, but you might have missed this interesting interview with its author by Andy Baio.

Permalink     Comment     [, , , , ]    

Welcome to the Future Market II

23:18 25 Apr 2011

The year is 2011, and sophisticated AIs carefully watch for arbitrage opportunities, tracking/correlating/analyzing vast amounts of data at split-second speed to keep ahead of their competitors even in comparatively small arenas.

That, or overly simplistic scripting that seemed clever when it was written fails to take certain conditions into account, leading to the $23,698,655.93 (& $3.99 shipping) book.

Permalink     1 Comment     [, , , , ]    

Welcome to the Future Market

21:58 18 Mar 2011

The year is 2011, and sophisticated AIs carefully watch trends and track/correlate/analyze vast amounts of data to inform sophisticated maneuvers in the global markets.

Or, well, maybe a bunch of dodgy scripts are doing clumsy sentiment analysis on various volatile and imprecise social networks and rumormongering news services, and they can’t tell the difference between Anne Hathaway and Berkshire Hathaway.

Permalink     2 Comments     [, , , , ]    

A Historical Comparison of IE Versions

23:35 17 Mar 2011. Updated: 00:36 18 Mar 2011

I’ve been struggling all week with a JavaScript issue that’s either caused or uncovered by Internet Explorer 9, and while this video has nothing to say on that front, it’s still fascinating to me:

Permalink     Comment     [, , , ]    

Quick & Dirty Book Info Lookup

21:57 06 Mar 2011

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…
[more...]

Permalink     1 Comment     [, , , , , ]    

WordPress 3.0.5 Upgrade

22:07 20 Feb 2011

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.

Permalink     Comment     [, , , , , ]    

sfmagic.org: Stepping Away

22:48 10 Feb 2011

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.
[more...]

Permalink     Comment     [, , , , ]    

Fun with pandoc, Vim, and email

23:52 21 Jan 2011. Updated: 01:35 22 Jan 2011

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.
[more...]

Permalink     1 Comment     [, , , , , , , , , ]    

2011 Goals

04:02 02 Jan 2011

My goals for 2011.
[more...]

Permalink     2 Comments     [, , , , , , , , ]    

2010 Goals Review

11:51 31 Dec 2010

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.
[more...]

Permalink     Comment     [, , , , , , , , , , , ]    

Vim Golf

17:59 28 Dec 2010

That’s right, a competition to do edits in Vim in a few keystrokes as possible. I haven’t even installed it yet and I’m sure it’ll eat large chunks of my time.

Permalink     3 Comments     [, , , ]    

Friday Game Analysis: Pac-Man

22:35 03 Dec 2010

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”.

Permalink     Comment     [, , ]    

Google Refine 2.0

21:04 11 Nov 2010

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.
[more...]

Permalink     2 Comments     [, , , , ]    

Minor Achievements

20:36 18 Oct 2010

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.
[more...]

Permalink     1 Comment     [, , , , , , , , , ]    

Conditionally Adding dict Keys in Python

20:18 12 Oct 2010. Updated: 03:35 30 Dec 2010

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:

if condition:
    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.
[more...]

Permalink     Comment     [, ]    

Some Tidbits from my .vimrc

21:44 07 Oct 2010. Updated: 03:54 30 Dec 2010

These aren’t anything particularly major, just some things I’ve found to improve my editing experience.
[more...]

Permalink     2 Comments     [, , , , ]    

Adjusting Keyboard Shortcuts

23:17 27 Sep 2010

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.
[more...]

Permalink     3 Comments     [, , , , ]    

MacVim 7.3

23:09 20 Sep 2010

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:

  • colorcolumn
  • 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.

Permalink     Comment     [, , , , ]    

Metaweb Acquired by Google

23:57 16 Jul 2010. Updated: 01:20 17 Jul 2010

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.
[more...]

Permalink     Comment     [, , , , , , ]    

Unit Testing as Game

23:23 15 Jul 2010

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.

Permalink     Comment     [, , , , ]