<?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 Nafla Nawas on Medium]]></title>
        <description><![CDATA[Stories by Nafla Nawas on Medium]]></description>
        <link>https://medium.com/@naflanawas?source=rss-b4c72e726e7a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*97nqhSRJ17Fqg-CYjOo9Gg.png</url>
            <title>Stories by Nafla Nawas on Medium</title>
            <link>https://medium.com/@naflanawas?source=rss-b4c72e726e7a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:07:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@naflanawas/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[Building MURMUR: My Final Year Research Journey]]></title>
            <link>https://medium.com/@naflanawas/building-murmur-my-final-year-research-journey-e5aa8d598e7f?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5aa8d598e7f</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[academic-writing]]></category>
            <category><![CDATA[assistive-technology]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 09:22:18 GMT</pubDate>
            <atom:updated>2026-09-19T09:24:14.918Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mKWx9iqFzMhc8F0zuGUtYQ.png" /><figcaption>The paper I presented at IEEE ICSIPA 2026</figcaption></figure><h4>Why I wanted my final year project to matter</h4><p>During my second year, my team built a mobile application for stroke patients called MoveMate. It gave us a lot of recognition and exposure, and the feeling stayed with me long after the project ended.</p><p>So when final year came around, I wanted my research to earn that kind of recognition too. Who doesn’t like being recognised for the hard work they put in? That one thought shaped almost every decision I made over the next year. This is the story of how it went: the choices, the mistakes, the dead ends, and what finally worked.</p><h4>Choosing a supervisor and an idea</h4><p>I chose Banu sir as my supervisor because he had been around since my second year, and I wanted someone who already knew me well.</p><p>In early 2025, I pitched him a few research ideas. We had one-to-one sessions, and he told me to drop few of them. Finally, we locked in on an under-explored domain: breath-based communication.</p><p>It was not an easy pick. The domain is underdeveloped and clinically challenging. But I was really interested in exploring it, and Banu sir approved the idea. That was the start of MURMUR.</p><h4>Starting with the reading</h4><p>I started in August, and I went straight into reading papers. I made an Excel sheet to track them and used Zotero to manage the papers themselves. Then I started writing my literature review straight away.</p><p>At that point I had no idea what technology I’d use or what the end solution would look like. I just studied the problem and the research already done around it. The direction came gradually, as I made progress.</p><h4>Mistakes I made early on</h4><p>Two things I’d tell my first-semester self:</p><ul><li><strong>I missed the feedback sessions.</strong> Those were my chance to speak to other supervisors and hear their opinions, and I skipped them.</li><li><strong>I tried to turn my research into a product.</strong> It’s a common trap for first-time researchers. We’re used to building products and solving problems, so we drift that way. Research is a different kind of work.</li></ul><p>There were also many dead ends, plenty of discouragement, and late nights spent regretting my choices and decisions. Even so, with the help of my supervisors, friends and lecturers, I was able to build a prototype that explained my research, along with a proof of concept.</p><h4>What picked me back up</h4><p>After about eight months on this work, it is very common to lose interest. The feedback can be discouraging, and the outcomes rarely match what you planned. You start with a solid plan, but the system never works exactly the way you expect, especially when the project has many unfamiliar components. I was down and demotivated at that point.</p><p>The first thing that gave me hope was the evaluators. I reached out to people on LinkedIn, and there are experienced people out there who are ready to help. They gave me great exposure and asked good questions, and those questions helped me grow into a better researcher.</p><p>The second was conferences. My work was accepted at conferences, which meant detailed feedback and the chance to present my work to fellow researchers. That feedback and that opportunity gave the project a new sense of purpose.</p><h4>The viva</h4><p>The final viva was a roller coaster. Until you finish it, nobody can convince you not to worry. Even when you know your research inside out, you still feel that rush. Mine went well in the end, but I definitely stressed out my family, my supervisor and my friends along the way. It was worth it.</p><p>I’ll say this plainly: doing a solid final year project at IIT is hard and tiring. But if you do solid work, a lot of opportunities are waiting to get you recognised.</p><h4>What I learned</h4><p>Here are a few things I would tell anyone starting their own final year project.</p><ol><li><strong>Expect self-doubt, other people’s opinions and dead ends.</strong> Don’t get discouraged. Keep working, even when you are not sure what you are trying to do. It becomes clearer along the way.</li><li><strong>Attend the feedback sessions and talk to as many people as you can.</strong> I missed some early on, and I regret it.</li><li><strong>Meet domain experts from the early stages.</strong> Their feedback helps you understand the domain more clearly and shapes your decisions.</li><li><strong>Apply for conferences.</strong> IIT can help you with the financial side, and there are ways to get that support.</li><li><strong>Take the literature review seriously.</strong> It is the most important part of research, so do it properly and don’t look for shortcuts.</li><li><strong>Use AI tools as a helper, not a replacement for your own thinking.</strong> They can save you time, but the understanding has to be yours.</li></ol><p>I would encourage everyone reading this to apply for conferences, even if you don’t plan to follow a research path in your career. The feedback and the people you meet are worth it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5aa8d598e7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Are You Adding a Swimming Pool Nobody Asked For? A Lesson on PRD vs BRD vs FRD]]></title>
            <link>https://medium.com/@naflanawas/why-are-you-adding-a-swimming-pool-nobody-asked-for-a-lesson-on-prd-vs-brd-vs-frd-4cdf96a1e4f5?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cdf96a1e4f5</guid>
            <category><![CDATA[brd]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[prd]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 16:59:11 GMT</pubDate>
            <atom:updated>2026-08-30T16:59:11.735Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*892ZiGD7zaOjTw-n2MYfPQ.jpeg" /></figure><p>I work at a startup, and till today we don’t have a standard format for these documents. We do document everything, that part we’re good at, but every document ends up looking different depending on who wrote it, and business goals, feature ideas, and technical notes often end up mixed together in one page instead of being separated clearly.</p><p>So I did what I usually do when something’s unclear: I went and actually learned the difference between a BRD, a PRD, and an FRD properly, instead of nodding along in meetings. This post is that lesson, explained the way I wish someone had explained it to me, with an analogy that actually sticks.</p><h3>The problem with most explanations</h3><p>Search “PRD vs BRD vs FRD” and you’ll get some version of: “A BRD documents business requirements, a PRD documents product requirements, and an FRD documents functional requirements.” Technically correct. Not very useful if you’re trying to actually understand it.</p><p>Here’s the version that finally made sense to me.</p><h3>Imagine you’re building a house</h3><p>Three different documents get written for a house, at three different stages, for three different people.</p><p><strong>Stage 1: The conversation with the client who wants the house (This is the BRD).</strong></p><p>Before any blueprint exists, someone asks the basic questions. Why do you need a house at all? Because your family is growing and the apartment’s too small. What’s the budget? What’s the timeline? Who’s actually paying for it, and what do they expect to get out of it?</p><p>Notice there’s nothing technical here yet, no rooms, no doors, no materials. It’s pure business reasoning. A Business Requirements Document is written for the people funding the project, and it answers one question: why are we doing this?</p><p><strong>Stage 2: The architect’s plan (This is the PRD).</strong></p><p>Now someone takes that need and turns it into an actual plan a normal person can picture. 3 bedrooms, 2 bathrooms, a garage, a garden. The garage matters more right now than the garden, so the garden can wait for phase two.</p><p>A Product Requirements Document answers: what are we actually building? It’s specific enough to picture, prioritized enough to know what comes first, and clear about what’s explicitly not included, but it’s still not detailed enough for a construction crew to start pouring concrete.</p><p><strong>Stage 3: The construction blueprint (This is the FRD).</strong></p><p>Now the engineers take over. Exact measurements. Where every pipe and wire goes. What happens if there’s a power outage. What material the walls are made of, down to the millimeter.</p><p>A Functional Requirements Document answers: exactly how does this get built? It’s written for engineers and QA, and it’s precise enough that two different builders would construct the exact same thing from it.</p><h3>The rule that actually matters</h3><p>Here’s the part that’s easy to miss. Each document should only contain what the one before it justified.</p><p>The architect shouldn’t add a swimming pool the client never asked for. The engineer shouldn’t invent a wiring system the architect never planned. If you trace backward from any line in the FRD, it should connect to something in the PRD. If you trace backward from anything in the PRD, it should connect to something in the BRD.</p><p>So really, it’s one chain:</p><p><strong>BRD (why) leads to PRD (what) leads to FRD (how).</strong></p><p>Most of the confusion I see, and most of the confusion we’ve had at my own startup, comes from skipping straight to “how” without ever writing down “why.” You end up with a beautifully detailed spec for something nobody can explain the business reason for.</p><h3>Do you actually need all three documents?</h3><p>Here’s my honest, slightly unpopular opinion after researching this: probably not, if you’re a small team.</p><p>The three document split exists because in bigger companies, business, product, and engineering are three separate people, or teams, who don’t talk daily and need a paper trail between them. In a small startup, one person is often wearing two of those hats already. Forcing three separate formal documents on a five person team just creates process nobody has time to maintain.</p><p>What actually matters isn’t the number of files, it’s the discipline of the chain. Make sure the “how” traces back to a “what,” and the “what” traces back to a “why.” For a lean team, that can live in one document with three clearly labeled sections instead of three separate ones.</p><p>A lightweight version I’ve started using looks like this.</p><p><strong>1. Why (the business case)</strong></p><p>The problem, in one or two sentences. Who’s asking for this and why it matters to them. What success looks like, in business terms.</p><p><strong>2. What (the scope)</strong></p><p>The actual features or changes, in plain language. What’s explicitly not included. Priority order, if there’s more than one piece.</p><p><strong>3. How (the functional detail)</strong></p><p>Specific behavior: inputs, outputs, edge cases. What happens when something goes wrong. Anything engineering needs that isn’t obvious from “What.”</p><p>Simple, but it forces the same discipline as three formal documents, nothing gets built without a justified reason behind it.</p><h3>Where I landed</h3><p>I’m still early in learning this properly, and I’m sure the version of this document I use six months from now will look different. But the house analogy is the one thing I don’t think I’ll forget. Someone asks for a house, an architect turns that into a plan, and an engineer turns that plan into a blueprint. Each step should trace cleanly back to the one before it.</p><p>If your team documents everything but doesn’t have a standard format yet either, you don’t need to start with three heavyweight documents. Start with one page that forces you to answer why, what, and how, in that order. That’s the part that actually prevents the expensive mistakes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cdf96a1e4f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Day My Florist Taught Me What ERP Really Means]]></title>
            <link>https://medium.com/@naflanawas/the-day-my-florist-taught-me-what-erp-really-means-53852af1e65d?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/53852af1e65d</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[erp-system]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[supply-chain]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 10:22:59 GMT</pubDate>
            <atom:updated>2026-08-17T10:22:59.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6yuo5wSqMnkmu8PROuU2Q.jpeg" /></figure><p>Four days before my wedding, my phone rang and I already knew something was wrong before I picked up.</p><p>It was my florist. He sounded panicked. This was beginning of December last year, when Cyclone Ditwah hit Sri Lanka and caused massive flooding. Because of that, every single flower vendor he usually worked with was cut off. Roads were flooded, farms were underwater, and half the people weren’t even reachable on the phone. The natural bouquet I had been dreaming about since I was a teenager was just not going to happen anymore.</p><p>I know this sounds so small compared to an actual natural disaster where people lost their homes. But at that moment, as a bride four days away from her wedding, it felt like my whole world was falling apart over flowers. Both things can be true at once, the disaster being way bigger than my problem, and my problem still wrecking me emotionally.</p><p>I spent almost two days calling everyone I could think of. Most people just weren’t reachable at all. Eventually I found one florist who could actually get me a bouquet, but he knew exactly how desperate I was, so he charged me double what I had originally budgeted. I didn’t have a choice at that point. I paid it and got my flowers.</p><p>For a long time I just thought of this as a stressful wedding memory. But once I started learning more about how businesses actually run, I realized this wasn’t really just about flowers. It was about something businesses deal with all the time and spend a lot of money trying to avoid, which is what happens when your whole supply chain depends on just one point that can fail.</p><p><strong>So what actually is an ERP?</strong></p><p>ERP stands for Enterprise Resource Planning, which honestly sounds like the most boring name possible. In simple terms, it’s just software that connects all the different parts of a business, like sales, inventory, purchasing, finance, HR, into one system, so everyone is looking at the same real time information instead of everyone keeping their own separate notes.</p><p>Without an ERP, a business basically runs the way my wedding almost fell apart, on trust, phone calls, and hoping nothing slips through the cracks. Someone promises a customer something without even checking if it’s actually available. Someone runs out of stock and only finds out when it’s already too late. Someone at the top has to email five different departments and manually put together spreadsheets just to figure out if the company even made a profit that month.</p><p>With an ERP, all that info is already in one place. A sale happens and inventory updates automatically. Stock running low can trigger a reorder before anyone even has to notice. Management can see real numbers instead of a month old guess pieced together from six different Excel sheets.</p><p><strong>How my bouquet disaster connects to this</strong></p><p>Single point of failure: my florist depended on one regional network of suppliers. Once that whole region flooded, his entire sourcing option was gone. Businesses actually plan around avoiding exactly this by working with vendors in different regions, so one disaster doesn’t take down the whole operation. This is called vendor diversification, and it’s one of the basic things a procurement system inside an ERP helps with, keeping a live list of backup suppliers instead of relying on just one.</p><p>No backup plan: my florist literally had no “if my usual people are unreachable, call these people instead” list. He was figuring it out in the moment, which is exactly why I ended up paying so much extra. A business with proper procurement software already has backup vendors logged with pricing and availability, so when something goes wrong, there’s already a fallback instead of pure panic.</p><p>The panic price: emergency sourcing is always expensive, whether you’re a bride or a company. When you’re forced to find a replacement last minute, you have zero bargaining power because the other side knows you literally have no other option. Companies that get caught off guard by a supply issue end up paying this same kind of premium, just on a much bigger scale.</p><p>I do want to be honest about one thing though, an ERP wouldn’t have predicted Cyclone Ditwah and magically booked me a backup florist in advance. That’s not what this software actually does. What it does is handle the boring groundwork, knowing who your backup vendors are, tracking their availability, having some kind of plan before the crisis hits instead of during it, so a business isn’t relying on one stressed out person trying to remember everything, the way my florist was doing.</p><p><strong>Why this actually matters even if you’re never running a company</strong></p><p>Honestly you don’t need to work in business to have felt this. A flaky vendor, a group project where there’s like five different versions of the same file floating around, a household where two people are keeping track of things in their own heads. All of it is the same problem, just smaller. When that same chaos happens across a company with thousands of moving parts, it’s not just annoying anymore, it becomes an actual financial risk.</p><p>My wedding did happen in the end. The bouquet wasn’t the one I had pictured for years, but it was still flowers, and I still got married, and honestly nobody at that wedding even remembers what the bouquet looked like. What I remember is those 48 hours of feeling like the whole day could fall apart because one single thing broke and there was nothing behind it to fall back on.</p><p>And that’s basically the whole point of an ERP. It’s not about being fancy or predicting disasters. It’s just about making sure that when one thing breaks, everything else doesn’t break along with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53852af1e65d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Asked Claude, ChatGPT and Gemini Where to Eat in Colombo. They All Gave Different Answers.]]></title>
            <link>https://medium.com/@naflanawas/i-asked-claude-chatgpt-and-gemini-where-to-eat-in-colombo-they-all-gave-different-answers-22a8c755b24b?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/22a8c755b24b</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[geo]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[digital-marketing]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 22:05:10 GMT</pubDate>
            <atom:updated>2026-06-16T22:05:10.973Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*RPassG0qo0eYK_XcXI41zw.jpeg" /></figure><p>Whenever my friends and I plan to go out for a good meal, it always turns into a whole thing.</p><p>Recently, one of my friends said he wanted to give us a birthday treat and asked us to suggest places. We suggested plenty. He rejected all of them. Then nobody else was responding in the group chat. The day came. We were supposed to go out for dinner that evening and we still had no plan.</p><p>So I did what any reasonable person does in 2026. I asked the AIs.</p><p>I typed the same question into Claude, ChatGPT and Gemini: “What are the best casual dinner spots in Colombo for a group of friends. We want good food, good vibes, and reasonable prices.”</p><p>I expected similar answers. What I got was actually pretty interesting.</p><p><strong>What Claude Said</strong></p><p>Claude pulled up a map. Real ratings, real review counts, photos of the actual places. It recommended Big Plate, The Manhattan Fish Market, WILDISH, Life’s Good Kitchen, Heritage Colombo and The Warehouse. All places I actually recognised. Big Plate had 29,000 reviews. It flagged which ones were halal right in the listing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Df6hN_JlAUpKLFbHTTlIMw.png" /></figure><p>When I asked about halal certification specifically, Claude was straightforward. It confirmed Big Plate, The Manhattan Fish Market and Heritage Colombo were tagged as halal restaurants on Google. For the others it said there was no halal tag and suggested calling ahead. It even mentioned the difference between a Google halal tag and an official SLSI certification. That was more nuanced than I expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6EwWGbBGoeHU_2E84EkB9Q.png" /></figure><p><strong>What ChatGPT Said</strong></p><p>ChatGPT gave a different list entirely. Big Plate and Life’s Good Kitchen appeared again, but it also recommended Park Street Warehouse, SunsetBlu, The Barnesbury, Nuga Gama and JD’s Kitchen. It organised them into categories like “Casual and Fun” and “For Chill Night-Time Vibes” which was actually helpful for a group with different moods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EoLHPjk8zqfuu19F9NNMUg.png" /></figure><p>On the halal question it was mostly honest but it recommended Park Street Warehouse without mentioning it is also a pub. That is the kind of detail that actually matters if halal is important to your group. It was not wrong exactly, just incomplete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Do0XDRFjMdwfnqEJ5jhhNg.png" /></figure><p><strong>What Gemini Said</strong></p><p>Gemini went in a completely different direction. It recommended Monsoon at Park Street Mews, Tilapiya Colombo, GINI and The Bayleaf. Almost none of these overlapped with what the other two said.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QRCl0pre2b70Sml4y1EFxA.png" /></figure><p>The halal answer from Gemini was the most detailed of all three. It said none of its four recommendations were officially halal certified as whole establishments. It then explained the difference between halal sourcing and halal certification, broke down each restaurant’s situation, and offered to switch to a fully halal list if we needed one. I genuinely appreciated the honesty there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DkFMTaooK2gU1Q94266OqA.png" /></figure><p><strong>The thing I noticed</strong></p><p>Three AIs. Same question. Almost completely different restaurants.</p><p>If you are a restaurant owner in Colombo, you might be showing up on one AI and completely invisible on the others. People are increasingly asking ChatGPT and Gemini before they even open Google Maps. If your business is not appearing in those answers, a whole group of potential customers will never even know you exist.</p><p>That is not a small thing. AI search is becoming the new first impression for local businesses.</p><p><strong>So which one was actually useful?</strong></p><p>Honestly, all three had something going for them. Claude felt the most local and data-grounded. ChatGPT was the most structured and easy to read. Gemini was the most honest, especially on the halal question.</p><p>If I had to pick one for a quick local recommendation, I would go with Claude for the map and ratings. If I wanted a more curated travel-guide style answer, Gemini. ChatGPT sat somewhere in between.</p><p><strong>What happened in the end?</strong></p><p>After all of this, my friend finally made a decision. He picked a place. A place we have been to three times already.</p><p>Not that we hate it. The food is fine. But it was our third visit to the same restaurant when we had just spent hours getting recommendations from three different AIs.</p><p>Some things technology cannot fix.</p><p><strong>But here is the part worth thinking about.</strong></p><p>We have all heard about SEO. The whole idea of making sure your website ranks well on Google so people can find you. Businesses spend a lot of time and money on this and for good reason. Visibility on Google matters.</p><p>But when was the last time you thought about how your business appears in an AI response?</p><p>Every day, millions of people are skipping Google search results entirely and just asking ChatGPT, Gemini or Claude directly. “Best restaurant near me.” “Good halal spots in Colombo.” “Best date spots in Colombo.” And as most of us have experienced, we trust those answers.</p><p>If your business is not in that answer, you are invisible to that person. Not because your food is bad or your service is poor. Just because the AI did not know enough about you to mention you.</p><p>We are all learning to optimise for Google. But AI responses are reaching every corner of the world right now, and most businesses have not even started thinking about this yet.</p><p>That is what a dinner discussion with my friends made me think about.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22a8c755b24b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RNNs vs TCNs: Why the Way a Model Reads Time Actually Matters]]></title>
            <link>https://medium.com/@naflanawas/rnns-vs-tcns-why-the-way-a-model-reads-time-actually-matters-0e4445bfa9a2?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e4445bfa9a2</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[signal-processing]]></category>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 06:52:26 GMT</pubDate>
            <atom:updated>2026-06-10T06:52:26.372Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rekumXsK5VM93f6OwSRT9Q.png" /></figure><p>Audio is not like a photo. A photo exists all at once. Audio unfolds. One moment leads to the next, and the meaning of any single moment often depends on what came before it. A short burst of sound means something very different depending on whether it followed silence or followed another burst.</p><p>This is what makes audio classification genuinely hard. The model does not just need to understand what is happening. It needs to understand what is happening in the context of everything that already happened.</p><p>Recurrent Neural Networks (RNN) were built specifically for sequences. They were the natural choice for audio, speech, and anything that moved through time. Then something shifted. A different architecture came along, did the same job better, and did it faster. Understanding why that shift happened tells you something important about how we think about time in machine learning.</p><h4>The Intuition Behind Recurrent Networks</h4><p>Imagine reading a sentence one word at a time, and after each word you update a small notepad that summarises everything you have read so far. When you reach the next word, you look at the notepad and the new word together before deciding what to write next. That notepad is your memory of the sequence.</p><p>This is essentially what an RNN does. It processes one timestep at a time and carries a hidden state forward from each step to the next. At every point in the sequence, the model has access to the current input and a compressed summary of everything before it.</p><p>For short sequences, this works well. The notepad stays relevant. The model remembers what it needs to.The problem appears when sequences get long.</p><h4>The Vanishing Gradient Problem</h4><p>Training a neural network means adjusting its weights based on error signals that flow backwards through the network. This process is called backpropagation. In a recurrent network, those error signals have to travel backwards through every timestep in the sequence.</p><p>Think of it like a game of telephone. A message starts at the end of a long chain and gets passed backwards from person to person. By the time it reaches the beginning, it has been distorted so many times that it barely resembles the original. The people at the start of the chain receive almost no useful signal.</p><p>This is the vanishing gradient problem. Error signals shrink as they travel back through time. The earlier parts of the sequence stop receiving meaningful updates. The model effectively forgets that the beginning of the sequence ever existed.</p><p>For audio, this is a serious issue. Breathing patterns, speech rhythm, and many other audio signals carry information across relatively long time windows. If the model cannot reliably connect what happened early in a recording to what is happening now, it misses the important things that defines the signal.</p><p>LSTMs were designed to address this. They introduced a more sophisticated memory mechanism with gates that control what to remember, what to forget, and what to pass forward. They helped significantly. But they did not fully solve the problem, and they introduced new ones.</p><h4>The Hidden Cost of Processing One Step at a Time</h4><p>LSTMs are better at remembering. But they are still fundamentally sequential. Each timestep depends on the previous one. You cannot process step 50 until you have finished step 49. You cannot parallelise the computation across time.</p><p>For training on modern hardware, this is a real bottleneck. GPUs are designed to do many things at once. A sequential model that insists on processing one step at a time cannot take full advantage of that parallelism. Training is slow. Scaling to longer sequences makes it slower.</p><p>There is also a subtler issue. Because the hidden state is a fixed-size vector that gets overwritten at every step, the model is constantly making decisions about what to keep and what to discard. For long recordings with complex temporal structure, this compression becomes lossy in ways that are hard to control.</p><h4>A Different Way to Think About Time</h4><p>Temporal Convolutional Networks (TCN) take a completely different approach.Instead of reading a sequence step by step, a TCN looks at the entire sequence at once using convolutional filters. A filter slides across the time axis and captures local patterns within its window. Stack enough layers and the model can capture patterns across longer and longer spans of time.</p><p>The key ingredient is dilated convolutions. A standard convolution looks at consecutive timesteps. A dilated convolution skips across the sequence with gaps, like reading every second or every fourth element rather than every one. This sounds like it would lose information, but it actually allows the model to cover a much wider span of time with the same number of operations.</p><p>A useful way to picture this is to think about how you read a long article when you are short on time. You do not read every word in order. You skim. You pick up key phrases spread across the page and build a reasonable understanding of the whole thing. A dilated convolution does something structurally similar. It samples at intervals that grow with each layer, building a progressively wider view of the sequence.</p><p>Because convolutional operations can be applied to all positions in the sequence simultaneously, TCNs train much faster than recurrent networks. The parallelism that GPUs are built for is now being used properly.</p><h4>Seeing Multiple Timescales at Once</h4><p>Audio signals often contain structure at more than one timescale simultaneously. A breath gesture has fine-grained texture within each frame and a broader shape that plays out over the full duration. A spoken word has phoneme-level detail and word-level rhythm. These are not the same thing and they do not live at the same temporal scale.</p><p>A standard TCN with a single dilation rate sees the sequence at one scale. It captures either the fine detail or the broad shape, depending on how its filters are configured, but not both at once.</p><p>Multi-scale TCNs solve this by running several parallel branches with different dilation rates at the same time. One branch might look at fine-grained local patterns. Another looks at medium-range structure. A third looks at long-range shape. The outputs from all branches are then combined.</p><h4>Where Recurrent Networks Still Hold Their Ground</h4><p>None of this means RNNs are obsolete. They still have genuine strengths.</p><p>For tasks where the model needs to generate output one step at a time, such as text generation or speech synthesis, the sequential nature of recurrent networks is not a bug but a feature. The model produces each output conditioned on everything before it, which is exactly the right behaviour.</p><p>For very long sequences where memory across hundreds or thousands of steps is genuinely necessary, well-designed recurrent architectures can sometimes outperform convolutional ones. And for small datasets where training speed is less of a concern, the difference in parallelism matters less.</p><p>The honest answer is that neither architecture is universally better. The question is always what your signal looks like, how long your sequences are, and what aspect of time your task depends on.</p><h4>The Takeaway</h4><p>Recurrent networks were the right instinct. Audio is sequential, and building a model that reads sequences made intuitive sense. But the implementation came with costs that only became clear at scale. Slow training, gradient decay across long sequences, and poor parallelism limited how far the approach could go.</p><p>Temporal convolutional networks addressed those costs not by improving recurrent processing but by replacing it entirely. Parallel computation, dilated receptive fields, and multi-scale branches gave models a new way to understand time without the baggage that recurrence brought with it.</p><p>The shift from RNNs to TCNs was not just a performance upgrade. It was a different philosophy about what it means for a model to understand a sequence. Instead of reading one step at a time and hoping the memory holds, the model looks at everything at once from multiple distances simultaneously.</p><p>For anyone working with sequential audio signals, understanding that difference is not optional. It is where good architectural decisions come from.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e4445bfa9a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Waveforms to Spectrograms: How Machines Learned to Hear]]></title>
            <link>https://medium.com/@naflanawas/from-waveforms-to-spectrograms-how-machines-learned-to-hear-6338a5c6097a?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6338a5c6097a</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[signal-processing]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 08:47:36 GMT</pubDate>
            <atom:updated>2026-06-07T08:47:36.630Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_It78JR35q2MmXkegv-pA.png" /></figure><p>If you have ever built an image classifier, you know what your input looks like. A grid of pixels. Clean, structured, easy to visualise. Audio is not like that.</p><p>Audio is a wave. A single second of audio recorded at 16,000 Hz gives you 16,000 numbers, each one representing how much air pressure hit a microphone at that moment in time. Feed that raw sequence into a neural network and it will struggle. Not because the information is not there, but because the representation is terrible for learning.</p><p>This is the core problem that audio machine learning has been trying to solve for decades. How do you take a raw waveform and turn it into something a model can actually learn from?</p><p>The answer has changed dramatically over time. And understanding that evolution tells you a lot about how we think about signals, features, and what machines actually need to learn well.</p><h4>The Early Days: Handcrafted Features</h4><p>Before deep learning, engineers made decisions about what mattered in a signal. They studied the physics of sound, thought carefully about what properties might separate one audio class from another, and then computed those properties by hand.</p><p>Three features dominated this era.</p><ol><li><strong>Zero Crossing Rate</strong> counts how many times the signal crosses the zero line within a short frame of audio. A noisy, chaotic signal crosses zero constantly. A smooth tone barely crosses at all. This turns out to be surprisingly useful for separating voiced speech from unvoiced sounds, or silence from activity.</li><li><strong>Spectral Centroid</strong> computes the centre of mass of the frequency content in a frame. If most of the energy sits in high frequencies, the centroid is high. If the signal is deep and bass-heavy, the centroid is low. Musicians intuitively understand this as brightness.</li><li><strong>Short-Time Energy</strong> simply measures how loud a frame is. You take a short window of samples, square them, and sum. This captures whether anything is happening at all, which is useful for detecting speech, breathing, or any kind of intentional sound against a quiet background.</li></ol><p>These features are fast to compute, easy to interpret, and still used today in lightweight systems. But they share a fundamental problem. You are deciding what matters before you train anything. If your hypothesis about what separates the classes is wrong, your features will not help your model no matter how good the classifier is.</p><p>For simple tasks like detecting silence versus sound, this works fine. For anything more complex, it falls apart quickly.</p><h4>MFCCs: The Feature That Ran Speech Recognition for Decades</h4><p>In the 1980s, researchers developed a feature called the Mel Frequency Cepstral Coefficient (MFCC). It became the backbone of almost every speech recognition system for the next thirty years.</p><p>To understand MFCCs, three ideas are worth unpacking.</p><ol><li>The first is the <strong>Fourier transform</strong>. Any signal, no matter how complex, can be decomposed into a sum of simple sine waves at different frequencies. The Fourier transform does exactly this. It takes your time-domain waveform and converts it into a frequency-domain representation, showing you how much energy exists at each frequency at a given moment.</li><li>The second is the <strong>Mel scale</strong>. Human hearing does not respond linearly to frequency. We are very sensitive to differences between 200 Hz and 400 Hz, but we can barely tell 8,000 Hz from 8,200 Hz apart. The Mel scale compresses the frequency axis to match this perceptual sensitivity. Lower frequencies get more resolution, higher frequencies get less.</li><li>The third is the <strong>cepstrum</strong>. After applying the Mel filter bank, researchers found that taking the logarithm and then applying a second Fourier transform (the discrete cosine transform) produces a compact set of coefficients that capture the overall shape of the spectrum while removing fine-grained frequency details. The result is typically 13 numbers per frame.</li></ol><p>For speech, this was a brilliant design. The human vocal tract produces sound through resonances, and MFCCs capture those resonances efficiently. They are compact, computationally cheap, and robust to many recording conditions.</p><p>The problem is that MFCCs were designed for speech. They assume that the spectral envelope is what matters, and they aggressively compress away temporal information. Each frame becomes an independent 13-dimensional vector. The relationship between frames, the way a signal evolves over time, is mostly discarded.</p><p>For signals defined by their temporal evolution rather than their spectral shape, MFCCs are a poor fit. Breathing gestures, for example, are distinguished almost entirely by how they change over time. A short puff and a long puff have very similar spectral content. What separates them is duration and the trajectory of their energy envelope. MFCCs largely throw that information away.</p><h4>Mel Spectrograms: Keeping the Full Picture</h4><p>The shift from MFCCs to Mel spectrograms was essentially a decision to stop compressing.</p><p>A spectrogram is what you get when you apply the Short-Time Fourier Transform to a signal and visualise the result. The x-axis is time, the y-axis is frequency, and the colour at each point represents how much energy exists at that frequency at that moment. It is a two-dimensional map of how sound evolves.</p><p>Apply the Mel scale to the frequency axis, take the logarithm of the energy values for perceptual scaling, and you have a log-Mel spectrogram.</p><p>What you gain is the full temporal-spectral picture. A deep learning model can look at a Mel spectrogram the same way a convolutional network looks at an image. It can learn which patterns in time and frequency correspond to which classes, without you having to specify what those patterns are in advance.</p><p>This is the key philosophical shift. MFCCs encode the hypothesis about what matters. Mel spectrograms let the model form its own hypothesis from the data.</p><p>The tradeoff is size. A Mel spectrogram is a full 2D matrix, typically 64 or 128 frequency bins by however many time frames your audio contains. That is orders of magnitude larger than 13 MFCC coefficients per frame. You need more compute and more data to train effectively.</p><p>But as GPUs became cheaper and datasets grew larger, that tradeoff became increasingly acceptable. Today, Mel spectrograms are the dominant input representation for most audio deep learning work.</p><h4>Delta Features: Teaching the Model About Motion</h4><p>A Mel spectrogram captures where energy is at each moment. It does not directly capture how energy is changing across time.</p><p>For many audio tasks, that change is exactly what matters.</p><p>Delta features solve this by computing the derivative of the spectrogram across the time axis. At each frame, instead of just knowing the energy value, you also know how quickly it is rising or falling. This is sometimes called the velocity of the signal.</p><p>Delta-delta features go one step further and compute the second derivative. This captures acceleration, whether the rate of change is itself speeding up or slowing down.</p><p>The standard approach is to stack the original Mel spectrogram with its delta and delta-delta along a channel dimension. The result is a 3-channel input with shape (3, frequency bins, time frames). For anyone familiar with image models, this is directly analogous to the three colour channels of an RGB image. The model receives not just a snapshot of the signal, but also its motion and its momentum.</p><p>For any signal where duration, rate of change, and temporal shape are discriminative, this stacking makes a significant difference. A short breath puff and a long breath puff may look spectrally similar in a single frame. But their delta patterns over time tell a completely different story.</p><h4>Where Things Are Now: Learned Representations</h4><p>Over the last few years, a new approach has emerged. Instead of designing a feature extraction pipeline at all, some models learn the representation directly from raw audio.</p><p>wav2vec 2.0 from Meta learns speech representations from hundreds of thousands of hours of unlabelled audio. Whisper from OpenAI trains on a massive multilingual dataset and builds internal representations without any handcrafted features. Audio Spectrogram Transformers treat a Mel spectrogram as a sequence of patches and process it with a transformer, learning rich contextual relationships across the entire signal.</p><p>These models are powerful. On large, well-resourced tasks, they outperform everything that came before.</p><p>But they come with real costs. They require enormous amounts of data to train from scratch. They are computationally heavy. And they are difficult to interpret. When something goes wrong, it is not obvious why.</p><p>For many practical research tasks, particularly those with limited data, specific signal types, or real-time constraints, the classic pipeline of Mel spectrogram plus delta features plus a purpose-built model still holds up extremely well. It is faster, more interpretable, and easier to reason about when you need to debug or explain your system.</p><h4>The Takeaway</h4><p>Every feature extraction choice is a hypothesis about your signal.</p><p>Handcrafted features said we know which properties matter, so let us compute them directly. MFCCs said spectral shape is what separates audio classes, so let us compress everything else away. Mel spectrograms said keep the full time-frequency picture and let the model decide. Delta features said motion matters as much as position. Learned representations say given enough data, do not decide anything in advance.</p><p>None of these is universally correct. The right choice depends on your signal type, the size of your dataset, your compute budget, and whether you need to explain what your model is doing.</p><p>Understanding the evolution is not just historical trivia. Each step in this timeline was driven by a real limitation in the previous approach. Knowing those limitations helps in making better decisions about where to start and when to stop.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6338a5c6097a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do University Students Need a Smarter Way to Record Lectures?]]></title>
            <link>https://medium.com/@naflanawas/do-university-students-need-a-smarter-way-to-record-lectures-586076f85cd7?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/586076f85cd7</guid>
            <category><![CDATA[edtech]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 11:10:28 GMT</pubDate>
            <atom:updated>2026-03-02T11:10:28.314Z</atom:updated>
            <content:encoded><![CDATA[<h3>Do University Students Need a Smarter Way to Record Lectures? Exploring a Wearable AI Study Assistant</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDHObBeC4_PjViEHREVJRQ.png" /></figure><p>If you’re a university student, you already know the feeling:</p><p>You walk into a lecture with good intentions.Five minutes in, the lecturer speeds up. Slides fly. Your handwriting becomes unreadable.<br>You tell yourself, <em>“It’s fine… I’ll catch up later.”</em></p><p>Later becomes:</p><ul><li>“I forgot what this meant.”</li><li>“Where did I save that voice note?”</li><li>“Why is the audio mostly chair noises?”</li><li>“I’ll rewatch it tomorrow.” (You don’t.)</li></ul><p>So here’s a simple question: <strong>do we need a smarter way to capture lectures without turning studying into a second full-time job?</strong></p><p>This blog explores the idea behind UniBand — a wearable AI lecture companion concept designed around one goal to help students capture lectures cleanly, and turn them into usable study material fast.</p><h4>The real problem isn’t “note-taking” — it’s information loss</h4><p>I don’t think students struggle because they’re lazy. I think they struggle because lectures are built for listening and understanding, while studying requires capturing and revisiting content.</p><p>In one lecture, you’re expected to listen, understand, decide what matters, write fast enough, copy slide content, capture examples, and still not miss the next point while finishing the previous one. That’s not “bad time management.” That’s cognitive overload.</p><p>And when you miss key explanations, you don’t just miss notes, you miss the <em>connections</em> that make the topic make sense.</p><h4>What students do today (and why it still feels messy)</h4><p>Most students already try to solve this. Common “solutions” include:</p><p><strong>1) Voice recording on a phone</strong></p><p>It’s quick, but</p><ul><li>audio quality is inconsistent (distance + noise)</li><li>re-listening takes forever</li><li>you still have to manually extract the important parts</li></ul><p><strong>2) Recording with a laptop/tablet</strong></p><p>Better quality sometimes, but</p><ul><li>not always practical in crowded lecture halls</li><li>still doesn’t solve the “turn it into notes” problem</li></ul><p><strong>3) AI transcription apps (Otter-style tools, meeting transcribers, etc.)</strong></p><p>These are powerful, but students often run into:</p><ul><li>minute limits / paywalls during peak exam season</li><li>transcripts that feel like a wall of text</li><li>no “student-first” flow (topics, definitions, exam-focused summaries, flashcards)</li></ul><p><strong>4) Asking friends for notes</strong></p><p>Helpful sometimes, but</p><ul><li>everyone misses different things</li><li>you lose your own understanding of how the lecture progressed</li></ul><p>So the issue isn’t that tools don’t exist.It’s that most tools don’t match how students actually study.</p><h4>What a “student-first” solution should do</h4><p>If we design around real student pain, a good lecture capture system should:</p><ul><li>be effortless in class (minimal distraction)</li><li>capture audio clearly, even in noisy halls</li><li>convert speech into structured notes, not just transcripts</li><li>highlight key definitions, examples, and exam hints</li><li>let you search by topic (“enzymes”, “Porter’s 5 forces”, “binary trees”)</li><li>create quick revision outputs (summaries, flashcards, quiz questions)</li><li>keep everything organized by module/week</li></ul><p>That’s the exact gap UniBand is meant to explore.</p><h4>Introducing UniBand: a wearable AI lecture companion</h4><p>UniBand is a proposed wearable concept built around a simple workflow:</p><p><strong>During the lecture</strong></p><p>You tap once → it records clean audio.</p><p>No app switching. No messy file names. No “wait, did it start recording?” anxiety. Just a simple flow like:<br><strong>Module → Week → Lecture.</strong></p><p><strong>After the lecture</strong></p><p>UniBand processes the recording and generates:</p><ul><li>a searchable transcript</li><li>a clean summary (short + detailed)</li><li>key points and headings</li><li>timestamps for important moments</li><li>optional revision outputs (flashcards / quiz questions)</li></ul><p>Basically, it turns:<br><strong>“I recorded something”</strong><br>into:<br><strong>“I now have study material.”</strong></p><h4>Why wearable? (the part I find interesting)</h4><p>A wearable isn’t about looking cool, it’s about removing friction.A lot of students don’t record because they forget, it’s distracting, or they worry about storage/battery. A wearable concept could make recording quick, discreet, and consistent something you can do automatically without turning the lecture into a tech task.</p><h4>Where existing systems fall short (and what UniBand tries to fix)</h4><p>Here are the common gaps UniBand is designed around:</p><ol><li><strong>“A transcript isn’t enough”</strong></li></ol><p>Most transcripts are too long and too raw.UniBand focuses on <strong>structured learning outputs </strong>like<strong> </strong>headings, key concepts, examples and “what you should revise” sections.</p><p><strong>2. “Everything is scattered”</strong></p><p>Students have notes in one app, recordings in another, summaries somewhere else.UniBand is meant to be an <strong>organized system </strong>of module folders, week-based grouping and searchable library</p><p><strong>3. “Reviewing takes too long”</strong></p><p>A 60-minute lecture replay is a time trap.UniBand pushes the workflow toward 5–10 minute summaries, key timestamps and quick revision packs.</p><p><strong>4. “Classroom audio is messy”</strong></p><p>Lecture halls aren’t podcast studios.UniBand as a concept prioritizes noise handling (crowd, chairs, fan noise), clearer speaker focus and better extraction of “main content”.</p><h4>Real-world student use cases</h4><p>UniBand isn’t just for students who skip lectures. It’s for students who want to learn better.</p><ul><li><strong>Fast-talking lectures:</strong> you stay present instead of panic-writing</li><li><strong>STEM/technical modules:</strong> capture explanations you can’t write fast enough</li><li><strong>Non-native accents / mixed language contexts:</strong> re-check confusing parts later</li><li><strong>Revision season:</strong> turn 10 lectures into searchable notes and summaries</li><li><strong>Students with attention/processing challenges:</strong> remove the pressure to keep up manually</li></ul><h4>Privacy Concerns</h4><p>Any lecture recording solution must take policies seriously. UniBand assumes:</p><ul><li>the student uses recordings for <strong>personal study</strong></li><li>the system encourages <strong>consent where needed</strong></li><li>recordings aren’t shared publicly</li><li>controls exist for deleting content and managing access</li></ul><h4>Want to see the UniBand concept marketing site?</h4><p>Here’s the UniBand marketing website:<br><strong>👉 UniBand — Wearable AI Lecture Companion (</strong><a href="https://uniband.vercel.app/">https://uniband.vercel.app/</a><strong>)</strong></p><h4>Final thought</h4><p>This is still a concept, but the struggle behind it is real.Therefore I want your opinion:</p><ol><li><strong>If UniBand existed, would you actually use something like this for your lectures?If yes, what’s the one feature it must have to be worth using?</strong></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=586076f85cd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Explainability Builds Trust in AI Models]]></title>
            <link>https://medium.com/@naflanawas/how-explainability-builds-trust-in-ai-models-02c7f7b663a1?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/02c7f7b663a1</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[explainability]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 06:56:30 GMT</pubDate>
            <atom:updated>2025-08-19T06:56:30.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9zjPjlRlOmEX-hVUXP0PaQ.png" /></figure><p>In my recent exploration of AI applications for assistive technologies, I observed a recurring challenge: <strong>highly accurate models do not automatically translate into trust or adoption</strong>.</p><p>During experiments with deep learning models on biomedical signals, I noticed that end-users and domain experts often hesitated to rely on predictions without clear explanations. This hesitation aligns with research.For example, an IBM Research (2022) survey found that 65% of clinicians prefer AI systems that offer interpretability alongside predictions.</p><p>The lesson is clear: in domains where decisions have direct human impact, accuracy alone is insufficient.</p><p>To address this, I explored several <strong>explainable AI (XAI) </strong>techniques, including Grad-CAM, LIME, and SHAP. These methods highlight the features or input regions influencing model outputs. Even in preliminary experiments, explanations helped me understand why models made certain predictions and more importantly, they showed how interpretability can bridge the gap between AI and human oversight.</p><p>From my perspective, explainability is not just a technical add-on. It is central to responsible AI deployment. Models that combine strong performance with transparency are more likely to be trusted, adopted, and applied safely in real-world scenarios.</p><h4>A Simple Example: Iris Flowers and SHAP</h4><p>My real experiments deal with biomedical signals, which are complex and not very beginner-friendly to visualize. To make the principle clearer, let’s turn to a classic dataset in machine learning: the Iris dataset.</p><p>This dataset describes three types of iris flowers, using four features:</p><ul><li>Sepal length</li><li>Sepal width</li><li>Petal length</li><li>Petal width</li></ul><p>The task is to predict the flower’s species based on these features.</p><h4>Step 1: Train a Classifier</h4><p>We’ll train a Random Forest classifier, a robust ensemble method, and evaluate its accuracy.</p><pre>from sklearn.datasets import load_iris<br>from sklearn.model_selection import train_test_split<br>from sklearn.ensemble import RandomForestClassifier<br>from sklearn.metrics import accuracy_score<br>import pandas as pd<br><br># Load dataset<br>iris = load_iris()<br>X = pd.DataFrame(iris.data, columns=iris.feature_names)<br>y = iris.target<br><br># Split data<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<br><br># Train Random Forest<br>model = RandomForestClassifier(n_estimators=50, max_depth=3, random_state=42)<br>model.fit(X_train, y_train)<br><br># Accuracy<br>y_pred = model.predict(X_test)<br>print(&quot;Test Accuracy:&quot;, accuracy_score(y_test, y_pred))</pre><p>The model achieves very high accuracy, often close to <strong>1.0</strong>. But again, high accuracy alone doesn’t explain <em>why</em> predictions are made.</p><h4>Step 2: Global Explanation with SHAP</h4><p>SHAP (SHapley Additive exPlanations) uses game theory to assign importance values to each feature. We can use it to see which features are most important overall:</p><pre>import shap<br>import matplotlib.pyplot as plt<br><br>explainer = shap.TreeExplainer(model)<br>shap_values = explainer.shap_values(X_test)<br><br># Summary plot<br>shap.summary_plot(shap_values, X_test, feature_names=X.columns)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rYWSFk92Qq9CdhIiA_VflA.png" /><figcaption>SHAP summary plot showing global feature importance for the Iris dataset.</figcaption></figure><p>This is the result I got while exploring which features matter most overall. The plot shows petal length and petal width strongly influence predictions, while sepals matter less.</p><p>👉 In simple terms: the model mostly decides flower species based on petal size. This global view helps us understand the overall logic of the model.</p><h4>Step 3: Local Explanation with SHAP</h4><p>We can also explain an individual prediction. This is particularly useful when a user wants to know <em>why the model predicted what it did</em> for a specific case.</p><pre># Pick one sample flower<br>sample_index = 0<br>sample = X_test.iloc[sample_index]<br><br># Force plot for a single prediction<br>shap.force_plot(<br>    explainer.expected_value[0],<br>    shap_values[0][sample_index],<br>    sample,<br>    matplotlib=True<br>)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5uUwaxXBMWUQz38skxJ2A.png" /><figcaption>SHAP force plot explaining a single Iris flower prediction.</figcaption></figure><p>This is the result I got while checking why the model made one specific prediction. Here I picked a single flower from the test set and generated a force plot.</p><p>In this case:</p><ul><li><strong>Petal length = 4.7 cm</strong> and <strong>petal width = 1.2 cm</strong> strongly push the model toward the predicted species (shown in red).</li><li><strong>Sepal length = 6.1 cm</strong> contributes, but less strongly (shown in weaker pushes).</li><li>The model starts with a base expectation (like a neutral guess) and each feature shifts the prediction step by step until it lands on the final answer.</li></ul><p>👉 In simple terms: for this flower, the petal size was the key reason the model got the species right.</p><p>This is precisely the type of explanation that builds trust at the individual prediction level.</p><h4>Why This Matters Beyond Flowers</h4><p>Although this example uses flowers, the same principle applies in real-world domains:</p><ul><li><strong>Healthcare</strong>: A prediction of “possible heart disease” could be explained by high cholesterol and abnormal ECG patterns.</li><li><strong>Finance</strong>: A loan rejection might be explained by low income and poor credit score.</li><li><strong>Assistive Technologies</strong>: In my biomedical experiments, SHAP can reveal which sensor signals triggered an AI-driven alert.</li></ul><p>This transparency matters because it builds trust. Users don’t just see what the AI predicted, they also see why.</p><h4>Conclusion</h4><p>The Iris dataset example may look simple, but the lesson is profound: AI models must be not only accurate, but also explainable. Accuracy gets attention, but explainability earns trust. In domains like healthcare, finance, and assistive technologies, that trust can make the difference between adoption and abandonment.</p><p>My own experiments with biomedical signals continue to show the same pattern: clinicians and end-users engage more confidently with AI systems when they can see <em>why</em> a decision was made. This combination of performance and transparency is what transforms AI from a black box into a trustworthy partner.</p><p>This is just the beginning of my journey into explainable AI for assistive technologies. In future updates, I’ll share how these techniques scale to real biomedical data, where interpretability is not just desirable, but essential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02c7f7b663a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Practical Guide to Docker Compose for Node.js Developers]]></title>
            <link>https://medium.com/@naflanawas/a-practical-guide-to-docker-compose-for-node-js-developers-5c4d54063449?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c4d54063449</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Sat, 24 May 2025 10:05:50 GMT</pubDate>
            <atom:updated>2025-05-24T10:05:50.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*RG8aewFe3lNDwvC4TLDSNA.png" /><figcaption>Docker compose</figcaption></figure><p>In my <a href="https://medium.com/@naflanawas/a-beginners-guide-to-containerization-982123e2adba">last article</a>, I introduced you to Docker and how to run a simple app inside a container. If you’ve played around with it, you’ve likely realised that real-world applications often require multiple services a backend, a frontend, a database, and more. Managing all these containers manually can quickly get messy and repetitive. That’s where Docker Compose saves the day.</p><p><strong>What is Docker Compose?</strong></p><p>Docker Compose is a tool that simplifies running applications that require multiple services (for example, a web app and a database). Instead of starting each container manually with complex docker run commands, you describe your services, networks, and volumes in a docker-compose.yml file, then launch everything with one command</p><p><strong>Why Use Docker Compose?</strong></p><ul><li>Simplicity: Manage all your containers with a single file and command.</li><li>Consistency: The same configuration works on any machine.</li><li>Networking: Compose automatically creates a network for your services to communicate.</li></ul><p><strong>Let’s Build a Node.js App + MongoDB with Docker Compose</strong></p><ol><li>Create a folder named docker-compose-app/ and organize it like this:</li></ol><pre>## Step 1: Project Structure<br><br>docker-compose-app/<br>├── app.js<br>├── Dockerfile<br>└── docker-compose.yml</pre><p>2. Inside your docker-compose-app/ folder, run the following commands:</p><pre>npm init -y //Initializes your project with a default package.json file.<br>npm install mongodb //Installs the MongoDB driver for Node.js and adds it to your dependencies.<br><br>This will generate:<br>package.json<br>package-lock.json <br>node_modules/ </pre><p>3. Paste the following code into app.js. It creates an HTTP server and stores a timestamp in MongoDB every time the page is visited.</p><pre>const http = require(&#39;http&#39;);<br>const { MongoClient } = require(&#39;mongodb&#39;);<br><br>const url = &#39;mongodb://mongo:27017&#39;; // &quot;mongo&quot; is the Docker Compose service name<br>const dbName = &#39;mydb&#39;;<br><br>const server = http.createServer(async (req, res) =&gt; {<br>    const client = new MongoClient(url);<br>    try {<br>        await client.connect();<br>        const db = client.db(dbName);<br>        const collection = db.collection(&#39;visits&#39;);<br>        await collection.insertOne({ timestamp: new Date() });<br><br>        const count = await collection.countDocuments();<br>        res.writeHead(200, { &#39;Content-Type&#39;: &#39;text/plain&#39; });<br>        res.end(`Hello from Docker Compose! This page has been visited ${count} times.\n`);<br>    } catch (err) {<br>        res.writeHead(500);<br>        res.end(&#39;Database error!&#39;);<br>    } finally {<br>        await client.close();<br>    }<br>});<br><br>server.listen(3000, () =&gt; {<br>    console.log(&#39;Server running at http://localhost:3000/&#39;);<br>});</pre><p>4. Write this Dockerfile to containerize your Node.js app:</p><pre>FROM node:20-alpine<br>WORKDIR /usr/src/app<br>COPY package*.json ./<br>RUN npm install<br>COPY . .<br>EXPOSE 3000<br>CMD [&quot;node&quot;, &quot;app.js&quot;]</pre><p>5. Define the multi-container setup in docker-compose.yml:</p><pre>version: &#39;3.8&#39;<br>services:<br>  web:<br>    build: .<br>    ports:<br>      - &quot;3000:3000&quot;<br>    depends_on:<br>      - mongo<br>  mongo:<br>    image: mongo:latest<br>    ports:<br>      - &quot;27017:27017&quot;<br>    volumes:<br>      - mongo-data:/data/db<br><br>volumes:<br>  mongo-data:</pre><p>6. From the root directory of your project, run:</p><pre>docker-compose up --build </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBz-Rv6_WElWCeYLW11srA.png" /><figcaption>Docker Desktop indicating active docker_compose service.</figcaption></figure><p>This will:</p><ul><li>This builds the Node app image.</li><li>Starts both the app (web) and MongoDB (mongo).</li><li>The Node app connects to MongoDB using the service name.</li></ul><p>7. Once everything is running, open your browser and visit:</p><pre>http://localhost:3000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CyYVdxm8Kis_ThmwRwxpQw.png" /><figcaption>Successful response from the Node.js app running in a Docker container.</figcaption></figure><p><strong>Docker Compose Commands</strong></p><ol><li>Start services in the background using existing images.</li></ol><pre>docker-compose up -d</pre><p>2. Rebuild images and start services in the foreground.</p><pre>docker-compose up --build</pre><p>3. Rebuild images and start services in detached mode.</p><pre>docker-compose up --build -d</pre><p>4. Stop and remove containers, networks, and volumes created by Compose.</p><pre>docker-compose down</pre><p>5. View running containers managed by Docker Compose.</p><pre>docker-compose ps</pre><p>6. View logs from services.</p><pre>docker-compose logs</pre><p>To recap, we:</p><ul><li>Wrote a simple Node.js server that connects to MongoDB</li><li>Containerized the app with a Dockerfile</li><li>Defined a multi-container setup in docker-compose.yml</li><li>Used Docker Compose to build and run both services</li></ul><p>This setup is a solid starting point for any modern backend or full-stack app. Whether you’re developing locally or preparing for deployment, Docker Compose simplifies multi-container environments and keeps your workflow clean.</p><h3><strong>Bonus Questions &amp; Answers</strong></h3><ol><li>What Does mongodb://mongo:27017 Mean?</li></ol><p>This is a MongoDB connection string that tells your app how to connect to the database. 27017 is the default port MongoDB uses to listen for incoming connections.</p><blockquote>You only need to change it if you manually configure MongoDB to use a different port or run multiple instances.</blockquote><pre>mongodb://mongo:27017<br>│        │       └── Port MongoDB listens on (default: 27017)<br>│        └── Hostname (the Docker Compose service name: &quot;mongo&quot;)<br>└─────── Protocol (MongoDB uses the &quot;mongodb&quot; protocol)</pre><p>2. What is mongo in the URL?</p><p>It refers to the service name defined in your docker-compose.yml</p><pre>services:<br>  mongo:<br>    image: mongo:latest</pre><p>Docker Compose sets up an internal network where services can communicate using their service names.</p><p>So if you renamed the service to mongodb, you’d update your connection string to</p><pre>const url = &#39;mongodb://mongodb:27017&#39;;</pre><blockquote>You can change the hostname, port, and even add authentication, but the structure must follow MongoDB URI format:</blockquote><blockquote>mongodb://&lt;hostname&gt;:&lt;port&gt;/&lt;dbname&gt;?&lt;options&gt;</blockquote><h3><strong>Next Steps</strong></h3><ul><li>Try adding a frontend container (React, Vue, etc.)</li><li>Add authentication to MongoDB</li><li>Use Docker volumes for persistent database storage</li><li>Deploy this stack to a cloud platform</li></ul><p><strong>Happy Composing!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c4d54063449" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Containerization]]></title>
            <link>https://medium.com/@naflanawas/a-beginners-guide-to-containerization-982123e2adba?source=rss-b4c72e726e7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/982123e2adba</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <dc:creator><![CDATA[Nafla Nawas]]></dc:creator>
            <pubDate>Sun, 12 Jan 2025 08:14:31 GMT</pubDate>
            <atom:updated>2025-01-12T08:14:31.067Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5HFfh3-q4oVmRye2Uq0Dww.jpeg" /></figure><p>Docker is a platform that uses <strong>containerization</strong> to package applications and their dependencies into a lightweight, portable unit called a <strong>container</strong>. This ensures that applications run consistently across different environments, whether on a developer’s laptop, a testing server, or a production system.</p><h4>What Are Containers?</h4><p>Containers are lightweight, standalone, and executable packages of software that include everything needed to run an application: code, runtime, libraries, and dependencies. Containers share the host operating system’s kernel, making them more efficient and faster than traditional virtual machines.</p><h4>Difference Between Virtual Machines and Containers</h4><p>Virtual Machines (VMs) run on a hypervisor that virtualizes hardware, while containers run on a container runtime (like Docker) that leverages the host OS kernel.</p><p>VMs include a full guest operating system (OS), libraries, and the application, making them heavyweight. Containers, on the other hand, are lightweight as they only package the application and its dependencies.</p><p>Booting a VM requires starting a full OS, which is slower compared to containers that utilize the host OS kernel for a faster startup.</p><p>VMs are portable but require the same hypervisor or a compatible environment. Containers, however, are highly portable across environments as long as a container runtime is supported.</p><h4>Key Docker Concepts</h4><p>1. Image : A read-only template used to create containers. It contains the application code and all dependencies required to run the application.</p><p>2. Container : A runtime instance of an image. Containers are isolated environments for running applications.</p><p>3. Dockerfile : A text file with instructions to build a Docker image. It specifies the base image, dependencies, and commands to set up the application.</p><p>4. Docker Engine : The core component responsible for creating, managing, and running containers.</p><p>5. Docker Hub : A cloud-based repository for Docker images. It provides access to official images and allows users to upload custom images.</p><h4>Building and Running Your First Docker Container</h4><p>Let’s go through a simple example to create a Docker image for a basic web server and run it as a container.</p><p><strong>Step 1: Create a Project Directory</strong></p><p>Create a directory to hold your project files and navigate to it:</p><pre>mkdir my-docker-app<br>cd my-docker-app</pre><p><strong>Step 2: Write the Application Code</strong></p><p>Create a app.js file with the following content:</p><pre>const http = require(&#39;http&#39;);<br><br>const server = http.createServer((req, res) =&gt; {<br>    res.writeHead(200, { &#39;Content-Type&#39;: &#39;text/plain&#39; });<br>    res.end(&#39;Hello World from Docker!\n&#39;);<br>});<br><br>server.listen(8080, () =&gt; {<br>    console.log(&#39;Server running at http://localhost:8080/&#39;);<br>});</pre><p><strong>Step 3: Prepare for Dependencies</strong></p><p>Ensure you have a package.json file. If you don’t have one, create it with:</p><pre>npm init -y</pre><p>This file will manage your app’s dependencies. Install any required dependencies (e.g., npm install to set them up).</p><p><strong>Step 4: Create the Dockerfile</strong></p><p>Create a Dockerfile in the same directory:</p><pre>touch Dockerfile</pre><p>add the following content to Dockerfile</p><pre># Use the official Node.js image as the base image<br>FROM node:14<br><br># Set the working directory inside the container<br>WORKDIR /usr/src/app<br><br># Copy package.json and install dependencies<br>COPY package*.json ./<br>RUN npm install<br><br># Copy the application source code into the container<br>COPY . .<br><br># Expose port 8080 to access the app<br>EXPOSE 8080<br><br># Command to run the application<br>CMD [&quot;node&quot;, &quot;app.js&quot;]</pre><p><strong>Step 5: Build the Docker Image</strong></p><p>Run the following command to build the Docker image:</p><pre>docker build -t &lt;your-image-name&gt; . //Replace &lt;your-image-name&gt; with a name for your image (e.g:my-app).</pre><p><strong>Step 6: Verify the Image</strong></p><p>List all Docker images to confirm your image was created successfully:</p><pre>docker images</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3D640NH41OI4Rd2XwGQ8w.jpeg" /></figure><p><strong>Step 7: Run the Docker Container</strong></p><p>Start a container using the image you just built:</p><pre>docker run -p 8080:8080 &lt;your-image-name&gt; //Replace &lt;your-image-name&gt; with the name of your image.</pre><p><strong>Step 8: Verify the Container</strong></p><p>Check running containers with:</p><pre>docker ps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZnMumlemkBcdaebZr2lmTg.jpeg" /></figure><p>To see all containers (running and stopped), use:</p><pre>docker ps -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1_bqkHXhRUfxFqPpYw8dA.jpeg" /></figure><p><strong>Step 9: Test the Application</strong></p><p>Open a browser and go to <a href="http://localhost:8080.">http://localhost:8080.</a>You should see the message “Hello World from Docker!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PskOEQLK5eAm1DYX_x2ow.png" /></figure><h4>Other Docker Basic Commands You Should Know</h4><p>Stop a Running Container :</p><pre>docker stop &lt;container-id&gt; //Replace &lt;container-id&gt; with the ID of the running container.</pre><p>Remove a Container:</p><pre>docker rm &lt;container-id&gt; //Replace &lt;container-id&gt; with the ID of the container.</pre><p>Remove an Image:</p><pre>docker rmi &lt;image-name&gt;  //Replace &lt;image-name&gt; with the name of the image.</pre><p>View Logs of a Container:</p><pre>docker logs &lt;container-id&gt; //Replace &lt;container-id&gt; with the ID of the container.</pre><p>I hope you found this guide helpful in understanding Docker and getting started with containerization! When I first started working with Docker, I was amazed at how much easier it made application deployment and testing.If you’re new to Docker, don’t be afraid to experiment and break things — it’s part of the learning process. Try out different commands, build your own images, and explore Docker’s advanced features like networking and volumes.Happy containerizing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=982123e2adba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>