Frickelblog

28. January 2014

The blog is moving!

Filed under: Sonstiges — frickelblog @ 21:27

Hey there I am moving this Blog back to my own domain at www.Locked.de.
Please add http://www.Locked.de to your feed.

I will keep the comments section here open but will continue (or more or less start over again) at my home domain. I’d be glad if we meet again over there.

24. January 2014

“Easy going” vs “Taking care”

Filed under: Sonstiges — frickelblog @ 21:56

Freitag Abend. Heimfahrt in der BOB (BayerischeOberlandBahn). Wochenende here I come!

In Bad Tölz (eine Station vor meinem “Zielflughafen”) höre ich “Hausham? Da sind sind im falschen Zug.” (Hätte man vor einer halben Std in Holzkirchen umsteigen müssen). Ich denke mir “Arme Sau – jetzt fährst erst mal wieder zurück – oder du kennst hier jemanden der dich fährt – Ist mir aber wurscht – denn ICH bin gleich daheim. HA-HA!”.

Der Zug steht noch – ein junges asiatisches Mädchen das gerade ins Teenageralter eingetreten sein muss läuft etwas hektisch herum und spricht mich dann an “schuldi-gung – Hausham?”
Ohoh. “Hm tut mir leid, falscher Zug, steig schnell um in den Zug am anderen Gleis. Du musst zurückfahren.” Verzweifelter Blick ihrerseits. “ik ver-stehe nicht?”
Oh verdammt – kurzer Versuch in Englisch – nada. Noch maximum 2-3min bis der andere Zug fährt. Oh – scheiße – das bekomme ich jetzt nie erklärt. Die Hoffnung stirbt zuletzt: Noch ein Versuch es ihr zu erklären. Auch die Taxioption versteht sie natürlich nicht.

Option A) Schultern zucken, mich nicht weiter kümmern, das Mädel bis nach Lenggries fahren lassen (wo sie nicht weiter von Hausham weg sein könnte) und gleich daheim sein (also ich – sie sicher nicht). Ist ja schließlich nicht mein Kind.
Option B) Zusammenpacken, das Mädel in den anderen Zug setzen und hoffen, dass mich irgendwer fahren kann (oder dass diesmal wenigstens Taxis da sind) weil MEIN Zug dann ganz sicher weg ist.

Ich habe Hunger, Ich will heim! Ach Scheiße.

Ich klappe mein Notebook zu und packe meine Jacke, der Zug muss gleich losfahren! Meine Sitznachbarin mustert die Situation wortlos mit undeutbarem Blick. Wir dürften noch maximal eine Minute haben bis der andere Zug fährt. Ich laufe mit der kleinen im Schlepptau durch die Unterführung und höre meinen Zug abfahren. Resignation +1.

Schnell das Mädchen in den anderen Zug geschafft und ihr den Plan an der Wand gezeigt an dem sie sieht, wo sie jetzt ist und wo sie hin muss (angemerkt, ich stehe dabei IM Zug). Die Motoren heulen auf – ich rufe einer Frau zu, sie soll BITTE die Tür aufhalten, ich muss hier noch raus! Dankenswerterweise tut sie das auch (10-15s bis der Zugführer ernsthaft sauer wird). Das Mädchen scheint zu begreifen, ich springe aus dem Zug, die Türen schließen, das Mädchen winkt dankbar und der Zug fährt, ich bin am Bahnsteig – an dem Bahnsteig an den ich eigentlich nicht will. Resignation +2.

Rücklichter eines Zuges können sehr frustrierend sein. Ich hoffe, dass sie wenigstens begriffen hat was sie tun muss.

Ich erkläre der etwas verwirrt dreinschauenden Frau die die Tür aufgehalten hat die Situation.

“Oh”
“Genau – oh.”
“Na der Schaffner wird’s ihr dann erklären. Kommt Sie jemand abholen?”
“Mich?” (resigniertes Lachen) “Nein – ich hoffe ich erreiche jemanden, aber ich konnte die Kleine ja jetzt nicht sitzen lassen. Zur Not muss ich ein Taxi nehmen – wenn eins da ist.” Für 45min Fußmarsch bei Graupelschauer sind meine Schuhe nicht ausgelegt. (Resignation +3). Dass der Fahrplan umgestellt wurde und ich nicht eine ganze sondern “nur” eine halbe Std auf den nächsten Zug warten müsste entfällt mir in dem Moment.

