Don’' Know Metaprogramming In Ruby? Don’t Know Metaprogramming In Ruby? This guest post is by Gavin Morrice, who is a freelance Ruby/Rails developer based in Edinburgh. He likes sharing Rails tips on his site. When he’s not writing code he’s usually at the gym, reading or cooking. Introduction Vim for Rubyists part 1 - Vim plugins, tips, tricks and tutorials Photo by supervillain It is really exciting to be a Rubyist lately. We have our amazing tools (rake, rspec, Cucumber, Rails etc.), we write object-oriented code, that is easy to maintain and flexible when it comes to adding new features, and changing domain logic. We have amazing hosting support from Heroku, Engine Yard and Rackspace. And last, but not least, powerful monitoring tools like New Relic are ready to tell us when there are issues in our applications. But do we have the perfect editor?
Getting Started with Jekyll (plus a Free Bootstrap 3 Starter Theme) Jekyll is a simple and blog-aware static site generator built in Ruby. In laymen terms, it’s just a tool to let you have all the cool features of a full-blown CMS without having to worry about managing a database. This means hosting is extremely easy and scalable since all you’re doing is managing a bunch of files. Ruby Metaprogramming: Part I If you’re working with Ruby, chances are by now you’ve heard the word “metaprogramming” thrown around quite a lot. You may have even used metaprogramming, but not fully understood the true power or usefulness of what it can do. By the end of this article, you should have a firm grasp not only of what it is, but also what it capable of, and how you can harness one of Ruby’s “killer features” in your projects. What is “metaprogramming”? Metaprogramming is best explained as programming of programming. Don’t let this abstract definition scare you away though, because Ruby makes metaprogramming as easy to understand as it is to work with.
Flowchart Guide ( Complete Flowchart Tutorial with Examples ) Hello! This is the blog. Creately helps you draw beautiful diagrams suprisingly fast! Learn More Hide this Ruby Metaprogramming: Part II » RubySource Welcome back to Ruby Metaprogramming! In part one we looked at what Metaprogramming is and how it works; we explored deep into the internals of Ruby’s method lookup system and walked through how creating Singleton Classes fits into that mechanism. Now for the good part: applying it all. Mocking objects for testing Some of the most useful features of Ruby’s metaprogramming have been shown off countless times in the vast array of testing frameworks available.
Four Guidelines That I Feel Have Improved My Code I have been thinking a lot about isolation, dependencies and clean code of late. I know there is a lot of disagreement with people vehemently standing in both camps. I certainly will not say either side is right or wrong, but what follows is what I feel has improved my code. I post it here to formalize some recent thoughts and, if I am lucky, get some good feedback. Before I rush into the gory details, I feel I should mention that I went down this path, not as an architecture astronout, but out of genuine pain in what I was working on. My models were growing large.
Must-Read Ruby Links Every programming language has a number of works you just cannot not read. Perl has the camel book, C++ has "The C++ Programming Lanugage," etc. Ruby does have it's own dead tree you cannot not read, "Programming Ruby: The Pragmatic Programmer's Guide," the so-called "pickaxe book," but that's covered so many places and recommended by everyone.