Guru on Rails

A day a problem solved, a year we become the Pro

Wed 29 Aug 2018

Ruby on Rails Best Practices

In fact, Ruby on Rails (ROR) does help us a lot. It makes our code shorter. It's close to the natural language. The syntaxes are pretty nice. I can't agree more about these things. However, as a Ru...


Wed 29 Aug 2018

Ruby on Rails

Let's have a look on how to implement singleton methods in Ruby. will = 'Will Nguyen' def will.hello puts "#{self} says hello" end If we have many methods need to be implemented. class << wil...


Thu 23 Aug 2018

OOD

I think it's necessary to know the basic. Thus, that is the reason we have this article. Let's go through some points. But I firstly want to say that this is conceptional level. So don't pay attent...


Wed 22 Aug 2018

OOD

S - Single Responsibility Whenever we create a class or method or even variable, we create each one with only one responsibility. If we create "sing" method, we can't implement "dance" behavior ins...


Tue 21 Aug 2018

OOD

When we look at the reality or a situation in real world, what do we see? Now I’m sitting at a coffeeshop in Vietnam and look around. I’m seeing people who are talking to each other. I’m seeing the...


Mon 20 Aug 2018

Design Patterns

1. Separating out the things that change from those that stay the same. Obviously, we do it to avoid the tight coupled code, get it easy to make changes with less cost. At first time when we put d...


Fri 17 Aug 2018

Best Practices OOD

I have to say that we tend to make the attributes of class become messy. Attributes are the characters to distinguish class from the others. These ones make them different. It’s like black people w...


Fri 17 Aug 2018

Best Practices

When we were Junior developer we didn't actually notice so much about exceptions in ruby. That is because we didn't develop library to contribute the community yet. If we used to create libraries o...


Thu 16 Aug 2018

Software Architecture Design Patterns

The topic today is again Object Oriented Design. We just have three words O-O-D though. Naming I’d like to say that OOD is not just about Inheritance. When we put some classes there and make them i...


Wed 15 Aug 2018

Software Architecture Ruby on Rails Design Patterns

Have you ever considered about using class inheritance or modules while coding? So, when do we decide to use inheritance instead of module? Coding design is just about arranging code in our applica...