Friday, February 25, 2011

I was getting a lot of MDS related errors in my system logfile (visible via the Console.app in Mac).
Like these:

Feb 25 12:42:00 paradigm /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/dotmacfx.app/Contents/MacOS/dotmacfx[89682]: MDS Error: unable to create user DBs in /var/folders/PO/PO-GUydDF4mpVHTQxsRatE+++TI/-Caches-//mds
Feb 25 12:42:02 paradigm /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/dotmacfx.app/Contents/MacOS/dotmacfx[89699]: MDS Error: unable to create user DBs in /var/folders/PO/PO-GUydDF4mpVHTQxsRatE+++TI/-Caches-//mds
Feb 25 12:42:34 paradigm /System/Library/PrivateFrameworks/GoogleContactSync.framework/Versions/A/Resources/gconsync[89761]: MDS Error: unable to create user DBs in /var/folders/PO/PO-GUydDF4mpVHTQxsRatE+++TI/-Caches-//mds
Feb 25 12:55:34 paradigm /System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/MacOS/PubSubAgent[91445]: MDS Error: unable to create user DBs in /var/folders/PO/PO-GUydDF4mpVHTQxsRatE+++TI/-Caches-//mds
Feb 25 12:59:30 paradigm /Applications/Safari.app/Contents/Safari Webpage Preview Fetcher[91954]: MDS Error: unable to create user DBs in /var/folders/PO/PO-GUydDF4mpVHTQxsRatE+++TI/-Caches-//mds

and many more.
I thought that can't be good for performance so I digged around a bit and found that the caches of the kernel modules can become a bit problematic after security updates from Apple.
But there is a very simple remedy: Boot in safe mode, because then the caches are automatically deleted and renewed at the next boot.
To do that you keep pressing the SHIFT key while rebooting. Once you are fully booted into safe mode, just restart again and you will see (if you are as sensitive as me to the snappiness of a GUI) that things move a tad snappier now, like it was when the Mac was still fresh. ;)

Good luck!

Find out on which computer you are 'python-ing'

Often, data is stored at different locations, depending on which computer the code is running.
To find out one can use the sys module like this:


import sys
if sys.platform == 'darwin':
    base = '/Users/aye/Data/hirise/'
else:
    base = '/processed_data/'

Thursday, February 24, 2011

Great Python resource!

This site diggs through many useful stuff of the Python standard library.

http://www.doughellmann.com/PyMOTW/contents.html

Python lists as function parameters

I often stumble about something like this:
A function needs 2 parameters like
myfunction(a,b)
and i have them, but inside a list 'myList'=[a,b].
Sure I could write
myfunction(myList[0],myList[1]),
but where's the famous Python beauty in this, right?
Until I realised that this is what the *args thingie is for that I never used before.
Damn, all those typing hours lost when I typed the explicit unpacking of lists!!!
Now I can just do
myfunction(*myList)
and all is beautiful again! ;)
Thank you, Python

Tuesday, February 15, 2011

Deutsche Service Wueste, jetzt auch in der Schweiz!

Schade, dass die deutsche Service-Wueste schon in die Schweiz migriert ist:
Kreditkarte bei der PostFinance am Schalter bestellt.
Karte kommt, Name falsch, wir zurueck zum Schalter um es zu aendern:
"Nein, das muessen sie jetzt mit der Kreditkartenfirma ausmachen, da haben wir ueberhaupt keinen Einfluss darauf."
Warum bezahl ich dann fuer eine PostFinance Kreditkarte?
Darauf wurde beim Vertragsabschluss natuerlich nicht hingewiesen, das man eventuelle Probleme dann woanders loesen muss. Echt traurig sowas...

Tuesday, June 1, 2010

ExWi Unite! ;)

The cafeteria bosses want to kick out Margrite (?, the red haired friendly older one) 6 months before her pension due to 'economic constraints' even so they wrote elsewhere, that they made good earnings in the last year!! WTF? Obviously a case of 'kick u out, get somebody cheaper=younger'. I wondered, if anybody would join a signature list to the cafeteria bosses, to stop this bullshit! Also, we could use this opportunity to complain about some 'worseprovements' they introduced after the change of ownership, like canceling the speaker phone etc.
Who is with me and would sign something like that?