WPtouch is a great Wordpress plugin to get your blog rendered perfectly for mobile browsers.
WPtouch: WordPress on iPhone, iPod & Android
March 7th, 2009Techniques used for Touradero
December 29th, 2008For Touradero, my second Ruby on Rails baby I used the following techniques:
plugins/libraries:
- attachment_fu
for uploading and handling images - geokit
for geolocating the Venues - YM4R
greatest plugin for doing all the GoogleMaps stuff - prototip
Javascript library for easy rendering of complex tooltips - Redcloth
to allow Users to rich-format their content - calendardateselect
a great datepicker with rails integration - a sligthly tweaked version of John Resig’s prettyDate snippet
to display several timestamps in the format “3 weeks ago”
techniques:
- partial caching
… I heavely used partial caching to keep this baby fast - MySql full text search
after trying around with ferret I decided to use “MySql full text search”. For me it is the best choice, even though I had to learn some things about it.
The whole system is running on a busy 256 MB VPS using mod_rails and Ruby Enterprise Edition. … and for that low server profile I am quite happy about the speed.
Touradero.com
December 24th, 2008Some time ago I released my second RoR webapp:
Touradero is thought as a platform for venues and artists. Venues can be added to the database. Further on, Artists may search for Venues that fit their musical style or their art form.
At the moment Touradero is in a good beta phase. For now my plan is to get as many as possible venues as entries. After that is done I will introduce the site to the bigger user base.
So if you are somehow connected with venues or you want to ask at your favorite venue if they want to add to Touradero, then I will love you forever!
Beware the ClassCastException (a tale of a native Memory Leak)
November 15th, 2008Far too long we were struggling with a Java memory leak obviously produced by one of our 3rd party libraries that we were using.
Fortunately, we had the source code.
After weeks, Heli my coworker had the right clue!
He wrote a detailed article about what JVM bug we ran into:
Beware the ClassCastException (a tale of a native Memory Leak)
mod_rails - the tryout - the success
September 5th, 2008Some months ago I wrote this post: mod_rails - the tryout - the failure (for my situation) where I addressed my problems running a RoR application on a VPS using mod_rails.
In the meantime, according to their blog, the Phusion guys have addressed this issue:
In the last couple of days I took the chance to try it once again.
And today, I am a lucky guy. Having a stable webapplication running under mod_rails and Ruby Enterprise Edition.
It’s stable, phreaking fast and the memory footprint is great (even better than a mongrel system).
mod_rails really is ready for VPS enviroments!
Tupalo.com / The Gap Magazine ARS Electronica After-Party
August 26th, 2008Tupalo.com, my favorite places application, and the Gap Magazine invite us all to their
ARS Electronica Festival after-party
The ARS Electronica Festival is a big festival for electronic art in Linz, Austria
Cafe Strom
Linz, Oberösterreich 4040
Tupalo.com / The Gap Magazine ARS Electronica After-Party @ Upcoming
Tips from a Top Sports Team Coach
August 21st, 2008Wow! Great Great article: Tips from a Top Sports Team Coach
Urs Peter attended a coaching seminar where Marc Lammers, the (very successful) coach of the Dutch women’s national field hockey team, gave the keynote speech.
Urs Peter took some great quotes from Mr. Marc Lammers and translated them in his one way what it could mean in the world of Software development.
For me a must-read!
[via InfoQ]
MySQL FULLTEXT and its strange behaviors
August 16th, 2008As written some time ago, I switched from implementing fulltext search from Ferret to MySql FULLTEXT!
…. and I was quite happy with that decision for some time, MySql FULLTEXT:
- was fast enough
- seemed to bring up the results I was expecting
- it works with every charset
- after adjusting ft_min_word_len it was indexing short enough terms
- rails specific: it was just a SQL call, so easy to integrate with e.g. pagination plugins
… but after some time, adding more data, and playing around, I discovered more and more some strange behavior:
Searches that were returning plausible results in the past were suddenly returning a empty result list!
Every straw I found on the Internet, like rebuilding the index etc. did not bring any more light to this situation.
So I was a good boy and really RTFM: MySQL Fulltext manual
The search result is empty because the word “MySQL” is present in at least 50% of the rows. As such, it is effectively treated as a stopword. For large data sets, this is the most desirable behavior: A natural language query should not return every second row from a 1GB table. For small data sets, it may be less desirable.
A word that matches half of the rows in a table is less likely to locate relevant documents. In fact, it most likely finds plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for the particular data set in which they occur. A given word may reach the 50% threshold in one data set but not another.
Aha, that’s it:
Since I was indexing e.g. countries and even tags via this index, It was most likely that there where more than 50% of datasets having this term and so they automatically were seen as stopwords.
Ok, nice standard behavior. But not for me!!!
So how to get rid of it:
The 50% threshold for natural language searches is determined by the particular weighting scheme chosen. To disable it, look for the following line in
storage/myisam/ftdefs.h:#define GWS_IN_USE GWS_PROBChange that line to this:
#define GWS_IN_USE GWS_FREQThen recompile MySQL. There is no need to rebuild the indexes in this case.
No, f*** off! I don’t want to recompile MySQL to get Fulltext working. My MySQL build from my Debian distribution is working quite fine.
Is there no other solution? Yes there is:
Users who need to bypass the 50% limitation can use the boolean search mode; see Section 11.8.2, “Boolean Full-Text Searches”.
So adding a short “IN BOOLEAN MODE” to the SQL query was the perfect solution! (… for me, hopefully using boolean mode works for you)
RedCloth and ‘target’ for links
July 31st, 2008I always wondered why RedCloth, or more exact the underlying Textile, does not give you any possibility to define ‘target’ attributes for links.
Searching the web for a solution ended up with no pleasing results. What I found were a bunch of fellows who suffered like I did
So I coded this little snippet that does exactly what I wanted. It add to all links “target=’blank’”. I use this method as replacement for texitilize
def redclothify(text, add_blank_targets_to_link = true)
res = RedCloth.new(text).to_html
res.gsub!(/<a/,"<a target='_blank' ") if add_blank_targets_to_link
return res
end
Way far from being perfect, but does just that what I needed. … and maybe some tip for a fellow out there to dig deeper!

