J-_-L
index | github | twitter | irbtools | pws | rubykraut | ruby on ubuntu | zucker | euler | fresh
09.09.09 21.06.10

Troubleshooting an aegis-permission problem

gem · hints · rails · ruby

In my current Rails project, I use the aegis gem for rights management. And I almost got mad, wondering, why it wouldn’t work.. […]

01.09.09 06.06.10

PlasmaRails.org

plasmarails.org

PlasmaRails.org is an online RDoc for Edge Rails, which is regenerated every day. It is based on sdoc with some custom css.

Update 06.06.2010: Relaunched with better stylesheets! […]

29.08.09 29.04.10

Playing with Dijkstra

About a year ago, some students at my university announced a little programming competition for students beginning studying IT, like me. The language could be chosen freely.

At this time, I had already done some C and PHP programming.. but I also had heard of Ruby and that Ruby is sooo cool. So I decided to learn the basics of Ruby by taking part… and it’s been the right decision! I fell in love with Ruby ;).

I publish my solution here. It is a good “try to understand what it does”-exercise for people new to Ruby or programming in general (or people doing Rails only all the time). […]

23.08.09

Create an offline version of the Ruby docs

When I began programming Ruby/Rails, I quickly found the online Ruby documentation at ruby-doc.org and the Rails API, which are both very useful. But unfortunately, one cannot be always online. In this blog post, I’ll demonstrate some ways to generate or get the docs offline and some hints on using them. […]

08.08.09 30.08.09

Converting decimal to binary integers: custom methods vs. to_i [Update]

At my last entry, a question arose about what is the most efficient way to convert integers between the bases 2 and 10: either using built-in ruby methods (and even do lightweight string-operations) or calculating it manually. I had to find out ;). So I have written a little benchmark program, which does the conversion in three different ways:

  1. using built-in to_i-magic
  2. calculating it by hand
  3. using sprintf

It stops the time each method needs to get the fastest. The result might be surprising. [Update: improved the custom methods] […]

01.08.09 15.06.10
4 comments

Storing an array of indices in an integer

Sometimes you have an array of indices. These might, for example, act as flags, whether some specific options are set or not. A nice way to store this list is, to store it in one single number. […]

01.08.09 25.01.13
9 comments

Ruby