Multiple Rails applications with mod_rails on Ubuntu
April 30, 2008
It works as advertised!
The installer provides exhaustive built-in documentation, describes every step and suggests solution for every unmet requirement like “please install Apache headers with apt-get install apache2-prefork-dev”. Other guys and we all can learn a lot
from mod_rails about how a perfect installer looks like.
At the end of the installation process it asks to put three configuration lines into apache configuration file although it does not tell how. According to online documentation the requirement is that these lines should be only executed once.
So my solution (in Debian way) is to
- create new passenger.load file in /etc/apache2/mods-available
- create a symbolic link to it
a2enmod passenger
Continue reading "Multiple Rails applications with mod_rails on Ubuntu"
Create the most scalable HelloWorld application in the world with Google App Engine
April 16, 2008
If you have the luck to use the programming language and technology that
Google uses, then you can use Google App Engine
to host your web application and scale almost indefinitely.
Google App Engine is very different to Amazons’s approach.
- it serves code, so no virtual machines
- for web applications only (based on WSGI). WSGI is the de facto standard interface between a web server and a web application or framework in the Python world
- App Engine includes Python runtime (version 2.5.2)
- pure Python, no C extensions allowed
- includes non-relational data-store. Something that feels like tuple spaces?
- plus usual administration stuff
You can start the most scalable HelloWorld application in the world with the following lines:
from google.appengine.ext import webapp
class MyHandler(webapp.RequestHandler)
There will be nothing Google specific in the web part of your application. It is WSGI-based so you can host it at Google or within your own Apache HTTPD through mod_wsgi.
The bigger concern is this special data store, for which no open source replacement exist.
So you can not use a relational database with such distributed system like App Engine, but if you use this Google Datastore then you trapped into a dependency, that can not be removed easily. And introducing an additional abstraction layer for data access is not the way to success with a dynamic programming language, fast development and being happy.
Appearance matters
April 4, 2008 | TrackBack (0)
![]()
No, I am not talking about preparation for a date or for an interview. I am still talking about a prototype I am working on. Even if you told that there is no need for special styling and a professional web designer will prepare something two weeks later, and the application should simply work, so it is possible to play around a bit with it.
And because you love the semantical nature of the html you start with a pure html with this scientifical styling. That means no styling at all. But even if you are not a professional designer, exactly like me, you should take one or two hours to create some basic stylesheet to make the user interface pretty less ugly.
- create a rails layout and a partial for the navigation
- put all the items into the menu (even if you are going only to implement one use case / function in your prototype), it will give the page some structure
- use the color schema of the customer Powerpoint presentation for your CSS
- adjust the
displayattribute for relevant elements
For example, if you want the main navigation to be shown in one row at the top of the screen and you have implemented the menu as unordered list <ul> then put something like
ul.main_menu li {
display: inline;
background-color: orange;
padding: 4px;
font-weight: bold;
}
into your CSS file.
Rapid Prototyping with Rails
April 2, 2008
I am currently in Zürich and working on an extemely hot startup project there. The customer heard that with Rails you can prototype pretty fast…
I am working with two experienced Java- and J2EE- developer there, however they did not have any Ruby- or Rails- experience. So my task for this week is to create a prototype and at the same time to spread some Ruby but especially Rails knowledge among developers.
So after tree days:
- we have discussed the requiremnts and the problem domain with the project owner
- everybody has his devenv, mysql running
- new developers are confident in the usage of
rake, scaffolding andscript/generatein common, named routes and routing debugging - every developer created (and commited) his part of the model, along with rudimentary (adjusted scaffold-generated) user interface
- we have put some lookup-data into db data migrations
- we had an internal show and decided to make some changes on the workflow and the user interface
It is unbelievable, how much you can achive with learning/teaching Rails provided:
- people are open to the new concepts
- the motivation is high and there is a practical problem at hand
Wrong tradeoffs and hardware design
March 28, 2008
Some people know how to build parts of a computer together, know what makes up a good computer and what computer users really need. Some others do not. It is a pity, that responsible engineers at a major computer manufacturer belong to the latter category.
Lets have a look at my two and a half year old Thinkpad T43.
Continue reading "Wrong tradeoffs and hardware design"
From Ubuntu to Mac OS X and back in less than one week!
March 27, 2008
I have been using Ubuntu Linux as my primary OS for about one year now. The advantages are:
- on the desktop you use day for day the same tools you need on the server as
soon as you deploy your application
- tomcat, rails and glassfish are installed exactly the same way you will install it on the server later
- you get no culture shock if you have to use ssh, bash and vi on the server
- the system is highly customizable: you can completely redefine your keyboard including CapsLock and other modifier keys or do less important but funny things like making your keyboard light flashing when a new email arrives
- extremely easy installation of desktop, office or server applications, you are
always only one
sudo apt-get install program-nameaway. Compare it to any Windows based 8 step installation wizard
However, there are some disadvantages regarding hardware support,
Continue reading "From Ubuntu to Mac OS X and back in less than one week!"
The weather
March 25, 2008
It has snowed for 5 days in a row. Pretty untypical for the end of march in the Lower Rhine area.

