<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17220805</id><updated>2012-02-08T14:19:54.090+01:00</updated><category term='recommendation'/><category term='donotuse'/><category term='diigo'/><category term='git'/><category term='ceph'/><category term='drivers'/><category term='polish'/><category term='software'/><category term='cluster'/><category term='printer'/><category term='bugtrack'/><category term='phantomjs'/><category term='apps'/><category term='delicious'/><category term='mac'/><category term='link'/><category term='team'/><category term='hate'/><category term='tagging'/><category term='recruitment'/><category term='coffeescript'/><category term='hp'/><category term='chef'/><title type='text'>Ragnarson</title><subtitle type='html'>Developing web applications</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17220805.post-6202443701920600469</id><published>2011-10-26T12:49:00.000+02:00</published><updated>2011-10-26T13:26:16.526+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='chef'/><category scheme='http://www.blogger.com/atom/ns#' term='ceph'/><title type='text'>Our own Chef cookbook for Ceph</title><content type='html'>My first task at Ragnarson was to deploy new distributed file system - &lt;a href="http://ceph.newdream.net/"&gt;Ceph&lt;/a&gt;. The only proper way of deploying software at our servers is by using &lt;a href="http://wiki.opscode.com/display/chef/Home"&gt;Chef&lt;/a&gt;. When I started i didn't know anything about Chef or Ceph, but it wasn't so hard after all.&lt;br /&gt;
&lt;br /&gt;
In Ceph architecture we can distinguish three types of nodes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;mds - metadata server daemon. It's crucial to has at least one mds node, its role is to coordinate access to osd nodes, cache and manage metadata. Our cluster has one "primary" mds. Each additional node is on 'standby', which means that we always have backup mds nodes ready to deploy.&lt;/li&gt;
&lt;li&gt;mon - monitoring daemon. We need one, three or other odd number of monitoring nodes. It is closely related to Paxos algorithm, used to achive consensus among distributed systems. Monitor manages cluster map.&lt;/li&gt;
&lt;li&gt;osd - object storage daemon. Basically it holds data, having at least two osd nodes is required. Data distribution is described in CRUSH map. At this moment our cookbook provides CRUSH only for data redundanc. &lt;/li&gt;
&lt;/ul&gt;
As NewDream developers promise, Ceph should offer:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;"Distributed file system, easily accessed via kernel client or fuse driver". Fuse driver works great, kernel client not so much. We've had some random crashes, but even Ceph wiki confirms that fuse driver is more stable and it's recommended one.&lt;/li&gt;
&lt;li&gt;"Object storage - Clients talk directly with storage nodes to store named blobs of data 
and attributes, while the cluster transparently handles replication and 
recovery internally". This part works very well and seams to be as much reliable as should be. Replication is almost seamless and always on time, even if your osd/mds daemon crash during heavy load. &lt;/li&gt;
&lt;li&gt;"&lt;b style="font-weight: normal;"&gt;Robust, open-source distributed storage". From what I know, we are using other distributed file system at different cluster and it isn't as reliable as it should be. So it's big chance for Ceph, to be our primary clustered fs. So far it behaves great, simulated test crashes went good enough to move our log backups to Ceph.&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;b style="font-weight: normal;"&gt;This very brief description and comment about Ceph and most &lt;/b&gt;&lt;span class="short_text" id="result_box" lang="en"&gt;&lt;span class="hps"&gt;interesting features. More can by found in the&amp;nbsp;&lt;a href="http://www.ibm.com/developerworks/linux/library/l-ceph/?ca=drs-"&gt;article&lt;/a&gt; posted at IBM website. Ceph &lt;a href="http://ceph.newdream.net/docs/latest/"&gt;doc&lt;/a&gt; and &lt;a href="http://ceph.newdream.net/wiki/"&gt;wiki&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; are also good places to start.&lt;br /&gt;
&lt;br /&gt;
&lt;b style="font-weight: normal;"&gt;&lt;/b&gt;&lt;br /&gt;
Now our Chef cookbook, it's publicly available at &lt;a href="https://github.com/Ragnarson/cookbooks"&gt;github&lt;/a&gt;. It's my first Chef 'big' thing so code may be a little rough, but it's reliable and heavily tested. Forks, pull requests, comments are welcome.&lt;br /&gt;
&lt;br /&gt;
Available recipes (each node recipe provides service definition, code is well commented, there isn't much to add):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;default.rb - basic recipe. Installs necessary packages at debian/ubuntu, generates ceph.conf required by nodes and clients.&lt;/li&gt;
&lt;li&gt;mds.rb - configures mds. Two cases: setting up first mds and expanding cluster, first mds is primary, each next is backup. &lt;/li&gt;
&lt;li&gt;osd.rb - configures osd. Two cases like mds, it's also generates subsequent osd ids. Because osds can't have literal names, at this moment each osd have the same data and you need two to start cluster.&lt;/li&gt;
&lt;li&gt;mon.rb - configures mon. Three cases this time, first is initial mon, second expanding cluster by additional mon it requires mon_snapshot.rb, third is registering new mons at existing one.&lt;/li&gt;
&lt;li&gt;mon_snapshot.rb - it should create mon snapshot which is required to expand cluster as described at &lt;a href="http://ceph.newdream.net/wiki/Adding/removing_Monitors"&gt;wiki&lt;/a&gt;. Because of data_bag bug it's done by hand now, it will be fixed after upgrading Chef to latest version.&lt;/li&gt;
&lt;li&gt;prepare.rb - it's our internal recipe. Creates directory structure at cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
At start we need initial cluster, one node with each recipe fully executed (1 mds, 1 osd, 1 mon), now our cluster will be in degraded state, we should have at least two osd nodes. Expanding is done by adding recipes to run_list. During adding new osd or mds after first chef-client run, you have to run once chef-client at mon.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red;"&gt;IMPORTANT:&lt;/span&gt; During process of adding even mon, cluster will be offline. As it was described total number of mon nodes have to be odd.&lt;br /&gt;
&lt;br /&gt;
Recipes also provide templates for monitoring software - munin and monit. Munin monitoring is done by &lt;a href="https://github.com/Ragnarson/cookbooks/blob/master/ceph/templates/default/ceph-perf.erb"&gt;ceph-perf&lt;/a&gt; which communicates with ceph administrative &lt;a href="http://ceph.newdream.net/docs/latest/dev/logs/#performance-counters"&gt;sockets&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b style="font-weight: normal;"&gt;&lt;/b&gt;&lt;br /&gt;
Ceph has also great, always willing to help developers. Only pity is that they are from US time zone. You can contact them through &lt;a href="http://ceph.newdream.net/mailing-lists-and-irc/"&gt;irc&lt;/a&gt; channel #ceph at oftc network.&lt;br /&gt;
&lt;b style="font-weight: normal;"&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style="font-weight: normal;"&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6202443701920600469?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6202443701920600469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6202443701920600469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6202443701920600469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6202443701920600469'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/10/our-own-chef-cookbook-for-ceph.html' title='Our own Chef cookbook for Ceph'/><author><name>Szymon</name><uri>http://www.blogger.com/profile/02791182407173515560</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6202154926740638388</id><published>2011-10-11T10:52:00.005+02:00</published><updated>2011-10-11T11:26:47.316+02:00</updated><title type='text'>Łódź Ruby User Group - 20 października, 18:00</title><content type='html'>&lt;div&gt;Zapraszamy wszystkich, których interesuje programowanie aplikacji webowych na spotkania łódzkiej grupy użytkowników Ruby. Kolejny LRUG już &lt;b&gt;20 października o 18:00&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Agenda:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Wprowadzenie do websockets ‐ Bartłomiej Kozal, Ragnarson&lt;/li&gt;&lt;li&gt;Faye w Ruby on Rails ‐ Grzegorz Kołodziejczyk&lt;/li&gt;&lt;li&gt;Przetwarzanie GB danych w czasie rzeczywistym z wykorzystaniem Goliath i Resque ‐ Łukasz Piestrzeniewicz, Ragnarson&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Spotykamy się w biurze firmy Ragnarson (Łąkowa 11, główny budynek z cegły, 1. klatka, 1. piętro)&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Szczegóły na plakacie: &lt;a href="http://cl.ly/273S0N3v3k1A1a1Q291b"&gt;http://cl.ly/273S0N3v3k1A1a1Q291b&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Na facebooku: &lt;a href="https://www.facebook.com/event.php?eid=231154956942784"&gt;https://www.facebook.com/event.php?eid=231154956942784&lt;/a&gt;&lt;/div&gt;&lt;div&gt;I na stronie: &lt;a href="http://www.lrug.pl/"&gt;http://www.lrug.pl&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6202154926740638388?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6202154926740638388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6202154926740638388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6202154926740638388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6202154926740638388'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/10/odz-ruby-user-group-20-pazdziernika.html' title='Łódź Ruby User Group - 20 października, 18:00'/><author><name>Bartłomiej Kozal</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-586071823915703730</id><published>2011-10-07T13:57:00.003+02:00</published><updated>2011-10-07T14:02:37.838+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coffeescript'/><category scheme='http://www.blogger.com/atom/ns#' term='phantomjs'/><title type='text'>Navigating through many pages with phantom.js</title><content type='html'>&lt;a href="http://www.phantomjs.org/"&gt;Phantom.js&lt;/a&gt; is light, minimalistic WebKit library. Basically it acts as any modern WebKit browser but you control it with scripts written in javascript or &lt;a href="http://jashkenas.github.com/coffee-script/"&gt;coffee&lt;/a&gt;.&amp;nbsp; This turns out to be really handy when you need to automate any task that requires real web browser to be involved.&lt;br /&gt;
&lt;br /&gt;
It's really simple when you want to use phantom just to get page from one specific url.&amp;nbsp; In such case you define onLoadFinished callback on phantom's WebPage object and do all your stuff there. &lt;br /&gt;
&lt;br /&gt;
onLoadFinished is called every single time the page is loaded after new request has been made, but the only parameter it receives is load status. In most situations we want to perform different operations depending on currently loaded page. In order to do that we have to store some kind of information that identifies current page.&lt;br /&gt;
&lt;br /&gt;
The very simple solution is to store current location in some persistent attribute. So we can access and change it form onLoadFinished.&lt;br /&gt;
&lt;br /&gt;
Example: We want to use phantom to get a list of chicken soup recipies from &lt;a href="http://www.bbc.co.uk/food/recipes/"&gt;BBC Recipes&lt;/a&gt; and print it on console.&amp;nbsp; In order to do that, we first have to fill in search box with 'chicken soup' and submit the search form. Then we are getting redirected to search results page, from where we can get the list of recipes.&lt;br /&gt;
&lt;br /&gt;
Here is simple coffee script that does the job: &lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1270094.js?file=bbc_recipes.coffee"&gt;
&lt;/script&gt;

&lt;br /&gt;
Please notice that phantom.state is not defined in original phantomjs code base. We define it dynamically on phantom object. It's the popular method among phantomjs users. If you don't like it or find it dangerous, you can always use other attribute or create a global variable for that purpose.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-586071823915703730?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/586071823915703730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=586071823915703730' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/586071823915703730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/586071823915703730'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/10/navigating-through-many-pages-with.html' title='Navigating through many pages with phantom.js'/><author><name>Marcin Baliński</name><uri>http://www.blogger.com/profile/05543403875972431324</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8552006171927566110</id><published>2011-10-06T13:44:00.002+02:00</published><updated>2011-10-06T13:45:12.394+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='polish'/><category scheme='http://www.blogger.com/atom/ns#' term='team'/><title type='text'>Nowy Magister</title><content type='html'>Wczoraj&amp;nbsp;&lt;a href="http://ragnarson.com/team.html#marcin_balinski"&gt;Marcin Baliński&lt;/a&gt;, jeden z naszych programistów obronił swoją pracę magisterską&amp;nbsp;"Testowo Zorientowane Metodyki Rozwoju Oprogramowania".&lt;br /&gt;
&lt;br /&gt;
Opisuje ona jak prawidłowo rozwija się oprogramowanie w Ruby z pełnym wykorzystaniem testów i jest dostępna on-line na github:&amp;nbsp;&lt;a href="https://github.com/marcinb/thesis/blob/master/docs/balinski/thesis/Testowo%20Zorientowane%20Metodyki%20Rozwoju%20Oprogramowania.pdf?raw=true"&gt;github.com/marcinb/thesis/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Gratulujemy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8552006171927566110?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8552006171927566110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8552006171927566110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8552006171927566110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8552006171927566110'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/10/nowy-magister.html' title='Nowy Magister'/><author><name>Łukasz Piestrzeniewicz</name><uri>https://profiles.google.com/105359204521310360753</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Y7cbypNEGHU/AAAAAAAAAAI/AAAAAAAAABw/L82dAUEve3M/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-431416600582730763</id><published>2011-09-21T10:03:00.000+02:00</published><updated>2011-09-21T10:03:17.733+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugtrack'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='hate'/><category scheme='http://www.blogger.com/atom/ns#' term='donotuse'/><title type='text'>Unfuddle - do not use</title><content type='html'>There are many different bug trackers.&lt;br /&gt;
&lt;br /&gt;
For me hosted solutions that serve single purpose, do it right and allow to integrate with others are the best. This is why my toolset of choice is &lt;a href="https://www.pivotaltracker.com/"&gt;Pivotal Tracker&lt;/a&gt;, &lt;a href="https://github.com/"&gt;Github&lt;/a&gt;,&amp;nbsp;&lt;a href="http://try.37signals.com/98324"&gt;Basecamp and Campfire&lt;/a&gt;. Each of those services is perfected in its own area.&lt;br /&gt;
&lt;br /&gt;
On the other end of spectrum are tools that want to do all things at once. &lt;a href="http://unfuddle.com/"&gt;Unfuddle&lt;/a&gt; falls into this category. What you get is not tool that is good in all areas. Rather you get a half-assed product that gives mediocre performance in all features.&lt;br /&gt;
&lt;br /&gt;
Unfuddle is slow, experiences heavy featurosis and looks like it was written by guy who found out about Ajax and wanted a test field for all it's possibilities. Avoid at all costs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-431416600582730763?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/431416600582730763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=431416600582730763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/431416600582730763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/431416600582730763'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/09/unfuddle-do-not-use.html' title='Unfuddle - do not use'/><author><name>Łukasz Piestrzeniewicz</name><uri>https://profiles.google.com/105359204521310360753</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Y7cbypNEGHU/AAAAAAAAAAI/AAAAAAAAABw/L82dAUEve3M/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8489850979676489902</id><published>2011-09-20T09:19:00.004+02:00</published><updated>2011-09-20T09:19:52.849+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='recommendation'/><title type='text'>Soulver - quick calculations done right</title><content type='html'>Just wanted to spread a word about a nice piece of software that helps me with daily tasks.&lt;br /&gt;
&lt;br /&gt;
Often I need to do a quick calculation, be it counting overhead or estimating costs for our &lt;a href="http://shellycloud.com/"&gt;Ruby on Rails hosting cloud from shell&lt;/a&gt;. Firing up spreadsheet for such task is often an overkill and using &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;irb&lt;/span&gt; is cumbersome.&lt;br /&gt;
&lt;br /&gt;
Some time ago I have found &lt;a href="http://www.acqualia.com/soulver/"&gt;Soulver&lt;/a&gt; - a small tool that makes those small simulations and calculations a breeze. It's a bit on expensive side for utility but luckily it has a sane trial period that allows you to test it.&lt;br /&gt;
&lt;br /&gt;
I recommend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8489850979676489902?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8489850979676489902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8489850979676489902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8489850979676489902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8489850979676489902'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/09/soulver-quick-calculations-done-right.html' title='Soulver - quick calculations done right'/><author><name>Łukasz Piestrzeniewicz</name><uri>https://profiles.google.com/105359204521310360753</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Y7cbypNEGHU/AAAAAAAAAAI/AAAAAAAAABw/L82dAUEve3M/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-462568524658097040</id><published>2011-08-31T09:11:00.003+02:00</published><updated>2011-09-21T09:50:14.129+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='link'/><title type='text'>Link: Integrating topic branches in git</title><content type='html'>&lt;a href="http://blog.carbonfive.com/2010/11/01/integrating-topic-branches-in-git/"&gt;Integrating topic branches in Git&lt;/a&gt; - good post but still does not answer how to share and keep up to date topic branches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-462568524658097040?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/462568524658097040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=462568524658097040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/462568524658097040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/462568524658097040'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/08/link-integrating-topic-branches-in-git.html' title='Link: Integrating topic branches in git'/><author><name>Łukasz Piestrzeniewicz</name><uri>https://profiles.google.com/105359204521310360753</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-Y7cbypNEGHU/AAAAAAAAAAI/AAAAAAAAABw/L82dAUEve3M/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-5501064012329861990</id><published>2011-08-24T13:41:00.003+02:00</published><updated>2011-08-24T13:48:46.813+02:00</updated><title type='text'>Backpack app - short story about struggle with performance</title><content type='html'>&lt;div&gt;Before even we start working on backpack project we now that there will be huge amount of data (&lt;b&gt;~1/4 TB per week&lt;/b&gt;) to receive and process. Furthermore we need to receive data and answer in less then 5ms. As we all now neither the Rails or even Sinatra not cope with this task. The answer turned out to be Goliath.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;After Github Goliath README (&lt;a href="http://github.com/postrank-labs/goliath"&gt;http://github.com/postrank-labs/goliath&lt;/a&gt;):&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Goliath is an open source version of the non-blocking (asynchronous) Ruby web server framework powering PostRank. It is a lightweight framework designed to meet the following goals: bare metal performance, Rack API and middleware support, simple configuration, fully asynchronous processing, and readable and maintainable code (read: no callbacks).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The framework is powered by an EventMachine reactor, a high-performance HTTP parser and Ruby 1.9 runtime. The one major advantage Goliath has over other asynchronous frameworks is the fact that by leveraging Ruby fibers introduced in Ruby 1.9+, it can untangle the complicated callback-based code into a format we are all familiar and comfortable with: linear execution, which leads to more maintainable and readable code.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Each HTTP request within Goliath is executed in its own Ruby fiber and all asynchronous I/O operations can transparently suspend and later resume the processing without requiring the developer to write any additional code. Both request processing and response processing can be done in fully asynchronous fashion: streaming uploads, firehose API's, request/response, and so on.&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;For &lt;b&gt;MRI Ruby 1.9.2&lt;/b&gt; Goliath obtains the best results. Simple answer takes &lt;b&gt;~0.33ms (~3000 req/s)&lt;/b&gt;. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Backpack app is divided into two main parts. First, save file into hard drive and send to Resque info about it. Later Resque process file. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;For now app works on &lt;b&gt;10% of capacity.&lt;/b&gt; Important part of app, save and reply takes &lt;b&gt;~1ms&lt;/b&gt;. Mostly even less.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;We can in good conscience recommend and encourage everyone to use Goliath, wherever you need a performance.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-5501064012329861990?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/5501064012329861990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=5501064012329861990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5501064012329861990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5501064012329861990'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/08/backpack-app-short-story-about-struggle.html' title='Backpack app - short story about struggle with performance'/><author><name>Gotar (Oskar Szrajer)</name><uri>http://www.blogger.com/profile/08023331424900672749</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-ttDq4TK2QR0/TlIdZOb-dVI/AAAAAAAACBA/od9olDRECAU/s220/nowe_moje_legitka.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-2255273852970659547</id><published>2011-06-28T08:33:00.000+02:00</published><updated>2011-06-28T08:33:31.539+02:00</updated><title type='text'>Gem for Automated Invoicing</title><content type='html'>Our&amp;nbsp;&lt;a href="http://www.winniecloud.com/"&gt;PaaS for Ruby on Rails, Winnie Cloud&lt;/a&gt;&amp;nbsp;now automatically issues invoices. To do that we are using Polish &lt;a href="http://centrumfaktur.pl/"&gt;online invoicing tool - Centrum Faktur&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
When we were considering online invoicing tools Centrum Faktur had a small issue with being unable to provide prices with high enough accuracy (our &lt;a href="http://www.winniecloud.com/pricing"&gt;low prices&lt;/a&gt; require five digits after decimal coma :) ). Guys at Centrum Faktur were able to fix it within few days - even before we became their customers.&lt;br /&gt;
&lt;br /&gt;
In the end our developer&amp;nbsp;&lt;a href="https://github.com/morgoth"&gt;Wojciech Wnętrzak&lt;/a&gt; created a &lt;a href="https://github.com/morgoth/centrum_faktur"&gt;gem for accessing Centrum Faktur API&lt;/a&gt;. It is available on MIT license on Github. As usual: use it, fork it, enhance it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-2255273852970659547?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/2255273852970659547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=2255273852970659547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2255273852970659547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2255273852970659547'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/06/gem-for-automated-invoicing.html' title='Gem for Automated Invoicing'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8679999724424796000</id><published>2011-05-24T11:46:00.000+02:00</published><updated>2011-05-24T11:46:06.729+02:00</updated><title type='text'>Winnie Cloud goes to Euruko 2011</title><content type='html'>&lt;p&gt;Winnie Cloud will be present on Euruko 2011 with a special voucher code, see &lt;a href="http://blog.winniecloud.com/2011/05/winnie-cloud-going-to-euruko.html"&gt;it's blog&lt;/a&gt; for details.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8679999724424796000?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8679999724424796000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8679999724424796000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8679999724424796000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8679999724424796000'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/05/winnie-cloud-goes-to-euruko-2011.html' title='Winnie Cloud goes to Euruko 2011'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6172083653430638728</id><published>2011-04-25T18:52:00.000+02:00</published><updated>2011-04-25T18:52:58.860+02:00</updated><title type='text'>Chef indexing problems</title><content type='html'>&lt;p&gt;Chef is quite a flexible piece of software. However it's very complex and has it's quirks.&lt;/p&gt;
&lt;p&gt;Today I have solved (with help from jelder from #chef) one particularly nasty problem: node was not showing up in chef searches.&lt;/p&gt;
&lt;p&gt;Knife was able to list the node without problem, however the node did not appear in searches.&lt;/p&gt;
&lt;p&gt;Problem was caused by mentions of 3.5" floppies in node description. It seems Chef indexer was tripping on this additional quotation mark.&lt;/p&gt;
&lt;p&gt;There are two possible solutions: remove offending lines and then run knife index rebuild or install fast_xs.&lt;/p&gt;
&lt;p&gt;Great thanks to guys from #chef!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6172083653430638728?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6172083653430638728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6172083653430638728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6172083653430638728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6172083653430638728'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2011/04/chef-indexing-problems.html' title='Chef indexing problems'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-2926550076295204628</id><published>2010-12-18T09:22:00.001+01:00</published><updated>2011-09-21T09:51:25.189+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='delicious'/><category scheme='http://www.blogger.com/atom/ns#' term='tagging'/><category scheme='http://www.blogger.com/atom/ns#' term='apps'/><category scheme='http://www.blogger.com/atom/ns#' term='diigo'/><title type='text'>Switching to Diigo</title><content type='html'>I've been a long fan of &lt;a href="http://delicious.com/"&gt;Delicious&lt;/a&gt; - I have even been using it with it's original domain (&lt;a href="http://del.iciou.us/"&gt;del.iciou.us&lt;/a&gt;). Now Delicious is going away. This sucks.&lt;br /&gt;
&lt;br /&gt;
I'm moving on to &lt;a href="http://www.diigo.com/"&gt;Diigo&lt;/a&gt; - a lot of people on Twitter are recommending it. It has a lot worse design, but it works (and hopefully will work for some time). It also seems a lot of people are making switch as Diigo's import service is running out of steam :)&lt;br /&gt;
&lt;br /&gt;
Anyway: if you are using Delicious switch to Diigo as well and add me as a friend - or at least drop a notice in comments with your login so I can stalk you :)&lt;br /&gt;
&lt;br /&gt;
My bookmarks are now available on&amp;nbsp;&lt;a href="http://www.diigo.com/user/bragiragnarson"&gt;http://www.diigo.com/user/bragiragnarson&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-2926550076295204628?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/2926550076295204628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=2926550076295204628' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2926550076295204628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2926550076295204628'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/12/switching-to-diigo.html' title='Switching to Diigo'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-5929776312192697107</id><published>2010-11-08T08:35:00.000+01:00</published><updated>2010-11-08T08:35:19.709+01:00</updated><title type='text'>Why we prefer pragmatic programmers?</title><content type='html'>&lt;p&gt;A perfect summary why &lt;a href="http://news.ycombinator.com/item?id=1880964"&gt;theoretical approach fails in programming&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There is this tendency (which I can sympathise with but only to an extent) in mathematics and to an extent computer science.&lt;/p&gt;
&lt;p&gt;"Let me solve the problem once, in as general and as abstract terms as possible. Leave the lesser minds to prove the corollaries, to apply the work. Let them take on the cognitive load of rephrasing their problems into my abstracted vocubulary in order to benefit from my vast insights and my generalised theorems."&lt;/p&gt;
&lt;p&gt;But, crucially in software development, formal systems are designed for the human brain -- and not just individual brains but whole teams of them. Programs become as much a medium of communication between humans and other humans (of varying skillsets) as between humans and computers.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-5929776312192697107?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/5929776312192697107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=5929776312192697107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5929776312192697107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5929776312192697107'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/11/why-we-prefer-pragmatic-programmers.html' title='Why we prefer pragmatic programmers?'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-1644833595760593185</id><published>2010-10-24T09:45:00.000+02:00</published><updated>2010-10-24T09:45:21.568+02:00</updated><title type='text'>Why we use PostgreSQL?</title><content type='html'>&lt;a href="http://awesomeful.net/posts/45-postgresql-rails-and-why-you-should-care"&gt;Reasons why we use PostgreSQL&lt;/a&gt;. For impatient:&lt;br /&gt;
&lt;blockquote&gt;
PostgreSQL is a community effort along the same lines as the Ruby and Rails communities. This makes it a more attractive option as the direction of the project is community driven, immune to corporate politics and revenue motives.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-1644833595760593185?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/1644833595760593185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=1644833595760593185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1644833595760593185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1644833595760593185'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/10/why-we-use-postgresql.html' title='Why we use PostgreSQL?'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-5681292588982540318</id><published>2010-09-21T09:46:00.000+02:00</published><updated>2010-09-21T09:46:18.069+02:00</updated><title type='text'>Winnie Cloud - New Rails Hosting Cloud</title><content type='html'>We have launched a preview site for our&amp;nbsp;&lt;a href="http://www.winniecloud.com/"&gt;Ruby on Rails hosting cloud&lt;/a&gt;&amp;nbsp;solution called Winnie Cloud.&lt;br /&gt;
&lt;br /&gt;
Until now it was a private cloud built to support applications for our own customers. Now, as it matures, we are letting in outside developers.&lt;br /&gt;
&lt;br /&gt;
Winnie Cloud is unique due to it's &lt;a href="http://www.winniecloud.com/security_architecture"&gt;security architecture&lt;/a&gt;. You get your private instances in a private network with a share-nothing approach. While this requires some small sacrifices in terms of speed it also makes your application secure even when&amp;nbsp;&lt;a href="http://isc.sans.edu/diary.html?storyid=9574"&gt;terrible Linux kernel bugs&lt;/a&gt;&amp;nbsp;are on the loose.&lt;br /&gt;
&lt;br /&gt;
In most clouds when rogue application get's root access it can easily snoop traffic from other applications in the same cloud, including getting access to private data (such as user accounts). Winnie Cloud is secure by design and no rogue application can interfere with others.&lt;br /&gt;
&lt;br /&gt;
We will offer only a simple set of plans: small staging systems for developers and fully blown, scalable solutions for production applications. Both plans share the same setup, they only differ in scalability options.&lt;br /&gt;
&lt;br /&gt;
Winnie Cloud supports Ruby applications: Ruby on Rails versions 2.x and 3.0, and other Rack-based applications. You have Ruby Enterprise Edition 1.8.7 and Ruby 1.9.2 at your disposal. Database options are limited to PostgreSQL and MongoDB. Each application by default get's access to cron, memcached and delayed jobs.&lt;br /&gt;
&lt;br /&gt;
Feel free to &lt;a href="http://www.winniecloud.com/user_requests/new"&gt;request access&lt;/a&gt; to our private beta.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-5681292588982540318?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/5681292588982540318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=5681292588982540318' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5681292588982540318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/5681292588982540318'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/09/winnie-cloud-new-rails-hosting-cloud.html' title='Winnie Cloud - New Rails Hosting Cloud'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-7600149038828962633</id><published>2010-09-15T13:56:00.000+02:00</published><updated>2010-09-15T13:56:30.394+02:00</updated><title type='text'>Rails site_meta gem updated</title><content type='html'>&lt;a href="http://github.com/bragi/site_meta"&gt;Site_meta&lt;/a&gt; has been updated to version 1.0.0. It now supports Rails 3 only by default. Users of Rails 2.x may still use version 0.3.0 which is fully Rails 2.x compatible.&lt;br /&gt;
&lt;br /&gt;
Site_meta is a library that allows to easily specify &lt;a href="http://github.com/bragi/site_meta"&gt;meta tags in Rails applications&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-7600149038828962633?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/7600149038828962633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=7600149038828962633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7600149038828962633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7600149038828962633'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/09/rails-sitemeta-gem-updated.html' title='Rails site_meta gem updated'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-2764399439806471804</id><published>2010-06-01T09:32:00.000+02:00</published><updated>2010-06-01T09:32:21.872+02:00</updated><title type='text'>Rails servers speed comparison</title><content type='html'>&lt;p&gt;Recently we switched from Apache+Passenger to Nginx+Thin setup. Below are the benchmarks for three different setups:&lt;/p&gt;

