I think I’ve finally figured it out. It doesn’t matter that I hate Windows, because Windows hates me!
I’ve never actually wanted to use Windows, it always been a requirement for some form of employment I’ve had over the years. I’ve wanted to use the Mac OS, I’ve wanted to use Linux, but never was the time I wanted to use Windows. Always forced… Still I try…
Our latest episode goes like this: I needed to build a simple application. A perl script would request an XML feed (no, not RSS or Atom) and process it, and store the results in a Microsoft SQL database. I ended up writing almost all of the working code on Mac OS X, except for the SQL part. I normally use MySQL, but when forced to use Microsoft SQL, I use the Win32::ODBC module, which is ok, it’s not DBI, but it more or less gets the job done. We are also using XML::DOM and HTML::Template.
Problem #1: XML::DOM doesn’t work on Windows. Try to install it. ppm says it’s installed. System tells me it can’t find it. I can’t find it either. Try again. Try again. Try to delete it. System tells me it deleted it. Try to install again. Get pissed. Reboot. Try it all again. Seems to work. During that time I also read docs, contemplated rewriting code to use XML::Simple or something else, and said expletives… In the end, it worked, but took much too long.
Problem #2: Microsoft SQL doesn’t like to store a lot of text. Well, the installation/configuration I’m using doesn’t. I want to store this XML document, but I can’t make the field big enough. Again, I’m thinking in MySQL mode, since last week I knocked out code to store huge amounts of poorly-formed HTML in MySQL and never had any problems. Still, I’m informed by people that know more than I do that with Microsoft’s SQL server there are these limits to the sizes of fields and columns and tables, that seem ridiculously small for what I’m trying to do. (I’m talking less that 10,000 characters, BTW.) I finally solve this by not storing the XML itself, but a hash of the XML, a compromise…
Problem #3: This is the next problem I face, making the Win32 scheduler work as it should, or should I say, as cron works…
None of this stuff is insanely complex, and I’m sure your average Windows developer could figure it all out, but coming from where I’m coming, and doing what I’m doing, I always have problems.
My final conclusion? Windows Hates Me.