Archive for the 'Programming' Category

The Robustness Principal and internal APIs

Friday, January 15th, 2010

RFC 761 section 1.2.2.

2.10. Robustness Principle
TCP implementations should follow a general principle of robustness:
be conservative in what you do, be liberal in what you accept from
others.

RFC 1122 elaborates with section 1.2.2.:

1.2.2 Robustness Principle
At every layer of the [...]

Python and libyahoo2, take 2

Monday, June 1st, 2009

Last October I worked on a libyahoo2 binding using Pyrex and got it far enough along to discover the version of libyahoo2 I was using couldn’t log into YIM.
Several Ubuntu updates later I noticed libyahoo2 had been upgraded and, sure enough, this version worked.
I updated the Git repository mentioned in that post but it is [...]

Ubuntu 9.04 and python-virtualenv

Sunday, May 31st, 2009

I recently upgraded a bunch of physical and virtual machines from various Ubuntu v.older version to Ubuntu 9.04. Naturally, this broke my Python development environment since Python was upgraded from 2.5 to 2.6. I had instructed easy_install to put things into /usr/local.
The upgrades from Ubuntu v.older to 9.04 went quite smoothly on [...]

Singleshot and Git and first steps

Wednesday, March 4th, 2009

Singleshot is the photo album software I use to host photos.xythian.com. The last release was .. rather a while ago though I have been making minor enhancements and bug fixes since then for my own use (including flash video support which extracts thumbnails using mplayer and embeds flowplayer to play) though there’s no video [...]

Pyrex and libyahoo2 (or not)

Monday, October 27th, 2008

I had something I wanted to try in Python running against Yahoo! Messenger. The obvious choice of library for talking to Yahoo! Messenger was libyahoo2.   I could not find a Python binding for it, so I started sketching one together with SWIG.  The first step is creating a bunch of empty callbacks. The [...]

It’s All Text, Firefox extension

Sunday, December 9th, 2007

It’s All Text! is a pretty handy Firefox extension. It lets you set up an external editor and puts a little ‘edit’ button in the corner of every textarea that pops open an external editor of your choosing. Then it watches the file the external editor is editing and refreshes the textarea whenever [...]

python-cdb 0.32 (-5.2ubuntu2) with Python 2.5 causes double-free corruption crash on dealloc

Wednesday, October 24th, 2007

I’ve recently started moving my linux box to a new x86_64 machine running Ubuntu 7.10. I searched for references to this bug but didn’t find anything with Google or launchpad, so I wanted to make a note of it so future victims can see what is going on and to remind me to [...]

Flex, [Java|Action]Script

Monday, September 17th, 2007

I’ve been playing with Adobe Flex which I’ll probably have something to say about soon.
Flex uses ActionScript which bears a remarkable similarity to JavaScript. It’s not quite the same but it’s close enough that I haven’t stumbled too badly with it working from JavaScript knowledge.  As with any "new" language the learning curve isn’t the [...]

Tools and libraries

Friday, July 13th, 2007

A tool and a library I’ve been using or at least trying out:

Launchy
Free, open-source Windows app that indexes Program Files and any other directories you tell it to. Then alt-space pops up a command line box and it autocompletes as you type. I installed it a while ago and meant to mention [...]

wx.lib.iewin and NewWindow3

Thursday, March 22nd, 2007

Suppose your wxPython app is is using an embedded Internet Explorer window to display HTML. You want links clicked in that window to open the user’s default browser rather than following the link within the embedded Internet Explorer.
The obvious solution is to hook OnBeforeNavigate2 like so:

self.Bind(iewin.EVT_BeforeNavigate2, [...]

live data

Tuesday, March 20th, 2007

The problem with working on a tool like a feed reader with live data is: As soon as the reader is good enough to use it is much too easy to get distracted reading feeds and forget to get back to work on the reader.

Readshot

Sunday, March 18th, 2007

Ongoing small irritations finally piled high enough to push me to evolve my feed reader further. I finally created a category for the RSS aggregator-related posts: Readshot.
A brief history of this project:

January 2005 — A proof-of-concept toy that used an IMAP store and copied posts from a single RSS feed to an IMAP [...]

SOn markers and Singleshot

Wednesday, March 14th, 2007

I posted a photo to photos.xythian.com.
It didn’t work. Some digging indicated that Singleshot’s JPEG height/width detection was failing on the new JPEG.
Singleshot’s JPEG header parsing code was only looking for a SOF0 marker and thus didn’t work on progressive JPEGs (which used SOF2). This is why it’s important to read the [...]

On the importance of encoding

Tuesday, January 30th, 2007

I’m converting my RSS aggregator to use PostgreSQL as its back-end instead of SQLite.  It has served me well for quite a while but it’s time to move on from SQLite so I can add some features such as a feed management UI and an IMAP server.
I’m working on an IMAP server for my [...]

Log analysis with Python, SQLite, and matplotlib

Tuesday, July 4th, 2006

I recently spent a day or so writing scripts to grovel over a service’s log files looking for information. I had a couple ideas about what I wanted to learn, but I wanted to make it easy to experiment a little. Not so easy I’d end up with results that weren’t easily reproducable, [...]

Automating a little bit

Sunday, June 18th, 2006

I’ve been selling some books on Amazon.com Marketplace. The listings are offered as a link from the product page for the book. People that follow that link seem to be selecting purely on price, so I don’t bother listing when the existing lowest price is too low for me to [...]

VMWare

Thursday, June 15th, 2006

The key thing that makes VMWare great for me is being able to treat an entire “machine” — operating system, software, everything — as a file. It’s nice being able to run more than one of them at a time though it would be faster if I had one of the newer chips with [...]

Embedding Lua 5.1 in Asterisk 1.2.7.1

Saturday, April 29th, 2006

I’m sure I had something in mind when I started this and no doubt it’ll come to me once I fill out some callbacks so I can do more from the lua side than call “ast_log”. I still need to figure out a reasonable way to allow the lua side of things access to [...]

reading feeds

Saturday, March 18th, 2006

It’s been about two years since I started (again, but this time for real) reading articles regularly via feeds. I’ve been using the web to read stuff for much longer than that, of course, but there was a limit on how many sites I’d remember to look at. I’d played with RSS [...]

Being a software developer

Wednesday, March 15th, 2006

I’m a software developer. There are tools I like and have successfully built applications using but I also enjoy learning new tools and languages.
My goal is to use the best tool for the job. As I said before, most of the time the “best tool” is not a choice based entirely [...]