<?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 Ala Deniz on Medium]]></title>
        <description><![CDATA[Stories by Ala Deniz on Medium]]></description>
        <link>https://medium.com/@aabusabra?source=rss-d466835a7b09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Xn1lLFS_2cat9b8tbOrx7g@2x.jpeg</url>
            <title>Stories by Ala Deniz on Medium</title>
            <link>https://medium.com/@aabusabra?source=rss-d466835a7b09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:00:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aabusabra/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[Stop Guessing With AI Agents: The AIM Framework (Actor, Input, Mission)]]></title>
            <link>https://medium.com/@aabusabra/stop-guessing-with-ai-agents-the-aim-framework-actor-input-mission-307223c6225f?source=rss-d466835a7b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/307223c6225f</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ala Deniz]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 12:01:01 GMT</pubDate>
            <atom:updated>2026-08-03T12:01:01.980Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How three simple questions changed the way I prompt AI coding agents (illustrated with a Jetpack Compose crash).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ubDUWrxYV7POhhkix0QjEg.png" /></figure><h3>The pattern I couldn’t ignore</h3><p>I’ve been prompting AI coding agents daily for a while now as part of my regular work. I think I’ve got good instincts for it. I give context. I set constraints. I don’t just type “fix this” and hope for the best.</p><p>Or so I thought.</p><p>Here’s what I noticed after a few weeks. It wasn’t one big failure. It was <strong>inconsistency</strong>.</p><p>Some days I’d ask for something and get back exactly what I needed: clean, idiomatic, the way a good Android developer would actually write it. Other days, for a task that felt just as routine, I’d get something that technically worked but wasn’t quite right. A LazyColumn crash &quot;fixed&quot; with a workaround instead of the proper approach. A list rendered without stable keys. A pattern that ran fine but wasn&#39;t what the Compose docs actually recommend.</p><p>Same tool. Same experience level on my end. So why the difference?</p><p>I went back and compared my prompts on the good days versus the bad ones. The good ones weren’t longer, or even more careful in any way I could immediately name. They were just more specific, in three particular ways, almost without me realizing it.</p><p>I’d described <strong>what kind</strong> of developer I wanted the AI to be for that task. I’d given it <strong>just enough</strong> context about the code. And I’d stated exactly what “done” looked like.</p><p>On the bad days, the ones where I was moving fast and trusting my instincts instead of slowing down, I’d typed something like “fix this crash” and left everything else to guesswork.</p><p>That’s the part that actually surprised me. My “instincts” weren’t a reliable process at all. They were just a framework I happened to apply sometimes, without ever naming it or applying it consistently. The AI wasn’t randomly better or worse. It was mirroring exactly how much direction I gave it, every single time, whether I did that on purpose or not.</p><p>So I stopped relying on instinct and started forcing myself to explicitly answer three questions before writing a single prompt, every time, no exceptions.</p><p><strong>Who is the AI supposed to be? What does it actually need to know? What, precisely, is the mission?</strong></p><p>A while later, I found out there’s already a name for this. It’s called <strong>AIM</strong>, and that’s exactly what it does. It turns loose, inconsistent instincts into a repeatable framework by forcing you to nail down the Actor, the Input, and the Mission before you ever hit enter.</p><h3>Why relying on instinct isn’t enough</h3><p>If you prompt AI agents regularly, you’re probably not making beginner mistakes. You give context. You know not to ask for the world in one shot. That’s exactly what makes this trap easy to miss. The failures aren’t obvious ones. They’re subtle inconsistencies that only show up when you compare your results over time, the way I did.</p><p>The problem isn’t a lack of skill. It’s that skill applied <strong>ad hoc</strong> isn’t the same as skill applied <strong>systematically</strong>. Compare these two requests, both from someone who clearly knows what they’re doing:</p><ul><li><em>“Make this screen better.”</em></li><li><em>“The primary button doesn’t disable during the network call, causing double submissions. Fix only that behavior; don’t touch styling.”</em></li></ul><p>Most experienced prompters already know the second one is better. The catch is that under time pressure, even people who know better default back to the first, not because they lack the skill, but because nothing forces them to apply it every time. AI agents won’t push back and ask for clarification the way a human collaborator might. They’ll just guess, confidently and hand you something that compiles but isn’t what you meant.</p><p>AIM isn’t a beginner’s checklist. It’s a way to make your existing instincts consistent, every single time, not just on your sharpest days.</p><h3>The AIM Framework</h3><h3>A — Actor</h3><p><strong><em>Who should the AI act as?</em></strong></p><p>This sets the lens the model reasons through. “You are an expert Android developer who prioritizes minimal diffs and Compose best practices” produces a completely different output than no persona at all. It constrains scope, tone, and risk tolerance before a single line of code gets written.</p><blockquote>❌ “Act as an expert developer.” <br>✅ “Act as an expert Android developer working in Jetpack Compose. You care about minimal diffs, recomposition performance, and not introducing new dependencies.”</blockquote><h3>I — Input</h3><p><strong><em>What does the AI actually need to know, and nothing more?</em></strong></p><p>With an agentic coding tool, this usually isn’t about pasting code. The agent can read your files itself. It’s about pointing it to the right place and telling it what matters: which files to look at, which ones to leave alone, and any constraints it can’t discover just by reading the code.</p><blockquote>❌ “Go look through the whole project and figure it out.”<br>✅ “Look at ExampleScreen.kt and read ExampleViewModel.kt for context. State is hoisted via ExampleUiState. Do not modify the ViewModel&#39;s public API.&quot;</blockquote><h3>M — Mission</h3><p><strong><em>What is the single, scoped, testable outcome?</em></strong></p><p>Not “make this better.” A mission specific enough that you could check it yourself in thirty seconds and know immediately whether it worked.</p><blockquote>❌ “Fix this.”<br>✅ “The primary button remains clickable during the network call, allowing duplicate submissions. Disable it while isLoading == true in ExampleUiState, and re-enable it on success or failure. Don&#39;t change anything else in the file.&quot;</blockquote><h3>Before / After: A Real Compose Fix</h3><p><strong><em>Before, what I actually typed:</em></strong></p><pre>fix this crash in ExampleScreen.kt</pre><p><strong>Result:</strong> The agent found the file on its own, and the crash went away. But the fix leaned on a quick workaround rather than the idiomatic approach: no explicit sizing strategy, a list rendered without stable keys, and nothing explaining <strong>why</strong> it worked. It ran fine. It just wasn’t how an experienced Android developer would have written it, and I only found that out by going back and asking.</p><p><strong><em>After, AIM applied:</em></strong></p><pre>Actor: You are an expert Android developer working in Jetpack Compose.<br>You follow current official best practices and explain any tradeoffs<br>in your approach.<br><br>Input: Look at ExampleScreen.kt. It uses a LazyColumn nested inside a<br>Column with no defined height constraint, which throws an<br>IllegalStateException at runtime (&quot;vertically scrollable component<br>was measured with an infinity maximum height&quot;). Read ExampleViewModel.kt<br>for context, but its public API must not change.<br><br>Mission: Fix the layout structure causing the crash using the<br>idiomatic Compose approach for this situation, not just whatever<br>makes the exception disappear. Briefly explain why your fix is the<br>recommended pattern, and note any stable-key or performance<br>considerations for the list.</pre><p><strong>Result:</strong> The same crash fix, but this time with stable keys on the list items, and a one-line explanation of <strong>why</strong> that structure is the recommended pattern, not just that it compiles.</p><p>Same bug. Same model. Completely different outcome, because the <strong>ask</strong> was for good, not just working.</p><h3>The Mistakes People Still Make (Even Once They “Know” AIM)</h3><p>This is the part that catches experienced prompters specifically. Knowing the acronym doesn’t automatically save you from applying it loosely.</p><ul><li><strong>Vague Actor.</strong> “Act as an expert” tells the model nothing about <em>what kind</em> of expert, or what it should optimize for. Name the priorities: performance, readability, minimal diffs, security. Experienced prompters skip this most often, because it feels obvious in their own head and they forget the model can’t read it.</li><li><strong>Input overload.</strong> Telling the agent to “check the whole codebase to be safe” dilutes the signal instead of sharpening it. Point it at the specific files that matter. More surface area isn’t more precision.</li><li><strong>Mission creep.</strong> Asking for a bug fix and a refactor and better naming and new tests in one breath means the agent trades correctness in one area for progress in another. One mission per prompt. Chain them if you need more.</li><li><strong>No output constraint.</strong> If a minimal diff matters to you, say so explicitly. Otherwise the model defaults to rewriting more than it needs to. This one bites advanced users hardest, because they’re usually the ones working in codebases sensitive enough that an unconstrained “cleanup” actually costs something.</li></ul><h3>The Cheat Sheet</h3><p>Before your next prompt, answer these three questions. One sentence each is enough.</p><ol><li><strong>Actor: Who is the AI for this task right now?</strong> Not “an expert.” A <em>specific </em>kind of expert, with specific priorities.<br> → <em>“An expert Android developer who prioritizes minimal diffs and Compose best practices.”</em></li><li><strong>Input: What’s the smallest context that fully explains the problem?</strong> Point to the right files, and just as important, say what must <em>not</em> change. Let the agent read the code; you just need to direct it.<br> → <em>“Look at this composable and its ViewModel. Don’t touch the ViewModel’s public API.”</em></li><li><strong>Mission: What’s the one outcome, stated so clearly you could verify it in 30 seconds?</strong> Not “make this better.” A single, testable fix. <br>→ <em>“Fix only the LazyColumn/Column nesting crash. Change nothing else.”</em></li></ol><p>That’s it. Three short sentences, in order, before you hit enter. Once it’s a habit, it takes <em>less</em> time to write than “fix this” ever did, and you get back something you can actually trust.</p><h3>Aim Before You Shoot</h3><p>The next time I hit a Compose crash, I didn’t type “fix this.” I wrote out Actor, Input, Mission. Maybe ninety extra seconds of typing. The agent handed back a fix that followed the recommended pattern <em>and</em> explained why, instead of a quick patch I’d have had to double-check later.</p><p>Ninety seconds of aiming beats a lot more time spent second-guessing the result.</p><p>AI agents aren’t mind readers, no matter how good your instincts are. They’re extremely capable, extremely literal collaborators. Treat every prompt like a brief you’d hand to a new senior hire, someone skilled, but with zero context on your codebase, and tell them who to be, what they need to know, and exactly what “done” looks like. The output changes completely, every time, not just on your best days.</p><p>That’s the whole framework. Actor. Input. Mission. Aim before you shoot.</p><p><em>If you’ve picked up your own tricks for prompting AI coding agents, I’d like to hear about them. Leave a comment :)</em></p><p>If you’re wondering how AIM actually plays out day to day in Android development, specifically the rules I follow when letting an AI agent touch my codebase, that’s next on my list. Stay tuned; I’ll share it soon ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=307223c6225f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Threat Modeling Manifesto for Mobile Apps]]></title>
            <link>https://medium.com/@aabusabra/the-threat-modeling-manifesto-for-mobile-apps-e02c9f69769b?source=rss-d466835a7b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/e02c9f69769b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-modeling]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Ala Deniz]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 12:15:46 GMT</pubDate>
            <atom:updated>2025-11-08T12:15:46.622Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wkUPSDBfCuaaz2esMB7hw.png" /></figure><p>Modern mobile apps sit at the intersection of personal data, platform complexity, and cloud infrastructure. They handle authentication, payments, geolocation, and private user data. Yet most development teams focus on features and UX first, and only later think:</p><p>“Oh… maybe we should secure this.”</p><p>Threat modeling flips that script. It’s about thinking before an attack happens, identifying:</p><ul><li>What could go wrong?</li><li>Why could it go wrong?</li><li>How can you prevent or contain it?</li></ul><p>This article is your Threat Modeling Manifesto for Mobile Apps — a practical guide for Android developers who want to build secure apps without losing velocity.</p><h3>What Threat Modeling Really Means</h3><p>Threat modeling helps teams identify what they’re protecting, who they’re protecting it from, and how they’ll defend it.</p><p>In simpler terms:<br><strong>1. What are we building?<br>2. What could go wrong?<br>3. What are we doing about it?</strong></p><p>That’s it. No complex spreadsheets, just structured thinking about risk.</p><h3>Threat Modeling Frameworks</h3><p><strong>Threat modeling frameworks</strong> are structured methodologies that help teams identify, classify, and prioritize potential security threats.<br> They provide a common language and process to think about <strong>how attackers might exploit your system</strong> and how to <strong>design countermeasures before attacks occur</strong>.</p><p>These are the most recognized frameworks in the security world:</p><p>1. <strong>STRIDE (Microsoft)</strong><br> A classic model that breaks threats into six categories:<br> . <strong>S — Spoofing:</strong> Pretending to be someone else.<br> . <strong>T — Tampering:</strong> Modifying data or code.<br> . <strong>R — Repudiation:</strong> Performing actions without accountability.<br> . <strong>I — Information Disclosure:</strong> Leaking sensitive data.<br> . <strong>D — Denial of Service:</strong> Making the app unavailable.<br> . <strong>E — Elevation of Privilege:</strong> Gaining unauthorized access.</p><p>2. <strong>PASTA (OWASP) — <em>Process for Attack Simulation and Threat Analysis</em></strong><br> A seven-step, risk-centric model that focuses on aligning business impact with technical risks. It walks you from defining business objectives all the way to actionable countermeasures.</p><p>3. <strong>OCTAVE (Carnegie Mellon SEI)</strong><br> A broader, organization-level approach to identifying and prioritizing risks based on critical assets and processes.</p><p>Each of these models can be simplified for mobile by focusing on <strong>data flow</strong>, <strong>attack surface</strong>, and <strong>trust boundaries</strong>.</p><h3>The Mobile Threat Landscape</h3><p>Mobile apps face unique threats that web or backend systems don’t. Here’s a breakdown of key risk areas with practical developer examples:</p><p><strong>1. Data at Rest</strong><br> <strong><em>Attack:</em></strong> Extracting tokens or personally identifiable information (PII) from local storage (e.g., SharedPreferences, SQLite).<br> <strong><em>Mitigation:</em></strong> Use the Android Keystore or iOS Keychain — Encrypt sensitive data before storage.</p><p><strong>2. Data in Motion</strong><br> <strong><em>Attack: </em></strong>Man-in-the-Middle interception of API calls.<br><strong><em> Mitigation:</em></strong> Enforce HTTPS, use TLS 1.2 or higher (preferably TLS 1.3), and implement SSL pinning.</p><p><strong>3. Code Integrity</strong><br> <strong><em>Attack:</em></strong> Reverse engineering or runtime hooking via Frida or Xposed.<br> <strong><em>Mitigation:</em></strong> Obfuscate code, add runtime integrity checks, and verify app signature.</p><p><strong>4. Platform Integration</strong><br> <strong><em>Attack: </em></strong>Exploiting exported activities or deep links to access restricted features.<br> <strong><em>Mitigation:</em></strong> Set android:exported=false, validate incoming intents and URIs.</p><p><strong>5. Authentication &amp; Sessions</strong><br><strong><em> Attack:</em></strong> Token theft or session reuse.<br><strong><em> Mitigation:</em></strong> Store tokens securely, rotate them often, and invalidate sessions on logout.</p><p><strong>6. Third-Party SDKs</strong><br> <strong><em>Attack:</em></strong> SDKs with excessive permissions or privacy leaks.<br> <strong><em>Mitigation: </em></strong>Audit SDKs, use network inspection, and integrate with a sandbox.</p><h3>Example: STRIDE in Action</h3><p>Let’s apply STRIDE to a typical mobile login flow:</p><pre>[User] --&gt; [Login Screen] --&gt; [Auth API] --&gt; [Database]<br>              |                    |<br>              |                    |--&gt; (I) Info Disclosure: Logging credentials<br>              |--&gt; (S) Spoofing: Fake overlay login screen</pre><p>Here’s how each <strong>STRIDE</strong> category might appear:</p><ul><li><strong>Spoofing:</strong> A malicious app mimics your login screen.<br> → Mitigate with overlay detection, biometric auth, or package name checks.</li></ul><pre>@Composable<br>fun SecureLoginScreen() {<br>    var hasFocus by remember { mutableStateOf(true) }<br><br>    val context = LocalContext.current<br>    val window = (context as? Activity)?.window<br><br>    DisposableEffect(Unit) {<br>        val listener = View.OnFocusChangeListener { _, focused -&gt;<br>            hasFocus = focused<br>        }<br>        window?.decorView?.onFocusChangeListener = listener<br>        onDispose { window?.decorView?.onFocusChangeListener = null }<br>    }<br><br>    if (hasFocus) {<br>        LoginContent()<br>    } else {<br>        // Overlay possibly detected<br>        Box(<br>            Modifier<br>                .fillMaxSize()<br>                .background(Color.Black.copy(alpha = 0.8f)),<br>            contentAlignment = Alignment.Center<br>        ) {<br>            Text(&quot;Security check in progress...&quot;, color = Color.White)<br>        }<br>    }<br>}</pre><p><strong><em>Tip:</em></strong> Combine overlay detection with biometric authentication (BiometricPrompt) for added protection.</p><ul><li><strong>Tampering:</strong> Request payloads modified in transit.<br> → Use HMAC signatures and HTTPS enforcement.</li></ul><pre>fun signRequest(secretKey: String, body: String): String {<br>    val hmacKey = SecretKeySpec(secretKey.toByteArray(), &quot;HmacSHA256&quot;)<br>    val mac = Mac.getInstance(&quot;HmacSHA256&quot;)<br>    mac.init(hmacKey)<br>    val hash = mac.doFinal(body.toByteArray())<br>    return Base64.encodeToString(hash, Base64.NO_WRAP)<br>}</pre><p><strong><em>Tip:</em></strong> The backend should verify this signature to detect tampering.</p><ul><li><strong>Repudiation:</strong> No logs to track failed or malicious login attempts.<br> → Add backend audit logging with request metadata.</li></ul><pre>fun sendAuditLog(username: String, success: Boolean) {<br>    val payload = JSONObject().apply {<br>        put(&quot;user&quot;, username)<br>        put(&quot;success&quot;, success)<br>        put(&quot;timestamp&quot;, System.currentTimeMillis())<br>    }<br>    ApiClient.post(&quot;/audit/logins&quot;, payload)<br>}</pre><p><strong><em>Tip:</em></strong> Avoid local file logs for sensitive events; use secure, centralized logging.</p><ul><li><strong>Information Disclosure:</strong> Sensitive info written to logs.<br> → Disable verbose logging in production builds.</li></ul><pre>@Composable<br>fun LoginStatus(isLoggedIn: Boolean, userToken: String?) {<br>    if (BuildConfig.DEBUG) {<br>        Log.d(&quot;AuthDebug&quot;, &quot;Token: $userToken&quot;)<br>    }<br><br>    val message = if (isLoggedIn) &quot;Welcome back!&quot; else &quot;Please log in&quot;<br>    Text(message)<br>}</pre><p><strong><em>Tip: </em></strong>Never log tokens, passwords, or PII, even in debug builds — use masked values.</p><ul><li><strong>Denial of Service:</strong> Brute-force login attempts flood the API.<br> → Add rate limiting or CAPTCHA.</li></ul><pre>@Composable<br>fun RateLimitedLogin(onLogin: () -&gt; Unit) {<br>    var lastAttempt by remember { mutableStateOf(0L) }<br>    val context = LocalContext.current<br><br>    Button(onClick = {<br>        val now = System.currentTimeMillis()<br>        if (now - lastAttempt &lt; 5000) {<br>            Toast.makeText(context, &quot;Too many attempts. Try again later.&quot;, Toast.LENGTH_SHORT).show()<br>        } else {<br>            lastAttempt = now<br>            onLogin()<br>        }<br>    }) {<br>        Text(&quot;Login&quot;)<br>    }<br>}</pre><p><strong><em>Tip: </em></strong>Real rate limiting should also be enforced on the backend (e.g., Nginx, Cloudflare, or custom middleware).</p><ul><li><strong>Elevation of Privilege:</strong> Regular users access admin endpoints.<br> → Enforce role validation on backend APIs.</li></ul><pre>@Composable<br>fun AdminPanel(userRole: String) {<br>    if (userRole.equals(&quot;admin&quot;, ignoreCase = true)) {<br>        Text(&quot;Welcome, Admin! Access granted.&quot;)<br>    } else {<br>        Text(&quot;Access denied.&quot;)<br>    }<br>}</pre><p><strong><em>Tip:</em></strong> Always perform role validation server-side too — client-side checks are for defense-in-depth, not primary control.</p><h3>Applying PASTA to a Mobile App</h3><p>PASTA encourages you to look beyond vulnerabilities — toward business and design context.</p><p>A condensed, mobile-focused PASTA workflow might look like this:</p><ol><li><strong>Define what’s valuable.</strong> Example: user credentials, in-app purchases, payment tokens.</li><li><strong>Define the technical scope.</strong> Include all APIs, SDKs, local storage, and authentication mechanisms.</li><li><strong>Decompose the system.</strong> Draw a simple diagram of your data flow and trust boundaries.</li><li><strong>Identify threats.</strong> Use STRIDE or the <a href="https://attack.mitre.org/matrices/mobile/">MITRE ATT&amp;CK Mobile Matrix</a>.</li><li><strong>Analyze vulnerabilities.</strong> Use static/dynamic analysis tools like MobSF or QARK.</li><li><strong>Assess impact.</strong> What happens if this asset is compromised?</li><li><strong>Mitigate and verify.</strong> Implement and test countermeasures continuously.</li></ol><p>Example DFD (simplified):</p><pre>[App UI]<br>   |<br>   --&gt; [Network Layer] --(HTTPS)--&gt; [Backend API]<br>   |          |                          |<br>   |          |--&gt; (Potential MITM)       |--&gt; [Database]<br>   |                                      |<br>   |--&gt; [Local Storage] (KeyStore / Keychain)</pre><h3>How to Embed Threat Modeling into Development</h3><p>Practical workflow for mobile teams:</p><ul><li><strong>During design:</strong> Sketch data flow and list assets (e.g., tokens, API keys, user data).</li><li><strong>During sprint planning:</strong> Ask, “What new data are we introducing? What could go wrong with it?”</li><li><strong>During development:</strong> Implement mitigations — encryption, secure APIs, and permission handling.</li><li><strong>During testing:</strong> Validate with OWASP MASVS and MSTG guidelines.</li><li><strong>Before release:</strong> Review your model and update it for the next version.</li></ul><h3>The Mobile Threat Modeling Manifesto</h3><ul><li><strong>Think about threats before code.</strong> Every feature has an attack surface. Identify it first.</li><li><strong>Focus on data.</strong> Where it lives, where it travels, who can touch it.</li><li><strong>Use STRIDE for scenarios.</strong> It’s concise, visual, and actionable.</li><li><strong>Apply risk analysis.</strong> Not every threat is equal — prioritize mitigations.</li><li><strong>Integrate into sprints.</strong> Threat modeling is iterative, not a one-time checklist.</li><li><strong>Automate and audit.</strong> Static analysis, runtime checks, and backend logging are your friends.</li><li><strong>Educate the team.</strong> Security isn’t a checkbox; it’s a mindset.</li></ul><h3>Closing Thoughts</h3><p>Threat modeling is not a one-time activity or a checkbox in your development process; it’s a <strong>mindset</strong>. Modern mobile apps handle sensitive data, interact with complex platforms, and rely on cloud infrastructure. Every feature you add expands the attack surface.</p><p>By embedding threat modeling into every stage of development — from design to testing to release, you <strong>think like an attacker before they strike</strong>. Use frameworks like STRIDE and PASTA to structure your analysis, but remember: the most important thing is <strong>practical action</strong>. Identify the assets that matter most, understand the threats that could impact them, and implement mitigations that fit your app’s architecture.</p><p>Security in mobile apps is <strong>layered</strong>: combine secure coding practices, runtime checks, encrypted communications, backend validation, and continuous monitoring. Educate your team, review changes iteratively, and make threat modeling part of your agile workflow.</p><p>By doing so, you build apps that are not just functional and user-friendly, but resilient against attacks, protecting your users, your data, and your reputation.</p><h3>References</h3><p>. <a href="https://learn.microsoft.com/en-us/azure/security/develop/threat-modeling-tool-threats">Microsoft Threat Modeling Tool </a><br>. <a href="https://owasp.org/www-project-threat-model/">OWASP PASTA Project</a><br>. <a href="https://www.sei.cmu.edu/library/introduction-to-the-octave-approach/">SEI OCTAVE Framework</a><br>. <a href="https://attack.mitre.org/matrices/mobile/">MITRE ATT&amp;CK Mobile Matrix</a><br>. <a href="https://owasp.org/www-project-mobile-app-security/">OWASP Mobile Security Testing Guide (MASVS/MSTG)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e02c9f69769b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Code to Carbon: How Developer AI Tools Impact the Environment]]></title>
            <link>https://medium.com/@aabusabra/from-code-to-carbon-how-developer-ai-tools-impact-the-environment-26103909e787?source=rss-d466835a7b09------2</link>
            <guid isPermaLink="false">https://medium.com/p/26103909e787</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Ala Deniz]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 23:04:59 GMT</pubDate>
            <atom:updated>2025-07-21T23:04:59.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*u-2Z6EOh9OxUQsACNatBoA.png" /></figure><p>Open Gemini or ChatGPT. Ask what you need. Hit the Enter key, and that’s it from your side. But what about the hidden cost for that?</p><p>A few weeks ago, I attended a training session titled <strong>“Accelerate Developer Productivity with AI”</strong> — a workshop about how tools like ChatGPT, Gemini, and GitHub Copilot can supercharge the way we work. It was eye-opening and exciting.</p><p>But what truly stuck with me was something I hadn’t expected to hear: <strong>the hidden environmental impact of using these AI agents.</strong></p><p>That single point made me pause. We’re integrating AI into nearly <strong>every part of our lives</strong> — coding, writing, decision-making, and even daily conversations. But how often do we ask: <em>What’s the environmental cost of every AI-powered response?</em></p><p>This article is my attempt to explore that question — to bring together the <strong>numbers, facts, and company responses</strong> — and to invite all of us to think more consciously about how we use AI.</p><h3>The Hidden Cost: Energy, Water, and Carbon</h3><p>Behind every AI interaction lies a vast infrastructure of <strong>data centers running powerful GPUs</strong> that consume enormous amounts of electricity and water. Let’s look at the facts.</p><h4><strong>Energy Use</strong></h4><ul><li>In 2023, data centers consumed 460–524 terawatt-hours (TWh) globally, accounting for approximately <strong>2–3% of total global electricity demand</strong>.</li><li>AI is one of the fastest-growing contributors. By <strong>2030</strong>, AI workloads could account for <strong>up to 4% of the world&#39;s total electricity consumption</strong>.</li><li>Accelerated servers like GPUs — required to run and train LLMs — are growing by <strong>30% per year</strong>.</li></ul><h4>Model Training Emissions</h4><ul><li><strong>GPT-3 (175B)</strong>: ≈1,287 MWh electricity, ~552 t CO₂ (<a href="https://arxiv.org/abs/2104.10350">Patterson et al., 2021</a>).</li><li><strong>GPT-4</strong>: Estimated 12,000–15,000 t CO₂ (<a href="https://www.deepseekpro.org/guide/the-carbon-footprint-of-gpt-4">DeepSeek report</a>).</li><li><strong>LLaMA-2 (~7B–70B)</strong>: ~539 t CO₂.</li><li><strong>BLOOM</strong>: Training emitted ~25 t CO₂; full lifecycle ~50 t CO₂.</li></ul><p>Training large models is carbon-intensive, but <strong>inference (daily usage) may account for more energy over time</strong>.</p><h4>Water Consumption</h4><ul><li>Microsoft’s Arizona data center could use <strong>212 million liters/year</strong>, equivalent to <strong>670 households</strong>.</li><li>Google experienced a 20% increase in water usage in 2023, primarily due to the demand for AI.</li><li>Data centers can require <strong>millions of liters daily</strong> for cooling.</li></ul><h3>Productivity vs Planet</h3><p>There’s no doubt that AI tools make us more efficient. Developers, for example, can:</p><ul><li>Generate boilerplate code in seconds</li><li>Summarize long documents</li><li>Debug faster with AI assistants</li></ul><p>But each AI query consumes power. And with billions of queries daily, even small footprints scale.</p><p><strong>Estimated emissions per request:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jFRHS0W6LBP5Fm-Dx4HGRA.png" /></figure><p>Even though models like <strong>Gemini Flash</strong> are incredibly efficient, scale still matters. Multiply 0.01 grams of CO₂ by a billion prompts and the impact adds up.</p><h3>The European Perspective</h3><h4>Energy Demand</h4><ul><li>In Ireland, data centers already use <strong>21% of electricity</strong>, forecasted to reach <strong>28% by 2031</strong>.</li><li>The EU expects <strong>data center electricity usage to double by 2030</strong>.</li></ul><h4>Regulation &amp; Action</h4><ul><li><strong>The EU Climate Neutral Data Centre Pact</strong> sets targets:<br> ➥ Power usage effectiveness (PUE) ≤ 1.3 (in cool climate zones)<br> ➥ 100% carbon-free energy by 2030 (via renewable sourcing)<br> ➥ Water conservation, heat reuse, and recycling mandates</li><li><strong>EuroHPC</strong> is investing in green AI supercomputers across Finland, France, and Spain.</li></ul><h4>Constraints</h4><ul><li>Nordic regions attract data centers due to their green energy and cooling capabilities, but face challenges related to <strong>land, water, and grid stress</strong>.</li><li>Sweden has already introduced <strong>data center taxes</strong> to prevent over-expansion</li></ul><h3>What Are Big Tech Companies Doing to Mitigate These Effects?</h3><h4>Google</h4><ul><li>Invested more than <strong>$3.7B</strong> in renewable-powered data centers</li><li>Cut emissions by <strong>12%</strong> while workloads grew by 27%</li><li>Achieved ultra-low PUE (~1.09)</li></ul><h4>Microsoft</h4><ul><li>Aims to be <strong>carbon negative and water positive by 2030</strong></li><li>Embraces <strong>carbon removal</strong> and <strong>waste heat reuse</strong></li><li>AI caused a <strong>34% water use rise</strong> in 2023, sparking new conservation plans</li></ul><h4>Meta</h4><ul><li>Using <strong>AI-optimized green concrete</strong> and energy-efficient designs</li><li>Building <strong>5 GW AI clusters</strong>, balancing with efficiency targets</li><li>Critics call for <strong>greater transparency</strong> on offsets and energy mix</li></ul><h4>Nvidia &amp; Schneider Electric</h4><ul><li>Developing <strong>liquid-cooled, efficient GPU servers</strong></li><li>Reduces cooling energy by <strong>up to 20%</strong></li><li>Enables more sustainable AI deployments at scale</li></ul><h3>How Can We Use AI More Sustainably?</h3><h4>As developers and users:</h4><ul><li><strong>Use lighter, energy-efficient models</strong> like Gemini Flash or GPT-4o</li><li><strong>Query responsibly</strong> — avoid unnecessary or repetitive prompts</li><li><strong>Batch requests</strong> or use summaries instead of full reanalysis</li></ul><h4>As organizations:</h4><ul><li>Choose <strong>cloud providers with sustainability certifications</strong></li><li>Request <strong>carbon usage data</strong> from AI and cloud vendors</li><li>Offset emissions using <strong>high-quality carbon removal</strong> providers</li></ul><p><strong>Next time you use an AI tool, pause to consider its footprint. Small choices — like batching queries or using efficient models — can collectively make a big difference.</strong></p><p>That moment in training made me realize: we rely on AI constantly, but we rarely think about its invisible cost. From billions of queries, even efficient models add up to a very real environmental impact.<br> AI will continue to shape our future. The challenge is to ensure that the future is not only intelligent and efficient, but also responsible and sustainable.</p><h3>Sources &amp; Further Reading</h3><ul><li><a href="https://www.iea.org/reports/energy-and-ai/energy-demand-from-ai">IEA Report on AI &amp; Energy Demand</a></li><li><a href="https://www.sciencedirect.com/science/article/abs/pii/S0921344925001892">The Water Use of Data Center Workloads</a></li><li><a href="https://sustainability.google/google-2025-environmental-report/">Google Environmental Report 2025</a></li><li><a href="https://blogs.microsoft.com/on-the-issues/2025/05/29/environmental-sustainability-report/">Microsoft Sustainability Report 2025</a></li><li><a href="https://fortune.com/2023/09/09/ai-chatgpt-usage-fuels-spike-in-microsoft-water-consumption/">Microsoft Water Usage Report</a></li><li><a href="https://www.devera.ai/resources/the-environmental-impact-of-ai-energy-carbon-and-water-in-the-age-of-chatgpt">ChatGPT &amp; OpenAI Water Usage</a></li><li><a href="https://www.climateneutraldatacentre.net/">EU Data Center Pact</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26103909e787" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>