Archive for June, 2006

Bug or feature? - Beature

>> $data = ‘12345′
>> isset($data['foo']) ? ‘beature’ : ‘not set’
beature

I am just hacking away and just shrug. My AJAX request returns the following POST data data=[Object object]. Well, dojo obviously doesn’t resolve nested objects, so I get the ugly object string there. Ok, no problem.

But the interesting part here is that my PHP code behind expects an array and since I hadn’t implemented a type check the isset($data['foo']) returns true. What PHP does here (thanks to Alex Haslberger for the help figuring it out) is, it converts ‘foo’ into a 0 and uses the string $data to check if it has a character set at position 0. Which is true, of course.

I understand (don’t agree) that in PHP 1+’[’ returns 1, but the case above reveals that it might not be a good idea. Currently the type check has to be done by hand, which would be is_array() in my case, but is that really the right way?

I don’t feel like stressing my brain much more with it now, I am just too curious about our (Germany) quarter final game against Argentina … “don’t cry for me Argentina” :-)

Comments (3)

Drosera - Safari JavaScript Debugger

drosera.pngCompared to other browsers the WebKit crew has released a JavaScript debugger quite soon after releasing their browser. And here it is Drosera named after the largest bug eating plant. Nice idea for a debugger name :-). And the screenshot is very promising.

After the element inspector this is the next really useful tool, Safari is becoming more and more useful for development. Even though JavaScript development using browsers is still a pain … but I am looking forward. The technology is just too promising to give up too soon.
Besides Firebug this will be another one of my tools that I stuff into my toolkit box.

Comments

Behaviour is the missing link for your ajax apps

Don’t miss reading this article from Ben Nolan when you really do serious AJAX development! And of course the matching DOJO module (dojo.behaviour) for it exists. There is also a nice german article in iX about it.

Comments

Browser war on my machine

As usual I read it on techcrunch, this time about Flock.

Flock is a free web browser that makes it easier than ever to share photos, stay up-to-date with news from your favorite sites, and search the Web.

And of course I tried the browser, again. The first time I tried it was a couple months ago, when it was still some very early version and it was somehow not easy to understand how to use it and it was eating up all my resources.

Flock
Flock has officially released it’s first beta last week, and since then you can see a lot more press about it. Which is great I think. The browsers more or less haven’t changed during the last years. Flock is the first browser to integrate the web into the browser. That is very nice.
So I tried my flickr account with flock, and that was really nice, you get the pictures in a kind of a toolbar up on the top of the screen and can drag them in your blog post, or whereever you like. That is easy to use.
Flock lets you star sites - I don’t understand how it works. And if I have to read about it, it is probably too complicated to use. So I stared a couple of things and left the feature behind. I didn’t see no outcome.
Next was the RSS reader. Well, I exported my feed list from NetNewsWire Lite and imported them into Flock. First bummer: the groups were either not exported or not imported. Sux. Ok, I need to resort my feeds anyway. But feed reading is so much less attractive with Flock, that I tried to change the viewing mode, since I am a guy who needs a quick overview of the articles and then on my click I want to read it. Flock is wasting a lot of space and the overview it provides is not as effective as NetNewsWire, imho.
I thought adding a feed to the feed list is as easy as dragging the rss-icon to the list. Of course not, that would have been too easy. I tried some other things that I thought would do it, but none did. Next feature that doesn’t attract me.
Still, I made Flock my default web browser. That was about one or two weeks ago. Today I am switching back to WebKit. Flock’s RAM and CPU usage is just outrageous. I got 2GB of RAM and a G4 with 1.25GHz, which is not the newest but still the lowest high end. I have all my nine virtual desktops filled with any kind of applications, so my computer is packed and greedy apps are not welcoome. And those that start my fan too often and raise my load above normal levels are even less welcome.
I need a browser that does play nicely with my system. Flock definitely doesn’t!

WebKit
The nightly WebKit can also be called the latest developer version of Safari.

WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that’s used by Safari, Dashboard, Mail, and many other OS X applications. WebKit’s HTML and JavaScript code began as a branch of the KHTML and KJS libraries from KDE.

Actually I saw no reason to go away from WebKit, if Flock hadn’t come along with a set of really interesting features. The system integration of WebKit is probably the smoothest, the browser is rendering pages the fastest and it just feels handier than all others. For developing I am of course using FireFox with the latest FireBug - that is still unbeaten.

I can see the browsers are evolving and getting better, but there seems a long way to go. I am keeping my eyes open with curiosity.

Comments

It happened again …

In general my PowerBook is a very reliable computer, unfortunately also when it comes to crashing. Not what you guys think that it crashes three times a day. No, not at all.

Yesterday I was again close to reaching my uptime record of 14 days and some hours. I know that because my I use the screensaver ShowOff that always displays my uptime. Now I had that been close to the record again, yes again, I opened my laptop in order to get into a meeting that had just started. And booom “Please restart your computer”. What the heck … why does it always have to happen when the computer is reaching a long uptime?

I am already very careful not to plugin anything (esp. USB devices) while my PowerBook is waking up. I always login first even before plugging in the power plug … but it doesn’t always help :-(

Comments

Open source sucks

It seems that a lot of people are scared of open source software. Especially some think reinventing the wheel is better than using and adjusting an open source product which already does the same thing. They think they loose flexibility and the most used argument: they have to commit it back to the open source world. Stop here for a moment!

Look around on your computer and in your company. How many open source tools are you using, that you take for granted, that you expect to do their job? None? You would be the first person, I guess. And then you are afraid of commiting your little script to the world and make it open source? Sorry, but that is just egostic. Ok, the business is egostic nowadays, but the real question is: Are you saving money?

If you sell your work to a customer, who is paying you for reinventing the wheel, even though there is exactly the same tool, or even a better tool available as open source, then you are making money, of course! Good job, may be your customer discovers that some time and says good bye, if not be happy and reinvent things. Must be a boring job :-).

I don’t feel like writing anymore about it, there are surely better articles exactly about this topic, find and read them I will go for my Döner now. Good night …

Open source versus proprietary software: a discussion

Comments (1)