40716cc1589577b8eb672d97953c264f

Extending Objects' Behavior With Module#prepend

Ruby 2.0 came with some pretty useful features like lazy enumerators, keyword arguments, convention for converting to hash. There is also Module#prepend, which is not that commonly used, but there are some cases where it really shines. Let's see what we can get from that feature then

Continue reading
9de6bb72e517c276516d85e2e9fef89a

The cost of using Ruby Gems

Gems are great...

Gems are a superb tool for every Rubyist. They can help you rapidly implement complex solutions in your applications without having to reinvent the wheel

Continue reading
648ea1dd48c0604f1d50a6d8c8be9e66

Rails Girls Łódź 2015

The second edition of Rails Girls Łódź took place a few weeks ago and I cannot be more proud to have been a part of that – again. The recipe for a great workshop boils down to just a few good quality ingredients. Come along, I'll show you

Continue reading
6b844a73471cf2b060cb54d0b2f16161

Be aware about the out-of-memory killer

One of the most important things for applications is stability. There are various hosting platforms that give you virtual servers, where you can run multiple services. There is no limit to the number of processes so it is up to you how much of their...

Continue reading
1bcc0f22f6de3bb0942c9a187e1d1ac1

Integrating Braintree payments with Rails

I have recently changed payment service provider to Braintree on Shelly Cloud and would love to share the experience with you. This post will show a fast and easy way of adding credit card payments to a Rails application.

Continue reading
11ec30dedeb7889af512461ba7ce6a45

How we built Ruby PaaS - Part I: Overview of our stack

I would like to share with you the details of how we built Shelly Cloud, our platform for hosting Ruby applications, and how it works.

This is the first post of the series on our blog, in which I'll present you with an introduction to the company and an overview of our stack.

Continue reading
3254f15ea674eb387b83ebc59253a97d

Chef best practices

Chef is a framework written in Ruby, and partially in Erlang (Chef Server). It provides an API for numerous system services. With Chef, your infrastructure can be expressed as object-oriented code that is versionable, testable, and repeatable. One of the main ideas of Chef developers was to bury the walls that exist between software development and system administration, allowing them to bring system configuration to a higher level.

Continue reading
40716cc1589577b8eb672d97953c264f

Binding Objects in Forms with Ember for Fun and Profit

Ever run into the situation where you had to perform some operation based on the value from select field? How did you handle it? Maybe multiple case / switch statements? Or if you are lucky enough and code in language with good support for metaprogramming like Ruby you can write some magic code like this one:

"#{params[:type].classify}Calculation".constantize.new.calculate(params)

which in fact can be treated as hidden case statement, but much easier to handle.

Are there any cleaner solutions to such problems which would be more readable? Fortunately, the answer is yes - some frameworks like Ember give possibility to use cool patterns that are not possible in other cases.

Continue reading
40716cc1589577b8eb672d97953c264f

Problems with nil and how to avoid them

Have you recently got an exception saying NoMethodError: undefined method `name' for nil:NilClass? Most likely more than once. And how did you solve it? Maybe you used try and thought the problem is solved... until the same exception happened in a different place! Using methods like try is just treating symptoms, it doesn't even touch the real problem. Maybe the right question would be: why was it nil in the first place? Could it be avoided? Was the possibility of nil a desired behavior? And why at all is nil even a problem? Let's find out and investigate some usecases

Continue reading
32507dc71848e4621d1c714dbf3e3f0c

Working with Perfect Programmers

I've always liked new beginnings, with all the possibilities they bring. And what better way to start fresh with a blog than by writing about one of those first impressions you get when you embark on a new adventure? For me, it was a new job, a new environment, and a completely different approach to work. So, please, fasten your seat-belts and enjoy one of the latest and craziest rides of my life - the introduction to the programming world

Continue reading
×