Thursday, December 11, 2008

Marketing to developers

I just got a piece of marketing schlock in my inbox today from

Code Warriors: Have We Got a Challenge for You!

By now you've heard the buzz and excitement about Sites, and may even have attended our recent Sites Developer Preview Webinar. Now be among the first to get hands-on with this ground-breaking technology:

Enter the Sites Developer Challenge
—and broadcast your stellar coding skills to the world! We'll reward you with hero status on developer Web sites and blogs, plus a terrific prize.

<and it goes on and on and on....>

Stuff like this drives me, and most good developers I know, crazy.

Look, the majority of developers I know are not warriors. They couldn't fight their way out of a wet paper bag. Like King Arthur's nights, a vicious rabbit could decimate most of them.

There is no buzz and excitement from anybody I personally know about Sites. First I heard of anything resembling buzz and excitement is in the email that came from

Most people with stellar coding skills are working on operating system kernels, 3d rendering images, games, bio informatics, genetic algorithms, language compilers or interpreters, etc. They most certainly aren't working on web apps that mainly consist of gluing API calls together. Product catalogs and surveys don't exactly stretch the grey matter.

I'm guessing the people that buy into this stuff are probably the development managers that usually receive this stuff and, well, since might be part of some strategic direction, the developers get this email forwarded to them and they are "encouraged" to enter. I got this in my inbox because I work at a small company and, for good or ill, I get to deal with most of this stuff directly. The only reason I even opened it was because I thought it might make good blog fodder. Most of this kind of stuff is insulting to the intelligence.

Code Warrior. Sheesh. Now where did I leave my swords...

Tuesday, December 9, 2008

working with utf16 in python

I got a file from a client that was exported from SQL Server and was encoded as utf16. I needed to do some work on it. I had to google around a bit to find some help on handling the gobble-de-gook that I was seeing

>>> f = open("f:\\contact.txt","r")
>>> l = f.readline()
>>> l

Here is how to do it

>>> import codecs
>>> f ="f:\\contact.txt", "r", "utf16")
>>> l = f.readline()
>>> l
u'633D3A84-3870-4A93-9755-000215260850,8568,NULL,Scooby,Shaggy,NULL,,NULL,,1902-06-01 00:00:00.000,NULL\r\n'