Guru on Rails

if you don’t sacrifice for your dream then your dream becomes your sacrifice.
Will Nguyen
Tue 02 Jul 2019

MERN Stack Javascript Problem Solving AngularJS

Below is Angular code but you can do it simple, just focusing on the encodeURIComponent. Read the link below to get to know the reason.  get html() { return this.viewTrustDocx; } private get viewTr...

Thu 27 Jun 2019

Uncategorized

Actually, in my opinion there is nothing best. Anything has its own advantages and disadvantages. It depends on the context we apply the proper technology, design patterns, best practices etc. Some...

Tue 25 Jun 2019

Design Patterns Javascript

Observer The Observable pattern is one that allows an object, called subject, to keep track of other objects, called observers, interested in the subject state. When the subject state changes, it n...

Tue 11 Jun 2019

Design Patterns

Have you ever heard Template Method pattern? We thought we know it but we might be wrong. I just found a secret, a meaning of this pattern. Template method supported by inheritance. So what is temp...

Sat 02 Mar 2019

Design Patterns Javascript

coming soon...

Tue 26 Feb 2019

Uncategorized

Requirement: Check if the input string has balanced chars. More details please have a look at the "Result" section below. This a an interview challenge in "XYZ" company. 1. Solution. I apply single...

Sun 24 Feb 2019

SQL

1. Searching the products which have duplicated names. Product.select("name, count(*) as num").group(:name).having("num > 1") SELECT name, COUNT(*) FROM products GROUP BY name HAVING COUNT(*) &g...

Sun 17 Feb 2019

Uncategorized

This is a challenge from "XYZ" company. My solution is using message queue for "POST". For "GET", it's just a challenge, not applying in real project. Because pub/sub system would be better than de...

Mon 24 Dec 2018

Software Architecture Best Practices Performance

Rabbitmq and Sneakers would bring to us a ton of benefits. That is one of many solution for improving performance by placing synchronous work into a background work asynchronously. However, we can ...

Tue 18 Dec 2018

Design Patterns

factory_bot.rb require 'set' require 'active_support/core_ext/module/delegation' require 'active_support/deprecation' require 'active_support/notifications' require 'factory_bot/definition_hierarc...

Total: 50