Python Flyweights
Code:
6 comments

When I wrote Equality for Python, my example didn’t mention how the Card objects could actually be a terrific waste of memory. A commenter named versimilidude (great handle!) beat me to this post, briefly describing the Flyweight Pattern. Luckily he didn’t provide example code, so I still get to publish this post.

Continue this post

Sociable 1.0
Biz: ,
7 comments

I’ve been quiet the last week because my free time has been taken up by finishing Sociable, a plugin to the WordPress blog software. It’s the reason there are those cute little icons down below this post.

Continue this post

XmlHttpThrottleRequest
Code: , ,
No comments

Today in #luni we ranted a bit about developers. (I’m “Malaprop” in the exchange.)

Continue this post

The Best Filler Ever Written
Biz: ,
1 comment

If you’re building a website and don’t have filler text for “About” pages or product descriptions, don’t use lorem ipsum.

Continue this post

Equality for Python
Code:
4 comments


A few days ago in #chipy, the chat room for the Chicago Python Users Group, we had a chat about how Python determines equality. It’s a pretty neat and extensible technique, so I’m going to walk through how I recently used it for playing cards.

Continue this post

Django Gets Transactions
Code: , ,
8 comments

Jacob Kaplan-Moss added transaction support to the magic-removal branch of Django just a few minutes ago. It’s one of the many changes to come out of the sprint. Usage will look something like this (based on Jacob’s docs and chatting with him in #django-sprint):

Continue this post

Versioning: The Next Big Thing
Code: , , ,
7 comments

In the web development world, anyways. So, in the grand scheme of things, maybe not a huge deal to anyone else. Versioning is going to be one of the biggest problems and opportunities there is in web development, and it’s going to take us at least five years to get it right.

Continue this post

Defeating Hardware Keyloggers
Code: , ,
2 comments

Keyboards
Last week I saw a nice article on building hardware keyloggers and today I saw a response on how to defeat them.

Continue this post

Compressing Sudoku
Games:
3 comments

person solving sudoku in a book At least a few times a week I see someone playing Sudoku while commuting on the L, and it’s always annoyed me. The problem is that Sudoku is a small 9×9 grid with 10-20 numbers on it, and a book is a chunk of dead tree. How inefficient! There’s a tiny amount of very compressable data in a large, uncompressable phsyical object. I can’t do anything about the book, but I could imagine one with a grid on the back, a dry-erase marker in the spine, and two dozen puzzles per page in some kind of notation. I’m not going to start publishing specialty books, but I’d like to know what that notation will be.

Continue this post

Push cx
Life:
7 comments

My first programming language was Hypercard (probably 2.0). A slight change of pace, my second programming language was x86 assembly and I have a small warm spot in my heart for it. I keep the small warm spot deep underneath the frozen lake of frustration I have in my heart for x86 assembly. Anyways, on x86, cx is the count register, one of only four registers (well, not really at the time and not anymore, but work with me here.)

Continue this post