<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MaKB on Medium]]></title>
        <description><![CDATA[Stories by MaKB on Medium]]></description>
        <link>https://medium.com/@makb?source=rss-47d4944df135------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iWwGbms1JvgQI_xoRjX6yg.jpeg</url>
            <title>Stories by MaKB on Medium</title>
            <link>https://medium.com/@makb?source=rss-47d4944df135------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:27:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@makb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes Pods Have Dynamic IPs — Here’s How Services Make That a Non-Issue]]></title>
            <link>https://makb.medium.com/kubernetes-pods-have-dynamic-ips-heres-how-services-make-that-a-non-issue-c609157c7af7?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/c609157c7af7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Thu, 05 Jun 2025 17:14:52 GMT</pubDate>
            <atom:updated>2025-06-05T17:14:52.906Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Pods Have Dynamic IPs — Here’s How Services Make That a Non-Issue</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U9JlxIwkDazLhYFe" /><figcaption>Photo by <a href="https://unsplash.com/@imgix?utm_source=medium&amp;utm_medium=referral">imgix</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you’re new to Kubernetes, you’ve probably deployed a few containers (called <em>Pods</em>) and wondered:</p><blockquote><em>“How do I send requests to my app if its IP keeps changing?”</em></blockquote><p>It’s a valid question — and the answer lies in something powerful yet beautifully simple: <strong>Kubernetes Services</strong>.</p><h3>🧩 The Problem: Dynamic Pod IPs</h3><p>Let’s say you deploy 4 Pods using a Deployment. Kubernetes assigns each Pod an internal IP address like:</p><pre>10.1.1.12<br>10.1.1.23<br>10.1.1.35<br>10.1.1.47    </pre><p>But here’s the catch:</p><ul><li>If a Pod crashes and restarts, it gets a new IP.</li><li>If you try to talk to Pods using these IPs, things break.</li></ul><p>You can’t hard-code IPs in Kubernetes — they’re not reliable.</p><h3>🧠 The Solution: Kubernetes Service</h3><p>A <strong>Service</strong> in Kubernetes acts like a stable entry point for a group of Pods.</p><p>It:</p><p>✅ Tracks Pods using a label (like app=myapp)</p><p>✅ Has a <strong>fixed IP address</strong> and <strong>DNS name</strong></p><p>✅ <strong>Load balances</strong> traffic between Pods</p><p>In short, <strong>Services hide the chaos of changing IPs</strong>.</p><h3>📊 Visual Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*YrOughv-qYP4iS91DwI_aQ.png" /></figure><h3>📦 Quick Example: HTTP Echo App</h3><h4>Step 1: Deploy 4 Pods</h4><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: hello-deployment<br>spec:<br>  replicas: 4<br>  selector:<br>    matchLabels:<br>      app: hello<br>  template:<br>    metadata:<br>      labels:<br>        app: hello<br>    spec:<br>      containers:<br>      - name: hello<br>        image: hashicorp/http-echo<br>        args: [&quot;-text=Hello from Kubernetes&quot;]<br>        ports:<br>        - containerPort: 5678</pre><h4>Step 2: Create a Service</h4><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: hello-service<br>spec:<br>  selector:<br>    app: hello<br>  ports:<br>  - port: 80<br>    targetPort: 5678<br>  type: NodePort</pre><h4>Step 3: Access It</h4><pre>minikube service hello-service --url</pre><p>Refresh the URL — each time, your request might hit a different Pod!</p><p><strong>Kubernetes Services</strong> are one of the reasons why Kubernetes is so scalable. You don’t need to worry about where your Pods are — you just reach the <strong>Service</strong>, and Kubernetes handles the rest.</p><p>👉 If you’re just starting out, remember:</p><p><strong>Never connect directly to Pods — always use a Service!</strong></p><p>Happy coding! 🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c609157c7af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ 10 Mac Tips & Tricks That’ll Instantly Boost Your Productivity]]></title>
            <link>https://makb.medium.com/10-mac-tips-tricks-thatll-instantly-boost-your-productivity-90ccd6bde80d?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/90ccd6bde80d</guid>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[macbook]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 05:33:46 GMT</pubDate>
            <atom:updated>2025-06-02T05:33:46.774Z</atom:updated>
            <content:encoded><![CDATA[<p>Whether you’re a new Mac user or a seasoned pro, macOS is full of hidden features that can make your workflow faster and smarter. After years of using macOS for work and creative projects, I’ve compiled a list of my favorite tips and tricks to save time and boost productivity. Let’s dive in. 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0d-R5GZhaAhYWn2U" /><figcaption>Photo by <a href="https://unsplash.com/@jaywennington?utm_source=medium&amp;utm_medium=referral">Jay Wennington</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. Quick Look — Preview Files Instantly</h3><p>You don’t have to open an app just to peek inside a file.</p><p>➡️ Select any file and press Spacebar to preview it instantly.</p><p>It works with PDFs, images, videos, and even Word docs!</p><h3>2. Use Spotlight Like a Boss (Cmd + Space)</h3><p>Spotlight isn’t just for launching apps. You can:</p><ul><li>Do quick calculations</li><li>Convert currency/units</li><li>Search files/emails instantly</li><li>Launch websites by typing the URL</li></ul><p>Pro Tip: Type define [word] to get dictionary definitions instantly.</p><h3>3. Take Better Screenshots</h3><p>📸 Use these shortcuts:</p><ul><li>Cmd + Shift + 3: Full screen</li><li>Cmd + Shift + 4: Select area</li><li>Cmd + Shift + 4 + Space: Capture a window</li><li>Cmd + Shift + 5: Screenshot + screen recording options</li></ul><p>You can also change the default save location from Desktop to a folder of your choice.</p><h3>4. Use Hot Corners for Quick Actions</h3><p>Set up Hot Corners to trigger actions when you move your cursor to a corner.</p><p>Go to: <strong>System Settings &gt; Desktop &amp; Dock &gt; Hot Corners</strong></p><p>Examples:</p><ul><li>Top-right: Show Desktop</li><li>Bottom-left: Lock Screen</li><li>Bottom-right: Start Screen Saver</li></ul><h3>5. Split Screen View (Multitask Like a Pro)</h3><p>Click and hold the green full-screen button in any window → Choose “Tile Window to Left/Right of Screen.”</p><p>Great for writing while referencing notes, comparing code, or browsing alongside a doc.</p><h3>6. Use Stage Manager (macOS Ventura and later)</h3><p>Stage Manager organizes your apps in one view.</p><p>Go to <strong>Control Center &gt; Stage Manager</strong> to toggle it on.</p><p>It keeps your active app in focus and other apps neatly to the side.</p><h3>7. Clipboard History with Paste Apps</h3><p>macOS only remembers the last copied item.</p><p>👉 Install apps like <a href="https://pasteapp.io/">Paste</a> or <a href="https://fiplab.com/apps/copyclip-for-mac">CopyClip</a> to access clipboard history.</p><p>Essential if you copy/paste often while coding, researching, or writing.</p><h3>8. Drag and Drop with Ease</h3><p>You can drag text, images, or files between apps directly.</p><p>For example:</p><ul><li>Drag text from Safari to Notes</li><li>Drag an image from Finder to a Pages doc</li><li>Hold Cmd to select multiple files and drag them at once</li></ul><h3>9. Quickly Force Quit Apps</h3><p>App frozen? Don’t panic.</p><p>Press Cmd + Option + Esc to bring up the <strong>Force Quit</strong> window.</p><p>It’s the Mac equivalent of Ctrl + Alt + Del on Windows.</p><h3>10. Dictation and Voice Commands</h3><p>Enable Dictation via <strong>System Settings &gt; Keyboard &gt; Dictation</strong></p><p>Then press Fn (or the globe key 🌐) twice and start talking.</p><p>Also try: <strong>Voice Control</strong> (Accessibility &gt; Voice Control) to control your Mac hands-free.</p><h3>Final Thoughts 💭</h3><p>macOS is full of subtle features designed to make your life easier. Mastering these small tricks can save you hours every week and turn your Mac into a productivity powerhouse. Whether you’re a writer, developer, designer, or student — these shortcuts will level up your workflow.</p><p>👉 If you found these tips helpful, leave a ❤️ or share it with a fellow Mac user!</p><p>Have any favorite Mac tricks of your own? Drop them in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90ccd6bde80d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How I Freed Over 60GB of “System” Storage on My Mac (And You Can Too)]]></title>
            <link>https://makb.medium.com/how-i-freed-over-60gb-of-system-storage-on-my-mac-and-you-can-too-83f295c2beed?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/83f295c2beed</guid>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 09:33:58 GMT</pubDate>
            <atom:updated>2025-05-14T13:02:54.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mFMLmKziV9amiBER" /><figcaption>Photo by <a href="https://unsplash.com/@sapiton?utm_source=medium&amp;utm_medium=referral">Michail Sapiton</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Have you ever checked your Mac’s storage and seen “System” taking up over 100 GB? 😳</p><p>That was me last week. My Mac was sluggish, storage alerts kept popping up, and System storage was showing 121 GB — way more than what it should be.</p><p>In this post, I’ll walk you through how I cleaned up my Mac, reclaimed over 60 GB, and got it running buttery smooth again — no expensive apps required.</p><h4>🔍 First: What is “System” Storage?</h4><p>“System” storage on macOS includes:</p><p>- macOS system files <br>- Caches and logs <br>- Sleep images and swap files <br>- Local Time Machine snapshots <br>- iOS backups <br>- Virtual machine files (like Docker or Parallels) <br>- Developer tools (like Xcode)</p><p>Apple doesn’t make it easy to see what exactly is inside. But with a few tricks, you can dig into the bloat and remove what you don’t need.</p><h4>🧰 Step 1: Check Storage Usage</h4><p>Go to: <br>** Apple Menu → About This Mac → Storage → Manage**</p><p>If “System” is anything more than 30–40 GB, you likely have some cleanup to do.</p><h4>🧼 Step 2: Remove Local Time Machine Snapshots</h4><p>If you use Time Machine, your Mac creates local snapshots even when your backup drive isn’t connected. These can easily take up tens of gigabytes.</p><p>Open Terminal and run:</p><pre>tmutil listlocalsnapshots /</pre><p>Delete them one by one:</p><pre>sudo tmutil deletelocalsnapshots YYYY-MM-DD-HHMMSS</pre><p>Or remove old snapshots with:</p><pre>sudo tmutil thinlocalsnapshots / 10000000000 4</pre><p>💡 This instantly freed up 25+ GB for me.</p><h4>🧹 Step 3: Clear System Caches</h4><p>macOS caches tons of files — from Safari previews to app data. You can safely delete them:</p><pre>sudo rm -rf /Library/Caches/*<br>sudo rm -rf ~/Library/Caches/*</pre><p>Then restart your Mac.</p><h4>🧼 Step 4: Clean Up Logs and Reports</h4><p>Log files build up over time. You can remove them with:</p><pre>sudo rm -rf /private/var/log/*<br>rm -rf ~/Library/Logs/*  </pre><h4>📱 Step 5: Remove Old iOS Backups</h4><p>Have you synced an iPhone or iPad before? You might be storing giant backups unknowingly.</p><p>Navigate to:</p><pre>~/Library/Application Support/MobileSync/Backup</pre><p>Delete any folders related to old or unused devices.</p><h4>🧪 Step 6: Developers — Watch Out for Xcode Bloat</h4><p>If you use Xcode, simulators and derived data can consume tens of GB.</p><p>Delete archived builds and simulator data:</p><pre><br>rm -rf ~/Library/Developer/Xcode/Archives/*<br>rm -rf ~/Library/Developer/Xcode/DerivedData/*<br>rm -rf ~/Library/Developer/CoreSimulator/*</pre><p>Check the full size:</p><pre> <br>du -sh ~/Library/Develope</pre><h4>⚙️ Step 7: Clear Swap and Sleep Files</h4><p>macOS stores large temporary files in `/private/var/vm/`. These can be deleted and will regenerate:</p><pre> <br>sudo rm /private/var/vm/sleepimage<br>sudo rm /private/var/vm/swapfile*</pre><h4>✅ Final Result</h4><p>After following all these steps:</p><ul><li>System storage dropped from 121 GB → 59 GB <br>- My Mac was faster, snappier, and no more “Storage Almost Full” alerts!</li></ul><h4>📌 Final Tips</h4><ul><li>Always restart your Mac after cleaning <br>- Avoid deleting random system files unless you’re sure</li></ul><h4>🖖 Over to You</h4><p>System storage bloat is one of the most frustrating Mac problems — but it’s surprisingly fixable. If your Mac is feeling heavy, give it a proper deep clean and thank yourself later.</p><p>Got stuck on any step? Drop a comment — I’d be happy to help!</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83f295c2beed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Jetpack Compose Using MVI Architecture]]></title>
            <link>https://makb.medium.com/android-jetpack-compose-using-mvi-architecture-c648341cb4d1?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/c648341cb4d1</guid>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 10:42:46 GMT</pubDate>
            <atom:updated>2024-12-27T10:42:46.412Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xunzz1i97dYgPI0g" /><figcaption>Photo by <a href="https://unsplash.com/@max_duz?utm_source=medium&amp;utm_medium=referral">Max Duzij</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Modern Android development has seen significant shifts in how we build and manage user interfaces. Jetpack Compose, with its declarative approach, has made UI development faster and more intuitive. However, managing state and business logic in a Compose application requires a robust architectural pattern. One such pattern is Model-View-Intent (MVI).</p><p>In this blog, we’ll explore the MVI architecture, its benefits, and how it integrates seamlessly with Jetpack Compose. To illustrate, we’ll build a simple login screen using MVI principles.</p><h3><strong>What is MVI Architecture?</strong></h3><p>Model-View-Intent (MVI) is a unidirectional data flow architecture designed for reactive systems. It ensures that the state transitions in your application are predictable and easy to debug. Let’s break down its components:</p><p>1. <strong>Model</strong>:</p><p>The model represents the state of the application. In MVI, the state is immutable, meaning every state change produces a new state rather than modifying the existing one. This immutability ensures a single source of truth for the UI, making state management predictable.</p><p>2. <strong>View</strong>:</p><p>The view is the UI layer that observes the state and renders the interface accordingly. It also emits user actions as <strong>Intents</strong> to the business logic.</p><p>3. <strong>Intent</strong>:</p><p>Intents represent user interactions (e.g., button clicks, text input) or system events. These intents are processed by the business logic layer to update the state.</p><p>The core principle of MVI is <strong>unidirectional data flow</strong>, where:</p><p>1. The <strong>View</strong> emits an Intent.</p><p>2. The Intent is processed to update the <strong>Model</strong>.</p><p>3. The updated Model is rendered back in the <strong>View</strong>.</p><h3><strong>Why Choose MVI for Jetpack Compose?</strong></h3><p>Jetpack Compose, with its declarative nature, encourages immutable state management and unidirectional data flow. This makes MVI a natural fit for Compose applications. Here’s why:</p><p><strong>1. Predictable State</strong></p><p>MVI ensures that every UI state is derived from a single source of truth. This predictability makes debugging easier and eliminates edge cases caused by inconsistent state.</p><p><strong>2. Enhanced Testability</strong></p><p>With clear separation of concerns, the business logic and state management in MVI can be easily unit-tested without relying on the UI.</p><p><strong>3. Simplified State Management</strong></p><p>In Compose, UI recompositions are triggered automatically when the state changes. MVI leverages this feature to keep the UI in sync with the application state effortlessly.</p><p><strong>4. Scalability</strong></p><p>For larger applications with complex state transitions, MVI provides a structured approach that scales well with feature growth</p><h3><strong>MVI Architecture in Action: Building a Login Screen</strong></h3><p>Let’s implement a login screen in Jetpack Compose using MVI architecture.</p><p><strong>Step 1: Define the State (Model)</strong></p><p>The state represents the current UI data. For a login screen, the state includes fields like email, password, loading status, and error messages.</p><pre>data class LoginState(<br>    val email: String = &quot;&quot;,<br>    val password: String = &quot;&quot;,<br>    val isLoading: Boolean = false,<br>    val errorMessage: String? = null<br>)</pre><p>This immutable state will be updated for every user interaction.</p><p><strong>Step 2: Define the Intent</strong></p><p>Intents encapsulate user actions such as typing in a text field or clicking a button.</p><pre>sealed class LoginIntent {<br>    data class EmailChanged(val email: String) : LoginIntent()<br>    data class PasswordChanged(val password: String) : LoginIntent()<br>    object Submit : LoginIntent()<br>}</pre><p>By encapsulating actions into these sealed classes, the application logic becomes explicit and easier to maintain.</p><p><strong>Step 3: ViewModel — The Heart of MVI</strong></p><p>The ViewModel handles intents and updates the state. It acts as a bridge between the View and the Model.</p><pre>import androidx.lifecycle.ViewModel<br>import kotlinx.coroutines.flow.MutableStateFlow<br>import kotlinx.coroutines.flow.StateFlow<br>import kotlinx.coroutines.flow.update<br>import kotlinx.coroutines.launch<br><br>class LoginViewModel : ViewModel() {<br>    private val _state = MutableStateFlow(LoginState())<br>    val state: StateFlow&lt;LoginState&gt; = _state<br><br>    fun processIntent(intent: LoginIntent) {<br>        when (intent) {<br>            is LoginIntent.EmailChanged -&gt; {<br>                _state.update { it.copy(email = intent.email) }<br>            }<br>            is LoginIntent.PasswordChanged -&gt; {<br>                _state.update { it.copy(password = intent.password) }<br>            }<br>            is LoginIntent.Submit -&gt; {<br>                performLogin()<br>            }<br>        }<br>    }<br><br>    private fun performLogin() {<br>        _state.update { it.copy(isLoading = true, errorMessage = null) }<br><br>        // Simulate network request<br>        viewModelScope.launch {<br>            kotlinx.coroutines.delay(2000) // Simulate network delay<br>            val isSuccess = _state.value.email == &quot;user@example.com&quot; &amp;&amp; _state.value.password == &quot;password123&quot;<br><br>            _state.update {<br>                if (isSuccess) {<br>                    it.copy(isLoading = false)<br>                } else {<br>                    it.copy(isLoading = false, errorMessage = &quot;Invalid credentials&quot;)<br>                }<br>            }<br>        }<br>    }<br>}</pre><p><strong>Step 4: Build the UI (View)</strong></p><p>The composable observes the state exposed by the ViewModel and renders the UI accordingly.</p><pre>import androidx.compose.foundation.layout.*<br>import androidx.compose.foundation.text.KeyboardOptions<br>import androidx.compose.material3.*<br>import androidx.compose.runtime.Composable<br>import androidx.compose.runtime.collectAsState<br>import androidx.compose.runtime.getValue<br>import androidx.compose.ui.Alignment<br>import androidx.compose.ui.Modifier<br>import androidx.compose.ui.text.input.KeyboardType<br>import androidx.compose.ui.unit.dp<br><br>@Composable<br>fun LoginScreen(viewModel: LoginViewModel) {<br>    val state by viewModel.state.collectAsState()<br><br>    Column(<br>        modifier = Modifier<br>            .fillMaxSize()<br>            .padding(16.dp),<br>        verticalArrangement = Arrangement.Center,<br>        horizontalAlignment = Alignment.CenterHorizontally<br>    ) {<br>        if (state.isLoading) {<br>            CircularProgressIndicator()<br>        } else {<br>            TextField(<br>                value = state.email,<br>                onValueChange = { viewModel.processIntent(LoginIntent.EmailChanged(it)) },<br>                label = { Text(&quot;Email&quot;) },<br>                keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email)<br>            )<br><br>            Spacer(modifier = Modifier.height(8.dp))<br><br>            TextField(<br>                value = state.password,<br>                onValueChange = { viewModel.processIntent(LoginIntent.PasswordChanged(it)) },<br>                label = { Text(&quot;Password&quot;) },<br>                keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password)<br>            )<br><br>            Spacer(modifier = Modifier.height(16.dp))<br><br>            Button(onClick = { viewModel.processIntent(LoginIntent.Submit) }) {<br>                Text(&quot;Login&quot;)<br>            }<br><br>            state.errorMessage?.let { error -&gt;<br>                Spacer(modifier = Modifier.height(8.dp))<br>                Text(text = error, color = MaterialTheme.colorScheme.error)<br>            }<br>        }<br>    }<br>}</pre><p><strong>Step 5: Integrate Everything in MainActivity</strong></p><p>Finally, connect all components in your MainActivity.</p><pre>import android.os.Bundle<br>import androidx.activity.ComponentActivity<br>import androidx.activity.compose.setContent<br>import androidx.lifecycle.viewmodel.compose.viewModel<br><br>class MainActivity : ComponentActivity() {<br>    override fun onCreate(savedInstanceState: Bundle?) {<br>        super.onCreate(savedInstanceState)<br>        setContent {<br>            val viewModel: LoginViewModel = viewModel()<br>            LoginScreen(viewModel = viewModel)<br>        }<br>    }<br>}</pre><h3><strong>Advantages of MVI with Jetpack Compose</strong></h3><p>1. <strong>Single Source of Truth</strong>:</p><p>All UI states are derived from the StateFlow, making debugging and testing more straightforward.</p><p>2. <strong>Declarative UI</strong>:</p><p>Compose’s reactive nature works seamlessly with MVI’s state-based updates.</p><p>3. <strong>Scalability</strong>:</p><p>MVI makes it easy to manage complex state transitions, even in large applications.</p><p>4. <strong>Testability</strong>:</p><p>Business logic in the ViewModel can be tested independently of the UI.</p><h3><strong>Final Thoughts</strong></h3><p>The MVI architecture aligns perfectly with Jetpack Compose’s declarative programming model, providing a robust solution for managing state and user interactions. By adopting MVI, you can build predictable, testable, and scalable Android apps.</p><p>Start small by implementing MVI for simple screens like the login screen we built here. Over time, you’ll appreciate how it simplifies complex applications.</p><p>Happy coding! 🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c648341cb4d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Robust URL Builder in Kotlin with Extensions]]></title>
            <link>https://makb.medium.com/building-a-robust-url-builder-in-kotlin-with-extensions-a9229bfbd9f6?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9229bfbd9f6</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 17:07:01 GMT</pubDate>
            <atom:updated>2024-11-29T08:56:51.755Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g5kOg8EtDOUB_Qsz" /><figcaption>Photo by <a href="https://unsplash.com/@remotarjobs?utm_source=medium&amp;utm_medium=referral">Remotar Jobs</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Constructing dynamic URLs is a frequent requirement in modern app development. A URL builder streamlines this process, improving readability and maintainability of code. In this blog, we’ll expand on a simple Kotlin URL builder, adding useful extensions like query parameters, custom encodings, and more.</p><h3><strong>Why Use a URL Builder?</strong></h3><p>When interacting with APIs, constructing URLs manually can quickly become error-prone. Consider the following:</p><pre>val url = &quot;https://api.example.com&quot; + &quot;/users&quot; + &quot;/&quot; + userId + &quot;/details&quot;</pre><p>While it’s simple, it’s hard to maintain and doesn’t handle edge cases (like leading or trailing slashes). A URL builder addresses these issues by providing a structured, reusable, and readable approach to building URLs.</p><p>A basic URL builder is excellent for managing path segments, but real-world applications often require:</p><p>1. Query parameters for filtering or pagination.</p><p>2. Custom encodings to handle special characters in paths or parameters.</p><p>3. Seamless integration with networking libraries like Retrofit or Ktor.</p><p>Let’s enhance the builder to address these needs.</p><h3><strong>Designing the URL Builder</strong></h3><p>Our goal is to create a class that:</p><p>1. Initializes with a base URL.</p><p>2. Allows appending multiple path segments dynamically.</p><p>3. Constructs a clean and well-formatted URL.</p><p>The <strong>builder pattern</strong> ensures the flexibility to build complex objects (like URLs) step by step.</p><h3><strong>Enhanced URL Builder</strong></h3><p>Below is the enhanced version of our URLBuilder that supports query parameters and custom encodings:</p><pre>import java.net.URLEncoder<br>import java.nio.charset.StandardCharsets<br><br>class URLBuilder private constructor(private val baseUrl: String) {<br>    private val paths = mutableListOf&lt;String&gt;()<br>    private val queryParams = mutableMapOf&lt;String, String&gt;()<br><br>    // Add a path segment to the URL<br>    fun addPath(path: String) = apply {<br>        paths.add(path)<br>    }<br><br>    // Add query parameters to the URL<br>    fun addQueryParam(key: String, value: String) = apply {<br>        queryParams[key] = value<br>    }<br><br>    // Add multiple query parameters<br>    fun addQueryParams(params: Map&lt;String, String&gt;) = apply {<br>        queryParams.putAll(params)<br>    }<br><br>    // Builds the final URL<br>    fun build(): String {<br>        val fullPath = paths.joinToString(&quot;/&quot;) { it.trim(&#39;/&#39;) }<br>        val baseWithPath = &quot;$baseUrl/$fullPath&quot;.trimEnd(&#39;/&#39;)<br><br>        // Append query parameters<br>        val queryString = if (queryParams.isNotEmpty()) {<br>            queryParams.entries.joinToString(&quot;&amp;&quot;) {<br>                &quot;${encode(it.key)}=${encode(it.value)}&quot;<br>            }<br>        } else {<br>            null<br>        }<br><br>        return if (queryString != null) &quot;$baseWithPath?$queryString&quot; else baseWithPath<br>    }<br><br>    private fun encode(value: String): String =<br>        URLEncoder.encode(value, StandardCharsets.UTF_8)<br><br>    companion object {<br>        fun from(baseUrl: String) = URLBuilder(baseUrl)<br>    }<br>}</pre><h3><strong>Features Added</strong></h3><p>1. <strong>Path Segment Management : </strong>Handles appending path segments while ensuring proper formatting.</p><p>2. <strong>Query Parameters : </strong>Use addQueryParam() to add one key-value pair. Use addQueryParams() for a batch of parameters.</p><p>3. <strong>Custom Encoding : </strong>Automatically URL-encodes path segments and query parameters to handle special characters.</p><h3><strong>Example Usage</strong></h3><p><strong>Basic URL Construction:</strong></p><pre>val url = URLBuilder.from(&quot;https://api.example.com&quot;)<br>    .addPath(&quot;users&quot;)<br>    .addPath(&quot;123&quot;)<br>    .addPath(&quot;details&quot;)<br>    .build()<br><br>println(url)<br>// Output: https://api.example.com/users/123/details</pre><p><strong>Adding Query Parameters:</strong></p><pre>val urlWithParams = URLBuilder.from(&quot;https://api.example.com&quot;)<br>    .addPath(&quot;users&quot;)<br>    .addQueryParam(&quot;filter&quot;, &quot;active&quot;)<br>    .addQueryParam(&quot;sort&quot;, &quot;asc&quot;)<br>    .build()<br><br>println(urlWithParams)<br>// Output: https://api.example.com/users?filter=active&amp;sort=asc</pre><p><strong>Handling Special Characters:</strong></p><pre>val encodedUrl = URLBuilder.from(&quot;https://api.example.com&quot;)<br>    .addPath(&quot;users&quot;)<br>    .addQueryParam(&quot;name&quot;, &quot;John Doe&quot;)<br>    .addQueryParam(&quot;city&quot;, &quot;New York&quot;)<br>    .build()<br><br>println(encodedUrl)<br>// Output: https://api.example.com/users?name=John%20Doe&amp;city=New%20York</pre><p><strong>Seamless Integration with Networking Libraries</strong></p><p><strong>Retrofit</strong></p><p>Retrofit uses dynamic URLs for making API calls. The URLBuilder can be integrated like this:</p><pre>interface ApiService {<br>    @GET<br>    suspend fun getUserDetails(@Url url: String): Response&lt;User&gt;<br>}<br><br>// Usage<br>val apiService: ApiService = retrofit.create(ApiService::class.java)<br>val url = URLBuilder.from(&quot;https://api.example.com&quot;)<br>    .addPath(&quot;users&quot;)<br>    .addPath(&quot;123&quot;)<br>    .build()<br><br>val response = apiService.getUserDetails(url)</pre><p><strong>Ktor</strong></p><p>With Ktor’s HttpClient, you can use the URL builder to construct API request URLs dynamically:</p><pre>val client = HttpClient()<br><br>val url = URLBuilder.from(&quot;https://api.example.com&quot;)<br>    .addPath(&quot;users&quot;)<br>    .addQueryParam(&quot;filter&quot;, &quot;active&quot;)<br>    .build()<br><br>val response: HttpResponse = client.get(url)<br>println(response.readText())</pre><h3><strong>Extensibility</strong></h3><p>Here are some additional ideas for enhancing the URLBuilder:</p><p>1. <strong>Default Query Parameters</strong></p><p>Add a method to set default parameters that are included in every URL.</p><p>2. <strong>Path Validation</strong></p><p>Validate path segments to ensure they follow certain constraints (e.g., alphanumeric).</p><p>3. <strong>Support for Fragments</strong></p><p>Add support for appending fragments (e.g., #section1) to URLs.</p><p>4. <strong>Logging or Debugging</strong></p><p>Include a method to log or preview the constructed URL during development.</p><h3><strong>Wrapping up</strong></h3><p>The enhanced URLBuilder is a versatile tool for creating dynamic URLs in Kotlin. It handles path segments, query parameters, and special characters seamlessly. Additionally, it integrates well with popular networking libraries like Retrofit and Ktor.</p><p>By leveraging the builder pattern, this tool keeps your code clean, readable, and maintainable, even in complex API-driven applications.</p><blockquote><strong>Do you use a URL builder in your projects? What features would you add to this one? Let’s discuss in the comments!</strong> 😊</blockquote><p>Happy learning!🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9229bfbd9f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Innovate, Just Copy the Best]]></title>
            <link>https://makb.medium.com/dont-innovate-just-copy-the-best-a-pragmatic-approach-to-success-4a96b4183d6a?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a96b4183d6a</guid>
            <category><![CDATA[success]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[innovation]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Thu, 24 Oct 2024 16:29:42 GMT</pubDate>
            <atom:updated>2024-10-24T16:57:15.013Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pxR1WzgDleTdJHxW" /><figcaption>Photo by <a href="https://unsplash.com/@theblowup?utm_source=medium&amp;utm_medium=referral">the blowup</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Innovation is often hailed as the holy grail of success. We’ve been conditioned to believe that the only way to succeed is to come up with groundbreaking, earth-shattering ideas that no one has ever thought of before. But what if that’s not the only way? What if, instead of trying to reinvent the wheel, we could achieve success by simply copying what works? In this blog post, we’ll explore why “copying the best” can be a viable strategy, especially in today’s competitive landscape.</blockquote><h3><strong>The Myth of Originality</strong></h3><p>The idea that every successful product or business must be entirely original is a myth. The reality is, many of the world’s most successful companies started by copying and improving upon existing ideas. Facebook wasn’t the first social network; Google wasn’t the first search engine; and the iPhone wasn’t the first smartphone. What these companies did was take existing concepts, refine them, and add their unique spin.</p><p>The concept of originality can sometimes act as a barrier. It creates an unnecessary pressure to come up with something completely new. But more often than not, innovation is less about creating something from scratch and more about improving what already exists. When you copy the best, you save yourself from unnecessary trial and error and instead focus on making an existing idea even better.</p><h3><strong>Learning From the Best</strong></h3><p>One of the most powerful advantages of copying the best is the ability to learn from others’ successes and failures. Every successful product or service has already been through rounds of experimentation, feedback, and iteration. By studying what’s already out there, you can avoid the pitfalls that others have encountered.</p><blockquote>Take, for example, Android. It’s often seen as a response to the iPhone, but that doesn’t mean it’s a simple copy. Android took inspiration from the iPhone’s user-friendly interface but also added features and flexibility that iOS lacked. The result? A platform that powers billions of devices worldwide.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZvVVpiTnCkNmIDSB" /><figcaption>Photo by <a href="https://unsplash.com/@priscilladupreez?utm_source=medium&amp;utm_medium=referral">Priscilla Du Preez 🇨🇦</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you decide to copy, you’re not just mimicking; you’re studying what works, why it works, and how you can make it even better. This is why it’s crucial to identify the leaders in your field and analyze their strengths. What makes their product stand out? How do they market it? What’s their business model? By answering these questions, you can build a foundation of proven practices to base your approach on.</p><h3><strong>The Efficiency of Copying</strong></h3><p>Building something entirely new takes a lot of time, money, and resources. Copying an existing idea allows you to save on these fronts. This doesn’t mean that you should blatantly plagiarize, but rather, borrow concepts, features, and strategies that are already working.</p><blockquote>Let’s consider the fast-food industry as an example. When McDonald’s began franchising, it set a standard for efficiency and consistency. Many other fast-food chains followed suit, copying their model. They didn’t invent the burger, but they did refine their processes to become competitive. Today, you can see this playbook across numerous chains — similar menus, similar drive-thrus, and even similar restaurant layouts.</blockquote><h3><strong>Copying Is Not Enough — Innovate on Top of It</strong></h3><p>Here’s the catch: copying alone won’t make you successful. You need to understand why something works, then find ways to make it better. In the tech world, this is often called the “copy, transform, and combine” approach. First, you copy the best ideas. Then, you transform them by adding your own spin, and finally, you combine these elements into something new and unique.</p><blockquote>Take Apple, for example. The iPod wasn’t the first MP3 player, but it was the first one to pair a sleek design with intuitive user interaction and a seamless integration with software (iTunes). Apple took a concept that already existed and added a layer of polish, design, and functionality that set it apart from the competition.</blockquote><p>This approach allows you to stand on the shoulders of giants. You benefit from existing knowledge and infrastructure, and by adding your unique touch, you can differentiate yourself from others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gwAjybJf_f3qpDWb" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>Ethical Copying: When Is It Okay?</strong></h3><p>It’s important to draw a line between copying as a strategy and outright theft. Copying doesn’t mean taking someone else’s intellectual property and claiming it as your own. It means understanding best practices, learning from industry leaders, and building upon existing ideas.</p><p>When you’re “copying the best,” it should be about respecting the original creators and acknowledging their success. It’s not about stealing; it’s about adapting proven strategies in a way that benefits your own audience. This is why companies file patents — to protect their innovations while allowing others to learn from them and inspire new ideas.</p><h3><strong>The Fine Line Between Innovation and Imitation</strong></h3><p>The world of business and technology thrives on competition. While there is always room for groundbreaking innovation, there is also a place for smart, strategic imitation. If you can take an existing idea and improve upon it, that’s innovation in itself. Sometimes, the most revolutionary thing you can do is take what already works and make it even better.</p><blockquote><strong><em>So, don’t be afraid to copy the best. Study the leaders in your field, learn from their successes and mistakes, and apply those insights to your own projects. The goal isn’t to imitate but to innovate by building upon what already exists. And remember, some of the greatest successes in history started by simply copying the best.</em></strong></blockquote><p>Happy learning!🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><figure><a href="https://medium.com/subscribe/@makb?source=publishing_settings---user_settings----------------------------------"><img alt="https://medium.com/subscribe/@makb?source=publishing_settings---user_settings----------------------------------" src="https://cdn-images-1.medium.com/max/1024/0*KJpTAHH-bX4D0kW-.jpg" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a96b4183d6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Your Android Login Workflow Using ADB]]></title>
            <link>https://makb.medium.com/automate-your-android-login-workflow-using-adb-9c921b6f4491?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c921b6f4491</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[adb]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 15:46:41 GMT</pubDate>
            <atom:updated>2024-10-12T15:46:41.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t2m1ErkBZkfXY1SZ" /><figcaption>Photo by <a href="https://unsplash.com/@josenothose?utm_source=medium&amp;utm_medium=referral">Jose Fontano</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Repetitive tasks can be time-consuming, especially for developers who need to log into an app multiple times during testing. Wouldn’t it be great to automate this process? In this blog post, I’ll show you how to automate the login workflow of your Android app using ADB (Android Debug Bridge) with a simple shell script. We’ll also create a menu interface to make it easy to run various tasks with just a few clicks!</p><p><strong>What is ADB?</strong></p><p>ADB (Android Debug Bridge) is a command-line tool that lets you interact with an Android device. It’s perfect for tasks like installing apps, copying files, and running shell commands directly on your device. With ADB, you can automate many repetitive tasks, saving you time and effort.</p><p><strong>Prerequisites</strong></p><p>Before we dive into the script, make sure you have the following:</p><p>1. <strong>Android Device</strong>: Enable Developer Options and USB Debugging on your device.</p><p>2. <strong>ADB installed</strong>: You can download the Android SDK Platform Tools <a href="https://developer.android.com/studio/releases/platform-tools">here</a> and add it to your system’s PATH.</p><p><strong>Creating the Automation Script</strong></p><p>Here’s the complete shell script that will automate your login process:</p><pre>#!/bin/bash<br><br># Function to unlock and launch the app<br>launch_app() {<br>    # Unlock the device (simulates pressing the power button)<br>    adb shell input keyevent 26<br>    <br>    # Wake up the screen (if the screen is off)<br>    adb shell input keyevent 82<br>    <br>    # Navigate to Home Screen<br>    adb shell input keyevent 3<br>    <br>    # Open your app (replace `com.example.app/.MainActivity` with your app&#39;s package name and activity)<br>    adb shell am start -n com.example.app/.MainActivity<br><br>    echo &quot;App launched successfully.&quot;<br>}<br><br># Function to automate login<br>launch_and_login() {<br>    # Call the launch app function to open the app<br>    launch_app<br><br>    # Wait for the app to open (adjust the sleep duration as necessary)<br>    sleep 5<br><br>    # Enter username (Replace coordinates with the ones that correspond to the username field)<br>    adb shell input tap 500 400<br>    adb shell input text &quot;YourUsername&quot;<br><br>    # Enter password (Replace coordinates with the ones that correspond to the password field)<br>    adb shell input tap 500 600<br>    adb shell input text &quot;YourPassword&quot;<br><br>    # Hide the keyboard (optional, but useful if the login button is hidden behind it)<br>    adb shell input keyevent 111<br><br>    # Tap on the Login button (replace coordinates with the ones that correspond to the login button)<br>    adb shell input tap 500 800<br><br>    echo &quot;Login completed successfully.&quot;<br>}<br><br># Menu function<br>show_menu() {<br>    echo &quot;===========================&quot;<br>    echo &quot; Android Automation Script &quot;<br>    echo &quot;===========================&quot;<br>    echo &quot;1. Launch App&quot;<br>    echo &quot;2. Launch and Login&quot;<br>    echo &quot;3. Exit&quot;<br>    echo &quot;===========================&quot;<br>    echo -n &quot;Please select an option (1-3): &quot;<br>}<br><br># Loop until the user chooses to exit<br>while true; do<br>    show_menu<br>    read choice<br><br>    case $choice in<br>        1)<br>            launch_app<br>            ;;<br>        2)<br>            launch_and_login<br>            ;;<br>        3)<br>            echo &quot;Exiting...&quot;<br>            break<br>            ;;<br>        *)<br>            echo &quot;Invalid option. Please try again.&quot;<br>            ;;<br>    esac<br><br>    # Add a line break for better readability<br>    echo &quot;&quot;<br>done  </pre><p><strong>How It Works</strong></p><p>1. launch_app<strong> Function</strong>: This function unlocks your device, wakes up the screen, navigates to the home screen, and launches the specified app.</p><p>2. launch_and_login<strong> Function</strong>: This function calls launch_app and then automates the login process by entering your username and password, hiding the keyboard, and tapping on the login button.</p><p>3. <strong>Menu System</strong>: The script provides a menu where you can:</p><p>• <strong>Option 1</strong>: Launch the app.</p><p>• <strong>Option 2</strong>: Launch the app and log in automatically.</p><p>• <strong>Option 3</strong>: Exit the script.</p><p><strong>Setting Up and Running the Script</strong></p><p>1. Save the script as android_automation.sh.</p><p>2. Make it executable by running:</p><pre>chmod +x android_automation.sh</pre><p>3. Execute the script:</p><pre>./android_automation.sh</pre><p><strong>Adjusting Coordinates and Activity Name</strong></p><p>• Replace com.example.app/.MainActivity with your app’s actual package name and main activity.</p><p>• Use adb shell uiautomator dump to get a layout of your app and determine the correct coordinates for tapping on the username, password, and login button fields. You can view the dumped XML on your device’s internal storage (/sdcard/window_dump.xml) and use a tool like adb pull to get it onto your computer.</p><p><strong>Benefits of Automation</strong></p><p>• <strong>Time-saving</strong>: Automating repetitive tasks can save you a lot of time, especially if you’re testing frequently.</p><p>• <strong>Consistency</strong>: The script will perform actions the same way every time, which is ideal for testing scenarios.</p><p>• <strong>Ease of Use</strong>: With the menu-based system, you don’t need to remember complex ADB commands; just run the script and choose your option.</p><p><strong>Troubleshooting Tips</strong></p><p>• <strong>Device Not Detected</strong>: Make sure USB Debugging is enabled, and run adb devices to confirm that your device is connected.</p><p>• <strong>Wrong Coordinates</strong>: If the taps don’t work, verify the coordinates using tools like uiautomatorviewer to inspect the UI layout.</p><p>By following the steps in this post, you can automate the login workflow of your Android app using ADB. This can significantly reduce the time and effort you spend on repetitive tasks, allowing you to focus on more important aspects of your project. Feel free to extend the script to include other automations based on your requirements.</p><p>Happy coding!🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c921b6f4491" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Jetpack compose Date Picker with Material-3]]></title>
            <link>https://towardsdev.com/android-jetpack-compose-date-picker-with-material-3-fb827c0fb04c?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb827c0fb04c</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[datepicker]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Thu, 26 Sep 2024 06:13:10 GMT</pubDate>
            <atom:updated>2024-10-07T18:00:41.567Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xRmiMLsz915QlWBks7m3Ag.png" /></figure><p>In Android app development, date pickers are a common requirement, whether for setting reminders, scheduling events, or filtering content by date. With the rise of Jetpack Compose, building custom components like a date picker has become more intuitive and declarative. In this blog, we’ll walk through how to create and use a <strong>Material Date Picker</strong> in an Android app using <strong>Jetpack Compose</strong> with <strong>Material 3</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvzjoJv2JjPrualcPCHNrQ.gif" /></figure><p><strong>Overview</strong></p><p>Our app will consist of three main components:</p><ol><li><strong>MainActivity</strong>: The entry point of the app where the UI is composed.</li></ol><p>2. <strong>MainApp</strong>: A composable that holds the logic for displaying the selected date and calling the date picker.</p><p>3. <strong>MaterialDatePicker</strong>: A custom composable that renders an input field with a trailing icon. When clicked, it opens a date picker dialog, allowing users to select a date.</p><p>Let’s dive into the code and explore each part.</p><ol><li><strong>The MainActivity</strong></li></ol><pre>import android.os.Bundle<br>import androidx.activity.ComponentActivity<br>import androidx.activity.compose.setContent<br>import androidx.activity.enableEdgeToEdge<br>import androidx.compose.foundation.layout.Column<br>import androidx.compose.foundation.layout.fillMaxSize<br>import androidx.compose.foundation.layout.padding<br>import androidx.compose.material3.ExperimentalMaterial3Api<br>import androidx.compose.material3.MaterialTheme<br>import androidx.compose.material3.Scaffold<br>import androidx.compose.material3.Text<br>import androidx.compose.material3.TopAppBar<br>import androidx.compose.material3.TopAppBarDefaults<br>import androidx.compose.ui.Modifier<br>import androidx.compose.ui.unit.dp<br>import com.jetpackdemo.ui.theme.JetpackDemoTheme<br><br>class MainActivity : ComponentActivity() {<br>    <br>    @OptIn(ExperimentalMaterial3Api::class)<br>    override fun onCreate(savedInstanceState: Bundle?) {<br>        super.onCreate(savedInstanceState)<br>        enableEdgeToEdge()<br>        setContent {<br>            JetpackDemoTheme {<br>                Scaffold(modifier = Modifier.fillMaxSize(), topBar = {<br>                    TopAppBar(<br>                        title = { Text(&quot;Material Date Picker&quot;) },<br>                        colors = TopAppBarDefaults.topAppBarColors(<br>                            containerColor = MaterialTheme.colorScheme.primary,<br>                            titleContentColor = MaterialTheme.colorScheme.onPrimary<br>                        )<br>                    )<br>                }) { innerPadding -&gt;<br>                    Column(<br>                        modifier = Modifier<br>                            .padding(innerPadding)<br>                            .padding(16.dp)<br>                    ) {<br>                        MainApp()<br>                    }<br>                }<br>            }<br>        }<br>    }<br>}</pre><p>The MainActivity sets up the <strong>Scaffold</strong> with a top app bar and a content area where the MainApp composable is placed. The <strong>enableEdgeToEdge()</strong> function is used to enable edge-to-edge rendering on devices that support it.</p><p><strong>2. The MainApp Composable</strong></p><pre>import androidx.compose.runtime.Composable<br>import androidx.compose.runtime.mutableLongStateOf<br>import androidx.compose.runtime.remember<br><br>@Composable<br>fun MainApp() {<br><br>    val selectedDate = remember { mutableLongStateOf(System.currentTimeMillis()) }<br><br>    MaterialDatePicker(<br>        placeholderText = &quot;Date&quot;,<br>        selectedDateMillis = selectedDate.value,<br>        onDateSelected = { date -&gt;<br>            selectedDate.value = date<br>        },<br>    )<br>}</pre><p>In MainApp, we manage the selected date using the remember { mutableLongStateOf(System.currentTimeMillis()) } state holder. This stores the currently selected date in milliseconds (the default is the current system time).</p><p>The MaterialDatePicker composable is called here with the selectedDateMillis passed as a parameter. When a date is selected, the state is updated, and the UI reflects the new selection.</p><p><strong>3. The MaterialDatePicker Composable</strong></p><pre>import androidx.compose.foundation.layout.Box<br>import androidx.compose.foundation.layout.fillMaxWidth<br>import androidx.compose.foundation.layout.height<br>import androidx.compose.material.icons.Icons<br>import androidx.compose.material.icons.filled.DateRange<br>import androidx.compose.material3.DatePicker<br>import androidx.compose.material3.DatePickerDialog<br>import androidx.compose.material3.DatePickerState<br>import androidx.compose.material3.ExperimentalMaterial3Api<br>import androidx.compose.material3.Icon<br>import androidx.compose.material3.IconButton<br>import androidx.compose.material3.OutlinedTextField<br>import androidx.compose.material3.Text<br>import androidx.compose.material3.TextButton<br>import androidx.compose.material3.rememberDatePickerState<br>import androidx.compose.runtime.Composable<br>import androidx.compose.runtime.getValue<br>import androidx.compose.runtime.mutableStateOf<br>import androidx.compose.runtime.remember<br>import androidx.compose.runtime.setValue<br>import androidx.compose.ui.Modifier<br>import androidx.compose.ui.unit.dp<br>import java.text.SimpleDateFormat<br>import java.util.Date<br>import java.util.Locale<br><br>@OptIn(ExperimentalMaterial3Api::class)<br>@Composable<br>fun MaterialDatePicker(<br>    placeholderText: String,<br>    selectedDateMillis: Long,<br>    onDateSelected: (Long) -&gt; Unit<br>) {<br>    var isDatePickerVisible by remember { mutableStateOf(false) }<br>    val datePickerState = rememberDatePickerState(initialSelectedDateMillis = selectedDateMillis)<br><br>    val selectedDateText = datePickerState.selectedDateMillis?.let {<br>        formatDate(it, &quot;dd MMM yyyy&quot;)<br>    } ?: &quot;&quot;<br><br>    Box(modifier = Modifier.fillMaxWidth()) {<br>        OutlinedTextField(<br>            modifier = Modifier<br>                .fillMaxWidth()<br>                .height(64.dp),<br>            value = selectedDateText,<br>            onValueChange = {},<br>            label = { Text(placeholderText) },<br>            readOnly = true,<br>            trailingIcon = {<br>                IconButton(onClick = { isDatePickerVisible = !isDatePickerVisible }) {<br>                    Icon(imageVector = Icons.Default.DateRange, contentDescription = &quot;Select date&quot;)<br>                }<br>            }<br>        )<br><br>        if (isDatePickerVisible) {<br>            DatePickerDialog(<br>                datePickerState = datePickerState,<br>                onDateSelected = {<br>                    onDateSelected(it ?: 0)<br>                    isDatePickerVisible = false<br>                },<br>                onDismiss = { isDatePickerVisible = false }<br>            )<br>        }<br>    }<br>}<br><br>fun formatDate(millis: Long, pattern: String = &quot;MM-dd-yyyy&quot;): String {<br>    val formatter = SimpleDateFormat(pattern, Locale.ENGLISH)<br>    return formatter.format(Date(millis))<br>}</pre><p>In this component, the core date picker functionality is implemented. The key highlights are:</p><p>• <strong>OutlinedTextField</strong>: Displays the selected date as a read-only text field with a trailing date icon.</p><p>• <strong>DatePickerDialog</strong>: When the date icon is clicked, the date picker dialog opens. Users can select a date or dismiss the dialog.</p><p>• <strong>formatDate()</strong>: A utility function that formats the selected date in the desired pattern.</p><p><strong>4. The DatePickerDialog Composable</strong></p><pre>@OptIn(ExperimentalMaterial3Api::class)<br>@Composable<br>fun DatePickerDialog(<br>    datePickerState: DatePickerState,<br>    onDateSelected: (Long?) -&gt; Unit,<br>    onDismiss: () -&gt; Unit<br>) {<br>    DatePickerDialog(<br>        onDismissRequest = onDismiss,<br>        confirmButton = {<br>            TextButton(onClick = {<br>                onDateSelected(datePickerState.selectedDateMillis)<br>                onDismiss()<br>            }) {<br>                Text(&quot;OK&quot;)<br>            }<br>        },<br>        dismissButton = {<br>            TextButton(onClick = onDismiss) {<br>                Text(&quot;Cancel&quot;)<br>            }<br>        }<br>    ) {<br>        DatePicker(state = datePickerState)<br>    }<br>}</pre><p>The DatePickerDialog is responsible for rendering the <strong>DatePicker</strong> inside a dialog with OK and Cancel buttons.</p><p><strong>Final Thoughts</strong></p><p>By combining Jetpack Compose and Material 3, building a date picker becomes a straightforward task. The modularity of Compose allows us to separate the UI components cleanly, making the code easy to read and maintain.</p><p>This is a simple yet powerful example of how you can implement date pickers in your Compose-based Android apps. You can further enhance the date picker with customizations like different date formats, limiting selectable dates, and more based on your requirements.</p><p>Happy coding!🚀</p><ul><li><strong>—</strong></li></ul><p><strong><em>Stay Updated with the Latest Posts: Don’t Miss Out!</em></strong></p><p><strong><em>If you found this post helpful, show your support by giving multiple claps</em></strong> 👏</p><p><strong><em>Thank you for your support and appreciation! 😊</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb827c0fb04c" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/android-jetpack-compose-date-picker-with-material-3-fb827c0fb04c">Android Jetpack compose Date Picker with Material-3</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding String and String Pool in Java]]></title>
            <link>https://makb.medium.com/understanding-string-and-string-pool-in-java-77234e7bae16?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/77234e7bae16</guid>
            <category><![CDATA[string]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[string-pool]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Wed, 26 Jun 2024 16:51:23 GMT</pubDate>
            <atom:updated>2024-06-26T16:51:23.850Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HrHa-3YeyCNLfAP-" /><figcaption>Photo by <a href="https://unsplash.com/@woolyart?utm_source=medium&amp;utm_medium=referral">B K</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Java is renowned for its powerful memory management and optimization techniques. One of the core components that facilitate this efficiency is the String class and the concept of the String pool. While these concepts might seem straightforward, understanding their nuances can significantly impact your application&#39;s performance and memory usage. In this post, we&#39;ll delve into the details of String and the String pool in Java, exploring how they work and how to leverage them for optimal results.</p><h3>The String Class</h3><p>String is a fundamental class in Java, representing a sequence of characters. Here are some key characteristics of the String class:</p><p><strong>Immutable</strong></p><p>In Java, String objects are immutable. This means that once a String object is created, its value cannot be changed. Any operation that seems to modify a string, such as concatenation, actually creates a new String object with the new value. For example:</p><pre>String str1 = &quot;Hello&quot;;<br>String str2 = str1.concat(&quot; World&quot;);<br>System.out.println(str1); // Outputs: Hello<br>System.out.println(str2); // Outputs: Hello World</pre><p>In the above code, str1 remains unchanged after the concatenation operation. Instead, str2 is a new String object with the value &quot;Hello World&quot;.</p><p><strong>Interned</strong></p><p>String literals in Java are automatically interned. This means they are stored in a common pool and shared among the application to save memory. When a String literal is created, the JVM checks the String pool first. If the literal already exists in the pool, the existing object is reused. If it does not exist, a new String object is created and added to the pool.</p><h3>The String Pool</h3><p>The String pool, also known as the interned string pool, is a special memory region within the Java heap. It stores Stringliterals to optimize memory usage and improve performance. Here are some key points about the String pool:</p><p><strong>Literal Strings</strong></p><p>When you create a String using a literal, the JVM first checks the String pool. If the literal already exists in the pool, a reference to the existing object is returned. If it does not exist, a new String object is created and added to the pool. For example:</p><pre>String s1 = &quot;Hello&quot;;<br>String s2 = &quot;Hello&quot;;<br>// s1 and s2 point to the same object in the String pool<br>System.out.println(s1 == s2); // Outputs: true</pre><p><strong>New Strings</strong></p><p>When you create a String using the new keyword, a new String object is created on the heap, even if an equivalent string exists in the String pool. However, you can explicitly add a string to the pool using the intern() method:</p><pre>String s3 = new String(&quot;Hello&quot;);<br>String s4 = s3.intern();<br>// s4 now points to the same object in the String pool as s1 and s2<br>System.out.println(s1 == s4); // Outputs: true</pre><p><strong>Example to Illustrate the Difference</strong></p><p>Here’s a comprehensive example to demonstrate the difference between String literals and String objects created using the new keyword:</p><pre>public class StringPoolExample {<br>    public static void main(String[] args) {<br>        // String literals<br>        String str1 = &quot;Hello&quot;;<br>        String str2 = &quot;Hello&quot;;<br><br>        // str1 and str2 reference the same object in the String pool<br>        System.out.println(str1 == str2); // Output: true<br><br>        // String object created using new keyword<br>        String str3 = new String(&quot;Hello&quot;);<br><br>        // str3 references a new object, not the one in the String pool<br>        System.out.println(str1 == str3); // Output: false<br><br>        // Using intern() method to add str3 to the String pool<br>        String str4 = str3.intern();<br><br>        // str1 and str4 reference the same object in the String pool<br>        System.out.println(str1 == str4); // Output: true<br>    }<br>}</pre><p>In this example:</p><ul><li>str1 and str2 are String literals and thus refer to the same object in the String pool.</li><li>str3 is created using the new keyword, so it refers to a different object on the heap.</li><li>str4 is the result of calling intern() on str3, which adds str3 to the String pool (if not already present) and returns a reference to the pooled object.</li></ul><h3>Wrapping up</h3><ul><li><strong>String</strong>: An immutable sequence of characters that can be created as literals or using the new keyword.</li><li><strong>String Pool</strong>: A special memory area to store string literals and reduce memory usage. Strings created as literals are automatically interned and stored in the pool.</li></ul><p>Understanding the difference between String and the String pool can help optimize memory usage and improve performance in Java applications. By leveraging string interning, you can ensure that your application uses memory efficiently, especially when dealing with large numbers of strings.</p><p>Happy coding! 🚀</p><ul><li>—</li></ul><p><strong><em>Please follow to get updated posts and hit like to motivate me</em></strong></p><p><strong><em>Thanks </em></strong>😊🙏</p><p><strong><em>If this post was helpful, please click the clap 👏 button below a few times to show your support!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77234e7bae16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Utilizing Flutter Bloc with Cubit and Sealed Class for Robust State Management]]></title>
            <link>https://makb.medium.com/utilizing-flutter-bloc-with-cubit-and-sealed-class-for-robust-state-management-a124f94135b0?source=rss-47d4944df135------2</link>
            <guid isPermaLink="false">https://medium.com/p/a124f94135b0</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[bloc]]></category>
            <dc:creator><![CDATA[MaKB]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 08:08:21 GMT</pubDate>
            <atom:updated>2024-03-11T08:08:21.282Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PzYEuMSsbIF60TCw" /><figcaption>Photo by <a href="https://unsplash.com/@williamtm?utm_source=medium&amp;utm_medium=referral">William Hook</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the realm of Flutter development, managing the state of an application efficiently is paramount to crafting robust and maintainable code. Flutter provides a powerful state management solution called Bloc (Business Logic Component), which offers developers the ability to manage application state in a structured and scalable manner. In this article, we’ll delve into the implementation of Flutter Bloc using Cubit and Sealed Class to orchestrate the state management of a Todo application.</p><h3>Understanding the Foundations: Sealed Class and Cubit</h3><p>Before we dive into the implementation details, let’s briefly understand the key components we’ll be leveraging:</p><h3>Sealed Class</h3><p>Sealed classes, a feature in Dart, allow us to define a restricted hierarchy of classes where each class extends the sealed superclass. This concept is pivotal for representing finite states within our application. By leveraging sealed classes, we ensure that all possible states are explicitly defined, promoting exhaustive handling and reducing the likelihood of runtime errors.</p><h3>Cubit</h3><p>Cubit is a lightweight version of Bloc, focusing solely on managing the application’s state. It emits new states in response to external events and provides a simple yet effective way to encapsulate business logic. Cubits are great for scenarios where complex event handling or transformation is not required.</p><h3>Implementing the Todo Application</h3><p>Let’s dive into the implementation of our Todo application, starting with the definition of TodoState:</p><pre>sealed class TodoState {}<br><br>class TodoInitialState extends TodoState {}<br><br>class TodoLoadingState extends TodoState {}<br><br>class TodoLoadedState extends TodoState {<br>  final List&lt;String&gt; items;<br><br>  TodoLoadedState(this.items);<br>}<br><br>class TodoErrorState extends TodoState {<br>  final String error;<br><br>  TodoErrorState(this.error);<br>}</pre><p>Here, we define a hierarchy of states that our Todo application can traverse through: initial state, loading state, loaded state (with items), and error state.</p><p>Next, we’ll create the TodoCubit responsible for managing the application&#39;s state transitions:</p><pre>import &#39;package:flutter_bloc/flutter_bloc.dart&#39;;<br>import &#39;package:todoapp/todo_state.dart&#39;;<br><br>class TodoCubit extends Cubit&lt;TodoState&gt; {<br>  TodoCubit() : super(TodoInitialState()) {<br>    loadData();<br>  }<br><br>  Future&lt;void&gt; loadData() async {<br>    emit(TodoInitialState());<br>    await Future.delayed(const Duration(seconds: 2));<br>    emit(TodoLoadingState());<br>    await Future.delayed(const Duration(seconds: 4));<br>    emit(TodoLoadedState([<br>      &quot;One&quot;,<br>      &quot;Two&quot;,<br>      &quot;Three&quot;,<br>      &quot;Four&quot;,<br>    ]));<br>  }<br>}</pre><p>In the loadData() function, we simulate a delay to mimic fetching data from a remote source. As the data loading progresses, we emit corresponding states to reflect the current state of the application.</p><h3>Crafting the User Interface</h3><p>Now, let’s translate these states into a user interface using BlocBuilder:</p><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:flutter_bloc/flutter_bloc.dart&#39;;<br>import &#39;package:todoapp/todo_cubit.dart&#39;;<br>import &#39;package:todoapp/todo_state.dart&#39;;<br><br>void main() {<br>  runApp(const MainApp());<br>}<br><br>class MainApp extends StatelessWidget {<br>  const MainApp({Key? key}) : super(key: key);<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return BlocProvider(<br>      create: (_) =&gt; TodoCubit(),<br>      child: MaterialApp(<br>        title: &quot;Todo Application&quot;,<br>        home: Scaffold(<br>          appBar: AppBar(<br>            title: const Text(&quot;Todo App&quot;),<br>          ),<br>          body: BlocBuilder&lt;TodoCubit, TodoState&gt;(<br>            builder: (context, state) {<br>              return state.when(<br>                initialState: () =&gt; const Center(<br>                  child: Text(&quot;Hi, Let me load content here&quot;),<br>                ),<br>                loadingState: () =&gt; const Center(<br>                  child: Column(<br>                    mainAxisAlignment: MainAxisAlignment.center,<br>                    crossAxisAlignment: CrossAxisAlignment.center,<br>                    children: [<br>                      CircularProgressIndicator(),<br>                      SizedBox(<br>                        height: 20,<br>                      ),<br>                      Text(&quot;Loading content...&quot;),<br>                    ],<br>                  ),<br>                ),<br>                loadedState: (items) =&gt; Container(<br>                  padding: const EdgeInsets.all(16),<br>                  child: Column(<br>                    children: [<br>                      const Center(<br>                        child: Text(&quot;Items loaded successfully&quot;),<br>                      ),<br>                      Expanded(<br>                        child: ListView.builder(<br>                          itemCount: items.length,<br>                          itemBuilder: (context, index) {<br>                            return Text(&quot;${index + 1} - ${items[index]}&quot;);<br>                          },<br>                        ),<br>                      )<br>                    ],<br>                  ),<br>                ),<br>                errorState: (error) =&gt; Center(<br>                  child: Text(error),<br>                ),<br>              );<br>            },<br>          ),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><h3>Wrapping up</h3><p>In this article, we’ve explored the utilization of Flutter Bloc with Cubit and Sealed Class for managing the state of a Todo application. By leveraging sealed classes, we’ve ensured a comprehensive representation of application states, thus enhancing code reliability and maintainability. Flutter Bloc’s succinct approach to state management empowers developers to build robust applications with clear separation of concerns. Integrating Cubit and Sealed Class methodology not only streamlines state management but also fosters a structured and scalable codebase, ultimately leading to an enhanced development experience.</p><p>Happy coding! 🚀</p><ul><li>—</li></ul><p><strong><em>Please follow to get updated posts and hit like to motivate me</em></strong></p><p><strong><em>Thanks </em></strong>😊🙏</p><p><strong><em>If this post was helpful, please click the clap 👏 button below a few times to show your support!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a124f94135b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>