Archive for April, 2008

Published by Fabian on 28 Apr 2008

Zak is Back!

If you don’t know Zak you have missed something. A great game, and a cornerstone of the great adventure genre that LucasArts sill does not want to revive. Production cost is too high due to the complex content that has to be created. And only a small amount of people would buy the game. Its to hard to understand…

Really? Most people I know loved adventures. Even with steep learning curves you can master them and they are addictive. But even when LucasArts doesn’t listen to the community, there is hope.

As a result of community work Zak McKracken 2 – Between Time and Space was released. 2 Gigabytes filled with great graphics, sound and voice. And of course filled with puzzles up to the roof. An awesome piece of work as the result of 7 years work.

As its community work this one is FREE. Free as in “free beer”. So grab it and enjoy it!

Many thanks to the team

PS: oops nearly forgot. This game is only available in german at the moment. They are working now on translations. But hey, I used the good old Lucas Arts and Sierra Adventures to learn English, perhaps you can give it a shot in German? :-)

Published by Fabian on 23 Apr 2008

Mobile+Razor+Toothbrush = XFiles?

Something is going on in german blogging community.

There are a lot bloggers that received these days a parcel containing:

  • a mobile phone
  • a razor
  • a toothbrush
  • a “logo” without any name or text.

All parcels had a number on it (seem to range from 1 to 100).

Is this viral marketing? Why is just cheap stuff in it (the phone is also a cheap one for 25 Euros)?

It seems to be only to german speaking bloggers, but for your possible intrest I try to compile a complete list here:

Number unknown

Published by Fabian on 16 Apr 2008

Imageflow – revised

I have been working recently on integration a great Imageflow library from Finn Rudolph, which however was code wise err a bit hacky. It was using plain Javascript, with many global variables and some cross browser hacks. Also its lightbox integration was not compatible with Lightbox v2.04.

To practice my Javascript skills a bit I decided to refactor that library. There is another serious alternative called Protoflow, but its scaling algorithm doesn’t work on different sized images well. I made it working quite nicely with Lightbox and additionally cleaning up lots of code. Quite some temporary variables are no longer required due to the object-ness of the widget. It also will not produce namespace conflicts anymore.

The script is available for download here.

I am pretty sure that the code can be still improved. Initially i started with a 1-1 port to Object. Basically just namespacing the whole thing. Then I did an iteration cleaning things up, after that I removed some browser hacks, especially using Prototype Event class for that. After that I cleaned again, and thats how it is now. 6KB compressed using YUIcompressor. I have not yet verified that it works cross browser as good as the original, but thats what I am going to do next. Additionally i try to improve my prototype skills and hack some for each loops.

Expect some updates on this blog entry and the script.

Feel free to post ideas in the comments.

Note that however I am not giving support for this script. Make sure to visit the original Imageflow site first and get a version from there running. There is quite a lot of documentation and help available. Afterwards you may come here again and try my variant of the script :-)

Updated 2.May 2008:

Just integrated the options into the object creation. you can now pass changed options more easily. Also merged a feature that allows you to prevent images being scaled larger than they actually are.

Published by Fabian on 16 Apr 2008

Response to Andy Jeffries: Why Ruby is better than symfony

Dear Andy,

I read your blog about symfony and that you now switched to Ruby on Rails. You claim to work with symfony, but I cannot understand how you then can come up with those 20 things that Ruby handles better than symfony. Perhaps you made some up to complete your list of 20? Or you just don’t know?

Yes I am biased to symfony, but I am not advocating the one or the other here.

