The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
no_querying_views 1.0.0 has been released: say no to querying views
Four years after its initial release, no_querying_views is now a gem. Querying views - views triggering DB queries - will now raise an exception !
How to get rid of legacy code
In this article you can find my 5 cents about this subject. There are 5 approaches which may help you. It is not about patterns, but it is about making decisions and architecture of an application. There is one approach which started working well for us.
Ruby Object Mapper 0.3.0
Today Ruby Object Mapper v0.3.0 was released. Here’s the official announcement.
ITTIA and E2S Equip Call Centers with Android Mobility
ITTIA DB SQL solves challenges such as merging data, efficient communication, and security, which allows Android (TM) tablets to access call center data stored in an existing relational database, such as Microsoft(R) SQL Server(R), or Oracle(R) Database. With this technology a call center can rapidly improve communication to experience significant time and cost savings through greater efficiency.
Unraveling String Key Performance in Ruby 2.2
Performance in any app is Critical. In this post on Ruby string key performance we’ll look at some optimizations you can make in your app today, and how the Ruby 2.2 interpreter will help make your code faster for free.
Ruby Book Giveaway Extravaganza
I just launched the Ruby Book Giveaway Extravaganza. Three winners, Five books, a 6 month Safari Online membership, and $50 in your name to The Ada Initiative or another tech charity of your choice. The books are: Practical Object Oriented Design in Ruby (POODR) by Sandy Metz, Clean Ruby by Jim Gay, Exceptional Ruby by Avdi Grimm<, Working with Ruby Threads by Jesse Storimer, and Mastering Modern Payments by me, Pete Keen. </ul>
Scaling Ruby on Rails by Caching Your Database Queries
I just wrote a post, how to cache database queries in memcache to boost up your application performance Read the post here and please give feedback
tty-screen v0.1.0
I’ve released tty-screen to allow for cross platform screen size detection. This is another component for tty.
Flip Flop Operator in Ruby
The flip flop operator is one of those weird features of Ruby that most people aren’t even aware of. It’s one of the many Perlisms that sneaked into Ruby, but hasn’t caught on. In this post, we will look at what flip-flop operators are, and where you can use them.
ApiView - Friggin' fast Serializer for your JSON backend
Just published ApiView as a performance focused serializer with a slim and lean code base. [more inside]
ComfortableMexicanSofa 1.12.3 is out
ComfortableMexicanSofa Rails 4 CMS Engine version bump. [more inside]
Pastel v0.4.0
Pastel allows now for detaching common style combinations, as well as for nesting of styled strings by using blocks. Please give it a try and let me know what you think!
Clean Ruby 1.0 is released!
The 1.0 release of Clean Ruby is here! Anyone who bought it has received a new download link, but I wrote a bit about my experience and what people have to say.
Der ANSI Hansi
I was displeased with any of the (yet so many) libraries for generating colored console output, so I wrote my own: hansi. [more inside]
Avoiding errors when forwarding to missing objects
I wrote a new post about forwarding messages to an object that might be nil and what to do with your code.
Pointer tagging, linked string hash tables, turbocaching and other Raptor optimizations
Raptor is a cool new app server that’s up to 4x faster than Unicorn, up to 2x faster than Puma, Torquebox. This second article describes many techniques that has made Raptor so fast. It’s the second part of a blog series on Raptor performance optimization.
Generating Descriptive Statistics in Ruby and Rails
Generating Descriptive Statistics in Ruby and Rails. The core Ruby libraries do not provide an easy way to calculate simple descriptive statistics on collections of numbers. However, this can be easily achieved using the DescriptiveStatistics Gem.
Unicorn Unix Magic Tricks
I just published the blog post version of my talk Unicorn Unix Magic Tricks. It looks at how the Unicorn webserver works in great detail and explains the underlying Unix concepts which it uses to leverage the power of the operating system. It’s a really detailed (and long) blog post that shows how forking, system calls, signal handling, pipes and Unicorns master-worker architecture work.
What attributes RubyGems’ Marshal file really contain?
RubyGems started with a single marshaled file called Marshal.4.8.gz containing the array of every Gem::Specification object for every gem that has been uploaded to RubyGems directory. Since then we have new indexes for RubyGems to speed things up, but good old Marshal.4.8.gz is still around carrying important information about gems from RubyGems.org. Are you interested to know what is and what is not there and finally understand why gem specification rails -r does not give you the information on licensing even though it’s part of rails’ gemspec file? Read more
Param Validators as Ruby objects
Using service objects as replacement of strong params makes controller validation easy and complete. Check our gem here: ParamsFor. Thx and happy coding.
Are Your Cache-Control Directives Doing What They Are Supposed to Do?
Cache-Control directives are pretty straightforward to understand. They’re easy to use as well if you assume that all the caches between your end user and application correctly implement the spec. Unfortunately, as with any spec, you can’t make that assumption. You need to be aware of any spec misinterpretations in the implementation of the caches that you’re using, and properly account for them. Learn How to Get Cache-Control Right
Healthy Codebase and Preparatory Refactoring
In a recent episode of the RubyRogues podcast, Martin Fowler and Jessica Kerr illustrated Healthy Codebase and Preparatory Refactoring with beautiful words and powerful metaphors. I share those in this article.
Writing DSLs in Ruby without monkeypatching Object
Ruby is a great programming language to write DSLs - unfortunately often developers monkeypatch Object to define top level scope methods. There is a better way that does not pollute Object with unnecessary methods.
Refactoring - Why do we need to do it?
Refactoring - WHY? opens a short series of blogposts answers the “why”, “how” and “when” of code refactoring.
Creating Rails Active Record Validation Contexts with Inheritance
I wrote a new post on Creating Rails Active Record Validation Contexts with Inheritance. Hope you enjoy!