<?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 Amy Abafor on Medium]]></title>
        <description><![CDATA[Stories by Amy Abafor on Medium]]></description>
        <link>https://medium.com/@amyabafor013?source=rss-a33dd7d99f01------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IKEKVVmz4TvzCLPFTLQdGw.jpeg</url>
            <title>Stories by Amy Abafor on Medium</title>
            <link>https://medium.com/@amyabafor013?source=rss-a33dd7d99f01------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:46:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amyabafor013/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[WhatsApp Hacked? Don’t Panic — Here’s Your Action Plan]]></title>
            <link>https://medium.com/@amyabafor013/whatsapp-hacked-dont-panic-here-s-your-action-plan-d6f3d54329c7?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6f3d54329c7</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[whatsapp-hacking]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[whatsapp]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 22:52:56 GMT</pubDate>
            <atom:updated>2025-08-04T22:52:56.983Z</atom:updated>
            <content:encoded><![CDATA[<h3>WhatsApp Hacked? Don’t Panic — Here’s Your Action Plan</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XAaqpOUhUVfALmzNxOdPlg.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3914809">Gerd Altmann</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3914809">Pixabay</a></figcaption></figure><p>Getting your WhatsApp hacked can feel overwhelming, but you’re not alone. Whether your phone was stolen or you fell victim to a phishing scam, there’s a clear path to recovery. The key is acting quickly and systematically.</p><h3>Why Speed Matters</h3><p>Once your account is compromised, scammers often send messages to your contacts asking for money or help. Your phone will likely start ringing non-stop as concerned friends and family try to reach you. Remember: people genuinely want to help, which is exactly what scammers exploit.</p><p>You have a responsibility not just to yourself, but to everyone in your contact list. The faster you act, the fewer people will be affected.</p><h3>Your Immediate Action Plan</h3><h3>Step 1: Spread the Word Fast</h3><ul><li><strong>Tell your close friends immediately</strong> — Ask them to warn everyone in your group chats that your account has been compromised</li><li><strong>Answer as many calls as you can</strong> — Yes, it’s overwhelming, but people may send money if they think you’re really in danger and can’t respond</li><li><strong>Send text messages to key contacts</strong> if you still have your phone. Draft a standard message explaining the situation</li></ul><h3>Step 2: Report and Recover</h3><ul><li><strong>Have friends report your number to WhatsApp</strong> — Multiple reports help WhatsApp respond faster</li><li><strong>Uninstall and reinstall WhatsApp</strong> — You’ll lose chat history unless you backed it up, but this is necessary</li><li><strong>Try to reclaim your account</strong> — When you reinstall, WhatsApp should send you a verification code. If you receive it, you can recover your account</li></ul><h3>Step 3: If Simple Recovery Doesn’t Work</h3><ul><li><strong>Contact your mobile service provider</strong> — Explain the situation before taking further action</li><li><strong>Consider blocking your current number</strong> — This prevents scammers from using it on multiple devices</li><li><strong>Get a SIM swap</strong> — Your provider can transfer your number to a new SIM card</li><li><strong>Set up WhatsApp on a clean device</strong> — Use a different phone if possible when reinstalling</li></ul><h3>Step 4: Secure Your Recovered Account</h3><p>Once you regain access:</p><ul><li><strong>Check for unauthorized additions</strong> — Look for unknown phone numbers or email addresses added to your account</li><li><strong>Add your email and verify it</strong></li><li><strong>Enable two-factor authentication (2FA)</strong> — This is crucial for preventing future attacks</li><li><strong>Review your security settings thoroughly</strong></li></ul><h3>Prevention: Your Best Defense</h3><h3>The Golden Rules:</h3><ol><li><strong>Enable two-factor authentication</strong> — This extra layer makes hacking much harder</li><li><strong>Never click suspicious links</strong> — Even from contacts you trust, as their accounts might be compromised</li><li><strong>Never share verification codes</strong> — WhatsApp will never ask for your 6-digit code. No exceptions.</li></ol><h3>Remember: You’ve Got This</h3><p>Being hacked feels violating and stressful, but it’s recoverable. Thousands of people go through this experience and come out stronger on the other side. By acting quickly and following these steps, you’re not just protecting yourself — you’re protecting everyone who cares about you.</p><p>The most important thing? <strong>Don’t panic. Get to work.</strong> Every minute you spend taking action is a minute closer to getting your digital life back under control.</p><p><em>Stay vigilant, stay connected, and remember — your security affects everyone in your network.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6f3d54329c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Tried Vibe Coding with Bolt.new — Here’s My Honest Verdict]]></title>
            <link>https://medium.com/@amyabafor013/i-tried-vibe-coding-with-bolt-new-heres-my-honest-verdict-ff03384cdece?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff03384cdece</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[writing-prompts]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 11:19:26 GMT</pubDate>
            <atom:updated>2025-07-23T17:52:40.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A coding laptop with a mug beside it" src="https://cdn-images-1.medium.com/max/1024/1*PzCvzN3m4WH-uoAObpIKLg.jpeg" /></figure><h3>I Tried Vibe Coding with Bolt.new — Here’s My Honest Verdict</h3><p><em>“So, are you now a vibe coder and not a real developer anymore?”</em></p><p>That’s the question someone asked when I tried to explain how AI is transforming my coding experience. It made me pause because what is vibe coding, really? Is it just a buzzword, or is it reshaping how we code?</p><p>For me, vibe coding means using AI-driven tools like <a href="https://bolt.new/">Bolt.new</a> to build apps fast by directing the AI instead of typing every line yourself. It’s part prototyping, part collaboration — and it’s a completely different rhythm than traditional development.</p><p>Here’s my unfiltered take after using Bolt.new during their hackathon, how I made it work for me, and whether it’s just hype or a real shift in how we build.</p><h3>Why I Jumped Into Vibe Coding</h3><p>I joined the Bolt.new hackathon for two reasons: I’d been experimenting with vibe coding for a while, and the free pro accounts from Bolt and their sponsors were too good to pass up. It seemed like the perfect opportunity to put this new approach to the test.</p><p>But instead of diving straight into prompting, I spent my first <em>week</em> just learning — watching YouTube tutorials, experimenting with prompts, and figuring out how Bolt integrates with other tools.</p><p>That prep work paid off. I ended up creating the <strong>“Responsible Vibe Coding” framework</strong>, which helped me move faster while avoiding the usual AI-driven chaos (token waste, endless rewrites, frustration).</p><h3>Understanding the Token Economy</h3><p>Before we dive in, let’s talk tokens — because they do matter.</p><p>Every question you ask the AI, every tweak, every bug fix… all of it burns tokens (the “fuel” for powering your requests). If you don’t plan carefully, your session can rack up costs fast, even on a free tier.</p><p>The short version? <strong>Plan your requests, craft better prompts, and avoid making the AI redo work unnecessarily.</strong> If you’re careless, you’ll burn through your token balance fast. Knowing how to optimize prompts isn’t just good practice, it’s the difference between building an MVP on a budget… and watching your token balance evaporate.</p><h3>My “Responsible Vibe Coding” Framework</h3><p>Through trial and error, I used a set of practices designed to maximize token efficiency while maintaining development quality known as “Responsible Vibe Coding”. Here’s my approach:</p><p><strong>1. AI-Enhanced Prompting</strong><br> I let AI help me craft better prompts. Grok, Claude, and ChatGPT became my “prompt editors,” so instead of struggling to articulate what I want, they refine my ideas into precise instructions.</p><p><strong>2. Voice-First Development</strong><br> Talking through changes is way faster than typing. For example, I restructured my entire dashboard by narrating changes for Bolt, saving 30 minutes compared to typing it all.</p><p><strong>3. Establish Your Design Style Early</strong><br> I share my design style guide with Bolt upfront. You can set some instructions (in Settings &gt; Knowledge &gt; Project Prompt) e.g: “Use #000000 for background, #FF0000 as the primary color, and a minimalist UI.” This way, I reduced back-and-forth design corrections.</p><p><strong>4. Use Bolt’s Built-in Dev Tools</strong><br> Bolt’s inspect tool works like Chrome DevTools. If something looks or behaves off, I inspect the element and tell the AI exactly what to fix — no guessing.</p><p><strong>5. Use Bolt’s Safety Net Features</strong><br> Bolt gives you multiple ways to roll back changes: an undo button for immediate reversals, a revert button for rolling back larger changes, and backup options in the settings for more comprehensive recovery. Knowing I can undo big mistakes made me experiment more boldly.</p><p><strong>6. Discussion Mode First, Code Later</strong><br> I use Discussion Mode to brainstorm with AI before committing to changes, so I don’t waste tokens on half-baked fixes.</p><p><strong>7. Leverage External AI for Stubborn Bugs</strong><br> When Bolt gets stuck, I turn to ChatGPT, Grok or Claude. I explain the bug, get a solution, then have them craft the exact prompt Bolt needs. This three-AI pipeline saved me hours.</p><h3>The Golden Rule: Plan Like You’re Building a House</h3><p>Here’s an important lesson I learned: <strong>vibe coding still needs structure.</strong></p><p>Think of it like building a house. You can’t tell an architect mid-construction to put a swimming pool in the middle of the living room — that needs to be in the house plans from the start. Similarly, adding major features or changing core functionality mid-development in Bolt.new can lead to frustration and double your token costs.</p><p><strong>Treat Bolt’s AI Like a Junior Developer</strong></p><p>A junior developer is talented and capable, but they need clear, detailed instructions to deliver the app you actually want.</p><p>Before you type your first prompt, map out:</p><ul><li>Core features and user flows</li><li>Data structure and relationships</li><li>UI/UX requirements and design preferences</li><li>Integration needs (APIs, databases, third-party services)</li><li>Platform requirements (web, mobile, responsive needs)</li></ul><p>The more detailed your initial brief, the smoother your vibe coding experience will be. It’s much easier to build the right thing from the start than to add major changes later.</p><p><em>For more guidance on communicating effectively with AI, check out Bolt’s guide on </em><a href="https://support.bolt.new/best-practices/prompting-effectively"><em>prompting effectively</em></a><em>. For token optimization strategies, see their guide on </em><a href="https://support.bolt.new/best-practices/maximizing-token-efficiency"><em>maximizing token efficiency</em></a><em>.</em></p><h3>The App I Built</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UGE8z6NFaSWKCOrG63KprQ.png" /><figcaption>Vivid Tutor app built with Bolt.new</figcaption></figure><p>I built an EduTech app called VividTutor, where users can register and create sessions with an AI tutor to learn about any subject and any topic of choice. From algebra to history and languages, users can create a live session with a tutor and have a video conversation about the topic. I enabled two languages: English and French. The conversational AI was done with Tavus, and for payment, I integrated Stripe via RevenueCat. (All were hackathon sponsors).</p><p>The major issue I had while building was that the conversational video wasn’t playing in Bolt.new’s coding environment. It uses an iframe to load the video, and for the longest time, I thought my app wasn’t working until I deployed it on Netlify, and it worked. The error had to do with React_strict_mode and rerenders.</p><p>I also had to direct the UX. From the first version of the app that was prompted, I had to tell the AI to make the dashboard a separate page that only logged-in users can access, make a separate page for pricing, etc.</p><p>I also had some authentication issues that I used OpenAI to quickly debug and fix.</p><p>I also used the discussion mode a lot as the app became more complex, instead of asking the AI to make fixes from scratch. The finished app didn’t all magically come together, but needed direction from me.</p><h3>What I Loved About Bolt.new</h3><p>Beyond the core vibe coding experience, a few features genuinely made Bolt.new stand out for me:</p><p><strong>Seamless GitHub Integration</strong><br> Connecting my project to GitHub took minutes. I could link my repository with just a few clicks, and every change I made in Bolt automatically synced to GitHub. This means your code doesn’t get trapped inside Bolt’s ecosystem. You can start in Bolt and then continue developing your app locally.</p><p><strong>A Ready-Made Full-Stack Setup</strong><br> Bolt quietly handled the heavy lifting of a complete stack: Supabase for the backend, React with TypeScript for the frontend, Tailwind CSS for styling, and Lucide React for icons. Instead of spending a day setting up boilerplate, I started coding features right away with a clean, production-ready setup.</p><p><strong>Mobile Development Capabilities</strong><br> At one point, I asked Bolt to build a “mobile responsive” app. It misinterpreted that as “build me a mobile app” and built an Expo project complete with native features.<br> While not what I intended, it highlighted Bolt’s versatility. It can build both responsive web apps and fully native mobile apps with minimal effort.</p><p><strong>Rich Ecosystem Integrations</strong><br> Beyond GitHub, Bolt.new connects seamlessly to hosting (Netlify) and design (Figma), allowing you to build directly from your design files. This creates a smooth pipeline from design to deployment.</p><p>These features made the experience feel less like “coding inside a walled garden” and more like using an AI-powered IDE that plays nicely with the rest of my workflow.</p><h3>My Honest Verdict</h3><p>Bolt.new seriously impressed me. For VividTutor, what might have taken weeks of setup and boilerplate, I prototyped in days. For early-stage ideas and hackathons, it’s a game-changer.</p><p><strong>Vibe coding is powerful, but you still need to understand the code, especially when debugging, optimizing, or scaling.</strong></p><p>It’s not a replacement for fundamental coding knowledge.</p><h3>The Future of Development</h3><p>The future isn’t “developers vs vibe coders.” It’s <strong>developers who can do both</strong>:</p><ul><li>Rapid AI-powered prototyping</li><li>Traditional coding for performance, security, and polish</li></ul><p>The devs who thrive will be the ones who know when to switch gears.</p><p><strong><em>What’s your take?</em></strong><em> Have you tried vibe coding yet? Does it change how you think about building apps, or is it just another prototyping tool?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff03384cdece" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Process PDFs with Gemini AI and JavaScript: A Beginner’s Guide]]></title>
            <link>https://medium.com/@amyabafor013/how-to-process-pdfs-with-gemini-ai-and-javascript-a-beginners-guide-13640a16a554?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/13640a16a554</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[pdf-processing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[google-gemini-ai]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 18:52:17 GMT</pubDate>
            <atom:updated>2025-01-23T11:34:00.314Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MrB-PFHbksWtDpcJJsZedQ.jpeg" /></figure><p>Generating meaningful content from a PDF using Gemini AI and JavaScript can be a powerful tool in many workflows. While Python is often the go-to language for AI development, in this article, I’ll show you how to achieve the same functionality in JavaScript, specifically with Node.js. Let’s dive in!</p><h3>Why Node.js?</h3><p>If you’re coming from a React background, you might wonder why we’re using Node.js here. The answer is simple: some modules like fs (used for file system operations) only work in Node.js environments, not directly in React. Using Node.js also simplifies many backend operations, especially when working with file uploads and external APIs.</p><h3>Prerequisites</h3><ol><li><strong>Install Node.js:</strong> Make sure you have Node.js installed on your system. You can download it <a href="https://nodejs.org/">here</a>.</li><li><strong>Gemini API Key:</strong> Get your Gemini API key from the Google Cloud Console.</li><li><strong>Dependencies:</strong> Install the required packages by running:</li></ol><pre>npm install @google/generative-ai pdf-parse</pre><h3>Step-by-Step Implementation</h3><h3>1. Setting Up Your Project</h3><p>Start by importing the necessary modules and initializing the Google Generative AI SDK:</p><pre>import { GoogleGenerativeAI } from &quot;@google/generative-ai&quot;;<br>import * as fs from &#39;node:fs&#39;;<br>import pdf from &#39;pdf-parse&#39;; // For extracting text from PDFs<br><br>const genAI = new GoogleGenerativeAI(&quot;GEMINI_API_KEY&quot;);<br>const model = genAI.getGenerativeModel({ model: &quot;gemini-1.5-flash&quot; });</pre><h3>2. Extracting Text from a PDF</h3><p>We’ll use the pdf-parse library to extract text content from a PDF file:</p><pre>const extractTextFromPDF = async (filePath) =&gt; {<br>  const pdfBuffer = fs.readFileSync(filePath); // Read the PDF as a buffer<br>  const data = await pdf(pdfBuffer); // Extract text from the PDF<br>  return data.text; // Returns the text content of the PDF<br>};<br><br>const pdfText = await extractTextFromPDF(&quot;/path/to/your/file.pdf&quot;);<br>console.log(&quot;Extracted Text:&quot;, pdfText);</pre><h3>3. Generating Content with Gemini AI</h3><p>Next, pass the extracted text as a prompt to Gemini AI to generate meaningful content.</p><pre>const prompt = &quot;Summarize this pdf: &quot;;<br>const pdfText = await extractTextFromPDF(filePath);<br>const result = await model.generateContent([prompt, pdfText]);<br>return result.response.text();</pre><h3>4. Putting everything together</h3><p>Here is a complete example using Express and Multer to handle file uploads and integrate texts with Gemini AI:</p><pre>const express = require(&quot;express&quot;);<br>const multer = require(&quot;multer&quot;);<br>const fs = require(&quot;fs&quot;);<br>const pdf = require(&quot;pdf-parse&quot;);<br>const app = express();<br>const bodyParser = require(&quot;body-parser&quot;);<br>const cors = require(&quot;cors&quot;);<br>require(&quot;dotenv&quot;).config();<br><br>const {<br>  GoogleGenerativeAI,<br>  HarmCategory,<br>  HarmBlockThreshold,<br>} = require(&quot;@google/generative-ai&quot;);<br>const { GoogleAIFileManager } = require(&quot;@google/generative-ai/server&quot;);<br><br>const apiKey = process.env.GEMINI_API_KEY;<br>const genAI = new GoogleGenerativeAI(apiKey);<br><br><br>// Configure multer to handle file uploads<br>const upload = multer({ dest: &quot;uploads/&quot; }); // Files will be saved in the &#39;uploads/&#39; directory<br><br>app.use(bodyParser.json()); // support json encoded bodies<br>app.use(bodyParser.urlencoded({ extended: false }));<br><br>app.use(cors());<br><br>const model = genAI.getGenerativeModel({<br>  model: &quot;gemini-2.0-flash-exp&quot;,<br>});<br><br>const generationConfig = {<br>  temperature: 1,             // Controls randomness in the output. Higher values (closer to 1) make results more random.<br>  topP: 0.95,                 // Nucleus sampling. Limits tokens to the top P cumulative probability.<br>  topK: 40,                   // Limits tokens to the top K most likely choices.<br>  maxOutputTokens: 8192,      // Maximum number of tokens in the response.<br>  responseMimeType: &quot;text/plain&quot;, // Sets the format of the response.<br>};<br><br>async function run(filePath, filename, mimeType) {<br>  const extractTextFromPDF = async (filePath) =&gt; {<br>    const pdfBuffer = fs.readFileSync(filePath); // Read the PDF as a buffer<br>    const data = await pdf(pdfBuffer); // Extract text from the PDF<br>    return data.text; // Returns the text content of the PDF<br>  };<br><br>  const pdfText = await extractTextFromPDF(filePath);<br><br>  try {<br>    const prompt = `summarize this pdf: `;<br>    const result = await model.generateContent([prompt, pdfText], generationConfig);<br>    return result.response.text();<br>  } catch (error) {<br>    console.error(&quot;Error in model.generateContent:&quot;, error);<br>  }<br>}<br><br><br>app.post(&quot;/gemini&quot;, upload.single(&quot;pdf&quot;), async (req, res) =&gt; {<br>  try {<br>    const file = req.file; // Access the uploaded file from multer<br><br>    if (!file) {<br>      return res.status(400).json({ message: &quot;No file uploaded.&quot; });<br>    }<br><br>    if (file.mimetype !== &quot;application/pdf&quot;) {<br>      // Delete the uploaded file if it&#39;s not a PDF<br>      fs.unlinkSync(file.path);<br>      return res.status(400).json({ message: &quot;Only PDF files are allowed.&quot; });<br>    }<br><br>    // Upload file to Gemini<br>    try {<br>      const geminiFile = await run(file.path, file.originalname, file.mimetype);<br>      res.status(200).json({<br>        message: &quot;File uploaded successfully.&quot;,<br>        geminiFile,<br>      });<br>    } catch (error) {<br>      console.error(&quot;Error in model.generateContent:&quot;, error);<br>      res.status(500).json({ message: &quot;Error in model.generateContent&quot; });<br>    }<br>  } catch (error) {<br>    res.status(500).json({ message: &quot;Error with post&quot; });<br>  }<br>});<br><br>app.use(function (req, res) {<br>  return res<br>    .status(404)<br>    .send({ message: &quot;The url you visited does not exist&quot; });<br>});</pre><h3>Notes:</h3><ul><li>Ensure your generationConfig object matches the parameters supported by the specific version of the Gemini model you&#39;re using.</li><li>Validate the maxOutputTokens value to avoid exceeding your quota or generating overly large outputs.</li><li>The result returned from run() (i.e., result.response.text()) will be in plain text format because we specified responseMimeType: &quot;text/plain&quot;. You can explore other responseMimeType options, such as JSON or XML, depending on your requirements.</li></ul><p>By following this guide, you’ll be able to integrate Gemini AI into your JavaScript project to generate meaningful content from PDFs. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13640a16a554" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Balancing Tunnel Vision: Finding the Sweet Spot]]></title>
            <link>https://medium.com/@amyabafor013/balancing-tunnel-vision-finding-the-sweet-spot-eb3c14dab5cf?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb3c14dab5cf</guid>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[tunnel-vision]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[focus-and-productivity]]></category>
            <category><![CDATA[personal-growth]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Sun, 12 Jan 2025 18:42:49 GMT</pubDate>
            <atom:updated>2025-01-12T18:42:49.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lefF0F0lg8lNqH3dpgXA6g.jpeg" /></figure><p>Some of my friends like to say I do my best work when I’m under pressure. But honestly, I think it’s more about something I call <em>tunnel vision.</em> This happens when I focus so intensely on one thing that I lose track of everything else.</p><p>At first, it might seem like a great thing. I can get a lot done when I’m locked in. But I’ve started wondering: is it always a good idea? Should I be using this kind of focus for small, everyday tasks, or should I save it for big goals?</p><p>The truth is, a tunnel vision has its benefits, but it also comes with some challenges. Here are some ways it has affected me, both positively and negatively.</p><h3>What Happens When I Get Tunnel Vision</h3><p><strong>1. I Neglect Other Tasks</strong><br>When I’m focused on one thing, I sometimes forget about everything else I need to do. That means some tasks get pushed back, which can create a backlog or even make me miss deadlines.</p><p><strong>2. It’s Harder to Adapt</strong><br>When I’m locked in, I tend to stick with one way of doing things, even if there’s a better option. This can make it harder to adjust when things change or new opportunities pop up.</p><p><strong>3. Other Work Suffers</strong><br>Even if I do an amazing job on the main task, the other things I have to do often end up rushed or done poorly.</p><p><strong>4. I Get Tired Faster</strong><br>Putting all my energy into one task is exhausting. By the time I’m done, I feel drained, and it’s hard to move on to the next thing.</p><p><strong>5. I Lose Perspective</strong><br>Tunnel vision makes it hard to see the bigger picture. Sometimes, I miss out on creative ideas or better solutions because I’m so focused on one small part of the problem.</p><p><strong>6. Stress Builds Up</strong><br>While I’m hyper-focused on one thing, I know deep down there’s other work piling up. That feeling can be stressful, and it sometimes distracts me from what I’m doing.</p><p><strong>7. It Affects Teamwork</strong><br>In group projects, if a teammate is dragging their part of the work, it can frustrate me and throw me off. Because I’m so focused on finishing that specific task, I find it hard to move on to other things until it’s done. This can sometimes leave me feeling stuck and unable to make progress, even if there are other tasks I could work on.</p><h3>Learning to Balance</h3><p>Tunnel vision isn’t all bad. In fact, it’s great in certain situations — like when I have a tight deadline or need to do deep, focused work. But I’ve learned it’s not something I can rely on all the time.</p><h4>When Tunnel Vision Works Best</h4><ul><li><strong>Short-Term Tasks:</strong><br>When I need to finish something quickly or with precision, tunnel vision is my best friend. For example, coding a feature, solving a problem, or writing a report all benefit from intense focus.</li></ul><p>The key here is setting limits. If I spend too much time on one thing, other important tasks get ignored. I’ve found that using time limits (like working on one thing for 1–2 hours before switching) helps me stay productive.</p><h4>When It’s a Problem</h4><ul><li><strong>Long-Term Goals:</strong><br>For bigger, long-term goals, tunnel vision can be a problem. These types of goals require flexibility, creativity, and a lot of moving parts. If I’m too focused on one thing, I might:</li><li>Miss opportunities to adapt when things change.</li><li>Ignore other parts of the goal, like teamwork, planning, or taking care of myself.</li><li>Burn out from trying too hard for too long without breaks.</li></ul><h3>Finding the Right Mix</h3><p>What I’ve learned is this:</p><ul><li>For short-term tasks, tunnel vision helps me focus and get things done.</li><li>For long-term goals, I need to step back, look at the bigger picture, and stay flexible.</li></ul><p>By combining short bursts of focus with regular check-ins on my priorities, I’ve been able to find more balance.</p><h3>Final Thoughts</h3><p>Tunnel vision can be a powerful tool, but it’s not always the right approach. It’s helped me get through tough projects and achieve my goals, but it has also caused stress, missed opportunities, and poor balance at times.</p><p>The biggest lesson I’ve learned is that focus is important, but so is knowing when to take a step back. Sometimes, you need to pause, look around, and make sure you’re still headed in the right direction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb3c14dab5cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step: How to Integrate Ton Payments in Your Telegram Mini App]]></title>
            <link>https://medium.com/@amyabafor013/step-by-step-how-to-integrate-ton-payments-in-your-telegram-mini-app-bc23d348344e?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc23d348344e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[telegram-mini-app]]></category>
            <category><![CDATA[ton-blockchain]]></category>
            <category><![CDATA[payment-gateway]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Fri, 13 Sep 2024 16:06:05 GMT</pubDate>
            <atom:updated>2024-09-13T16:06:05.156Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xYscqStHCc4T77gxAakliQ.jpeg" /></figure><p>Telegram Mini Apps are web applications designed to run within the Telegram platform. Developers can use web technologies like HTML, CSS, and JavaScript to create dynamic interfaces that launch directly inside the Telegram app, offering flexibility similar to traditional websites. In fact, for some use cases, Mini Apps can even replace conventional websites.</p><p>Mini Apps are becoming increasingly popular, contributing to Telegram’s user base reaching 950 million in July 2024. Since January 2024, developers have been able to integrate the TON blockchain into their Telegram Mini Apps. This guide will walk you through the steps to incorporate Ton Payments into your own Telegram Mini App.</p><h3>Prerequisites</h3><p>Before we dive into the integration, make sure you know how to create your own Telegram bot and launch a Mini App using @BotFather. If you’re new to this, click <a href="https://core.telegram.org/bots/webapps">[here]</a> to learn more.</p><h3>Integrating Ton Payments</h3><p>For payments, we’ll be using <strong>TonConnect</strong>. In this example, I’ll show how to use @tonconnect/ui-react to integrate Ton payments into your Mini App.</p><h3>Step 1: Install the TonConnect Package</h3><p>Install the tonconnect package using npm or yarn:</p><pre>npm install @tonconnect/ui-react</pre><p>or</p><pre>yarn add @tonconnect/ui-react</pre><h3>Step 2: Using the TonConnectUIProvider</h3><p>There are several ways to use TonConnect UI. One method is to use the TonConnectUIProvider. This provider should wrap all components that need access to @tonconnect/ui-react. Here&#39;s how to set it up in your App.tsx:</p><pre>import { TonConnectUIProvider } from &#39;@tonconnect/ui-react&#39;;<br><br>export function App() {<br>    return (<br>        &lt;TonConnectUIProvider manifestUrl=&quot;https://&lt;YOUR_APP_URL&gt;/tonconnect-manifest.json&quot;&gt;<br>            { /* Your app */ }<br>        &lt;/TonConnectUIProvider&gt;<br>    );<br>}</pre><h3>Step 3: Creating the Manifest</h3><p>The TonConnectUIProvider requires a manifest, a JSON file that contains key details about your app (like its name, URL, and icon). This is presented to users when they perform transactions.</p><p>Here’s what is expected in the manifest:</p><pre>{<br>  &quot;url&quot;: &quot;&lt;app-url&gt;&quot;, // required<br>  &quot;name&quot;: &quot;&lt;app-name&gt;&quot;, // required<br>  &quot;iconUrl&quot;: &quot;&lt;app-icon-url&gt;&quot;, // required<br>  &quot;termsOfUseUrl&quot;: &quot;&lt;terms-of-use-url&gt;&quot;, // optional<br>  &quot;privacyPolicyUrl&quot;: &quot;&lt;privacy-policy-url&gt;&quot; // optional<br>}</pre><p>For more details on creating the manifest, refer to the <a href="https://docs.ton.org/develop/dapps/ton-connect/manifest">[official TON documentation]</a>.</p><p><strong>Note</strong>: It’s best to serve the manifest from your backend to avoid CORS errors, which can occur if you place tonconnect-manifest.json in the React public folder.</p><h3>Step 4: Connecting Your Wallet</h3><p>Before initiating a transaction, users need to connect their Ton wallet. Instead of connectWallet(), which is being deprecated, use the open() method from the useTonConnectModal hook.</p><pre>import { useTonConnectModal } from &#39;@tonconnect/ui-react&#39;;<br><br>export const ModalControl = () =&gt; {<br>    const { state, open, close } = useTonConnectModal();<br><br>    return (<br>      &lt;div&gt;<br>          &lt;div&gt;Modal state: {state?.status}&lt;/div&gt;<br>          &lt;button onClick={open}&gt;Open modal&lt;/button&gt;<br>          &lt;button onClick={close}&gt;Close modal&lt;/button&gt;<br>      &lt;/div&gt;<br>    );<br>};</pre><h3>Step 5: Getting the User’s Wallet Address</h3><p>You can display the address of the connected wallet using the useTonWallet hook:</p><pre>import { useTonWallet } from &#39;@tonconnect/ui-react&#39;;<br><br>export const Wallet = () =&gt; {<br>    const wallet = useTonWallet();<br><br>    return (<br>        wallet &amp;&amp; (<br>            &lt;div&gt;<br>                &lt;span&gt;Connected wallet: {wallet.name}&lt;/span&gt;<br>                &lt;span&gt;Device: {wallet.device.appName}&lt;/span&gt;<br>            &lt;/div&gt;<br>        )<br>    );<br>};</pre><h3>Step 6: Processing the Transaction</h3><p>Once the wallet is connected, you can process transactions using the sendTransaction() function:</p><pre>import { TonConnectUIContext } from &#39;@tonconnect/ui-react&#39;;<br>import { useContext } from &#39;react&#39;;<br><br>const tonConnectUI = useContext(TonConnectUIContext);<br><br>if (tonConnectUI) {<br>   tonConnectUI<br>    .sendTransaction(paymentRequest)<br>    .then((transactionResult) =&gt; {<br>     console.log(&#39;Transaction successful:&#39;, transactionResult);<br>    })<br>    .catch((error) =&gt; {<br>     console.error(&#39;Transaction failed:&#39;, error);<br>    });<br>  } else {<br>   alert(`Wallet is not connected `);<br>  }</pre><p>The paymentRequest object contains the essential data required to process a transaction. The payload field is optional and can include extra data like an invoice ID, depending on what your app&#39;s backend needs. All data is sent in string format. You can learn more about building Ton messages in the <a href="https://docs.ton.org/develop/dapps/ton-connect/message-builders">documentation.</a></p><p>Here’s an example of a paymentRequest object:</p><pre>import { SendTransactionRequest } from &#39;@tonconnect/ui-react&#39;;<br>import { beginCell, toNano } from &#39;@ton/ton&#39;;<br><br>const body = beginCell()<br>    .storeUint(0, 32) // Write 32 zero bits to indicate a text comment will follow<br>    .storeStringTail(data?.id) // Write the text comment<br>    .endCell();<br><br>const paymentRequest: SendTransactionRequest = {<br>    messages: [<br>     {<br>      address: destination,<br>      amount: toNano(depositAmount).toString(),<br>      payload: body.toBoc().toString(&#39;base64&#39;), // Optional: Additional data<br>     },<br>    ],<br><br>    validUntil: Math.floor(Date.now() / 1000) + 360, // Expiration time in seconds since epoch<br>   };</pre><h3>Step 7: Converting the Destination Address</h3><p>The destination address must be a base64 string. If you have a user-facing address, convert it using the following method:</p><ol><li>Install the required packages:</li></ol><pre>yarn add @ton/ton @ton/crypto @ton/core buffer</pre><p>2. Use this code to convert the address:</p><pre>import { Address } from &#39;@ton/core&#39;;<br><br>const destination = Address.parse(userFacingAddress).toRawString();</pre><p>For more on sending Ton transactions, check out the <a href="https://docs.ton.org/develop/dapps/ton-connect/message-builders">[official documentation on Ton requests]</a>.</p><h3>Conclusion</h3><p>Integrating Ton Payments into your Telegram Mini App may seem challenging at first, but by following the steps outlined above, you’ll have a seamless payment system in place in no time. From setting up your TonConnectUIProvider to processing transactions and converting addresses, the process is straightforward once you understand the basics.</p><p>As you continue building, remember to test your app thoroughly in a sandbox environment and explore more advanced features of TonConnect. With this integration, your Telegram Mini App can offer users a secure and efficient way to make transactions directly from their wallets.</p><p>Feel free to check out the [<a href="https://ton-connect.github.io/sdk/modules/_tonconnect_ui_react.html">official TonConnect documentation</a>] to deepen your understanding, and don’t hesitate to experiment with additional features and customizations!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc23d348344e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create different color themes with CSS and Javascript]]></title>
            <link>https://medium.com/@amyabafor013/how-to-create-different-color-themes-with-css-and-javascript-d2ff1e66ce08?source=rss-a33dd7d99f01------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2ff1e66ce08</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[toggle-button]]></category>
            <category><![CDATA[color-theme]]></category>
            <category><![CDATA[css-variables]]></category>
            <dc:creator><![CDATA[Amy Abafor]]></dc:creator>
            <pubDate>Sun, 18 Jul 2021 13:38:23 GMT</pubDate>
            <atom:updated>2021-07-18T13:38:23.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rNJJJ9_7-uLHaeDNqhaeRw.jpeg" /></figure><p>These days, it is very common to see websites and applications with at least 2 color themes: light and dark themes.</p><p>Let’s see how we can implement our site to have multiple color themes using the “body” element, CSS classes, and Javascript.</p><p>You can click on this link to see a demo of how this works on Codepen: <a href="https://codepen.io/AmyXandra/pen/VwbbMXN">https://codepen.io/AmyXandra/pen/VwbbMXN</a></p><p>Implementing multiple color themes in a site has 3 major parts:</p><ol><li>A trigger to change from the current theme(buttons are commonly used).</li><li>The CSS classes contain the color variables for the different themes.</li><li>A javascript function to carry out the theme switch when the button is triggered.</li></ol><p>There are several ways to implement a trigger for color themes. We can create a single toggle button or use multiple buttons for each color theme.</p><p>In this lesson, we will create a button element in our HTML file with an onClick function to toggle between 2 themes: light and dark themes.</p><p>&lt;button onclick=&quot;toggleMode()&quot;&gt; Try it &lt;/button&gt;</p><p>Next, we will create our CSS classes that contain the different color variables.</p><p>These classes will have the same variables but the variables will hold different values for each class. This way will ensure a smooth and uniform transition of color themes.</p><p>Another way to do this is to have different stylesheets for your color themes and still follow through with the process in this lesson. Both stylesheets will be the same but with different values. It will work fine but I find it more stressful writing the same thing over again, twice!</p><pre>.dark-theme {<br> ---background: #14151a;<br> ---card-border: #0b0e11;<br> ---text: #d4d4d4;<br> ---text-primary: #e7be1b;<br>}</pre><pre>.light-theme {<br>  ---background: #ffffff;<br>  ---card-border: #eaeaff;<br>  ---text: #6f6f6f;<br>  ---text-primary: #2d2e83;<br>}</pre><p>After creating these variables, we will use variables in place of actual colors in our stylesheet. This way, the colors of whatever class is in the &lt;body&gt; element are the colors that will be applied.</p><pre>body {<br> font-size: 0.9rem;<br> font-family: &quot;Poppins&quot;, sans-serif;<br> overflow-x: hidden;<br> background: var(---background);<br>}</pre><p>We will also give our &lt;body&gt; element the class of “dark-theme”. This will be the default theme while we toggle to light-theme:</p><pre>&lt;body class=&quot;dark-theme&quot;&gt;</pre><p>Lastly, we will write a javascript function to toggle the classes in the body tag and we’re all set!</p><pre>function toggleMode() {<br> document.body.classList.toggle(&quot;light-theme&quot;);<br>}</pre><p>If you chose to use different stylesheets, this will not work for you, you will have to toggle between the stylesheets and not just the body element. That’s why I find this process easy to follow.</p><p>Note: Clicking on the button will toggle “light-theme” in the body element i.e: it will add or remove “light-theme” from &lt;body&gt; as the case may be. This means when the current theme is light, the body element has 2 classes “dark-theme” and “light-theme”.</p><p>The reason the theme will change is because of the CSS rule of <strong>Equal specificity: the latest rule counts </strong>— If the same rule is written twice into the external stylesheet, then the lower rule in the style sheet is closer to the element to be styled, and therefore will be applied. Since the .light-theme is below .dark-theme in the CSS stylesheet, it will override the .dark-theme.</p><p>Bonus: To make sure you’re using the set color theme on all the pages of your website or application, we will set the color in our local storage:</p><pre>const currentTheme = localStorage.getItem(&quot;theme&quot;);</pre><pre>if (currentTheme == &quot;light&quot;) {<br> document.body.classList.add(&quot;light-theme&quot;);<br>}</pre><pre>function toggleMode() {<br> document.body.classList.toggle(&quot;light-theme&quot;);<br> let theme = &quot;dark&quot;;<br> if (document.body.classList.contains(&quot;light-theme&quot;)) {<br> theme = &quot;light&quot;;<br> }<br> localStorage.setItem(&quot;theme&quot;, theme);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2ff1e66ce08" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>