So here my remarks to each of your points:

  1. If you think that Propel is inferior to AR, thats fine with me. Btw there is a doctrine replacement for symfony available.
  2. Also matter of taste, I think both do a good job here, and neither is perfect :-)
  3. You miss to mention that symfony also has an integrated test system and fixtures. I wonder how you could miss the entire chapter about testing in the symfony book.
  4. Propel has Behaviours, and there are tons of readymade plugins out there for that purpose.
  5. the built in webserver is unique to RubyOnRails. In my personal opinion thats unneded but helps with prototyping.
  6. Well thats php not symfony. If ruby is better thats fine.
  7. Yeah big big minus for symfony. Luckily there are a few guys that started working on this in plugins.
  8. It sounds like that you think symfony has got no environments? it has.
  9. PHP hasn’t, but symfony has a database session store, cool eh?
  10. Symfony hasn’t too much support for webservices built in. sad but true.
  11. Thats a nice feature. I think thats on the roadmap for sf1.1.
  12. You can do custom tasks in symfony. 1.1 has even the same syntax.
  13. Deployment is cool? symfony also has something there. I never used it because I think that deployment is a more controlled process rather than a developer executing a task. What I saw from the symfony one it also was not too powerful.
  14. I thought RoR has an own server :-)
  15. Well you can write easy filters in symfony 1.0. Fabien changed the filter system for 1.1. I am not sure if i will like it.
  16. No interactive debugging in symfony. I think its a PHP issue but actually it is an issue.
  17. Cron isn’t supported in symfony. But you can designate some scripts as batch scripts.
  18. Profiling is nice. I have to have a look at it!
  19. Flash
  20. Again a whole chapter that you seem to have missed in symfony. I personally find caching a very good part in symfony. It is fast and very easy to use.

Wrapping it up, I can notice that you missed your target of listing what is better in Ruby on Rails than in symfony:

there are some things that make it less than perfect when compared with something like Rails

In 8 out of 20 of your points you were just unaware of the features of symfony. I cannot believe that you claim to develop in symfony but haven’t read the great documentation. The whole book is online and free.

Other aspects of both, symfony and Ruby on Rails, I personally dislike: developer and process tools, such as crons, deployment, servers etc do not belong into a web application framework. It should be inside the development process. Perhaps even bundled with an IDE, bug tracker, or SCM tool. But not in the “language” itself.

But since you are so happy about RoR, I am very excited, because I will try it also myself.
In essence I think that symfony and Ruby on Rails are very similar. The major difference is the language. I think.

Published by Fabian on 15 Apr 2008

switch() – the better if() ?

today I found another piece of code, that does get extra points for style, but perhaps some deducted for readability:

switch (a_boolean) {
  case true:
    // do something
    break;
  case false:
    // do something else
    break;
  default:
    break;
}

this is a nice, and so far for me unknown way of describing an if. Is this better for some reason? The only advantage I see is that it is very verbose, saying false and true. However I am unsure which compilers in which language would optimize this differently than an regular if.

What I especially like is the failsafe default statement :-) You never know

Published by Fabian on 11 Apr 2008

Rubies are girls best friends?

I resisted for a long time, but there is a talk coming up in the Düsseldorf Java User Group about JRuby, so I really want to get to know what this Ruby thing is all about. Up to now I thought that PHP is good enough to be complement for Java for low scale projects and prototype, but however, we need software that is able to be integrated. I was not so successfully getting a Java<->PHP Integration running, so perhaps this can be done with Ruby?

Let me quickly take you along with my Getting Started experience:

  1. Google for “Ruby on Rails getting started”
  2. From

    http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails

    got to

    http://wiki.rubyonrails.com/rails/pages/RailsOnWindows

    A bit lost there but found a nice installer on

    http://bitnami.org/stack/rubystack

  3. Install the stack, wait for 30 Minutes until Ruby has extracted thousands of yaml files.
  4. The stack pretended to have a demo application ready on port 3000, but this was not configured.
    Also the Ruby on Rails wiki pages were not very helpful on how to finalize this last setup step.
    I found a README in the application directory. That one told me to invoke script/server…
    Well.. I tried. Windows said: command or file not found.
    The file itself has:
    #!/usr/bin/env ruby
    How is that supposed to work on Windows?
    Even creating an new project with “rails” command which was found in path correctly does produce unix shell scripts…
    Ah!

    http://wiki.rubyonrails.com/rails/pages/ShebangChangeScripts

    ruby -i.bak -pe 'gsub!("#!/usr/local/bin/ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*

    and now? The command did not succeed, even after fixing the permission errors, because the script tries to modify folders and the path being incorrect, its still a unix shell script.. not a windows command script. Though not working.

  5. okay, I was bold and tried invoking “ruby script/server” and surprise that did work! And even the application was running.

90 Minutes for getting the welcome screen of a ruby app under windows. not very impressive. Lets hope application development is more convenient.

Lets see how my Ruby experiments will go on. I better open a new category for it.

Next »