Thursday, April 19, 2012

JavaScript IE and Options

First thing I gotta say is, I am not a web developer. Maybe you guys out there all know the problem I had to handle with these days, but for me it was new.
I helped a friend of mine and wrote some JavaScript for him. I dynamically created Options for a select-Tag by using the constructor of the Object:
Option(text, value, defaultSelected, selected)

With FF and Chrome everything was ok. But when my friend tried with his IE it didn't work out.
I knew that there are some differences between FF and IE when it comes to JavaScript but this one seems really ridiculous to me. When you only set the "text" attribute at the Option object it seems like IE doesn't know how to handle it. So no text is presented in the select box. You have to explicitly set the innerText attribute for IE as mentioned in this post.

So, know I'll have to change my script only for IE and I have another reason to be angry at IE.

Friday, April 13, 2012

Code Kata

Some weeks ago I read about Code Kata in "The passionate programmer". I haven't had heard of it before.

From Karate I know Kata. It's a fixed sequence of movements and punches/kicks, which you repeat again and again and again...
That ways you gather automatism. And, what I got to add, a Kata is not directly meant to be used in a combat.

So, a Code Kata is the same for programming, at least it's supposed to be. According to Wikipedia Dave Thomas coined the term Code Kata and he invented some Code Kata, too, which you can use to train your programming skills. You can find them here or you can just use the links in the Wikipedia article.

I just started with Dave Thomas' Code Kata. Nevertheless, I like the concept and I suggest you have a try, too.

Saturday, April 7, 2012

Do you know the beginning of Linux? (book review)

Well, I won't ask if you know Linux or Linus Torvalds, I guess my spam filter couldn't handle all those mails I would get ;) but, I'll rather ask you: Do you know the beginning of Linux?

If you're like myself, you'll know, that one Finnish geek (in a positive manner), named Linus Torvalds started to develop Linux during his college time and it became quite popular after it was published under Richard Stallman's GNU license and because of some other circumstances.

I recently started to read Just for fun (link) written by Linus Torvalds and David Diamond and it is quite a good book.

I don't wanna do advertisement here (well, somehow I do, but I definitely won't get any money for more copies sold ;) ) but I am half way through that book right now and I can recommend it. If you're quite nerdy and you would like to know in detail how Linux started, you'll have to read this book. It is NOT a manual how to become famous by developing cool stuff (at least from my point of view, because those times were unique). It is rather a book to become nostalgic and ask yourself, what you did during that time (if you're older than I am ;) ).

All in all, I like this book and it should be in every geek's book shelf.

Wednesday, April 4, 2012

Did you every consider using the zsh?

I guess a lot of you guys use the bash to execute their scripts and to do some funky stuff on the terminal, but did you ever consider using something different?
As far as I know the bash is the standard in Ubuntu, Mac OS X and Cygwin. That ways it is quite normal to use it and to stay with it. I did it the same way.
But then (what feels already like an eternity away) I heard a nice speech about the zsh and its advantages. And now I only use the zsh, at least with my Mac.
I am far away from knowing every aspect of the zsh and even more far away from using all of its "power", but I want to make you think about the tool you use, when starting your terminal.

You can find all the features here: http://en.wikipedia.org/wiki/Z_shell#Features
The feature I like most is the completion. When using the bash and you start to write the command and hit tab your command will be completed or you'll be presented all the choices that fit (I guess you all know that ;) ). In zsh the nice thing is, that I also completes the options.
If you type "ls -" and hit tab, you'll be presented all the possibilities. Ok, for ls the options aren't that complicated, but when you use "ipconfig" it gets way more complicated.

All in all, give the zsh a chance and try it out, I did that and I don't regret it ;)

Friday, March 30, 2012

Decompiling an Android App "at" Marakana

This time my topic is not directly presented here, you can find it here.
I will just tell you the backgroud story.

So, how comes, that I wrote an article for marakana?
Roughly two weeks ago I attended the Droidcon in Berlin and listened to a presentation by Marko. Marko is one of the founders of marakana (what I didn't know by that time). In the evening, in fact during the socialising part of the Droidcon, I talked to him because his presentation was very interesting for me and I wanted to know more. That ways we started talking and he told me, that I could write an article for marakana so a bigger audience could read it (because way more people know marakana than my blog).
Well, as you can see, I wrote the article and the counter there is at 139 right now. Even with some people opening it twice or three times it's quite an impressive number for me.

What do we learn from this?

From time to time you gotta leave your "nerd cave" and talk to random people ;)

Thursday, March 29, 2012

Overview Git commands

As I mentioned in my first Git-post I wanted to prepare a nice overview for the Git commands, so you can print it and put it next to your PC or keep it in your pocket ;)
Unfortunately the people at GitHub didn't answer my question if I may publish it. Because I didn't want to wait any longer and because I wanted to give it to you guys I made sure it fits the German citation laws.

So, here you go: http://goo.gl/eUyIu

If you find any mistakes or have an idea for improvements please let me know.

Saturday, March 24, 2012

Problems with ADT17/Reverting to ADT16

Yesterday, I upgraded my Android SDK and ADT to version 17, especially because I wanted to see, how I could use the new, generated BuildConfig class.
So, after starting my emulator, a NoClassDefFoundError was thrown, when starting the second activity with an intent.
After some searching I found this solution http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
Well, I use Maven for my dependencies and that's why that solution doesn't work for me(I just assume, that FoxyKeep is right).

After messing up the whole classpath of my app, I decided to just switch back to version 16.
If you want to do that too, follow these steps:
  1. Download the old SDK (actually I am not totally sure, if it's necessary to revert the SDK, but I wanted to minimise possible errors). Just copy one of the download links and change the version number.
  2.  Replace your tools folder with the tools folder from the old version.
  3. Deinstall the ADT in Eclipse (reverting in Eclipse didn't work for me)
  4. Download the old ADT by taking the link from here and again, changing the number to the desired version.
  5. Install the ADT in Eclipse by following the steps listed under "Troubleshooting ADT Installation"
And now you're good to go. Maybe you have to fix the conversion-to-dalvik-format-failed-error again, but that's all.
If anyone finds a solution for ADT 17, please let me know ;)

 

Copyright @ 2013 Wrong tracks of a developer.

Designed by Templateiy