So I’m still getting past the neophyte stage with Python. The good news is that every time I need to apply some programming principle to something I’m doing in Python, it’s really very easy. Heck, I practically fell accidentally into OO programming on one of my Python projects, and everything else has been a dream…
Category: Technology
Regular Expressions with Python’s “re” Module
If you’re moving over from PHP, Perl, Ruby or something similar, don’t be intimidated by all the Python regular expression documentation. It doesn’t really have to be complicated or even all that much different from Perl (though it can be, if you want to go there). Here’s a search and replace I ripped out of…
Using TRUNCATE to empty a PostgreSQL database
This is not something that’s any big hack or secret, but emptying a database of all data without dropping the structure along with it is one of those tasks that I do just often enough in my development work to be annoying. If you ask me, there should just be a big ol’ “EMPTY” statement…
Can Technology Kill the NAR?
The NAR is the National Association of Realtors. They’re the main lobbying interest for pavement-pounding brick-and-mortar real estate agents. Of course, this is problematic for web-based real estate outfits like Redfin, because the NAR has the required influence to get legislation passed that can make life as a web-based real estate sales organization difficult, if…
Freebase: Your database is ready!
This is going to be really frickin’ cool. There’s just no other way to put it. Maybe I’m a little too much of a data geek, because I can’t seem to sit still since receiving my email letting me know that Freebase is now in alpha, and the account I requested months ago can now…
A quick overview of common grammatical mistakes
Part of what I do for a living is write. I’ve co-authored a book, written a rather large number of technical articles, and I’ve also done professional editing, tech review, and manuscript review for magazines, newspapers, and publishing houses. Also, my wife is an English teacher. In short, though I make my fair share of…
Thumbs up for Synergy
I have heard a couple of people mention this tool on IRC and mailing lists, but I didn’t ever make time to try it myself for some reason. That is, until my buddy and coworker Steve gave me a quick demo of its functionality, and told me that it was brainless to install and get…
The Future of IT and IT Policy
For those who didn’t already know, I work in academia. I work in the Computer Science Dept. at Princeton University. Every week I attend the “IT Policy Lunch”, which is a gathering of anyone on campus who is concerned with IT Policy. It’s hosted by Ed Felten, who heads up research into IT Policy. You…
Not feelin’ the Joost
Joost is getting ready to launch out of beta and unleash themselves unto the masses. I participated in the beta, and I have to say that there are some good things that I think will result from Joost, but I think ultimately Joost will fall from favor within 12 months from their public launch. First,…
Cron != Shell
I’m as guilty as anyone of treating cron as if it’s “just a shell”, and it finally bit me today. I had a quick-n-dirty Postgres backup command that worked wonderfully from the command line: /usr/local/postgres/bin/pg_dumpall -U pgadmin | gzip -9 > \ /usr/local/db/backups/pgsql/pgdump.`/bin/date +”%Y%m%d-%H%M%S”`.gz But when I put this into my crontab, I started getting…