Quantcast
Channel: Ruby and Rails – Karl Brodowsky's IT-Blog
Browsing all 23 articles
Browse latest View live

Ruby 2.0 coming soon

This is a translation of Ruby 2.0 in Sicht According to blade.nagaokaut.ac.jp Ruby 2.0 is almost finished. The new features are already known and a release 2.0.0-p0 is planned for Q1 2013.

View Article



Image may be NSFW.
Clik here to view.

Rails 4.0 Beta

Rails 4.0 Beta.

View Article

Image may be NSFW.
Clik here to view.

Residue Class Rounding

Deutsch If you do not know what residue classes are, just read on, it will be explained to the extent needed later on. The concept of rounding seems familiar, but let us try to grab it a little bit...

View Article

Image may be NSFW.
Clik here to view.

Monads in Ruby

Monads? Easy! A Monad over X simply is a Monoid in the Category of Endofunctors of X. Monads? Really! Monads are a concept in mathematics Algebra is an area of mathematics Category theory is an...

View Article

Why I still like Ruby

Some years ago Ruby in conjunction with rails was an absolute hype. In the Rails User Group in Zürich we had meetups with 30 people every two weeks. The meetings every two weeks have been retained, but...

View Article


Testing Java- and C-programs with Ruby and Perl

It is very important to write good unit tests for software that is non-trivial and that is relied on by other pieces of software. Often the logic of the software can easily be covered by the native...

View Article

Image may be NSFW.
Clik here to view.

Find the next entry in a sequence

In Facebook, Xing, Google+, Vk.com, Linkedin and other of these social media networks we are often encountered with a trivial question like this: 1->2 2->8 3->18 4->32 5->50 6->72...

View Article

Conversion of ASCII-graphics to PNG or JPG

Images are usually some obscure binary files. Their most common formats, PNG, SVG, JPEG and GIF are well documented and supported by many software tools. Libraries and APIs exist for accessing these...

View Article


Image may be NSFW.
Clik here to view.

What do +, – and * with Integer do?

When using integers in C, Java or Scala, we often use what is called int. It is presented to us as the default. And it is extremely fast. Ruby uses by default arbitrary length integers. But what do +,...

View Article


How to create ISO Date String

It is a more and more common task that we need to have a date or maybe date with time as String. There are two reasonable ways to do this: * We may want the date formatted in the users Locale, whatever...

View Article

Image may be NSFW.
Clik here to view.

Lazy Collections, Strings or Numbers

The idea is, that we have data that is obtained or calculated to give us on demand as much of it as we request. But it is not necessarily initially present. This concept is quite common in the...

View Article

Image may be NSFW.
Clik here to view.

When to use Scala and Ruby

There are many interesting languages that have their sweet spots and of course a larger set of languages than just two should be considered for new projects. But Ruby and Scala are both very...

View Article

Image may be NSFW.
Clik here to view.

Loops with unknown nesting depth

We often encounter nested loops, like for (i = 0; i This can be nested to a few more levels without too much pain, as long as we observe that the number of iterations for each level need to be...

View Article


Image may be NSFW.
Clik here to view.

Meaningless Whitespace in Textfiles

We use different file formats that are more or less tolerant to certain changes. Most well known is white space in text files. In some programming languages white space (space, newline, carriage...

View Article

Image may be NSFW.
Clik here to view.

Logging

Deutsch Software often contains a logging functionality. Usually entries one or sometimes multiple lines are appended to a file, written to syslog or to stdout, from where they are redirected into a...

View Article


TruffleRuby

The language Ruby is one of the most beautiful languages. A lot of things can be done, it has a good level of abstraction, it has chosen some very good defaults, has provided some great ideas that I...

View Article

Image may be NSFW.
Clik here to view.

LongDecimal

Disclaimer: This article is an occasion, where you might need some of the presumably useless mathematics that you might have learned in school and university. If this bothers you, maybe you should wait...

View Article


Image may be NSFW.
Clik here to view.

Flashsort in Ruby

Deutsch There is a simple implementation of Flashsort in Ruby, after having already provided an implementation in C. The C-implementation is typically faster than the libc-function qsort, but this...

View Article

Image may be NSFW.
Clik here to view.

How to calculate Square Roots and Cubic Roots

The functions sqrt and sometimes even cbrt are commonly available, but it is nice to see how they can be calculated. There are several approaches, but the most popular ones are Newton’s method and an...

View Article

Object Creation: Builder vs. Constructor vs. Setter

When we create new objects, we are basically confronted with the need to provide at least one construction pattern. Of course depending on the language we have more or less three ways to go that are...

View Article
Browsing all 23 articles
Browse latest View live




Latest Images