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:
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 ;)


Copyright @ 2013 Wrong tracks of a developer.

Designed by Templateiy