Blogs
Discover tech insights, tutorials, and coding tips

Safe Concurrent Updates in Rails with Locks and Atomic SQL
Some applications require handling concurrent updates, like buying concert tickets or transferring money. In these cases, data consistency and atomicity are critical. Any mistake can lead to overbooking, double-spending, or even lost money. This post...
Software Engineer
Software Engineer
Ruby on Rails
Ruby on Rails


JavaScript Immediately Invoked Function Expression
Today, we're diving into a common JavaScript pattern you've likely encountered: the Immediately Invoked Function Expression (IIFE). This pattern is used to manage scope and prevent global pollution.1. The ProblemConsider this simple script:// languag...
Interview
Interview
Frontend
Frontend


Modern JavaScript OOP Features: True Private Fields, Static Methods, and More
When I first started learning JavaScript, its object-oriented features felt like an afterthought. The language had objects and prototypal inheritance, but it was missing key features like true private fields and methods. That’s why many developers tu...
Software Engineer
Software Engineer
Frontend
Frontend


I just made a serious mistake with Rails destroy_all
Rails Active Record is convenient and human-readable for interacting with SQL models. But not understanding the generated SQL behind these elegant methods can cause serious data loss that might go unnoticed until it's too late.1. Setting the SceneThi...
Software Engineer
Software Engineer
Ruby on Rails
Ruby on Rails


Standard convolution and lite versions
In school, you may have studied standard convolution in your lectures. Standard convolution is effective for image processing, but it requires a significant number of parameters and heavy computational resources. Recently, several research advances h...
AI
AI


Rails 7.2+: How to show all model attributes in Rails Console
With the release of Rails 7.2, a new change was introduced to the way ActiveRecord models are inspected in the Rails console. Prior to this version, calling inspect on an ActiveRecord model instance would display all the model's attributes by default...
Ruby on Rails
Ruby on Rails


How I built PRIVATE IMAGE TOOLS in just 2 days with Cursor
I've been using AI tools in my development process for a while now, and they've significantly boosted my performance by reducing the knowledge gap. In today's post, I'll share my process of building custom image tools using AI.
App: https://img-tools...
Software Engineer
Software Engineer
AI
AI


Reclaiming Disk Space in Docker
One day, I encountered a troubling issue when my Amazon EC2 server ran out of storage space. After investigating, I discovered that Docker was consuming a significant portion, largely due to the accumulation of cache. In this blog post, I'll provide ...
Docker
Docker


How to customize YJIT in the Rails app
In this post, we'll dive into what YJIT is, how to enable it in your Rails app, and how to monitor and configure it for optimal performance.What is YJIT?YJIT is a lightweight Just-In-Time (JIT) compiler introduced in Ruby to speed up method execution...
Software Engineer
Software Engineer
Ruby on Rails
Ruby on Rails


One Design Pattern a Week: Week 4
Welcome back to my "One Design Pattern a Week" series!
Try to solve this real problem: Request HandlingImagine you're building an enterprise application that needs to process different types of requests (like approvals, validations, or authentication...
Software Engineer
Software Engineer
Design Pattern
Design Pattern


Integer and String Enum in Rails
TL;DRFor General Use: I would lean towards using strings for enums due to their readability and maintainability benefits.For Performance-Critical Applications: I would opt for integers, especially if dealing with large datasets or requiring high perf...
Software Engineer
Software Engineer
Ruby on Rails
Ruby on Rails


One Design Pattern a Week: Week 3
Welcome back to my "One Design Pattern a Week" series!
Try to solve this real problem: Incompatible InterfacesImagine you're developing a large web application that integrates with multiple third-party services. Each service has its own unique interf...
Software Engineer
Software Engineer
Design Pattern
Design Pattern

Loading more ...