Samstag, 10.11.2007
Blog has been moved!
Starting with today this blog lives at a new URL: railsbros.de. Some of you already used this URL to find us, but it was just a standard forward to our blog on blogg.de. We weren't that happy here and decided to host our own blog. The Feed is now delivered by Feedburner, so please update your feed readers.
We hope you enjoy the new design on the new blog.
See you on the other side.
Dirk
We hope you enjoy the new design on the new blog.
See you on the other side.
Dirk
Freitag, 02.11.2007
Ungreedy Regular Expressions in Ruby
This Blog-Post saved much of my time today:
It's always about the little things which waste most of your time.
thx to Gregory
It's always about the little things which waste most of your time.
thx to Gregory
Freitag, 26.10.2007
Shimo - a Cisco VPN Client

Shimo is a simple to use replacement for the Cisco VPN Client under Mac OS X. It integrates seamlessly and beautiful into the system as a menu bar item. If you already have installed the Cisco VPN client Shimo is ready to go right after you dropped it in your Application folder. The available profiles are automatically read from the Cisco VPN locations on your hard disk.
Sonntag, 14.10.2007
HTML Codes for Keystrokes
For my last post I wanted to use the symbols printed on a Mac keyboard to show which keys you have to press for certain shortcuts. Below the HTML escape sequences are listed to this:
⇧ - ⇧ - Shift
⌃ - ⌃ - Control
⌥ - ⌥ - Option
⌘ - ⌘ - Command
Enjoy!
⇧ - ⇧ - Shift
⌃ - ⌃ - Control
⌥ - ⌥ - Option
⌘ - ⌘ - Command
Enjoy!
Setting the Environment in Mac OS X [UPDATE]
Today I had a problem with TextMate. There is a great feature to have a look at the schema of the current (
The error told 'rubygems' could not be found and of course it is properly installed. After I thought about it I realized that TextMate uses the wrong Ruby interpreter. How can this happen? Most of the time this will happen unrecognized, but if you hit ⇧⌃V it will check the syntax and tells you which Ruby version had been used for it. In my case it was 1.8.2 - the Mac OS X pre-installed version.
So what is happening here?
After a little investigation on the Macromates page I found this article about shell commands in TextMate. TextMate uses for some scripts a special bash initializer script (
Of course you have to re-login so the changes can take place. After this everything worked just fine.
UPDATE: If your
ActiveRecord::Base) class. When you're in the "Ruby on Rails" context you can hit ⌃⇧⌘S and it will show you the database schema in form of a tool tip. The problem I had with this feature was it doesn't worked. I had this problem for quite a while and I can remember that it worked for some time, too. Nevertheless today I decided to fix this problem.The error told 'rubygems' could not be found and of course it is properly installed. After I thought about it I realized that TextMate uses the wrong Ruby interpreter. How can this happen? Most of the time this will happen unrecognized, but if you hit ⇧⌃V it will check the syntax and tells you which Ruby version had been used for it. In my case it was 1.8.2 - the Mac OS X pre-installed version.
So what is happening here?
After a little investigation on the Macromates page I found this article about shell commands in TextMate. TextMate uses for some scripts a special bash initializer script (
bash_init.sh) which loads the systems bash profile or your own. Due to this those scripts which will use this script will have the correct environment and path. But those scripts which doesn't utilize this will inherit the environment from their parent process, which is TextMate, which has inherited from WindowServer. To 'fix' this you can add in ~/.MacOSX/environment.plist a new key/value pair which contains the 'correct' path you want to use in your non-Terminal applications. Mine looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/bin:/usr/sbin</string>
</dict>
</plist>
Of course you have to re-login so the changes can take place. After this everything worked just fine.
UPDATE: If your
environment.plist doesn't exists just create it and copy the snippet from above into the file.Montag, 24.09.2007
RailsConf Europe is over
RailsConf Europe is over
That was RailsConf Europe 2007. It was way to soon over, but never the less it was a great experience. For Andi and me this was the first time we attended any conference and our expectations got surpassed. The atmosphere at the conference was just great, so next year we will be back for sure.
In this post I want to give just an general overview about the experience we had and I will post more on special topics that I found especially interesting. So let's start.
First of all, the speakers of the sessions I attended were just great. The keynotes were great too, of course.
Keynotes
The first keynote was held by Dave Thomas. He avoided to give a Rails centric talk and instead of this talked about writing beautiful code, engineering and art. For him we should act while coding a lot more like an artist does while painting for instance. For an artist it is nothing unusual to do massive prototyping and throw away those that doesn't fit. And he goes further when he said, developing software for a customer is a lot like drawing a portrait. It's not about just capturing the surface, that's what we have pictures for. Portraits, like software, is more about going under the surface, seeing what's behind the obvious and find the unique characteristics of a person or the customer needs. He closed his keynote with the words "engineering is in art and art is in engineering". So the one cannot exist without the other.
I think there is a lot of truth in those words. Only something that is build with beauty and elegance, what ever this means for a certain domain, can be considered as a great work engineering. Ruby and Rails are both tools that allow us to come with this challenge more easily than some other technologies. We should take that chance and wield our tools well to build better applications that comply better to needs of their users.
The other keynote I want to mention here was held by Craig McClanahan from Sun. He had only 15 minutes but nevertheless he had a lot to say. DHH mentioned already some part of his speak, so I want to concentrate on the parts I found especially interesting. Besides that is heavily investing in bringing Rails to the enterprises with their broad support of JRuby and NetBeans 6.0 he mentioned that the typical Rails application less a Web 2.0 Application is than thought generally. McClanahan doesn't even call it Web 2.0 but Next Generation Web. For him it is more about mash-up systems that aggregate services from different sources all over the web to provide a new experience to their users.
While in the Java world services and service oriented architectures more accepted and spreaded in the Rails world we lack at many places this insight. To confirm this statement he mentioned some plugins that rely heavily on ActiveRecord::Base instead of providing their functionality independently. Even in the Java programming language you can build extensions that are generically integrated so Ruby must be by design better suited for this task. He called this Duct Tape Typing instead Duck Typing.
I think McClanahan is very right in what he said at his keynote. Maybe Rails developers should look more what happens over there in the Java world. Those guys are building webapps for years and made a lot of mistakes over that time. But those mistakes have been identified and addressed. So why not learn from them, Java isn't only a fully bloated language. You can see beautiful OO design and architecture coming from there.
For our actual project we need to do some refactoring anyway, so I think this is a perfect time to look over the code with that at the back our mind's.
The rest of the keynotes were still interesting but I'm not gonna mention them here. I'm sure others will do so, and those I wrote about were those that had fascinated me the most. I'm a little busy at the moment so the posts about the other interesting stuff will take some more time.
Thanks for reading!
Dirk
That was RailsConf Europe 2007. It was way to soon over, but never the less it was a great experience. For Andi and me this was the first time we attended any conference and our expectations got surpassed. The atmosphere at the conference was just great, so next year we will be back for sure.
In this post I want to give just an general overview about the experience we had and I will post more on special topics that I found especially interesting. So let's start.
First of all, the speakers of the sessions I attended were just great. The keynotes were great too, of course.
Keynotes
The first keynote was held by Dave Thomas. He avoided to give a Rails centric talk and instead of this talked about writing beautiful code, engineering and art. For him we should act while coding a lot more like an artist does while painting for instance. For an artist it is nothing unusual to do massive prototyping and throw away those that doesn't fit. And he goes further when he said, developing software for a customer is a lot like drawing a portrait. It's not about just capturing the surface, that's what we have pictures for. Portraits, like software, is more about going under the surface, seeing what's behind the obvious and find the unique characteristics of a person or the customer needs. He closed his keynote with the words "engineering is in art and art is in engineering". So the one cannot exist without the other.
I think there is a lot of truth in those words. Only something that is build with beauty and elegance, what ever this means for a certain domain, can be considered as a great work engineering. Ruby and Rails are both tools that allow us to come with this challenge more easily than some other technologies. We should take that chance and wield our tools well to build better applications that comply better to needs of their users.
The other keynote I want to mention here was held by Craig McClanahan from Sun. He had only 15 minutes but nevertheless he had a lot to say. DHH mentioned already some part of his speak, so I want to concentrate on the parts I found especially interesting. Besides that is heavily investing in bringing Rails to the enterprises with their broad support of JRuby and NetBeans 6.0 he mentioned that the typical Rails application less a Web 2.0 Application is than thought generally. McClanahan doesn't even call it Web 2.0 but Next Generation Web. For him it is more about mash-up systems that aggregate services from different sources all over the web to provide a new experience to their users.
While in the Java world services and service oriented architectures more accepted and spreaded in the Rails world we lack at many places this insight. To confirm this statement he mentioned some plugins that rely heavily on ActiveRecord::Base instead of providing their functionality independently. Even in the Java programming language you can build extensions that are generically integrated so Ruby must be by design better suited for this task. He called this Duct Tape Typing instead Duck Typing.
I think McClanahan is very right in what he said at his keynote. Maybe Rails developers should look more what happens over there in the Java world. Those guys are building webapps for years and made a lot of mistakes over that time. But those mistakes have been identified and addressed. So why not learn from them, Java isn't only a fully bloated language. You can see beautiful OO design and architecture coming from there.
For our actual project we need to do some refactoring anyway, so I think this is a perfect time to look over the code with that at the back our mind's.
The rest of the keynotes were still interesting but I'm not gonna mention them here. I'm sure others will do so, and those I wrote about were those that had fascinated me the most. I'm a little busy at the moment so the posts about the other interesting stuff will take some more time.
Thanks for reading!
Dirk
Montag, 17.09.2007
Just checked into the conference

Hi Folks,
I already arrived yesterday in Berlin and so I checked in today. Andi is coming later this day (I'm gonna pick him up at 5 p.m. at Berlin main station). Till then I will sit here in the Maritim Lobby and will look around.
Can't wait that the conference starts!
cu & greetz
Railsbros Dirk
Freitag, 14.09.2007
Looking forward to RailsConf Europe
We are happy to join the RailsConf Europe this year. It takes place in Berlin and Starts on Monday 17.09.07. We just have Conference Sessions Tickets, so the first thing we will do, is enjoying Dave Thomas Keynote on Monday Evening.
See you in Berlin.
RailsBros Dirk & Andi
See you in Berlin.
RailsBros Dirk & Andi