31 Dec, 2008 in
Ruby by
khelll
According to wikipedia, Metaprogramming:
is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at runtime that would otherwise be done at compile time.
Well, nice to hear cause Ruby is a lang that supports Metaprogramming effectively, and might be the best in [...]
30 Dec, 2008 in
Ruby by
khelll
A Domain-specific language(DSL) is a computer language that’s targeted to a particular kind of problem, rather than a general purpose language that’s aimed at any kind of software problem. Domain specific languages have been talked about, and used for almost as long as computing has been done. Regular expressions and CSS are 2 examples of [...]
28 Dec, 2008 in
Ruby by
khelll
This blog post is about ruby’s callbacks(hooks): what are the available ones,and how practically we can use them?
method_missing
obj.method_missing(symbol [, *args] ) => result might be the most famous hook in ruby, and is being used a lot by ruby developers :
Invoked by Ruby when obj is sent a message it cannot handle. symbol [...]
26 Dec, 2008 in
Ruby by
khelll
This is the second post related to ruby’s reflection API, the previous post was an extensive intro to this topic. While the current one will be lighter somehow, it would require you to focus a bit more on the content.
Here we go:
Setting, getting and removing instance variables :
# Define a simple class M
class M ; [...]
19 Dec, 2008 in
Ruby by
khelll
If you are here, then most probably you want to know more about ruby reflection interface. Well that’s true, but I always find myself in need to explain few things before I get started with my posts, and this time I find myself in need of explaining few things related to ruby’s OOP.
I’m pretty sure [...]
12 Dec, 2008 in
Merb by
khelll
So many developers from various countries had corresponded to Matt Aimonetti’s article on open merb book, and an early version of the book is out there.
However lot’s of work is still needed in both directions: contribution and translation ,so: dear Arabic developers wherever you are, if you are interested in Merb framework, have the ability [...]
7 Dec, 2008 in
Merb + RoR3 by
khelll
Well, finally it’s there, many important improvements were added to rails 2.2, and yet new things are on the way, you can check this blog post to check what’s new, while i’m gonna list here what i really liked about the new version of rails 2.2:
Thread safe
If you really don’t know what it means, [...]
I wanted to start blogging on ruby reflection api, but i just realized that i have to give a second part of my previous article on ruby introspection .
So here we go:
s = ”
# s.is_a? String, this is the same!
String === s
# Determines whether the object has a public or protected method with [...]
5 Dec, 2008 in
mysql by
khelll
Now a days, UTF-8 is the most used data encoding format, and the fact that your database is not using UTF8 encoding is really annoying, specially additionally when it comes to integrating different systems, that has no one unified encoding format.
So if you think it’s time to change your data encoding to utf8 format, then [...]
5 Dec, 2008 in
Grails by
khelll
A little problem that i faced with grails , was setting the locale dynamically, i followed this nice article , and here is how i could manage it :
I made a new file called messages_ar.properties that contains the arabic localization under the i18n folder.
I made a simple beforeinterceptor:
def beforeInterceptor = {
[...]