So the official season start at the local wind surfing club in two weeks has obviously to be postponed… I have a cold anyway :-(
Google Groups vs. HTTP as Application protocol
December 22, 2007
While advising customers regarding the use of RESTful Web Services I notice over and over again how powerful the HTTP protocol is and how rich the communication patterns described therein are. For example, if you wish to protect some resource with a user name and password you can simply use basic or digest authentication (as described in RFC 2616) If somebody or something (a user via a web browser or a feed aggregator or a different application in a B2B scenario) tries to access the resource without providing the credentials, he/it will receive '401 Unauthorized'. That means, that the request requires user authentication and the response contains a WWW-Authenticate header field containing a challenge applicable to the requested resource, so the client knows which authentication schema it has to use.
Now to the actual problem. At our company we have started using Google Groups for internal (not customer related) technical discussions. It is possible to setup a private discussion group at Google, that is only accessible to users, that are explicitly listed. And Google Groups provides an Atom feed containing recent group messages. So far so good. Unfortunately I was able to access the feed neither from my favorite web aggregator, nor from my Mozilla Thunderbird Feed Agent. After some debugging I've found why.
Continue reading "Google Groups vs. HTTP as Application protocol"
10 Reasons not to use Google Apps
September 16, 2007
Microsoft provided a list of 10 reasons not to use Google Apps.
Can not agree to most of them, even for enterprise. But I have my very personal list of problems with Google Apps, although I think all of them are solvable:
If you use a google apps account you can not use most of the google services, like web history or my places on google maps. It works, if you create a new google account with your google apps id as secondary email address. The concept of gmail account vs. google account is pretty tricky, so it took 4 posts for a google employee Steve to explain the point ;-).No IMAP access to mails. IMAP is the standard for accessing emails stored on the server. Standards are great for accessing stuff in, you know, the standard (uniform) way. I know, gmail web interface with its incredible full search capability and usability is really great. But for some special cases you really wish the standards:
- checking for the mails on your mobile phone even in sleep mode
- some sort of automatic processing of emails
- using non browser mail client uniformly for multiple accounts
Google apps uses completely different URL structure than gmail. So all the great gadgets and widgets, that make the integration with mail so pleasant, are not aware of it and do not work:
- Gmail for mobile application does not work
- the gmail widget of netvibes aggregator shows recent mails but the links do not work
- mail notifier in the google toolbar does not work
Besides that I am a big fan of google apps and looking forward for google to fix the problems. Eventually google apps should leave the beta phase.
The adoption for the enterprise in Europe could primary fail on google conspiracy considerations but it is another story…
Software release is like body building
June 29, 2007
If your are trying to make muscle gains, you eat more and do heavy lifting. But during this phase you are gaining fat as well. When bodybuilders prepare for the competition, they try to lose body fat to achieve better muscle definition. This “cutting” phase starts 3-4 months before competition. More tips and tricks from the guy I meet in the office daily (in German).
In a software project you have the requirement to develop new features while keeping the holy green build. This requirements are often contradictory in a bigger project (with 200 developers for example, like one I am currently working for).
Continue reading "Software release is like body building"
Aggregating iCal with a simple python script
June 26, 2007
My current solution is to use a universal iCal viewer of netvibes.com (one iCal source capable). Below is how it looks like:

