development

CSS Rotate Property Explained

CSS Rotate Property Explained

Understanding the CSS Rotate Property:The rotate property is part of the CSS transform module, which allows developers to apply different transformations to elements on a webpage. The rotate function allows you to rotate items by a specified angle, changing their orientation but not their location in the document flow. This characteristic provides tremendous versatility by permitting rotations in both clockwise and anticlockwise orientations. Syntax and Usage: The CSS rotate property’s syntax is rather easy. Developers define the desired rotation angle within the brackets of the rotate function, as follows: .rotate { transform: rotate(45deg); } Enter fullscreen mode Exit fullscreen mode…
Read More
How to Batch Notifications Across Users in a Dedicated Time Window? w/ Example Github Application

How to Batch Notifications Across Users in a Dedicated Time Window? w/ Example Github Application

Batching notifications is a feature widely adopted by major social media platforms and collaborative tools like LinkedIn, MS Teams, and Google Workspace products. This technique consolidates multiple alerts into a concise summary within a single notification, creating a clutter-free user experience and reducing interruptions. For hands-on implementation, please refer to the provided GitHub repository and deployed application links: Benefits of Batching Notifications Frequent alerts can lead to notification fatigue, causing users to disengage. By batching notifications, we can maintain user attention and promote sustained interaction with our platform. Technical Overview: How Batching Works Batching notifications requires sophisticated workflows and significant…
Read More
Multi-Tenant vs. Single-Tenant Applications

Multi-Tenant vs. Single-Tenant Applications

Understanding Multi-Tenant vs. Single-Tenant Applications Introduction In the world of software architecture, particularly for SaaS (Software as a Service) applications, two primary models are widely used: multi-tenant and single-tenant architectures. Each model has its advantages and challenges, and the choice between them depends on various factors such as scalability, cost, security, and customization needs. What is a Multi-Tenant Application? A multi-tenant application is designed to serve multiple customers (tenants) using a single instance of the software. In this architecture, resources such as databases, servers, and applications are shared among all tenants. Each tenant's data is isolated and invisible to others,…
Read More
How to Expand Ubuntu Drive

How to Expand Ubuntu Drive

When you are using vmware to create Ubuntu Server VM, it will only use half of the assigned hard drive storage if you are not changing it in the installation process. Here is how to resize it. root@util:~# vgdisplay <snip> root@util:~# lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv <snip> root@util:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv <snip> Enter fullscreen mode Exit fullscreen mode This method still works in Ubuntu 24.04 as of today (2024-07-04) Reference: Source link lol
Read More
Developers Listen: If You Don’t Have a Rich Domain Model, You Don’t Leverage OOP

Developers Listen: If You Don’t Have a Rich Domain Model, You Don’t Leverage OOP

In the world of software development, Object-Oriented Programming (OOP) and SOLID principles are often touted as best practices for creating maintainable, extensible, and robust systems. However, a crucial aspect that's frequently overlooked is the context in which these principles truly shine: a rich domain model. Let's delve into why a rich domain model is essential for leveraging the full power of OOP and SOLID principles, and what we miss out on when we settle for an anemic domain model. The Rich Domain Model: A Fertile Ground for OOP and SOLID A rich domain model is characterized by entities that encapsulate…
Read More
Como reutilizar sua UI

Como reutilizar sua UI

Basicamente todo mundo que conheço acaba criando componentes reutilizáveis para reaproveitar o trabalho feito. Essa é uma abstração enganosamente simples: é fácil criar um Button, mas é surpreendentemente difícil conseguir reutilizar ele em todos os casos de uso em um projeto. Eu aprendi algumas coisas com o passar dos anos, e vejo que várias pessoas acabam metendo o pé na jaca sem perceber. Quero compartilhar algumas dicas para evitar que algumas jacas sejam pisadas. Tenho um viés de React mas tudo pode ser aplicado em outros contextos, desde que tenha componentização da UI. 1) Evitar margens Colocar margens no seu…
Read More
How to mock a hidden dependency

How to mock a hidden dependency

Working with legacy code is difficult. When working with legacy code, you can run into a number of challenges, like for instance : how to write a unit test for a method that contains a hidden, private dependency. Let me show you an example of such code : public class NotificationService { private void sendSMSNotification(User user, Event event, boolean isUrgent) throws NotificationException { try { String messageContent = buildSMSMessageContent(user, event, isUrgent); String phoneNumber = user.getPhoneNumber(); if (phoneNumber == null || phoneNumber.isEmpty()) { throw new NotificationException("User's phone number is not available."); } // Get SmsService bean from ApplicationContext **SmsService smsService =…
Read More
How to Manage the Overwhelming Information Online as a Beginner in HTML, CSS, and JavaScript

How to Manage the Overwhelming Information Online as a Beginner in HTML, CSS, and JavaScript

The internet is a vast storehouse of information. When you browse platforms like X, Instagram, Facebook, Medium, and Dev.to and more, numerous people share valid opinions on learning, roadmaps to follow, abundant reading materials, and even quick money-making tips with minimal learning. This can become overwhelming, leaving you confused and unsure of where to start. Some individuals are more focused on gaining followers than providing genuine help. This article aims to help you relax, learn without pressure, and strategize on managing the overwhelming amount of information available online. As I write this article, I too aim to share valuable insights…
Read More
Ultimate CSS Cheat Sheets and Blogs resources

Ultimate CSS Cheat Sheets and Blogs resources

Collection of CSS cheatsheet, prepare for CSS interviews, tips and tricks!! Under the Hood "Cheat sheet and of not much use" this is my thinking when I was introduce to it for the first time. But this year in Jan when I was practising DSA again I've figured out the ultimate benefits of any cheat sheet in programming language.Cheat sheets are a kind of ready-to-use notes or overview making it easy for developers to prepare for interviews, and write code faster and better. CSS cheat Sheets Overapi cheatsheet website screenshotCSS properties https://overapi.com/css CSS 2 Cheat Sheet & Quick References Website…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.