<?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 Damilare A. Adedoyin on Medium]]></title>
        <description><![CDATA[Stories by Damilare A. Adedoyin on Medium]]></description>
        <link>https://medium.com/@damilareaadedoyin?source=rss-8f8c4da8eb9a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qVmRGzBP4kOk0vaSp-GnKw.jpeg</url>
            <title>Stories by Damilare A. Adedoyin on Medium</title>
            <link>https://medium.com/@damilareaadedoyin?source=rss-8f8c4da8eb9a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 10:25:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@damilareaadedoyin/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[Understanding Database Entities and relationships]]></title>
            <link>https://medium.com/@damilareaadedoyin/understanding-database-entities-and-relationships-996ed18abd0e?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/996ed18abd0e</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Tue, 06 Dec 2022 11:43:13 GMT</pubDate>
            <atom:updated>2022-12-06T11:51:47.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cD1AfHPe9CWzUeG_" /><figcaption>Photo by <a href="https://unsplash.com/@kilimanjarostudioz?utm_source=medium&amp;utm_medium=referral">Kilimanjaro STUDIOz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The definition of an entity depends on who you ask. In Law, according to <a href="https://www.lawinsider.com/dictionary/person-or-entity">source</a>:</p><blockquote>Person or Entity means an individual, natural person, corporation, government or political subdivision or agency of a government, and where two or more persons act as a partnership, limited partnership, syndicate or other group for the purpose of acquiring, holding or disposing of securities of an issuer, such partnership, limited partnership, syndicate or group shall be deemed to be a Person or Entity.</blockquote><p>Hence for this article, I’d be discussing entities in the realm of databases and software engineering.</p><p>In the technical space, we’d like to <strong>define our entities as an abstract concept that defines groups with shared attributes</strong>.</p><p>As a human being, you’d have a name, parents (who are typically other humans), date of birth, ethnicity, etc. These values are but a subset of what makes you human, they are known as the attributes of the human entity. Is there any other attribute you can think of for the human entity?</p><p><strong>Also, an entity could depend on other entities</strong>. For example,<br>University is an entity with attributes name, rank, country, etc. However, a single university would be made of entities such as Faculty, Department, Professor, Student, etc.</p><p>An Online Retailer entity would depend on other entities such as Customer, Supplier, Payment Provider, etc.</p><p>So as you can see, what defines an entity would be its shared attributes. <strong>These shared attributes are specific to the use case</strong>.</p><p>Therefore, to answer the question, <em>Am I an entity?</em> — I’m an instance of the entity called a Human Being. If in a distant future, we perfect cloning and replicas of me are created, then we could have an entity for me as I am instantiated in other beings. We’d call the entity <em>Dami</em>.</p><p>To get a grasp of all I’ve written thus far, I’d recommend you take a few seconds to do a quick appreciation of the entities around you. You could add what you found to the comment section.</p><h4>Entity Relationship Diagram</h4><p>Having identified your entities, the next step is to design/define the relationship between them. I found that this definition helps to determine if your entity definition is accurate or if you need to go a bit granular for your model.</p><p>You could do this with a Pen on Paper or you could use a tool like <a href="http://draw.io/">draw.io</a>. To explain this, I’d design a simplified Entity relationship diagram using <a href="http://draw.io/">draw.io</a> for a nuclear family model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*Td1GcNpHN-vsMXNJNJgrSg.png" /><figcaption>Simplified Family Entity Relationship diagram</figcaption></figure><p>This is a simplified Entity Relationship diagram to illustrate the entities in a typical family and the relationship between them.</p><p>The Parent and Children entity both depend on the HumanBeing entity as every instance of Parent/Children would typically also be human. The Pets entity also depends on the HumanBeing entity because it references the owner of the pets in the family.</p><h4>Difference between Entities and Objects</h4><p>Entities typically represent a database schema for a table as it contains only attributes that map to columns in the table. It can not be instantiated during the runtime of a program, it’s only an abstract concept we use in guiding our design.</p><p>However, objects are data structures that can be instantiated during the runtime of a program. An Entity Object would include the attributes and the actions(defined as functions/methods in the class) for that entity.</p><p>The entity object would be covered in my next post.</p><p>Thank you for reading, I hope you’ve been able to get a better understanding of what entities are and how they differ from objects. If you have any comments/questions/additions/corrections, please feel free to drop a comment down below and I’d be sure to respond to you as soon as possible.</p><p>I typically write about my learnings as a software engineer. If you liked this article, <a href="http://eepurl.com/ifvqKT">please subscribe to my email list so you get updates when I publish new articles</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=996ed18abd0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About AllWired Nigeria]]></title>
            <link>https://medium.com/allwired-nigeria/about-allwired-nigeria-3352f2de0e9a?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3352f2de0e9a</guid>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 20:32:53 GMT</pubDate>
            <atom:updated>2020-06-22T20:32:53.088Z</atom:updated>
            <content:encoded><![CDATA[<h3>Where we started</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6imRx7BJIk_QyZ4z" /><figcaption>Photo by <a href="https://unsplash.com/@giabyte?utm_source=medium&amp;utm_medium=referral">Gia Oris</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I had the idea of AllWired in my third year at the University after noticing the hassles students and hobbyists had to go through in order to purchase electronic components. I saw an opportunity but couldn’t start anything meaningful as there was not enough capital to purchase products to satisfy the demand.</p><p>We officially started in 2018. With some extra cash, I bought an inventory of components I thought were in high demand. Unfortunately, I still have about 60% of that inventory in stock even after 2 years. The hardware market in Nigeria is unique in its smallness and its dynamic nature. A local component supplier once told me a story about how he stocked his warehouse with a particular component that seemed to be in high demand, only to have it covered in dust today.</p><h3>The Way Forward</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lXBTwqt2IHBY-suL" /><figcaption>Photo by <a href="https://unsplash.com/@luxdamore?utm_source=medium&amp;utm_medium=referral">🐣 Luca Iaconelli 🦊</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>The Goal</h4><p>The AllWired goal is to manufacture and create an ecosystem where the only limitation local electronic makers/hobbyist have would be their dreams. We are building partnerships with suppliers and manufacturers locally and internationally, with the aim to foster the build process for individuals.</p><h4>Inventory</h4><p>We still keep stock of components in high demand, but majority of our orders will be rerouted to our suppliers while we handle the local logistics process. For international orders, we would be using the drop ship model.</p><h4>Logistics</h4><p>We are setting up an efficient logistics process that will greatly reduce our fulfillment time. Currently our fulfillment lead time varies between a day and 2 weeks. Where the longest lead time involves orders rerouted to international suppliers due to the unavailability in the local markets. Our express delivery for orders rerouted out of the country is a little shy of 7days. This time range is for only purchase orders, it doesn’t hold true for manufacturing or PCB printing.</p><h4>Physical Locations</h4><p>We believe a physical location will be of great help to achieving the goals and objectives of the business. As of today, we are yet to get a location to call our own. A major challenge for us is choosing a location that is accessible to the hardware community and also affordable.</p><h3>The Future</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UOpHvtKROqeqVlAy" /><figcaption>Photo by <a href="https://unsplash.com/@robynnexy?utm_source=medium&amp;utm_medium=referral">Robynne Hu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The future for AllWired is well rooted in the future for hardware in Africa. Our dreams for the African future is one of self sufficiency, where Africa manufactures from and consumes her own products. We hope to have a branch of AllWired across all countries in the continent, these branches would handle manufacturing processes, supply chain, logistics, and trainings. In our consumer products sector, we hope to have at least one AllWired device in every home.</p><p>Watch this space for more information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3352f2de0e9a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/allwired-nigeria/about-allwired-nigeria-3352f2de0e9a">About AllWired Nigeria</a> was originally published in <a href="https://medium.com/allwired-nigeria">Allwired Nigeria</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing CORS errors with Angular CLI proxy]]></title>
            <link>https://levelup.gitconnected.com/fixing-cors-errors-with-angular-cli-proxy-e5e0ef143f85?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5e0ef143f85</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[proxy]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Tue, 16 Jun 2020 01:04:18 GMT</pubDate>
            <atom:updated>2020-06-16T01:04:18.361Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*76h_K4vqtsvbVusb4A_PSQ.jpeg" /><figcaption>source: Memegenerator.net</figcaption></figure><p>Trying to access an API endpoint while building on localhost can be traumatizing, especially when this error “<em>No ‘Access-Control-Allow-Origin’ header is present on the requested resource” </em>comes up. Don’t worry it wasn’t your fault, the error is due to the <strong>same-origin policy</strong> that is implemented by most browsers.</p><blockquote>The <strong>same-origin policy</strong> is a critical security mechanism that restricts how a document or script loaded from one <a href="https://developer.mozilla.org/en-US/docs/Glossary/origin">origin</a> can interact with a resource from another origin. —<a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy"> source</a></blockquote><p>The reason you are getting the error is because you’re making a request to a different origin from the one you’re currently on. Take for example, your application is running on http://localhost:4200 when you’re trying to access the resource from https://api.spotify.com/v1. localhost and api.spotify.com are two different origins which are also running on different protocols http and https respectively, this is a <strong>cross-origin request,</strong> and it’s enough reason for your browser to fume about you flaunting its rules. If the server had specified your origin in its header, you also won’t be facing this challenge.</p><h3>What can we do about it?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z9eqFQQB6hxkGrkc" /><figcaption>Photo by <a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;utm_medium=referral">Olav Ahrens Røtne</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Using a Proxy</h3><p>You may not always have access to the code running on the server. In this case, what you can do is to set up a proxy for your angular application. The Proxy basically attempts to fool the browser, it does this by pretending to have the API on the same origin whereas underneath the hood it&#39;s accessing the resource from another origin. This way the browser would be able to believe the <strong>same-origin policy</strong> is being adhered to, thereby taking out the CORS error.</p><p>How do we achieve this, let’s get into it right away.</p><h4>Step 1:</h4><p>Create a <strong>proxy.conf.json </strong>file<strong> </strong>and copy the following code into it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0f2c543c73692f7a9c1bc61bbc88e21/href">https://medium.com/media/d0f2c543c73692f7a9c1bc61bbc88e21/href</a></iframe><p><strong>A few things to note here</strong>:</p><ol><li>&quot;/api” property of the object specifies the route for the proxy and the nested object specifies the configuration. Hence in order to make requests, the url will be <a href="http://yourhost/api">http://yourhost/api</a> (for my project, that would be <a href="http://localhost:4200/api).">http://localhost:4200/api).</a></li><li>“target” property of the nested object specifies the API url you’re trying to reach, in this case spotify.com.</li><li>“secure” property is used to specify whether the target is being served over http or https. It is currently set to true because the spotify.com endpoint is being served over https.</li><li>“changeOrigin” property specifies that the target is on another domain different from that which the app is currently running on. In this case, it is set to true because the application is running on localhost while the target is on spotify . If they were both on localhost then it would be false.</li><li>&quot;pathRewrite&quot; property allows you modify how the application interacts with the target. Without the “pathRewrite” property, every call to the proxy url http://localhost:4200/api will correspond to <a href="https://api.spotify.com/v1">https://api.spotify.com/v1</a>/api . This wouldn’t be a problem if spotify has an api endpoint, but since in reality they don’t provide such endpoint, this would lead to an error. Hence, setting the &quot;pathRewrite&quot; nested object with “^/api”: “” helps remove the unwanted “api” at the end of the url. This in turn ensures that calling <a href="http://localhost:4200/api">http://localhost:4200/api</a> will correspond to <a href="https://api.spotify.com/v1">https://api.spotify.com/v1</a> .</li></ol><h4>Step 2:</h4><p>Set your application to work with the proxy using either of two methods:</p><ol><li>By running ng serve --proxy-config proxy.conf.json Ensure that the proxy.conf.json file is created at your base directory.</li><li>The other option is to modify the angular.json file and add the following lines of code to the architect configuration object.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a1b572882159c75e7f63da63c957770/href">https://medium.com/media/1a1b572882159c75e7f63da63c957770/href</a></iframe><p><strong>A few things to note</strong>:<br>The serve property is already preconfigured in your angular.json file, the only addition you need to add is on line 5.</p><p>Once this has been added, run ng serve to start your application.</p><h4><strong>On production environment</strong></h4><p>I found it easier to create the proxy server on Nginx. Unfortunately the configuration of the Nginx server is beyond the scope of this article, I’d write about it on another post.</p><h4>Other approach</h4><p>If you have access to the server running the endpoint, you can simply add Access-Control-Allow-Origin: * to your header to allow all origins or you can add Access-Control-Allow-Origin: http://localhost:4200 to allow only requests from the localhost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KwUW0cZ0JOLsXlJm" /><figcaption>Photo by <a href="https://unsplash.com/@alx_andru?utm_source=medium&amp;utm_medium=referral">Alex</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong><em>Further reading</em></strong></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy">Same origin policy</a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">Cross origin request sharing (CORS)</a></p><p><a href="https://angular.io/guide/build#proxying-to-a-backend-server">Angular — Proxying to a backend server</a></p><p><a href="http://access-control-allow-origin/">Access control allow origin</a></p><p>Please drop your comments, questions or feedback in the comment section below and I’ll reply as soon as possible.</p><p>Also, if you made it this far please keep going and drop a clap or two. That would really make my day. :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5e0ef143f85" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/fixing-cors-errors-with-angular-cli-proxy-e5e0ef143f85">Fixing CORS errors with Angular CLI proxy</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[Authentication in Angular using Keycloak]]></title>
            <link>https://medium.com/swlh/authentication-in-angular-using-keycloak-aff8e98dd094?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/aff8e98dd094</guid>
            <category><![CDATA[keycloak]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Thu, 21 May 2020 00:17:46 GMT</pubDate>
            <atom:updated>2020-05-21T00:31:31.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iwyOV0co2VbET3YC" /><figcaption>Photo by <a href="https://unsplash.com/@zenking?utm_source=medium&amp;utm_medium=referral">Rob King</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Keycloak is an open source identity and access management solution aimed at modern applications and services. — </em><a href="https://www.keycloak.org/about"><em>Keycloak Website</em></a></p><p>A few of its benefits are: Single sign on feature, social login (i.e login with facebook, Google, Github, etc), Admin console, etc.</p><p>This article will focus on how to easily integrate Keycloak into your angular project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1ygP11yXmlRMiS1n" /><figcaption>Let’s have some fun — Photo by <a href="https://unsplash.com/@sxoxm?utm_source=medium&amp;utm_medium=referral">Sven Mieke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplas</a>h</figcaption></figure><h3>Start a Keycloak instance</h3><p>We are going to perform a basic installation of Keycloak for the sake of this article. The Keycloak configuration in this article is particularly for the dev environment, therefore it would make use of the embedded H2 database and it would be made to run on the port 8080.</p><p>Run the command below in your cli to get started.</p><p>docker run --name keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=password -p 8080:8080 quay.io/keycloak/keycloak</p><p>This creates a docker container named keycloak running on the port 8080 with the Keycloak image gotten from the <a href="https://quay.io/repository/keycloak/keycloak">quay.io docker repository</a>. Take note of the KEYCLOAK_USER and KEYCLOAK_PASSWORD fields as we will be making use of them in the next step.</p><h3>Setup a Keycloak realm</h3><p>According to the Keycloak documentation, a realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control. Therefore, the users of the app will have to be setup on the realm and assigned roles in order to manage their access.</p><h4>Log into the admin console</h4><p>In order to do this, we visit the admin page on <a href="http://localhost:8080/auth">http://localhost:8080/auth</a> If the first step was successful, you should be presented the page below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zufm-opVwcjj5_OTOhJWfA.png" /><figcaption>Keycloak welcome page from <a href="http://localhost:8080/auth">http://localhost:8080/auth</a></figcaption></figure><p>To enter into the master realm, click on the “Administration Console” link. This should direct us to the Log-in form below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59sc4j2_yQxK9ZU3JGf_mA.png" /><figcaption>Keycloak Log in page</figcaption></figure><p>The credentials for this form are those we inputted when starting the Keycloak instance in our first step (KEYCLOAK_USER=admin KEYCLOAK_PASSWORD=password).</p><p>On entry into the dashboard, at the top left part of the screen, hover across the word “Master” and click on the “Add Realm” button. In order to save time, I have created a json file that can be imported with the realm, clients, and users configured into it. The file can be downloaded <a href="https://github.com/Damilare1/angularkeycloakproject/blob/master/angularprojectrealm.json">here</a>. (To create your a realm yourself, checkout Keycloak’s <a href="https://www.keycloak.org/docs/latest/getting_started/">documentation</a> to guide you through the process).</p><h4>Add Users</h4><p>Click on the ‘Users’ tab underneath the ‘Manage’ section. Once you are in, click on the ‘Add user’ button on the extreme right and fill in the required details to create the user. For more details about how to go about this, click <a href="https://www.keycloak.org/docs/latest/getting_started/#_create-new-user">here</a>.</p><p>The required role, ‘user’, has been created in the ‘angularproject’ client that you imported earlier. To add the role to this user you just created, click on the ‘Role Mapping’ tabs and select the ‘angularproject’ client in the Client Roles tab. Select on the ‘user’ role in the ‘Available roles’ box and click the ‘Add selected’ box at the bottom of the box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQYc-4KwxFGCCp5uLa1IUQ.png" /><figcaption>Adding roles to user</figcaption></figure><p>Click <a href="https://www.keycloak.org/docs/latest/getting_started/#_create-new-user">here</a> to learn more adding roles to user.</p><p>With all this setup, next step is to move to the fun part, integrating Keycloak into our Angular project.</p><h3>Integrate Keycloak into Angular Project</h3><p>At this point, I’ll assume your Angular project is already set up and you’re only interested in inserting Keycloak into your project. If you aren’t set up yet, don’t worry we will wait for you, please visit the <a href="https://angular.io/guide/setup-local">Angular Documentation</a> for a detailed guide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qsiq_15QdTVSA9Gc" /><figcaption>Just here waiting for you to set up your Angular project — Photo by <a href="https://unsplash.com/@leselenite?utm_source=medium&amp;utm_medium=referral">Barthelemy de Mazenod</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In my project, I have two routes set up — The Homepage route and the XYZ route. A part of my objective is to ensure that only users that are authenticated would have access to each route and only users with the ‘user’ role will be permitted to view the content of the XYZ route.</p><p>Pretty straightforward right? So let’s get to work.</p><h4>Install Dependencies</h4><p>To begin, we start by adding two dependencies that will handle the conversation between our application and the keycloak instance. They are keycloak-angular and keycloak-js .</p><p>I primarily use yarn as a package manager so to install this I’ll run:</p><p>yarn add keycloak-angular keycloak-js .</p><p>If you use NPM that will be:</p><p>npm i keycloak-angular keycloak-js</p><h4>Initialize Keycloak with it’s configuration in app.module.ts</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d955e8be81cf147c4c1b3ac1db95c80c/href">https://medium.com/media/d955e8be81cf147c4c1b3ac1db95c80c/href</a></iframe><p><strong>Somethings to note</strong></p><ul><li>(line 5) Import KeycloakAngularModule and KeycloakService form the keycloak-angular dependency installed earlier.</li><li>(line 13) Instantiate the KeycloakService class, thereby creating the object variable keycloakService .</li><li>(line 22) Added the KeycloakAngularModule to the imports property of the ngmodule object parameter to allow the app module child component have access to the module.</li><li>(line 27–29) We passed two providers AppAuthGuard (ignore for now) and the KeycloakService to ensure the dependencies are available to across all the components in our project.</li><li>(line 31) The bootstrap property was removed in order to prevent the possibility of the page loading up before the user is redirected to the authentication page.</li><li>(line 34–54) The ngDoBootstrap method enables the manual bootstrapping of the page. This would enable the verification of the user’s authentication status before loading the component.</li><li>(line 37–47) This is the keycloak service option object. They help in initializing the keycloak service.</li><li>(line 38–41) The config property sets points the service to the keycloak instance uri, realm, and client details.</li><li>(line 42–45) To authenticate the application, by default the users are automatically redirected to a login page for them to enter their login credentials. This behavior could be modified by the initOptions property object.<a href="https://github.com/keycloak/keycloak-documentation/blob/master/securing_apps/topics/oidc/javascript-adapter.adoc"> See here for more details</a></li><li>(line 46–47) The bearerInterceptor allows you set the routes users can access without having been authenticated. To do this, we set the enableBearerInterceptor property to true and add a string of the routes in the bearerExcludedUrls array.</li></ul><h4>Set up Authentication Guard (AppAuthGuard)</h4><p>The AppAuthGuard performs the user access validator function. That is, it helps in restricting user access to certain pages across the project according to the roles assigned from the Keycloak server.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cc67955ff4ea338fe347bc5dc99f2b0/href">https://medium.com/media/3cc67955ff4ea338fe347bc5dc99f2b0/href</a></iframe><p>The bulk of the auth guard logic is done in the abstract class keycloakAuthGuard that the AppAuthGuard class extends. This is the reason the canActivate function isn’t manipulated in this class, but we are allowed to play with the isAccessAllowed function provided by keycloakAuthGuard. Please note, this method returns a promise that should resolve to a boolean.</p><p>(line 24 — 26) checks if the user is authenticated first, the promise returns an error if user isn’t authenticated and redirect the user to the Keycloak login page.</p><p>If user is authenticated, the next thing to check for is if the user has the required roles necessary to visit the current route. If true, user is granted permission, else user is redirected to home page.</p><p>For more info about the AuthGuard class, checkout the <a href="https://www.npmjs.com/package/keycloak-angular">keycloak-angular documentation</a> on NPM.</p><h4>Add the AuthGuard to the Routes</h4><p>This is the easy part.</p><p>I already created two sample routes for the purpose of this course as mentioned earlier. (P.S Don’t mind my nomenclature, lets focus on the lesson please).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/639b841dc2dea27991a95c87c1594951/href">https://medium.com/media/639b841dc2dea27991a95c87c1594951/href</a></iframe><p><strong>A few things to note</strong></p><ul><li>(line 13) Angular allows us pass data to a component via the ActivatedRoute service. To access this data, we subscribe to the data property of an instance of the ActivatedRoute service. Another way to access the data passed in the route is to copy the data property from an instance of the ActivatedRouteSnapshot, this was the method used in the <strong>AppAuthGuard</strong> class (line 19, 29).</li><li>(line 11) Pass the AuthGuard to the route’s canActivate property.</li><li>(line 15 — 18) The FirstpageComponent does not have an AuthGuard therefore it can be accessed by users of any role type.</li><li>(line 23) The AppAuthGuard is added to the providers.</li></ul><h3>Test it out</h3><p>You can access the code we built together in this article <a href="https://github.com/Damilare1/angularkeycloakproject">here</a>.</p><p>With your Keycloak server instance running in docker, cd into the angular project in your terminal and start the project with yarn serve</p><h3>Expected output</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5u2Et9i3MDX8gAJyq6cZEg.gif" /><figcaption>Sampleuser has the required role (user) to access the “xyz” route.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E_0UBFrQuIAZNmM1uYWMBw.gif" /><figcaption>Seconduser does not have the required role to access the “xyz” route.</figcaption></figure><p>We’ve come to the end of this article, I hope you found it worthwhile. This is an oversimplified setup of Keycloak, the focus here is the implementation of the library in Angular and not Keycloak’s setup. I’m happy to assist you if you are having issues with setting Keycloak for this project.</p><p>Please drop your comments, questions or feedback in the comment section below and I’ll be sure to reply as soon as possible.</p><p>Also, if you made it this far please keep going and drop a clap or two. That would really make my day. :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aff8e98dd094" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/authentication-in-angular-using-keycloak-aff8e98dd094">Authentication in Angular using Keycloak</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[Validations in Angular Reactive Forms]]></title>
            <link>https://levelup.gitconnected.com/validations-in-angular-reactive-forms-64b60f6169b0?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/64b60f6169b0</guid>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Sun, 03 May 2020 19:35:03 GMT</pubDate>
            <atom:updated>2020-05-04T15:15:38.792Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*BUGJTNIfhrTii536nCJq9Q.png" /></figure><p><em>Building forms on Angular is intuitive until you get to the point of user input validations. The work of a Frontend Engineer would have been a lot easier if users could be trusted with entering the right values into each input field. Unfortunately, this isn’t always possible. Therefore the relevance of validating user inputs at the point of entry can not be overemphasized.</em></p><h3>What are Reactive forms in Angular anyway?</h3><p>The reactive approach for making forms in Angular is one where all the form validation logic is passed to the ViewModel. The form fields are initiated on the ViewModel and have two-way binding by default, and therefore state updates are done automatically. Since the validation logic is done on the ViewModel, the template becomes less complex.</p><h3>Build a User Registration Reactive form in Angular</h3><p>We are going to build a ReactiveForm for registering a user(customer).</p><p>Here is the link to the final application: <a href="https://angular-reactive-forms-12.stackblitz.io/">Link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*--l7dwvc8X72pAYY" /><figcaption>Let’s begin — Photo by <a href="https://unsplash.com/@sergeytrofimov?utm_source=medium&amp;utm_medium=referral">Serghei Trofimov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Add ReactiveFormsModule to the Parent Module</h4><p>As you may have noticed, every component in Angular is declared in a parent module. This ensures that all components added in the declaration array have access to the classes in the imported modules. Therefore in order to use Reactive Forms in our app component, we need to import ReactiveFormsModule from @angular/forms and add it to the imports array passed into the @NgModule directive.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c401871aea87208be7aca181b69da7e3/href">https://medium.com/media/c401871aea87208be7aca181b69da7e3/href</a></iframe><h4>Import the form and validation classes from angular/forms into the component</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c8733bbe89d2182d078c0bac849c27f/href">https://medium.com/media/3c8733bbe89d2182d078c0bac849c27f/href</a></iframe><p>The FormBuilder class makes it easy to build both complex and simple forms by removing the need for creating instances of FormGroups, FormArrays or FormControls.</p><p>The FormGroup class combines the values and status of all the form controls (inputs) into one object. Basically it aggregates the status of all fields in the form into the form’s own status. For example, assuming there are 3 form controls (input fields) in a FormGroup, if one of the input fields is invalid, the status of the form would also be invalid. The form’s status will only be valid if all form controls are valid.</p><p>The Validator class provides a set of built-in static validation functions that can be used by a form control.<a href="https://angular.io/api/forms/Validators"> Click here for the list of validation functions.</a></p><h4>Develop the FormGroup</h4><p>For our project, the customer would be required to provide the following personal data: First name, last name, email, and address. The address data is further broken down into smaller parts, they are: lineOne, lineTwo, city, state, country.</p><p>In order to ensure full compliance, we would eventually make each input compulsory and disable form submission untill the customer enters the correct details. For now, the form is developed as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80860c0a20fbe3910e15c3b1d02d8586/href">https://medium.com/media/80860c0a20fbe3910e15c3b1d02d8586/href</a></iframe><p>The userForm is initialized with the FormGroup type on the first line. Also, private class instance property fb is created and assigned the FormBuilder class in the constructor’s parameter. This passes all the FormBuilder class functions which are group(), control(), and array() to the class property fb.</p><p>The function group in the FormBuilder class constructs the FormGroup instance by taking in an object of FormControls as a parameter. The FormControls are the input fields that represent the data to be collected from the user (first name, last name, etc). The address field is a nested object in the user property that contains information about the user’s city, state, country, etc. Making the address sort of like a form in another form, therefore the address would be a FormGroup nested in a FormGroup.</p><h4>Add the onSubmit function</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85005a38223d74903546e6dfbc374e0d/href">https://medium.com/media/85005a38223d74903546e6dfbc374e0d/href</a></iframe><h4>Develop the form on the template file</h4><p>Designing the form on the template file is only a little different from the HTML implementation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df09e2b11e4eee0323272219c750a416/href">https://medium.com/media/df09e2b11e4eee0323272219c750a416/href</a></iframe><p>Pheww! That was a lot, let’s take a short break and admire this cute cat yawning. (To view our progress, <a href="https://github.com/Damilare1/angular-reactive-forms-12/tree/without-validation">click here</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GrURrJ2AHogljPZS" /><figcaption>Photo by <a href="https://unsplash.com/@allthestars?utm_source=medium&amp;utm_medium=referral">Sophie Dale</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Welcome Back. Let’s proceed to the next stage, adding validations.</p><h3>Form Validation</h3><h4>Add Validator functions to the FormGroup initialization</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e89ab962ea9f5f19ed444699f202509/href">https://medium.com/media/4e89ab962ea9f5f19ed444699f202509/href</a></iframe><p>In order to ensure strict compliance in the customer registration form, we need to add validations to the userForm controls.</p><p>The validation functions could be either thestatic functions in the Validators class or custom created validation functions, they are not compulsory and there can also be multiple validators attached to a FormControl. For the case whereby the validators are in multiples, the functions should be listed in an array.</p><p>Important to note is that validators could either be synchronous or asynchronous functions. If a multiple of synchronous and asynchronous functions are added to a FormControl, the synchronous validators are checked first before the asynchronous validators in order to optimize resource usage.</p><p>The addition of the validator functions will trigger the status and error properties of the form and its controls.</p><h4>Add Validation messages for required fields or wrong inputs</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed0794d9e80d0753c9dac8f99554598f/href">https://medium.com/media/ed0794d9e80d0753c9dac8f99554598f/href</a></iframe><h4>Add Invalid input processor</h4><p>Unfortunately, as at the time of this article, Angular forms do not update the FormGroup error property even if there are errors in the control (see <a href="https://gist.github.com/Damilare1/4a53c9d258e5529d72cdc461bcaf0a9e">issue</a>). For this reason, we would have to create our own object of errors by iterating over the form controls every time the input value changes or the blur event is emitted to check for errors.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dc04ee5c513979468494a74147ab7ae/href">https://medium.com/media/1dc04ee5c513979468494a74147ab7ae/href</a></iframe><p>Here the iterator looks through the form tree for input errors. The control variable represents the formControl as defined in the object passed to the fb.group function earlier (firstName, lastName,…, address).</p><p>The iterator checks if each control is an instance of a FormGroup, the address control would pass this test, then the fields of the nested FormGroup would be iterated over too.</p><p>If the key isn’t an instance of a FormGroup, the iterator checks the status properties of the controls to determine their validity. If the control (input field) contains errors and has been touched or has values, the iterator maps the validation message of the input to the error object. The error object would enable the mapping of errors to the corresponding control in the view(template file).</p><h4>Form Control and Form Status Properties</h4><ol><li>dirty:(boolean) true implies value has been entered</li><li>pristine:(boolean) opposite of dirty</li><li>disabled:(boolean) true if input is disabled</li><li>enabled:(boolean) opposite of disabled.</li><li>invalid:(boolean) true if control input has an error</li><li>pending:(boolean) true for asynchronous event waiting for response</li><li>untouched:(boolean) true if input field hasn’t been touched/changed</li><li>valid:(boolean) opposite of invalid</li><li>errors:(object) consisting of the current validation errors of the input. For example, our form would have an error property for the email as {required: true} if no value is entered or {email: true} if the value entered is not an email.</li><li>status: (string) is either VALID/INVALID depending on the state of the other controls.</li></ol><h4>Add Validation to the template</h4><p>In order for the user to receive the validation messages, we need to have an indicator to show an input error and pass the message saved in the messages for the inputs to the user. To do this, we would use the error object (message) created in our viewModel above.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b69ef5b0c82932b3edc27ced92a8a1b3/href">https://medium.com/media/b69ef5b0c82932b3edc27ced92a8a1b3/href</a></iframe><p>Things to note here are:</p><ol><li>[ngClass] property binding enables the element to change class on the change of the condition. In the code snippet above, the ngClass property says the border color should turn red if an error exists in the messages object for the lineOne input field.</li><li>*ngIf takes in a conditional statement and displays the element only if the condition is true.</li><li>The submit button is disabled till the form valid property is true.</li><li>The {{}} represents an interpolation. This allows Javascript statements from the model to be displayed on the model.</li></ol><h4>Other things to note</h4><p>The value changes and blur event were monitored in the form with the following functions:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f4fb242b87de257f6f419ce08e75ad9/href">https://medium.com/media/5f4fb242b87de257f6f419ce08e75ad9/href</a></iframe><p>The viewChildren directive is similar to the document.getElementById in that it is provided with an identifier and it returns a QueryList of similar elements within the view. Since Angular is platform-agnostic, meaning it may not necessarily be run on the web, it is preferable to stick with the Angular way (@viewChildren). The viewChildren directive is called before the ngAfterViewInit function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39524fbe1d9c48e59e0c0235f037d862/href">https://medium.com/media/39524fbe1d9c48e59e0c0235f037d862/href</a></iframe><p>Our code base may become a little too complex if we decide to monitor the blur event of each control manually on the template. rxjs provides a simple utility function that creates observables from event sources in elements. This is the fromEvent function, we used it in creating observables from the blur event in the nativeElement of the formControls ElementRef.</p><p>Observables, once subscribed to, would automatically notify the subscribing function when the form state changes. In order to subscribe to all observables in one place, the merge function was passed all the observables of concern.</p><p>The debounceTime function ensures that a short while (.5s) passes before the message is displayed to the user.</p><p>And we are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*luUqoas5IxcRQjxR" /><figcaption>Congratulations on making it to the end — Photo by <a href="https://unsplash.com/@adijoshi11?utm_source=medium&amp;utm_medium=referral">Aditya Joshi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>To view the complete source code for our project, <a href="https://github.com/Damilare1/angular-reactive-forms-12">click here</a>.</p><p>In this article, I’ve been able to cover</p><ol><li>Angular Reactive Forms (<a href="https://angular.io/guide/reactive-forms">further reading</a>, <a href="https://app.pluralsight.com/course-player?clipId=dec50e4b-b318-46ec-8718-015a18e6a67b">Pluralsight course</a>)</li><li>FormControls, FormBuilder, form groups, and Validators (<a href="https://angular.io/api/forms/FormBuilder">further reading</a>)</li><li>ViewChildren directive (<a href="https://angular.io/api/core/ViewChildren">further reading</a>)</li><li>rxjs, Observables, fromEvent and merge properties (<a href="https://angular.io/guide/observables">further reading</a>).</li></ol><p>Please drop your comments, questions or feedback in the comment section below and I’ll reply as soon as possible.</p><p>Also, if you made it this far please keep going and drop a clap or two. That would really make my day. :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64b60f6169b0" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/validations-in-angular-reactive-forms-64b60f6169b0">Validations in Angular Reactive Forms</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[Automating Tasks with Shell Scripts]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/swlh/automating-tasks-with-shell-scripts-543422a12cd5?source=rss-8f8c4da8eb9a------2"><img src="https://cdn-images-1.medium.com/max/691/1*qlykq9K5l2BPG0ulHlZ4zg.jpeg" width="691"></a></p><p class="medium-feed-snippet">If you are as lazy as I am, you would agree that writing the same commands over and over could be quite exhausting. It would be really&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/swlh/automating-tasks-with-shell-scripts-543422a12cd5?source=rss-8f8c4da8eb9a------2">Continue reading on The Startup »</a></p></div>]]></description>
            <link>https://medium.com/swlh/automating-tasks-with-shell-scripts-543422a12cd5?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/543422a12cd5</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[shellscripting]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Fri, 03 Apr 2020 10:17:13 GMT</pubDate>
            <atom:updated>2020-04-26T22:40:04.477Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Story of an unwritten Hero]]></title>
            <link>https://medium.com/@damilareaadedoyin/story-of-an-unwritten-hero-fd9086037d53?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd9086037d53</guid>
            <category><![CDATA[mothers]]></category>
            <category><![CDATA[motherhood]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Tue, 17 Jul 2018 17:34:27 GMT</pubDate>
            <atom:updated>2018-07-17T17:34:27.057Z</atom:updated>
            <content:encoded><![CDATA[<p>Story of an unwritten Hero</p><p>Decades ago a woman labored in joy as the fingers that would write her story came to life.</p><p>Strife and torments may break her bones, but the midnight cry for food from the lips of the one that would tell her story to the world excited her.</p><p>She had a good time teaching this young one all that is to know about success, because she knew that’d bring the platform for his feet to stand while telling her story.</p><p>It wasn’t in all an easy journey, as life threw lemons at her from every side. But being a strong woman, she caught some and made lemonades for the young one as he wrote her story.</p><p>And when he was about to tell her story, the lights went off and the sounds slowly faded away. So she lay still, knowing she wouldn’t be able to hear her own stories.</p><p>But right before she laid down to rest, she cried tears of joy, because she knew he had an amazing story to tell.</p><p>And here he is writing her story, one paragraph at a time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd9086037d53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Digital marketing lessons from Sun Tzu’s Art of War]]></title>
            <link>https://medium.com/@damilareaadedoyin/digital-marketing-lessons-from-sun-tzus-art-of-war-63858f01f00a?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/63858f01f00a</guid>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Sun, 25 Feb 2018 13:07:44 GMT</pubDate>
            <atom:updated>2018-02-25T15:38:33.456Z</atom:updated>
            <content:encoded><![CDATA[<p>Digital marketing lessons from Sun Tzu’s Art of War</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*mVED7F2xKj9IilYrkdQoVg@2x.jpeg" /></figure><p>I started reading Sun Tzu’s Art of War some days ago, anyone who has read it should remember the Emperor’s test in the Introductory chapter.</p><p>For those who haven’t read the book, the emperor put Sun Tzu capabilities as an Army General to test, he asked Sun Tzu to train 180 ladies like he would do an army. Sun Tzu took up the challenge and divided the group into 2 and made the king’s favorite concubines the head of each group.</p><p>Everything was set, the ladies were well arranged with the leaders standing in front. But the book had it that whenever the general gave an order the ladies were not in sync and laughed uncontrollably. In short the ladies weren’t acting like they should.</p><p>According to the writer, Sun Tzu took the blame for the lack of orderliness. So he kept on correcting their mistakes.</p><p>After much attempts, he said “If words of command are not clear and distinct, if orders are not thoroughly understood, the general is to blame. But if his orders ARE clear, and the soldiers nevertheless disobey, then it is the fault of their officers.” After which he beheaded the leaders of the two groups.</p><p>The king was angry, but the ladies became fit for war as they obeyed all the general’s orders without fault. His job was done.</p><p>Let’s relate the story to your digital campaigns, your campaign failure may not necessarily be that you are getting it wrong. Your poor results could be caused by a flaw in your Strategy or design(UX or UI).</p><p>Look through your campaign carefully and find who to behead. You may not like what you have to lose but you’d be impressed by the results.</p><p>Contact me if you need assistance.</p><p>Excerpt From: Tzu, Sun. “The Art of War.” iBooks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63858f01f00a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Opportunities and a Beating Heart]]></title>
            <link>https://medium.com/@damilareaadedoyin/opportunities-and-a-beating-heart-c6348dc570d8?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6348dc570d8</guid>
            <category><![CDATA[disappointment]]></category>
            <category><![CDATA[faith]]></category>
            <category><![CDATA[hope]]></category>
            <category><![CDATA[hopes-and-fears]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 20:46:25 GMT</pubDate>
            <atom:updated>2018-03-14T19:33:51.221Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*trKKr3QuGK2m2E5dzgnJ8g.png" /></figure><p>Definition of Hope:</p><p><em>A feeling of expectation and desire for a particular thing to happen.(Oxford Dictionary)</em></p><p>Definition of Faith:</p><p><em>Now faith is the substance of things hoped for, the evidence of things not seen.(KJV Hebrews 11:1)</em></p><p>Humanly speaking we have all experienced this two at every stage of our lives; from our expectations as kids to those in our adulthood. But what I’ve come to realize is that as we grow older these expectations become more serious.</p><p>As a kid, I had hopes of getting a bicycle or the newest gaming console at the end of a school term when I did well in school. As at then those were serious expectations for me but its nothing compared to a family man expecting returns on a heavy investment.</p><p>But as we all know these expectations do not necessarily lead to substance, in fact the higher the expectations the harder the fall. Now this is where some people tend to miss it, I did too. Some times we get too use to these disappointments that we build a fort and decide never to put any effort in trying again.</p><p>I have heard people say stuff like, “But that’s who I am, I’ve never been good at X, there’s no point in trying again this time.” First of all, who gave you the label of a failure that you identify with. But that’s not my point, I will address that in another post.</p><p>My point is as long as you still feel that pounding in your chest and blood still flows through your veins, you have every reason to hope and hold on to faith. Stay expectant and actively place your hands on opportunities. By active, I mean attempt and learn from your mistakes. Live life expectant.</p><p>Don’t Lose Faith!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6348dc570d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About Us: GDG Ibadan]]></title>
            <link>https://medium.com/gdg-ibadan-blog/about-us-gdg-ibadan-f99e3c8db67c?source=rss-8f8c4da8eb9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f99e3c8db67c</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[ibadan]]></category>
            <category><![CDATA[nigeria]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[gdg]]></category>
            <dc:creator><![CDATA[Damilare A. Adedoyin]]></dc:creator>
            <pubDate>Thu, 21 Dec 2017 13:36:40 GMT</pubDate>
            <atom:updated>2017-12-21T13:36:40.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RoWhQmiuefHc_tMpmDQ0Mg.jpeg" /></figure><p>Google Developer Groups (GDGs) are for developers who are interested in Google’s developer technology; everything from the Android, Chrome, Drive, and Google Cloud platforms, to product APIs like the Cast API, Maps API, and YouTube API.</p><h4>Who we are</h4><p>GDG Ibadan represents a sub group of GDGs worldwide in Ibadan. We are a group of motivated individuals interested in Google Developer technology and the technology space as a whole. The group was created to foster sharing of knowledge in the Google technology space with developers and Technology enthusiasts within Ibadan.</p><p>We hold meetups regularly to keep our members up to date with the latest happenings in the Google developer space. Our meetups bring about an opportunity for developers and enthusiasts in general to network, collaborate and learn new technologies. Hence our typical meeting would usually involve a talk on the latest happenings in Google that developers can be a part of, a short tea break, a Codelab for members to learn new technologies and lots of pictures taking.</p><h4>Who we are not</h4><p>GDG Ibadan does not represent a closed group of elite developers, our meetings are open to all tech enthusiasts and developers of any level.</p><blockquote><strong>Disclaimer: GDG Ibadan is an independent group; our activities and the opinions expressed here should in no way be linked to Google, the corporation. To learn more about the GDG program, visit </strong><a href="https://developers.google.com/groups/"><strong>https://developers.google.com/groups/</strong></a><strong>.</strong></blockquote><p>For more interesting posts, join our online community on the following platforms:</p><p>· Meetup: <a href="https://www.meetup.com/GDG-Ibadan/">https://www.meetup.com/GDG-Ibadan/</a></p><p>· Twitter: <a href="https://twitter.com/gdgibadan">@gdgibadan</a></p><p>· Facebook: <a href="https://www.facebook.com/gdgibadan/">https://www.facebook.com/gdgibadan/</a></p><p>· Medium: <a href="https://medium.com/gdg-ibadan-blog">https://medium.com/gdg-ibadan-blog</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f99e3c8db67c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-ibadan-blog/about-us-gdg-ibadan-f99e3c8db67c">About Us: GDG Ibadan</a> was originally published in <a href="https://medium.com/gdg-ibadan-blog">GDG Ibadan’s Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>