Sie schaut mich an, ich zücke das Handy um mir eine Fahrgelegenheit zu suchen.
“Kommen Sie, ich fahr’ sie Heim”
“Äh, was?”
“Ja, kommen Sie. Sie haben was Gutes getan, jetzt tu’ ich was Gutes und bring’ sie Heim.”
“Äh – Danke!”
Ich bin angemessen überrascht. Als sie mich zuhause absetzt bedankt sie sich bei mir.
Etwas verwirrt gehe ich in die Wohnung. Und gerade mal 5min später als bei Option A .

20. November 2012

“bad subifd directory” Replacing/removing bad SubIFD

Filed under: Sonstiges — frickelblog @ 23:45
Tags: , , , , , , , ,

Handling bad SubIFD entries in photos you want to geo tag / the problem

I just converted some of my RAW photos in RawTherapee and polished them in Photoshop CS. Of course I also wanted to GeoTag them (using GeoSetter) before putting the images in my archive. Fortunately, a GPS point was found in my trace for all photos. Unfortunately, I couldn’t write the Exif-GPS position due to a “bad subifd directory”. That’s what exiftool (which geosetter uses) tells me.

So – how to get the geo information into exif – or how to get the bad SubIFD directory out?

The solution:

In the end the issue was rather easy to solve:

  1. copy your images to a linux machine (or vm or whatever)
  2. copy all images to a directory “conv” AND in parallel to “conv2
  3. enter “conv2
  4. remove all exif information from the conv2 images by
    find ./*.jpg -exec exiftool -exif:all= {} \;
  5. enter “conv1” & copy the exif information (except SubIFD) to the cleaned images in “conv2” by
    find ./*.jpg -exec exiftool -tagsfromfile {} -exif:all --subifd:all ../conv2/{}\;
  6. you’re done.
  7. (fire up geo setter and geo tag your photos)

Be happy!

31. August 2012

Convert Mercurial repository to Git

Filed under: Sonstiges — frickelblog @ 22:42
Tags: , , ,

I have converted yet another googlecode Mercurial repository to Git – and as it took me (again) a bit too much time, here is my recipe:

Prepare

Log into a Linux shell (Windows will hardly work – at least it didn’t work for me). If you don’t have some remote shell, download an Ubuntu VM and fire it up (you might need to install VirtualBox if you haven’t installed it already).

Check out your HG repo:

hg clone https://code.google.com/p/MyHgProject/

Check if you have to remap some author information:
hg log MyHgProject

If you want/have to remap, simple create an author map file
oldemail@example.com=Firstname Lastname

Convert

Get fast-export and convert your repo:
git clone git://repo.or.cz/fast-export.git
mkdir new_git_repo
cd new_git_repo
git init
/path/to/hg-fast-export.sh -A ../authormap -r /path/to/MyHgProject
git checkout HEAD

Push

Now change the source setting in your google code repository to git and push the local codebase:
git remote add origin https://code.google.com/p/MyHgRepo/
git push --all

At this point, your upload might fail with something like “error: RPC failed; result=35, HTTP code = 0″.
This can happen if your upload takes too long and this is a documented bug.
I simply solved this issue by pushig the git repo from a shell with a fast enough upload speed as my local connection obviously was too slow.

Wiki

Now you might realize that you have “lost” your complete wiki – don’t worry, it’s still there!
Switch back your repo setting to Mercurial and repeat the process for your wiki which you can usually find at https://code.google.com/p/yourProjectName/source/checkout?repo=wiki

That’s it. You should now be ready to use Git!


Thanks to following sites hedonismbot, scrambled tofu

29. March 2012

No more windows backup after uninstalling Acronis True Image Home 2011

Filed under: Sonstiges — frickelblog @ 21:53
Tags: , ,

I gave Acronis True Image Home 2010 and 2011 really quite several chances but it seems that either the product cannot reliably perform regular backups for my computer or I am just incomatible with it. Anyways – I finally wanted to draw a final stroke, get rid of Acronis True Image Home (ATIH), uninstall it and try Windows’ native Backup and Restore.

After unsintalling TIH I wanted to configure Windows’ backup and restore tool.
But – the according window just didn’t open!? Is TIH still bothering me AFTER I uninstalled it?

After quite some googling, I found one article in the Acronis Knowledge Base “14741: Acronis True Image Home 2011: Disabling “Integrate True Image into Windows” Does Not Work“. Unfortunately this only applies to an installed Version of TIH where Dis-Integrating TIH from windows backup does not work. – It’s quite a while since I tried it – but if I remember correctly, this didn’t work out for me. So another round at google was waiting for me.

Step 2


Step 4


Step 5


Step 7, 8

After quite some frustraiting searches on google, I finally found an post in the Acronis forum from September 2010(!) “14782: TIH 2011 uninstall wiped out my Windows 7 Backup & restore“. After scrolling over about 35 posts (including Acronis support, I finally found a posting of User Grant from Mi, 2011-02-23 22:28 who stated that he found the solution by chaning a registry entry. Well – I don’t want to keep you in suspense: It really worked out! As I don’t know how long this article will stay online in the official forum, I’ll try to redescribe it here (even though I hope that I never ever have to fix that again):

  1. Open the registry editor (regedit.exe)
  2. Search for the key {B98A2BEA-7D42-4558-8BD1-832F41BAC6FD} (Ctrl-F) and navigate to the sub-folder Instance/InitPropertyBag.
  3. On the right hand side you can see a ResourceDLL entry pointing to a non existing TIH path – “great”. But you can’t change it – thanks to TIH. So let’s get back control:
  4. Right-click on InitPropertyBag> properties (german: Berechtigungen) > Advanced (german: Erweitert)
  5. open the owner tab (german: Besitzer) and change the owner to your own user.
  6. Hit okay, and back to the Step 4 screen. give yourself full controll (german: Vollzugriff) and hit okay again to be back in the reg editor
  7. Change ResourceDLL property to “%SystemRoot%\System32\sdcpl.dll
  8. Change the ResourceID to “14“.

Now Windows Backup should be available again and TIH is (hopefully!) fully uninstalled.

25. February 2012

How to write useful error messages

Filed under: Sonstiges — frickelblog @ 23:26
Tags: , , ,

Each programmer has to deal with error mesages in some way. Either we have to check our data (and possibly raise an error/exception) or we are using libraries and have to deal with error messages or exceptions that are raised in these libraries. The purpose of this post is to point out how meaningfull error messages can save you time. Either your own time (by avoiding answering support questions) or your own debugging time.

So how can an error message save or waste time? Imagine the situation where you try to open a file and all you get is an error. What do you do next? I guess you’ll probably check if you’re trying to open the correct path. Maybe you did, then you possibly check if the permissions are okay, if you’re trying to open a directory or a file, etc until you found the problem that is causing the error. Actually this can be quite some wasted time – why? Becasue you’re doing all the stuff that the system already checked. The system decided that one of the condidtions failed and exited. So – shouldn’t the system just TELL the exact reason? And even better: shouldn’t it also just tell you a possible solution? Well – actually I do not blame “the system” but the guy who write the line that threw the error without any further information. Everytime I get an absolutely uninformative error I think “was it really so damn hard to add one more line of code that just mentions WHAT went wrong?!”.

Assume the situation where you try to open a file with the path being configured in an external config.properties file.
I think the quality of an error message can be categorized in one of the three categories:

  1. Reporting: The system just reports that there was an error.
    Example: IO Exception occured.
  2. Informing: Same as 1, just with more information.
    Example:  IO Exception occured while opening file: <filename>, null=false, exists=true, is file=false, is directory=false, readable=false, writable=false
  3. Supporting: same as 2 with additional information of how to solve the problem.
    Example: IO Exception occured while opening file: <filename>, null=false, exists=true, is file=false, is directory=true, readable=false, writable=false; Was the pat set correctly in config.properties?

In the past weeks I have seen very useful error messages in Google’s Android (“… Have you declared this activity in your AndroidManifest.xml?”) or in twitter4j (Displaying a shortURL to an FAQ page explaingin a very common error).
Bad examples are plain NullPointerExceptions when 3 parameters were checked, one of them was null and the according is just followed by a throw new NullPointerException so that you even did not recognize from the message WHICH parameter was null.

Conclusion: Please write robust code and please provide helpful and supportive error messages to the folks using your code!

27. January 2012

An introduction to the Logging framework (a.k.a. System.out.println is evil)

Filed under: Java — frickelblog @ 13:56
Tags: , ,

Motivation

One of the first lines a programmer will write in a new language is surely “Hello World”. In Java you can write to the console or to the error stream quite easy with a simple System.out.println("Hello World") or System.err.println("Hello Error"). Great! When the code grows, bugs creep into the code and make live a bit harder. At this point programmers should definately start a deep and loving relationship with the debugger that is delivered with the IDE instead of using System.out/err.println() as debug method. Nevertheless – there are at cases, where a Debugger cannot (or hardly) be applied:

  1. The code runs in the IDE but not if startet directly. – What the hell’s going wrong?
  2. Handling of exceptions. An exception indicates a state that should not have happened and therefore it might be considered to be logged.
  3. The code is deployed to someone else and you cannot attach the debugger to his/her machine.

At either point, beginners tend to use System.out/err.println() to trace the execution path. While this might be okay if the onlyone that is using the code is the programmer alone, this can be very annoying if you are working in a team: If you forget to remove the debug messages, you’re polluting someone elses console output. Even worse: if the code is deployed to a client which reports an error, you cannot raise/lower debug levels or just enable/disable debugging. Do you really want to send a “debug version”? (No you wouldn’t.)

(more…)

26. January 2012

Rooting and upgrading my HTC Tattoo to CyanogenMod 7

Filed under: Java — frickelblog @ 19:41
Tags: , , , , ,

Yesterday I decided that the days of my HTC Tattoo running original HTC-Android-1.6 were numbered – finally. Actually the thought about updating was in my mind for QUITE some time. But with all the different how-to-update guides and “oh my god I broke my phone”-posts, I was really frustrated and unsure if I should really risk to “brick” my phone (a.k.a.: turn it totally unusable).

Well okay – so I crawled the web once more for an up-to-date update guide. Well – to make a (rather) long story short: I achieved my goal!

(more…)

15. January 2012

Parse Error: There is a problem parsing the package / Beim Parsen des Pakets ist ein Problem aufgetreten

Filed under: Sonstiges — frickelblog @ 18:11
Tags: , , ,

Just finished my first (real) Android App and wanted to deploy it in my phone (not just in the emulator).
So I sent an email to myself with the .apk attached as several tutorials said that you can just open it from your mail to install the app.
On the phone, I opened my mail app K9 and opened the .apk. But instead of installing I unfortunately just got

Beim Parsen des Pakets ist ein Problem aufgetreten.
(in english) Parse Error: There is a problem parsing the package.

even though the minSdkVersion was set correctly.

The solution was rather simple: Do NOT open the .apk in K9 directly but save it to the sdcard and open it via a filemanager like Astro.

10. January 2012

Knowing: A Generic Data Analysis Application

Filed under: Java,Sonstiges — frickelblog @ 15:14
Tags: , , , , , , ,

We got another demo accepted:

Knowing: A Generic Data Analysis Application

Thomas Bernecker, Franz Graf, Hans-Peter Kriegel, Nepomuk Seiler, Christoph Türmer, Dieter Dill
To appear at 15th International Conference on Extending Database Technology (2012)
March 27-30, 2012, Berlin, Germany

Abstract:

Extracting knowledge from data is, in most cases, not restricted to the analysis itself but accompanied by preparation and post-processing steps. Handling data coming directly from the source, e.g. a sensor, often requires preconditioning like parsing and removing irrelevant information before data mining algorithms can be applied to analyze the data. Stand-alone data mining frameworks in general do not provide such components since they require a specified input data format. Furthermore, they are often restricted to the available algorithms or a rapid integration of new algorithms for the purpose of quick testing is not possible. To address this shortcoming, we present the data analysis framework Knowing, which is easily extendible with additional algorithms by using an OSGi compliant architecture. In this demonstration, we apply the Knowing framework to a medical monitoring system recording physical activity. We use the data of 3D accelerometers to detect activities and perform data mining techniques and motion detection to classify and evaluate the quality and amount of physical activities. In the presented use case, patients and physicians can analyze the daily activity processes and perform long term data analysis by using an aggregated view of the results of the data mining process. Developers can integrate and evaluate newly developed algorithms and methods for data mining on the recorded database.

BibTex

@INPROCEEDINGS{BerGraKriSeietal12,
  AUTHOR     = {T. Bernecker and F. Graf and H.-P. Kriegel and N. Seiler and C. Tuermer and D. Dill},
  TITLE      = {Knowing: A Generic Data Analysis Application},
  BOOKTITLE  = {Proceedings of the 15th International Conference on Extending Database Technology (EDBT), Berlin, Germany},
  YEAR       = {2012}
}

More informations will be published at the official publication site at the LMU.

Next Page »

Customized Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: