2008-11-29

 

State of OpenSource Hardware in 2008

There's a nice summary over at MakeZine

 

Linux on the iPhone

The Linux 2.6 kernel now runs on the iPhone :-)


iPhone Linux Demonstration Video from planetbeing on Vimeo.

2008-11-26

 

Why do people still use Internet Explorer ???

Many people probably just don't know there are other browsers... Perhaps they don't know how to get/install other web browsers... Whatever the reason, they are missing out!

Since Chrome is currently only Windows based, I will gladly settle for my Firefox 3 browser, as it didn't do that bad at all.

Well done Google!

Follow up: Also be sure to check out Lunascape - a triple engine browser!

2008-11-25

 

The snake bites it's tail

I have finally hit some sore points in my Python programming experience I don't like at all:

Point nr 1: How Python handle NULL values. I am of course not the first to hit this little problem... This is particularly confusing when dealing with databases. A DB query could return one field in one row of which the value is NULL, or, no rows could be returned at all. In both cases you will have a "None" condition, but you need some logic in your app to figure out the where and why you get the "None". Very irritating indeed...

Point nr 2: Then there is the MySQLdb problems, like the BLOB problem noted here... Only, I got the same issue on BIG INT values as well. From the status of the noted problem you will note that the maintainers of the MySQLdb module does not intend fixing this, so again you need a lot of application side logic to deal with these problems.

Point nr 3: I still long for the way Perl deals with variable types - just have scalars, arrays and hashes - nothing else. I am ending up converting almost all output of variables to strings using the str() function, as you just don't always know when a variable is not a string. The annoying part is that it doesn't always work - refer to point 2. Of course this adds more CPU calls and still more logic you need in your application to deal with all these strange things.

So what is one to do?

Well - I will probably have to write my own wrapper module around MySQLdb in order to get the values I want in the way I want it, and hide all the complexities in the wrapper module.

Watch this space...

2008-11-07

 

Started a new dedicated Python site

Check it out on http://sites.google.com/site/pythonbits/

Will be adding more and more stuff there over time.

2008-11-03

 

RFC 1123/822 dates in Python

Quick solution:
import datetime
.
.
.
datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")


References:

This page is powered by Blogger. Isn't yours?