This is a Ruby implentation of the SHA-256 hashing algorithm. Truth be told: It is almost a plain copy of the Wikipedia pseudocode ;) […]
After editing some source files with different editors on different platforms, I had some troubles with automatically inserted tabs messing it all up.
This little script replaces all tabs with two spaces. […]
Lots of IDEs (e.g. Netbeans) and some editors (e.g. gedit with plugins) have a nice feature: They show comments, which start with something like TODO or FIXME. Those annotations are quickly written and they make it harder to forget some things you wanted to (or have to) do.
I have just discovered that Rails has this feature already built-in!
This article is written for people with experience in programming in general, but who are new to Ruby.
A German version is published in the offline magazine #2, a magazine by some students of TU Dresden.
The intention is to demonstrate some features of Ruby and show, what is so great about Ruby:
A clean syntax combined with the possibility to adapt the language to given requirements flexibly. […]
Some days ago, I discovered a website – which is the most addicting one I know :) – codegolf.com. The goal is, to solve programming problems with as short code as possible.
As I said, it is addicting. You do not write better ruby code by golfing. But you can really improve the knowledge of the language. And it is fun :)
After doing some of the other challenges I tried the brainfuck challenge.
Brainfuck is a Turing-complete esoteric programming language consisting only of 8 letters, operating on a 30000 cells-array. This is the hello world program:
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
The goal is to build a interpreter. […]
Some time ago, I conducted a short presentation about Ruby. And to impress the audience, I did some live coding and implemented the quicksort algorithm in 5 minutes. They were impressed :) […]