Guru on Rails

if you don’t sacrifice for your dream then your dream becomes your sacrifice.
Will Nguyen

Thu 13 Sep 2018

OOD Best Practices

I actually intended to add this post to old article about the same title. However, I don't want to make an article too long. Regarding to this principle, there are so many things to learn. Because ...


Thu 06 Sep 2018

Ruby on Rails

Hook methods is actually the convenient way to help us extend the behaviors of existing class at runtime. In rails there are many popular hook methods we often use such as "included, extended, inhe...


Wed 05 Sep 2018

Performance

I encountered this issue yesterday. It's hard to find the cause because of callbacks. We create objects and we use them somewhere in the scope. We created callbacks for models before but when we us...


Wed 05 Sep 2018

Uncategorized

Background jobs? In fact, in my point of view almost language programmings have background jobs, especially for web application. They appear to solve the problem of processes which run in long time...


Wed 05 Sep 2018

Uncategorized

Imagine that you want to investigate to use a ruby gem or a javascript library as fast as possible. How can we do that?  We usually tend to think of things complicatedly. We exaggerate the problems...


Tue 04 Sep 2018

OOD

Last article I introduced S.O.L.I.D in coding. I found that I didn't really dive deep in each principle as I thought. Programming is not about the chain of theories. We need to seek for the situati...


Wed 29 Aug 2018

Best Practices Ruby on Rails

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 wrote a bunch of articles about higher level of Object Oriented Design. But I think it's necessary to know the basic. Thus, that is the reason we have this article. Let's go through some points. ...


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...

Total: 51