&lt;h3&gt;Apache + Passenger&lt;/h3&gt;

&lt;pre&gt;
krypton:/usr/local/src/nginx-0.7.65# ab -n 1000 -c 10 http://www.jobeinstieg.de/
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.jobeinstieg.de (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.2.9
Server Hostname:        www.jobeinstieg.de
Server Port:            80

Document Path:          /
Document Length:        30847 bytes

Concurrency Level:      10
Time taken for tests:   68.108 seconds
Complete requests:      1000
Failed requests:        978
   (Connect: 0, Receive: 0, Length: 978, Exceptions: 0)
Write errors:           0
Total transferred:      31503224 bytes
HTML transferred:       30837175 bytes
Requests per second:    14.68 [#/sec] (mean)
Time per request:       681.079 [ms] (mean)
Time per request:       68.108 [ms] (mean, across all concurrent requests)
Transfer rate:          451.71 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    3   0.1      3       4
Processing:   338  676 193.5    641    1868
Waiting:      329  666 193.4    631    1859
Total:        341  678 193.5    643    1871

Percentage of the requests served within a certain time (ms)
  50%    643
  66%    733
  75%    784
  80%    821
  90%    942
  95%   1045
  98%   1140
  99%   1209
 100%   1871 (longest request)
&lt;/pre&gt;

&lt;h3&gt;Apache + Thin &lt;/h3&gt;

&lt;pre&gt;
krypton:/usr/local/src/nginx-0.7.65# ab -n 1000 -c 10 http://bundler.jobeinstieg.de/
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking bundler.jobeinstieg.de (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        thin
Server Hostname:        bundler.jobeinstieg.de
Server Port:            80

Document Path:          /
Document Length:        30700 bytes

Concurrency Level:      10
Time taken for tests:   77.135 seconds
Complete requests:      1000
Failed requests:        975
   (Connect: 0, Receive: 0, Length: 975, Exceptions: 0)
Write errors:           0
Total transferred:      31390033 bytes
HTML transferred:       30809033 bytes
Requests per second:    12.96 [#/sec] (mean)
Time per request:       771.353 [ms] (mean)
Time per request:       77.135 [ms] (mean, across all concurrent requests)
Transfer rate:          397.41 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    3   0.1      3       5
Processing:   230  764 471.6    599    2882
Waiting:      220  754 471.5    590    2872
Total:        233  767 471.6    602    2885

Percentage of the requests served within a certain time (ms)
  50%    602
  66%    831
  75%    992
  80%   1153
  90%   1466
  95%   1758
  98%   2042
  99%   2270
 100%   2885 (longest request)
&lt;/pre&gt;

&lt;h3&gt;Nginx + Thin&lt;/h3&gt;

&lt;pre&gt;
krypton:/usr/local/src/nginx-0.7.65# ab -n 1000 -c 10 http://bundler.jobeinstieg.de:90/
This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking bundler.jobeinstieg.de (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        nginx/0.7.65
Server Hostname:        bundler.jobeinstieg.de
Server Port:            90

Document Path:          /
Document Length:        30855 bytes

Concurrency Level:      10
Time taken for tests:   63.632 seconds
Complete requests:      1000
Failed requests:        945
   (Connect: 0, Receive: 0, Length: 945, Exceptions: 0)
Write errors:           0
Total transferred:      31328263 bytes
HTML transferred:       30817245 bytes
Requests per second:    15.72 [#/sec] (mean)
Time per request:       636.316 [ms] (mean)
Time per request:       63.632 [ms] (mean, across all concurrent requests)
Transfer rate:          480.80 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    3   0.1      3       4
Processing:   257  632 174.7    608    1481
Waiting:      249  622 174.3    600    1473
Total:        260  634 174.7    612    1484

Percentage of the requests served within a certain time (ms)
  50%    612
  66%    687
  75%    745
  80%    776
  90%    861
  95%    931
  98%   1036
  99%   1135
 100%   1484 (longest request)
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-2764399439806471804?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/2764399439806471804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=2764399439806471804' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2764399439806471804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2764399439806471804'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/06/rails-servers-speed-comparison.html' title='Rails servers speed comparison'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-9167275892707574795</id><published>2010-01-13T16:09:00.000+01:00</published><updated>2011-10-25T08:54:43.808+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='printer'/><category scheme='http://www.blogger.com/atom/ns#' term='hp'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><category scheme='http://www.blogger.com/atom/ns#' term='drivers'/><title type='text'>Mac and HP LaserJet 1018</title><content type='html'>LaserJet 1018 is not properly supported on Mac out of the box. There is a way to make it work however&lt;br /&gt;
Make sure it's turned on and plug it into your Mac. Open printing preferences. Add new printer - HP LaserJet 1018. It will ask you to select driver: search for HP LaserJet 1015 and add this printer. Now this will not work, yet.&lt;br /&gt;
&lt;br /&gt;
Open System Update and search for updates. It will find update for HP printing software, install it.&lt;br /&gt;
Open printing preferences again. Delete the printer you just added. Now add it again. This time tell it to use printer driver HP LaserJet 1022. It will work without a problem, even it's picture is familiar.&lt;br /&gt;
Thank you HP for the hassle. It's your fault, not Apple's, that you make windows-only printers.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Update (25/10/2011):&lt;/b&gt;&amp;nbsp;If you are missing the drivers install them from &lt;a href="http://support.apple.com/kb/dl907"&gt;Apple site&lt;/a&gt;. Search Google for "&lt;a href="http://www.google.com/search?aq=0&amp;amp;oq=apple+hp&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=apple+hp+printer+drivers"&gt;mac hp printer drivers&lt;/a&gt;" if the link provided is outdated.&lt;br /&gt;
&lt;br /&gt;
BTW: I have enabled comment moderation for this post. Your comment may appear next day or later - be patient and try not to double post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-9167275892707574795?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/9167275892707574795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=9167275892707574795' title='65 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/9167275892707574795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/9167275892707574795'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/01/mac-and-hp-laserjet-1018.html' title='Mac and HP LaserJet 1018'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>65</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-2388562339552658171</id><published>2010-01-13T11:17:00.018+01:00</published><updated>2010-01-19T08:30:51.889+01:00</updated><title type='text'>A New Mac</title><content type='html'>&lt;p&gt;My new iMac just arrived and requires configuration for work. I'll keep all steps necessary to build a working setup here, for myself and others.&lt;/p&gt;

&lt;h2&gt;Setting Up User Account&lt;/h2&gt;

&lt;p&gt;Snow Leopard creates your UNIX login by itself using your full name. This is stupid :) I prefer my own nick name. To change it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open Terminal and cd to /Users&lt;/li&gt;
&lt;li&gt;go to Accounts in System Preferences&lt;/li&gt;
&lt;li&gt;unlock editing&lt;/li&gt;
&lt;li&gt;right click on user's name and select advanced options&lt;/li&gt;
&lt;li&gt;change account name and home folder location&lt;/li&gt;
&lt;li&gt;confirm but do not restart yet&lt;/li&gt;
&lt;li&gt;in terminal do mv oldlogin newlogin&lt;/li&gt;
&lt;li&gt;restart now&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Required Software&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://github.com/andreberg/blacktree-alchemy"&gt;Quicksilver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://porticus.alittledrop.com/"&gt;Porticus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Xcode - it's on Snow Leopard install DVD&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.enterprisedb.com/products/pgdownload.do#osx"&gt;PostgreSQL from EnterpriseDB&lt;/a&gt; - requires changes in sysctl and restart before installation :(&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sourceforge.net/projects/dejavu/"&gt;DejaVu fonts&lt;/a&gt; - especially mono font for my terminal&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rvm.beginrescueend.com/install/"&gt;rvm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://beta.adium.im/"&gt;Adium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.smileonmymac.com/TextExpander/index.html"&gt;TextExpander&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/firefox/firefox.html"&gt;Firefox&lt;/a&gt; - for Celerity&lt;/li&gt;
&lt;li&gt;&lt;a href="http://agilewebsolutions.com/products/1Password"&gt;1Password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twitterrific.com/"&gt;Twiterrific&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://fluidapp.com/"&gt;Fluid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.choosyosx.com/"&gt;Choosy&lt;/a&gt; - opens links in specific browser&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.heliumfoot.com/mercurymover/"&gt;MercuryMover&lt;/a&gt; - move/resize windows with keyboard&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sage.ucsc.edu/~wgscott/xtal/wiki/index.php/ZSH_on_OS_X_Overview"&gt;zsh as default shell&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Return for updates...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-2388562339552658171?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/2388562339552658171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=2388562339552658171' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2388562339552658171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2388562339552658171'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/01/new-mac.html' title='A New Mac'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6249035261995911466</id><published>2010-01-11T10:21:00.001+01:00</published><updated>2010-01-14T08:31:23.521+01:00</updated><title type='text'>Zły interes</title><content type='html'>&lt;p&gt;Notka dla siebie: &lt;b&gt;nigdy, przenigdy nie robić interesów&lt;/b&gt; z:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Monika Piechota pracująca dla&lt;/li&gt;
  &lt;li&gt;HC Investment Sp. z o. o., alias&lt;/li&gt;
  &lt;li&gt;TK Development Sp. z o. o, tudzież&lt;/li&gt;
  &lt;li&gt;Central Fund of Immovables Sp. z o.o&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6249035261995911466?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6249035261995911466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6249035261995911466' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6249035261995911466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6249035261995911466'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2010/01/zy-interes.html' title='Zły interes'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-1287744235546968668</id><published>2009-12-15T10:48:00.000+01:00</published><updated>2009-12-15T10:48:33.898+01:00</updated><title type='text'>Perfect Programmers</title><content type='html'>&lt;p&gt;I just realized that all my fellow programmers share the same trait: they are perfect programmers.&lt;/p&gt;

&lt;p&gt;By accident I have found a &lt;a href="http://alexiskold.wordpress.com/2008/04/08/top-10-traits-of-a-rockstar-software-engineer/"&gt;list of perfect programmer's traits&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Loves To Code&lt;/li&gt;
&lt;li&gt;Gets Things Done&lt;/li&gt;
&lt;li&gt;Continuously Refactors Code&lt;/li&gt;
&lt;li&gt;Uses Design Patterns&lt;/li&gt;
&lt;li&gt;Writes Tests&lt;/li&gt;
&lt;li&gt;Leverages Existing Code&lt;/li&gt;
&lt;li&gt;Focuses on Usability&lt;/li&gt;
&lt;li&gt;Writes Maintainable Code&lt;/li&gt;
&lt;li&gt;Can Code in Any Language&lt;/li&gt;
&lt;li&gt;Knows Basic Computer Science&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By that definition each senior programmer at &lt;a href="http://ragnarson.com"&gt;Ragnarson&lt;/a&gt; &lt;strong&gt;is&lt;/strong&gt; a perfect programmer. Juniors need some teaching to live up to no. 8.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-1287744235546968668?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/1287744235546968668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=1287744235546968668' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1287744235546968668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1287744235546968668'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/12/perfect-programmers.html' title='Perfect Programmers'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-1049458877724030301</id><published>2009-12-10T11:35:00.002+01:00</published><updated>2009-12-15T10:50:10.852+01:00</updated><title type='text'>Programiści poszukiwani</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;a href="http://ragnarson.com"&gt;Ragnarson&lt;/a&gt;&lt;/strong&gt;, jeden z największych w Polsce zespołów programistów Ruby on Rails szuka pracowników na stanowiska:&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;Senior Ruby Developer&lt;/strong&gt; - nr. ref. 2009/12/ROR-SEN/B&lt;/h4&gt;

&lt;p&gt;Wymagania:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;doskonała umiejętność języka angielskiego&lt;/li&gt;
  &lt;li&gt;min. 2 lata doświadczenia w Ruby on Rails&lt;/li&gt;
  &lt;li&gt;w sumie min. 3 lata doświadczenia w Ruby lub Java/.NET/Python&lt;/li&gt;
  &lt;li&gt;doskonała znajomość: *NIX, BDD, git, semantic HTML, unobtrusive JavaScript, SQL&lt;/li&gt;
  &lt;li&gt;mile widziana znajomość baz NoSQL&lt;/li&gt;
  &lt;li&gt;przykłady własnoręcznie napisanych testów lub projektów Open Source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oferujemy:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;pracę w doświadczonym, dojrzałym zespole&lt;/li&gt;
  &lt;li&gt;warunki do codziennego dokształcania się&lt;/li&gt;
  &lt;li&gt;bezstresową pracę, maksymalnie 40 godzin w tygodniu&lt;/li&gt;
  &lt;li&gt;pełen udział w szacowaniu kosztów projektu i ustalaniu deadlines (SCRUM)&lt;/li&gt;
  &lt;li&gt;dużą swobodę w wyborze godzin pracy&lt;/li&gt;
  &lt;li&gt;swobodę w wyborze formy zatrudnienia&lt;/li&gt;
  &lt;li&gt;pracę w biurze w Łodzi lub zdalną&lt;/li&gt;
  &lt;li&gt;wynagrodzenie w przedziale 3900-6500 zł netto, zależne od umiejętności&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;&lt;strong&gt;Junior Ruby Developer&lt;/strong&gt; - nr. ref. 2009/12/ROR-JUN/B&lt;/h4&gt;

&lt;p&gt;Wymagania:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;komunikatywny język angielski&lt;/li&gt;
  &lt;li&gt;podstawowa znajomość Ruby on Rails, wsparta znajomością innego języka (poza PHP)&lt;/li&gt;
  &lt;li&gt;techniczny kierunek studiów (informatyka/matematyka/fizyka)&lt;/li&gt;
  &lt;li&gt;umiejętność szybkiej nauki&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oferujemy:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;możliwość nauki Ruby on Rails&lt;/li&gt;
  &lt;li&gt;dogodne godziny pracy (40-160h w miesiącu), niekolidujące z nauką&lt;/li&gt;
  &lt;li&gt;pracę nad interesującymi projektami closed i open source&lt;/li&gt;
  &lt;li&gt;wynagrodzenie w przedziale 20-25 zł netto za godzinę, zależne od umiejętności&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;&lt;strong&gt;Zgłoszenia&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;Zainteresowanych prosimy o wysłanie CV w języku angielskim (najlepiej ze zdjęciem) na adres jobs@ragnarson.com. Umieść nazwę stanowiska i numer referencyjny w temacie. W wypadku stanowiska Senior dołącz linki do własnych projektów Open Source lub przykład testów w oparciu o BDD.
&lt;/p&gt;

&lt;p&gt;CV powinno zawierać następującą klauzulę: &lt;em&gt;Wyrażam zgodę na przetwarzanie moich danych osobowych zawartych w mojej ofercie pracy dla potrzeb niezbędnych do realizacji procesu rekrutacji (zgodnie z ustawą z dn. 29.08.97 roku o Ochronie Danych Osobowych Dz. Ust Nr 133 poz. 883)&lt;/em&gt;
&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;O Ragnarson&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;Firma tworząca od 2006 roku serwisy w oparciu o Ruby on Rails. Posiada jedną z największych w Polsce sieci pracowników i współpracowników pracujących w tej technologii.
&lt;/p&gt;

&lt;p&gt;Chętnie wspiera istniejące projekty Open Source i dzieli się własnymi osiągnięciami. Na co dzień stosuje i tworzy najnowsze technologie.
&lt;/p&gt;

&lt;p&gt;
Ragnarson Łukasz Piestrzeniewicz&lt;br /&gt;
ul. Łąkowa 11&lt;br /&gt;
90-562 Łódź
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-1049458877724030301?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/1049458877724030301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=1049458877724030301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1049458877724030301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1049458877724030301'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/12/ragnarson-jeden-z-najwiekszych-w-polsce.html' title='Programiści poszukiwani'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-3742304630699616015</id><published>2009-11-30T15:30:00.002+01:00</published><updated>2009-11-30T15:33:31.799+01:00</updated><title type='text'>Corporate site experiment</title><content type='html'>&lt;p&gt;OK. So I have a &lt;a href="http://ragnarson.com/"&gt;Ragnarson corporate site&lt;/a&gt; now.&lt;/p&gt;

&lt;p&gt;It's simple, still in progress and will grow slowly for next few weeks. Are you interested to see how will it grow? Would you like to have impact on it's look?&lt;/p&gt;

&lt;p&gt;Visit it's &lt;a href="http://github.com/bragi/Ragnarson.com/"&gt;Github page&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-3742304630699616015?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/3742304630699616015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=3742304630699616015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/3742304630699616015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/3742304630699616015'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/11/corporate-site-experiment.html' title='Corporate site experiment'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-7811540179012163744</id><published>2009-11-06T12:59:00.004+01:00</published><updated>2009-11-06T13:05:05.572+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='recruitment'/><category scheme='http://www.blogger.com/atom/ns#' term='polish'/><title type='text'>Szukając astystenta/asystentki</title><content type='html'>&lt;p&gt;Szukałem ostatnio asystenta/asystentki z jasno określonymi umiejętnościami. Osoby, które się nie kwalifikowały otrzymały wyczerpujące informacje dlaczego ich aplikacja nie została przyjęta. Nie każdy umiał się z tym pogodzić:&lt;/p&gt;

&lt;blockquote&gt;
Dziękuję za maila z informacją o wynikach kwalifikacji. Natomiast co do drugiej części wiadomości nie mogę sie zgodzić z Panią. Po pierwsze w wymaganiach wymieniony był jedynie MS Office. Po drugie jeżeli używacie Państwo w firmie programy Open Office to robicie to nielegalnie, ponieważ jest to oprogramowanie do użytku domowego. Po trzecie aplikacja Google Docs jest do obsługi poczty google a każda szanująca się firma używa własnych kont pocztowych.
&lt;/blockquote&gt;

&lt;p&gt;Życie jest wesołe :) &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-7811540179012163744?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/7811540179012163744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=7811540179012163744' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7811540179012163744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7811540179012163744'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/11/szukajac-astystentaasystentki.html' title='Szukając astystenta/asystentki'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-640862497721144410</id><published>2009-08-31T14:46:00.003+02:00</published><updated>2009-08-31T14:52:30.469+02:00</updated><title type='text'>Upgrading to Snow Leopard</title><content type='html'>&lt;p&gt;Upgrading was smooth on Mac OS X side. There were however several things I had to deal with:&lt;/p&gt;

&lt;h4&gt;MacPorts upgrade&lt;/h4&gt;

&lt;p&gt;I had to delete all ports, install newest version of MacPorts and install required ports back. In the end it was a good opportunity to cleanup stale ports&lt;/p&gt;

&lt;h4&gt;Gems Update&lt;/h4&gt;

&lt;p&gt;All gems with binary extensions required upgrading&lt;/p&gt;

&lt;h4&gt;Selenium Problems&lt;/h4&gt;

&lt;p&gt;It seems selenium is unable to start Firefox with additional parameters, it was dying with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have found solution on &lt;a href="http://support.mozilla.com/tiki-view_forum_thread.php?locale=nl&amp;forumId=1&amp;comments_parentId=432894"&gt;Firefox support group&lt;/a&gt;. I needed to delete sqlite library from Firefox bundle and replace it with system one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-640862497721144410?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/640862497721144410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=640862497721144410' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/640862497721144410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/640862497721144410'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/08/upgrading-to-snow-leopard.html' title='Upgrading to Snow Leopard'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6424835337197018368</id><published>2009-06-07T15:24:00.002+02:00</published><updated>2009-06-09T13:22:41.833+02:00</updated><title type='text'>My Hardest Lesson</title><content type='html'>&lt;p&gt;I&amp;#8217;m developer first. I write code. This is what I love.&lt;/p&gt;

&lt;p&gt;This blog post is however about something different. It&amp;#8217;s about a thing I am doing in parallel. It does not take too much of my time, and yet is the thing I am the most proud of: people management. And about hardest lesson I learned:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;People management is just communication&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Being a good manager is about asking right questions. You ask customer (your boss, higher-up manager):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What do you need?&lt;/li&gt;
&lt;li&gt;Why do you need that?&lt;/li&gt;
&lt;li&gt;What are your priorities?&lt;/li&gt;
&lt;li&gt;Is this new thing more important than what we are doing right now?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You get answers and tell them to your developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our customer needs this:&amp;#8230;&lt;/li&gt;
&lt;li&gt;The rationale behind this is:&amp;#8230;&lt;/li&gt;
&lt;li&gt;Current priorities are:&amp;#8230;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now it&amp;#8217;s time to ask developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is your opinion on this? Do you have better idea?&lt;/li&gt;
&lt;li&gt;Are you willing to do that?&lt;/li&gt;
&lt;li&gt;How long will it take?&lt;/li&gt;
&lt;li&gt;Do you have enough free time?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then you go back with those answers to customer. There is little more to managing people, mostly trust and teaching.&lt;/p&gt;

&lt;p&gt;Full control is overrated.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6424835337197018368?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6424835337197018368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6424835337197018368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6424835337197018368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6424835337197018368'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/06/my-hardest-lesson.html' title='My Hardest Lesson'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6805628902390634918</id><published>2009-03-24T10:24:00.006+01:00</published><updated>2009-03-25T10:10:17.975+01:00</updated><title type='text'>Aspects in Ioke</title><content type='html'>&lt;p&gt;My recent hobby project (&lt;a href="http://github.com/bragi/dnd/"&gt;dnd - a console-based TODO list&lt;/a&gt;) is written in Ioke. I am surprised how easy is to learn Ioke and how fast it is possible to achieve great results in this language. The problem is that it's so powerful, it's easy to get out of chosen path and end up in bushes without even noticing.&lt;/p&gt;

&lt;p&gt;This problem is especially important now, when I'm exploring the language - and most of the code I write changes too fast to be easily harnessed by tests. Without tests in the picture I must rely on simple &lt;code&gt;println&lt;/code&gt; to actually see where I'm going.&lt;/p&gt;

&lt;p&gt;Adding print statements throughout the code is boring and cumbersome and I'm a lazy person. Ioke has great support for aspects so why not use that?&lt;/p&gt;

&lt;p&gt;The best way to see where the program is going is to inspect what cells are called and what do they return. Ioke provides pointcuts for those two events, you can create and add methods to them using &lt;code&gt;before&lt;/code&gt; and &lt;code&gt;after&lt;/code&gt; methods available on all objects.&lt;/p&gt;

&lt;p&gt;When you want to log method call you write something similar to:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
object before(matching: :anyFromSelf) &lt;&lt; macro("called #{call receiver}:#{call message name}(#{call arguments})" println)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Similar, when you want to log method's return you use &lt;code&gt;after&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
object after(matching: :anyFromSelf) &lt;&lt; macro("returned #{aspectResult asText}" println)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is all nice but a more useful thing is an Object that wraps everything nicely and provides simple call graph:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
CallInspector = Origin mimic do(
  nesting = 0

  entering = lecrox(
    "#{"| " * nesting}+called #{call receiver}:#{call message name}(#{call arguments})" println
    nesting ++
  )

  leaving = lecrox(
    nesting --
    "#{"| " * nesting}\\returned #{aspectResult asText truncate}" println
  )
  
  instrument = method(+objects,
    objects each(object,
      object before(matching: :anyFromSelf) &lt;&lt; entering
      object after(matching: :anyFromSelf) &lt;&lt; leaving
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can use it in your code with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
CallInspector instrument(YourObject, AndAnother)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;a href="http://gist.github.com/85382"&gt;most recent version of CallInspector&lt;/a&gt; is available on gist.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6805628902390634918?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6805628902390634918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6805628902390634918' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6805628902390634918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6805628902390634918'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/03/aspects-in-ioke.html' title='Aspects in Ioke'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6000299993902957312</id><published>2009-02-17T10:43:00.004+01:00</published><updated>2009-02-17T10:53:16.268+01:00</updated><title type='text'>Praca: Programista Ruby on Rails</title><content type='html'>&lt;p&gt;Poszukujemy doświadczonego programisty Ruby on Rails.&lt;/p&gt;


 &lt;h2&gt;Wymagamy doskonałej znajomości&lt;/h2&gt;


 &lt;ul&gt;
 &lt;li&gt;Ruby oraz Ruby on Rails,&lt;/li&gt;
  &lt;li&gt;języka angielskiego,&lt;/li&gt;
  &lt;li&gt;&lt;span class="caps"&gt;BDD&lt;/span&gt; (ew. &lt;span class="caps"&gt;TDD&lt;/span&gt;)&lt;/li&gt;
  &lt;li&gt;git,&lt;/li&gt;
  &lt;li&gt;semantycznego &lt;span class="caps"&gt;XHTML&lt;/span&gt;,&lt;/li&gt;
  &lt;li&gt;Linux/Unix&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h2&gt;Mile widziane&lt;/h2&gt;


 &lt;ul&gt;
 &lt;li&gt;znajomość &lt;span class="caps"&gt;CSS&lt;/span&gt;&lt;/li&gt;
  &lt;li&gt;znajomość Haml&lt;/li&gt;
  &lt;li&gt;doświadczenie w projektach Open Source, najchętniej bazujących na RoR&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h2&gt;Warunki zatrudnienia&lt;/h2&gt;


 &lt;ul&gt;
 &lt;li&gt;faktura lub umowa zlecenia&lt;/li&gt;
  &lt;li&gt;dowolne godziny pracy&lt;/li&gt;
  &lt;li&gt;profesjonalny zespół&lt;/li&gt;
  &lt;li&gt;praca zdalna&lt;/li&gt;
  &lt;li&gt;wymagamy ok. 160h pracy w miesiącu&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h2&gt;Płaca&lt;/h2&gt;


 &lt;p&gt;Do negocjacji, zależna od umiejętności, pomiędzy 30 a 50 &lt;span class="caps"&gt;PLN&lt;/span&gt;/h&lt;/p&gt;


 &lt;h2&gt;Rekrutacja&lt;/h2&gt;


 &lt;p&gt;Napisz krótki e-mail i dołącz CV (wraz z odpowiednią klauzulą, patrz niżej)&lt;/p&gt;


 &lt;p&gt;Podstawą do rozmowy będzie jakość kodu. Przygotuj próbki swojego kodu wraz z testami. Najlepiej jeśli będzie to opublikowany kod &lt;span class="caps"&gt;OSS&lt;/span&gt;. Jeśli nie posiadasz takiego, wybierz istniejący projekt &lt;span class="caps"&gt;OSS&lt;/span&gt; bazujący na Ruby/RSpec. W nim zaimplementuj nową funkcjonlaność lub popraw istniejący błąd w oparciu o &lt;span class="caps"&gt;BDD&lt;/span&gt;.&lt;/p&gt;


 &lt;p&gt;Chętnie pomożemy Ci zarówno w wyborze projektu jak i konkretnego sposobu rozwiązania problemu.&lt;/p&gt;


 &lt;p&gt;CV powinno zawierać klauzulę: Wyrażam zgodę na przetwarzanie moich danych osobowych zawartych w mojej ofercie pracy dla potrzeb niezbędnych do realizacji procesu rekrutacji zgodnie z Ustawą z dnia 29.08.1997r. o ochronie danych osobowych&lt;/p&gt;


 &lt;h2&gt;Kontakt&lt;/h2&gt;


 &lt;ul&gt;
 &lt;li&gt;email: rekrutacja@ragnarson.com&lt;/li&gt;
  &lt;li&gt;jabber: bragi@ragnarson.com&lt;/li&gt;
 &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6000299993902957312?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6000299993902957312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6000299993902957312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6000299993902957312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6000299993902957312'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/02/praca-programista-ruby-on-rails.html' title='Praca: Programista Ruby on Rails'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-4948720543935053858</id><published>2009-02-03T14:02:00.004+01:00</published><updated>2009-02-03T14:05:19.103+01:00</updated><title type='text'>Enterprisey</title><content type='html'>&lt;p&gt;&lt;a href="http://twitter.com/enterprisey"&gt;Does look familiar to you?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would rather be watching forrest&lt;/p&gt;

&lt;p&gt;...I mean, I'd rather be writing my specs.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-4948720543935053858?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/4948720543935053858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=4948720543935053858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4948720543935053858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4948720543935053858'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/02/enterprisey.html' title='Enterprisey'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8814317289245181672</id><published>2009-01-20T11:04:00.007+01:00</published><updated>2009-03-19T14:59:49.690+01:00</updated><title type='text'>Look how smart I am!</title><content type='html'>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Original problem was solved with &lt;a href="http://tagaholic.me/2009/03/13/hirb-irb-on-the-good-stuff.html"&gt;hirb&lt;/a&gt;. Good job Gabriel!&lt;/p&gt;

&lt;p&gt;Recently I was analysing data on production server. Problem domain I worked with is quite complex and consists of several different models. Rails provides great tools to easily cherry-pick interesting data using named_scope, conditions, includes, through. I ended up with a list of records I wanted to inspect.&lt;/p&gt;

&lt;p&gt;I worked using console, through screen. List was too long to use 'pp', scrolling with screen is also not too great. What I needed was a simple table with a few columns (and not full list of model's properties). Something among the lines of:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
+----+----------------+-------+-------------+
| id | job_posting_id | state | published_at|
+----+----------------+-------+-------------+
| 1  | 20             | del   | 2008-01-01  |
| 2  | 23             | del   | 2008-01-01  |
| ...| 24             | act   | 2008-01-01  |
+----+----------------+-------+-------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Recently I have noticed &lt;a href="http://rubyreports.org/"&gt;Ruport&lt;/a&gt; which at glance looked like a perfect tool for a job. But it wasn't.&lt;/p&gt;

&lt;p&gt;After a few hours of skimming through examples, documentation, and even a book (now free as in beer! - recon that) I failed to find a single concise example of how can I achieve my goal.&lt;/p&gt;

&lt;p&gt;Rather, Ruport authors assume that you will be willing to use their CSV loading code, or maybe their acts_as_reportable plugin and surely rewrite half of your application, including record selecting logic, possibly ignoring any goodies Rails provides in this area.&lt;/p&gt;

&lt;p&gt;Now do not get me wrong. I'm not saying that Ruport is a bad software. I actually have no idea if it's good or bad. &lt;strong&gt;But it does not provide quick solution for the simplest case possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both documentation and API focus on how great Ruport is and how great it manages your reports. It fails to show how Ruport can easily aid you in your daily tasks.&lt;/p&gt;

&lt;p&gt;It's a perfect example of Ruport's authors 'Look how smart I am' approach. Personally I prefer to use software which is written in 'Look how easy it is' manner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; While looking for solution to my problem I encountered &lt;a href="http://groups.google.com/group/ruby-reports"&gt;official ruport discussion group&lt;/a&gt;. To post there you need to apply for membership, which I did. After two days my admission was rejected... Good job in helping your users, guys!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8814317289245181672?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8814317289245181672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8814317289245181672' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8814317289245181672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8814317289245181672'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/01/look-how-smart-i-am.html' title='Look how smart I am!'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-625848252761050599</id><published>2009-01-20T08:39:00.002+01:00</published><updated>2009-01-20T08:50:54.593+01:00</updated><title type='text'>Enumerate lists AND single items</title><content type='html'>&lt;p&gt;So far when I wanted to make sure I have something to iterate over I used following snippet:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
[variable].flatten
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is not accurate in case variable is an array of arrays but was enough for most of my cases.&lt;/p&gt;

&lt;p&gt;Today I have found a &lt;a href="http://www.rubyinside.com/21-ruby-tricks-902.html"&gt;nice trick on Ruby Inside&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
[*variable]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Not only it's fully accurate, it also has speed advantage over previous solution (&lt;a href="http://gist.github.com/49389"&gt;benchmark code&lt;/a&gt;):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
Rehearsal ------------------------------------------------------------
Single element flatten     0.110000   0.000000   0.110000 (  0.118731)
Single element splat       0.190000   0.000000   0.190000 (  0.196618)
Multiple element flatten   6.800000   0.090000   6.890000 (  7.115833)
Multiple element splat     0.070000   0.000000   0.070000 (  0.076305)
--------------------------------------------------- total: 7.260000sec

                               user     system      total        real
Single element flatten     0.260000   0.000000   0.260000 (  0.270906)
Single element splat       0.320000   0.010000   0.330000 (  0.338638)
Multiple element flatten   6.450000   0.060000   6.510000 (  6.665572)
Multiple element splat     0.070000   0.000000   0.070000 (  0.072873)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Not like micro-optimizations matter...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-625848252761050599?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/625848252761050599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=625848252761050599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/625848252761050599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/625848252761050599'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/01/enumerate-lists-and-single-items.html' title='Enumerate lists AND single items'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-4324284227196125723</id><published>2009-01-11T11:12:00.001+01:00</published><updated>2009-01-11T11:17:14.112+01:00</updated><title type='text'>Metadata for your Rails based site</title><content type='html'>&lt;p&gt;I have recently found a link to &lt;a href="http://github.com/ashchan/meta_on_rails/tree/master"&gt;Rails plugin&lt;/a&gt; that allows to simply add meta tags to your views and layouts.&lt;/p&gt;

&lt;p&gt;In my projects however I do not need the kind of flexibility that plugin uses. Rather my needs are quite simple: provide description and keyword meta tags. In most cases generic, but customized for some views.&lt;/p&gt;

&lt;p&gt;I have decided to create a plugin that is a complete rewrite of ideas used in my current projects. In addition it's my first attempt to publish the gem through &lt;a href="http://github.com/"&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Plugin is called site_meta and allows to &lt;a href="http://github.com/bragi/site_meta/"&gt;easily add description and keyword meta tags to Rails applicaitons&lt;/a&gt;. In addition it simplifies title handling - both in head and in body part of the page.&lt;/p&gt;

&lt;p&gt;See &lt;a href="http://github.com/bragi/site_meta/"&gt;site_meta github page&lt;/a&gt; for installation and usage instructions, and &lt;a href="http://bragi.github.com/site_meta/"&gt;site_meta documentation&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-4324284227196125723?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/4324284227196125723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=4324284227196125723' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4324284227196125723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4324284227196125723'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/01/metadata-for-your-rails-based-site.html' title='Metadata for your Rails based site'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-4018474979286128881</id><published>2009-01-08T14:05:00.003+01:00</published><updated>2009-01-08T14:11:05.771+01:00</updated><title type='text'>Stupid web developer</title><content type='html'>&lt;p&gt;Some web developers should be shot. Remainings should be shot again:&lt;/p&gt;

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/bragiragnarson/byths/stupid-web-developer"&gt;&lt;img src="http://img.skitch.com/20090108-8bji6uhmjwp4mrjsnfkm9bh11m.preview.jpg" alt="Stupid web developer" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;'s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;How stupid do you have to be to:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;print out text of appeal&lt;/li&gt;
  &lt;li&gt;hand it over to city president to sign&lt;/li&gt;
  &lt;li&gt;scan the document to 100k JPG&lt;/li&gt;
  &lt;li&gt;put it on the web page as an overlay that covers the whole page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because the web developer is stupid, right? It sure is impossible that city president may be as stupid to request that!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-4018474979286128881?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/4018474979286128881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=4018474979286128881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4018474979286128881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4018474979286128881'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2009/01/stupid-web-developer.html' title='Stupid web developer'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-537563012529193640</id><published>2008-12-16T08:57:00.001+01:00</published><updated>2008-12-16T08:58:06.489+01:00</updated><title type='text'>Generating random passwords</title><content type='html'>&lt;p&gt;
&lt;code&gt;&lt;pre&gt;
alias passgen="ruby -e 'puts (rand(10**16)+10**16).to_s(36)'"
&lt;/pre&gt;&lt;/code&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-537563012529193640?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/537563012529193640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=537563012529193640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/537563012529193640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/537563012529193640'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/12/generating-random-passwords.html' title='Generating random passwords'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8455271383767632755</id><published>2008-12-05T17:26:00.001+01:00</published><updated>2008-12-05T17:26:33.471+01:00</updated><title type='text'>Irony</title><content type='html'>&lt;p&gt;From the creators of Passanger:&lt;/p&gt;

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/bragiragnarson/7ib6/502-bad-gateway"&gt;&lt;img src="http://img.skitch.com/20081205-uugjq92h4juuthuk2serifrbj.preview.jpg" alt="502 Bad Gateway" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;'s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8455271383767632755?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8455271383767632755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8455271383767632755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8455271383767632755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8455271383767632755'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/12/irony.html' title='Irony'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6084901767259303884</id><published>2008-10-31T15:20:00.004+01:00</published><updated>2008-10-31T15:27:48.753+01:00</updated><title type='text'>Html Grep</title><content type='html'>&lt;p&gt;Ever wanted to grep through the page contents and extract only interesting tags like all meta tags? Or maybe you wanted to print out contents of a tag with given id?&lt;/p&gt;

&lt;p&gt;Now it's simple: &lt;a href="http://gist.github.com/21315"&gt;html grep&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Usage is: &lt;code&gt;htmlgrep.rb &lt;em&gt;selector&lt;/em&gt; &lt;em&gt;(file or url)&lt;/em&gt;&lt;/code&gt;. It also accepts &lt;code&gt;STDIN&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
htmlgrep.rb input "http://www.google.com/"
cat index.html | htmlgrep.rb "div#users"
htmlgrep.rb "div#users" index.html
&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6084901767259303884?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6084901767259303884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6084901767259303884' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6084901767259303884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6084901767259303884'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/10/html-grep.html' title='Html Grep'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-7800389722762443453</id><published>2008-10-28T09:09:00.000+01:00</published><updated>2008-10-28T09:10:11.111+01:00</updated><title type='text'>Pat Maddox on testing</title><content type='html'>&lt;p&gt;&lt;a href="http://evang.eli.st/blog/2008/10/27/testing-protected-and-private-methods-in-ruby"&gt;The best post on test driven development&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-7800389722762443453?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/7800389722762443453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=7800389722762443453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7800389722762443453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7800389722762443453'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/10/pat-maddox-on-testing.html' title='Pat Maddox on testing'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6851733993900968065</id><published>2008-10-26T10:49:00.002+01:00</published><updated>2008-10-26T11:24:26.852+01:00</updated><title type='text'>Morphing basic types</title><content type='html'>&lt;p&gt;An OS file path or URL are basically strings. They impose some validity constrains and change some of behaviour (like conncatenation or comparison) but in fact are only strings.&lt;/p&gt;

&lt;p&gt;I was always bothered by the way languages treat such &lt;em&gt;special&lt;/em&gt; strings. You can not in a simple way express them as strings. You have to pull out a whole library to deal with them:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;File.open(File.join('..', 'spec_helper'))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;What I would like to see instead is something more simple, easier to remember and more object oriented. I wonder if we can put in a language a way to simply and quickly morph literals from basic type to more specific type. Something among the lines of:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(#path{.}+'..'+'spec_helper').open&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There should be a way of saying: hey, I want this particular string literal to be treated as instance of a special type. Behind the scenes platform may use a call to Path.new but I'm not too interested in that. I want a way of expressing my intent of work with paths rather than strings.&lt;/p&gt;

&lt;p&gt;Implementation of this pattern is quite simple. On parser side we need to declare a special way of marking literals as 'morphable' and providing target type. When parser encounters such literal it emits a call to BasicType.new_with_target(target) instead of simple BasicType.new. In addition BasicType must provide BasicType.register_target(target, TargetType) so library creators can register own morph targets.&lt;/p&gt;

&lt;p&gt;This allows to easily incorporate regular expressions (#r{} or #regex{}), URLs (#u{} or #{url}). Sigils may be used to designate literal type. TargetType of course has full control over the valid format accepted within the literal.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6851733993900968065?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6851733993900968065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6851733993900968065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6851733993900968065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6851733993900968065'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/10/morphing-basic-types.html' title='Morphing basic types'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8996660827006216748</id><published>2008-10-23T09:42:00.005+02:00</published><updated>2008-10-23T11:19:19.577+02:00</updated><title type='text'>Recruiter Woes</title><content type='html'>&lt;p&gt;Oh, how I miss those days when it was hard to come by a person that knew Rails. Two years ago when you finally found one you could be sure he is an enthusiast and a professional.&lt;/p&gt;

&lt;p&gt;Now, once RoR has been on the market for several years, more and more people are getting familiar with it. I personally like Java people coming to Rails as they are acustomed with design patterns and crave for high code quality.&lt;/p&gt;

&lt;p&gt;Sadly, that's not usually the case with people with PHP background. Those often see Rails only as money making opportunity. Even when they switch to Ruby they are still writing PHP code (&lt;a href="http://www.codinghorror.com/blog/archives/000272.html"&gt;you can write FORTRAN in any language&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I have a good test that allows me to pick only valuable people: I ask them to show me their tests. If a new person has no tested code, I still give them a chance. They have to pick an &lt;a href="http://opensourcerails.com"&gt;open source, Rails-based project&lt;/a&gt; and fix a ticket there in TDD (or even better BDD) fashion. This way I was able to gather quite large group of skilled people.&lt;/p&gt;

&lt;p&gt;I still am however annoyed by some. I try to be polite to anyone, no matter how low skills his may seem in the beginning, carefuly explaining my needs. But when, after exchanging three rounds of e-mail stating clearly, that we put high pressure on well tested code, a person asks me if 'there is another way to get to my organization except testing' I really want to scream:&lt;/p&gt;

&lt;h4&gt;LEARN TO FUCKING TEST&lt;/h4&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8996660827006216748?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8996660827006216748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8996660827006216748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8996660827006216748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8996660827006216748'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/10/recruiter-woes.html' title='Recruiter Woes'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-1706759944389520493</id><published>2008-09-17T08:18:00.003+02:00</published><updated>2008-09-17T08:20:36.507+02:00</updated><title type='text'>Omnipresent</title><content type='html'>&lt;blockquote&gt;
&lt;h4&gt;Perl&lt;/h4&gt;

&lt;p&gt;Installation: Already installed&lt;/p&gt;

&lt;p&gt;Use: perl program.pl or perl -e 'program text'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;From &lt;a href="http://www.everything2.com/index.pl?node_id=1904026"&gt;infinite loop @ everything&lt;sub&gt;2&lt;/sub&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-1706759944389520493?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/1706759944389520493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=1706759944389520493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1706759944389520493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1706759944389520493'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/09/omnipresent.html' title='Omnipresent'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8248311750858784171</id><published>2008-09-03T10:55:00.002+02:00</published><updated>2008-09-03T11:04:58.580+02:00</updated><title type='text'>Chrome - a new speed king</title><content type='html'>&lt;p&gt;OK, so it seems that &lt;a href="http://www.google.com/chrome"&gt;Chrome&lt;/a&gt; even under VirtualBox is fast as hell&lt;/p&gt;

&lt;p&gt;Just for comparison some &lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html"&gt;SunSpider&lt;/a&gt; benchmarks:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider-results.html?%7B%223d-cube%22:%5B25,18,22,10,32%5D,%223d-morph%22:%5B41,26,32,45,42%5D,%223d-raytrace%22:%5B24,22,28,29,26%5D,%22access-binary-trees%22:%5B4,3,5,3,7%5D,%22access-fannkuch%22:%5B14,14,10,13,16%5D,%22access-nbody%22:%5B12,16,27,14,15%5D,%22access-nsieve%22:%5B24,20,22,26,26%5D,%22bitops-3bit-bits-in-byte%22:%5B5,2,3,6,3%5D,%22bitops-bits-in-byte%22:%5B8,7,13,6,5%5D,%22bitops-bitwise-and%22:%5B17,12,8,10,11%5D,%22bitops-nsieve-bits%22:%5B14,16,17,14,17%5D,%22controlflow-recursive%22:%5B1,0,2,1,2%5D,%22crypto-aes%22:%5B14,13,13,28,12%5D,%22crypto-md5%22:%5B15,18,21,12,11%5D,%22crypto-sha1%22:%5B15,16,56,10,11%5D,%22date-format-tofte%22:%5B145,131,193,229,101%5D,%22date-format-xparb%22:%5B71,84,57,85,61%5D,%22math-cordic%22:%5B38,47,78,88,35%5D,%22math-partial-sums%22:%5B17,34,13,20,31%5D,%22math-spectral-norm%22:%5B9,10,19,8,9%5D,%22regexp-dna%22:%5B296,307,538,533,295%5D,%22string-base64%22:%5B59,43,52,53,53%5D,%22string-fasta%22:%5B43,27,37,36,45%5D,%22string-tagcloud%22:%5B104,130,302,138,152%5D,%22string-unpack-code%22:%5B177,260,329,195,182%5D,%22string-validate-input%22:%5B40,61,48,60,45%5D%7D"&gt;Chrome on Windows XP virtualized using VirtualBox 1.6 on MacOS X Leopard&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider-results.html?%7B%223d-cube%22:%5B154,150,145,149,146%5D,%223d-morph%22:%5B124,125,126,120,123%5D,%223d-raytrace%22:%5B137,127,124,142,129%5D,%22access-binary-trees%22:%5B52,57,52,54,51%5D,%22access-fannkuch%22:%5B174,169,170,171,173%5D,%22access-nbody%22:%5B177,162,173,175,159%5D,%22access-nsieve%22:%5B55,59,57,57,54%5D,%22bitops-3bit-bits-in-byte%22:%5B46,47,48,46,51%5D,%22bitops-bits-in-byte%22:%5B74,77,75,79,77%5D,%22bitops-bitwise-and%22:%5B87,90,96,81,91%5D,%22bitops-nsieve-bits%22:%5B95,93,93,93,94%5D,%22controlflow-recursive%22:%5B37,41,39,38,40%5D,%22crypto-aes%22:%5B75,80,72,80,72%5D,%22crypto-md5%22:%5B57,57,61,59,55%5D,%22crypto-sha1%22:%5B57,57,54,56,59%5D,%22date-format-tofte%22:%5B239,254,225,223,216%5D,%22date-format-xparb%22:%5B163,151,149,152,153%5D,%22math-cordic%22:%5B125,126,126,133,126%5D,%22math-partial-sums%22:%5B147,137,151,161,136%5D,%22math-spectral-norm%22:%5B59,62,60,61,58%5D,%22regexp-dna%22:%5B287,270,281,279,294%5D,%22string-base64%22:%5B91,91,93,88,92%5D,%22string-fasta%22:%5B220,229,217,215,228%5D,%22string-tagcloud%22:%5B171,173,166,164,167%5D,%22string-unpack-code%22:%5B216,212,218,215,218%5D,%22string-validate-input%22:%5B112,112,112,112,116%5D%7D"&gt;Firefox 3 on MacOS X Leopard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you compare those two you will notice that Chrome is &lt;strong&gt;more than twice as fast&lt;/strong&gt; as Firefox.&lt;/p&gt;

&lt;p&gt;Good job Google!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8248311750858784171?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8248311750858784171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8248311750858784171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8248311750858784171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8248311750858784171'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/09/chrome-new-speed-king.html' title='Chrome - a new speed king'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-9136297319157907676</id><published>2008-09-01T12:03:00.002+02:00</published><updated>2008-09-01T12:19:18.356+02:00</updated><title type='text'>When autotest fails</title><content type='html'>&lt;p&gt;Our application uses namespaces quite extensively. While using RSpec this has a nasty side effect - it breaks autotest triggering &lt;a href="http://rspec.lighthouseapp.com/projects/5645/tickets/145-namespaced-controller-load-order"&gt;rspec namespaced controllers bug&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to false positives autotest became unusable. Too bad as I miss it's lightning-fast feedback. The only thing that remains is to run the tests myself.&lt;/p&gt;

&lt;p&gt;While I do that before each commit, running them in separation takes quite some time - loading the whole environment takes precious seconds. This hurts especially when run from TextMate&lt;/p&gt;

&lt;p&gt;RSpec provides a solution for this long test startup issue. You can run spec_server and tell TextMate to use it when running tests.&lt;/p&gt;

&lt;p&gt;Open your console and from the project's directory start:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;pre&gt;
./script/spec_server
&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we have to tell TextMate to use this server when running RSpec examples. Open TextMate preferences and in Advanced tab, Shell Variables, add new variable called &lt;code&gt;TM_RSPEC_OPTS&lt;/code&gt; with a value &lt;code&gt;-X&lt;/code&gt;&lt;/p&gt;

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/bragiragnarson/w261/advanced"&gt;&lt;img src="http://img.skitch.com/20080901-a8x1ij6gfxd8k43uxemd344uc.preview.jpg" alt="Advanced" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;'s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

&lt;p&gt;This should significantly speed up running tests&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-9136297319157907676?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/9136297319157907676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=9136297319157907676' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/9136297319157907676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/9136297319157907676'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/09/when-autotest-fails.html' title='When autotest fails'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-7536908661739245318</id><published>2008-08-20T13:54:00.002+02:00</published><updated>2008-08-20T13:58:43.325+02:00</updated><title type='text'>Better Shuffle And Rating For Music</title><content type='html'>&lt;p&gt;My iPod is quite nice for me. When set to shuffle it plays my favourite music quite often. It is not perfect however. Often it plays in succession two completly different songs. It also skips those that I haven't rated high enough.&lt;/p&gt;

&lt;p&gt;Another annoyance is that it doesn't recognize new songs I have recently added to library - although I would prefer them to play more often. At least until I decide if I like them.&lt;/p&gt;

&lt;p&gt;This means that better shuffling algorithm is a necessity.&lt;/p&gt;

&lt;h2&gt;Some Assumptions&lt;/h2&gt;

&lt;p&gt;Algorithm should fulfill at least those goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;for each song played it should know which songs should follow (less likely to pick songs that I would have to skip)&lt;/li&gt;
&lt;li&gt;it should play songs I like a bit often&lt;/li&gt;
&lt;li&gt;it should play songs I do not like not too often, but still in case I changed my mind and choose to give them higher rating&lt;/li&gt;
&lt;li&gt;new, unrated songs should be played often enough for me to pick them up and rate them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also it would be nice if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it allow rating songs using two ratings: thumbs up or down&lt;/li&gt;
&lt;li&gt;it know that once I press next I do not want given song and previous to be played in succession&lt;/li&gt;
&lt;li&gt;it know that once I press next several times in a row I try to find a song matching the last I heard in (mostly) full&lt;/li&gt;
&lt;/ul&gt;
 
&lt;p&gt;Still interesting is if and how the algorithm should react on previous button:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;should it ignore this event completly?&lt;/li&gt;
&lt;li&gt;or maybe it should remember that I like to hear given song several times in a row?&lt;/li&gt;
&lt;/ul&gt;
 
&lt;h2&gt;First Attempt&lt;/h2&gt;

&lt;p&gt;Song preferences are stored as a 2d matrix of likeness of two songs in collection. Arbitrary choice is that current song is represented as a row, next song is represented as a column.&lt;/p&gt;

&lt;p&gt;When song is imported new row and column is added and likeness is set to default (except on the cross section where it is set to lowest - we do not like hearing the same song time after time by default.)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When I listen to a whole song in whole, it's likeness with previous song rises. &lt;/li&gt;
&lt;li&gt;When I skip it it's likeness with previous song lowers. &lt;/li&gt;
&lt;li&gt;When I skip several songs in row their likeness to each other does not change, rather their likeness with last played song lowers.&lt;/li&gt;
&lt;li&gt;When I give a thumbs up song's likeness with all others rises.&lt;/li&gt;
&lt;li&gt;When I give a thumbs down song's likeness with all others lowers.&lt;/li&gt;
&lt;li&gt;When I skip a song, it's play count raises (so that it's less likely appear in near future)&lt;/li&gt;
&lt;li&gt;Songs with low play count are played more often&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-7536908661739245318?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/7536908661739245318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=7536908661739245318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7536908661739245318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7536908661739245318'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/08/better-shuffle-and-rating-for-music.html' title='Better Shuffle And Rating For Music'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-897067163766543085</id><published>2008-06-12T17:46:00.005+02:00</published><updated>2008-06-12T18:14:23.524+02:00</updated><title type='text'>Crucial Mac Software</title><content type='html'>&lt;p&gt;Just a short list for my friends who happen to upgrade to MacBooks as we speak&lt;/p&gt;

&lt;h2&gt;Developement Tools&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Xcode - it's on the second DVD&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; - open source software package management system&lt;/li&gt;
&lt;li&gt;&lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt; - THE text editor&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Applications&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.adiumx.com/"&gt;Adium&lt;/a&gt; - instant messanger&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://www.mozilla.com/en-US/firefox/"&gt;Firefox 3&lt;/a&gt; - as support for Webkit&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://www.newsgator.com/Individuals/NetNewsWire/default.aspx"&gt;NetNewsWire&lt;/a&gt; - THE news reader&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://iconfactory.com/software/twitterrific"&gt;Twitterific&lt;/a&gt; - your connection to &lt;a hreg="http://twitter.com"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://fluidapp.com/"&gt;Fluid&lt;/a&gt; - make standalone app out of trac, gmail, google docs, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;System Utilities&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.blacktree.com/"&gt;Quicksilver&lt;/a&gt; - launcher&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://skitch.com/"&gt;Skitch&lt;/a&gt; - screen grabber&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://web.mac.com/reinholdpenner/Software/Home.html"&gt;Nightshift&lt;/a&gt; - auto-downloader of nightly builds of &lt;a href="http://webkit.org/"&gt;Webkit&lt;/a&gt; - which you should use instead of Safari&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://www.islayer.com/index.php?op=item&amp;amp;id=28"&gt;iStat Menus&lt;/a&gt; - tray menu with computer status&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-897067163766543085?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/897067163766543085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=897067163766543085' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/897067163766543085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/897067163766543085'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/06/necessary-mac-software.html' title='Crucial Mac Software'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-4010202642672979122</id><published>2008-06-12T09:13:00.005+02:00</published><updated>2008-06-13T09:03:34.748+02:00</updated><title type='text'>Dzieci PHP zawitały do świata Rails</title><content type='html'>&lt;p&gt;Jak to mawiają na &lt;a href="http://icanhascheezburger.com/"&gt;i can has cheezburger&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;EPIC FAIL&lt;/h2&gt;

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/bragiragnarson/pxx7/ruby-on-rails-pl-forum-group-by-i-count"&gt;&lt;img src="http://img.skitch.com/20080613-t1sahdtahms4nef2u87tqhqdwc.preview.jpg" alt="Ruby on Rails PL Forum / group by i count" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;'s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

&lt;h4&gt;Edit&lt;/h4&gt;

&lt;p&gt;Żeby nie było niejasności: &lt;em&gt;martinciu&lt;/em&gt; może zapomnieć o jakiejkolwiek pomocy z mojej strony. Chamstwu i drobnomieszczaństwu mówimy stanowcze: &lt;strong&gt;NIE&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-4010202642672979122?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/4010202642672979122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=4010202642672979122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4010202642672979122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4010202642672979122'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/06/dzieci-php-zawitay-do-wiata-rails.html' title='Dzieci PHP zawitały do świata Rails'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-7268173959881918015</id><published>2008-05-28T16:52:00.002+02:00</published><updated>2008-05-28T17:03:52.613+02:00</updated><title type='text'>Ultrasphinx caveat</title><content type='html'>&lt;p&gt;We recently started using &lt;a href="http://www.sphinxsearch.com/"&gt;Sphinx full text search&lt;/a&gt; on our &lt;a href="http://www.mamily.de/"&gt;network community for moms&lt;/a&gt;. As we are building it with Rails we used &lt;a href="http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/"&gt;Ultrasphinx plugin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is a nice tool but has several quirks. One of them is result filtering.&lt;/p&gt;

&lt;p&gt;When you build your search form and want to limit search results by one of the integer fields in the model (in our case it was employment_term_id) you need to provide integers. Strings do not work. And guess what you get in params?&lt;/p&gt;
&lt;p&gt;When building your query write:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
Ultrasphinx::Search.new(:query =&gt; params[:query], :filters =&gt; {:employment_term_id =&gt; params[: employment_term_id].&lt;b&gt;to_i&lt;/b&gt;)
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Without the &lt;code&gt;to_i&lt;/code&gt; you will be welcomed by totally cryptic error message:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
index main: query error: no field 'employment_term_id' found in schema
&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-7268173959881918015?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/7268173959881918015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=7268173959881918015' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7268173959881918015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/7268173959881918015'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/05/ultrasphinx-caveat.html' title='Ultrasphinx caveat'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-2900712093431920403</id><published>2008-04-15T17:54:00.001+02:00</published><updated>2008-04-15T17:56:01.333+02:00</updated><title type='text'>A Need for REST</title><content type='html'>&lt;p&gt;The slides for my presentation on &lt;a href="http://rupy.eu/"&gt;RuPy 2008 conference&lt;/a&gt;&lt;/p&gt;

&lt;div style="width:425px;text-align:left" id="__ss_354486"&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=a-need-for-rest-ukasz-piestrzeniewicz-1208274715730842-8"/&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=a-need-for-rest-ukasz-piestrzeniewicz-1208274715730842-8" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;&lt;a href="http://www.slideshare.net/?src=embed"&gt;&lt;img src="http://static.slideshare.net/swf/logo_embd.png" style="border:0px none;margin-bottom:-5px" alt="SlideShare"/&gt;&lt;/a&gt; | &lt;a href="http://www.slideshare.net/bragi/a-need-for-rest-ukasz-piestrzeniewicz?src=embed" title="View 'A Need For Rest  - Łukasz Piestrzeniewicz' on SlideShare"&gt;View&lt;/a&gt; | &lt;a href="http://www.slideshare.net/upload?src=embed"&gt;Upload your own&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-2900712093431920403?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/2900712093431920403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=2900712093431920403' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2900712093431920403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/2900712093431920403'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/04/need-for-rest.html' title='A Need for REST'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-6062132437679731172</id><published>2008-04-08T17:50:00.002+02:00</published><updated>2008-04-08T17:55:59.390+02:00</updated><title type='text'>A small haml helper command for Textmate</title><content type='html'>&lt;p&gt;I'm using &lt;a href="http://haml.hamptoncatlin.com/"&gt;haml&lt;/a&gt; exclusively in my recent project. Textmate bundle is a great help but it can be improved with a &lt;a href="http://pastie.caboo.se/177252"&gt;html2haml command&lt;/a&gt;. It filters html selection and inserts haml instead. Great for quick import of previous projects' erb sippets.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-6062132437679731172?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/6062132437679731172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=6062132437679731172' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6062132437679731172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/6062132437679731172'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/04/small-haml-helper-command-for-textmate.html' title='A small haml helper command for Textmate'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-4563244615964351458</id><published>2008-03-14T16:45:00.003+01:00</published><updated>2008-03-14T16:51:04.342+01:00</updated><title type='text'>Itching a PostgreSQL Scratch</title><content type='html'>&lt;p&gt;PostgreSQL is a nice database and it's Rails support is great. However in development and test mode Postgres connection adapter seems to log far too many details when it queries database schema. This makes log files hard to grep at least.&lt;/p&gt;

&lt;p&gt;Disabling this messages was quite easy, and since this monkey patch is quite simple I made a plugin out of it&lt;/p&gt;

&lt;p&gt;&lt;a href="http://code.google.com/p/silent-postgres/"&gt;Silent postgres&lt;/a&gt; is a very simple plugin that abuses Rails &lt;code&gt;alias_method_chain&lt;/code&gt;. It only runs in &lt;code&gt;development&lt;/code&gt; and &lt;code&gt;test&lt;/code&gt; environments so there should be no performance impact on &lt;code&gt;production&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Have fun&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-4563244615964351458?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/4563244615964351458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=4563244615964351458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4563244615964351458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/4563244615964351458'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2008/03/itching-postgresql-scratch.html' title='Itching a PostgreSQL Scratch'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-1728807127199214148</id><published>2007-12-03T11:03:00.000+01:00</published><updated>2007-12-03T11:16:15.369+01:00</updated><title type='text'>Amilo 1818 - Almost Perfect Linux Laptop</title><content type='html'>&lt;p&gt;Recently I bought two Fujitsu-Siemens Amilo 1818 laptops for my employees. It's quite a decent hardware, plus I also found a page that says &lt;a href="http://www.amilo1818.com"&gt;it works well with Ubuntu&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There is a catch however: &lt;strong&gt;internal wi-fi does not work on Ubuntu&lt;/strong&gt;. I have been trying several different drivers (it's based on sis163u). But although I was able to force it to list available networks I was unable to connect so far.&lt;/p&gt;

&lt;p&gt;On the other hand a &lt;a href="http://pentagram.eu/products/networking_and_communication/ethernet_lan_wlan/pentagram_hornet_wi_fi_usb_lite"&gt;cheap Pentagram horNET USB wi-fi adapter&lt;/a&gt; works perfectly. Special kudos for listing Linux as supported system on retail box.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-1728807127199214148?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/1728807127199214148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=1728807127199214148' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1728807127199214148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/1728807127199214148'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2007/12/amilo-1818-almost-perfect-linux-laptop.html' title='Amilo 1818 - Almost Perfect Linux Laptop'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-8294368149672125554</id><published>2007-10-16T15:10:00.000+02:00</published><updated>2007-10-16T15:24:34.752+02:00</updated><title type='text'>The Big Rewrite</title><content type='html'>&lt;p&gt;After working for a full year developing &lt;a href="http://www.pokerolymp.de/"&gt;PokerOlymp.de&lt;/a&gt; I  decided it's time for a change.&lt;/p&gt;
&lt;p&gt;Right now I have quite a challenge before me: complete rewrite of existing service, including transition:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;from Java to Ruby&lt;/li&gt;&lt;li&gt;from Spring 2 to Ruby on Rails&lt;/li&gt;&lt;li&gt;from MySQL to PostgreSQL&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;Having read &lt;a href="http://www.chadfowler.com/2006/12/27/the-big-rewrite"&gt;Chad Fowler's "The Big Rewrite"&lt;/a&gt; and being part of a few 'rewrite' teams in the past I know how many problems I will encounter.&lt;/p&gt;

&lt;p&gt;In addition to all technical difficulties I'll also have to coach two fresh Railers. I'm looking forward to next few months...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-8294368149672125554?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/8294368149672125554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=8294368149672125554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8294368149672125554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/8294368149672125554'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2007/10/big-rewrite.html' title='The Big Rewrite'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-116965244600181951</id><published>2007-01-24T16:22:00.000+01:00</published><updated>2007-01-24T16:32:46.683+01:00</updated><title type='text'>Autotest/Gnome Eye Candy</title><content type='html'>&lt;p&gt;Make sure you have &lt;code&gt;notify-send&lt;/code&gt; installed. On Ubuntu just run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
sudo apt-get install libnotify-bin

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now edit your &lt;code&gt;~/.autotest&lt;/code&gt; and insert following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
require 'autotest/redgreen'
require 'autotest/timestamp'

module Autotest::Notify
  def self.notify(title, message, priority='critical')
    icon = if priority == 'critical'
      'dialog-error'
    else
      'dialog-information'
    end
    system "notify-send -u #{priority} -t 10000 -i #{icon} '#{title}' '#{message.inspect}'"
  end

  Autotest.add_hook :red do |at|
    tests = 0
    assertions = 0
    failures = 0
    errors = 0
    at.results.scan(/(\d+) tests, (\d+) assertions, (\d+) failures, (\d+) errors/) do |t, a, f, e|
      tests += t.to_i
      assertions += a.to_i
      failures += f.to_i
      errors += e.to_i
    end
    message = "%d tests, %d assertions, %d failures, %d errors" % 
      [tests, assertions, failures, errors]
    notify("Tests Failed", message)
  end

  Autotest.add_hook :green do |at|
    notify("Tests Passed", "Outstanding tests passed", 'low') if at.tainted
  end

  Autotest.add_hook :all do |at|_hook
    notify("autotest", "Tests have fully passed", 'low')
  end
end

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will get pretty test summary notifications after each save.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-116965244600181951?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/116965244600181951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=116965244600181951' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/116965244600181951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/116965244600181951'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2007/01/autotestgnome-eye-candy.html' title='Autotest/Gnome Eye Candy'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-116420936068565085</id><published>2006-11-22T16:26:00.000+01:00</published><updated>2006-11-22T16:29:20.743+01:00</updated><title type='text'>Perfect API reference</title><content type='html'>&lt;p&gt;I have recently found this little gem: &lt;a href="http://www.gotapi.com"&gt;complete API reference for Ruby, Ruby on Rails, Prototype&lt;/a&gt; and lots of other goodies.&lt;/p&gt;

&lt;p&gt;Perfect!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-116420936068565085?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/116420936068565085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=116420936068565085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/116420936068565085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/116420936068565085'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/11/perfect-api-reference.html' title='Perfect API reference'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-115278800632004297</id><published>2006-07-13T12:47:00.000+02:00</published><updated>2006-07-13T12:54:05.830+02:00</updated><title type='text'>How to avoid 500 Server Failure error</title><content type='html'>&lt;p&gt;Rails applications are known of producing 500 Server Failure responses &lt;i&gt;en masse&lt;/i&gt;. Most of them are coused by two actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;using &lt;tt&gt;find(id)&lt;/tt&gt;
&lt;/li&gt;&lt;li&gt;referencing &lt;tt&gt;nil&lt;/tt&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In most cases both can be safetly avoided and turned into more user friendly 400 responses.
&lt;/p&gt;

&lt;h2&gt;What is wrong with find(id)&lt;/h2&gt;
&lt;p&gt;ActiveRecord &lt;tt&gt;find(id)&lt;/tt&gt; method is a single point of failure of most programs.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Find(id)&lt;/code&gt; throws exception when it can not find record with given id. That's right. No &lt;tt&gt;nil&lt;/tt&gt; return, just exception which is propagated out of the action and results in 500 error.&lt;/p&gt;

&lt;p&gt;A lot better solution is to use dynamic &lt;tt&gt;find_by_id(id)&lt;/tt&gt; method which returns &lt;code&gt;nil&lt;/code&gt; when called.&lt;/p&gt;

&lt;h2&gt;Is 400 a good response?&lt;/h2&gt;

&lt;p&gt;That depends on the context. But in most cases the answer is yes.&lt;/p&gt;

&lt;p&gt;Actions expect to receive valid ids. When action receives invalid id it is usually caused by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;invalid link in the application&lt;/li&gt;
&lt;li&gt;invalid link outside of application&lt;/li&gt;
&lt;li&gt;user toyed with request url&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In all of those cases sending 400 status and proper 'Missing page' page is the best what we can do.&lt;/p&gt;

&lt;h2&gt;And how about redirect instead of 400?&lt;/h2&gt;

&lt;p&gt;Redirect breaks things. First, search engines rely on 400 to remove missing links. If they receive redirect, they follow it and record broken link in their database as valid, redirected.&lt;/p&gt;

&lt;p&gt;Second, it is hard for user to tell support what exactly happened as url changes and can not be provided to troubleshoot.&lt;/p&gt;

&lt;p&gt;Third, user ends up on page he wasn't expecting which *is not* an error page, thus creating confusion.&lt;/p&gt;

&lt;h2&gt;How to properly handle such situations?&lt;/h2&gt;

&lt;p&gt;se following schema when dealing with user-provided ids:&lt;/p&gt;

&lt;code&gt;&lt;pre&gt;
  def show_message
    message = Message.find_by_id(params[:id])
    send_missing("Could not find message") and return unless message
    # Message is present, lets do something with it
    # ...
  end

&lt;/pre&gt;&lt;/code&gt;

&lt;p&gt;Where &lt;code&gt;send_missing&lt;/code&gt; is something among the lines of:&lt;/p&gt;

&lt;code&gt;&lt;pre&gt;
  # Sets response code to 404 and renders 'missing resource' template
  def send_missing(message = "Missing resource, sending 404")
    logger.debug message
    render(:template =&gt; 'common/404', :status =&gt; 404)
  end

&lt;/pre&gt;&lt;/code&gt;

&lt;h2&gt;How to guard against nil referencing&lt;/h2&gt;

&lt;p&gt;Validate data before using it (in controller, data provided to view should always be valid). Ensure proper relationships and valid data using ActiveRecord validations.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-115278800632004297?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/115278800632004297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=115278800632004297' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/115278800632004297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/115278800632004297'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/07/how-to-avoid-500-server-failure-error.html' title='How to avoid 500 Server Failure error'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114925226903982203</id><published>2006-06-02T14:38:00.000+02:00</published><updated>2006-06-02T14:44:29.056+02:00</updated><title type='text'>SQLite does not like CSV fixtures with id column</title><content type='html'>&lt;p&gt;Yesterday I tried to switch to SQLite 3 for testing. Unfortunately tests failed with mysterious error:&lt;/p&gt;

&lt;blockquote&gt;SQL logic error or missing database (SQLite3::SQLException)&lt;/blockquote&gt;

&lt;p&gt;Some time later I pinpointed the problem. Fixtures for join class where in CSV format. For some reason SQL does not tolerate CSV fixtures including &lt;code&gt;id&lt;/code&gt; field. Changing fixture to &lt;code&gt;yaml&lt;/code&gt; fixed the fault.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114925226903982203?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114925226903982203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114925226903982203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114925226903982203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114925226903982203'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/06/sqlite-does-not-like-csv-fixtures-with.html' title='SQLite does not like CSV fixtures with id column'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114855433269967832</id><published>2006-05-25T12:44:00.000+02:00</published><updated>2006-05-25T12:52:12.710+02:00</updated><title type='text'>Flowcharts for MVC applications</title><content type='html'>&lt;p&gt;There are many types of flowcharts yet I have not found one suiting specific needs: showing the flow of MVC application. Google says nothing on this topic. Strange.&lt;/p&gt;

&lt;p&gt;The closest thing I have found is &lt;a href="http://www.mojofat.com/tutorial/flowdiagram.html" title="Flow chart for MVC application"&gt;this thing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it comes to specifying model it is simple - just use UML. But for other parts? There is no good set of rules on specifying controllers, pages, forms, partials (or fragments or whatever you call it) and actions.&lt;/p&gt;

&lt;p&gt;Something I need to look further into.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114855433269967832?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114855433269967832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114855433269967832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114855433269967832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114855433269967832'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/05/flowcharts-for-mvc-applications.html' title='Flowcharts for MVC applications'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114715538270960562</id><published>2006-05-09T08:16:00.000+02:00</published><updated>2006-05-09T08:16:25.890+02:00</updated><title type='text'>Devil's Pie - A.K.A. Know Your Place, Window!</title><content type='html'>&lt;p&gt;I have just found out about small piece of wonderful software for GNOME window management: &lt;a href="http://www.burtonini.com/blog/computers/devilspie"&gt;Devil's Pie&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Usage is simple: write some s-expressions (LISPish), save them to &lt;code&gt;~/.devilspie/*.ds&lt;/code&gt; and run &lt;code&gt;devilspie&lt;/code&gt; (possibly through session). From now on all expressions will be applied on newly created windows allowing things like 'put Firefox on Web workspace', 'maximize Bluefish on Development workspace' and 'put IM window on every workspace'.&lt;/p&gt;

&lt;p&gt;Great piece of code, thanks Ross Burton!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114715538270960562?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114715538270960562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114715538270960562' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114715538270960562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114715538270960562'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/05/devils-pie-aka-know-your-place-window.html' title='Devil&apos;s Pie - A.K.A. Know Your Place, Window!'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114586783682657128</id><published>2006-04-24T10:33:00.000+02:00</published><updated>2006-04-24T10:37:16.836+02:00</updated><title type='text'>Dynamic template_root Revisited</title><content type='html'>&lt;p&gt;It was simplier than I thought:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
@response.template.base_path = "#{Site.current_site.path}"
render(:action =&gt; template)

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only important thing is that &lt;code&gt;base_path&lt;/code&gt; is absolute, so it is best to use &lt;code&gt;RAILS_ROOT&lt;/code&gt; as base.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114586783682657128?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114586783682657128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114586783682657128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114586783682657128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114586783682657128'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/04/dynamic-templateroot-revisited.html' title='Dynamic template_root Revisited'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114250824850634105</id><published>2006-03-16T12:24:00.000+01:00</published><updated>2006-03-16T12:24:13.466+01:00</updated><title type='text'>Switch » Bluefish</title><content type='html'>&lt;p&gt;RadRails is fine but it eats memory like peanuts. From yesterday I am giving &lt;a href="http://bluefish.openoffice.nl/index.html"&gt;Bluefish&lt;/a&gt; a try.&lt;/p&gt;

&lt;p&gt;It has some annoying bugs&lt;strong&gt;^h^h&lt;/strong&gt;&lt;em&gt;features&lt;/em&gt; like awkward syntax highlighting issues or problems with displaying directory tree. But those are things I can either fix or live with.&lt;/p&gt;

&lt;p&gt;So why am I switching to Bluefish? Because it is &lt;strong&gt;blazing&lt;/strong&gt; fast and uses tenfold less memory than Eclipse+RadRails&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114250824850634105?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114250824850634105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114250824850634105' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114250824850634105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114250824850634105'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/switch-bluefish.html' title='Switch &amp;raquo; Bluefish'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114215472982018590</id><published>2006-03-12T09:50:00.000+01:00</published><updated>2006-03-12T10:12:09.836+01:00</updated><title type='text'>Where to store Rails session data?</title><content type='html'>&lt;p&gt;During first days of development I didn't care much for session data. Rails put those in files in &lt;code&gt;/tmp&lt;/code&gt; by default - and that was fine with me. Sometimes stale sessions were causing problems with my applications but a quick cleanup was all I needed.&lt;/p&gt;

&lt;p&gt;Those session related errors got more annoying when I deployed my application on Textdrive with it's full of Rails data &lt;code&gt;/tmp&lt;/code&gt; directory. So I moved to database-based session storage.&lt;/p&gt;

&lt;p&gt;But for some reason recently I started to see new kind of session related errors. When application was reloaded in development mode it often failed in a very strange place - while re-setting routes. Guess there must have been some incompatibilities between Edge Rails database session storage and Engine dependency handling. Luckily Edge Rails also introduced cleanups in file-based session storage. So once again I am storing all my session data in file system.&lt;/p&gt;

&lt;p&gt;Now the question is: &lt;strong&gt;Was this trip really necessary?&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114215472982018590?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114215472982018590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114215472982018590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114215472982018590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114215472982018590'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/where-to-store-rails-session-data.html' title='Where to store Rails session data?'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114199112291491910</id><published>2006-03-10T12:41:00.000+01:00</published><updated>2006-04-26T09:59:06.340+02:00</updated><title type='text'>Stupid Monkey</title><content type='html'>&lt;blockquote&gt;
&lt;h3&gt;Cannot open index.html&lt;/h3&gt;
&lt;p&gt;The filename "index.html" indicates that this file is of type "HTML document". The contents of the file indicate that the file is of type "XML document". If you open this file, the file might present a security risk to your system.&lt;/p&gt;

&lt;p&gt;Do not open the file unless you created the file yourself, or received the file from a trusted source. To open the file, rename the file to the correct extension for "XML document", then open the file normally. Alternatively, use the Open With menu to choose a specific application for the file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Talk about overacting. I love Gnome but sometimes it just sucks...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114199112291491910?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114199112291491910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114199112291491910' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114199112291491910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114199112291491910'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/stupid-monkey.html' title='Stupid Monkey'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114198257956522426</id><published>2006-03-10T09:26:00.000+01:00</published><updated>2006-03-10T12:57:13.950+01:00</updated><title type='text'>Rcss Changes</title><content type='html'>&lt;p&gt;&lt;a href="http://rcss.rubyforge.orgg"&gt;Rcss&lt;/a&gt; is going through a major rework. It has been &lt;a href="http://www.rails-engines.org"&gt;Enginised&lt;/a&gt; and right now supports server-side includes.&lt;/p&gt;

&lt;p&gt;You can include a file in your CSS files with following statement:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
@server include(common.css)

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All constants from included file are evaluated so it is a perfect way to provide common values for several CSS files.&lt;/p&gt;

&lt;p&gt;Code is currently available in Subversion repository: &lt;code&gt;svn://rubyforge.org/var/svn/rcss/trunk/rcss&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You need to have Engines plugin installed and following route added to your &lt;code&gt;routes.rb&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
  map.connect('stylesheets/:id', :controller =&gt; 'stylesheets', :action =&gt; 'show')

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then just move your CSS files from &lt;code&gt;public/stylesheets&lt;/code&gt; to &lt;code&gt;app/views/stylesheets&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114198257956522426?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114198257956522426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114198257956522426' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114198257956522426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114198257956522426'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/rcss-changes.html' title='Rcss Changes'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114164472903154765</id><published>2006-03-06T11:43:00.000+01:00</published><updated>2006-03-06T12:38:04.906+01:00</updated><title type='text'>Dynamic template_root</title><content type='html'>&lt;p&gt;I am currently developing a multi-site application. One of the features is that it picks layouts and page templates basing on the domain. I was trying to put everything domain-related in a separate directory like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
RAILS_ROOT
 \- sites
    |- domain_a
    |  |- layouts
    |  |- templates
    |  \- stylesheets
    |
    \- domain_b

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My first guess was to set the &lt;code&gt;@@template_root&lt;/code&gt; of the controller from within &lt;code&gt;before_filter&lt;/code&gt;. It didn't worked as desired.&lt;/p&gt;

&lt;p&gt;Second attempt was to actually override the method &lt;code&gt;self.template_root&lt;/code&gt; in the controller. It seemed to work fine - but only for default site.&lt;/p&gt;

&lt;p&gt;Now the real problem is that &lt;code&gt;Controller.template_root&lt;/code&gt; is read &lt;em&gt;only once&lt;/em&gt;, when the controller is instantiated. In fact it is read before it can be set to something meaningful in &lt;code&gt;before_filter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I have solved this problem by using &lt;code&gt;render :file =&gt; path&lt;/code&gt; and not relying on &lt;code&gt;template_root&lt;/code&gt; at all. Another possible solution might be to modify the &lt;code&gt;@@template.base_path&lt;/code&gt; from your controller, but I have not looked at this possibility yet.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114164472903154765?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114164472903154765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114164472903154765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114164472903154765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114164472903154765'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/dynamic-templateroot.html' title='Dynamic template_root'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114121030617532991</id><published>2006-03-01T11:39:00.000+01:00</published><updated>2006-03-10T09:29:00.353+01:00</updated><title type='text'>Fedora and Ruby MySQL Bindings</title><content type='html'>&lt;p&gt;Yesterday I tried to install mysql gem. It refused to install complaining about missing mysqlclient library. Which WAS present.&lt;/p&gt;

&lt;p&gt;It turned out that it was enough to tell gem where to find mysql_config command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
$ gem install mysql -- --with-mysql-config=/usr/bin/mysql_config

&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And now for the best part: Fedora provides MySQL bindings by itself through ruby-mysql package. And it was already installed on my system. DOH.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
$ gem uninstall mysql
$ yum install ruby-mysql

&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114121030617532991?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114121030617532991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114121030617532991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114121030617532991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114121030617532991'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/03/fedora-and-ruby-mysql-bindings.html' title='Fedora and Ruby MySQL Bindings'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114113974552292716</id><published>2006-02-28T16:10:00.000+01:00</published><updated>2006-03-01T12:02:28.486+01:00</updated><title type='text'>Rails Development Environment on Fedora Core 5 (Test 3)</title><content type='html'>&lt;p&gt;It seems that Fedora Core 5 is not that different from FC4. Especially when it comes to Rails development. Almost all instructions from &lt;a href="http://digitalmediaminute.com/howto/fc4rails/"&gt;Installing Ruby on Rails with Lighttpd and MySQL on Fedora Core 4&lt;/a&gt; apply.&lt;/p&gt;

&lt;p&gt;Only the part about creating test application is a bit outdated. I would suggest following &lt;a href="http://developer.apple.com/tools/rubyonrails.html"&gt;Apple's tutorial&lt;/a&gt; instead. It introduces reader to &lt;em&gt;migrations&lt;/em&gt; which should be used in Rails development from day one.&lt;/p&gt;

&lt;p&gt;One more thing: don't forget to install Eclipse and &lt;a href="http://www.radrails.org/"&gt;RadRails&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114113974552292716?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114113974552292716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114113974552292716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114113974552292716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114113974552292716'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/rails-development-environment-on.html' title='Rails Development Environment on Fedora Core 5 (Test 3)'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114111723482009355</id><published>2006-02-28T09:39:00.000+01:00</published><updated>2006-02-28T10:00:34.830+01:00</updated><title type='text'>Damn You, Gnome Icon Chooser!</title><content type='html'>&lt;p&gt;One of the most annoying things. I don't encounter it too often but still.&lt;/p&gt;

&lt;p&gt;Have you ever tried to add a new custom launcher to Gnome panel? It is very easy. Unless you want to customize the icon as well.&lt;/p&gt;

&lt;p&gt;I was trying to add a shortcut for my installation of Eclipse. When I wanted to choose the icon a  &lt;em&gt;Browse Icons&lt;/em&gt; window appeared. Eclipse provides nice own icon which I wanted to use. I clicked &lt;em&gt;Browse&lt;/em&gt;. Strange thing - I wasn't able to choose the icon - I was only able to pick a directory. Hm... So I picked it and guess what? Nothing. Mhm. It took me a while to realize that after choosing a directory you have to click on the address field and press enter just to see your only icon that was present in directory. Which I could just choose from the requester, didn't I?&lt;/p&gt;

&lt;p&gt;There already is a bug (&lt;a href="http://bugzilla.gnome.org/show_bug.cgi?id=328803"&gt;#328803&lt;/a&gt; filled for it. I hope they will fix it ASAP.&lt;/p&gt;

&lt;p&gt;I just can't stand the fact that my precious Gnome has any faults. I want it to be &lt;strong&gt;perfect&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114111723482009355?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114111723482009355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114111723482009355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114111723482009355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114111723482009355'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/damn-you-gnome-icon-chooser.html' title='Damn You, Gnome Icon Chooser!'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114103620394330385</id><published>2006-02-27T11:24:00.000+01:00</published><updated>2006-02-27T11:30:04.156+01:00</updated><title type='text'>External Repositories for Fedora 5 Test 3</title><content type='html'>&lt;p&gt;Fedora is nice but is missing several crucial components after installation. It won't be long before external repositories start to include RPMs for FC5. Right now &lt;a href="http://atrpms.net/dist/fc5/"&gt;ATrpms&lt;/a&gt; is doing a great job providing for example mplayer. I am still missing mp3 support though :(&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114103620394330385?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114103620394330385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114103620394330385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114103620394330385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114103620394330385'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/external-repositories-for-fedora-5.html' title='External Repositories for Fedora 5 Test 3'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114098760416612603</id><published>2006-02-26T22:00:00.000+01:00</published><updated>2006-02-26T22:13:14.286+01:00</updated><title type='text'>Fedora Core 5 Test 3</title><content type='html'>&lt;h3&gt;Installation attempt one: Upgrade from FC4&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Put DVD in drive&lt;/li&gt;
  &lt;li&gt;Admire new logo&lt;/li&gt;
  &lt;li&gt;Be surprised that installer tells installation will take 400+ minutes.&lt;/li&gt;
  &lt;li&gt;Be surprised that it really takes that long.&lt;/li&gt;
  &lt;li&gt;Go to a party&lt;/li&gt;
  &lt;li&gt;Return to find finished installation&lt;/li&gt;
  &lt;li&gt;Restart&lt;/li&gt;
  &lt;li&gt;Be shocked by kernel panic&lt;/li&gt;
  &lt;li&gt;Fail to recover&lt;/li&gt;
  &lt;li&gt;Say bad words (a lot)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Installation attempt two: Clean Install&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Put DVD in drive&lt;/li&gt;
  &lt;li&gt;Install in 30 mins.&lt;/li&gt;
  &lt;li&gt;Customize in 2h&lt;/li&gt;
  &lt;li&gt;Be productive&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I am still installing some auxiliary software. Aside of that it is a clean and slick system. Nice!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114098760416612603?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114098760416612603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114098760416612603' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114098760416612603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114098760416612603'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/fedora-core-5-test-3.html' title='Fedora Core 5 Test 3'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114072391353296223</id><published>2006-02-23T20:45:00.000+01:00</published><updated>2006-02-23T20:45:13.570+01:00</updated><title type='text'>Rails and URLs without a host name/port number</title><content type='html'>&lt;p&gt;I was digging a in how &lt;code&gt;cache_page&lt;/code&gt; works and found a nice little surprise.&lt;/p&gt;

&lt;p&gt;Sometimes you want URLs in your site to follow some convention. Like not having host name or port number. You can specify options in each invokation of url_for. Or you can be smart.&lt;/p&gt;

&lt;p&gt;Override a method &lt;code&gt;default_url_options&lt;/code&gt; in your controller and from within return a hash with your favourite options. Works for whole application if you do it in &lt;code&gt;ApplicationController&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114072391353296223?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114072391353296223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114072391353296223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114072391353296223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114072391353296223'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/rails-and-urls-without-host-nameport.html' title='Rails and URLs without a host name/port number'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-114069056060946742</id><published>2006-02-23T11:29:00.000+01:00</published><updated>2006-02-23T11:29:20.866+01:00</updated><title type='text'>[Link] Loading your test db to your development db</title><content type='html'>&lt;p&gt;I have found this little piece today. Quite a nice way to initialize your database on first run.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;a href="http://kekova.ca/articles/2005/12/31/loading-your-test-db-to-your-development-db"&gt;Loading your test db to your development db&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Back to rewriting fixtures then :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-114069056060946742?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/114069056060946742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=114069056060946742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114069056060946742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/114069056060946742'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2006/02/link-loading-your-test-db-to-your.html' title='[Link] Loading your test db to your development db'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-113196621349198544</id><published>2005-11-14T12:02:00.000+01:00</published><updated>2005-11-14T12:03:33.500+01:00</updated><title type='text'>Fonts In Open Source Web Design</title><content type='html'>&lt;p&gt;I was looking for nice font to make a logo. I wanted to stick to free and/or open fonts. I have found several options:&lt;/p&gt;


 &lt;ul&gt;
 &lt;li&gt;&lt;a href="http://gnome.org/fonts/"&gt;Bitstream Vera&lt;/a&gt; &amp;#8211; fonts released on open source license by &lt;a href="http://www.bitstream.com/"&gt;Bitstream&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://dejavu.sourceforge.net/wiki/index.php/Main_Page"&gt;DejaVu&lt;/a&gt; &amp;#8211; a font family based on Bitstream Vera family. It includes additional Unicode characters. Since I use Eastern Europe character set it is default font on my desktop.&lt;/li&gt;
  &lt;li&gt;&lt;a href="ftp://ftp.gimp.org/pub/gimp/fonts/"&gt;Freefonts&lt;/a&gt; &amp;#8211; font package from Gimp&lt;/li&gt;
 &lt;/ul&gt;


 &lt;p&gt;I have also found a nice tool to browse through the fonts: &lt;a href="http://gfontview.sourceforge.net/"&gt;The Font Viewer&lt;/a&gt; &amp;#8211; a &lt;span class="caps"&gt;GTK1&lt;/span&gt; based application. It is not a perfect one but it allows to create a font overview with chosen text.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-113196621349198544?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/113196621349198544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=113196621349198544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/113196621349198544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/113196621349198544'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/11/fonts-in-open-source-web-design.html' title='Fonts In Open Source Web Design'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-113017864323553159</id><published>2005-10-24T20:29:00.000+02:00</published><updated>2005-10-24T20:30:43.236+02:00</updated><title type='text'>Ruby 1.8.3 Versus Rake</title><content type='html'>&lt;p&gt;Ruby 1.8.3 changed allowed options for &lt;code&gt;FileUtils::cd&lt;/code&gt; method. It no longer accepts &lt;code&gt;:noop&lt;/code&gt; option. One of the side effects is that Rake is not able to run &lt;code&gt;package&lt;/code&gt; task. So if you have been running into the problem I have mentioned in one of my previous posts (&lt;code&gt;No such option :noop&lt;/code&gt;) you will have to downgrade to Ruby 1.8.2.&lt;/p&gt;


 &lt;p&gt;Now I will have to find a way how to keep Yum away from automagically upgrading my old Ruby version.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-113017864323553159?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/113017864323553159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=113017864323553159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/113017864323553159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/113017864323553159'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/10/ruby-183-versus-rake.html' title='Ruby 1.8.3 Versus Rake'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-112975010690114318</id><published>2005-10-19T21:27:00.000+02:00</published><updated>2005-10-24T20:27:46.036+02:00</updated><title type='text'>Rcss 0.3.0 Released</title><content type='html'>&lt;p&gt;Rcss evolved from a small article to quite a chunk of Ruby software. It has it&amp;#8217;s own &lt;a href="http://rubyforge.org/projects/rcss"&gt;project page&lt;/a&gt; and can be installed as standard &lt;code&gt;gem&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
# gem install rcss
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;Detailed &lt;a href="http://rcss.rubyforge.org"&gt;RDoc documentation for Rcss&lt;/a&gt; is also available.&lt;/p&gt;


 &lt;h1&gt;Update&lt;/h1&gt;


 &lt;p&gt;Unfortunatelly it does not work properly. There is something wrong with my Ruby installation &amp;#8211; and gem I have created is not recognized on different platform than mine.&lt;/p&gt;


 &lt;p&gt;I am working on it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-112975010690114318?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/112975010690114318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=112975010690114318' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112975010690114318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112975010690114318'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/10/rcss-030-released.html' title='Rcss 0.3.0 Released'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-112964982605579245</id><published>2005-10-18T17:32:00.000+02:00</published><updated>2005-10-19T15:29:24.123+02:00</updated><title type='text'>Importing vCard Contacts To Thunderbird</title><content type='html'>&lt;p&gt;Personally Evolution is not my favourite mail program. The only reason why I  have been sticking to it was it&amp;#8217;s ability to import vCard contacts. And I have had a &lt;span class="caps"&gt;LOT&lt;/span&gt; of those :)&lt;/p&gt;


 &lt;p&gt;Considering how good Firefox is I was thinking about switching to Thunderbird. Unfortunatelly lack of ability to import vCards was stopping me. Untill today that is.&lt;/p&gt;


 &lt;p&gt;I have stumbled upon a small Ruby library for handling vCards. Writing a script that will convert my exported contacts to &lt;span class="caps"&gt;CSV&lt;/span&gt; file was just a matter of minutes.&lt;/p&gt;


 &lt;p&gt;To use it you will need to download and install &lt;a href="http://vpim.rubyforge.org/"&gt;Vpim library&lt;/a&gt;. Installation is quite simple:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
$ ruby install.rb config
$ ruby install.rb setup
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;Switch to root privileges and invoke:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
# ruby install.rb install  
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;Now for the script itself (file &lt;code&gt;vcard-to-csv.rb&lt;/code&gt;):&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
#!/usr/bin/env ruby

require 'vpim/vcard'

cards = Vpim::Vcard.decode(ARGF.read)

cards.each do |card|
  surname, name = card['N'].split(';')
  full_name = card['FN']

  # Depending on contact Evolution used different types for email field
  # In my case order of importance for emails was as below.
  # Luckily no contact have had more than two emails
  email_other = card['EMAIL', 'OTHER']
  email_work = card['EMAIL', 'WORK']
  email_home = card['EMAIL', 'HOME']
  emails = []
  [email_other, email_work, email_home].each {|email| email &amp;#38;&amp;#38; emails &amp;lt;&amp;lt; email}

  tel_home = card['TEL', 'HOME']
  tel_work = card['TEL', 'WORK']
  tel_mobile = card['TEL', 'CELL']

  # Full list of fields:
  #
  # first,last,display,nickname,email,add email,work phone,home phone,fax,pager,mobile,address,address2,city,state,zip,country,address work,address work2,city work,state work,zip work,country work,titile,departament,organization,http://web page work,http://web page,,,,custom 1,custom 2,custom 3,custom 4,notes,
  puts "#{name},#{surname},#{full_name},,#{emails[0]},#{emails[1]},#{tel_work},#{tel_home},,,#{tel_mobile},,,,,,,,,,,,,,,,,,,,,,,,,," 

end
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;To use it export contacts from Evolution to &lt;code&gt;contacts.vcf&lt;/code&gt; file and from shell type:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
  $ ruby vcard-to-csv.rb contacts.vcf &amp;gt;contacts.csv
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;Now you can import &lt;code&gt;contacts.csv&lt;/code&gt; file into Thunderbird.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-112964982605579245?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/112964982605579245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=112964982605579245' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112964982605579245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112964982605579245'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/10/importing-vcard-contacts-to.html' title='Importing vCard Contacts To Thunderbird'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-112894508041223217</id><published>2005-10-10T13:50:00.000+02:00</published><updated>2005-10-19T15:27:15.873+02:00</updated><title type='text'>Rake Problems</title><content type='html'>&lt;p&gt;I have been trying to create a Gem package for Rcss. For some reason Rake dies complaining that:&lt;/p&gt;


 &lt;p&gt;&lt;code&gt;no such option: noop&lt;/code&gt;&lt;/p&gt;


 &lt;p&gt;It almost certainly is my fault (as Google is not aware of such error) but I can not pinpoint it. I just hate wasting time solving that kind of problems.&lt;/p&gt;


 &lt;h1&gt;Update&lt;/h1&gt;


 &lt;p&gt;Found the problem. &lt;code&gt;Gem&lt;/code&gt; task executes properly, only &lt;code&gt;package&lt;/code&gt; has problems. Gem can be successfully built, but I wonder what is broken in other types of packages?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-112894508041223217?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/112894508041223217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=112894508041223217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112894508041223217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112894508041223217'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/10/rake-problems.html' title='Rake Problems'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17220805.post-112833991401967317</id><published>2005-09-15T13:43:00.000+02:00</published><updated>2005-10-19T15:26:41.576+02:00</updated><title type='text'>Server-side CSS Constants For Rails</title><content type='html'>&lt;p&gt;&lt;span class="caps"&gt;CSS&lt;/span&gt; is missing one quite important feature. It does not include any way to define variables or constants. This can be easily fixed using server-side &lt;span class="caps"&gt;CSS&lt;/span&gt; scripting.&lt;/p&gt;


 &lt;h1&gt;Introduction&lt;/h1&gt;


 &lt;p&gt;When you declare color of the element you have to provide literal value for it. The same goes for font sizes and other attributes. If your site is rich and you have plenty of selectors this means lots of repetitions of given value across &lt;span class="caps"&gt;CSS&lt;/span&gt; file(s).&lt;/p&gt;


 &lt;p&gt;Every time you want to adjust given color in your theme you have to do search and replace on your &lt;span class="caps"&gt;CSS&lt;/span&gt; file. This certainly is not the &lt;span class="caps"&gt;DRY&lt;/span&gt; way.&lt;/p&gt;


There are several solutions to this problem, for example:
 &lt;ul&gt;
 &lt;li&gt;Keep color declarations in separate &lt;span class="caps"&gt;CSS&lt;/span&gt; file. This separates color information from layout but you still have to follow search and replace pattern. And sooner or later (I bet on sooner) selectors in layout and color files will go out of sync.&lt;/li&gt;
  &lt;li&gt;Use multiple classes for &lt;span class="caps"&gt;HTML&lt;/span&gt; elements. It is possible to provide two (or more) &lt;span class="caps"&gt;CSS&lt;/span&gt; classes in class attribute &amp;#8211; one responsible for layout and another for colors. Unfortunatelly this brings unwanted elements of layout to &lt;span class="caps"&gt;HTML&lt;/span&gt; structure. I personally consider it almost as bad as using inline style attribute.&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h1&gt;Further Reading&lt;/h1&gt;


 &lt;p&gt;You can find discussion on this topic on Ruby on Rails weblog: &lt;a href="http://weblog.rubyonrails.com/archives/2005/08/22/augmenting-css-with-variables-and-more"&gt;Augmenting &lt;span class="caps"&gt;CSS&lt;/span&gt; with variables and more&lt;/a&gt;&lt;/p&gt;


 &lt;p&gt;Luke Redpath provides a simple implementation in his blog: &lt;a href="http://lukeredpath.blogspot.com/2005/08/dynamic-css-in-rails.html"&gt;Dynamic &lt;span class="caps"&gt;CSS&lt;/span&gt; in Rails&lt;/a&gt;&lt;/p&gt;


 &lt;p&gt;Discussion about &amp;#8220;Shaun Inman&amp;#8217;s similar &lt;span class="caps"&gt;PHP&lt;/span&gt; project on Eric Meyer&amp;#8217;s blog&amp;#8221;: http://meyerweb.com/eric/thoughts/2005/08/31/the-constants-gardener/&lt;/p&gt;


 &lt;h1&gt;Adding Functionality&lt;/h1&gt;


Luke&amp;#8217;s solution will work well in most deployments. Still it would be nice to have implementation that:
 &lt;ul&gt;
 &lt;li&gt;Integrates into Rails&lt;/li&gt;
  &lt;li&gt;Allows to use Rails caching capabilities&lt;/li&gt;
  &lt;li&gt;Uses standard controller to drive the &lt;span class="caps"&gt;CSS&lt;/span&gt; generation (for example to deliver different stylesheets for different browsers depending on User-Agent header).&lt;/li&gt;
  &lt;li&gt;Provides access to Rails model (for example to use per-user color theme settings stored in the data base)&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h1&gt;Implementation&lt;/h1&gt;


 &lt;p&gt;ActionView::Base allows to create and register new template handlers so let us use this:&lt;/p&gt;


 &lt;h2&gt;Step One&lt;/h2&gt;


 &lt;p&gt;First for the toughest part: creating a template handler. Create a file named &lt;code&gt;rcss_handler.rb&lt;/code&gt; with following contnent in &lt;code&gt;lib&lt;/code&gt; directory of you application.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
require 'erb'

class RcssHandler
  include ERB::Util
  def initialize(action_view)
    @action_view = action_view
  end

  def render(template, local_assigns)
    @action_view.controller.headers["Content-Type"] = 'text/css'
    b = binding

    local_assigns.stringify_keys!
    local_assigns.each { |key, value| eval "#{key} = local_assigns[\"#{key}\"]", b }

    ERB.new(template, nil, '-').result(b)
  end
end

ActionView::Base::register_template_handler 'rcss', RcssHandler
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;It ensures proper content type of sent data and applies all variables defined in controller to the template. The last line introduces type handler to ActionView.&lt;/p&gt;


 &lt;p&gt;Code for adding variables to template scope is taken directly from ActionView::Base implementation.&lt;/p&gt;


 &lt;h2&gt;Step Two&lt;/h2&gt;


 &lt;p&gt;Making the handler visible to your application. Edit your &lt;code&gt;config/environment.rb&lt;/code&gt; file and add following line somewhere (preferably at the end):&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
require 'rcss_handler'
&lt;/code&gt;
&lt;/pre&gt;

 &lt;h2&gt;Step Three&lt;/h2&gt;


 &lt;p&gt;Now the handler is ready to use and will be applied to all templates with type &amp;#8216;rcss&amp;#8217;. To feed it with one we need to create proper controller.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
class RcssController &amp;lt; ApplicationController
  def render_rcss
    if params[:rcss] =~ /\.css$/
      template = $`
    else
      template = params[:rcss]
    end
    render :action =&amp;gt; template, :type =&amp;gt; 'rcss', :layout =&amp;gt; false
  end
end
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;RegEx is not necessary, it simply makes sure so that we support &lt;span class="caps"&gt;CSS&lt;/span&gt; URLs with and without &lt;code&gt;.css&lt;/code&gt; extention.&lt;/p&gt;


Note two less commonly used options sent to render method:
 &lt;ul&gt;
 &lt;li&gt;&lt;code&gt;:type =&amp;gt; 'rcss'&lt;/code&gt; makes sure that Rcss handler will be used&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;:layout =&amp;gt; false&lt;/code&gt; skips layout rendering, otherwise parsed &lt;span class="caps"&gt;CSS&lt;/span&gt; would end up wrapped in &lt;span class="caps"&gt;HTML&lt;/span&gt; from default layout&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h2&gt;Step Four&lt;/h2&gt;


 &lt;p&gt;Now it is time to add nice routing: &lt;code&gt;open config/routes.rb&lt;/code&gt; and add following lines &lt;strong&gt;before&lt;/strong&gt; the most generic mapping:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
map.connect 'rcss/:rcss', :controller =&amp;gt; 'rcss', :action =&amp;gt; 'render_rcss'
map.rcss 'rcss/:rcss', :controller =&amp;gt; 'rcss', :action =&amp;gt; 'render_rcss'
&lt;/code&gt;
&lt;/pre&gt;

 &lt;h2&gt;Step Five&lt;/h2&gt;


 &lt;p&gt;Create your first &lt;span class="caps"&gt;RCSS&lt;/span&gt; file. Create file in &lt;code&gt;app/views/rcss/default.rcss&lt;/code&gt; with following contents:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;lt;% 
    highlight_backgroud = "gray" 
    highlight_color = "red" 
%&amp;gt;
* {
    background-color: &amp;lt;%= highlight_backgroud %&amp;gt;;
    color: &amp;lt;%= highlight_color %&amp;gt;;
}
&lt;/code&gt;
&lt;/pre&gt;

 &lt;h2&gt;Step Six&lt;/h2&gt;


 &lt;p&gt;Use rcss file in your layout using following line in &amp;lt;head/&amp;gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
&amp;lt;link href="/rcss/default.css" media="screen" rel="Stylesheet" type="text/css" /&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;

 &lt;p&gt;Remember to restart the server before testing &amp;#8211; only then your new configuration will be taken into account.&lt;/p&gt;


 &lt;p&gt;Enjoy your new, completly unreadible application layout.&lt;/p&gt;


 &lt;h1&gt;Room For Improvement&lt;/h1&gt;


 &lt;ul&gt;
 &lt;li&gt;Provide template handler for &lt;a href="http://www.shauninman.com/plete/2005/08/css-constants"&gt;&lt;span class="caps"&gt;CSS&lt;/span&gt; Server-Side  Constants&lt;/a&gt; (needs customized parser)&lt;/li&gt;
  &lt;li&gt;Ensure proper caching (add caching headers)&lt;/li&gt;
  &lt;li&gt;Provide helper similar to &lt;code&gt;stylesheet_link_tag&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;...&lt;/li&gt;
 &lt;/ul&gt;


 &lt;h1&gt;License&lt;/h1&gt;


 &lt;p&gt;All code in this post is licensed under &lt;span class="caps"&gt;MIT&lt;/span&gt; license:&lt;/p&gt;


 &lt;p&gt;&lt;code&gt;Copyright (c) 2005 Lukasz "Bragi Ragnarson" Piestrzeniewicz&lt;/code&gt;&lt;/p&gt;


 &lt;p&gt;&lt;code&gt;Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:&lt;/code&gt;&lt;/p&gt;


 &lt;p&gt;&lt;code&gt;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&lt;/code&gt;&lt;/p&gt;


 &lt;p&gt;&lt;code&gt;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17220805-112833991401967317?l=blog.ragnarson.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ragnarson.com/feeds/112833991401967317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17220805&amp;postID=112833991401967317' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112833991401967317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17220805/posts/default/112833991401967317'/><link rel='alternate' type='text/html' href='http://blog.ragnarson.com/2005/09/server-side-css-constants-for-rails.html' title='Server-side CSS Constants For Rails'/><author><name>Bragi</name><uri>http://www.blogger.com/profile/12109437004322472888</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_lwZg8RPR_dY/SH77zGY-HRI/AAAAAAAAA9I/DkvDJ_A4RTA/S220/avatar2.jpg'/></author><thr:total>1</thr:total></entry></feed>
