contact me
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. —Robert A. Heinlein
-
Wed Dec 10 8:30 am, 2008
A smallish simple version of VNC that's optimized to run over slower connections, I've used with TightVNC for years. On my mac I use the humorously named Chicken of the VNC for a client client. (I don't even know if there's a better one for mac, I guess in this case I'm just a sucker for a silly name.) Set up for Xubuntu is a snap, do 'sudo apt-get install tightvncserver', then in the '.vnc' directory in your user home, replace the content of the xstartup file with
#!/bin/sh
unset SESSION_MANAGER
exec startxfce4
-
Sun Dec 7 11:21 pm, 2008
I had a few days off, which was pretty amazing. Although I was sick much of it (great timing!). But I did get to leisurely do SitePoke which is an old monitoring script I rewrote and created a front end for in Django. While I've got a decent amount of Django experience under my belt, it was on a long term project, so doing something small in a couple days was actually pretty fulfilling -- and reminds me that yes, as a framework, Django does kick some ass. In fact, I think I spent longer trying to get xml structured for some pretty flash graphics than the rest of it. So, the site's open if you want to give it a try, given any more time I'll add some functionality to it, particularly the difflib data I'm doing on returned pages (how much has a page changed, and what has changed over the last few pokes, etc.). Oh, and I did the whole thing on my Eeepc ;)
-
MySQL To PostgreSQL For Django
Mon Nov 17 6:45 pm, 2008
The idea was that you'd use MySQL for speed, PostgreSQL for features, although with PostgreSQL 8 that seems to have changed, and MySQL has caught up a little on features. But with day to day use, I gotta say, I prefer PostgreSQL. Not that I don't love unexpected MySQL table locks. Anyway, didn't your mother ever tell you not to walk into the middle of a database fight? The point is I'm converting part of an app to Django and the previous was stored in MySQL. I could of course write something that iterates over the data and puts it in place in a new postgres home. But that's time consuming. So, take the the MySQL dump, convert it to something postgres understands, once there use Django's inspectdb helper to generate the basics for the model, then work on whatever scrubbing and altering need to be done, cuz that's so much easier once you've got Django on hand to work on the data.
-
Sat Oct 25 11:48 pm, 2008
It seems somewhat isolating in the Python culture to say you still like anything about PHP. PHP is the table at the wedding where everyone the family doesn't like has to sit, quietly ignored, perhaps scoffed at behind closed doors. I do think Python is a vastly better designed and usable language -- I'm not arguing about that. I'd probably say PHP isn't so much a language as a series of tools and procedures. In technology there are waves of hip that seem to take hold, and folks often forget about the day-to-day, utilitarian, I-have-to-work-with-legacy reality -- code archaeology. Far as I'm concerned, technology is about getting things done and to work with what you have at hand, I don't care if it's a bag of chopsticks and a hot glue gun, of course I have preferences. It's the end result that really matters. I know that aesthetic is an important engineering criteria, but I also feel like sometimes engineers act like modernist architects, striving to build theoretically perfect buildings no one wants to live in (except for social cred). Originally this post was called 'Why I Don't Hate PHP Yet', but today's decision by PHP to use backslashes for seperating namespaces, is, well, deeply terrible. Could you just change concatentation to "+" and then use "."? How hard? Probably hard since this concatentation is loose and overused in PHP. Make a clean break in PHP 6? Fix it? Buck up a little? Why not "::"? I can't bring myself to type an example in the new backslash manner even as an example to see how awful it will appear. Smells like MS. It will only end in tears.
-
Mon Sep 8 5:30 pm, 2008
Djangocon was a lot of fun. Held at building 40 in the Googleplex this past weekend, they limited the con to 200 people. And I think the majority of those 200 people each made the following joke at some point:
* a PHP scaling joke
* a Zope usability joke
* how long it took Django to get to 1.0
The few who did not make these obligatory jokes were forced to rewrite Lawrence Journal World in Extreme Programming Perl and are no longer allowed to wear t-shirts with the Pownce logo.
There were a couple fantastic talks (Flickr's Cal Henderson for instance), a few decent ones, some really well done lightning talks, and what felt like several (one explicit) "I want a pony" sessions where everyone asked for what they'd like in Django. Team Onion's requests were for a real object cache with proper validation/invalidation, singleton, a killer set of debug tools. Most of which we and others are already working on. Perhaps the most popular overall request was for multi-database support.
Everyone was blown away by GeoDjango, which does a fairly amazing and complex set of geo-calculation, utils, and packaging of disparate geo libraries into a really usable system.
I got to meet all the folks I'd seen committing, and arguing about code, and a few more who were all really nice and excited about Python and Django. The level of intelligence in the room was overwhelming.
I don't know if Django is still flying under the radar, I mean Google is using it, but it still feels like it's flying under the radar -- and that is a good thing I think. It's a relatively small group of folks, and there wasn't much of the kind of discussion you would've seen at a Linuxcon in the late 90's when suddenly it was 'discovered' and hence, 'monetized' by companies and labeled 'enterprise'. While we would like a high performance Django group, it's not what you'd associate with business 'enterprise' software. I'm all for keeping the enthusiast element as long as possible before business concerns move in. And I wonder if part of that security about being community driven rather than business driven is actually due to Google, at least this last year, sheltering Django from the less desirable elements or circling sharks. But, also, Django made itself into a foundation in June, and the core is under a simple BSD license, so once again they're being super smart.
As an aside, I also realized quite demonstrably -- and I really need to put pretty radius graphics up on Google maps around my continually updated geolocation to visualize this -- that I am the only person who has visited Mountain View or San Francisco who does not own an iPhone. Do you know what it's like being surrounded by a couple hundred people all on iPhones? It's like watching kids gorge themselves on candy at Halloween. How did they let me in? Did I sneak by the iPhone checkpoint somehow? Shrug. "Think Different". -
Mon Jul 21 8:30 am, 2008
Not a day goes buy I don't hear some-language-guy try and bitchslap some-other-language-guy. These slapdowns can be entertaining and informative, or just become a geek piss fest (see the comments on this post) often ending in left-field recommendations to just use Erlang or Lisp. You can tell the level of anxiety over a vaguely defined problem by how many people suggest things like Erlang in response. Ruby, in particular, has been getting the slap a lot in the last year, taking the crown away from PHP (which got bitchslapped for scaling and security). It doesn't mean these bitchslaps are 100% accurate, although often they're deserved -- in part because the practitioners of the language show hubris and exaggerate performance ("my language/framework is perfect and can do anything better than X"). The guy I really feel for though, is Alex Payne, who works for Twitter, and got caught in a situation that is Ruby-independent: victim of one's own success, the crush of huge amounts of traffic on a system designed for other things. Now, he should have had a plan B ready, IMHO, or worked more to anticipate (a little pessimism goes a long way), but it's a situation a lot of developers fall into -- you select a framework because it's easy to use, or gets the job done within a certain time frame, and then conditions change and you have to adapt. Enthusiasm for a language/framework can be blinding to actual long term plans and needs. Here's Alex talking about it, and here's a recent piece on Twitters problems.
-
Thou Shall Not Monkey Patch OR Duck Punch
Fri Jul 18 9:00 am, 2008
The older I get the less I want to re-write code, particularly other peoples' code, whereas I used to do this with zeal. I'm certainly not going to OCD on retabbing it, and I'm even less inclined to monkey patch something core for sake of cleverness and impatience. I don't want to prove anything, I just want to make code that works in the most stable, least interesting ("interesting" code tends to be a pain in the ass but that's another post), most readable manner I can. I don't want to create my own language, and I don't want to redo yours, especially at the highest, least visible level. Here are some excellent comments on monkeypatching from one of my favorite sites, CodingHorror (and yes I did just CamelCase your site name).
Application-level plugging ala Rails is good. Language-level plugging in Gems, no matter how well-documented, is usually bad.
I have enough trouble debugging my own crappy code without trying to debug someone elses if they've changed some of the fundamentals of the language!
That "monkey-patching" is a more perjorative term to Pythonistas than to Rubyists has a lot to do with the culture surrounding the languages, obviously. But, I've noticed an interesting coincidence.
Black-magic metaprogramming in Python produces code with lots of __dict__'s and __class__'s, dunders and quoted identifiers in it. Its appearance just screams "I am rewiring my microwave and voiding the warranty," and is just generally quite visually distinct.
On the other hand, Ruby metaprogramming code just looks like any other Ruby code, unless you're paying particular attention to what methods it's calling. It doesn't "look" out of the ordinary.
I wouldn't be surprised if one didn't have something to do with the other :)
most monkeypatching done is made out of sheer demonstration that they know metaprogramming (especially for ruby). i find it less smart to instantly resolve to monkeypatching the language itself rather than extending it within the application or its library.
-
Mon Jun 16 7:00 pm, 2008
Xmlwriter has made my life slightly easier -- but I'm still looking for that perfect xml toolset, both in python and php -- one of the problems is the infinite variations on namespaces, custom tags, and lack of commonly used attributes. I've seen feeds by people who have clearly just bought a book on how to do xml (peachpit press or something) and I just want to find them and grab them and say "just because you can make an xsd it doesn't necessarily mean you should". For web work more often than not the standard commonly used xmlns:dc or yahoo media xmlns:media really does the trick. And in using it, you're making my life easier. Creating tons of subclasses to deal with how cool you think your own idea of what RSS should be, mostly, just a pain in the ass.