Welcome to the fourth post of this series. Just before proceeding to the questions, I would like to mention the great Metaprogramming Ruby: Program Like the Ruby Pros book by Paolo Perrotta, a very good book that explains the metaprogramming aspects of the Ruby language.
Now let’s get going!
Scope gates
Taken from the above mentioned book:
There [...]
Welcome to the third post of this
Welcome in this second post of this series. Just before I list the questions of this one, I want to mention 2 things:
You can follow StackOverflow tagged Ruby questions on twitter using the user: sof_ruby
Some ppl feel shy to ask or even to answer, my (little) experience in life taught me that If you [...]
I have participated heavily during the last 2 weeks in answering Ruby tagged questions on stackoverflow. That took place mainly after Ryan Bates tweet wishing to see more Ruby developers on stackoverflow. Since then I have enjoyed reading various kinds of questions that range in level from basic to professional ones and which cover various [...]
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 write about them, is that both are there out of the box for you to use [...]
13 Jul, 2009 in
Ruby by
khelll
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 of encoding just like Ruby 1.8.
# coding: UTF-8
π = Math::PI
def √(x)
Math.sqrt(x)
end
def ∑(r)
[...]
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 and turns it into a composition of n functions each of them take 1 parameter. [...]
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, a functional programming can be described as follows:
In computer science, functional programming is a programming paradigm [...]
26 Apr, 2009 in
Grails,
Ruby by
khelll
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 principles when you start designing in OOP world. However and while the first seems to be [...]
11 Jan, 2009 in
JRuby,
Java,
Ruby by
khelll
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 a trial yet, and why they should do so.
If you never worked with Java before, [...]