It was a nice try for spicing up what could potentially be a dry listing of metaprogramming patterns, but the narrative around Bill and the reader ends up feeling rather hokey and strained. On top of that, the patterns are not called patterns; they're called spells. That choice may have worked if the author had committed more fully to the theme and put the reader into a fantasy environment where they had to come up with the right metaprogramming spells to succeed in making more flexible code for an adventure game.
I don't know, something like that. It would have taken a lot more work, and it may still have been difficult to pull off well, but having patterns called spells for no other reason than to not call them patterns just didn't work for me. It ended up feeling more awkward and disjointed than anything: If you buy into this notion—that a Ruby class definition is actually regular code that runs—you'll be able to cast some powerful spells.
Meh, it just seems unnatural and forced.worlrareten.tk
Best Ruby Programming Books for Beginners 2017
Another issue arose with the code examples. Most of the examples presented with the explanations of the patterns were silly and useless. It felt like hardly any thought was put into them as long as the code demonstrated the mechanical aspect of the metaprogramming feature under discussion. More useful examples would be more difficult to come up with, to be sure, but that care in constructing examples makes the difference between a decent book and a great book. The more fleshed-out example code within the pair-programming narrative were better in this respect, but then the contrast between that code and the smaller random examples in the explanations was all the more jarring.
One last issue I had with the book was that Parrotta could sometimes be a little condescending and patronizing: Be aware that the next few pages contain advanced material that might take a while for you to digest. If you want, you can skip straight to Method Wrappers , on your first read through and come back to this section later. Maybe he was just trying to be helpful, but it didn't come off that way. These kinds of comments in a book that's supposed to be geared more towards experienced programmers seem out of place.
It's fine for the author to say that they found it difficult, but leave the reader's assessment up to themselves.
- Avdi Grimm.
- Introduction to the AdS/CFT Correspondence.
- Book Summary- Confident Ruby: 32 Patterns for Joyful Coding?
- Methodology used to address the problem.
A good teacher will find a way to explain complex material so that it is easy to understand, not effectively say, "Well, it's not surprising that you don't understand this, yet. Just come back to it later, and you might get it then. Despite these criticisms, the book was not all bad. If you can look past the muddled narrative and other shortcomings, the actual patterns are fairly well described and useful to learn. The last section of the book on extended examples of metaprogramming in Ruby on Rails was quite well done and an interesting read.
The lessons highlighted from studying how metaprogramming is done in Rails were especially thought-provoking, such as this one: Here is the most important guideline I learned from Active Record's design: design techniques are relative , and they depend on the language you're using. In Ruby, you use idioms that are different from those of other languages you might be used to.
It's not that the good design rules of old suddenly grew obsolete. On the contrary, the basic tenets of design decoupling, simplicity, no duplication hold true in Ruby as much as they do in any other language. In Ruby, though, the techniques you wield to achieve those design goals can be surprisingly different. It's certainly true that languages each have their own styles and idioms, but this idea extends it to the actual program design techniques being language dependent.
Download Confident Ruby: 32 Patterns For Joyful Coding
That's certainly true to some extent, as the same program can have significantly different structures and implementations in different languages. However, I also think design techniques are transferable from one language to another. Obviously you can't do metaprogramming in a language that doesn't support it, but learning that certain techniques are common and elegant in one language can transfer over to other languages. Developing new techniques that work well in Ruby will influence what you try in other languages, and that cross-pollination is extremely beneficial. One final great piece of advice that applies to learning any new programming feature is: [R]esist the temptation to be too clever in your code.
Ask yourself whether there is a simpler way to reach your goal than metaprogramming. If the answer is no, then go forth and metaprogram the heck out of your problem. In many cases, however, you'll find that a more straightforward OOP approach does the job just as well. Any cool, powerful feature taken to an extreme will make an incomprehensible mess of a program. Part of gaining proficiency in a language is knowing when not to use its most powerful features, and using the simple fundamentals of the language well.
Authorization CanCanCan — a continuation of the dead. CanCan project.
Our mission is to keep CanCan alive and moving forward, with maintenance fixes and new features. Pundit — minimal authorization through OO design and pure Ruby classes.
See a Problem?
Avatars avatarly — a simple gem for creating gmail-like user avatars based on user email or any other string passed. Background Jobs Sidekiq — a full-featured background processing framework for Ruby. It aims to be simple to integrate with any modern Rails application and much higher performance than other existing solutions. Backburner — a beanstalkd-powered job queue that can handle a very high volume of jobs. Delayed::Job — database backed asynchronous priority queue.
Resque — a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later. Ohm — object-hash mapping for Redis. CLI colorize — String class extension. It add some methods to set color, background color and text effect on console easier using ANSI escape sequences. TTY — a toolbox for developing beautiful command line clients in Ruby. Bourbon — a lightweight mixin library for Sass. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.
Bitters — add a dash of pre-defined style to your Bourbon. Chamber — A surprisingly configurable convention-based approach to managing your application's custom configuration settings. Debugging Pry - A runtime developer console and IRB alternative with powerful introspection capabilities. Byebug — a simple to use, feature rich debugger for Ruby 2. It's developed as a C extension, so it's fast.
And it has a full test suite so it's reliable. Solidus — An open source ecommerce solution built with Ruby on Rails. Fluentd — an open source data collector designed for processing data streams, which instantly enables you to have Log Management, Big Data Analytics, etc. Mail Pony — the express way to send email in Ruby. See also the official Ruby SDK. Mail — a library that is designed to handle emails generation, parsing and sending in a simple, rubyesque manner.
See also: StackOverflow: Better ruby markdown interpreter? Misc If there is a nice gem, but it is difficult to classify it with existing bookmarks groups, or it is still one of his kind, put it here. Prawn — fast, nimble PDF generation.
Manual Confident Ruby: 32 Patterns for Joyful Coding
Dalli — high performance Memcached client for Ruby. EventMachine — fast, simple event-processing library. Rubyzip — reading and writing zip files. MicroMachine — minimal Finite State Machine. Dante — turn any ruby code into a daemon. Memoist — an extraction of ActiveSupport::Memoizable with few extensions.
- Tech Book Face Off: Confident Ruby Vs. Metaprogramming Ruby 2.
- Episode | Avdi Grimm - Your Passion Is Yours and Yours Alone - DEV Community 👩💻👨💻.
- Choose Your Format(s)?
- Download Confident Ruby: 32 Patterns For Joyful Coding.
- The problem the book adresses:.
- Download Confident Ruby 32 Patterns For Joyful Coding 2013;
Awesome Print — a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation. Rails ActiveRecord objects and usage within Rails templates are supported via included mixins.
Related Confident Ruby: 32 Patterns for Joyful Coding
Copyright 2019 - All Right Reserved