<?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 Naandam Dariem on Medium]]></title>
        <description><![CDATA[Stories by Naandam Dariem on Medium]]></description>
        <link>https://medium.com/@dariemjnr?source=rss-ba58dee28d4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wjmoC59ylVVJPk0b8Jyvyw.png</url>
            <title>Stories by Naandam Dariem on Medium</title>
            <link>https://medium.com/@dariemjnr?source=rss-ba58dee28d4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 02:39:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dariemjnr/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[Three Weeks of React with Scrimba.]]></title>
            <link>https://medium.com/@dariemjnr/three-weeks-of-react-with-scrimba-57529a3ba98a?source=rss-ba58dee28d4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/57529a3ba98a</guid>
            <category><![CDATA[scrimba]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Naandam Dariem]]></dc:creator>
            <pubDate>Thu, 21 May 2026 10:54:44 GMT</pubDate>
            <atom:updated>2026-05-21T10:54:44.652Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C8oWHNBFdoYJcrjh01RTPg.png" /></figure><p>I recently started at a new workplace and the team uses React. No gradual introduction, no “learn at your own pace”. I just needed to get up to speed. So I did what most people do: I went to YouTube. I searched freeCodeCamp, found a video that kept referencing Scrimba, and decided to give it a shot. Three weeks later, here is what I can tell you.</p><p>Scrimba is not like most tutorial platforms. The thing that hooked me immediately is that you can pause any lesson and edit the code directly inside the video. Not in a separate tab, not in a CodePen you set up yourself — right there, in the lesson. For someone learning under real pressure, that removed a lot of friction. I wasn’t just watching someone else build things, I was building alongside them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VK4c87AwA_bQpxWUW3YJQw.png" /><figcaption>Custom Components Challenge</figcaption></figure><p>The first week was genuinely humbling. JSX confused me more than I expected. I kept second-guessing whether I was writing HTML or JavaScript, and the answer: that it’s sort of both, took a while to feel natural. Understanding React.createElement() helped me appreciate what JSX is actually doing under the hood, which made it less mysterious. Then came the question of why React even exists. The lessons on React being composable and declarative were eye-opening. I’d been writing code that told the browser exactly what to do step by step. React flips that thinking entirely.</p><p>By week two I was building actual things. The ReactFacts project was my first taste of putting markup, components, and logic together in one place. Custom components became my focus , understanding how to break a UI into reusable pieces, how to structure them, and how Fragments let you return multiple elements without adding unnecessary nodes to the DOM. There were moments where I stared at my screen wondering why something wasn’t rendering the way I expected, but the course builds on concepts gradually, which meant I was never completely lost.</p><p>Week three is where I am now, currently working through Parent/Child components, how data and structure flow between them. It’s the point where React starts feeling less like a collection of rules and more like a way of thinking. I’m not fast yet, but I’m no longer guessing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EYOGOXCzj6NDvdeL4fjfMg.png" /><figcaption>Parent/Child Components Lesson</figcaption></figure><p>If you’re in a similar situation ; new job, new stack, or just trying to level up, I’d genuinely recommend starting here: <a href="https://scrimba.com/?via=community">https://scrimba.com/?via=community</a>. It won’t do the work for you, but it makes the work feel a lot more manageable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57529a3ba98a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Protection 101: Your Digital Life Just Got a Nigerian Upgrade]]></title>
            <link>https://medium.com/datashield-nigeria/data-protection-101-your-digital-life-just-got-a-nigerian-upgrade-ab24a5b3319e?source=rss-ba58dee28d4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab24a5b3319e</guid>
            <category><![CDATA[data-privacy]]></category>
            <category><![CDATA[data-privacy-act]]></category>
            <category><![CDATA[data-privacy-protection]]></category>
            <category><![CDATA[data-protection]]></category>
            <category><![CDATA[data-privacy-and-security]]></category>
            <dc:creator><![CDATA[Naandam Dariem]]></dc:creator>
            <pubDate>Mon, 08 Sep 2025 17:22:21 GMT</pubDate>
            <atom:updated>2026-01-09T22:14:18.961Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Welcome to DataShield Nigeria — where we make sense of your digital rights, one article at a time</em></p><p>Picture this: You’re scrolling through your phone, casually shopping online, checking your bank balance, and sharing that perfect jollof rice photo on Instagram. In those few minutes, you’ve generated more personal data than a 1990s Nigerian household would in an entire year. The question is who’s watching, who’s collecting, and more importantly, who’s protecting you?</p><p>Welcome to the wild, wonderful world of data protection, Nigerian style.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OYukOWHvpu8kadyf3rLBg.png" /></figure><h3>What Exactly Is Data Protection? (And Why Should You Care?)</h3><p>Think of data protection as the digital equivalent of having a really good security guard for your house. Except this house contains everything about you: your secrets, your money, your embarrassing search history, and yes, even your location when you thought you were being sneaky.</p><p>Data protection is essentially a set of rules and practices designed to:</p><ul><li>Keep your personal information safe from the wrong hands</li><li>Give you control over how your data is used</li><li>Ensure organizations handle your information responsibly</li><li>Provide you with remedies when things go wrong</li></ul><p>It’s like having a constitutional right to privacy, but for the digital age, where your phone knows you better than perhaps you do yourself.</p><h3>The Building Blocks: Key Concepts Made Simple</h3><h3>Personal Data</h3><p>This isn’t just your name and address. Personal data is any information that can identify you, directly or indirectly. Your email, phone number, location data, IP address, and even your shopping preferences, when traced back to you, counts.</p><h3>Data Controller vs. Data Processor</h3><ul><li><strong>Data Controller</strong>: The “boss” who decides what happens to your data (like your bank deciding to send you marketing emails)</li><li><strong>Data Processor</strong>: The employee who handles the data on the “boss’s” behalf (like the email marketing company actually sending those emails)</li></ul><p>Think of it as the difference between the person who orders jollof rice and the chef who cooks it.</p><h3>Consent</h3><p>Remember all those “I agree to terms and conditions” boxes you tick without reading? That’s consent except now, it actually has to mean something. Real consent should be:</p><ul><li><strong>Freely given</strong> (not “agree or leave our platform”)</li><li><strong>Specific</strong> (not “we can do whatever we want with your data”)</li><li><strong>Informed</strong> (not hidden in 50 pages of legal jargon)</li><li><strong>Withdrawable</strong> (you can change your mind)</li></ul><h3>Data Minimization</h3><p>The “take only what you need” principle. If a food delivery app asks for your location, that makes sense if it asks for your mother’s maiden name, your secondary school certificate number, and your blood type, red flag alert.</p><h3>Data Protection in Nigeria: The Before Times</h3><p>Let’s be honest, before 2023, Nigeria’s approach to data protection was like using a wooden door to secure a bank vault. We had bits and pieces:</p><ul><li><strong>The Constitution</strong> gave us some privacy rights (in theory)</li><li><strong>Various sector laws</strong> had scattered provisions</li><li><strong>The Computer Security and Critical Information Infrastructure Protection Act</strong> tried to help</li><li><strong>NITDA’s regulations</strong> made an attempt</li></ul><p>But it was like having multiple security guards who didn’t talk to each other, worked different shifts, and weren’t entirely sure what they were guarding against.</p><p>The result? A digital Wild West where:</p><ul><li>Companies collected data like they were preparing for a drought</li><li>Privacy policies were longer than Nigerian novels and twice as confusing</li><li>Data breaches happened with alarming frequency</li><li>Citizens had little recourse when things went wrong</li></ul><h3>Enter the Game Changer: Nigeria Data Protection Act 2023</h3><p>On June 12, 2023, President Bola Ahmed Tinubu signed the Nigeria Data Protection Act (NDPA) 2023 into law, and suddenly, the game changed completely.</p><p>This isn’t just another law: it’s Nigeria’s digital declaration of independence.</p><h3>What the NDPA 2023 Brings to the Table</h3><p><strong>1. Comprehensive Coverage</strong> Unlike the scattered approach of the past, NDPA 2023 covers everyone: private companies, government agencies, NGOs, and religious organizations. If you handle Nigerian personal data, you’re in the game.</p><p><strong>2. Real Rights for Real People</strong> Nigerian citizens now have enforceable rights:</p><ul><li>Right to know what data is being collected</li><li>Right to access your own data</li><li>Right to correct inaccurate information</li><li>Right to delete your data (the famous “right to be forgotten”)</li><li>Right to move your data to another service provider</li></ul><p><strong>3. Serious Consequences</strong> The law has teeth; big, sharp, expensive teeth. We’re talking fines of up to 10% of annual turnover or ₦50 million, whichever is higher. That’s enough to make any CEO suddenly very interested in data protection.</p><p><strong>4. Nigerian Data Protection Commission (NDPC)</strong> A dedicated regulator with the power to investigate, fine, and even shut down operations. Think of them as the referees in Nigeria’s digital football match, and they’re not afraid to show red cards.</p><h3>What This Means for Your Digital Life</h3><h3>If You’re a Regular Nigerian</h3><p>Your data is no longer fair game for any company with a server and an internet connection. You now have rights, remedies, and a regulator fighting in your corner.</p><h3>If You’re a Business Owner</h3><p>Time to get serious about data protection. This isn’t optional anymore, it’s business survival. But don’t panic; compliance isn’t rocket science, and we’ll be here to guide you through it.</p><h3>If You’re in Tech</h3><p>Welcome to the new normal. Privacy by design isn’t just a nice-to-have; it’s the law. But this also creates opportunities; data protection consulting, privacy tech, and compliance tools are about to become very lucrative fields.</p><h3>The Road Ahead: What We Hope to Achieve</h3><p>The NDPA 2023 isn’t just about protecting data; it’s about building trust in Nigeria’s digital ecosystem. Here’s what we’re aiming for:</p><p><strong>1. Digital Trust Renaissance</strong> When people trust that their data is safe, they’re more willing to engage with digital services. This means more e-commerce, more fintech adoption, and more digital innovation.</p><p><strong>2. Competitive Advantage</strong> Nigerian companies that get data protection right will have a competitive edge, both locally and internationally. “Data protection compliant” is becoming a selling point.</p><p><strong>3. Innovation Catalyst</strong> Clear rules create a level playing field where innovation can flourish. When everyone knows the rules, the best solutions win.</p><p><strong>4. Regional Leadership</strong> Nigeria is positioning itself as a leader in Africa’s digital economy. Strong data protection laws are a key part of that vision.</p><h3>Welcome to DataShield Nigeria</h3><p>This is just the beginning of our journey together. In the coming weeks and months, we’ll be diving deep into:</p><ul><li>Practical compliance guides for businesses</li><li>Your rights as a Nigerian data subject</li><li>Industry-specific data protection challenges</li><li>Global trends and how they affect Nigeria</li><li>Real-world case studies and lessons learned</li></ul><p>Data protection might sound boring, but your digital rights are anything but. In a world where data is the new oil, consider this publication your refinery guide.</p><p>Ready to become a data protection champion? Hit that follow button, because your digital life just got a whole lot more interesting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab24a5b3319e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/datashield-nigeria/data-protection-101-your-digital-life-just-got-a-nigerian-upgrade-ab24a5b3319e">Data Protection 101: Your Digital Life Just Got a Nigerian Upgrade</a> was originally published in <a href="https://medium.com/datashield-nigeria">DataShield Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# Solidity Unchecked Math — Beyond the Basics: Making Gas Optimisation Safe]]></title>
            <link>https://coinsbench.com/solidity-unchecked-math-beyond-the-basics-making-gas-optimisation-safe-513bf4dedd61?source=rss-ba58dee28d4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/513bf4dedd61</guid>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Naandam Dariem]]></dc:creator>
            <pubDate>Fri, 16 May 2025 04:46:21 GMT</pubDate>
            <atom:updated>2025-05-22T13:59:21.727Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Solidity Unchecked Math — Beyond the Basics: Making Gas Optimisation Safe</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SkJvpSqnUOa9lata" /><figcaption>Photo by <a href="https://unsplash.com/@tbonz?utm_source=medium&amp;utm_medium=referral">Emmanuel Edward</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Last week, I stared at my Ethereum gas costs and winced. Another deployment, another small fortune spent. That’s when I decided to dig deeper into one of Solidity’s more nuanced features: the `unchecked` block.</p><p>You see, while most Solidity developers know about `unchecked` math for gas optimisation, few take the time to build proper safety mechanisms around it. Today, I want to share a journey that led me to create the `EnhancedSafeMathTester` contract — a demonstration of how we can have our cake (gas savings) and eat it too (security).</p><p><strong>## The Gas Problem</strong></p><p>For those new to Solidity development, every operation costs gas. Since Solidity 0.8.0, arithmetic operations automatically check for overflows and underflows — a great security feature, but one that comes with a gas cost.</p><p>Consider a simple loop:</p><pre>```solidity<br>for (uint i = 0; i &lt; array.length; i++) {<br>// Do something<br>}<br>```</pre><p>Every increment of `i` includes an overflow check that we rarely need. In a large loop, these checks add up quickly.</p><p><strong>## The Unchecked Solution (And Its Problems)</strong></p><p>Enter `unchecked` blocks:</p><pre>```solidity<br>for (uint i = 0; i &lt; array.length;) {<br>// Do something<br>unchecked { i++; }<br>}<br>```</pre><p>This saves gas, but removes an important safety net. If used carelessly, `unchecked` can lead to vulnerabilities like the infamous integer overflow attacks that plagued earlier smart contracts.</p><p>I wanted to develop patterns for using `unchecked` safely in various scenarios. That’s what led me to build the `EnhancedSafeMathTester`.</p><p><strong>## Building the EnhancedSafeMathTester</strong></p><p>My approach was methodical. First, I needed a variable that would let me demonstrate overflow issues — a `uint8` initialized near its maximum value seemed perfect:</p><pre>```solidity<br>uint8 public bigNumber = 225;<br>```</pre><p>With a maximum value of 255, this gives us enough room to work with but is close enough to the edge to demonstrate potential problems.</p><p>I then implemented multiple approaches to handling arithmetic, each with different safety/gas tradeoffs:</p><p><strong>### 1. The Deliberately Unsafe Method</strong></p><pre>```solidity<br>function unsafeAdd() public whenNotStopped {<br>uint8 oldValue = bigNumber;<br>unchecked {<br>bigNumber += 1;<br>}<br>emit ValueChanged(oldValue, bigNumber, &quot;unsafeAdd&quot;);<br>}<br>```</pre><p>This function demonstrates what not to do — using `unchecked` with no safety mechanisms. I included it as a warning and for comparison.</p><p><strong>### 2. Pre-operation Validation</strong></p><pre>```solidity<br>function safeAdd(uint8 x) public whenNotStopped {<br>// Manual check before performing unchecked operation<br>require(bigNumber &lt;= 255 - x, &quot;Addition would overflow&quot;);<br>uint8 oldValue = bigNumber;<br>unchecked {<br>bigNumber += x;<br>}<br>emit ValueChanged(oldValue, bigNumber, &quot;safeAdd&quot;);<br>}<br>```</pre><p>Here, we manually validate that the operation won’t overflow before executing it. This gives us gas savings while maintaining safety.</p><p><strong>### 3. Bounded Operations</strong></p><pre>```solidity<br>function boundedIncrement() public whenNotStopped {<br>uint8 oldValue = bigNumber;<br>unchecked {<br>// Ensure value stays within bounds<br>if (bigNumber &lt; 255) {<br>bigNumber += 1;<br>}<br>}<br>emit ValueChanged(oldValue, bigNumber, &quot;boundedIncrement&quot;);<br>}<br>```</pre><p>This approach uses a condition inside the `unchecked` block to prevent overflow. It’s particularly useful for incrementing counters.</p><p><strong>### 4. Mathematical Boundary Checking</strong></p><pre>```solidity<br>function doubleIfSafe() public whenNotStopped {<br>// Ensure doubling won&#39;t overflow<br>require(bigNumber &lt;= 127, &quot;Doubling would overflow&quot;);<br>uint8 oldValue = bigNumber;<br>unchecked {<br>bigNumber *= 2;<br>}<br>emit ValueChanged(oldValue, bigNumber, &quot;doubleIfSafe&quot;);<br>}<br>```</pre><p>For multiplication, we need different checks. This function ensures the value can be safely doubled.</p><p><strong>## Adding Safety Mechanisms</strong></p><p>Arithmetic safety isn’t enough. I also implemented several additional security patterns:</p><p><strong>### 1. Emergency Circuit Breaker</strong></p><pre>```solidity<br>bool public emergencyStop = false;<br>modifier whenNotStopped() {<br>require(!emergencyStop, &quot;Contract is paused&quot;);<br>_;<br>}<br>function toggleEmergencyStop() public onlyOwner {<br>emergencyStop = !emergencyStop;<br>emit EmergencyToggled(emergencyStop);<br>}<br>```</pre><p>This allows for pausing functionality if something goes wrong — a critical safety mechanism for any production contract.</p><p><strong>### 2. Access Control</strong></p><pre>```solidity<br>address public owner;<br>modifier onlyOwner() {<br>require(msg.sender == owner, &quot;Not authorized&quot;);<br>_;<br>}<br>```</pre><p>Limiting sensitive functions to authorized users is a basic but essential security pattern.</p><p><strong>### 3. Event Monitoring</strong></p><pre>```solidity<br>event ValueChanged(uint8 oldValue, uint8 newValue, string operation);<br>```</pre><p>Emitting events for all state changes makes it easier to monitor the contract and detect unusual behavior.</p><p><strong>## Real-World Applications</strong></p><p>While my `EnhancedSafeMathTester` is a demonstration contract, these patterns apply to many real-world scenarios:</p><p><strong>### DeFi Protocols</strong></p><p>In DeFi, gas optimization is crucial due to high transaction volumes. Using safe `unchecked` math can significantly reduce costs for users while maintaining security.</p><p><strong>### NFT Minting</strong></p><p>When minting thousands of NFTs, gas savings on counter increments add up quickly. The bounded increment pattern works perfectly here.</p><p><strong>### DAO Voting Systems</strong></p><p>Vote counting often involves large numbers of iterations. Using unchecked math with proper validations can make voting mechanisms more gas-efficient.</p><p><strong>## Testing the Implementation</strong></p><p>Before deploying any contract using these patterns, I always recommend:</p><p>1. Unit tests for each function, testing both normal operation and edge cases</p><p>2. Fuzz testing to catch unexpected input combinations</p><p>3. Formal verification if possible</p><p>4. Gas profiling to confirm the optimizations are working</p><p><strong>## Lessons Learned</strong></p><p>Through building this contract, I learned several important lessons:</p><p>1. <strong>**Safety first, gas optimization second**</strong> — Never optimize until your core functionality is secure</p><p>2. <strong>**Validate before execution**</strong> — Pre-checking conditions makes `unchecked` blocks safe to use</p><p>3. <strong>**Layer security mechanisms**</strong> — Combine multiple patterns for robust protection</p><p>4. <strong>**Document extensively**</strong> — As you can see from my contract comments, clear documentation helps others understand your security approach</p><p><strong>## Conclusion</strong></p><p>Gas optimization doesn’t have to come at the expense of security. With careful planning and proper patterns, we can use features like `unchecked` math blocks safely.</p><p>The `EnhancedSafeMathTester` demonstrates just a few approaches to this balancing act. I hope these patterns prove useful in your own projects, saving gas while keeping your contracts secure.</p><p>Remember — in blockchain development, you’re not just writing code; you’re writing immutable financial logic that can’t be patched once deployed. Take the time to get it right.</p><p><em>*What are your experiences with gas optimization in Solidity? Have you found other patterns for safely using `unchecked` math? Share your thoughts in the comments below!*</em></p><p>— -</p><p><em>*About the author: A passionate smart contract developer focused on secure, gas-efficient implementations for DeFi and Web3 applications.*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=513bf4dedd61" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/solidity-unchecked-math-beyond-the-basics-making-gas-optimisation-safe-513bf4dedd61"># Solidity Unchecked Math — Beyond the Basics: Making Gas Optimisation Safe</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>