<?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 Favour Nnebedum on Medium]]></title>
        <description><![CDATA[Stories by Favour Nnebedum on Medium]]></description>
        <link>https://medium.com/@nnebedumfav?source=rss-7ec535327171------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cMlj8ByVS0MDc8VGQTfyWQ.jpeg</url>
            <title>Stories by Favour Nnebedum on Medium</title>
            <link>https://medium.com/@nnebedumfav?source=rss-7ec535327171------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 02:56:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nnebedumfav/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 a VS Code Extension and Side Quests]]></title>
            <link>https://medium.com/@nnebedumfav/building-a-vs-code-extension-and-side-quests-b1f74085b212?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1f74085b212</guid>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[vs-code-extensions]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 19:21:01 GMT</pubDate>
            <atom:updated>2026-11-08T19:21:01.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*HZqneTJ_Nzj-oIK9hEUBAA.png" /><figcaption>Gemini Generated Image Lego Dependency Injection</figcaption></figure><p>Recently, I started thinking a lot about extensions — VS Code extensions in particular. How are they built? could I build one (of course)? how long would it take to build one? I also had a some ideas for tools I wanted to build for my own daily workflow, so I started reading docs and exploring with ChatGPT, and learning the fundamentals by building.</p><p>I’ve been a developer for a while now, and of course, I’ve heard terms like <strong>Dependency Injection</strong>, <strong>Services</strong>, and <strong>Contracts</strong> usually tossed around by backend engineers on the team. But to be completely honest, I never really <em>grasped</em> them even though I use them even in Frontend frameworks. They always sounded like abstract enterprise jargon that existed to make simple things complicated.</p><p>While building this extension, though, the concept finally clicked.</p><p>It turns out VS Code is built entirely around modularity. Extensions need to hook into the editor, share functionality, run in different environments, and stay easily testable without breaking the rest of the app. It’s the ultimate playground for loose coupling — where I can tweak one piece of the system without setting off a domino effect of bugs across everything else.</p><p>If you’ve ever found these concepts fuzzy, here are some of the mental models that took me from “I’ve heard of that” to “Oh ok, <em>that’s</em> why we actually do this.”</p><h3>1. Function vs. Service: The Chef and the Delivery Guy</h3><p>When starting out, the default is to write simple functions for everything. So how do you know when a piece of logic should just stay a function, and when it needs to graduate into a <strong>Service</strong>?</p><p>Imagine you’re baking (maybe making a pancake):</p><ul><li><strong>A Simple Function</strong> is like a kitchen recipe. If you take 2 eggs, 1 cup of flour, and sugar, and mix them together, you get batter every single time. It doesn’t need to check the weather outside,or access the internet. It just takes inputs and produces an output. That’s pure business logic. In code, that’s pure logic — formatting a name, date, or parsing a string. Keep those as plain functions.</li><li><strong>A Service</strong> is like the <strong>grocery delivery guy</strong>. They have to step outside, deal with traffic, check whether the store has stock, pay for the order, and bring groceries to your door.</li></ul><p>In code, the moment a feature needs to talk to the external world — in my own case: the VS Code workspace API, reading from a disk, calling a remote endpoint/API, or holding onto live session state — it shouldn’t just be a bare function floating around. It belongs in a <strong>Service</strong>.</p><h3>2. Contract? The Wall Socket</h3><p>Once you have a service, you’ll hear people talk about defining a <strong>Contract</strong>.</p><p>Picture an electrical socket on your wall:</p><ul><li>The socket is a <strong>contract</strong> (an interface in TypeScript or Go). It lays down a simple rule: <em>&quot;Anything with two flat pins that expects 110V can plug in here.&quot;</em></li><li>The socket doesn’t care <em>what</em> is being plugged into it — it could be a laptop or phone charger, or a desk fan.</li><li>The device doesn’t care <em>where</em> the electricity comes from — it could be solar panels on the roof, a backup generator, or the city electrical grid.</li></ul><p>Here’s a TypeScript example of a contract a service can implement:</p><pre>// The Contract: We just promise there&#39;s a way to save a file, <br>// You don&#39;t need to bother about how we are doing it<br>export interface IFileStorage {<br>  save(filename: string, content: string): Promise&lt;void&gt;;<br>}<br></pre><p>Generally acontract defines <strong>what</strong> can be done (the method names, inputs, and outputs), but deliberately keeps quiet about <strong>how</strong> it’s done behind the scenes. Just give me this and that, I will give you this in return and don’t ask me how I get it done.</p><h3>3. Dependency Injection: Swapping the Bulb</h3><p>This was the biggest lightbulb moment for me. <strong>Dependency Injection (DI) simply means we get to pass a tool into our service class from the outside, instead of letting the class build the tool itself.</strong></p><p>Imagine a bedside lamp with a bulb soldered permanently into the socket. If the bulb burns out, or if we want to test the lamp with a dimmer bulb, we have to throw the whole lamp away.</p><p>That’s what happens when a class creates its own dependencies:</p><pre>// ❌ Tightly Coupled: The class solders its own bulb<br>class NoteManager {<br>  private storage = new LocalDiskStorage();// Hardcoded to real computer files!<br>}</pre><p>Because this NoteManager creates its own LocalDiskStorage, it’s stuck. If we want to write a quick unit test, it will actually write real files to our computer. Even worse as in my case, if I wanted my VS Code extension to run on the web (vscode.dev), it crashes because web browsers don&#39;t have access to my local hard drive.</p><p>Here is the exact same thing with <strong>Dependency Injection</strong>:</p><pre>// ✅ Injected: We plug the tool in through the constructor<br>class NoteManager {<br>  constructor(private storage: INoteStorage) {} // Storage facility (which can be mocked or swapped) is passed in at this class instantiation<br>}<br></pre><p>Instead of welding the tool inside, we pass the contract into the constructor. Now we can plug in whatever fits the socket contract — INoteStorage:</p><ul><li><strong>On Desktop:</strong> Pass new LocalDiskStorage().</li><li><strong>In the Browser:</strong> Pass new BrowserCloudStorage().</li><li><strong>In Unit Tests:</strong> Pass new FakeMemoryStorage(). Our test runs in 2 milliseconds, checks the logic, and never touches a single real file on the machine.</li></ul><h3>When Should You Actually Use It?</h3><p>Now if you are like me, you’d want to try out this new trick everywhere but as the saying goes: <em>Excess of everything is bad.</em></p><p>We don’t need DI for everything — using it for pure calculations or tiny internal helpers just adds unnecessary boilerplate if you ask me.</p><p>The rule of thumb that finally stuck with me is simple:</p><blockquote>“Does this feature touch external infrastructure (like files, APIs, or the editor — remember the delivery guy), and will I want to mock or swap it out in a test?”</blockquote><p>If the answer is yes, then I’d separate it into a service, give it a contract, and inject it. It turns rigid, tightly coupled, hard-to-test code into modular building blocks that are genuinely satisfying to work with.</p><p>That’s on today’s side-quest. I’d be sharing some progress with my vscode extension soon and if you found this helpful or have any notes that I might have missed, I’d love to hear your thoughts. Cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1f74085b212" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First #DevFest at GDG Abuja: Chaos, Clusters, AI Debt, and Community]]></title>
            <link>https://medium.com/@nnebedumfav/my-first-devfest-at-gdg-abuja-chaos-clusters-ai-debt-and-community-2f380ec8279e?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f380ec8279e</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[tech-conference]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 10:02:37 GMT</pubDate>
            <atom:updated>2026-11-02T10:02:37.799Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently attended my first-ever #DevFest with <a href="https://www.linkedin.com/company/gdg-abuja/">GDG Abuja</a> this year, and overall, it was quite an experience. I’ll admit, walking into it, I had my doubts: Would I be bored going alone? Will it just be another endless stream of AI talks? Turns out, I worried for nothing. It went quite well.</p><p>Here are my raw POVs from the day.</p><p>1. The Arrival &amp; The “African Time” Reality: I arrived early with a few others — well before 9:00 AM. Since the event technically kicked off around 10:00 AM (true to African time fashion), we had some time to settle in. I signed in, got a seat, and quickly realized a rookie mistake: I hadn’t looked up the agenda beforehand. Finding out there were 3 different halls running sessions concurrently was a plot twist. Trying to pick between two fascinating topics happening at the exact same time was torture.</p><p>2. Hall A vs. The FOMO Struggle: My day started in Hall A with <a href="https://www.linkedin.com/in/geektutor/">Sodiq Akinjobi</a> for the Builder Workshop. I’m close with a founder who always boasts about his friend Sodiq, so I was pleasantly surprised to see him in Abuja and really wanted to hear him speak. It totally paid off! We all played a game he had “vibecoded” and even got a chance to build our own. Sadly, time was not our friend — we ran out of time before we could see what everyone built. The worst part? In another hall at the exact same time, <a href="https://www.linkedin.com/in/jesutoni-aderibigbe/">Jesutoni Aderibigbe</a> was presenting No Hide Your Update, a topic I was really looking forward to. Turns out science still hasn’t invented a way to be in two places at once yet 🥲.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5yThKPTpeMaM116W" /><figcaption>With Mr. Sodiq</figcaption></figure><p>3. Saving Millions with Kubernetes: The second session was by <a href="https://www.linkedin.com/in/zerothebahdman/">Divinewill O.</a> (ZERO) on Cut Your Cluster in Half: Kubernetes Right-Sizing Clinic. I thoroughly enjoyed this one because Zero practically showed us how he was saving his company millions by optimizing Kubernetes clusters. It hit right at home for me — building reliable, scalable systems while optimizing core resources is exactly the kind of work I love. Bonus point: I managed to grab a selfie with Zero afterward. Great guy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D_iyTQeG-62NpYde" /><figcaption>With Zero</figcaption></figure><p>4. Networking, Exhaustion, and AI Tech Debt: After a much-needed break and networking session — where I met fellow attendees like <a href="https://www.linkedin.com/in/gambo-nasiru-54a53439b/">Gambo Nasiru</a> and <a href="https://www.linkedin.com/in/temiloluwa-omole-65963435b/">Temiloluwa Omole</a>, a Wisdom that asked some really interested questions, squeezed in a work meeting, and refocused — I dived back in. By this point, my feet were feeling the switch-hall exhaustion, but <a href="https://www.linkedin.com/in/chisomchima/">Chisom Chima</a>’s session on AI and Technical Debt completely woke my brain back up. It gave me a lot to ponder regarding my daily workflow: She noted that while “vibe coding” is all the hype, we might be building enormous technical debt by coding faster than we can review or understand.</p><p>Research shows current AI models create verbose code that people struggle to defend or explain long-term.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q7JwQS8bW9R3tAdn" /><figcaption>Chisom Chima dishing out wisdom</figcaption></figure><p>Her proposed solutions? Own our system designs, instruct agents to write simpler code, set strict guards on maximum lines of code (LOC) per PR, and have teammates explicitly state where AI was used for implementations. I totally loved this grounded, realistic take on AI.</p><p>5. Wrapping Up &amp; Looking Ahead: There were plenty of other great sessions, like <a href="https://www.linkedin.com/in/igmrrf/">Francis Igbiriki</a>’s Your AI App Is Leaking (which led to a fantastic post-chat networking session with <a href="https://www.linkedin.com/in/ransom-philemon/">Ransom Philemon</a>, and John and some others guys I failed to catch their names — I’m sorry, I was really tired by now).</p><p>By the end of the day, as an attendee who was completely spent, I could only wonder how the organizers and volunteers managed to coordinate the whole thing — especially knowing they had to scale it all over again for the final day’s event. Big kudos to the organizing team and volunteers.</p><p>Sadly, I couldn’t attend the final event, but it was worth it after all. I’m definitely looking forward to attending more of these, and who knows — maybe even speaking at one someday.</p><p>Cheers to the Google Developer Community Abuja! 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f380ec8279e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom error handling with AuthJS (NextAuth) v5 Beta and a Custom Backend in Next.js]]></title>
            <link>https://levelup.gitconnected.com/custom-error-handling-with-authjs-next-auth-beta-and-a-custom-backend-in-next-js-4d10b4dd4838?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d10b4dd4838</guid>
            <category><![CDATA[nextauth]]></category>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[nextjs-15]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[authjs]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Thu, 09 Oct 2025 02:36:06 GMT</pubDate>
            <atom:updated>2025-10-10T09:07:56.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCxEbyrl3fE4WVi7MGTFEA.png" /><figcaption>Custom error handling for NextAuth and backend API in Next.js authentication flow</figcaption></figure><p>This is a practical guide (based on personal experience) to integrating your backend API with AuthJS (NextAuth) v5 Beta, covering both credential login and Google OAuth, with tips on token handling and backend verification.</p><p>We’ll cover:<br>✅ Setting up email/password login using the Credentials Provider<br>✅ Using the Google OAuth Provider alongside a backend validation flow<br>✅ Handling tokens, user sessions, and backend errors cleanly<br>✅ Protecting routes and wiring it all together</p><p>Whether you’re building an internal tool or a production app, this pattern gives you full control over authentication without sacrificing the built-in power of AuthJS.</p><h4>Credentials Provider (Email &amp; Password)</h4><p>For this setup I am assuming your backend has a /auth/sign-in endpoint that:<br>- Accepts email and password via <strong>POST</strong><br>- Returns a user object and an access token on success<br>- Returns custom errors for client issues (e.g. wrong password) or server errors</p><p>Here’s a simplified server action that calls the backend:</p><pre>// src/lib/actions/auth.actions.ts<br>&quot;use server&quot;<br><br>export const signIn = async (payload: { email: string; password: string }) =&gt; {<br>  try {<br>    const response = await baseUrl.post(&quot;/auth/sign-in&quot;, payload);<br>    const { token, data: userData } = response?.data?.data;<br><br>    if (token &amp;&amp; userData) {<br>      const formattedData = {<br>        token,<br>        data: userData as IUser, // type assertion to keep NextAuth happy<br>      };<br>      return { data: formattedData };<br>    }<br>  } catch (error) {<br>    return { error: getError(error) };<br>  }<br>};</pre><p><em>🛠 </em><em>getError is a small utility you can use to cleanly extract messages from Axios, </em><em>fetch, or native JS errors.</em></p><p><em>🛠 </em><em>baseUrl is my axios instance.</em></p><h4>Google OAuth Provider (With Backend Verification)</h4><p>After a successful sign-in with Google via AuthJS, we take the Google token and verify it with our backend.<br>Here’s how the flow works:<br>- AuthJS handles the initial Google sign-in.<br>- We extract the Google ID token from the user profile.<br>- We send that token to our backend to verify it.<br>- Backend validates it via Google’s API, then:<br>✅ If the email exists: returns the user and session token.<br>🆕 If not: creates the user and returns the session token.</p><p>Here’s my server action for that backend call:</p><pre>// src/lib/actions/auth.actions.ts<br>&quot;use server&quot;<br><br>export const googleLogin = async (payload: any) =&gt; {<br>  try {<br>    const response = await baseUrl.post(&quot;/auth/google/login&quot;, payload);<br>    const { token, data: userData } = response?.data?.data;<br><br>    if (token &amp;&amp; userData) {<br>      const formattedData = {<br>        token,<br>        data: userData as IUser,<br>      };<br>      return { data: formattedData };<br>    }<br>  } catch (error) {<br>    throw new Error(getError(error));<br>  }<br>};</pre><p>With this setup in place, we’re ready to move into the <strong>AuthJS configuration</strong> and show how to wire everything up in your Next.js project: providers, callbacks, middleware, and client-side usage.</p><h4>Setting Up AuthJS with Credentials and Google Providers</h4><p>Here’s how we configure AuthJS (NextAuth v5) to work with both a <strong>custom email/password backend</strong> and <strong>Google OAuth</strong>, while still keeping full control of error handling, token flow, and user session.</p><p>We’ll be working with a shared auth.ts file and exporting everything from there — as suggested by NextAuth.</p><pre>// src/auth.ts<br>import NextAuth, { AuthError } from &quot;next-auth&quot;;<br>import Google from &quot;next-auth/providers/google&quot;;<br>import CredentialsProvider from &quot;next-auth/providers/credentials&quot;;<br><br>import { googleLogin, signIn as Login } from &quot;@/lib/actions/auth.actions&quot;;<br>import { getError } from &quot;./lib&quot;;<br><br>/*<br>NextAuth suppresses error messages by default. <br>To get around this, we create a custom AuthError class that lets us pass clean, <br>actionable error messages back to the frontend:<br>*/<br>export class InvalidLoginError extends AuthError {<br>  code = &quot;custom&quot;;<br>  errorMessage: string;<br>  constructor(message?: any, errorOptions?: any) {<br>    super(message, errorOptions);<br>    this.errorMessage = message;<br>  }<br>}<br><br>export const { handlers, signIn, signOut, auth } = NextAuth({<br>  pages: {<br>    signIn: &quot;/signin&quot;,<br>    error: &quot;/signin&quot;,<br>  },<br>  session: {<br>    strategy: &quot;jwt&quot;,<br>    maxAge: 24 * 60 * 60, // 1 day<br>  },<br>  jwt: {<br>    maxAge: 30 * 24 * 60 * 60, // 30 days<br>  },<br>  providers: [<br>    // Google Provider<br>    Google({<br>      clientId: process.env.AUTH_GOOGLE_ID,<br>      clientSecret: process.env.AUTH_GOOGLE_SECRET,<br>      authorization: {<br>        params: {<br>          prompt: &quot;consent&quot;,<br>          access_type: &quot;offline&quot;,<br>          response_type: &quot;code&quot;,<br>        },<br>      },<br>    }),<br><br>    // Credentials Provider<br>    CredentialsProvider({<br>      name: &quot;Credentials&quot;,<br>      credentials: {<br>        email: { label: &quot;Email&quot;, type: &quot;text&quot; },<br>        password: { label: &quot;Password&quot;, type: &quot;password&quot; },<br>      },<br><br>      async authorize(credentials) {<br>        const email = credentials?.email as string;<br>        const password = credentials?.password as string;<br><br>        try {<br>          if (!password || !email) {<br>            throw new InvalidLoginError(&quot;Invalid credentials&quot;);<br>          }<br><br>          const response = await Login({ email, password });<br><br>          if (response?.error) {<br>            throw new Error(response?.error);<br>          }<br><br>          return response?.data;<br>        } catch (error: any) {<br>          throw new InvalidLoginError(getError(error));<br>        }<br>      },<br>    }),<br>  ],<br>  callbacks: {<br>    // Restrict access to routes based on user session<br>    /*<br>      In v4, authorized didn’t exist — route protection was handled via middleware <br>      or session checks in getServerSideProps.<br>      v5 introduces the authorized callback directly inside your <br>      Auth configuration for cleaner route-level control.<br>     */<br>   authorized: async ({ auth }) =&gt; {<br>      // `auth` is the session info available during route protection<br>      // Returning `true` means the request is authorized, `false` blocks it.<br>      // Here we simply check if the user is logged in.<br>      return !!auth; // Only logged-in users are authorized<br>    },<br><br>    // Handle logic during user sign-in (runs whenever a user logs in)<br>    async signIn({ user, account }) {<br>      // If user is signing in with Google OAuth<br>      if (account?.provider === &quot;google&quot;) {<br>          try {<br>            // Exchange Google&#39;s ID token with your backend for your custom token<br>            const res = await googleLogin({<br>              clientId: process.env.AUTH_GOOGLE_ID!,<br>              select_by: &quot;random string&quot;, // optional; identifies the login action<br>              credential: account.id_token!, // Google-issued ID token<br>            });<br>    <br>            // If backend didn&#39;t return a valid token, reject the sign-in<br>            if (!res?.token) {<br>              throw new InvalidLoginError(&quot;Failed to login with Google&quot;);<br>            }<br>    <br>            // Attach backend token and user data to the `user` object<br>            (user as any).token = res.token;<br>            (user as any).data = res.data;<br>    <br>            return true; // allow sign-in to continue<br>          } catch (error) {<br>            // Handle any error that occurs during the Google sign-in process<br>            throw new InvalidLoginError(getError(error));<br>          }<br>      }<br><br>      /* If it&#39;s a credentials-based login (email/password), <br>        just allow sign-in */<br>      return true;<br>    },<br><br><br>    // Called whenever a JWT is created or updated<br>    async jwt({ token, user }) {<br>      // When user logs in, persist custom token &amp; user data inside JWT<br>      if ((user as any)?.token) {<br>        token.token = (user as any)?.token; // backend-issued JWT or session token<br>        token.data = (user as any)?.data;   // full user profile or partial data<br>      }<br>      return token; // Always return the updated token<br>    },<br><br>    // 4️⃣ Control what data is exposed to the frontend session<br>    async session({ session, token }) {<br>      // Pass backend token and user info to the session object<br>      session.token = token.token as string; // backend token (used for API calls)<br>      session.user = token.data as any;      // user info from your backend<br>      return session;<br>    },<br>  }<br>});</pre><h4>API Route + Middleware Setup</h4><p>Instead of duplicating logic in your API route and middleware, you can just reference the shared auth export from above.</p><pre>// src/app/api/auth/[...nextauth]/route.ts<br>import { handlers } from &quot;@/auth&quot;;<br><br>export const { GET, POST } = handlers;</pre><pre>// src/middleware.ts<br>// AuthJS v5 (Beta) Middleware<br><br>export { auth as middleware } from &quot;@/auth&quot;;<br><br>export const config = {<br>  matcher: [&quot;/&quot;, &quot;/(protected-page-1|protected-page-2)/:path*&quot;],<br>};<br><br><br>/* <br>// ⚠️ This is how you&#39;d probably do this in v4 Middleware<br>// In v4, you manually wrapped middleware using `withAuth`<br>// and explicitly checked the token/session.<br><br>import { withAuth } from &quot;next-auth/middleware&quot;;<br><br>export default withAuth({<br>  // You could restrict routes based on role or session existence<br>  callbacks: {<br>    authorized: ({ token }) =&gt; !!token, // Only allow if session token exists<br>  },<br>});<br><br>export const config = {<br>  // Routes to protect<br>  matcher: [&quot;/dashboard&quot;, &quot;/settings/:path*&quot;],<br>};<br>*/<br><br>/*<br>- In v4, `withAuth` came from &quot;next-auth/middleware&quot; and manually wrapped your logic.<br>- You had to use the JWT token to determine if a user was logged in.<br>- The middleware was separate from your main NextAuth config, which meant duplication.<br>- v5 simplifies this by exporting `auth` directly from your main config, <br>  ensuring both middleware and API routes share the same logic.<br>- Make sure to check the Migration guide in the links below<br>*/</pre><h4>Building a Custom Login Form (Email &amp; Password)</h4><p>For the credentials login, we create a custom form that:<br>- Uses controlled inputs (useState)<br>- Handles async login through a server action wrapper (authenticate)<br>- Displays toasts for feedback<br>- Redirects the user on success using router.replace</p><p>Here’s a breakdown of the full login component:</p><pre>&quot;use client&quot;;<br><br>import toast from &quot;react-hot-toast&quot;;<br>import { SignInOptions } from &quot;next-auth/react&quot;;<br>import { useSearchParams, useRouter } from &quot;next/navigation&quot;;<br>import { useState } from &quot;react&quot;;<br>import Link from &quot;next/link&quot;;<br>import { Input, SubmitButton } from &quot;../atoms&quot;; // Reusable input/button components<br>import { getError } from &quot;@/lib&quot;;<br>import { authenticate } from &quot;@/lib/actions/auth.actions&quot;;<br><br>export const LoginForm = () =&gt; {<br>  const router = useRouter();<br>  const [email, setEmail] = useState(&quot;&quot;);<br>  const [password, setPassword] = useState(&quot;&quot;);<br><br>  const searchParams = useSearchParams();<br>  const callbackUrl = searchParams.get(&quot;callbackUrl&quot;) || &quot;/&quot;;<br><br>  const formAction = async () =&gt; {<br>    toast.dismiss();<br>    try {<br>      if (!email || !password) {<br>        throw new Error(&quot;Fill all required fields!&quot;);<br>      }<br><br>      const credentials: SignInOptions&lt;false&gt; = {<br>        redirect: false,<br>        email,<br>        password,<br>        redirectTo: callbackUrl,<br>      };<br><br>      const res = await authenticate(&quot;credentials&quot;, credentials);<br><br>      if (res?.error) {<br>        throw new Error(res.error);<br>      }<br><br>      toast.success(&quot;Login successful, redirecting...&quot;);<br>      return router.replace(`${res?.url || &quot;/&quot;}`);<br>    } catch (error: any) {<br>      toast.error(getError(error) || &quot;Login failed! Please try again.&quot;);<br>    }<br>  };<br><br>  return (<br>    &lt;form<br>      action={formAction}<br>      className=&quot;flex flex-col w-full gap-4 pt-6 mx-auto text-sm text-black lg:mt-auto font-body&quot;<br>    &gt;<br>      &lt;div className=&quot;flex flex-col w-full gap-4 max-w-[500px]&quot;&gt;<br>        &lt;Input<br>          name=&quot;email&quot;<br>          type=&quot;email&quot;<br>          id=&quot;email&quot;<br>          label=&quot;Email Address&quot;<br>          value={email}<br>          onChange={(e) =&gt; setEmail(e.target.value)}<br>          placeholder=&quot;user@example.com&quot;<br>        /&gt;<br><br>        &lt;Input<br>          name=&quot;password&quot;<br>          id=&quot;password&quot;<br>          type=&quot;password&quot;<br>          label=&quot;Password&quot;<br>          value={password}<br>          onChange={(e) =&gt; setPassword(e.target.value)}<br>          placeholder=&quot;**********&quot;<br>        /&gt;<br><br>        &lt;Link<br>          href=&quot;/forgotpassword&quot;<br>          className=&quot;ml-auto font-medium text-dark w-fit hover:underline&quot;<br>        &gt;<br>          Forgot password?<br>        &lt;/Link&gt;<br>      &lt;/div&gt;<br><br>      &lt;SubmitButton<br>        className=&quot;rounded-[20px] min-w-full md:min-w-fit max-w-[201px] w-full text-center justify-center my-4&quot;<br>      &gt;<br>        Sign In<br>      &lt;/SubmitButton&gt;<br><br>      &lt;div className=&quot;flex gap-1&quot;&gt;<br>        &lt;p className=&quot;text-[#64748B]&quot;&gt;Don&amp;apos;t have an account? &lt;/p&gt;<br>        &lt;Link<br>          href=&quot;/signup&quot;<br>          className=&quot;font-semibold text-primary hover:underline&quot;<br>        &gt;<br>          Sign up<br>        &lt;/Link&gt;<br>      &lt;/div&gt;<br>    &lt;/form&gt;<br>  );<br>};</pre><h4>🧪 Auth Helper: Handling Errors with authenticate()</h4><p>NextAuth by default swallows detailed errors from the backend when using the Credentials Provider. This makes it hard to show helpful messages like:</p><p><em>❌ “Incorrect email or password”</em></p><p>Instead, we wrap the signIn() call in a small authenticate() helper function that catches custom InvalidLoginError instances (like we defined earlier) and extracts a clean message using our getError() utility.</p><pre>// src/lib/actions/auth.actions.ts<br>&quot;use server&quot;<br>import { SignInOptions, signIn as NextAuthSignIn } from &quot;next-auth/react&quot;;<br>import { getError } from &quot;@/lib&quot;;<br><br>/* <br>This small wrapper:<br>Lets you surface errors thrown by your authorize() logic <br>(e.g. InvalidLoginError)<br>*/<br><br>export async function authenticate(<br>  provider: string,<br>  signinOptions: SignInOptions&lt;false&gt; = {}<br>) {<br>  try {<br>   return await NextAuthSignIn(provider, signinOptions);<br>  } catch (error: any) {<br>    return {<br>      error: error?.errorMessage || getError(error),<br>    };<br>  }<br>}</pre><h4>Auth Helper: Handling Errors with authenticate()</h4><p>As mentioned earlier, we wrap signIn() with a custom authenticate() helper to capture backend errors and cleanly show them on the frontend.</p><p>But here’s a subtle detail that trips up a lot of people 👇</p><h4>Which signIn are we using?</h4><p>When logging in with <strong>credentials</strong>, we don’t use the default signIn() from &quot;next-auth/react&quot;.</p><p>Instead:</p><ul><li>✅ We use the signIn exported from our auth.ts setup file (i.e. NextAuth().signIn)</li><li>✅ This supports catching and returning <strong>custom errors</strong> like InvalidLoginError</li></ul><p>For other providers like <strong>Google</strong>, we fall back to the built-in signIn() from next-auth/reactalthough personally I have never experienced any errors with the OAUTH providers.</p><p>Now that sign-in is set up, let’s see how to <strong>access session data</strong> across your app.</p><h4>Accessing the Session (Server &amp; Client)</h4><p>Once users are authenticated, you can access their session from <strong>anywhere in your Next.js App Router project</strong>.</p><ul><li><strong>On the Server (e.g. pages, layouts, or server actions)</strong></li></ul><pre>// app/dashboard/page.tsx or in any server component<br>import { auth } from &quot;@/auth&quot;;<br><br>const session = await auth();<br><br>console.log(session?.user?.email);</pre><p>This is useful for:</p><ul><li>Protecting routes</li><li>Rendering dynamic UI (e.g. based on roles or permissions)</li><li>Fetching user-specific data</li><li><strong>In Client Components</strong></li></ul><pre>&quot;use client&quot;;<br>import { useSession } from &quot;next-auth/react&quot;;<br><br>export const Dashboard = () =&gt; {<br>  const { data: session } = useSession();<br><br>  return &lt;p&gt;Hello, {session?.user?.name}&lt;/p&gt;;<br>};</pre><p>This is perfect for:</p><ul><li>Header components (showing user info)</li><li>Buttons like “Logout”</li><li>Personalizing user-facing UI</li></ul><h4>Logging Out</h4><p>To log out, you use the built-in signOut() function:</p><pre>&quot;use client&quot;<br><br>import { signOut } from &quot;next-auth/react&quot;;<br><br>&lt;button onClick={() =&gt; signOut({ callbackUrl: &quot;/signin&quot; })}&gt;<br>  Logout<br>&lt;/button&gt;</pre><p>So yea, that’s how I would set up and use NextAuth in a Next.js project with custom backend support.</p><p>We covered:</p><ul><li>Credentials sign-in with email and password</li><li>Google login and how I pass the token to the backend for verification</li><li>How I return proper errors using InvalidLoginError</li><li>A small helper (authenticate) to cleanly handle those errors in the UI</li><li>How to access sessions on both server and client</li><li>Protecting routes with middleware</li><li>Logging out with a simple signOut() call</li></ul><p>Hope this helps someone out there trying to spin up a similar flow.</p><p>Got questions? Feedback? I’d love to hear it.</p><p>Also, I’m curious — how do you handle authentication in your React or Next.js projects?</p><p>Drop a comment, and let’s share some ideas 👇</p><h4>🔗 Helpful Links</h4><p>Here are some useful links if you want to dive deeper or need docs for anything I mentioned:</p><ul><li><a href="https://github.com/nextauthjs/next-auth/discussions/8999#discussioncomment-10107786">Git issue thread that helped me figure it out</a>. Thanks <a href="https://github.com/aaliboyev">Aaliboyev</a></li><li><a href="https://authjs.dev/">AuthJS (NextAuth) Docs</a> — official docs for everything NextAuth-related</li><li><a href="https://authjs.dev/guides/upgrade-to-v5">NextAuth v5 Migration Guide</a> — if you’re coming from v4 like myself.</li><li><a href="https://nextjs.org/docs/app">Next.js App Router Docs </a>— everything about layouts, server components, and routing</li><li><a href="https://authjs.dev/reference/core/providers/credentials#authorize">NextAuth </a><a href="https://authjs.dev/reference/core/providers/credentials#authorize">authorize callback (Credentials Provider)</a> – how to use authorize to talk to your backend</li><li><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions">Server Actions in Next.js</a> — official guide on using server actions</li><li><a href="https://authjs.dev/reference/nextjs#auth">Session handling with </a><a href="https://authjs.dev/reference/nextjs#auth">auth()</a> – accessing session data on the server</li><li><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware">Middleware in Next.js </a>— protect routes with middleware.ts</li><li><a href="https://react-hot-toast.com/">React Hot Toast</a> — clean, flexible toast notifications for feedback</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d10b4dd4838" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/custom-error-handling-with-authjs-next-auth-beta-and-a-custom-backend-in-next-js-4d10b4dd4838">Custom error handling with AuthJS (NextAuth) v5 Beta and a Custom Backend in Next.js</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Managing Data in React Components: Scope, Immutability, and Performance]]></title>
            <link>https://medium.com/@nnebedumfav/managing-data-in-react-components-scope-immutability-and-performance-a2d2af93e52?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2d2af93e52</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[components]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Mon, 04 Sep 2023 05:32:22 GMT</pubDate>
            <atom:updated>2026-09-18T09:24:32.323Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UnlXSTmmYNzj8XpR" /><figcaption>Photo by <a href="https://unsplash.com/@lautaroandreani?utm_source=medium&amp;utm_medium=referral">Lautaro Andreani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently, I was working on a react project and fell into a dilemma: Where is the right place to declare my data? <em>‘Outside the component’ </em>or ‘<em>within the component’</em>. Here’s what I mean, Check code sample 1 vs sample 2 below.</p><p><strong>Sample 1:</strong></p><pre>// Sample 1<br>import React from &quot;react&quot;;<br><br>// Data<br>const books = [&quot;book1&quot;, &quot;book2&quot;, &quot;book3&quot;];<br><br>const Books = () =&gt; {<br>  return (<br>    &lt;div&gt;<br>      {books.map((book, index) =&gt; (<br>        &lt;p key={index}&gt;{book}&lt;/p&gt;<br>      ))}<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Books;</pre><p><strong>Sample 2:</strong></p><pre>// Sample 2<br>import React from &quot;react&quot;;<br><br>const Books = () =&gt; {<br>  // Data<br>  const books = [&quot;book1&quot;, &quot;book2&quot;, &quot;book3&quot;];<br><br>  return (<br>    &lt;div&gt;<br>      {books.map((book, index) =&gt; (<br>        &lt;p key={index}&gt;{book}&lt;/p&gt;<br>      ))}<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Books;</pre><p>In my early React days, I was firmly in the “declare inside the component” camp, much like what we see in <strong><em>Sample 2</em></strong>. It felt natural, and it worked. However, as my React journey continued and I delved deeper into how React components work under the hood I began to have some doubts.</p><p>Here’s a not too long explanation: When you create a component with data or functions declared before the inbuilt react ‘<strong><em>render</em></strong>’ method or in this case the ‘<strong><em>return</em></strong>’ statement, and that component gets reused or re-rendered, every time it happens, all that data is reconstructed from scratch. Imagine baking a fresh batch of cookies every time you want a snack. Yummy, but not very efficient. You can check it out with this sample,</p><pre>import React, { useState } from &quot;react&quot;;<br><br>const testFunction1 = (() =&gt; {<br>  console.log(&quot;I will log only once!&quot;);<br>})();<br><br>const Counter = () =&gt; {<br>  const [count, setCount] = useState(0);<br><br>  //IIFE - Immediately invoked function expression<br>  const testFunction2 = (() =&gt; {<br>    console.log(&quot;I logged because this component just rendered or re-rendered&quot;);<br>  })();<br><br>  const incrementCount = () =&gt; setCount((prev) =&gt; prev + 1);<br>  const decrementCount = () =&gt; setCount((prev) =&gt; prev - 1);<br><br>  return (<br>    &lt;div&gt;<br>      &lt;div style={{ display: &quot;flex&quot;, justifyContent: &quot;space-between&quot;, alignItems: &quot;center&quot;, fontSize: &quot;2em&quot;, gap: &quot;1em&quot;}}&gt;<br>        &lt;button onClick={decrementCount} style={{ padding: &quot;0.8em 1em&quot;, border: &quot;1px solid&quot; }}&gt; - &lt;/button&gt;<br>        &lt;h1&gt;Count: {count}&lt;/h1&gt;<br>        &lt;button onClick={incrementCount}  style={{ padding: &quot;0.8em 1em&quot;, border: &quot;1px solid&quot; }}&gt; + &lt;/button&gt;<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Counter;</pre><p><em>Open up your console and you’d notice as you increment or decrement the counter with the state updates the count value and hence the component re-renders, you’d notice the log statements, the ‘</em><strong><em>testfunction1</em></strong><em>’ is only created once but the ‘</em><strong><em>testFunction2’</em></strong><em> is recreated as many times as the count changes and the component re-renders. The ‘</em><strong><em>incrementCount’</em></strong><em> and ‘</em><strong><em>decrementCount’</em></strong><em> functions are recreated too but we don’t exactly see that, but yeah, you get the point, yes???</em></p><p>I wondered: could this be impacting my app’s performance? This question prompted a shift in my approach. I started to declare any data that I needed to remain immutable outside the component, similar to what we have in ‘<strong><em>Sample 1</em></strong>’.</p><p>But then, I stumbled upon various React codebases, each flaunting its own style. This got me thinking — what is the “right” way, and why?</p><h3>The Best on Twitter: &quot;React devs on TL. Which would you choose? A or B.Would really appreciate if you can give your reason.PS: The diff is just where the &#39;BookData&#39; is declared.#reactjs pic.twitter.com/UZH2jg6jS4 / Twitter&quot;</h3><p>React devs on TL. Which would you choose? A or B.Would really appreciate if you can give your reason.PS: The diff is just where the &#39;BookData&#39; is declared.#reactjs pic.twitter.com/UZH2jg6jS4</p><p>I even asked the community on twitter and it turned out most people preferred ‘<strong><em>Sample 1</em></strong>’ over <strong><em>‘Sample 2’. </em></strong>Their reasons included readability, clean code, avoiding the re-rending issue I talked about.</p><p>While I gained some insights, I wasn’t exactly satisfied with the answers I got and I sort to look for more answers and here are my findings:</p><p>First, in comparing <strong><em>Sample 1 </em></strong>to<strong><em> Sample 2</em></strong>, I found that while <strong><em>Sample 1 </em></strong>would work, it could lead to potential bugs. For example, if you have multiple instances of the Books component, they would all share the same books array. If any component modifies the books array, it will affect all instances, potentially leading to unexpected behaviour and bugs. See case below.</p><pre>books[0] = &quot;newBook&quot;;</pre><p>Then <strong><em>Sample 2 </em></strong>(declaring data within a component)<strong><em> </em></strong>is generally thought to be safer and more predictable in React applications because each component instance maintains its own state and data. Modifying the books array within one instance of the component won&#39;t affect other instances.</p><p>Regarding performance, recreating the books array or any other data on each render can have some implications, but in most cases, this won&#39;t lead to significant performance problems as modern JavaScript engines are optimised to handle such scenarios efficiently. However, if the books array were much larger and the component were being re-rendered frequently (such as in a complex animation or with a large number of components), it might be worth considering optimisations like using the React.memo Higher Order Component to prevent unnecessary re-renders or moving the books array outside of the component if it doesn&#39;t need to be recreated on every render.</p><p>So to wrap this up, this is my suggestion:<br><strong>1.</strong> If you favour clean, readable and <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself"><strong><em>DRY</em></strong></a> code, you can declare your data outside the component or even create a file for it and export it for use amongst shared components. Just be certain that none of the components using that data would ever attempt to alter that data or its content.</p><p><strong>2. </strong>You can still declare your data within your component and only have to worry about performance issues when that data is a huge data. Even ‘Chat GPT’ advised:</p><blockquote>Premature optimization should be avoided, and it’s generally best to write code that is clear and maintainable first. If you notice actual performance issues, you can then profile and optimise accordingly.</blockquote><p>That’s about it. Please do share your take on the matter? Do you lean towards declaring data inside the component, or do you prefer the external, globally accessible approach? Perhaps you’ve discovered a third path we haven’t explored yet. I’d really love to hear (or read). Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2d2af93e52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My re on Unified Modeling Language (UML)]]></title>
            <link>https://medium.com/@nnebedumfav/my-re-on-unified-modeling-language-uml-b2b88c06ef79?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2b88c06ef79</guid>
            <category><![CDATA[use-case-diagram]]></category>
            <category><![CDATA[personal-review]]></category>
            <category><![CDATA[uml]]></category>
            <category><![CDATA[unified-modeling-language]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 11 Dec 2022 22:10:45 GMT</pubDate>
            <atom:updated>2022-12-11T22:54:28.114Z</atom:updated>
            <content:encoded><![CDATA[<h3>My review on Unified Modeling Language (UML)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_m8oDHYe0z4mBCGR" /><figcaption>Photo by <a href="https://unsplash.com/@halacious?utm_source=medium&amp;utm_medium=referral">Hal Gatewood</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So part of my internship work is a study on Unified modeling language and I must confess, I had never heard of that before. But taking a closer look, I actually found it somewhat interesting and here are some things I found;</p><p>Usually, most projects that are worthwhile would require a great deal of planning and without doubt <em>modeling/sketching</em> is a very essential part of all planning process as it gives a more visual representation of what the project looks like.</p><p>In software engineering/development, there are usually a lot of stakeholders involved and each of these stakeholders look at unique aspects of the project and from a unique view point/angle. Hence, trying to describe the project to the various stakeholders gives a <a href="https://www.britannica.com/topic/Tower-of-Babel"><em>tower of babel</em></a> kind of vibes where everyone speaks and understand a different language from each other. Then came UML (Unified Modeling Language) which has become sort of a one language (translation) for all development teams.</p><p>So what is UML really? Well, here’s an idea</p><blockquote><a href="http://www.omg.org/spec/UML/">UML</a>, short for Unified Modeling Language, is a standardised modeling language consisting of an integrated set of diagrams, developed to help system and software developers for specifying, visualising, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. — <a href="https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-uml/">Visual Pradigm</a></blockquote><blockquote>The creation of UML was originally motivated by the desire to standardise the disparate notational systems and approaches to software design — <a href="https://en.wikipedia.org/wiki/Unified_Modeling_Language#:~:text=The%20creation%20of%20UML%20was,led%20by%20them%20through%201996."><strong>Wikipedia</strong></a></blockquote><p>So basically, UML attempts to provide a representation / <em>translation</em> of the system through its many diagrams to suit the individual unique view point of each stakeholder.</p><p>UML having it’s roots in object-oriented programming since it’s inception in the 1990s till date, has gone through many reviews and updates; the most current version being the version 2.5.1 released December 2017.</p><p>UML 2.0+ came with major enhancements and features to the already existing modeling diagrams that existed in previous versions.</p><p>The many (13) diagrams so far in UML 2.0+ are categorised under <strong>Structure</strong> and <strong>Behaviour</strong> diagrams. While the Structure diagrams focus on the static structure of the system and the <em>tiny-bitty </em>parts and how they are related to each other, the Behaviour diagrams focuses on the relationship and dynamic behaviour of the objects in the system over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yCBbnZMaBdfpQhhXkNFTuA.png" /></figure><p>The <strong>Interaction diagrams</strong> (a subset of the Behaviour diagrams) for example models 4 different forms of interaction between objects in a system.</p><ol><li>Sequence diagram: This shows the order of interactions to accomplish a goal of the system.</li><li>Communication diagram: This came new in 2.0 modifying the already existing <em>collaboration diagram</em> that existed in previous versions. It shows the interactions between objects of the system showing the messages that travel between them.</li><li>Interaction overview diagram: Also introduced with 2.0. It can pictures a control flow-logic with nodes that can contain interaction diagrams of fragments of the system.</li><li>Timing diagram: This was also new in 2.0. It models the time constraint on messages that travel in the course of interaction.</li></ol><p>The <strong>Class diagrams </strong>likewise models the different types of objects in the system and the various relationship that exists between them. These relationships can one of <em>association, inheritance, realisation, dependency, aggregation or composition</em>.</p><p>The <strong>Use-case</strong> diagram also models the system options and functionalities available for users and scenarios. It is usually used in all phases of software development.</p><p>These new diagrams are actually based on concepts from the previous versions but modified with new features to increase usability and efficiency.</p><p>While in reality, development teams can use just about any form to describe and understand their software, UML is a global language that makes it easier to describe a software in such a way that even a new development team can easily understand the system and continue it’s development and there are various online design and collaboration tools/software that makes it even more easy to come up with the UML diagrams e.g <a href="https://www.lucidchart.com/pages/landing"><strong><em>Lucidchart</em></strong></a><strong><em> </em></strong>offers a lot of useful templates and tools on its paid tiers, with limits on drawing tools on its free tier. There’s also <a href="https://www.diagrams.net/"><strong><em>Draw.io</em></strong></a><strong><em> </em></strong>which<strong><em> </em></strong>is quite beginner friendly and offers a lot of free tools. <br>Here’s a list of other <a href="https://www.guru99.com/best-uml-tools.html"><strong><em>UML softwares/tools</em></strong> </a>you can try out.</p><p>Thank you for reading, I would love to hear your thoughts on this in the comments.</p><p><strong>Sources:</strong></p><p>1. <a href="https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-uml/">What is Unified Modeling Language (UML)?</a></p><p>2. <a href="https://en.wikipedia.org/wiki/Unified_Modeling_Language">Unified Modeling Language</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2b88c06ef79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Javascript var, let or const: Which should you use.]]></title>
            <link>https://medium.com/@nnebedumfav/javascript-var-let-or-const-which-should-you-use-c6ce7ace2182?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6ce7ace2182</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[var]]></category>
            <category><![CDATA[const]]></category>
            <category><![CDATA[etl]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 19:26:24 GMT</pubDate>
            <atom:updated>2022-12-04T19:41:14.960Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sbng5HRILU-jDizB" /><figcaption>Photo by <a href="https://unsplash.com/@bdchu614?utm_source=medium&amp;utm_medium=referral">Brendan Church</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you ever find yourself having a hard time deciding which keyword to use when declaring your variables in javascript, here are 2 major things to consider:</p><h4>1. Variable scope</h4><p>One of the most important factors to consider before declaring your variable is scope which is basically the area in you code where you hope to use it. <br>Currently, Javascript has 3 types of scope:</p><ul><li><strong>Global scope</strong>: Declaring a variable here makes it is available through out your code.</li></ul><pre>//Global scope example<br><br>var name = &#39;Ifechi&#39;;<br>console.log(name); //outputs Ifechi<br><br>//name is available here<br><br>function getName(){<br>  //name is available here<br>  console.log(name)<br>}<br><br>//name is available here<br><br>getName() //Outputs &#39;Ifechi&#39; <br><br>/* This is because name is declared and available <br>globally outside any function or block.*/<br><br>// Also, you can declare your variables here with var, let or const</pre><ul><li><strong>Block scope</strong>: A block is basically any code within curly brackets / braces — { }. This scope was introduced with <a href="https://www.w3schools.com/js/js_es6.asp"><em>ES6 (2015)</em></a><em> </em>and this gave birth to ‘<em>let</em>’ and ‘<em>const</em>’. If you declare any variable with <strong><em>let</em></strong> or <strong><em>const</em></strong><em> </em>inside the braces, they are only available and accessible within that scope. If you declare a variable with <strong><em>var</em></strong> inside a block/braces it is still available and accessible globally.</li></ul><pre>//Block scope example<br><br>{ <br>  let name = &#39;Ifechi&#39;;<br>  <br>  //inside the block<br>  //name is only available here<br>}<br><br>console.log(name) //outputs &#39;name is not defined&#39;<br>// outside the block<br>// name is not available here<br><br>{<br>  var name = &#39;Ifechi&#39;;<br><br>  //inside the block<br>  //name is only available here<br>}<br>console.log(name) //outputs Ifechi<br>//outside the block<br>//name is available globally</pre><ul><li><strong>Function scope</strong>: Variables can be declared with <strong><em>var</em></strong>, <strong><em>let</em></strong> or <strong><em>const</em></strong> in a function scope but these variables are only available within that function.</li></ul><pre>//Function scope example<br><br>function getName () {<br>  var name1 = &#39;Ifechi&#39;;<br>  let name2 = &#39;Femi&#39;;<br>  const name3 = &#39;Hassan&#39;;<br><br>  console.log(name1) //outputs Ifechi<br>  console.log(name2) //outputs Femi<br>  console.log(name3) //outputs Hassan<br>}<br><br>console.log(name1) //name1 is  undefined<br>console.log(name2) //name2 is  undefined<br>console.log(name3) //name3 is  undefined</pre><h4>2. Variable mutation (re-assignment and re-declaration).</h4><p>If you have answered the question of scope, then the next important decision is on variable re-assignment/mutation.</p><p>Variable re-assignment simply means assigning a new value to an already existing variable. Only variables declared with <strong><em>var</em></strong> or <strong><em>let</em></strong> supports re-assignments, a variable declared with the <strong><em>const </em></strong>keyword cannot be re-declared, re-assigned or changed.</p><p>Variable re-declaration is declaring an already existing variable again. Only variables declared with the <strong><em>var </em></strong>keyword supports re-declaration.<br>See examples below;</p><p>The<strong><em> var</em> </strong>keyword<strong> </strong>permits re-assignments and re-declaration within any scope;</p><pre>// var example<br><br>var name = &#39;Ifechi&#39;;<br>  name = &#39;Hassan&#39; //variable (name) re-assignment<br>console.log(name) //outputs Hassan<br><br>var name = &#39;Femi&#39;; //variable (name) re-declared<br>console.log(name) //outputs Femi<br><br></pre><p>The<strong><em> let </em></strong>keyword<strong><em> </em></strong>permits re-assignments but only permits one declaration of that variable per scope;</p><pre>// let example<br><br>let name = &#39;Ifechi&#39;;<br>  name = &#39;Hassan&#39; //variable (name) re-assignment<br>console.log(name) //outputs Hassan;<br><br>//re-declare the variable (name) within the same scope;<br>let name = &#39;Femi&#39;; //Uncaught SyntaxError: Identifier &#39;name&#39; has already been declared<br>console.log(name) //outputs Hassan;<br><br>//re-declare the variable (name) within another scope;<br>function getName(){<br>  //function scope<br><br>  let name = &#39;Ugochi&#39;<br>  console.log(name) //outputs Ugochi;<br>}</pre><p>The <strong><em>const</em></strong> keyword does permit re-assignments and just like the <strong><em>let </em></strong>keyword, it only permits one declaration of that variable per scope;</p><pre>// const example<br><br>const name = &#39;Ifechi&#39;;<br>console.log(name) //outputs Ifechi;<br>  <br>name = &#39;Hassan&#39; //TypeError: Assignment to constant variable.<br>console.log(name) //outputs Ifechi;<br><br>//re-declare the variable (name) within the same scope;<br>const name = &#39;Femi&#39;; //Uncaught SyntaxError: Identifier &#39;name&#39; has already been declared<br>console.log(name) //outputs Hassan;<br><br>//re-declare the variable (name) within another scope;<br>function getName(){<br>  //function scope<br><br>  const name = &#39;Ugochi&#39;<br>  console.log(name) //outputs Ugochi;<br>}</pre><p>In summary,</p><p>The <strong><em>var </em></strong>keyword<strong><em> </em></strong>might seem alright to use, but it exposes your code to some malfunction as your variable can easily be modified anywhere within your code without your knowledge. Also a variable declared with the <strong><em>var</em></strong> keyword can also be redeclared with the <strong><em>let</em></strong> or <strong><em>const</em></strong> keyword. It is commonly advised to use the <strong><em>let</em></strong> keyword instead of the <strong><em>var </em></strong>keyword. Only use the <strong><em>var</em></strong> keyword if you know what you are doing and comfortable with the 1001 unpredictable outcomes of your code logic.</p><p>The <strong><em>let </em></strong>keyword is a great replacement for <strong><em>var, </em></strong>the major upgrade being that it basically prevents you from redeclaring a variable that has already been declared in a given scope but it also give you the option of modifying/re-assigning values to that variable within the scope it was declared.</p><p>The <strong><em>const </em></strong>keyword is best for variables you are sure there wont be any need to modify the values somewhere in the future of your code, as it doesn’t support variable re-assignment or re-declaration in a given scope.</p><p>I‘d love to know if this helps or if you have any thoughts or contribution.<br>Please feel free to leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6ce7ace2182" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Command line Git commands every dev. should know.]]></title>
            <link>https://medium.com/@nnebedumfav/command-line-git-commands-every-dev-should-know-32365d33226c?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/32365d33226c</guid>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 19:38:57 GMT</pubDate>
            <atom:updated>2022-12-04T09:29:42.927Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Zd-2fYCvGerriuT8uUm4A.png" /><figcaption>Photo by Roman Synkevych 🇺🇦 on Unsplash</figcaption></figure><p>While there are many ways to interact with <a href="https://git-scm.com/">Git</a>; <em>Github Desktop</em>, <em>VSCode source control panel </em>etc, getting to have a few git tricks up your sleeves might make you a better developer or <em>magician. </em>You never know, you might just end up in an interview where you are required to work with git, there might be not <em>vscode</em>, <em>github desktop</em> or other sophisticated GUIs you are used to, but trust me, there’s a pretty big chance there’d most certainly be a command line.</p><ol><li><strong>git -v or git — version: </strong>This command returns the git version installed on your machine. It’s a good trick to check if git is installed on your machine or not and if its not, you could get it <a href="https://git-scm.com/"><em>here</em></a><em>.</em></li><li><strong>git init : </strong>This command initialises a local git repository on your machine. Just navigate to your project directory and wave your git wand — ‘<em>git init</em>’ and voila.</li><li><strong>git add .</strong> : Say you’ve made a lot of changes in your project affecting multiple files, this command stages all files with changes and prepares them for commit and pushing to your online repository.</li><li><strong>git add <em>file.extension</em> : </strong>Say you want to only stage, commit and push just one file you have made changes to, this command helps you stage just one file. Just replace ‘<strong><em>file.extension</em></strong>’ in the command with your file name and extension. E.g <em>git add index.js</em></li><li><strong>git commit -m ‘<em>put your commit message here</em>’</strong> : This command helps you commit your changes to your project history and add a message to it. It is commonly advised to use meaningful commit messages to help any other person who might have to work on your project sometime later, <em>(Who knows, that person might be future you).</em></li><li><strong>git push : </strong>Great job staging and committing all your changes. This command is your <em>magic word </em>to move your changes from your local repository on your machine to a remote (online) repository.</li><li><strong>git clone : </strong>Say you are collaborating on an already existing project, to get a copy of that project on your own local machine, git clone + the url of the repository you are trying to clone, e.g <em>git clone </em><a href="https://github.com/repo_owner/repository_name"><em>https://github.com/repo_owner/repository_name</em></a></li><li><strong>git fetch : </strong>This<strong> </strong>downloads files from an already existing repository but doesn’t merge all changes but gives your an opportunity to look over them before integrating the new files into your project.</li><li><strong>git pull :</strong> This is just like <em>git fetch,</em> only that it downloads changes from an already existing repository branch and merges them with your local repository.</li><li><strong>git branch : </strong>This is a multi-purpose command. On its own, <em>git branch </em>returns all the branches on your repository. Quite useful when used with some other commands like git checkout, git pull, git merge, etc.</li></ol><p>Certainly there are tons of other git commands every developer should know, but these few tricks could get you through a basic git work flow.</p><p>Here are some other resources that could help you learn more about git commands:</p><ul><li><a href="https://www.atlassian.com/git/glossary">Git Commands: https://www.atlassian.com/git/glossary</a></li><li><a href="https://git-scm.com/doc">Git Documentation: https://git-scm.com/doc</a></li><li><a href="https://devmountain.com/blog/git-vs-github-whats-the-difference/#:~:text=GitHub%E2%80%A6-,what&#39;s%20the%20difference%3F,help%20you%20better%20manage%20them.">Difference between git and github</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32365d33226c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to kill a tech giant or become one]]></title>
            <link>https://medium.com/swlh/how-to-kill-a-tech-giant-or-become-one-394ee1cfd5ad?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/394ee1cfd5ad</guid>
            <category><![CDATA[startupsinsider]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[disruption]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[disruptive-innovation]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 31 Oct 2021 17:46:36 GMT</pubDate>
            <atom:updated>2021-10-31T17:49:34.539Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How to kill a tech giant or become one</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-w6CEgdvvVclAc6N2oTdjQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@felix_mittermeier?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Felix Mittermeier</a> on <a href="https://unsplash.com/s/photos/chess?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Way back, it would almost sound bizarre that a new startup business would attempt to challenge an old timer and win in market competition because there are usually a lot of tricks and plays these already established giants could deal and make the new startups disappear into thing air like <em>Thanos </em>just snapped his fingers.</p><p>Some of the old tricks in the book include:</p><ul><li><strong>The price war:</strong> Here the giants beat down their price and still stay afloat thanks to their economies of scale and large customer base. When new comers try to adjust price to that of the giant, cost of production shoots up way higher than their selling price leaving them running at a loss and in the long run. With time, the little guy gets frustrated and leaves the stage for the giants before or when they run into bankruptcy.</li><li><strong>Buy and kill:</strong> Here the giants dangles a sweet deal for the little guy, offering to acquire their company. This is usually a dream come true for some founders — <em>to get noticed by the big guys and get acquired by them and cash out.</em> But what they usually don’t know is that the giants are only offering to buy them to kill them. They kill the vision and idea behind the startup and put the whole startup away from ever rising to it’s full potential. Just like icing on a sour cake. Deal looks so good on the outside but with deathly intent. The giants always kill the little guy.</li><li><strong>The copy and paste:</strong> In the good old days, inventors had the protection from patenting their works and keeping production and distribution of their idea under their control. But the internet Era brought with it a lot of updates to what an invention/innovation is. If you built a product that allows people post a picture that stays online for 24 hours and disappear, a small genie could independently code the same product and give it another name. Giants in the startup world also use this strategy to frustrate competition as well. I don’t intend to call names but have you noticed you can have snapchat on your <em>whatsapp</em>, <em>Facebook </em>and <em>Instagram</em>. Oh! You prefer <em>tiktok</em>? Guess what you can also do that with reels. Because of years of experience, more capital, more reach, and more of everything, a giant can easily bully the small guys by copying their idea and sharing it to a larger audience so much so that the small guys never really get to see the world as they might wished to.</li></ul><p>These tactics and so many others have been deployed by the big guys over the years and unfortunately for the small guys, it has always worked out for the giants, but the tables are turning gradually and we are getting to see more Davids slay these giants and here’s how: <br>In recent times, we have seen the small guys take out the big guys like Uber, bolt, <em>taxify</em> challenging the conventional transport giants, Netflix giving Blockbuster and others a run for their money, <em>Paystack</em>, <em>flutterwave</em>, <em>KudaBank</em>, <em>Piggyvest </em>taking old time Money giants back to the classroom and one of the words best sums up this strategy - Disruption.</p><p>Probably by taking strategy classes from Sun Tzu,</p><blockquote>The opportunity of defeating the enemy is provided by the enemy himself.</blockquote><p>Some more recent startups have maximized the ignorance of the giants to their own advantage, putting the giants to early retirement and even becoming giants themselves.</p><blockquote>Pretend inferiority and encourage his arrogance.</blockquote><p>First by identifying and meeting an unmet or neglected need of a giant’s customer base especially in a way that’s subtle and easily overlooked by the giant, these small startups gain quite a number of subscribers who are still subscribers to the giant.</p><p>Gradually, the small unattractive guy pulls out the same weapon the giant would have used on them earlier - the copy and paste strategy. In addition to this new solution that is meeting neglected needs, the little guy replicates and offers the same already existing offers of the giant - boom! Checkmate or (at least a major check on the opponent’s king).</p><p>Usually when this disruption happens, it comes as a shock to the giant and things could go different ways for these giants depending on how they respond. But if the little guys stay focused on their goal, supplying simplified new offers and regular offers of the giants, with time, they either kill the giant or grow into a giant and keep contending on the same level as the regular giants.</p><p><strong>So here’s the big secret: Disruption is the best strategy going up against a giant and disruption is the sure way to remain a giant.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=394ee1cfd5ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/how-to-kill-a-tech-giant-or-become-one-394ee1cfd5ad">How to kill a tech giant or become one</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semantic HTML and Accessibility]]></title>
            <link>https://medium.com/swlh/semantic-html-and-accessibility-a61283b21231?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/a61283b21231</guid>
            <category><![CDATA[semantic-html]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Fri, 31 Jul 2020 12:18:16 GMT</pubDate>
            <atom:updated>2020-08-04T00:07:57.156Z</atom:updated>
            <content:encoded><![CDATA[<h3>Semantic HTML and Accessibility and why we all should care.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_AtSOlTCnn9wcncW5cP1UQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@_imkiran?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sai Kiran Anagani</a> on <a href="https://unsplash.com/s/photos/html?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>What is HTML?</h3><p>For non-developers <em>(and developers who did not know before now)</em>,<br>HTML is short for HyperText Markup Language which is basically a standard and globally recognized language that tells a web browser what to and how to display documents to our web pages. It does this with the use of tags and elements written like these; <strong>&lt;div&gt;</strong><em>,</em><strong>&lt;p&gt;</strong><em>, </em><strong>&lt;header&gt;</strong> etc. (Hopefully we are on the same page now).</p><h3><strong>Semantic HTML</strong></h3><p>Semantic is simply a meaningful HTML, a markup that conveys meaning and not just to the web browsers running our HTML codes but also convey some meaning to an extent to an average human <em>(both developers and non-developers).</em></p><p>Having a semantic HTML is simply having a markup that explains or gives meaning to what it does.</p><p>According to <a href="https://www.lifewire.com/jennifer-kyrnin-bio-3463952">Jennifer Kyrnin</a> :</p><blockquote>An important principle in web design is the idea of using HTML elements to indicate what they actually are, rather than how they may appear in the browser by default. This is known as using semantic HTML.</blockquote><p>HTML provides a wide range of tags and elements <em>(HTML4 and HTML5 provides a wide range of semantic HTML tags/elements)</em>. This wide range of elements to choose from sometimes make it a tough decision choosing which tag to use especially as some tags could produce similar results as some others on a web page. For example, the &lt;<strong>div&gt;, </strong><strong>&lt;section&gt;</strong> and &lt;<strong>article&gt;</strong><em> </em>elements are just containers for other HTML elements and they display similar results on a web page but the only difference between them is in their meaning <em>(Semantics)</em>. While you are reading this article, even if you are not a developer and surely you are not a web browser, you could still get some meaning from the words <strong><em>section</em></strong><em> </em>and <strong><em>article</em></strong><em> </em>as these are normal words we come across in the English language. But <strong>&lt;div&gt;</strong> on the other hand does not hold much meaning to it, the web browsers understand what it means but an average human might not and even if then do, it does not exactly attempt to describe the contents it contains. This is why the use off Semantic HTML is generally encouraged.</p><p>On the other side, the browsers can read, understand and render any HTML tag correctly even when semantic HTML is not applied. There are no functionality problems associated with not using semantic HTML <em>(I am yet to discover one), </em>but the issue of using Semantic HTML arises when we properly consider general accessibility especially in human context.</p><h3><strong>Accessibility</strong></h3><p>When we talk about accessibility in web design, the goal is usually to consider easy access for a broad range of audience.</p><p>According to <a href="https://www.freecodecamp.org/learn/responsive-web-design/applied-accessibility/"><strong><em>FreeCodeCamp</em></strong></a><strong><em> </em></strong>:</p><blockquote>“Accessibility” generally means having web content and a user interface that can be understood, navigated, and interacted with by a broad audience. This includes people with visual, auditory, mobility, or cognitive disabilities.</blockquote><p>Semantic HTML is a great way to achieve Accessibility. Hence, even people with visual impairments can have access to your web content even if they can’t read the screen properly, they do this through <a href="https://www.nomensa.com/blog/2005/what-screen-reader"><em>screen reader software</em></a><em> . </em>These screen readers depend mostly on the HTML elements in other to help with page navigation.</p><p>So it is important that the right HTML elements/tags are used for the right contents and placed in the right place to allow easy access to a broader audience.</p><h3>Why we all should care</h3><p>Since HTML makes up a huge part of the World Wide Web which is where most of our interactions occur, I believe it is quite a big deal how well rendered and accessible our HTML is rendered to our audience, especially, since we cannot tell who might be viewing our web pages on the other side.</p><p>I believe every content, website or app we put out there was created with consideration of how it affects man/human and if that is true, then a deliberate selection of HTML tags/elements for our website should be considered so as to provide as wider range of audience access to our web contents.</p><h3>Some examples</h3><p>Here are some Semantic HTML tags/elements and uses;</p><p>The &lt;<strong>main&gt;<em> </em></strong>tag can be used to separate main content from other <em>distractions</em> on a web page.</p><p>The &lt;<strong>section&gt; </strong>tag can be used <em>(instead of the </em>&lt;<strong>div&gt;<em> </em></strong><em>tag)</em> to hold contents and divide the page into meaningful sections on a web page. It has meaning on its own, just like with a newspaper, we can browse through sections. Screen readers can also interpret this tag as intended for visually impaired clients as well.</p><p>The <strong>&lt;nav&gt;</strong> tag is short for navigation, this could be used to hold navigation links for different sections or parts of a website.</p><p>The <strong>&lt;img&gt;</strong> tag is used to render images to a web page, an average person might be able to understand this but it is generally encouraged to include an <strong><em>alt </em></strong>attribute which the <strong>&lt;img&gt;</strong>tag. This attribute provides more meaning to the image as it contains a short description of what the image is about and displays when the image fails to load.</p><p>The &lt;<strong>code&gt; </strong>tag tells the browser that contents within it are code blocks and so they will be rendered as plain texts. An average human or screen reader can still interpret this correctly as well.</p><p>Some other Semantic HTML tags/elements include;<br><strong>&lt;p&gt;&lt;/p&gt;</strong> = paragraph, <br><strong>&lt;li&gt;&lt;/li&gt;</strong> = list, <br><strong><em>&lt;</em></strong><strong>header&gt;&lt;/header&gt;</strong> = header, <br><strong>&lt;article&gt;&lt;/article&gt;</strong> = article,<br><strong>&lt;blockquotes&gt;&lt;/blockquotes&gt;</strong> = quotes, etc.</p><h3><strong>Resources</strong></h3><ol><li><a href="https://www.lifewire.com/why-use-semantic-html-3468271"><strong><em>Why Use Semantic HTML?</em></strong></a></li><li><a href="https://www.freecodecamp.org/learn/responsive-web-design/applied-accessibility/"><strong><em>Applied Accessibility</em></strong></a></li><li><a href="https://medium.com/@zac_heisey/7-alternatives-to-the-div-html-tag-7c888c7b5036"><strong><em>7 Alternatives to the &lt;div&gt; HTML Tag</em></strong></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a61283b21231" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/semantic-html-and-accessibility-a61283b21231">Semantic HTML and Accessibility</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Genesys stories. #Learnable20]]></title>
            <link>https://medium.com/series/my-genesys-stories-learnable20-2eabda33a646?source=rss-7ec535327171------2</link>
            <guid isPermaLink="false">https://medium.com/p/2eabda33a646</guid>
            <dc:creator><![CDATA[Favour Nnebedum]]></dc:creator>
            <pubDate>Sun, 19 Jul 2020 19:55:21 GMT</pubDate>
            <atom:updated>2020-07-19T19:55:21.942Z</atom:updated>
            <content:encoded><![CDATA[<p>Its the start of my week 3 as a front end intern at the GenesysTechHub.</p><p>Week 1 was amazing and here is <a href="https://medium.com/@nnebedumfav/my-tech-genesys-88b0fa5ace7d">Week 1 Task</a> / story.</p><p>Week 2 was even better and I’m here to tell you about it.</p><p>Due to the pandemic, we are all virtual interns for now.</p><p>Each week starts with a course content on Teachable. This week we moved into baby steps in Javascript,</p><p>Oga Emma <em>(Instructor for the week), </em>took us through variables, data types, loops and if/else statements. Oga Emma really knows his onions, no jokes.</p><p>Our week 2 task was then to implement a To-do List App on <a href="http://repl.it/"><strong>Repl.it</strong></a><strong> </strong>before the week runs out.</p><p>I couldn’t join most of the other fun activities and meetings on slack, zoom and google meet because my PC thought Tuesday was a good day to run into some <em>diagnosing PC hypnosis…</em></p><p>By Thursday, it finally came out of it.</p><p>Through Thursday, Friday with a lot of <em>Googling</em> and a lot of JavaScript Event listeners, I finally finished my App.</p><p><a href="https://todoapp.iamifechi.repl.co/"><strong>To-do List App</strong></a></p><p></p><p>I learnt a lot about HTML DOM Manipulation from this one task.</p><p>I hope to update this app subsequently, maybe add like a task summary, history, score points on completed tasks and some other features that may come up as time goes by.</p><p>But I am super excited and I can’t wait for week 3 activities. I will surely write about it here by coming weekend.</p><p>Thanks for being here.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2eabda33a646" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>