<?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 Joshua Okoro on Medium]]></title>
        <description><![CDATA[Stories by Joshua Okoro on Medium]]></description>
        <link>https://medium.com/@maazijoshua?source=rss-467cb9aab74c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XU5iwdyz9LoBsbL8bw2x8w.jpeg</url>
            <title>Stories by Joshua Okoro on Medium</title>
            <link>https://medium.com/@maazijoshua?source=rss-467cb9aab74c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 09:33:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maazijoshua/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[I tried pushing a Docker image of 2.51 GB, what was I thinking ]]></title>
            <link>https://medium.com/@maazijoshua/i-tried-pushing-a-docker-image-of-2-51-gb-to-my-ec2-what-was-i-thinking-6f0d7255738b?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f0d7255738b</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 15:38:06 GMT</pubDate>
            <atom:updated>2025-06-12T18:59:45.351Z</atom:updated>
            <content:encoded><![CDATA[<p>Sequel to my last article on <a href="https://medium.com/@maazijoshua/deploying-a-nextjs-fullstack-application-to-aws-elastic-beanstalk-8a0c3011dbbc"><em>Deploying a NextJS application to AWS Elastic Beanstalk</em></a>, I will be dockerizing the application and explaining the mistakes I made so you won’t make the same. The idea was to take on a real-world DevOps flow — from cloning the application to deploying a live container on the cloud.</p><p>The project I used is the same NextJS application used in my previous article; you can clone it below:</p><pre>git clone https://github.com/josidbobo/duolingo-clone-template.git</pre><p>For the rest of the steps to get the project working on localhost, follow STEPS 1 — 3 <a href="https://medium.com/@maazijoshua/deploying-a-nextjs-fullstack-application-to-aws-elastic-beanstalk-8a0c3011dbbc">here</a></p><p>For the Docker deployment, this is the stack I’d be using:</p><ul><li>Containerization: Docker</li><li>Cloud Host: AWS EC2 (Ubuntu 22.04)</li><li>Image Registry: Docker Hub</li></ul><p><strong>1. Creating the Dockerfile</strong></p><p>The purpose of the Dockerfile was to package my application and the dependencies into a Docker image as well as run it as a container consistently across all environments.</p><p>In the root directory of my project, I created a new file — Dockerfile without any extensions (e.g: .ts, .anything) just Dockerfile.</p><p>Inside this file, I specified how Docker should build my image. Here is the file I used initially</p><pre>FROM node:18-alpine<br><br>WORKDIR /app<br>COPY package*.json package-lock.json ./<br>RUN npm install<br>COPY . .<br>EXPOSE 3000<br>CMD npm run dev</pre><p>After that, I had thought I cooked, walk with me</p><p><strong>2. Building the Docker Image</strong></p><p>To build the image, I ran the following command</p><pre>docker build -t duolingo-clone .</pre><p>Next, I ran the image locally</p><pre>docker run -p 3000:3000 duolingo-clone</pre><p>I was able to access the application with <a href="http://localhost:3000/">http://localhost:3000</a> in my browser.</p><p><strong>3. Pushing to Docker Hub and Finding out</strong></p><p>In order to push to Docker Hub, I had to tag the image with my Docker Hub username so Docker knows where to push it.</p><pre>docker tag duolingo-clone maaziokoro/duolingo-clone:latest</pre><p>After that was done, I tried pushing my Docker image</p><pre>docker push maaziokoro/duolingo-clone:latest</pre><p>This was where my problem started, pushing the image failed because it was a whopping 2.51GB, but how?</p><p>Let’s go back to my Dockerfile</p><pre>FROM node:18-alpine<br><br>WORKDIR /app<br>COPY package*.json package-lock.json ./<br>RUN npm install<br>COPY . .<br>EXPOSE 3000<br>CMD npm run dev</pre><p>Now with this specification, when the app is containerized:</p><ul><li>It included dev dependencies.</li><li>All source files and node_modules were copied.</li><li>No build-time separation.</li><li>It didn’t use lightweight base images.</li></ul><p>The mistake I made was — I didn’t optimize it for multi-stage deployments, which would have drastically reduced the size.</p><p>Another way I could have done the optimization was to add a <em>.dockerignore</em> file to my root directory. Here is a sample <em>.dockerignore</em> file</p><pre>.git<br>.gitignore<br>*.md<br>*.log<br>node_modules<br>.cache<br>scripts/<br>cypress/<br>tests/<br>README.md</pre><p>To resolve it, I optimized the Dockerfile</p><p>First, I updated my next.config.mjs file as shown</p><pre>/** @type {import(&#39;next&#39;).NextConfig} */<br>const nextConfig = {<br>    output: &#39;standalone&#39;,<br>  // ... other config<br>}</pre><p>Then edited the Dockerfile</p><pre>FROM node:18-alpine AS builder<br><br>WORKDIR /app<br>COPY package*.json package-lock.json ./<br># run npm ci for a clean, production-like install for dependencies.<br>RUN npm ci<br><br>COPY . .<br><br>RUN npm run build<br><br># Production stage<br>FROM node:18-alpine<br><br>WORKDIR /app<br>ENV NODE_ENV=production<br># Copy the standalone output and necessary files<br>COPY --from=builder /app/.next/standalone ./<br>COPY --from=builder /app/.next/static/ ./.next/static<br>COPY --from=builder /app/public ./public<br>COPY --from=builder /app/next.config.mjs ./<br><br>EXPOSE 3000<br><br>CMD [&quot;npm&quot;, &quot;start&quot;]</pre><p>This is a clean and better way to build the image. First, it generates the build files, then copies only the <strong>production-ready artifacts</strong> from the build stage.</p><p>Once all that was done, I repeated STEP 2 above, built the image, tagged and pushed to Docker Hub. This time, it went through successfully after I logged in and completed the authentication steps from Docker before pushing.</p><pre>docker login</pre><p><strong>4. Setting up my EC2 instance</strong></p><p>To set this up, I went to the AWS Management Console and searched for EC2.</p><p>EC2 &gt; instances &gt; Launch an instance</p><p>Set up a simple instance</p><ul><li><strong>AMI</strong>: Ubuntu 24.04 LTS (x86_64).</li><li><strong>Instance type:</strong> t2.micro (free tier).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*12oezfblqtuiw6lJMzdWtw.png" /><figcaption>Amazon Machine Image</figcaption></figure><p>For the security group rules, I made sure to open port 3000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_UWeCX-e4xJqoTh88AuJ9g.png" /><figcaption>Security group rules</figcaption></figure><p>All other settings were left as default, and I launched my instance.</p><p><strong>5. SSH into the EC2 instance and install Docker</strong></p><p>To SSH into the instance, you can select the instance and click on the connect button in the instances dashboard in the AWS Management console.</p><pre>chmod 400 &lt;pem-file-name&gt;.pem<br>ssh -i ~/&lt;pem-file_name&gt;.pem ec2-user@&lt;my-ec2-public-dns&gt;</pre><p>Next, I updated all dependencies and installed Docker</p><pre>sudo apt update<br>sudo apt install -y docker.io<br>sudo systemctl start docker<br>sudo systemctl enable docker<br>sudo usermod -aG docker ubuntu</pre><p>I exited and connected (ssh) again into the instance to apply all permissions. Then I logged into Docker and completed the authentication steps.</p><pre>docker login<br></pre><p>Next, I pulled the image</p><pre>docker pull maaziokoro/duolingo-clone:latest</pre><p>Once the image was pulled successfully, I started the container</p><pre>docker run -d -p 3000:3000 --name duolingo-clone maaziokoro/duolingo-clone:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-AoQSdJSEo-aKMbM2wlkQ.png" /><figcaption>Docker pull and running the image</figcaption></figure><p>Using my EC2-public-dns address, I was able to access the application via my browser on port 3000 — <em>http://&lt;ec2-public-dns&gt;:3000</em></p><p>Key Takeaways:</p><ol><li>How to optimize my Docker image deployment, hosting, and versioning it on Docker Hub.</li><li>How to deploy and access the image and application in an EC2 instance.</li></ol><p>I’ve learnt a great deal from this experience, and I hope you’ve learnt from my mistake. Building and deploying a Docker application is quite interesting, and I will be looking to automate the process next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f0d7255738b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a NextJS FullStack Application to AWS Elastic Beanstalk]]></title>
            <link>https://medium.com/@maazijoshua/deploying-a-nextjs-fullstack-application-to-aws-elastic-beanstalk-8a0c3011dbbc?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a0c3011dbbc</guid>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 13:11:11 GMT</pubDate>
            <atom:updated>2025-06-12T19:00:38.235Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS Elastic Beanstalk is a platform as a service (PaaS) offered by AWS that makes it easier to build and manage web apps and services on the Cloud. It autonomously manages the foundational infrastructure, including resource provisioning, load balancing, auto-scaling, and application health monitoring. Any user can upload their code, while Elastic Beanstalk manages the deployment intricacies, enabling them to concentrate on application development instead of infrastructure oversight.</p><p>The deployment of this application to Elastic Beanstalk gave me a better understanding of what I’ve been learning about the Cloud so far. I’ll be breaking down the steps I took to successfully deploy the application below.</p><p><strong>1. Clone the repository and open in your IDE (Eg VScode)</strong></p><pre>git clone https://github.com/josidbobo/duolingo-clone-template.git<br>cd duolingo-clone-template<br>code .</pre><p>The commands above will clone the project on your local machine, open the project directory, and automatically open VSCode (if that’s your preferred IDE).</p><p>Once VScode is open, install all dependencies</p><pre>npm install</pre><p><strong>2. Create an ENV file and set the required credentials</strong></p><p>Before running the project, create an .env file with the following credentials</p><pre>NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key<br>CLERK_SECRET_KEY=your_clerk_secret_key<br>DATABASE_URL=neon_database_url<br>NEXT_PUBLIC_APP_URL<br>STRIPE_API_KEY=your_stripe_key<br>STRIPE_WEBHOOK_SECRET=your_stripe_secret</pre><p>Create an account on Clerk if you don’t already have one by clicking <a href="https://clerk.com/">this</a>. After which, you create a new application and get your clerk_secret_key and clerk_publishable_key. To locate where the API keys are on Clerk’s dashboard, see the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tx9rqS3KOVCZsY_8DuiCHA.png" /></figure><p>Next, create a <a href="https://neon.com/">neon</a> account (if you don’t already have one) and create a new project, click the <em>connect </em>button in the project’s dashboard to reveal your database_url, see image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zaIO05VJ7T0WO1jyHjl0Hw.png" /></figure><p>Once you have set up your env variables, the next step is to push the Database schema and add seed data. Drizzle has already been configured for the project; all you have to do is run the commands below.</p><pre>npx drizzle-kit push<br>npx tsx scripts/seed.ts</pre><p>The first command syncs the database schema to the Neon database, and the second populates it with sample course data.</p><p><strong>3. Run the project locally and prepare the deploy folder</strong></p><p>To run the project, use the command below:</p><pre>npm run start</pre><p>You should see it running on <a href="http://localhost:3000/"><em>http://localhost:3000</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1rhHz9F78u5cuvvmcc1WJg.png" /><figcaption>Duolingo project running on Localhost port 3000</figcaption></figure><p>Next build the project, create the deploy folder, and copy all necessary files</p><pre>npm run build <br>mkdir -p deploy<br>cp -r .next public .env next.config.mjs package.json package-lock.json deploy/</pre><p>After the deploy folder has been populated with the necessary files, change the directory to the deploy folder and zip it</p><pre>cd deploy<br>zip -r ../next-js-app.zip .</pre><p>If you encounter an error like below</p><blockquote>zip not recognized as an internal or external command</blockquote><p>You need to install zip, you can do it by using <a href="https://chocolatey.org/install">choco</a> ensure to use a shell with elevated privileges (run as administrator).</p><pre>choco install 7zip</pre><p><strong>4. Login to AWS and set the IAM roles and Policies</strong></p><p>Create the following IAM roles for Elastic Beanstalk and EC2 with the corresponding policies:</p><p>Search for IAM in the AWS console, click it and select Roles</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bwmRSCxhm1bDxYkTRA0FQ.png" /><figcaption>AWS IAM</figcaption></figure><p>For the role <strong>aws-elasticbeanstalk-ec2-role </strong>set the following policies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1ss_MQBoI9EU-HCa84hxA.png" /><figcaption>aws-elasticbeanstalk-ec2-role policies</figcaption></figure><p>For the role <strong>aws-elasticbeanstalk-service-role </strong>set the following policies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrKn1lrXOxTuImlOmXb9gQ.png" /><figcaption>aws-elasticbeanstalk-service-role policies</figcaption></figure><p>For <strong>AWSServiceRoleForAutoScaling </strong>role set the policy:</p><ul><li>AutoScalingServiceRolePolicy</li></ul><p>For <strong>AWSServiceRoleForEC2Spot </strong>role set the policy:</p><ul><li>AWSEC2SpotServiceRolePolicy</li></ul><p><strong>5. Set up Elastic Beanstalk and upload your zip folder</strong></p><p>Go to the AWS console and search for Elastic Beanstalk, click on create application, fill in the <strong>Application name</strong> with a name of your choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vy1_tdVTMvLhXuEJwMyvoA.png" /><figcaption>Creating an environment on Elastic beanstalk</figcaption></figure><p>For the platform select <strong>Node.js</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s9qU3-x4dD5jA9NFFKKemA.png" /><figcaption>Platform selection for Elastic beanstalk environment</figcaption></figure><p>Ensure to add a micro instance type and select a VPC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YVmdZGeeT6J11gFnZWJ1A.png" /><figcaption>Adding Instance types</figcaption></figure><p>Click <em>next</em> and lastly <em>create.</em></p><p>Congratulations you’ve successfully created your beanstalk environment!</p><p>Now, click on the beanstalk environment you just created and select upload to upload the zip file created earlier, wait for it to successfully upload and deployment updated, next access the beanstalk url to view the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JagZHGWZ3u5gbRTNJH_otA.png" /><figcaption>Duolingo project running on Beanstalk</figcaption></figure><p><strong>Conclusion:</strong> Deploying full-stack applications via AWS Beanstalk isn’t as hard as it may seem at firs,t once the permissions for the roles have been properly set and the necessary configurations have been applied. Nonetheless, endeavour to use the logs properly if you encounter any error, as it helps pinpoint the source of the issue.</p><p>Deploying this application with Elastic Beanstalk gave me another perspective on the power of cloud platforms, especially PAAS (platform as a service) environments. Next, I’ll be creating a docker image and uploading the application to Docker.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a0c3011dbbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Flutter Widgets: A Comprehensive Overview]]></title>
            <link>https://medium.com/@maazijoshua/understanding-flutter-widgets-a-comprehensive-overview-6c769d60d9d2?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c769d60d9d2</guid>
            <category><![CDATA[mobile-application]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[widgets-in-flutter]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Fri, 26 Jan 2024 09:22:40 GMT</pubDate>
            <atom:updated>2024-09-05T13:24:38.351Z</atom:updated>
            <content:encoded><![CDATA[<p>Flutter as you must have heard is used in building elegant functional cross-platform mobile applications. One of the key features Flutter poses is its widgets which are built using a modern framework that takes inspiration from <a href="https://react.dev/">React</a>. There is a famous saying that everything is a widget in Flutter. Widgets describe what their view should look like given their current configuration and state. Now I know you might be wondering what is a Widget — a widget represents each element on a screen of the Flutter app when a widget’s state changes, the widget rebuilds its description, in which the framework differs against the previous description to determine the minimal changes needed in the underlying render tree to transition from one state to the next. It is important to state that Android and iOS flutter applications have a native widget representation— <strong>Material and Cupertino</strong> widgets respectively used to render elements with a native feel like the emojis and icons.</p><p>In this article, we’re going to be talking about the types of widgets Flutter offers — <strong>Stateless and Stateful</strong> widgets.</p><ol><li><strong>Stateful Widgets </strong>can be referred to as the type of widgets that maintains a mutable state that can change over time. These changes could be in user interactions or real-time data updates. Stateful widgets include checkboxes, radio buttons, text fields, sliders, form inputs, etc. The term <strong>State</strong> in Flutter refers to the data that can be read synchronously when the build method is called and might change during the lifetime of a widget. Additionally, a widget can change due to user interactions or if an internal event triggers a change in the data. There are stages stateful widgets pass through <strong>Initialization, State Creation, Rendering, and Disposal</strong>.</li></ol><p><strong>2. Stateless Widgets </strong>on the other hand don’t maintain a mutable state that can be changed at will. It takes parameters from the constructor and initialises the state values which remain the same throughout the lifetime of the widget. The stages the stateless widget passes through include — <strong>Initialisation, Rendering and Disposal.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c769d60d9d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Solidity]]></title>
            <link>https://medium.com/coinmonks/introduction-to-solidity-14ad258cce38?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/14ad258cce38</guid>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <category><![CDATA[solidity]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 17:38:46 GMT</pubDate>
            <atom:updated>2025-06-23T08:01:11.793Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re programmer you would most likely have heard of smart contracts that automatically execute instructions on the Blockchain, even if you don’t know — they are programs stored on the blockchain that run when predetermined conditions are met. One may wonder how this works, you guessed right! these contracts are mostly written in a language known as Solidity, which is statically typed and supports inheritance, libraries and complex user-defined type due to its design to target the Ethereum Virtual Machine or EVM. We will be discussing a few key features of the language:</p><p><strong>Tokens: </strong>Tokens refer to the building blocks of the solidity program, they represent how data is stored and altered. They are of four types namely <em>Keywords, Identifiers, Literals,</em> and <em>Punctuation.</em></p><p>Keywords have a special meaning in Solidity and cannot be used to address another value or variable, some of them include<em> contract, library, modifier, pragma, interface, return, and address.</em></p><p>Identifiers however are the names given to entities like v<em>ariable names, function name, contract name.</em></p><p>Literals are the hard-coded values into solidity program like the numbers, strings and Booleans Example uint256, false, int64.</p><p>Punctuation refers to the symbols that structure a solidity program like comma, curly braces — {}, parentheses — (), semi colon -;</p><p><strong>Data Types: </strong>Solidity has a range of data types including <em>Boolean, unsigned integers or uint256, u128, u64, u32, u16, u8; signed integers or i256, i128, i64, i32, i16, i8, address, string, bytes.</em></p><p>I wouldn’t want to go so deep into the signed and unsigned integers, but you can tell by the number associated with each that it goes from larger storage capacity to smaller for instance u8 can only store numbers that are non-negative from 0 to 2(8–1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*f-PdSrR8ANd9amzF" /><figcaption>unit example</figcaption></figure><p>The byte data structure is used to store a sequence of bytes; it could be dynamic sized or fixed-sized array of bytes. The difference between bytes and strings is that strings have dynamic length while bytes length is from 1–32.</p><p>An address is used to represent a 20-byte value that identifies a smart contract or wallet address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FmLPtxgJEUUqT4xz" /><figcaption>Address example</figcaption></figure><p>Solidity also has default values, which are the values assigned to variables that have not been assigned a value yet, for u256 its 0, for bool its false, for address its 0x0000000000000000000000000 or zero address.</p><ul><li>Structs: Solidity provides a way to define new types in the form of structs. A struct is a special data type that allows the programmer to group a list of variables. A way to define custom data types in the form of Structs, It is important to note however that structs can only have 16 variables, any more will trigger the error: Stack too Deep.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/0*n0FOW4YUuS1KEloh" /><figcaption>Struct example</figcaption></figure><ul><li>Arrays: How solidity deals with creating a collection of something, say unsigned integers is by arranging them in an ordered data type called Arrays. When you want to store related data with the same data type, you can use an array. There are two types of arrays in Solidity: <strong>dynamic arrays</strong>-</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/0*J2S_umEMZHR0OTZo" /><figcaption>Array example</figcaption></figure><p><strong>Static arrays -</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/0*G2aAAue9X8PIsPdK" /><figcaption>Static arrays</figcaption></figure><p><strong>Mapping</strong>: The last data structure we’d be discussing is the mapping. Mappings allow the programmer to create key-value pairs for storing(as a list) and looking up data.It can be seen as hash tables which are virtually initialized such that every possible key exists and is mapped to a value whose byte-representation is all zeros or false: depending on the type’s default value.</p><p>It is important to note that not every data type can be used as a key. For instance, structs and other mappings cannot be used as keys.</p><p>Unlike with keys, Solidity does not limit the data type for values [ key_values ]. It can be anything, including structs and other mappings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/0*mugt9hNyl_up1RhJ" /><figcaption>Mapping example</figcaption></figure><p><strong>Conclusion:</strong></p><p>In conclusion, solidity is a very robust language that offers features to build very multipurpose and secure smart contracts for running instructions on the blockchain. Other features not discussed in detail include Events, Errors, Revert keyword, Looping (For, while, do while) , control structures( if and else), Abi encode / decode which can be reviewed from <a href="http://solidity-by-example.org/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14ad258cce38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/introduction-to-solidity-14ad258cce38">Introduction to Solidity</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Convergence of Gaming on web3]]></title>
            <link>https://medium.com/@maazijoshua/convergence-of-gaming-on-web3-664bedf8af51?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/664bedf8af51</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[metaverse]]></category>
            <category><![CDATA[gamefi]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Thu, 27 Oct 2022 14:43:36 GMT</pubDate>
            <atom:updated>2022-10-28T14:23:27.807Z</atom:updated>
            <content:encoded><![CDATA[<p>Web3 or the new Web as it’s fondly called by enthusiasts can be described as an iteration of the web as it is today incorporating concepts like <a href="https://en.wikipedia.org/wiki/Decentralization">decentralization</a>, <a href="https://en.wikipedia.org/wiki/Blockchain">blockchain technologies</a>, and token-based economics. This disruption in the way the web works as a result of the need for a more robust solution to <a href="https://en.wikipedia.org/wiki/Data_security">data security</a>, <a href="https://en.wikipedia.org/wiki/Scalability">scalability</a>, and <a href="https://en.wikipedia.org/wiki/Internet_privacy">privacy</a> for users and also to eradicate the influence of large technology companies. Over the years, it has evolved and gained more adoption across the globe in areas such as gaming, fintech, Logistics, Real Estate, and many others. This article is focused on how the Gaming industry is being influenced by web3.</p><p>Kindly note that this article is a further exploration of the audio podcast -<strong>Decentralised gaming</strong> <strong>episode 1</strong> on Spotify.</p><p><strong>Gaming as it is today</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F161534493%3Fh%3D8a0a68a26d%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F161534493&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F563791968-4b65f73f971534bb4440fefbcd677cff8eefce68498faf7d1efbfc3c46c23863-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f0db7ff9dbd6c11fdbef08aa3608a73/href">https://medium.com/media/5f0db7ff9dbd6c11fdbef08aa3608a73/href</a></iframe><p>Gaming today has become one of the major sectors of the entertainment industry reaching <a href="https://dataprot.net/statistics/gamer-demographics/">more than three billion</a> people around the globe. Quite a number of people have now turned it into their career as professional gamers, inadvertently creating employment opportunities. A number of popular games have captured the heart of lots of gamers some of which include:</p><ol><li><a href="https://www.callofduty.com/mobile">Call of Duty Mobile</a></li><li><a href="https://www.monsterhunter.com/">Monster Hunters</a></li><li><a href="https://www.ea.com/en-gb/games/fifa/fifa-23">EA Fifa Franchise</a></li><li><a href="https://www.rockstargames.com/gta-v">GTA — Grand Theft Auto</a></li></ol><p>In the podcast, the guest speaker Opeoluwa talked explicitly about how these games employ different methodologies to create a unique experience, <strong>MMORPGs — Massively Multiplayer Online Role Playing Games</strong> which create a form of virtual space where gamers compete with each other and not just with an algorithm. He further explained the games that simulate everyday activity <a href="https://secondlife.com/"><strong>Second life</strong></a><strong> </strong>which gives users the ability to carry out their everyday actions but with their game characters<strong>. </strong>These are some of the areas that web3 is set to improve upon by combining the potential of Blockchain and Metaverse to create a whole new immersive experience.</p><p><strong>Web3 and Gaming</strong></p><figure><img alt="A Pro Gamer playing games" src="https://cdn-images-1.medium.com/max/1024/0*Y31ZtiaZQJAZTyjn" /><figcaption>Photo by <a href="https://unsplash.com/@florianolv?utm_source=medium&amp;utm_medium=referral">Florian Olivo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Web3-based games allow players to engage with games in a more modern and decentralized way. Players play to earn via cryptocurrencies and NFTs— Non Fungible Tokens. This democratizes the gaming experience and puts the main power in the hands of the player instead of confining it to one central authority within a game. In contrast to web2 gaming where in-game purchases are done with fake or fiat currencies, web3 gaming utilizes cryptocurrencies and NFTs to securely transfer in-game assets to players, this method is decentralized and verifiable on the blockchain.</p><ol><li>Gaming DAOs — Decentralised Autonomous Organizations have become one of the major upgrades to the way games are managed, these DAOs allow their members to vote on how the games are designed, upgraded to newer versions, in-game assets as well as gaming squads formation. Some DAOs are formed to manage the flow of revenue between gamers and Developers via the play-to-earn functionality. Also, gaming guilds are groups of gamers, who participate in multi-game clans and e-sport teams that engage in play-to-earn games to win as a collective, they earn tokens and NFT rewards and then split among themselves. They keep winning because of their accumulated assets which give them an edge over other opponents. <a href="https://www.metagamehub.io/"><em>MetaGameHub DAO</em></a> is one of such very good DAOs out there.</li><li>GameFI — Blockchain and Cryptocurrency has added an extra layer to the way games are powered with smart contracts regulating the terms guarding metaverses, DAOs, NFTs, and tokens. As these smart contracts can’t be altered or removed from the blockchain, it secures the gaming rules and assets and makes all participants benefit from the experience. As the world of web3 gaming keeps expanding, there would be a need to transfer gaming rewards from one gaming platform to another to improve the experience of the players. This can be effectively carried out by the blockchain as it verifies the proof of ownership of the assets via smart contracts. Polkadot and Solana blockchains offer cross-chain communication bridges to facilitate such innovation.</li><li>The Metaverse — A number of immersive game marketplaces like Opeoluwa explained in the podcast has begun to garner the interest of gamers, as they can now use Virtual Reality and Augmented Reality gadgets to explore their favorite gaming marketplaces. The Metaverse has given game developers an opportunity to leverage the blockchain in building smart and realistic 3D games where players can compete among themselves and earn rewards, transfer assets among themselves and also stream when they are not playing. Gaming in the Metaverse also has the advantage of very minimal downtime which means users don’t have to be logged out in the middle of a game because of a server timeout.</li></ol><p><strong>What’s next for Web3 gaming</strong></p><ol><li>Digital Wallets — The advent of customized wallets has opened the door for gaming wallets to become even more sophisticated for various gamers’ needs. It identifies the players and houses their various collectibles.</li><li>Interoperable media standards — These are standards that contain 3D scenes, audio, vectors as well as texts to make decentralized 3D applications possible and fully optimized.</li><li>User-driven content — Players will have the opportunity to decide how the different stages of the game will be arranged or designed as well as supply different graphical content to customize the experience for themselves.</li><li>Staking - Gamers will be able to stake their assets for more rewards and use it as collateral for other benefits.</li><li>Soul-bound tokens — These are tokens or NFTs that will be non-transferable and earned through achievements. They provide additional benefits only available to their holders like getting a rare or very expensive asset for almost nothing.</li></ol><p><strong>Conclusion</strong></p><p>As much as web3 has so much potential to put power back into the hands of gamers, it is important for players to be educated on the corresponding responsibility that comes with such freedom. Non-custodial wallets require that their holders safeguard the private keys so that they don’t get into the hands of hackers otherwise it is advisable to go for custodial wallets where another party securely stores the private keys.</p><p>The associated podcast to this article is D<strong>ecentralised Gaming episode 1 </strong>where a gaming expert Opeoluwa Ojewale shared his thoughts on web3 and gaming can be listened to on Spotify <a href="https://open.spotify.com/show/37mbxrwcDzAsbVLfMNheGm">here</a>.</p><blockquote>References:</blockquote><blockquote><a href="https://en.wikipedia.org/wiki/Web3">1. </a><a href="https://hackernoon.com/the-future-of-web-3-gaming-with-oren-langberg">https://hackernoon.com/the-future-of-web-3-gaming-with-oren-langberg</a></blockquote><blockquote>2. <a href="https://builtin.com/gaming">https://builtin.com/gaming</a></blockquote><blockquote>3. <a href="https://www.leewayhertz.com/what-is-web3-gaming/">https://www.leewayhertz.com/what-is-web3-gaming/</a></blockquote><blockquote>4. <a href="https://en.wikipedia.org/wiki/Web3">https://en.wikipedia.org/wiki/Web3</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=664bedf8af51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain Staking]]></title>
            <link>https://medium.com/@maazijoshua/blockchain-staking-21b5943a5145?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/21b5943a5145</guid>
            <category><![CDATA[crypto-staking]]></category>
            <category><![CDATA[crypto-investment]]></category>
            <category><![CDATA[proof-of-stake]]></category>
            <category><![CDATA[blockchain-staking]]></category>
            <category><![CDATA[staking-rewards]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Thu, 20 Oct 2022 13:50:41 GMT</pubDate>
            <atom:updated>2023-06-09T13:29:16.660Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Staking in Blockchain" src="https://cdn-images-1.medium.com/max/1024/0*I1mv4XhkTB72uwLl" /><figcaption>Photo by <a href="https://unsplash.com/@peiobty?utm_source=medium&amp;utm_medium=referral">Pierre Borthiry — Peiobty</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Introduction:</strong></p><p>Staking in the financial industry traditionally means an interest or share in an undertaking or enterprise, implying that you have some expected profits to be incurred on the amount of money you invested in the financial institution. If the financial markets enter into a recession, the chances the profits on your investment would be lost are very high, in the same vein, if the conditions are favourable, the rewards for your investment would be available to you.</p><p>Staking in the blockchain space works similarly but it has more utility,<strong> it is simply using crypto holdings to earn additional rewards or participate in the validations of blocks that make up the chain.</strong></p><p>The process of staking happens through systems, the first of which is called <strong>1.</strong> <a href="https://academy.binance.com/en/glossary/staking-pool"><strong>staking pools</strong></a><strong>,</strong> in this way, crypto holders bring their respective crypto tokens together in order to increase their yield. These staked tokens are locked for a predetermined or otherwise unknown period of time which means they can’t be traded or withdrawn within that timeframe, it is important to find out the rules guiding a pool before joining.</p><p>These pools are usually managed by a pool operator and the rewards are split between the respective stakeholders.</p><p><strong>2. </strong>The other which is <a href="https://ethereum.org/en/staking/solo/"><strong>solo staking</strong></a><strong> </strong>is a way of getting rewards by participating in the validations of transactions and blocks. This is done when you run a node in the network that establishes a validator. The solo stakeholder doesn&#39;t share rewards with anyone as the rewards are sent directly from the protocol so that the validator is properly functioning and online.</p><p>An example of this type of staking is the PROOF OF STAKE <a href="https://www.investopedia.com/terms/c/consensus-mechanism-cryptocurrency.asp">consensus mechanism</a>, transactions are validated by people who invested in the blockchain via staking.</p><p>In comparison with the traditional financial system of staking you may wonder, where does the reward on blockchain staking come from? The gas fees. Most blockchains and L2 protocols have some amount of money deducted from each transaction done on them.</p><p>These fees are used to reward the validators or stakeholders in the network. In Proof of Stake blockchains like Ethereum, Solana, Algorand, Tron the fees are used as incentives for the stakeholders.</p><p>It is important to note that not all Blockchains allow staking; Bitcoin, for example, a blockchain powering a virtual currency designed to be used as a form of payment doesn’t support staking, the reason is not far fetched, it adopts a <a href="https://en.m.wikipedia.org/wiki/Proof_of_work">Proof of Work</a> consensus mechanism which means its gas fees are used to reward the miners who secure the network by solving some complex math in contrast to staking tokens.</p><p><strong>Conclusion:</strong></p><p>Blockchain staking has quite a number of benefits to both the stakeholder and the blockchain as it helps keep the blockchain secure and maintain the efficiency of the projects running on it — defi protocols, gameFI, etc the stakeholder also has the opportunity to participate in the governance process of the protocol and take an active part in key decisions affecting the future of the blockchain, not forgetting the substantial increase in the number of tokens staked in form of staking rewards which can be used in lending protocols, traded or staked again. It is important to do adequate research on the particular protocol or blockchain you intend to stake in so as to be conversant with the terms and perks attached.</p><blockquote>References:</blockquote><blockquote><a href="https://en.m.wikipedia.org/wiki/Proof_of_work">https://en.m.wikipedia.org/wiki/Proof_of_work</a>,</blockquote><blockquote><a href="http://www.academy.binance.com/">https://www.academy.binance.com</a>,</blockquote><blockquote><a href="http://www.investopedia.com,/">https://www.investopedia.com/terms/p/proof-stake-pos.asp,</a></blockquote><blockquote><a href="https://www.coinbase.com/learn/crypto-basics/what-is-staking">https://www.coinbase.com/learn/crypto-basics/what-is-staking</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21b5943a5145" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Differences between Web 2.0 and Web 3.0: Key features of both.]]></title>
            <link>https://medium.com/@maazijoshua/differences-between-web-2-0-and-web-3-0-key-features-of-both-a547c0f1546f?source=rss-467cb9aab74c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a547c0f1546f</guid>
            <category><![CDATA[decentralisation]]></category>
            <category><![CDATA[zuri]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <dc:creator><![CDATA[Joshua Okoro]]></dc:creator>
            <pubDate>Wed, 02 Mar 2022 13:04:29 GMT</pubDate>
            <atom:updated>2022-03-02T13:04:29.986Z</atom:updated>
            <content:encoded><![CDATA[<p>Since the advent of the web, it has been a world-changing innovation as a lot of corporations, businesses, and individual entities have utilized it for various reasons and participated in its growth and expansion. From Web version 1.0 to 2.0 and now 3.0 we have seen a large disruption to what anyone would have imagined this invention would turn out to achieve.</p><p>Web 2.0 or otherwise referred to as the user-generated content era of the web highlights the ability of end-users like you and me to contribute to the way the web works, by uploading, modifying, and editing content. It also features the ability for the web to be enhanced based on feedback from the site users to the site owner. One of the major limitations to Web 2.0 is that most of this information is hosted on centralized servers- which are controlled and managed by a few individuals, which means they can decide to remove or refuse to host your content if it doesn’t sit well with them. Another issue is that it is prone to attack, as once the server has been breached the entire network will be vulnerable.</p><p>On the other hand, the Web 3.0 era of the web comes with a key feature which is blockchain technology, this technology is the core of the infrastructure of this generation of the web. Information or websites are hosted in a distributed, decentralized manner such that there are the same copies of content stored in various systems to ensure the security and availability of these data. Users are in complete control of their content and the security of the information. Other features of Web 3.0 are Artificial Intelligence and the ability of the web to use semantic metadata to connect all available information on a particular subject to any user. Making it fast and more concise in its delivery of information across the glove.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*h2jtcfatsuFZYbTaIGgs6g.png" /></figure><p>To learn more about Web 3.0 you could check out the following websites as they have some resources to get you up to speed. <a href="https://zuri.team/">https://zuri.team/</a> <a href="https://blockgames.gg/">https://blockgames.gg/</a> <a href="https://nestcoin.com/">https://nestcoin.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a547c0f1546f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>