2018-07-28

The longest hottest summer



I live just behind the sun scorched field you see on the picture, the field  have always been green
summertime. Stockholm summers are cool and rainy, this summer just a few drops of water temperatures
around 30 centigrades daytime and +20 degrees nighttime. We are not used to weather conditions like
this, our homes have central heating not AC.
The summer 2018 is the hottest and driest ever in Sweden.

2018-07-08

I am a Pythonist

I am a pythonist
I know what I want
But I don’t know how to get it (yet)
Lasse Rotten

Recently I done some Python coding, I did not foresee that coming. And Python 2.7 not version 3. I
who like to be beyond the bleeding edge notoriously (miss-)using alpha releases in production. One
of the disadvantages of being a contractor is you sometimes have to yield to standards.  As
corporate lead IT-architect I could bend rules, as IT manager I could just neglect policies, as an
employee I could just play ignorant of standards I always got away with it. If you produce something
useful the business people like you most of the time get away not following the regulations. But it is
harder as a contractor, at least as I see it as a contractor you follow the given guidelines.  
So Python 2.7 it is.

I had to move Oracle tables over AWS S3 into a Redshift database. And I had some as I see it
unnecessary difficulties, first the Oracle driver, I found many of them none worked, this should be
easy just import the database driver with an import statement or a pip command, nothing worked
until I had imported a Java driver and a Python driver, then all of a sudden I reached Oracle. I’m still
not sure on the sequence of events but I do have an Oracle connection. Now my code was a mess
after all futile attempts to find the Oracle database, so I cleaned it up. Now I got a an error message
telling ‘The database cannot be found’ or something similar. Very odd, after many new tests and
scrutinizing my code a number of times I realised I had deleted the creation of the database cursor, I
attempted to connect to Oracle with a non-existing cursor object. A more appropriate error message
had indicated there was a problem with the cursor object, that had saved me both time and a lot of
harsh words. After these initial problems that took the better part of a day, the rest to grab the tables,
transfer the tables into S3 and redshift was a breeze.
Do I like Python? Well I only used it for less than two days so it would be a bit presumptuous to have an opinion, but I do not see why  some people think it is so superior to other scripting languages, to me it more looks like the same shit as other scripting languages, just a bit different. Still I merely scraped on the Python surface. But I found the import future statement, that might allow me to sneak in some version  threeish code.