Skip to main content

Posts

Recent posts

How to Optimize Compose Compiler Optimizations

  1.   Leverage Stable and Immutable Types Annotate your data models with   @Stable   or   @Immutable . Prefer using primitive types and immutable data classes in composable parameters. Avoid passing mutable or non-observable types as parameters. 2.   Keep Composables Small and Focused Break down large composable functions into smaller, single-responsibility components. This lets Compose (and the compiler) minimize the scope of recompositions. 3.   Use   remember   and   rememberSaveable   Properly Use   remember   to store objects or state that should persist across recompositions. Use   rememberSaveable   for state that must survive process death (with types supported by Bundle). Avoid initializing objects or expensive computations directly in composables—use   remember   to cache them. 4.   Avoid Unstable Objects in Parameters Don’t pass new objects, collections, or lambdas directly as parameter...

Android Advance Topics

 As an experienced Android developer with over 10 years of expertise and a solid understanding of backend and database systems, you're likely ready to dive into advanced topics that push the boundaries of modern Android development. Below is a curated list of advanced topics, frameworks, and concepts to enhance your skills, focusing on cutting-edge technologies, performance optimization, and architecture. These topics align with current industry trends as of July 2025 and assume familiarity with core Android concepts like Activities, Fragments, ViewModels, and REST APIs. 1. Advanced Jetpack Compose Declarative UI at Scale:  Master building complex, performant UIs with Jetpack Compose, including advanced state management, custom layouts, and animations. Explore Compose Compiler optimizations for reducing recomposition. Learn Material 3 dynamic theming and adaptive layouts for foldables and tablets. Implement advanced animations with Compose Animation APIs (e.g., AnimatedContent...

System Design Roadmap Learning

🗓️ Phase 1: Fundamentals of System Design (Week 1–2) Introduction to System Design What is System Design? : Process of defining architecture, components, modules, and interfaces of a system. High-Level Design (HLD) vs. Low-Level Design (LLD) : HLD focuses on system architecture, components, and data flow; LLD deals with classes, modules, methods. Interview expectations : Focus on scalability, availability, consistency, bottlenecks, trade-offs, and component interactions. Networking Basics IP, DNS, Load Balancer : Understand how routing works, domain resolution, and request distribution. HTTP vs. HTTPS : Protocols for communication; HTTPS adds encryption (TLS). TCP vs. UDP : TCP is reliable and connection-oriented; UDP is faster, connectionless. WebSockets & Long Polling : For real-time bidirectional communication. Databases SQL vs. NoSQL : Structured vs. unstructured; relational vs. document/graph. ER modeling : For relational database schema design. CAP Theorem : Trade-off betwee...

ACID Properties

  In the realm of database systems, ACID is an acronym representing a set of properties that guarantee data validity and reliability, even in the face of errors, power failures, or other unforeseen events. These properties ensure that database transactions are processed accurately and without interference.     The four ACID properties are: Atomicity: A transaction is treated as a single, indivisible unit.     Either all operations within a transaction are completed successfully, or none of them are.     If any part of the transaction fails, the entire transaction is rolled back, leaving the database in its original state.             2. Consistency: A transaction can only bring the database from one valid state to another. It ensures that the database remains in a consistent state before and after the transaction. Only valid data is written to the database, preventing data corruption. Isolation: Multi...

CAP Theorem

The CAP theorem is a fundamental principle in distributed computing that highlights the trade-offs involved in designing systems that can operate across multiple machines or nodes. It states that a distributed system can only guarantee two of the following three properties:     Consistency: All nodes in the system have the same, up-to-date data at all times. Availability: The system is always operational and accessible for read and write operations. Partition Tolerance: The system continues to operate correctly even in the presence of network failures or partitions. Why is the CAP Theorem Important? Trade-offs: It forces system designers to make conscious decisions about which properties are most critical for their specific application.     Real-world limitations: It highlights the inherent limitations of distributed systems and the challenges involved in achieving high availability and consistency in the face of network failures.     Understa...

Availability

  Availability in system design refers to the proportion of time that a system or service is operational and accessible for use. It's a critical aspect of designing reliable and resilient systems, especially in the context of online services, websites, cloud-based applications, and other mission-critical systems. 1     Why is Availability Important? User Experience: Downtime can severely impact user experience, leading to frustration, lost productivity, and potentially lost revenue. Business Continuity: For many businesses, their online presence is critical for operations. Unplanned downtime can disrupt business processes, impacting revenue and customer relationships. Reputation: Frequent or prolonged outages can damage a company's reputation and erode customer trust. Key Concepts in Achieving High Availability Redundancy: Implementing redundant components (servers, databases, network connections) to ensure that if one component fails, another can take over sea...