And here is a proxy script I have put on my web server, that aggregates multiple iCal sources.
Continue reading "Aggregating iCal with a simple python script"
Fixing Google Calendar with Yahoo Pipes
June 25, 2007
I use Google Calendar for managing my appointments and similar stuff. In particular I created my personal calendar and a calendar for innoQ events, that can be shared by all colleagues. I can imagine couple more calendar instances like if my wife wants to have one or one for windsurfing club in Kaarst.
The main google calendar UI is great and you can select multiple calendars to see them at once. But unfortunately not in the embeddable version - you can only show them individually. And even iGoogle on google.de does not work properly. I mean it shows the month, but it does not show any appointments, as lot of people noticed.
Continue reading "Fixing Google Calendar with Yahoo Pipes"
Six-hole-puncher 2.0
June 9, 2007
I was trying to switch to a paperless office for quite a time. Working on different computers and different operating systems it was impossible to find a tool or a set of tools that worked for me.
And from the functionality aspect I saw nothing comparable to my black paper based organizer. I was even thinking about buying a six-hole-puncher to implement ;-) some extensions or even simply to extend the useful life of my organizer.
So called Web 2.0 solutions were getting better and better and most of them are trying to support open standards like iCalendar or provide information via RSS or Atom feeds. So I found the solution of my dreams.
Continue reading "Six-hole-puncher 2.0"
Jython
May 27, 2007
In the project I am currently working on we use python and jython for acceptance tests.
It would be also a great platform for enterprise applications, be it web applications, service oriented system or anything else.
Regarding long term trend I agree with the following explanation, I recently went across:
What is Jython?
Jython, lest you do not know of it, is the most compelling weapon the Java platform has for its survival into the 21st century:-)
Surfing
May 26, 2007
This weekend I am attending a surfing course on Kaarster See . I mean not an internet surfing but wind surfing.
But if you are interested in internet surfing, I have some tips for you too…
Upgrade to Feisty Fawn and the evil Howtos
May 25, 2007
Last weekend I upgraded all my comps to the newest Ubuntu version “Feisty Fawn”. Started with the computer of my daughter, then proceeded with my Thinkpad Notebook, then upgraded the server. All important things are working now:
- mac style desktop
- wobbling the terminal window on terminal bell, see the howto that works
Continue reading "Upgrade to Feisty Fawn and the evil Howtos"
Time sheet - parsing input with Python
January 21, 2007
We will start developing our application in python.
For the examples you will need a simple text editor like vi or notepad. Or you can even type in the code directly to your python interpreter console. My favorite plain text and code editor is scite. Mac geeks will take the textmate (their only mate ;-) ) just kidding, I'm simply jealous with my boring black PC.
First, lets design our input format. It should be text oriented and easy to type and read, with other words, go into the direction represented by wiki movement and DSLs (domain specific languages).
Continue reading "Time sheet - parsing input with Python"
Time sheet - the use case
January 14, 2007
Somebody said "We, developers have a great privilege to be able to develop tools for ourselves".
At our company we have to print out our time sheet every month, let the customer sign it and transfer it to the accounting department. At the end of the month we also hand in the travel costs report, which (for every day of the month) contains the name of the customer, the address of the customer's site (for computing the kilometer allowance), the working time and the particular costs.
By the way, later the tax inspector does some sort of consistency check, so it appears logical to create both documents from the same source.
I was using excel sheets, I mean two separate sheets for time sheet and for travel costs. I mean the first one is on my desktop computer at customer's office (if the project takes longer) and the second one is at home (I do not always carry my notebook with me, it is not allowed to connect it to customer's network anyway). I tried to combat synchronization problems with google docs. You upload your excel sheet, edit docs online with some ajax magic and if you have luck, you can continue editing from any other place. The idea is great and I love all the google products anyway, but this one is a beta, you know. ;-)
I could continue with different scenarios involving a paper based note-book and cross media synchronization problems, but you already got the idea what a mess it is.
The idea to program some application, preferably a web application is obvious. I've heard, some of our guys even started to implement this but abandoned it later. I can imagine why...
A developer can make his own tool, but the time/energy saving must outweigh the development effort. Unfortunately, the case is not so often even for an experienced Java / EJB developer.
Lets have a look on how you can be much more successful with a better programming language and better platform, both feature clean and readable syntax, powerful language concepts, well-thought intuitive API and a light-weight easy-to-install runtime environment.
I am not talking about Ruby on Rails, although it is pretty close to that.
After I've promised so much, stay tuned for the practical solution.
Blog name
January 7, 2007
I eventually found the subtitle for my blog. “opinionated blog about non-opinionated software”.
Motivation:
I love opinionated blogs like Joel’s. Sometimes it is polarizing and I can not always or even often agree with the author, but I like to hear / read different and unorthodox opinions.
In opposite, with the software and especially source code I strive for elegance and consensus. We should end up with a code that (possibly) everybody in the team loves and which complies with principles like DRY (do not repeat yourself) and is short and easy understandable and maintainable. The opposite to unmaintainable one.
Is Ruby enterprise ready? Agile Web Development with Rails - failed in chapter six
October 25, 2006
Recently I saw on TV the movie “Contact” with Jodie Foster. The story is about a radio astronomer (Jodie Foster) who discovers an intelligent signal broadcast from deep space. She and her fellow scientists are able to decipher the Message and discover detailed instructions for building a mysterious Machine. (description from IMDB) She explains to the guys from the government and pentagon, that the message is based on primary numbers and contains different mathematical theorems and that mathematics is the universal language, that every advanced civilization can understand. Than the guy from the pentagon asks, if these aliens were so intelligent, why do they not send their message in our language. Jodie Foster explains, that the creatures from the other side of the galaxy speak an other language then english and even on our planet 80 percent of people speak an other language then english.
But what really shocks me, that the guys on loudthinking.com show the same attitude as the pentagon bonehead from the movie. “lots of people are happy with rails and successfully develop software without unicode”…
