Author Archives: khelll

Bringing web applications to your Desktop with Prism

I have almost finished working on a web app that will be used inside intranets by students willing to do their English language exams interactively. I have reached the point where I want the app to have as much as … Continue reading

Posted in Web | Tagged , , | 3 Comments

Observer and Singleton design patterns in Ruby

This is my first article in http://railsmagazine.com, it was published in issue 3, so basically I’m just republishing it here again. Observer and singleton are two common design patterns that a programmer should be familiar with, however what made me … Continue reading

Posted in Design Patterns, Ruby | Tagged , , , | 11 Comments

Ruby 1.9 Encoding Fun

Ruby 1.9 has a great support for encoding, this post covers that for a big deal, however with this support out of the box, things like this becomes easier, just note the source code is not limited to few types … Continue reading

Posted in Ruby | Tagged , , | 4 Comments

Scala is my next choice

I have done Pascal, C, C++, Java, PHP, Ruby, Groovy and recently Scala, which I found it to be a unique language compared to anything else I have ever worked with. My journey with this language started after the Twitter’s … Continue reading

Posted in Scala | Tagged | 28 Comments

Ruby Currying

Update: This post was updated to show the difference between Currying and Partial Functions. Currying is a concept in Functional Programming that’s enabled by Higher-order functions. It’s best described as: the ability to take a function that accepts n parameters … Continue reading

Posted in Functional Programming, Ruby | Tagged , , | 8 Comments

Ruby and Functional Programming

Ruby is known to support the functional paradigm. This article is going to walk you through the Functional Programming page on WikiPedia, to revise the general concepts of functional programming and to explain how Ruby supports them. According to wikipedia, … Continue reading

Posted in Functional Programming, Ruby | Tagged , | 8 Comments

Delegation in Ruby

This is my first article in http://railsmagazine.com, it was published in issue 1, so basically I’m just republishing it here again. “Separate changeable parts from others that remain the same” and “composition is preferred to inheritance” are 2 common design … Continue reading

Posted in Grails, Ruby | Tagged , , | 4 Comments

C++ passes by reference, Java and Ruby don’t

I got a lot of comments for the previous article, that was explaining how Ruby passes by value, just like Java does. I thought that showing a simple example implemented in C++, Java and Ruby will clarify the idea. In … Continue reading

Posted in C++, Java, Ruby | Tagged , | 141 Comments

Ruby, pass by value or by reference?

It’s a basic question that I myself had a problem with when i started using Ruby: Does Ruby pass by value or by reference? Well, if you want a direct answer, then: Ruby passes by value. It’s a similar behavior … Continue reading

Posted in Ruby | Tagged , | 38 Comments

The power of JRuby

It’s true that I’m not the qualified guy to talk about Java’s power,as it has been 2 years since i last practiced it, but i feel like i have to communicate my thoughts to the people that didn’t give JRuby … Continue reading

Posted in Java, JRuby, Ruby | Tagged , , | 27 Comments