Simple Scheduler In order to make scheduler in sidekiq, we install this gem. There are type ways of scheduler. We normally configure the fixed schedules in sidekiq.yml. But if we want to…...
Category: Best Practice
Node.js Error Handling
Let’s say we have an authentication service simply like below. This service is listening on port 3000 and having a route for signing up user account. Below is signup route. Now we…
Clean Coding with simple Single Responsibility Principle
Have you ever seen a method with more than 500 lines of code? I have recently faced this challenge (lol). Alright, I won’t tell you guys how bad it is about the…
Use WebHooks and Long Polling
So what is the polling? Webhooks When an event triggered, a function or api will be involved. Let’s say we have service A and we develop a function so every time A…
Inheritance vs Composition
What are the reasons for using Inheritance and Composition. Speaking of Inheritance, we refer to class, for Composition we refer to Module. We should know the main idea from this design. Why…
Improving performance using Enumerator::Lazy
One of the performance matter we usually encounter is Enumerator. Today, I introduce you a kind of performance issue we ever faced about enumerator. That’s Enumerator in ruby. The case is when…
Module in Design Pattern
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…
Crucial steps of Object Oriented Design
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…
Don’t mistake the global variables with attributes of object in 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…
Best Practices for Database
We learn a lot about programming. How to write a good code which is clean, maintainable, readable, reliable and many other dimensions. However, an ecosystem is not only the code but also…