Thursday, December 11, 2008

Marketing to developers

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


Code Warriors: Have We Got a Challenge for You!

By now you've heard the buzz and excitement about Force.com 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 Force.com Sites Developer Challenge
—and broadcast your stellar coding skills to the world! We'll reward you with hero status on Force.com 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 Force.com Sites. First I heard of anything resembling buzz and excitement is in the email that came from Force.com.

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 salesforce.com 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
'\xff\xfe6\x003\x003\x00D\x003\x00A\x008\.....\n'

Here is how to do it

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

Thursday, November 20, 2008

eXtreme Annoyance

It is hard for me to get eXcited about eXtreme spellings. Most of these ideas aren't eXceptional or eXquisite in any eXplainable way. A lot of these eXtreme methods lack eXactness, clear eXplanations and fall apart under close eXamination. Even the Success Stories for eXtreme Programming are less than eXceptional.

Tuesday, November 18, 2008

Friday, October 24, 2008

FINALLY

Some new installments on regularexpressions. That has been one of my favorite reads on the internet for actual practical information on using scripting languages and things outside the usual enterprise application java/.NET/LAMP world that so many of us inhabit.

Glad it's back with new material!!

Friday, October 17, 2008

Opening explorer shells

I'm often in the command line on a windows box and need to open an explorer shell for a variety of reasons. You can simply type explorer . (don't forget the dot) at the prompt and a window will open that points at the current directory.

I got tired of typing that much and created a file called ex.bat that I dropped in my windows directory. You can put it anywhere in your path. Here is the contents of the batch file

@echo off
explorer .


Just copy the above, stick it in a text file and save it to c:\windows\ex.bat. Then typing ex at the command prompt will do the same as explorer .

New spot for quick updates

Having spent time writing full length articles on janitor programmer, I figured I needed a spot to just put quick updates of things I've stumbled across and figured out. Rather than write my own or install wordpress or one of a hundred other things, I figured I may as well take advantage of blogger.