<?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 Vrushali on Medium]]></title>
        <description><![CDATA[Stories by Vrushali on Medium]]></description>
        <link>https://medium.com/@vrushalidev?source=rss-4a236a38a7ed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OANqxWXYVUzZdGrWKRbZxQ.png</url>
            <title>Stories by Vrushali on Medium</title>
            <link>https://medium.com/@vrushalidev?source=rss-4a236a38a7ed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 22:53:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vrushalidev/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[How to Integrate the Presage SmartSpectra SDK in Android: A Beginner-Friendly Guide]]></title>
            <link>https://medium.com/@vrushalidev/how-to-integrate-the-presage-smartspectra-sdk-in-android-a-beginner-friendly-guide-6a46853b24b3?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a46853b24b3</guid>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[presage]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[smart-spectra]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 12:56:54 GMT</pubDate>
            <atom:updated>2026-11-20T12:56:54.979Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Read pulse and breathing from the front camera in a Jetpack Compose app, step by step, using my app Pause Pal as a real example.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FyU00z2-cTjEpmL8MN0anA.png" /></figure><h3>What we are building</h3><p>I built <strong>Pause Pal</strong>, a small study-break buddy for students and developers. You prop up your phone, start a short check-in, and the app uses the <strong>front camera</strong> to read your own <strong>pulse</strong> and <strong>breathing</strong>. If your breathing stays clearly above <em>your own</em> baseline, a friendly mascot suggests a short break with a guided breathing circle.</p><p>The magic part (reading vital signs from a normal camera) comes from the <strong>Presage SmartSpectra SDK</strong>. In this post I’ll show you, step by step, how to add it to your own Android app. You don’t need any background in health tech. If you can build a basic Android app, you can follow along.</p><blockquote><em>🎥 Demo video: </em><a href="https://youtu.be/KMcwpqxhjek"><em>https://youtu.be/KMcwpqxhjek</em></a></blockquote><blockquote>💻 Full source: <a href="https://github.com/vrush1588/pausepal-smartspectra">https://github.com/vrush1588/pausepal-smartspectra</a></blockquote><h3>First, how can a camera “see” your pulse?</h3><p>This sounds like science fiction, but the idea is simple:</p><ul><li><strong>Pulse:</strong> every heartbeat pushes blood into your face. This causes tiny colour changes in your skin that your eyes can’t notice, but a camera can.</li><li><strong>Breathing:</strong> every breath moves your chest and shoulders up and down a little.</li></ul><p>The SmartSpectra SDK watches the camera frames <strong>on the phone</strong>, picks up these tiny changes, and gives you clean numbers like “72 bpm” or “14 breaths per minute”. You don’t write any signal-processing code yourself. You just ask for the metrics and listen for updates.</p><blockquote><em>⚠️ These are wellness readings, not medical measurements. Don’t build a diagnosis app on top of them.</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKMcwpqxhjek%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKMcwpqxhjek&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKMcwpqxhjek%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4c3520f86a248019fa68aee5c71d919/href">https://medium.com/media/a4c3520f86a248019fa68aee5c71d919/href</a></iframe><h3>What you need</h3><ul><li><strong>Android Studio</strong> (a recent version)</li><li>A <strong>physical Android phone</strong>, Android 9 (API 28) or newer, arm64. The emulator has no real face to look at, so it won’t give you a signal.</li><li>A free <strong>Presage API key</strong> from <a href="https://physiology.presagetech.com/">https://physiology.presagetech.com</a></li><li>Basic Kotlin knowledge. I use Jetpack Compose for the UI, but the SDK part works with any UI.</li></ul><h3>Step 1: Add the dependency</h3><p>The SDK is published on Maven Central, so there is no special repository to add. Make sure your settings.gradle.kts has the usual repositories:</p><pre>dependencyResolutionManagement {<br>    repositories {<br>        google()<br>        mavenCentral()<br>    }<br>}</pre><p>Then add the SDK and CameraX’s camera-view (we&#39;ll use it for the live preview) to your version catalog, gradle/libs.versions.toml:</p><pre>[versions]<br>smartspectra = &quot;3.4.0&quot;<br>cameraView = &quot;1.6.0&quot;<br><br>[libraries]<br>smartspectra = { group = &quot;com.presagetech&quot;, name = &quot;smartspectra&quot;, version.ref = &quot;smartspectra&quot; }<br>androidx-camera-view = { group = &quot;androidx.camera&quot;, name = &quot;camera-view&quot;, version.ref = &quot;cameraView&quot; }</pre><p>And in app/build.gradle.kts:</p><pre>dependencies {<br>    implementation(libs.smartspectra)<br>    implementation(libs.androidx.camera.view)<br>}</pre><p><strong>Two version tips that saved me time:</strong></p><ul><li>SmartSpectra needs <strong>compileSdk 36.1 or higher</strong>. I used compileSdk 37.</li><li>Set minSdk = 28.</li></ul><h3>Step 2: Keep your API key secret</h3><p>Never paste your API key straight into your code. If you push it to GitHub, anyone can use it.</p><p>Instead, put it in local.properties in the project root. This file is git-ignored by default:</p><pre>PRESAGE_API_KEY=your_key_here</pre><p>Then read it in app/build.gradle.kts and expose it through BuildConfig:</p><pre>import java.util.Properties<br>val localProps = Properties().apply {<br>    val f = rootProject.file(&quot;local.properties&quot;)<br>    if (f.exists()) f.inputStream().use { load(it) }<br>}<br>val presageApiKey: String = localProps.getProperty(&quot;PRESAGE_API_KEY&quot;, &quot;&quot;)<br>android {<br>    defaultConfig {<br>        buildConfigField(&quot;String&quot;, &quot;PRESAGE_API_KEY&quot;, &quot;\&quot;$presageApiKey\&quot;&quot;)<br>    }<br>    buildFeatures {<br>        buildConfig = true<br>    }<br>}</pre><p>Now your code can use BuildConfig.PRESAGE_API_KEY, and the key itself never gets committed.</p><h3>Step 3: Add permissions to the manifest</h3><pre>&lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;<br>&lt;uses-feature android:name=&quot;android.hardware.camera.front&quot; android:required=&quot;true&quot; /&gt;</pre><p>Why internet? The SDK uses it to <strong>check your API key and download its models</strong>. The camera frames themselves are processed on the phone.</p><p>Camera is a <em>runtime</em> permission, so you also have to ask the user for it in code (Step 6).</p><h3>Step 4: Keep all SDK code in one class</h3><p>My best beginner tip: <strong>put every SDK call in one file.</strong> In Pause Pal that file is PresageSession.kt. The rest of the app never talks to the SDK directly. It only gets simple callbacks like &quot;new pulse value: 72&quot;.</p><p>This makes your code easier to read, easier to debug, and easy to swap out later.</p><pre>class PresageSession(private val listener: Listener) {<br>interface Listener {<br>        fun onStatus(status: Status)<br>        fun onValidation(code: String?, hint: String)<br>        fun onError(message: String)<br>        fun onPulse(bpm: Float)<br>        fun onBreathing(perMinute: Float)<br>        fun onHrv(rmssdMs: Double)<br>        fun onTraces(chest: List&lt;Float&gt;, belly: List&lt;Float&gt;)<br>    }<br>    enum class Status { Idle, Starting, Measuring, Stopping, Error }<br>    var running = false<br>        private set<br>    private fun sdkOrNull(): SmartSpectraSdk? =<br>        runCatching { SmartSpectraSdk.shared }.getOrNull()<br>    // start(), stop(), bind() and onMetrics() come next...<br>}</pre><p>SmartSpectraSdk.shared is the single SDK instance. It sets itself up automatically when your app starts, so you don&#39;t need to initialise it.</p><h3>Step 5: Start and stop the camera</h3><h4>Starting</h4><p>To start measuring, you tell the SDK three things in its config:</p><ol><li><strong>Your API key</strong></li><li><strong>Which metrics you want</strong> (breathing, cardio, and so on)</li><li><strong>Where to show the camera preview</strong> (optional)</li></ol><p>Then choose the front camera and call start():</p><pre>suspend fun start(surfaceProvider: Preview.SurfaceProvider) {<br>    val apiKey = BuildConfig.PRESAGE_API_KEY<br>    if (apiKey.isBlank()) {<br>        listener.onError(&quot;No API key. Add PRESAGE_API_KEY to local.properties and rebuild.&quot;)<br>        return<br>    }<br>    val sdk = sdkOrNull() ?: return<br>running = true<br>    listener.onStatus(Status.Starting)<br>    sdk.config.apply {<br>        this.apiKey = apiKey<br>        imageOutputEnabled = false          // we don&#39;t need the raw camera images<br>        enableTelemetry = false             // no diagnostics unless the user opts in<br>        previewSurfaceProvider = surfaceProvider<br>        requestedMetrics = SmartSpectraConfig.breathingMetrics + SmartSpectraConfig.cardioMetrics<br>    }<br>    sdk.useCamera(CameraSelection.Front)<br>    try {<br>        sdk.start()<br>    } catch (t: Throwable) {<br>        listener.onError(t.message ?: &quot;Could not start the camera session.&quot;)<br>        listener.onStatus(Status.Error)<br>    }<br>}</pre><p>Notice that start() is a <strong>suspend</strong> function, so you call it from a coroutine (for example lifecycleScope.launch { ... }).</p><p>SmartSpectraConfig.breathingMetrics and SmartSpectraConfig.cardioMetrics are ready-made lists, so you don&#39;t have to name every metric yourself. If you want facial expressions too, add MetricType.EXPRESSIONS to the list.</p><h4>Stopping</h4><pre>suspend fun stop() {<br>    if (!running) return<br>    running = false<br>    val sdk = sdkOrNull() ?: return<br>    runCatching { sdk.stop() }<br>    sdk.config.previewSurfaceProvider = null<br>}</pre><p><strong>Always stop the SDK when your screen goes away.</strong> In Pause Pal I call stop() from the Activity&#39;s onPause(), so the camera never keeps running in the background. Your users will thank you, and so will their battery.</p><h3>Step 6: Ask for camera permission</h3><p>Before calling start(), check that the user has granted camera permission:</p><pre>private val cameraPermission =<br>    registerForActivityResult(ActivityResultContracts.RequestPermission()) { granted -&gt;<br>        if (granted) beginSession() else showPermissionMessage()<br>    }<br>private fun startSessionWithPermission() {<br>    val granted = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) ==<br>        PackageManager.PERMISSION_GRANTED<br>    if (granted) beginSession() else cameraPermission.launch(Manifest.permission.CAMERA)<br>}</pre><p>In Pause Pal there is also an in-app <strong>consent screen</strong> before this. The user ticks “I agree to use my camera for this session” and only then can the camera start. For an app that looks at people’s faces, being clear and upfront matters a lot.</p><h3>Step 7: Show the camera preview (optional)</h3><p>The SDK can draw the camera feed into a CameraX PreviewView. Create one in your Activity:</p><pre>previewView = PreviewView(this).apply {<br>    implementationMode = PreviewView.ImplementationMode.COMPATIBLE<br>    scaleType = PreviewView.ScaleType.FILL_CENTER<br>}</pre><p>and pass previewView.surfaceProvider to start(). In Compose you can place it on screen with AndroidView(factory = { previewView }).</p><p>A small preview helps users see whether their face and chest are in frame.</p><h3>Step 8: Listen for results</h3><p>The SDK gives you its results as <strong>LiveData</strong>, so you just observe it. I do this once in the Activity’s onCreate():</p><pre>fun bind(owner: LifecycleOwner) {<br>    val sdk = sdkOrNull() ?: return<br>// 1. Is the SDK starting, running or failing?<br>    sdk.processingStatus.observe(owner) { s -&gt;<br>        if (!running || s == null) return@observe<br>        listener.onStatus(<br>            when (s) {<br>                ProcessingStatus.IDLE, ProcessingStatus.STARTING -&gt; Status.Starting<br>                ProcessingStatus.RUNNING -&gt; Status.Measuring<br>                ProcessingStatus.STOPPING -&gt; Status.Stopping<br>                ProcessingStatus.ERROR -&gt; Status.Error<br>            }<br>        )<br>    }<br>    // 2. Is the user positioned well? (e.g. &quot;Keep your upper chest in view&quot;)<br>    sdk.validationStatus.observe(owner) { v -&gt;<br>        if (!running) return@observe<br>        if (v == null || v.code == ValidationCode.OK) listener.onValidation(null, &quot;&quot;)<br>        else listener.onValidation(v.code.name, v.hint)<br>    }<br>    // 3. Did something go wrong?<br>    sdk.error.observe(owner) { e -&gt;<br>        if (!running || e == null) return@observe<br>        listener.onError(e.message.ifBlank { e.code.name })<br>    }<br>    // 4. The actual readings<br>    sdk.metrics.observe(owner) { m -&gt;<br>        if (running &amp;&amp; m != null) onMetrics(m)<br>    }<br>}</pre><p>There are four streams:</p><ul><li><strong>processingStatus</strong>: starting, running, stopping or error. I show this as a status chip (“Starting” / “Measuring”).</li><li><strong>validationStatus</strong>: whether the user is positioned well, plus a hint. I show friendly tips like “Keep your upper chest in view”.</li><li><strong>error</strong>: what went wrong. I show an error message.</li><li><strong>metrics</strong>: the readings themselves. I show pulse, breathing, HRV and live waves.</li></ul><p>The <strong>validation hints</strong> are a big help for beginners and users alike. Instead of silently showing nothing, you can tell people exactly how to fix their setup.</p><h3>Step 9: Read the metrics</h3><p>Each metrics update is an object with sections like cardio and breathing. Each section holds lists of timestamped values:</p><ul><li><strong>Pulse</strong>: metrics.cardio.pulseRateList (beats per minute)</li><li><strong>HRV</strong>: metrics.cardio.hrvList[].rmssd (milliseconds)</li><li><strong>Breathing rate</strong>: metrics.breathing.rateList (breaths per minute)</li><li><strong>Chest movement</strong>: metrics.breathing.upperTraceList (wave samples)</li><li><strong>Belly movement</strong>: metrics.breathing.lowerTraceList (wave samples)</li></ul><p><strong>The gotcha I hit:</strong> these lists are <strong>sometimes empty</strong> between updates, and they can contain values you’ve already seen. If you just grab “the last item”, your UI will flicker between a number and nothing.</p><p>The fix: remember the timestamp of the last value you used, and only accept a <strong>newer</strong> one.</p><pre>private var lastPulseTs = Long.MIN_VALUE<br>private var lastBreathTs = Long.MIN_VALUE<br><br>private fun onMetrics(m: MetricsProto.Metrics) {<br>    if (m.hasCardio()) {<br>        m.cardio.pulseRateList<br>            .filter { it.timestamp &gt; lastPulseTs &amp;&amp; it.value &gt; 0f }<br>            .maxByOrNull { it.timestamp }<br>            ?.let {<br>                lastPulseTs = it.timestamp<br>                listener.onPulse(it.value)<br>            }<br>    }<br><br>    if (m.hasBreathing()) {<br>        m.breathing.rateList<br>            .filter { it.timestamp &gt; lastBreathTs &amp;&amp; it.value &gt; 0f }<br>            .maxByOrNull { it.timestamp }<br>            ?.let {<br>                lastBreathTs = it.timestamp<br>                listener.onBreathing(it.value)<br>            }<br>    }<br>}</pre><p>When nothing new arrives, the UI simply keeps showing the last good value. No flicker, no nulls.</p><p>For the <strong>chest and belly waves</strong>, I collect every new trace sample into a small buffer (the last 300 values) and draw them as a line chart. Watching the wave rise and fall as you breathe is the moment where users go “oh wow, it really works.”</p><h3>How long until numbers appear?</h3><p>Be patient on the first run. Roughly:</p><ul><li><strong>Breathing:</strong> first value after about 10 seconds, reliable after about 30 seconds</li><li><strong>Pulse:</strong> about 12 seconds (it’s an average)</li><li><strong>HRV:</strong> about 60 seconds</li></ul><p>Tell your users this in the UI, so they don’t think the app is broken.</p><h3>Step 10: Do something useful with the numbers</h3><p>Raw numbers are nice, but the fun is in what you build on top. In Pause Pal:</p><ol><li>For the first ~30 seconds, the app just lets the signal settle.</li><li>Then it learns <strong>your own breathing baseline</strong> (the average over the next 30 to 60 seconds).</li><li>If your breathing stays <strong>25% and 3 breaths/min above your baseline for two readings in a row</strong>, it gently suggests a break.</li></ol><p>I put this logic in a separate, pure-Kotlin class (BreakCoach.kt) with no Android code in it, so it&#39;s easy to unit test.</p><p>Comparing people to <strong>their own</strong> baseline, instead of a “normal” range, keeps the app friendly and avoids anything that sounds like a medical judgement.</p><h3>Privacy: build it in from day one</h3><p>When your app looks at faces and reads heart rate, privacy isn’t optional. Here’s what I did, and what I’d recommend:</p><ul><li><strong>Ask first.</strong> A clear consent screen before the camera ever turns on.</li><li><strong>Show it.</strong> A visible “Camera active” badge whenever the SDK is running.</li><li><strong>Stop it.</strong> Call stop() in onPause() so the camera never runs in the background.</li><li><strong>Don’t take images.</strong> Set imageOutputEnabled = false, so your app never even receives camera frames.</li><li><strong>Turn telemetry off.</strong> In SDK 3.4.0, enableTelemetry defaults to true. I set it to false as soon as the app launches and only turn it on if the user opts in.</li><li><strong>Don’t save vitals.</strong> Keep readings in memory (a ViewModel). No files, no database, and never log heart rate or breathing values to Logcat.</li></ul><h3>Tips for good readings</h3><p>If your numbers look strange, it’s usually the setup, not your code:</p><ul><li><strong>Prop the phone up.</strong> A handheld phone shakes too much for breathing.</li><li><strong>Use soft, even light</strong> on your face. Avoid a bright window behind you.</li><li><strong>Keep your face and upper chest in view</strong> of the front camera.</li><li><strong>Sit still and don’t talk</strong> while breathing settles.</li><li><strong>Test on a real phone.</strong> The emulator won’t work.</li></ul><h3>Common problems and fixes</h3><ul><li><strong>Error right away, camera never starts.</strong> Likely cause: Missing or wrong API key. Fix: Check local.properties, then rebuild.</li><li><strong>Build fails on the SDK.</strong> Likely cause: compileSdk too low. Fix: Use compileSdk 36.1 or higher.</li><li><strong>Nothing happens on the emulator.</strong> Likely cause: No real face or signal. Fix: Use a physical phone.</li><li><strong>Numbers flicker or disappear.</strong> Likely cause: Using the last list item directly. Fix: Only accept newer timestamps (Step 9).</li><li><strong>Breathing never shows.</strong> Likely cause: Phone moving, or chest not in view. Fix: Prop the phone up and step back a little.</li><li><strong>Camera keeps running after leaving the app.</strong> Likely cause: stop() not called. Fix: Call it from onPause().</li></ul><h3>Wrapping up</h3><p>Here’s the whole integration in one list:</p><ol><li>Add com.presagetech:smartspectra from Maven Central.</li><li>Store your API key in local.properties and read it via BuildConfig.</li><li>Add camera and internet permissions, and ask for camera permission at runtime.</li><li>Wrap the SDK in one class.</li><li>Set the config (API key, metrics, preview), choose the front camera and call start().</li><li>Observe processingStatus, validationStatus, error and metrics.</li><li>Only use readings with newer timestamps.</li><li>Call stop() when the user leaves.</li></ol><p>That’s it. With around 200 lines of SDK code you can turn a phone’s front camera into a gentle, private wellness sensor. I’d love to see what you build with it.</p><p><strong>Links</strong></p><ul><li>🎥 Demo video: <a href="https://youtu.be/KMcwpqxhjek">https://youtu.be/KMcwpqxhjek</a></li><li>📝 DEV post: <a href="https://dev.to/vrushali_dev_15/pausepal-a-privacy-first-break-buddy-built-with-presage-smartspectra-5ejl">https://dev.to/vrushali_dev_15/pausepal-a-privacy-first-break-buddy-built-with-presage-smartspectra-5ejl</a></li><li>💻 Source code: <a href="https://github.com/vrush1588/pausepal-smartspectra">https://github.com/vrush1588/pausepal-smartspectra</a></li><li>🔑 Presage API key: <a href="https://physiology.presagetech.com/">https://physiology.presagetech.com</a></li></ul><p><em>Pause Pal is a wellness and study-habit tool. It does not diagnose, treat or monitor any medical condition.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a46853b24b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Play DEX Optimization Mandatory (Feb 2027): Make Your App Smaller, Faster and Safer]]></title>
            <link>https://medium.com/@vrushalidev/google-play-dex-optimization-mandatory-feb-2027-make-your-app-smaller-faster-and-safer-22e7303989c2?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/22e7303989c2</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[obfuscation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[google-play-store]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 12:21:24 GMT</pubDate>
            <atom:updated>2026-10-30T12:21:24.464Z</atom:updated>
            <content:encoded><![CDATA[<p>From February 2027, if your Android app is large, Google Play makes it mandatory to run a “code clean-up tool” on it before you upload. This post explains what that means in plain words.</p><h3>The idea in one minute</h3><p>Think of your app as a suitcase you pack for a trip. Before you leave, you can do three things:</p><ol><li><strong>Take out what you will not use.</strong> You packed 100 items but only need 40, so 60 stay at home. That is <em>shrinking</em>.</li><li><strong>Pack the rest more neatly,</strong> so it takes less space and is quicker to use. That is <em>optimization</em>.</li><li><strong>Replace long labels with short codes</strong> (like a, b, c). That is <em>obfuscation</em>.</li></ol><p>In a real app, the 1,000 items are ready-made code from other people (called libraries). Your app often uses only a small part of them, but without shrinking, all of it gets packed in.</p><p>The trip is the same, but the suitcase is lighter, and nobody can easily read your labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4T_seNk4VuKtro5QRmO-QA.png" /><figcaption>DEX Code Optimization</figcaption></figure><h3>What all those words mean</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*yn2eQmLIHLuoBBhQSE-M9Q.png" /><figcaption>Simple meaning</figcaption></figure><h3>Why Google is making this required</h3><p>Google’s reason is simple: apps that are cleaned up this way load faster, use less memory, run smoother and freeze less often. That means happier users and fewer bad reviews for everyone on Play.</p><p>The tool has existed for years, but many apps never switched it on. Some project templates, such as the default Capacitor one, ship with it turned off. A rule with a deadline pushes everybody to turn it on.</p><h3>Does this apply to my app?</h3><p>Only if your app is big enough. Google checks the size of the DEX code:</p><ul><li><strong>Apps:</strong> more than 10 MB of DEX code</li><li><strong>Games:</strong> more than 50 MB of DEX code</li></ul><p>If you are above that, each of the three scores (shrinking, optimization, obfuscation) must be <strong>at least 25%</strong>. All three, not just one. This is mandatory: missing it can affect your app’s visibility and your ability to publish.</p><p>To see your scores, open Play Console and go to <strong>Test and release → App bundle explorer</strong>, then pick your latest release.</p><h3>How to fix it in three steps?</h3><p><strong>Step 1: Turn the tool on.</strong> In your app’s release build settings, switch on minify:</p><pre>release {<br>    isMinifyEnabled = true<br>    isShrinkResources = true<br>    proguardFiles(<br>        getDefaultProguardFile(&quot;proguard-android-optimize.txt&quot;),<br>        &quot;proguard-rules.pro&quot;<br>    )<br>}</pre><p>Using Capacitor, Expo, or another framework? The idea is the same: find the release build setting for minify or R8 and turn it on.</p><p><strong>Step 2: Test your release app.</strong> The tool sometimes removes or renames something your app needs, which can cause a crash. If that happens, add a keep rule for that part. Also upload the mapping file to Play Console so crash reports stay readable.</p><p><strong>Step 3: Check your scores again.</strong> Upload the new version and confirm all three are 25% or more.</p><h3>Common mistake</h3><p>Some projects have a line like -dontobfuscate or -dontoptimize in their rules file. That tells the tool to skip the very work Google is measuring, so remove it and use targeted keep rules instead.</p><h3>What happens if I ignore it?</h3><p>Google says not meeting a requirement can affect your app’s visibility and your ability to publish on Google Play. The exact February day has not been published, so it is safest to finish before the month starts.</p><h3>Google Play DEX Optimization Policy: Mandatory Scope</h3><p>After February 2027, failing to reach the 25% target can affect your app updates and your visibility in Play Console. But it is mandatory only for apps above the DEX size limits: <strong>10 MB for apps</strong> and <strong>50 MB for games</strong>. Smaller apps below these limits are exempt from enforcement.</p><h3>Quick checklist</h3><ul><li>Check your DEX size and scores in App bundle explorer</li><li>Turn on minify in your release build</li><li>Test the release version carefully</li><li>Add keep rules if something breaks</li><li>Confirm all three scores are at least 25%</li></ul><h3>Sources</h3><ul><li><a href="https://support.google.com/googleplay/android-developer/answer/17492799?hl=en">Play Console technical quality requirements</a></li><li><a href="https://capawesome.io/blog/google-play-dex-code-optimization-in-capacitor-apps/">Google Play DEX Code Optimization in Capacitor Apps, Capawesome</a></li><li><a href="https://capgo.app/blog/google-play-obfuscation-capacitor-android/">Fix Google Play Obfuscation Below 25% in Capacitor Apps, Capgo</a></li></ul><h4><strong>Thanks For Reading 🙂</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22e7303989c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A2UI Looks Great, But Should You Use It? Pros and Cons]]></title>
            <link>https://medium.com/@vrushalidev/a2ui-looks-great-but-should-you-use-it-pros-and-cons-940a78191822?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/940a78191822</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[a2ui]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 12:03:32 GMT</pubDate>
            <atom:updated>2026-10-29T12:03:32.346Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A2UI sounds complicated, but the idea is simple. Here it is in plain words, with the good parts and the worries.</em></p><h3>So, what is A2UI?</h3><p>A2UI lets an AI helper decide which screen to show, while your app stays in charge of how it looks.</p><p>Think of a restaurant. The AI is the customer, and your app is the kitchen. The customer can only order from the menu. They cannot walk into the kitchen and cook whatever they like. In A2UI, the menu is called a <strong>catalog</strong>. It is a list of the buttons, text boxes and cards your app is allowed to show.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*Th_l1q195afiUjfSH84TfA.png" /></figure><p>So when the AI wants to show a booking form, it does not write any code. It just sends a short message saying “show a form with a name box and a date picker.” Your app reads the message and builds the form using its own ready-made parts.</p><p>A2UI is made by Google. In September 2026, Google released the first Android versions of it. They are still in early testing (called “alpha”).</p><h3>Why it is a good idea</h3><p>It is a safer way to let AI build screens. Here are the three things I like most.</p><ul><li><strong>It is safe.</strong> The AI can only use parts from your menu. It cannot sneak in anything strange.</li><li><strong>It handles AI mistakes.</strong> AI sometimes makes things up. If it asks for a part that is not on your menu, A2UI catches it before it reaches the screen and tells the AI to try again.</li><li><strong>It looks like your app.</strong> The screens use your own colors, fonts and buttons, so users never feel they are looking at something foreign.</li></ul><p>It also fits well with Jetpack Compose, the modern way of building Android screens, so only the parts that change get redrawn.</p><h3>What worries me</h3><p>A2UI looks great, but I still have some questions. These are my own worries, not official statements from Google.</p><ul><li><strong>Cost.</strong> Every time the AI builds a screen, it uses “tokens”, and tokens cost money. A normal screen costs nothing to show, but an AI-made screen does.</li><li><strong>No internet.</strong> The AI usually needs the internet to work. What should the app show when the connection is gone? You need a backup plan.</li><li><strong>Different phones.</strong> Cheap phones and expensive phones behave differently. If you run the AI on the phone itself, results may not be equally good everywhere.</li><li><strong>Hard to fix bugs.</strong> If two users see two different screens, how does your support team find out what went wrong? Saving a copy of every message the AI sent can help.</li><li><strong>Still new.</strong> The tools are in early testing, and some names have already changed. Things may keep changing for a while.</li></ul><h3>Should you try it?</h3><p>Yes, but start small. A2UI is exciting, yet it is too new to build your whole app on.</p><ol><li><strong>Try it on one screen only,</strong> such as a simple form.</li><li><strong>Keep the rest of your app normal.</strong> Menus, login and settings stay as they are.</li><li><strong>Always have a backup screen</strong> for when the AI is slow or offline.</li><li><strong>Watch the cost</strong> for a few weeks before you decide to use it more.</li></ol><p>If you are learning Android, do not worry if A2UI feels advanced. Learn Jetpack Compose first. A2UI is built on top of it, and it will make much more sense afterwards.</p><h3>Sources</h3><ul><li><a href="https://developer.android.com/develop/ui/compose/agentic/render-surfaces">Render A2UI surfaces in your app (Android Developers)</a></li><li><a href="https://developer.android.com/jetpack/androidx/releases/a2ui?authuser=580">AndroidX A2UI release notes</a></li><li><a href="https://ecorpit.com/google-a2ui-android-jetpack-compose/">Google brings A2UI to AndroidX (Ecorpit)</a></li><li><a href="https://a2ui.org/roadmap/">A2UI roadmap</a></li></ul><p>Happy Coding 👩‍💻 Thanks For Reading 💖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=940a78191822" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Claude Desktop Folder Quietly Grew to 12 GB. Here’s How I Got 11.5 GB Back]]></title>
            <link>https://medium.com/@vrushalidev/my-claude-desktop-folder-quietly-grew-to-12-gb-heres-how-i-got-11-5-gb-back-6e5f052d6e67?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e5f052d6e67</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 13:56:22 GMT</pubDate>
            <atom:updated>2026-10-28T05:55:13.454Z</atom:updated>
            <content:encoded><![CDATA[<p>A short, safe cleanup guide for Windows users who run sandbox tasks</p><p>I use Claude Desktop almost every day, mostly for sandbox tasks: running scripts, building files and testing small ideas. It works so smoothly that I never once wondered what it was doing to my disk.</p><p>Then my C: drive started running low. I did the usual checks first: Downloads, old project folders, temp files. Nothing explained it. Finally I opened AppData\Roaming\Claude and found it had grown to about <strong>12 GB</strong>.</p><p>For a chat app, that felt wrong. So I looked closer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vyldsUO9an479CVqj3iTw.png" /></figure><h3>Where the space went</h3><p>Of those 12 GB, <strong>10.3 GB sat in one folder: </strong><strong>vm_bundles</strong>. It holds the Linux virtual machine Claude Desktop uses to run sandbox tasks. A normal app cache stays under 0.5 GB.</p><p>Here is the breakdown:</p><ul><li><strong>vm_bundles\claudevm.bundle (9.0 GB):</strong> the VM disk itself.<strong> A VM, or virtual machine, is a small Linux computer simulated inside a file on your disk</strong>. It contains rootfs.vhdx at 8.5 GB and sessiondata.vhdx at 0.5 GB. Safe to delete, and rebuilt on next use.</li><li><strong>vm_bundles\warm (1.3 GB): a compressed copy of a newer VM image</strong>. Safe to delete, and downloaded again when needed.</li><li><strong>Cache, </strong><strong>Code Cache, </strong><strong>GPUCache, </strong><strong>GrShaderCache (0.45 GB):</strong> <strong>ordinary app cache</strong>. These are saved copies of data, code and graphics instructions (the GPU and shader caches) that help the app load and draw faster. Safe to delete.</li><li><strong>claude-code and </strong><strong>claude-code-vm (0.8 GB):</strong> Claude Code program files. <strong>Leave these alone.</strong></li></ul><h3>Why it only grows</h3><p>The VM disk grows every time the sandbox installs packages or downloads files. When files are deleted inside the VM, Windows does not take that space back. The disk file stays at its largest size.</p><p>If you run sandbox tasks often, this will happen to you too. You did not cause a bug. Virtual disks simply behave this way.</p><h3>How to clean it up</h3><p><strong>Before you start:</strong> if you created files inside the sandbox that you still want, download them first. They are the only thing this cleanup removes for good.</p><p><strong>1. Quit Claude Desktop completely.</strong> Closing the window is not enough. Right-click the Claude icon in the system tray and choose <strong>Quit</strong>.</p><p><strong>2. Confirm nothing is still running.</strong> In PowerShell, run:</p><pre>Get-Process claude -ErrorAction SilentlyContinue | Where-Object Path -like &#39;*WindowsApps*&#39;</pre><p>No output means Claude Desktop is fully closed.</p><p>3. <strong>Preview what you are about to delete.</strong> This prints the size of each folder on the delete list. Nothing is removed yet:</p><pre>$c = &quot;$env:APPDATA\Claude&quot;<br>&quot;vm_bundles&quot;,&quot;Cache&quot;,&quot;Code Cache&quot;,&quot;GPUCache&quot;,&quot;GrShaderCache&quot; | ForEach-Object {<br>  $p = Join-Path $c $_<br>  if (Test-Path $p) {<br>    $gb = (Get-ChildItem $p -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum / 1GB<br>    &quot;{0,-14} {1:N2} GB&quot; -f $_, $gb<br>  } else {<br>    &quot;{0,-14} not found&quot; -f $_<br>  }<br>}</pre><p>If every folder says “not found”, there is nothing to delete. Claude Desktop recreates these folders only after you run a sandbox task.</p><p><strong>4. Delete the VM and cache folders</strong>.</p><p><strong>Stop and check first: this permanently deletes everything you created inside the sandbox.</strong></p><p>Deleted files do not go to the Recycle Bin. If you want anything you made in a sandbox task, save or download it before you run this.</p><pre>$c = &quot;$env:APPDATA\Claude&quot;<br>Remove-Item &quot;$c\vm_bundles&quot;, &quot;$c\Cache&quot;, &quot;$c\Code Cache&quot;, &quot;$c\GPUCache&quot;, &quot;$c\GrShaderCache&quot; -Recurse -Force</pre><p><strong>5. Start Claude Desktop again.</strong> The next time you run a sandbox task, it downloads about 1.3 GB and rebuilds the VM.</p><p>That freed about <strong>11.5 GB</strong> for me.</p><h3>What I was worried about, and what is safe</h3><p>Before deleting anything, I wanted to be sure I would not lose my work. This cleanup leaves your history and settings alone:</p><ul><li><strong>Claude Desktop chats:</strong> stored on your claude.ai account, so they are kept.</li><li><strong>Claude Code history:</strong> lives in C:\Users\&lt;you&gt;\.claude and is not touched.</li><li><strong>Local agent session records:</strong> the local-agent-mode-sessions folder is not in the delete list, so it is kept.</li><li><strong>Settings and login:</strong> claude_desktop_config.json and related files stay.</li><li><strong>Your own folders and downloads:</strong> untouched.</li><li><strong>The one thing you lose</strong> is anything you created inside the sandbox VM. If you want any of it, save or download it before you clean up.</li></ul><h3>A habit worth building</h3><p>I now check this folder every few months. If you run sandbox tasks regularly, do the same. This PowerShell one-liner prints the folder size in GB:</p><pre>&quot;{0:N1} GB&quot; -f ((Get-ChildItem &quot;$env:APPDATA\Claude&quot; -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum / 1GB)</pre><p>It takes about a minute, and it is far easier than hunting for a mystery 10 GB while your drive is almost full.</p><p>If this saved you some space, send it to a friend who also lives in Claude Desktop. Their C: drive may need the same fix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XaQDsYgr1eo-eMVcmn9skA.png" /></figure><p><strong>If you use Claude Desktop for sandbox tasks on Windows, this cleanup guide could save you some disk space.</strong></p><p><strong>Thanks For Reading 👩‍💻💖</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e5f052d6e67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Human Intelligence vs AI: ANI, AGI, and Generative AI Explained with Simple Examples]]></title>
            <link>https://medium.com/@vrushalidev/human-intelligence-vs-ai-ani-agi-and-generative-ai-explained-with-simple-examples-d287905a06d3?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/d287905a06d3</guid>
            <category><![CDATA[agi]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ian]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 17:36:05 GMT</pubDate>
            <atom:updated>2026-10-19T17:36:05.375Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wondered whether ChatGPT is intelligent like a human? Or whether AI could become smarter than us in the future?</p><p>You probably use AI every day without even realizing it!</p><p>When your phone recognizes your face, Google Maps suggests a route, or ChatGPT writes an email for you, you’re seeing AI in action.</p><p>But what exactly is AI? And what are ANI, AGI, and Generative AI?</p><p>Let’s understand these concepts with simple, real-life examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYAbNhQGmnDRohP73JhpTw.png" /></figure><h3>1. Human Intelligence: Intelligence That Comes from Us 🧠</h3><p>Human Intelligence (HI) is our ability to learn, think, understand situations, solve problems, and make decisions using our experiences.</p><p><strong>Real-life example:</strong></p><p><strong>Imagine your daughter is learning to ride a bicycle.</strong></p><p>At first, she struggles to maintain her balance. You help her practice, and she gradually learns from her mistakes.</p><p>After some time, she can ride without your help.</p><p>She learned through experience, practice, and feedback. That’s human intelligence.</p><p><strong>Another example: As a developer, you notice that users are</strong> struggling with your Android app. You talk to them, understand their problems, and decide how to improve the app.</p><p><strong>Human intelligence helps you understand not only what is happening but also why it matters to people.</strong></p><h3>2. Artificial Intelligence (AI): Making Machines Perform Intelligent Tasks 🤖</h3><p>Artificial Intelligence is a field of computer science that develops systems capable of performing tasks that typically require human intelligence.</p><p><strong>Real-life example:</strong></p><p><strong>Imagine your phone unlocks when it recognizes your face.</strong></p><p>You don’t need to enter your password every time. The system analyzes facial features and checks whether they match the enrolled face.</p><p>That’s an example of AI being used for face recognition.</p><p>Other everyday examples include:</p><ul><li>Google Maps suggesting a faster route.</li><li>Email apps detecting spam messages.</li><li>Voice assistants recognizing spoken commands.</li><li>Shopping apps recommending products.</li></ul><p><strong>AI can perform these tasks quickly, but it doesn’t necessarily think or understand the world the way a human does.</strong></p><h3>3. ANI: Artificial Narrow Intelligence</h3><p><strong>ANI stands for Artificial Narrow Intelligence.</strong></p><p>It’s AI designed for a specific task or a limited range of tasks.</p><p>Think of ANI as a specialist who is very good at a particular job.</p><p><strong>Real-life example 1: Spam detection</strong></p><p>Your email inbox receives 100 messages. An AI system identifies which messages are likely to be spam and moves them into the spam folder.</p><p>Its job is to detect unwanted messages. It doesn’t need to know how to build a mobile app or teach mathematics.</p><p><strong>Real-life example 2: Face recognition</strong></p><p>Your phone recognizes your face to unlock the screen. That system is designed for a particular purpose.</p><p><strong>Real-life example 3: Chess</strong></p><p>A chess engine can defeat some of the world’s best players. But being excellent at chess doesn’t automatically mean it can perform every other intellectual task.</p><p><strong>Remember:</strong> ANI can be extremely powerful at specific tasks without having general-purpose human-like intelligence.</p><h3>4. AGI: Artificial General Intelligence</h3><p><strong>AGI stands for Artificial General Intelligence.</strong></p><p>It refers to a proposed kind of AI that could learn and perform a broad range of intellectual tasks at a human-level capability or beyond.</p><p>Unlike a specialist, AGI would be able to adapt its intelligence to many different types of problems.</p><p><strong>Imagine this example:</strong></p><p><strong>You hire a new employee who has never worked in your company before.</strong></p><ul><li>First, they learn how your business works.</li><li>Then they learn to prepare reports, communicate with customers, solve technical problems, and take on unfamiliar tasks.</li><li>When a new problem appears, they can learn what is needed and adapt.</li></ul><p>Now imagine an AI system that can flexibly handle a similarly broad range of tasks.</p><p>That is the general idea behind AGI.</p><p>Researchers disagree on the exact definition of AGI, and there is no universally accepted confirmation that today’s AI has achieved it.</p><p><strong>Remember: AGI is about broad, general-purpose intelligence, not just performing one task very well.</strong></p><h3>5. Generative AI: AI That Creates Something New ✨</h3><p>Generative AI is a type of AI that can generate content such as text, images, music, audio, video, and computer code.</p><p>You may already be using it!</p><p><strong>Real-life example 1: Writing an email</strong></p><p>You type:</p><p>“Write a polite email asking my manager for leave tomorrow.”</p><p>An AI tool generates an email that you can review and send.</p><p><strong>Real-life example 2: Creating an image</strong></p><p>You type:</p><p>“Create an illustration of a cute robot learning to code.”</p><p>An image-generation tool creates an image based on your description.</p><p><strong>Real-life example 3: Learning programming</strong></p><p>You ask ChatGPT:</p><p>“Explain Kotlin’s Unit type with a simple example.&quot;</p><p>It generates an explanation and a code sample.</p><p><strong>Real-life example 4: Generating code</strong></p><p>You ask an AI coding assistant to create a login screen for an Android app.</p><p>It can generate Kotlin code to help you get started. You still need to review, test, and adapt the code.</p><p>Generative AI can save time, but its output isn’t always correct.</p><p><strong>Remember:</strong> Generative AI focuses on creating content. It can be powerful without necessarily possessing general human-level intelligence.</p><h3>6. Let’s Compare Everything with One Simple Example</h3><p><strong>Imagine you want to build an Android app for students.</strong></p><p>Here’s how each concept relates to the situation.</p><ul><li><strong>Human Intelligence : </strong>You understand students’ problems and decide what the app should do.</li><li><strong>AI : </strong>A system helps identify student needs or recognize information in uploaded documents.</li><li><strong>ANI (The Specialized Feature):</strong> The automated feedback classifier built into your app that sorts student bug reports into specific categories (UI, performance, or login issues). It excels at this particular task, but nothing else.</li><li><strong>AGI (The Hypothetical All-in-One Expert):</strong> A future, general-purpose system that could independently handle the entire app lifecycle — from conducting user research with students and designing database architecture to writing, testing, and deploying the final code.</li><li><strong>Generative AI (The Developer Assistant):</strong> The coding companion you use inside Android Studio to generate Kotlin boilerplate code for your student dashboard or draft layout constraints</li></ul><p><strong>Notice something important: these terms don’t all describe separate, competing technologies.</strong></p><p>AI is the broader field. ANI and AGI describe the scope of intelligence, while Generative AI describes systems that generate content. These categories can overlap.</p><p>For example, a Generative AI system can still be considered narrow AI.</p><h3>7. Will AI Become Smarter Than Humans?</h3><p>AI already outperforms humans at some specialized tasks, such as certain games and large-scale data-processing tasks.</p><p>But does that mean AI is smarter than humans in everything?</p><p>Not necessarily.</p><p>A calculator can multiply numbers faster than you, but that doesn’t make it better than you at every task.</p><p>Similarly, AI can generate code in seconds but may misunderstand a requirement or produce a bug that needs careful investigation.</p><p>Future AI may exceed human capabilities in many more areas. Whether it will surpass humans across all intellectual abilities remains uncertain.</p><h3>8. What Does This Mean for Developers?</h3><p>If you’re a software developer, AI can be your assistant rather than simply a competitor.</p><p>For example, you can use AI to:</p><ul><li>Generate Kotlin boilerplate code.</li><li>Explain unfamiliar programming concepts.</li><li>Suggest possible bug fixes.</li><li>Create test cases.</li><li>Draft technical documentation.</li></ul><p>But you still need to understand the requirements, verify the output, test the application, and make sound engineering decisions.</p><p>The goal isn’t just to write code faster. It’s to build useful, reliable software.</p><h3>Final Thoughts</h3><p>Let’s recap everything in five simple lines:</p><ul><li><strong>Human Intelligence:</strong> A person learns from experience and makes decisions.</li><li><strong>AI:</strong> Machines perform tasks associated with intelligence.</li><li><strong>ANI:</strong> AI specializes in specific tasks.</li><li><strong>AGI:</strong> A proposed AI with broad, general-purpose intelligence.</li><li><strong>Generative AI:</strong> AI generates content such as text, images, and code.</li></ul><p>You don’t need to be an AI expert to start learning these concepts. Begin with simple examples, experiment with AI tools, and keep asking questions.</p><h3><strong>Your turn: Which AI tool do you use most often, and what do you use it for? Share your experience in the comments!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d287905a06d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kotlin Higher-Order Functions Explained: Simple Examples and Interview Questions]]></title>
            <link>https://medium.com/@vrushalidev/kotlin-higher-order-functions-explained-with-simple-examples-interview-questions-6cb502d85813?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cb502d85813</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 05:24:07 GMT</pubDate>
            <atom:updated>2026-10-16T05:40:21.911Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Description:</strong> Confused about higher-order functions in Kotlin? 🤔 Learn this important Kotlin concept with beginner-friendly examples, real-life analogies, Android use cases, and frequently asked interview questions.</p><h3>🤔 What Is a Higher-Order Function in Kotlin?</h3><p>Imagine you are ordering food at a restaurant. You choose what you want, and the restaurant prepares your order based on your choice.</p><p>Similarly, in Kotlin, a function can receive another function as an input and execute it. A function can also return another function as its result.</p><p>This is called a <strong>Higher-Order Function</strong>.</p><blockquote><strong><em>In simple words:</em></strong><em> A higher-order function is a function that accepts another function as a parameter or returns a function as its result.</em></blockquote><p>Let’s understand it with code! 👇</p><h3>1. Your First Higher-Order Function</h3><p>Suppose we want to add two numbers.</p><pre>fun add(a: Int, b: Int): Int {<br>    return a + b<br>}</pre><p>This is a regular function. It accepts two integers and returns their sum.</p><p>But what if we want to perform different calculations depending on our needs?</p><p>Instead of creating a separate function for every operation, Kotlin allows us to pass the operation itself as a parameter.</p><p>That’s where higher-order functions become useful!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJYhNJlELPrE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FJYhNJlELPrE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJYhNJlELPrE%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a685a5f9fbf9bc739e9db0a9b831040c/href">https://medium.com/media/a685a5f9fbf9bc739e9db0a9b831040c/href</a></iframe><h3>2. A Simple Kotlin Example</h3><p>Let’s create a calculate() function that performs different calculations depending on the operation we pass to it.</p><pre>fun calculate(<br>    a: Int,<br>    b: Int,<br>    operation: (Int, Int) -&gt; Int<br>): Int {<br>    return operation(a, b)<br>}<br>fun main() {<br>    val remainder = calculate(10, 3) { a, b -&gt; a % b }<br>    val division = calculate(10, 5) { a, b -&gt; a / b }<br>    println(remainder)<br>    println(division)<br>}</pre><p><strong>Output:</strong></p><pre>1<br>2</pre><h3>🧠 Let’s Understand This Step by Step</h3><p><strong>Step 1: What does </strong><strong>operation mean?</strong></p><p>operation: (Int, Int) -&gt; Int</p><p>It means operation is a function that:</p><ul><li>Accepts two Int values.</li><li>Returns one Int value.</li></ul><p>Think of it as a rule that tells Kotlin what calculation to perform.</p><p><strong>Step 2: What is </strong><strong>{ a, b -&gt; a % b }?</strong></p><p>This is a lambda expression.</p><ul><li>a and b are input parameters.</li><li>-&gt; separates the parameters from the expression.</li><li>a % b calculates the remainder after division.</li></ul><p>For example, 10 % 3 returns 1 because 10 divided by 3 leaves a remainder of 1.</p><p><strong>Step 3: Why can we change the result?</strong></p><p>First, we pass a remainder operation:</p><pre>calculate(10, 3) { a, b -&gt; a % b }</pre><p>The result is 1.</p><p>Next, we pass a division operation:</p><pre>calculate(10, 5) { a, b -&gt; a / b }</pre><p>The result is 2.</p><p>The calculate() function stays the same. Only the function passed to it changes!</p><p>💡 <strong>Important:</strong> Because these examples use Int, Kotlin performs integer division. For example, 10 / 3 returns 3, not 3.33.</p><p><strong>Remember:</strong> One function can perform different tasks depending on the function you pass to it.</p><h3>3. A Real-Life Android Example 📱</h3><p>Imagine you are developing an Android app with a login button.</p><p>After the user logs in successfully, you want to perform another action, such as navigating to the home screen.</p><p>You can use a callback to represent that action.</p><pre>fun loginUser(onSuccess: () -&gt; Unit) {<br>    println(&quot;User logged in successfully!&quot;)<br>    onSuccess()<br>}<br>fun main() {<br>    loginUser {<br>        println(&quot;Navigate to Home Screen&quot;)<br>    }<br>}</pre><p><strong>Output:</strong></p><pre>User logged in successfully!<br>Navigate to Home Screen</pre><h3>What does onSuccess: () -&gt; Unit mean?</h3><ul><li>() means the function accepts no parameters.</li><li>-&gt; Unit means it returns no meaningful value.</li><li>onSuccess() executes the function passed by the caller.</li></ul><p>In a real Android application, you could use a callback to navigate to another screen after a successful login.</p><p><strong>Note:</strong> This is a simplified example. In a production app, call onSuccess() only after the actual login operation succeeds.</p><p>This pattern is commonly used with callbacks, click listeners, and asynchronous operations.</p><h3>4. Higher-Order Functions You Already Use in Kotlin</h3><p>You don’t always need to create your own higher-order functions. Kotlin’s standard library provides several that make everyday coding easier.</p><h3>Example 1: filter()</h3><p>Suppose you want to select only even numbers from a list.</p><pre>val numbers = listOf(1, 2, 3, 4, 5, 6)<br>val evenNumbers = numbers.filter {<br>    it % 2 == 0<br>}<br>println(evenNumbers)</pre><p><strong>Output:</strong></p><pre>[2, 4, 6]</pre><p><strong>Explanation:</strong> filter() accepts a function that checks each element. It keeps only the elements for which the condition returns true.</p><p>Here, it represents the current number being checked.</p><h3>Example 2: map()</h3><p>Suppose you want to double every number in a list.</p><pre>val numbers = listOf(1, 2, 3)<br>val doubled = numbers.map {<br>    it * 2<br>}<br>println(doubled)</pre><p><strong>Output:</strong></p><pre>[2, 4, 6]</pre><p><strong>Explanation:</strong> map() accepts a function that transforms each element and returns a new list containing the transformed values.</p><p>💡 <strong>Easy way to remember:</strong></p><ul><li>filter() → Select elements that match a condition.</li><li>map() → Transform each element into a new value.</li></ul><p>Both are higher-order functions because they accept a function as a parameter.</p><h3>5. Higher-Order Function vs. Normal Function</h3><p>A normal function performs its defined task. A higher-order function can accept another function or return one, allowing its behavior to be customized.</p><p>For example, the add() function in Section 1 always adds two numbers. In contrast, the calculate() function in Section 2 can perform different operations depending on the lambda passed to it.</p><p><strong>Key difference:</strong> A higher-order function works with other functions as values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPWKZ1EFsTtSvy1Txsd1gw.png" /></figure><h3>6. Frequently Asked Kotlin Interview Questions 🎯</h3><h3>Q1. What is a higher-order function in Kotlin?</h3><p><strong>Answer:</strong> A higher-order function is a function that accepts another function as a parameter or returns a function as its result.</p><p>Let’s understand both cases with simple examples! 👇</p><p><strong>1. Accepts another function as a parameter</strong></p><pre>fun performAction(action: () -&gt; Unit) {<br>    action()<br>}<br>fun main() {<br>    performAction {<br>        println(&quot;Hello Kotlin!&quot;)<br>    }<br>}</pre><p><strong>Output:</strong></p><pre>Hello Kotlin!</pre><p>Here, performAction() accepts a function as a parameter and executes it.</p><p><strong>2. Returns another function as its result</strong></p><pre>fun getMessage(): () -&gt; Unit {<br>    return {<br>        println(&quot;Hello Kotlin!&quot;)<br>    }<br>}<br>fun main() {<br>    val message = getMessage()<br>    message()<br>}</pre><p><strong>Output:</strong></p><pre>Hello Kotlin!</pre><p>Here, getMessage() returns a function instead of directly printing the message. We store that function in message and execute it by calling message().</p><p>💡 <strong>Easy way to remember:</strong></p><ul><li><strong>Accepts a function:</strong> You give a function to another function.</li><li><strong>Returns a function:</strong> A function gives you another function to use later.</li></ul><h3>Q2. What is a lambda expression?</h3><p><strong>Answer:</strong> A lambda expression is an anonymous function expression that can be passed around as a value.</p><p>Example:</p><pre>val greet = { name: String -&gt; &quot;Hello, $name!&quot; }</pre><pre>println(greet(&quot;Kotlin&quot;))</pre><p><strong>Output:</strong></p><pre>Hello, Kotlin!</pre><p>Here, the lambda accepts a name and returns a greeting.</p><h3>Q3. What does (Int, Int) -&gt; Int mean?</h3><p><strong>Answer:</strong> It represents a function type that accepts two Int values and returns an Int.</p><p>For example, this function type could represent an operation that adds, subtracts, or multiplies two integers.</p><h3>Q4. What is the difference between a lambda and a higher-order function?</h3><p><strong>Answer:</strong> A lambda is a function expression. A higher-order function is a function that accepts another function as a parameter or returns a function.</p><p>A lambda is often passed to a higher-order function to define the behavior that should be performed.</p><h3>Q5. What does () -&gt; Unit mean?</h3><p><strong>Answer:</strong> It represents a function that takes no arguments and returns Unit, meaning it does not provide a meaningful result.</p><p>Example:</p><pre>val sayHello: () -&gt; Unit = {<br>    println(&quot;Hello!&quot;)<br>}</pre><pre>sayHello()</pre><p><strong>Output:</strong></p><pre>Hello!</pre><h3>Q6. Are map() and filter() higher-order functions?</h3><p><strong>Answer:</strong> Yes. Both accept a function as a parameter.</p><ul><li>map() transforms each element.</li><li>filter() selects elements that satisfy a condition.</li></ul><h3>Q7. Why do Android developers use higher-order functions?</h3><p><strong>Answer:</strong> They help create reusable code, implement callbacks, handle user actions, transform collections, and make code more concise.</p><p>For example, a button click listener can receive a lambda that defines what should happen when the user taps the button.</p><h3>Q8. What is a trailing lambda in Kotlin?</h3><p><strong>Answer:</strong> When a function’s last parameter is a function, its lambda argument can be written outside the parentheses.</p><p>Example:</p><pre>loginUser {<br>    println(&quot;Navigate to Home Screen&quot;)<br>}</pre><p>Here, the lambda is written after the closing parenthesis. This syntax is called a <strong>trailing lambda</strong>.</p><h3>Q9. Can a higher-order function return another function?</h3><p><strong>Answer:</strong> Yes. A function can return another function by declaring a function type as its return type.</p><p>Example:</p><pre>fun getMultiplier(): (Int) -&gt; Int {<br>    return { number -&gt; number * 2 }<br>}<br>fun main() {<br>    val double = getMultiplier()<br>    println(double(5))<br>}</pre><p><strong>Output:</strong></p><pre>10</pre><p>Here, getMultiplier() returns a function that accepts an integer and doubles it.</p><h3>Q10. What are the benefits of higher-order functions?</h3><p><strong>Answer:</strong></p><ul><li><strong>Code reusability:</strong> Reuse a function with different behaviors.</li><li><strong>Less repetitive code:</strong> Avoid writing similar functions for every operation.</li><li><strong>Flexible behavior:</strong> Pass different functions depending on the requirement.</li><li><strong>Cleaner callbacks:</strong> Keep event-handling code concise.</li><li><strong>Easier collection processing:</strong> Use functions such as map() and filter().</li></ul><h3>7. Quick Interview Practice 💬</h3><p>Try answering this question before checking the solution.</p><p><strong>Question: What will be the output?</strong></p><pre>fun performAction(action: () -&gt; String): String {<br>    return action()<br>}</pre><pre>fun main() {<br>    val result = performAction {<br>        &quot;Kotlin is fun!&quot;<br>    }</pre><pre>    println(result)<br>}</pre><p>Think about the answer before revealing it! 🤔</p><p><strong>Answer:</strong></p><pre>Kotlin is fun!</pre><p><strong>Explanation:</strong></p><ul><li>action: () -&gt; String means the function accepts a lambda with no parameters that returns a String.</li><li>The lambda returns &quot;Kotlin is fun!&quot;.</li><li>action() executes the lambda and returns its result.</li><li>println(result) prints the returned string.</li></ul><p>💡 <strong>Remember:</strong> A higher-order function can accept different functions to customize its behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JdW9zxs-WmkfR1dc9kQBCg.png" /></figure><h3>🎉 Final Takeaway</h3><p>Higher-order functions might look complicated at first, but the idea is simple:</p><p><strong>A function can accept another function or return a function.</strong></p><p>As an Android developer, you can use higher-order functions to write reusable code, handle callbacks, respond to user actions, and process collections more effectively.</p><p>If you are preparing for Kotlin or Android developer interviews, start by understanding:</p><ul><li>Function types</li><li>Lambda expressions</li><li>Higher-order functions</li><li>Trailing lambdas</li><li>map() and filter()</li><li>Callbacks and function return types</li></ul><p>Practice these examples, experiment with your own lambdas, and you’ll be better prepared to explain higher-order functions with confidence.</p><p>Happy Kotlin coding! 💜</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cb502d85813" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is SerpApi, and why I built LearnBeacon on it]]></title>
            <link>https://medium.com/@vrushalidev/what-is-serpapi-and-why-i-built-learnbeacon-on-it-e1b93bf9ecd4?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1b93bf9ecd4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[serpapi]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 13:44:46 GMT</pubDate>
            <atom:updated>2026-10-06T13:44:46.274Z</atom:updated>
            <content:encoded><![CDATA[<p>Every year, lakhs of students in India pick an engineering college after MHT-CET or JEE. To decide, they piece together cutoffs, fees, college ratings, scholarship rules, prep books and job prospects from dozens of websites.</p><p>I built <strong>LearnBeacon</strong> to bring that research into one place, and SerpApi is what made it possible. This post explains what SerpApi is, why it’s useful, and how I used it.</p><h3>What is SerpApi?</h3><p>SerpApi is an API that gives you search engine results as clean JSON. You send a query, for example “engineering colleges in Pune”, and get back structured data: titles, links, ratings, prices, dates and more.</p><p><strong>SERP stands for <em>Search Engine Results Page</em>,</strong> the page you see after you search on Google. SerpApi does the hard part of getting that page for you: locations, languages, CAPTCHAs and parsing. It also covers much more than Google web search: Maps, News, YouTube, Jobs, Scholar, Play Books, Trends and many other engines.</p><h3>Why is it useful?</h3><ul><li><strong>Live, real-world data.</strong> Your app shows what the web says today, not a dataset that is months old.</li><li><strong>One API, many sources.</strong> Colleges from Maps, news, videos, jobs and research papers all come through the same simple request.</li><li><strong>No scraping to maintain.</strong> You don’t write or fix fragile scrapers when a website changes.</li><li><strong>A perfect fit for AI agents.</strong> A language model on its own can make up facts. Give it SerpApi as a tool, and it can search, read real results and cite a source for every fact.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9jdrIzKOc7XvEt8CzHquUA.png" /></figure><h3>How LearnBeacon uses SerpApi?</h3><p>LearnBeacon uses 8 SerpApi engines, each matched to something a student needs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*MHYFM7mgTBzkV869aEB3XQ.png" /><figcaption>SERP APIs</figcaption></figure><p>The best part is the <strong>AI research agent</strong>. A student can ask: <em>“I got 97 percentile in MHT-CET. Which Computer Engineering colleges in Pune can I target under ₹2 lakh a year, and which scholarships can I apply for?”</em> A Gemini agent picks its own SerpApi search tools, runs them in parallel, and answers with a comparison table, a source link for every fact, and next steps.</p><p>The agent’s web, maps, news and video searches run on SerpApi’s official <a href="https://serpapi.github.io/serpapi-search-tools-python/">serpapi-search-tools</a> Python library. The library doesn’t need an LLM: short lookups like “COEP Pune” skip the AI and use it for one quick search, with no AI cost.</p><h3>What I learned</h3><ul><li><strong>Not every question needs AI.</strong> A simple rule-based router sends only real research questions to the agent. That saves search credits and AI quota.</li><li><strong>Cache everything.</strong> Every SerpApi response is cached for 30 minutes, so repeat searches are instant and cost nothing.</li><li><strong>Plan for failure.</strong> If a search fails, the agent answers with the results it has. With no API key, every page still works on sample data.</li><li><strong>Sources build trust.</strong> Students act on this information, so every fact links back to where it came from.</li></ul><h3>See it in action</h3><p>Watch the 2-minute demo to see the AI agent research a real student question live:</p><ul><li><strong>Demo video:</strong> <a href="https://youtu.be/Mkzj8lA4yRc">youtu.be/Mkzj8lA4yRc</a></li><li><strong>GitHub repo:</strong> <a href="https://github.com/vrush1588/LearnBeacon">github.com/vrush1588/LearnBeacon</a></li></ul><p><strong>Want to build your own?</strong> <a href="https://serpapi.com/users/sign_up">Create a free account on SerpApi</a> and you get 250 search credits to start. That’s enough to run LearnBeacon and try every feature.</p><p>The code is open source and runs with a free SerpApi key. If you find it useful, please give the repo a star, try it yourself, or share it with a student who is choosing a college this year.</p><p><strong>Happy Coding 👩‍💻 Thanks For Reading💖</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1b93bf9ecd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Agents 101: Stop Memorizing Buzzwords, Start Understanding Relationships]]></title>
            <link>https://medium.com/codetodeploy/ai-agents-101-stop-memorizing-buzzwords-start-understanding-relationships-2af138ffadc3?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/2af138ffadc3</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 07:42:29 GMT</pubDate>
            <atom:updated>2026-09-26T07:42:29.605Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A beginner-friendly map of the AI agent vocabulary, grouped by the problems each concept solves.</em></p><p><strong>If you’ve spent any time reading about AI agents lately, you’ve probably felt it: agents, agentic workflows, tool calling, MCP, sub-agents, hooks, guardrails, context windows… The list of terms keeps growing, and many of them sound like they mean the same thing.</strong></p><p>Most explainers treat these as 25 separate definitions to memorize. That’s the wrong approach. These concepts overlap heavily, and they only make sense when you understand <strong>what problem each one solves</strong>.</p><p>So instead of a glossary, here are the concepts grouped by the questions they answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-xIgaG8u8a4W_a71d-hpQ.png" /><figcaption>Agent. Agentic workflow. Tool calling. MCP. Sub-agent. Hook. Guardrail. If these all sound like the same thing</figcaption></figure><blockquote><em>💥 </em><strong><em>Master AI &amp; Tech Skills</em></strong><br> 🎓 Get Up to 50% OFF Premium Courses<br> ⏰ Limited-Time Offer<br><a href="https://trk.udemy.com/zz4NBO"><em>👉 </em><strong><em>Enroll Now &amp; Start Learning</em></strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITogvtC6mF2BUF35Qsd9pg.png" /></figure><h3>1. Agent vs. Agentic Workflow: Who vs. How</h3><p>These two are related but not identical.</p><ul><li><strong>Agent</strong>: the AI system that can reason and take actions.</li><li><strong>Agentic workflow</strong>: the process the agent follows to complete a task.</li></ul><blockquote><strong><em>Agent = who does the work.</em></strong><em> </em><strong><em>Workflow = how the work gets done.</em></strong></blockquote><p>An agent without a workflow is just a capable model with no direction. A workflow without an agent is just a script.</p><h3>2. Tool Calling vs. API vs. MCP: The Biggest Source of Confusion</h3><p>If there’s one section to read carefully, it’s this one.</p><ul><li><strong>Tool calling</strong>: the AI <em>asks</em> to use a tool.</li><li><strong>API</strong>: a way for software to communicate with another service.</li><li><strong>MCP (Model Context Protocol)</strong>: a standardized protocol for connecting AI applications to tools and data.</li></ul><p>Here’s how they fit together:</p><pre>AI Agent<br>   │<br>   ├── Tool calling<br>   │       ↓<br>   │    API / Function<br>   │<br>   └── MCP<br>          ↓<br>      External tools/data</pre><blockquote><strong><em>Tool calling = the AI wants to do something.</em></strong><em> </em><strong><em>API = the mechanism software uses to talk to other software.</em></strong><em> </em><strong><em>MCP = a standard way to expose tools and data to AI.</em></strong></blockquote><p>Think of MCP as a universal adapter. Without it, every AI application needs its own custom integration for every tool. With it, a tool can be exposed once and used by many AI applications. On the MCP side, you’ll also hear about an <strong>MCP server</strong> (the thing that exposes tools and data) and an <strong>MCP client</strong> (the AI application that connects to it).</p><h3>3. Context vs. Context Window vs. Memory</h3><p>These three get blended together constantly, and they shouldn’t be.</p><ul><li><strong>Context</strong>: the information available to the model <em>right now</em>.</li><li><strong>Context window</strong>: how much information the model can process at once.</li><li><strong>Memory</strong>: information intentionally retained for later use.</li></ul><p>The easiest way to remember the difference:</p><blockquote><strong><em>Context = what’s on your desk.</em></strong><em> </em><strong><em>Context window = the size of your desk.</em></strong><em> </em><strong><em>Memory = your notebook.</em></strong></blockquote><p>A bigger desk lets you spread out more, but it doesn’t mean you’ll remember anything tomorrow. That’s what the notebook is for.</p><h3>4. Sub-agents vs. Delegation vs. Parallel Tasks</h3><p>Once a single agent isn’t enough, multi-agent ideas come in. These three terms describe different angles of the same setup.</p><ul><li><strong>Sub-agent</strong>: another specialized AI agent.</li><li><strong>Delegation</strong>: giving a task to another agent or process.</li><li><strong>Parallel tasks</strong>: multiple independent tasks running at the same time.</li></ul><pre>Main Agent<br>    │<br>    ├── delegates → Security sub-agent<br>    ├── delegates → Test sub-agent<br>    └── delegates → Documentation sub-agent<br>                         ↓<br>                    Run in parallel</pre><blockquote><strong><em>Sub-agent = who.</em></strong><em> </em><strong><em>Delegation = the act of assigning.</em></strong><em> </em><strong><em>Parallel = how the tasks execute.</em></strong></blockquote><h3>5. Planning vs. Workflow vs. Iteration</h3><p>Another trio that sounds like one thing:</p><ul><li><strong>Planning</strong>: deciding what steps to take.</li><li><strong>Workflow</strong>: the overall sequence or process.</li><li><strong>Iteration</strong>: repeating steps based on new results.</li></ul><pre>Workflow<br>   ↓<br>Plan<br>   ↓<br>Action<br>   ↓<br>Result<br>   ↓<br>Iteration<br>   ↓<br>Action again</pre><p>Good agents don’t just plan once and execute blindly. They act, look at the result, and adjust. That loop is what separates an agent from a simple automation.</p><h3>6. Commands vs. Hooks vs. Automation</h3><p>These three describe <em>how work gets triggered</em>.</p><ul><li><strong>Command</strong>: you explicitly ask the agent to perform a reusable action.</li><li><strong>Hook</strong>: an action automatically triggered by an event.</li><li><strong>Automation</strong>: the broader idea of making work happen without manual effort.</li></ul><pre>You type /review<br>      ↓<br>   Command</pre><pre>File saved<br>      ↓<br>    Hook</pre><pre>Tests automatically run<br>      ↓<br>  Automation</pre><p>The difference is who pulls the trigger. With a command, <strong>you</strong> do. With a hook, <strong>an event</strong> does. Automation is the umbrella over both.</p><h3>7. Guardrails vs. Human-in-the-Loop</h3><p>Both keep agents under control, but in different ways.</p><ul><li><strong>Guardrails</strong>: rules and constraints around what the agent can do.</li><li><strong>Human-in-the-loop</strong>: a person reviews or approves an action.</li></ul><pre>Agent<br>  ↓<br>Guardrail → &quot;Cannot modify production&quot;<br>  ↓<br>Human approval → &quot;Approve this deployment?&quot;</pre><p>Guardrails are automatic and always on. Human approval is deliberate and situational. Strong agent setups use both: guardrails for the things that should <em>never</em> happen, and human review for the things that <em>might</em> need a second opinion.</p><h3>Bonus: Two Concepts That Get Mixed Up in Coding Agents</h3><h3>Diff vs. Code Review</h3><p>These aren’t in the same category at all.</p><ul><li><strong>Diff</strong>: shows <em>what changed</em>.</li><li><strong>Code review</strong>: evaluates <em>whether the change is good, correct, and safe</em>.</li></ul><pre>Diff<br> ↓<br>What changed?</pre><pre>Code Review<br> ↓<br>Is the change okay?</pre><h3>Output vs. Artifact</h3><ul><li><strong>Output</strong>: anything the AI produces.</li><li><strong>Artifact</strong>: a persistent, useful output such as a file, document, or code project.</li></ul><p>“Artifact” is more of a product-specific term than a fundamental agent concept, so don’t worry about it until you’re using a tool that uses the word.</p><h3>The Big Picture: 7 Buckets</h3><p>Instead of 25 loosely connected terms, think in seven groups:</p><p><strong>🧠 Agent Basics</strong>: Agent, Agentic Workflow, Planning, Reasoning</p><p><strong>📚 Context &amp; Memory</strong>: Context, Context Window, Memory</p><p><strong>🔌 Tools &amp; Connections</strong>: Tool Calling, API, MCP, MCP Server, MCP Client</p><p><strong>💻 Coding Agents</strong>: Repository Awareness, Shell Access, Diff, Code Review</p><p><strong>🤖 Multi-Agent</strong>: Sub-agents, Delegation, Parallel Tasks</p><p><strong>⚙️ Automation</strong>: Commands, Hooks, Automation, Iteration, Feedback Loop</p><p><strong>🛡️ Control</strong>: Guardrails, Human-in-the-Loop</p><p>When you meet a new term, ask yourself: <em>which problem does this solve?</em> Nine times out of ten, it lands in one of these buckets, and suddenly it’s not a mystery anymore.</p><h3>Final Thoughts</h3><p>The AI agent world isn’t complicated because it has too many concepts. It feels complicated because those concepts are usually taught in isolation. Once you see that an agent <em>uses</em> tool calling, <em>runs</em> a workflow, <em>manages</em> context, <em>delegates</em> to sub-agents, and <em>stays safe</em> through guardrails, the vocabulary stops being a wall of buzzwords and becomes a map.</p><p>Don’t memorize the list. Learn the relationships.</p><p><em>If you found this useful, follow for more beginner-friendly breakdowns of AI concepts, and share it with someone who’s drowning in agent jargon.</em></p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9QTaaaxboQP_gKSLedW_w.png" /></figure><p>👉 Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></p><p>👉 Follow us: <a href="https://medium.com/codetodeploy"><strong>Medium</strong></a></p><p>👉 CodeToDeploy Tech Community is live on Discord — <a href="https://discord.gg/ZpwhHq6D"><strong>Join now!</strong></a></p><p><strong>Disclosure:</strong> This post includes affiliate and partnership links.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2af138ffadc3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codetodeploy/ai-agents-101-stop-memorizing-buzzwords-start-understanding-relationships-2af138ffadc3">AI Agents 101: Stop Memorizing Buzzwords, Start Understanding Relationships</a> was originally published in <a href="https://medium.com/codetodeploy">CodeToDeploy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android’s EyeDropper API: One Tiny Tool, One Huge Privacy Win]]></title>
            <link>https://medium.com/@vrushalidev/androids-eyedropper-api-one-tiny-tool-one-huge-privacy-win-a250c10542e6?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/a250c10542e6</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[eyedropperapi]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[android17]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 13:19:42 GMT</pubDate>
            <atom:updated>2026-08-31T13:19:42.096Z</atom:updated>
            <content:encoded><![CDATA[<h4>Meet ACTION_OPEN_EYE_DROPPER — the pixel-perfect API that gives your app exactly what it needs, and not one byte more.</h4><h3>The “just one color” problem</h3><p>Picture this: you’re building a color-palette app.</p><p>A user spots a gorgeous shade of blue in some other app — a photo, a website, a friend’s design — and they want to grab it. Not the app. Just the <em>color</em>.</p><p>The “obvious” way to build this?</p><p><strong><em>Capture the whole screen → hunt down the pixel → read its color.</em></strong></p><p>Sounds harmless. It isn’t.</p><p><strong>Your app doesn’t need the screen. It needs one pixel.</strong> Everything else is baggage — baggage that happens to include the user’s messages, photos, notifications, and who-knows-what-else sitting behind that color.</p><p>This is the exact gap Android’s 17 EyeDropper API was built to close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lMLATT8cSu6n5akLyhdhMg.png" /></figure><h3>Meet the API: ACTION_OPEN_EYE_DROPPER</h3><p>Instead of your app grabbing the screen itself, it hands the job to Android:</p><pre>Your App<br>   ↓<br>ACTION_OPEN_EYE_DROPPER<br>   ↓<br>Android&#39;s built-in EyeDropper<br>   ↓<br>User taps a pixel<br>   ↓<br>Android reads the color<br>   ↓<br>Your App gets the color — nothing else</pre><p>No custom UI to build. No screen-capture permissions to request. Android already owns this tool — you just borrow it.</p><h3>A quick look at the code</h3><p>Here’s roughly what calling it looks like in practice:</p><pre>val intent = Intent(Intent.ACTION_OPEN_EYE_DROPPER)<br>eyeDropperLauncher.launch(intent)</pre><pre>// Handle the result<br>val eyeDropperLauncher = registerForActivityResult(<br>    ActivityResultContracts.StartActivityForResult()<br>) { result -&gt;<br>    if (result.resultCode == Activity.RESULT_OK) {<br>        val color = result.data?.getIntExtra(Intent.EXTRA_COLOR, 0)<br>        // Use the picked color 🎨<br>    }<br>}</pre><p>That’s it. No screenshot logic, no pixel-scanning, no bitmap wrangling. You fire the intent, Android does the delicate part, and you get a clean result back.</p><h3>“Isn’t this just… a color picker?”</h3><p>Fair question. Visually, yes — the user just taps a pixel and picks a color.</p><p>But the real story isn’t <em>what</em> it does. It’s <em>who’s allowed to see the screen while it happens.</em></p><h3>🚫 The old way: screen capture</h3><pre>Your App<br>   ↓<br>Captures the ENTIRE screen<br>   ↓<br>Scans for the pixel<br>   ↓<br>Finally gets the color</pre><p>To fetch one hex code, your app would need a full snapshot of whatever was on screen:</p><pre>Messages 💬<br>Photos 🖼️<br>Notifications 🔔<br>Banking info 💳<br>Passwords 🔑<br>      ↓<br>All exposed... just to extract<br>      ↓<br>   #4285F4</pre><p>That’s like breaking into a house to borrow a book.</p><h3>✅ The way: EyeDropper API</h3><pre>Your App<br>    │<br>    │ &quot;Android, let the user pick a color for me&quot;<br>    ↓<br>Android handles the risky part<br>    ↓<br>User taps a pixel<br>    ↓<br>Your App receives ONLY the color</pre><p>The mic-drop line:</p><p><strong><em>Your app asks Android to pick the pixel — instead of asking Android to hand over the whole screen.</em></strong></p><blockquote>Smaller ask. Smaller risk. Same result.</blockquote><h3>A real example, start to finish</h3><p>You’re scrolling through a photo in another app and spot this:</p><p>🔵</p><p>You jump into your color app, tap <strong>“Pick Color,”</strong> and Android’s system EyeDropper appears — like a little magnifying glass following your finger.</p><p>You hover over the blue, tap once, done.</p><p>Your app receives:</p><pre>#4285F4</pre><p>You save it:</p><pre>&quot;My Blue&quot; → #4285F4</pre><p>Zero screenshots. Zero extra data. Your app got exactly what it asked for — nothing it didn’t.</p><h3>“But why not just use MediaProjection?”</h3><p>If you’ve built for Android before, you probably know MediaProjection — the API behind screen recording and screen sharing.</p><p>It’s powerful. It’s also <em>way too much gun for this job.</em></p><p>Think of it like this:</p><p><strong><em>MediaProjection:</em></strong><em> “Can I photograph your entire house? I just need to know your front door’s color.”</em></p><p><strong><em>EyeDropper API:</em></strong><em> “Just point at the door. I’ll read the color and leave.”</em></p><p>One requires trust at the scale of <em>everything</em>. The other requires trust at the scale of <em>one pixel.</em> When your use case is that narrow, your permission ask should be too.</p><h3>The mindset shift every developer should adopt</h3><p>Stop thinking of EyeDropper as “a lightweight screenshot hack.”</p><p>Start thinking of it as <strong>a system-mediated, purpose-built micro-permission.</strong></p><ul><li>❌ Your app says: <em>“Give me the screen, I’ll find what I need myself.”</em></li><li>✅ Your app says: <em>“I need one color. You handle the sensitive part.”</em></li></ul><p>That single reframing — asking for the <em>outcome</em> instead of the <em>access</em> — is the whole philosophy in one sentence.</p><h3>Where this actually shines</h3><p>Real apps that could put this to work today:</p><ul><li>🎨 Color palette &amp; swatch generators</li><li>🖌️ Drawing and painting apps</li><li>🖥️ Design and prototyping tools</li><li>🖼️ Photo editors</li><li>👗 Outfit or theme color-matchers</li><li>🌈 Accessibility &amp; contrast-checking tools</li><li>📱 Personalization / theming apps</li></ul><p>Basically: anywhere a user wants to say <em>“use that exact color”</em> while literally pointing at their screen.</p><h3>The bigger idea hiding inside a tiny feature</h3><p>Here’s the part worth remembering long after you forget the API name.</p><p>Android is quietly shifting <em>how permissions work</em>: instead of handing apps broad access and hoping they behave responsibly, the platform builds <strong>narrow, single-purpose APIs</strong> that do the sensitive work internally and return only the answer.</p><p><strong>Old pattern:</strong></p><pre>Broad access granted<br>     ↓<br>App processes everything itself<br>     ↓<br>Trust the developer to behave</pre><p><strong>New pattern:</strong></p><pre>User expresses intent<br>     ↓<br>System performs the sensitive operation<br>     ↓<br>App receives only the specific result</pre><p>That second pattern scales. It’s safer for users, and honestly, it’s <em>less work</em> for developers too — you’re not the one holding the risk anymore.</p><h3>Final takeaway</h3><p>The EyeDropper API looks like a nice little convenience. Don’t let that fool you.</p><p><strong><em>If your app needs one piece of information, don’t hand it the keys to everything required to calculate that information. Let the system do the risky part — and give your app only the answer.</em></strong></p><p>That’s the real story hiding behind three unassuming words:</p><pre>ACTION_OPEN_EYE_DROPPER</pre><p><strong>A color picker on the surface. A privacy upgrade underneath.</strong> 🎯</p><p><a href="https://android-developers.googleblog.com/2026/02/the-second-beta-of-android-17.html">https://android-developers.googleblog.com/2026/02/the-second-beta-of-android-17.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a250c10542e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brute Force: The Simplest Algorithm You’re Probably Already Using]]></title>
            <link>https://medium.com/@vrushalidev/brute-force-the-simplest-algorithm-youre-probably-already-using-d3e783e5c769?source=rss-4a236a38a7ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3e783e5c769</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[sad]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[leetcode-easy]]></category>
            <dc:creator><![CDATA[Vrushali]]></dc:creator>
            <pubDate>Wed, 12 Aug 2026 14:27:33 GMT</pubDate>
            <atom:updated>2026-08-12T14:27:33.667Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever written code that works… but when someone asks “what algorithm is this?”, you freeze?</p><p>The tests pass. The output is correct. But you can’t name what you just did.</p><p>That’s totally normal, especially when you’re new to Data Structures and Algorithms (DSA). And it usually means you’ve written a <strong>Brute Force</strong> solution without knowing it had a name.</p><p>Let’s fix that today, in the simplest way possible.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQIiPaCEQ5TY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FQIiPaCEQ5TY%3Ffeature%3Dshare&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQIiPaCEQ5TY%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b888d4dda0fc39943e59229cbf9bf85b/href">https://medium.com/media/b888d4dda0fc39943e59229cbf9bf85b/href</a></iframe><h3>What Is Brute Force? (In Plain English)</h3><p>Imagine you lost your keys somewhere in your house. You don’t have a clever plan — you just check every room, one by one, until you find them.</p><p>That’s brute force.</p><p><strong>Brute force means: try every possible option until you find the one that works.</strong></p><p>There’s no trick, no shortcut, no clever idea. You just check everything, carefully and patiently, until you get the answer.</p><p>It sounds basic — and it is! But it’s one of the most important ideas in programming, because almost every optimized solution starts as a brute force solution first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_adJ1J0hE5_eK_R_Wf9jJw.png" /><figcaption>Brute Force Algorithm DSA</figcaption></figure><h3>Let’s Learn It With a Real Example: Two Sum</h3><p>This is one of the most famous beginner coding problems, so it’s a perfect place to start.</p><p><strong>The problem:</strong> You’re given a list of numbers. You need to find <em>two</em> numbers in that list that add up to a target number.</p><pre>nums = [2, 7, 11, 15]<br>target = 17</pre><p>We need to find two numbers from this list that add up to 17.</p><h3>The Brute Force Way of Thinking</h3><p>If you didn’t know any fancy tricks, how would you solve this by hand?</p><p>You’d probably do this:</p><ol><li>Pick the first number.</li><li>Add it to every other number in the list, one at a time.</li><li>Check: does it equal 17? If yes, you found it. If no, move to the next pair.</li><li>If the first number doesn’t work with anyone, move to the second number and repeat.</li></ol><p>That’s it. That’s the whole idea. Now let’s turn that into code.</p><pre>for (int i = 0; i &lt; nums.length; i++) {<br>    for (int j = i + 1; j &lt; nums.length; j++) {<br>        if (nums[i] + nums[j] == target) {<br>            return new int[]{i, j};<br>        }<br>    }<br>}</pre><p>Don’t worry if this looks intimidating — we’ll break it down piece by piece below.</p><h3>Tracing Through It by Hand</h3><p>Let’s manually check every pair, just like the code does:</p><pre>2 + 7   → 9   ❌ (not 17)<br>2 + 11  → 13  ❌ (not 17)<br>2 + 15  → 17  ✅ (found it!)</pre><p>We found our answer: the numbers 2 and 15.</p><p>That’s brute force in action — no shortcuts, just checking pair by pair until something matches.</p><h3>Why Are There Two Loops? (This Confuses a Lot of Beginners)</h3><p>Let’s slow down here, because this is the part that trips people up the most.</p><p><strong>A single loop lets you look at one number at a time.</strong></p><pre>nums[i]</pre><p>This is like pointing at one item in the list and saying “this one.”</p><p>But the Two Sum problem needs you to compare <strong>two</strong> numbers, not just look at one. So you need a way to point at a <em>second</em> number too.</p><pre>nums[i] + nums[j]</pre><p>That’s why we need a <strong>second loop</strong> — it lets us pick a partner for nums[i] and check every possible combination.</p><p>Think of it like this:</p><ul><li>The <strong>outer loop</strong> picks the first number.</li><li>The <strong>inner loop</strong> tries every remaining number as the second number.</li></ul><p>Here’s what that looks like step-by-step:</p><pre>i = 0<br>    j = 1   (compare index 0 and 1)<br>    j = 2   (compare index 0 and 2)<br>    j = 3   (compare index 0 and 3)</pre><pre>i = 1<br>    j = 2   (compare index 1 and 2)<br>    j = 3   (compare index 1 and 3)</pre><pre>i = 2<br>    j = 3   (compare index 2 and 3)</pre><p>Every single possible pair gets checked. Nothing is skipped. That’s exactly what “brute force” means.</p><h3>Why Do We Call This “O(n²)”? (Don’t Worry, It’s Simpler Than It Sounds)</h3><p>You’ll hear the term <strong>Big O notation</strong> a lot in DSA. All it really means is: <em>“How much slower does this get as the list grows bigger?”</em></p><p>Here’s the simple logic:</p><ul><li>The outer loop runs roughly n times (where n is the number of items in the list).</li><li>For <em>each</em> of those times, the inner loop <em>also</em> runs roughly n times.</li></ul><p>So the total number of checks is roughly:</p><pre>n × n = n²</pre><p>That’s why we say this solution has a time complexity of <strong>O(n²)</strong>.</p><p>A simple rule to remember:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*CRWdwUbuygikKAKKHqZfkA.png" /></figure><p>The more nested loops you have, the slower your code becomes as the input grows. This is one of the first “red flags” experienced programmers look for.</p><h3>What About Memory? (Space Complexity)</h3><p>So far we’ve only talked about <strong>time</strong> — how many steps our code takes. But there’s a second question worth asking:</p><blockquote><strong><em>“How much extra memory does my solution need?”</em></strong></blockquote><p>This is called <strong>space complexity</strong>, and it’s just as important as time complexity.</p><p>For our brute force Two Sum solution, the answer is simple: we’re not storing anything extra. We’re just comparing numbers directly using our two loops. No extra list, no extra storage — just the original array.</p><p>That means our brute force solution has a space complexity of <strong>O(1)</strong>, which means “constant space.” No matter how big the input list gets, we don’t need any additional memory to solve it.</p><p>This is actually one of brute force’s quiet advantages: <strong>it’s usually very memory-friendly</strong>, because it doesn’t need to remember anything — it just checks everything as it goes.</p><h3>The Trade-Off: Time vs. Memory</h3><p>Now, remember the faster HashMap approach we mentioned — the one that brings time complexity down from O(n²) to O(n)?</p><p>Here’s the catch: <strong>that speed doesn’t come for free.</strong></p><p>To remember the numbers we’ve already seen, the HashMap approach needs to <em>store</em> them somewhere. In the worst case, it might end up storing almost every number in the list.</p><p>That means the HashMap approach has a space complexity of <strong>O(n)</strong> — it uses extra memory that grows alongside the size of the input.</p><p>So here’s the real trade-off:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*0vNo8NgOEkqYstwpH43Irg.png" /></figure><p>Neither one is “wrong.” They just make different trade-offs:</p><ul><li>Brute force is <strong>slower but memory-light</strong>.</li><li>The HashMap approach is <strong>faster but memory-heavier</strong>.</li></ul><p>This is a really important lesson in DSA: <strong>making code faster often means using more memory, and vice versa.</strong> There’s rarely a solution that wins on both fronts for free. Part of becoming a better programmer is learning to recognize this trade-off and choose what matters most for your specific situation — sometimes speed matters more, and sometimes memory is the limited resource you need to protect.</p><h3>Wait — Is Brute Force a Bad Thing to Write?</h3><p>This is where a lot of beginners get the wrong idea. Let’s clear it up.</p><p><strong>Brute force is not a mistake. It’s often the smartest first step.</strong></p><p>Here’s why it’s actually valuable:</p><ul><li>✅ It helps you truly <strong>understand the problem</strong> before jumping to a solution.</li><li>✅ It gives you a <strong>correct answer</strong> you can trust.</li><li>✅ It creates a <strong>baseline</strong> — something to compare faster solutions against.</li><li>✅ It helps you clearly see the <strong>input and output</strong> relationship.</li><li>✅ It gives you something concrete to <strong>optimize later</strong>.</li></ul><p>The real mistake isn’t writing brute force code. <strong>The mistake is stopping there and never asking if it can be improved.</strong></p><h3>So… Can We Make It Faster?</h3><p>Once your brute force solution works, the next question to always ask yourself is:</p><blockquote><strong><em>“Can I solve this same problem in a smarter, faster way?” 🤔</em></strong></blockquote><p>For Two Sum, the answer is yes.</p><p>Instead of comparing every pair of numbers (which wastes a lot of time), we can use a special tool called a <strong>HashMap</strong> to <em>remember</em> numbers we’ve already seen as we go. This way, we only need to look through the list <strong>once</strong>, instead of comparing everything to everything.</p><p>This brings the time complexity down from:</p><pre>O(n²)   →   O(n)</pre><p>That’s a huge improvement, especially for large lists.</p><p>(Don’t worry if HashMaps are a new concept — that’s a topic for another post. For now, just know that a smarter approach exists once you understand the brute force version.)</p><h3>The Bigger Lesson Here</h3><p>A lot of the time, we write nested loops because “it just works,” without stopping to ask:</p><ul><li>Why did I use nested loops here?</li><li>What is the time complexity of my solution?</li><li>Is this actually a brute force approach?</li><li>Can this be made faster?</li><li>Is there a known technique or pattern for this type of problem?</li></ul><p>Asking these questions — even briefly — is what separates “I got the answer” from “I actually understand what I’m doing.”</p><h3>Don’t Just Write Code — Understand It</h3><p>Writing code that works is one skill.</p><p>Understanding <em>why</em> it works, and <em>how efficient</em> it is, is a completely different (and more valuable) skill.</p><p>The path looks like this:</p><p><strong>Approach → Algorithm → Complexity → Optimization</strong></p><p>Brute force is simply where this journey begins. It’s not the end goal — it’s the starting point that makes everything after it possible.</p><h3>Final Takeaway</h3><p>If you remember one thing from this post, remember this:</p><blockquote><strong><em>Brute Force = Try every possible solution.</em></strong></blockquote><p>It’s not always the fastest way to solve a problem. But it teaches you something every beginner needs to learn first:</p><p><strong>First, learn how to solve the problem. Then, learn how to solve it efficiently.</strong></p><p>#DataStructures #Algorithms #ProgrammingTips #CodingIntervie #Beginners</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3e783e5c769" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>