<?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 Surajudeen Akande on Medium]]></title>
        <description><![CDATA[Stories by Surajudeen Akande on Medium]]></description>
        <link>https://medium.com/@sirolad?source=rss-93d2f4742c91------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GhhpdrZHz8a5qe5UcgRc0g.jpeg</url>
            <title>Stories by Surajudeen Akande on Medium</title>
            <link>https://medium.com/@sirolad?source=rss-93d2f4742c91------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:14:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sirolad/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[Bundle those Dependabot PRs!]]></title>
            <link>https://sirolad.medium.com/bundle-those-dependabot-prs-ef1831ea65fe?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef1831ea65fe</guid>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 22:24:23 GMT</pubDate>
            <atom:updated>2026-04-14T22:24:23.547Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Lesson in Resource Stewardship</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjCHvxdvjIhGQ3LFYsoyGg.png" /></figure><p>One of the defining traits of an effective leader — technical or otherwise — is the sobering realization that resources are not infinite. Whether it’s your team’s focus, your monthly cloud budget, or the literal minutes in a workday, everything has a ceiling. I’ve always been fond of a quote by the Stoic philosopher Seneca:</p><blockquote><em>“Until we have begun to go without them, we fail to realize how unnecessary many things are. We ‘ve been using them not because we needed them but because we had them.”</em></blockquote><p>In modern software development, we often “have” automated tools that we use without questioning the overhead they create. Dependabot is the perfect example.</p><h3>The Noise of Automation</h3><p>Most teams use Dependabot to keep dependencies up to date. It’s a vital security tool, but out of the box, it can be a source of immense friction. We’ve all seen it: Monday morning rolls around, and your repository is flooded with 15 individual PRs for minor library updates.</p><p>Each one triggers a CI/CD run. Each one sends a notification. Each one requires a human eye to click “Merge”. We use these individual PRs not because we need the granularity, but simply because that’s the default setting.</p><h3>The Solution: Grouping &amp; Limits</h3><p>By “Bundling” your updates, you consolidate those 15 distractions into a single, manageable Pull Request.</p><p>The Strategy: Focus on bundling minor and patch updates.</p><p><em>A quick caveat: Avoid bundling major updates. Major version bumps often contain breaking changes that require isolated testing and manual intervention. Keep those separate to maintain your sanity.</em></p><p>To truly master your resources, you should also reduce your PR limit. By default, Dependabot might try to open 10 or more PRs at once. By lowering this limit alongside bundling, you ensure the automation stays helpful rather than overwhelming.</p><p>How to do it.</p><p>It’s a simple addition to your <em>dependabot.yml</em>. Here is a snippet to group all non-major updates into one “Security &amp; Patches” bundle:</p><pre>version: 2<br>updates:<br>  - package-ecosystem: &quot;npm&quot;<br>    directory: &quot;/&quot;<br>    schedule:<br>   version: 2<br>updates:<br>  - package-ecosystem: &quot;npm&quot; # or pip, gomod, etc.<br>    directory: &quot;/&quot;<br>    schedule:<br>      interval: &quot;weekly&quot;<br>    # Limit the &quot;open&quot; PRs to keep the UI clean<br>    open-pull-requests-limit: 3 <br>    # Consolidate the noise<br>    groups:<br>      production-dependencies:<br>        patterns:<br>          - &quot;*&quot;<br>        update-types:<br>          - &quot;minor&quot;<br>          - &quot;patch&quot;</pre><p>Why this matters (The Bottom Line)</p><ol><li>CI/CD Efficiency: Instead of spinning up 15 separate build pipelines, you spin up one. This directly saves on pipeline minutes and reduces your cloud bill.</li><li>Developer Experience: You reduce “Notification Fatigue”. Your team can review one comprehensive update rather than being interrupted 15 times.</li><li>Speed: It’s much faster to verify and merge a single bundle than to play PR Whack-a-Mole all morning.</li></ol><p>As leaders, our job isn’t just to add tools; it’s to refine how we use them. By bundling your Dependabot PRs, you realize that the noise of individual updates was never necessary — it was just a habit.</p><p>What other <em>DX </em>tips would you like to share?</p><p>#EngineeringLeadership #DevOps #CICD #Efficiency #Dependabot #SoftwareDevelopment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef1831ea65fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stolen Identity]]></title>
            <link>https://sirolad.medium.com/stolen-identity-ca00a86793a4?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca00a86793a4</guid>
            <category><![CDATA[nigeria]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[telecommunication]]></category>
            <category><![CDATA[banks]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Tue, 04 Apr 2023 12:42:42 GMT</pubDate>
            <atom:updated>2023-04-04T12:47:48.064Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*mwzTggt3gpd2uvmVo6RjsQ.png" /></figure><p>While watching Sci-fi like 24 Hours almost two decades ago, one of the strange concepts I learned about was Identity Theft.</p><p>It was hard for me to understand. I am me, how can someone steal me(my identity)?</p><p>The idea is no longer far off with the proliferation of mobile communication technologies being connected to Identification Programs run by Governments and Institutions, especially Financial Institutions.</p><p>Except one lives ‘off the grid’ it is almost impossible to do without these systems. They relatively make life and living easier as they provide a lot of possibilities for people and businesses.</p><p>Systems like the BVN and NIN which should help us to know who owns what accounts are connected to our mobile sim card since it is assumed that these sim cards in mobile devices will always be with us. It is like a concrete abstraction of our identities in digital systems. The moment this Digital Identity is accessed or used without your consent, your identity is stolen. And since this is how the State or Institution can verify that you carried out an action, this identity could be used with malicious intent to implicate you.</p><p>A sad twist is the idea of Sim Card Recycling which allows Telecommunication Providers to sell a previously assigned (which is now ‘idle’) number to another person because they do not want to run out of numbers so fast since Mobile subscribers are increasing and many people also use more than one sim card.</p><p>Aside from that these sim cards are connected to Financial and State Issued Identities they also store data from previous users like contacts, and messages which could be accessed by the new user.</p><p>The icing on the cake of trouble is possible by USSD codes. It is possible to buy recharge cards and access the BVN of a user. With a phone number, date of birth(both of which are public information), and the BVN which can be gotten through a popular USSD code, I can open multiple bank accounts in anyone’s name. It appears we have sacrificed security on the altar of convenience.</p><p>This might not be done by a stranger but also by an acquaintance, be it one’s child, friend, or spouse.</p><p>Hence eternal vigilance is required since the industry and institutions that are expected should protect one seems busy covering their own side and not ours as consumers.</p><p>We all get furious if someone used our picture to create a social media profile, someone creating a bank account in our names is a terrible nightmare because they have an institutionally verified tool to back up their evil whose further victims would most likely be our friends and family.</p><p>Perhaps there is a connivance in the Telco industries with these unscrupulous elements in accessing recycled sim cards. Should people be informed they are buying a recycled number when they are getting a sim card?</p><p>Another worrying trend is people with malicious intent getting the date of birth and picture of kids from their parent’s profiles to create social media accounts in their name, similar could extend to state-issued identities if it is not nipped in the bud. Email addresses created for kids by parents should also have necessary security safeguards so that the kids do not grow up struggling with Identity thieves.</p><p>Any sim card that is connected to our state-issued Identities must be guarded jealously and if stolen must be recovered quickly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca00a86793a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thank You!]]></title>
            <link>https://sirolad.medium.com/thank-you-7696095461c0?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/7696095461c0</guid>
            <category><![CDATA[new-year]]></category>
            <category><![CDATA[gratitude]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Sat, 31 Dec 2022 09:21:47 GMT</pubDate>
            <atom:updated>2022-12-31T10:45:26.057Z</atom:updated>
            <content:encoded><![CDATA[<p>Thank you to everyone who made 2022 memorable.</p><p>Thanks for the knowledge sharing.</p><p>Thanks for the tips.</p><p>Thanks for sharing your pain with me and let me share mine with you.</p><p>Thanks for sharing your food and shelter.</p><p>Thanks for sharing those wonderful passwords that unlocked bliss.</p><p>Thanks for the trips, the hiking, the biking, we did together.</p><p>Thanks for the feedback.</p><p>Thank you for pointing me to better ways.</p><p>Thanks for sharing your time and advices.</p><p>Thanks for checking up on me.</p><p>Thank you for the gifts.</p><p>Thank you for enriching the community spirit.</p><p>Thanks for sharing opportunities with me.</p><p>Thanks for sharing your thoughts.</p><p>Thanks for bailing me out.</p><p>Thanks for sharing your doubts it helped me to know I am not lonely in having them.</p><p>Thank for helping me unlocking new grounds and potentials.</p><p>I am grateful for everything, the joys, the pains, the excitement, the disappointments, the community, the loneliness, the commendations, the condemnations, the profits, the losses, the heat, the cold.</p><p>I am grateful for another opportunity in experiencing Relativity.</p><p>Let&#39;s double down in 2023. Wishing you have a better year than the previous ones lived.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7696095461c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No matter how hard this country hard reach, God let me see my own do
I will thrive and prosper.]]></title>
            <link>https://sirolad.medium.com/no-matter-how-hard-this-country-hard-reach-god-let-me-see-my-own-do-i-will-thrive-and-prosper-7b22fc1d3ba?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b22fc1d3ba</guid>
            <category><![CDATA[social]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[selfishness]]></category>
            <category><![CDATA[humanity]]></category>
            <category><![CDATA[nigeria]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Tue, 21 Sep 2021 08:07:30 GMT</pubDate>
            <atom:updated>2021-09-21T12:43:40.044Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>No matter how hard this country hard reach, God let me see my own do<br>I will thrive and prosper.</strong></p><p>This topic is a very interesting one. I found it on a Facebook status update of a friend and I decided to write about it.</p><p>About 9 years ago, it was a question that bothered my mind as a young graduate who was not sure of what to do with his life.</p><p>It was apparent that with the socio-economic challenges facing my country and a lack of direction from the political leadership, my best resort was prayer.</p><p>I see people praying from both sides of the prominent religion in my country. They pray for the country and they prayed for themselves.</p><p>Obviously, the prayers are yet to work for the country.</p><p>Individually, prayers were turning things around for some Muslims and some Christians. Definitely not the majority.</p><p>Then I questioned myself, is there a limitation to what prayers can do for my country?</p><p>If I want to decide between two types of prayers e.g To pray that God should help Nigeria to have stable electricity or to pray that God bless me enough to buy a generator plus inverter plus solar. It appears that the later prayer has happened sometimes but the former is yet to materialize.</p><p>Should I focus on the kind of prayers that easily materialize and damn the type that seems far away?</p><p>Eventually, I did, but one thing is that refuses to go away is the expression of the Yoruba that Olówó kan láàrín olóṣì mẹ́fà, Olóṣì ni gbogbo wọn. (One affluent person in the midst of other 6 six people is simply a quorum of poor people).</p><p>No matter what good my prayers offer me, it is in my best interest that this good spreads that I am not the only one of the lucky few ones to be successful.</p><p>Success is enjoyable when the vast majority have it than when only a few are lucky to grab it.</p><p>We are safer from envy when a community is majorly doing well than when only a few do.</p><p>Security is better when everyone has access to opportunities for growth.</p><p>Will there always be people who are unable to meet up and not as fortunate as we do? Yes.</p><p>Is it sensible to dwell on that and care for only ourselves? No.</p><p>Are there steps we can take to ensure that the unfortunate among us are reduced to the barest minimum? Yes.</p><p>Should we go ahead and identify those things and start working on them without delay? Yes.</p><p>Let&#39;s go ahead and take steps that count that make things better for the majority.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b22fc1d3ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Undefined ‘window’ in Gatsby using Hooks]]></title>
            <link>https://sirolad.medium.com/undefined-window-in-gatsby-using-hooks-c36cbb7ef26a?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/c36cbb7ef26a</guid>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Wed, 06 Jan 2021 23:18:39 GMT</pubDate>
            <atom:updated>2021-01-06T23:18:39.574Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*L0zr_qVvD8Oog4gF6zpnbQ.png" /><figcaption>The error.</figcaption></figure><p>Having the error ‘window is not defined’ in Gatsby is not a big deal, but it might jolt newbies especially when wrapping your head around <a href="https://www.educative.io/edpresso/what-is-server-side-rendering">Server-side Rendering</a>.</p><p>You might not encounter this error on development, but when you try to build your <a href="https://github.com/gatsbyjs/gatsby">Gatsby</a> app for production, this error can pop up on your face.</p><p>This has been solved before, and the commonest way you can find it on the internet is either through the <a href="https://www.gatsbyjs.cn/docs/debugging-html-builds/#how-to-check-if-window-is-defined">debugging HTML builds</a> on the Gatsby documentation or simply calling the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window">window</a> object on <a href="https://reactjs.org/docs/react-component.html#componentdidmount">ComponentDidMount</a> lifecycle.</p><p>The problem is clear by now, the window object wants to build on your server but it not available there so you need your window to be available in your client before calling it, simple.</p><p>Sometimes, your codebase might be employing <a href="https://reactjs.org/docs/hooks-intro.html">hooks</a> instead of a <a href="https://reactjs.org/docs/state-and-lifecycle.html">lifecycle</a> method, so this blog is all about that.</p><p><em>This blog assumes you already know your way around Gatsby.</em></p><p>For example, I have a feature in my gatsby app that requires the current base URL and query parameters. In the <em>src/hooks</em> directory, I will create a file called <em>getUrlParameter.js.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0f370c2da328f00dc1da5479972b6691/href">https://medium.com/media/0f370c2da328f00dc1da5479972b6691/href</a></iframe><p>By this, the window object and some of the properties are now available and you can pass them to your components like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a4ba800e9af226072588a7416780a77/href">https://medium.com/media/1a4ba800e9af226072588a7416780a77/href</a></iframe><p>In case you want to read further regarding hooks, I found this <a href="https://dev.to/francodalessio/understanding-react-s-useeffect-hook-lbg">post</a> very useful.</p><p>That is all 👌.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c36cbb7ef26a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Other people’s commit in my Pull Request(Github)?]]></title>
            <link>https://sirolad.medium.com/other-peoples-commit-in-my-pull-request-github-afc1fa7528ea?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/afc1fa7528ea</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[pull-request]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Wed, 12 Sep 2018 17:29:53 GMT</pubDate>
            <atom:updated>2018-10-02T19:50:35.056Z</atom:updated>
            <content:encoded><![CDATA[<p>Version control makes Software development and teamwork much more productive. But sometimes, it can very challenging especially when learning the ropes. Sometimes, I encounter a problem like working on a branch for a very long time without <a href="https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase">rebasing</a> with the base branch e.g (master), only to get ready to deploy to production and get into a <em>rebase hell</em>(I am not sure there is anything like that.). It could look like something below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*E-Z4g_55oMNTPff2XB1aAA.jpeg" /><figcaption>Other commits on a PR</figcaption></figure><p>Definitely, you do not want to merge other people’s commit with yours especially when those commits are already part of the target branch(master) in this case.</p><h3><strong>Solution 1</strong></h3><p>Before now, (I should be ashamed to say I did this) I try to check into a commit of mine, then use interactive rebase over and over until everything is fine like I expected it.</p><p>An easier hack is to click on the edit button on the PR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xic9f9xXI7Zg8KoH4gH8ng.jpeg" /><figcaption>click the Edit button on the right</figcaption></figure><p>Change the target branch into any other one. Then change it back into the target branch again. There you go, all the other commits are cleared and left with yours alone.</p><h3>Caveat on Solution 1</h3><p>I am not sure if this is a bug on the side of <a href="https://github.com/">Github</a>, but as at September 2018 this hack saved my life. It could save yours too.</p><h3><strong>Solution 2</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CB8Gna2Dk8wLlZGx7HHv5w.png" /></figure><p>Squash and Merge! I just learnt about this from a colleague. This is a lot cleaner. Choose this option on the Pull request call to action button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afc1fa7528ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel 5.5 API Form Request Validation Errors]]></title>
            <link>https://sirolad.medium.com/laravel-5-5-api-form-request-validation-errors-d49a85cd29f2?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49a85cd29f2</guid>
            <category><![CDATA[laravel-5]]></category>
            <category><![CDATA[validation]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[lumen]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Mon, 18 Sep 2017 19:01:58 GMT</pubDate>
            <atom:updated>2017-09-19T10:19:19.246Z</atom:updated>
            <content:encoded><![CDATA[<p>Most of us know <a href="https://lumen.laravel.com/">Lumen</a> is more cut out for developing <a href="https://en.wikipedia.org/wiki/Application_programming_interface">APIs</a>, but we are sometimes greedy 😲😱! We do not want to miss out on some shipped goodies in <a href="http://laravel.com/docs/5.5">Laravel</a>!</p><p>Using <a href="https://laravel.com/docs/5.4/validation#creating-form-requests">Form Requests</a> is one of the ways we ensure our business logic is not bloated. But there are default behaviors you do not want to accommodate while developing an API using Laravel.</p><p>Even when we modify our global Exception handler for JSON responses similar to :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52dd625eefb916e92cd48b6199dee269/href">https://medium.com/media/52dd625eefb916e92cd48b6199dee269/href</a></iframe><p>We still don’t get respective error according to the failed validations. We can try to create an extension of the Form Requests class so that we can handle the validation errors using DRY principle like so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/997a2635a6568327b8ad66637e40efc6/href">https://medium.com/media/997a2635a6568327b8ad66637e40efc6/href</a></iframe><p>That is it! Now you can simply extend your FormRequest class, create your rules and define your authorization. So you can get your error similar to this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fed5ecafd50f2b0326c9a9423f67b51d/href">https://medium.com/media/fed5ecafd50f2b0326c9a9423f67b51d/href</a></iframe><p><em>Note : In previous versions of Laravel you need override the response() method instead of the failedValidation() method. Read more </em><a href="http://laravel.com/docs/5.5/upgrade#upgrade-5.5.0"><em>here</em></a><em>.</em></p><p><em>If you liked this, clap so other people will see this here on Medium. Also, if you have any questions or observations, use the comment section to share your thoughts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49a85cd29f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Six Easy Setups for Local PHP Development — Beginners]]></title>
            <link>https://sirolad.medium.com/six-easy-setup-for-local-php-development-beginners-cfbed13c851e?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfbed13c851e</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Thu, 27 Jul 2017 15:09:44 GMT</pubDate>
            <atom:updated>2019-10-31T05:13:57.277Z</atom:updated>
            <content:encoded><![CDATA[<p>I decided to write on this obviously <em>simple </em>topic because a lot of people still find it <em>difficult! </em>😱😳😰 These people include <em>beginners</em> who battle with a lot of difficulties just trying to <em>echo</em> their <em>hello world </em>using PHP, <em>oldies </em>who have years of experience writing PHP but have failed to migrate to <a href="http://www.phptherightway.com/">modern paradigms</a> in PHP and <em>naysayers </em>who behave as if PHP murdered a member of their family 😂.</p><p>At this point let me say, using *AMPs is old school and there are faster and easier way of setting up the lovely blue elephant 🐘.</p><p>Actually, it is just one way of setup that I would be talking about but I will be enumerating on different flavors of the one way. The one way is simply installing global installation of PHP which allows you to run PHP code everywhere on your machine, unlike the *AMPs that restrict you to the <em>boys-quarter </em>of <em>htdocs</em> and <em>www</em> folders 😜. Also, the *AMPs do not let you see that you can actually use <a href="http://www.apress.com/la/book/9781484224809">PHP beyond the web</a>.</p><p>Let’s get started …</p><p><strong>Simply install PHP globally on your Machine</strong></p><p>On a Mac, simply do:</p><blockquote>brew install php7.2</blockquote><p>On a Linux machine, simply do:</p><blockquote>sudo apt-get install php7.2</blockquote><p>On a Windows machine, simply extract the binary downloaded from <a href="http://windows.php.net/download#php-7.1">php.net</a> to your <em>C:/ </em>and remember to add it to your System’s Environment Variables.</p><p>Once that is done on respective machines, kindly run:</p><blockquote>php -v</blockquote><p>to confirm that your installation was successful. You should see a response similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*pkvH8_fvXPnJSBQWsL66Sg.jpeg" /><figcaption>Checking PHP version</figcaption></figure><p>Below are the ways you can use your PHP installation easily:</p><h4>1. Start PHP local web server</h4><p>In the root of your PHP application or file. Simply start PHP web server using:</p><blockquote>php -S localhost:8000</blockquote><p>to run your index file or specify the name of the file you simply want to run like:</p><blockquote>php -S localhost:7777 filename.php</blockquote><p>With this, you will see a response like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*y849M4ntpLa6bdrF_OQioA.jpeg" /><figcaption>Running PHP Local Web Server</figcaption></figure><p>You can easily see your pages served by visiting <a href="http://localhost:port_number."><em>http://localhost:port_number.</em></a></p><h4>2. Use PHP interactive shell</h4><p>A good number of PHP developers are not aware of this. It is simply a REPL environment to quickly run your span with some PHP code. Simply run:</p><blockquote>php -a</blockquote><p>This is an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*PLvJh-G-fkGfQ00-Vj69IA.jpeg" /><figcaption>PHP Interactive Shell.</figcaption></figure><h4>3. Using the <em>php </em>command</h4><p>Simply type <em>php </em>before a filename to execute a PHP script. Below is an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*oGw2vYVgWTWn1n0La9XjHQ.gif" /><figcaption>Using php command.</figcaption></figure><h4>4. Using Sublime Text’s Build System.</h4><p>If you use <a href="https://www.sublimetext.com/3">Sublime Text </a>editor, you can run your php script within ST3 using the Build System feature by running <em>cmd + B </em>or<em> Ctrl + B</em>. To setup build system for PHP in ST3, follow the guideline <a href="https://gist.github.com/corbanb/d0d6bdcfbd8eb455ce99">here</a>. Here is an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*rs-xrFKnuGrYQSe8un1Usw.gif" /><figcaption>ST3 PHP Build System.</figcaption></figure><h4>5. Using Atom’s Build System</h4><p>Similar to using ST3’s Build System, running PHP code within your <a href="https://atom.io/">Atom</a> editor comes out of the box. Just run <em>cmd + I </em>or<em> Ctrl + I.</em></p><h4>6. Using PHP Server within Atom</h4><p>Starting PHP server within Atom editor is easy by using this <a href="https://atom.io/packages/php-server">plugin</a>. With this, you can easily spin up your server with few keys. See example below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*u1i7oiVYamdSQ_NKvkzBZw.gif" /></figure><p>I hope you found something of benefit from this simple post.</p><p><em>If you liked this, click the💚 below so other people will see this here on Medium. Also, if you have any questions or observations, use the comment section to share your thoughts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfbed13c851e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Validating large XML data against XSD in PHP]]></title>
            <link>https://medium.com/dev-magazine/validating-xml-against-xsd-in-php-5607f725955a?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/5607f725955a</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-extraction]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Wed, 22 Mar 2017 22:31:05 GMT</pubDate>
            <atom:updated>2017-03-23T10:19:52.172Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*AwKunhZMuSu_sD0d1dRuFw.jpeg" /></figure><p>It’s 2017 and you still prefer using <a href="https://www.w3.org/XML/">XML</a>(Extensible Markup Language) to <a href="http://www.json.org/">JSON</a>(JavaScript Object Notation) for data-interchange? Well, that is not the point about this article. Everything you want to say about the trade-offs of either of them has been dealt with <a href="http://www.json.org/xml.html">here</a>. But there are still a lot of systems using XML today and I can assure you that it would still be the case <strong>X </strong>years from now.</p><p>Validating XML against XSD might be the first step to take especially when building a feed Reader/Ingester. For Starters, any file like the sample below is a well-formed XML file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48c04a59a65282b555c32692a1cd2e16/href">https://medium.com/media/48c04a59a65282b555c32692a1cd2e16/href</a></iframe><p>and below is a sample <a href="https://en.wikipedia.org/wiki/XML_Schema_(W3C)">XSD</a> (XML Schema Definition) file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6e5142de252a3008eecd3edc3346810/href">https://medium.com/media/e6e5142de252a3008eecd3edc3346810/href</a></iframe><p>Writing a XSD for your XML is actually easy to do, you make use of tools like <a href="http://www.freeformatter.com/xsd-generator.html">freeformatter</a> or do a crash course on <a href="https://www.w3schools.com/xml/schema_intro.asp">w3Schools</a>.</p><p>Now, we are ready to validate our XML file against the XSD using either <a href="http://php.net/manual/en/class.domdocument.php">DOMDocument</a> or <a href="http://php.net/manual/en/book.xmlreader.php">XMLReader</a>. First, make sure that these extensions are enabled on your PHP installation.</p><p><strong>Validating With DOMDocument</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f5bff945c12f26b2f6f842ec5354988/href">https://medium.com/media/4f5bff945c12f26b2f6f842ec5354988/href</a></iframe><p>This DomValidator can be easily used like so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52451d700818c2982cbc2430fa0ff293/href">https://medium.com/media/52451d700818c2982cbc2430fa0ff293/href</a></iframe><p>The above piece of code is actually easy to understand, the most important method here is the <em>validateFeeds()</em> method.</p><p><strong>Validating With XMLReader</strong></p><p>The upside of using XMLReader over DomDocument is scalability. XMLReader can handle very large files better than DomDocument. Our class will be very similar to that of DomDocument. Also note that your <em>libxml version</em> is above 2.6.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ad54c7448c93408319ff84e246db1e4/href">https://medium.com/media/2ad54c7448c93408319ff84e246db1e4/href</a></iframe><p>We use this class too similar to how we used the DomValidator class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8be345d1578ef1bbc2bec81889ab1ab3/href">https://medium.com/media/8be345d1578ef1bbc2bec81889ab1ab3/href</a></iframe><p>So that’s it. I hope to follow this up with ingesting feeds very soon. You can reach me on <em>surajudeen.akande@andela.com </em>for feedback, I will appreciate it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5607f725955a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dev-magazine/validating-xml-against-xsd-in-php-5607f725955a">Validating large XML data against XSD in PHP</a> was originally published in <a href="https://medium.com/dev-magazine">dotdev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Account Kit In Laravel]]></title>
            <link>https://medium.com/dev-magazine/implementing-account-kit-in-laravel-a40fbce516ad?source=rss-93d2f4742c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/a40fbce516ad</guid>
            <category><![CDATA[accountkit]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Surajudeen Akande]]></dc:creator>
            <pubDate>Sun, 18 Sep 2016 20:00:25 GMT</pubDate>
            <atom:updated>2016-09-20T05:12:26.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQUfYovMtBmbyQZJHi_piQ.png" /></figure><p>One of the fantastic tools announced by Facebook at the 2016 F8 Developer Conference is <a href="https://developers.facebook.com/docs/accountkit/">AccountKit</a>. An ideal alternative to social login. The 21st Century is made of innovations having the word ‘less’ as the suffix to fantastic ways of doing things: from Cardless Withdrawal to Wireless Communication among others, and now to Passwordless Login. It’s simple, just log in to an application with your phone number or email without any password. And it works on Web, Android and iOS appIications. I will illustrate how to make use of Accountkit in a <a href="https://laravel.com/">Laravel</a> application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*v3irymTL5qQFmvMCeOe9Ug.jpeg" /></figure><p>The steps we need to follow are itemised as followed:</p><ol><li>Create a Developer Account on Facebook.</li><li>Get Facebook App ID and configure the settings for your App.</li><li>Setup your Laravel application</li><li>Implement AccountKit.</li></ol><h4><strong>Create a Developer Account on Facebook</strong></h4><p>To create a developer account on Facebook, navigate to <a href="https://developers.facebook.com/docs/apps/register">https://developers.facebook.com/docs/apps/register</a> and click on a button that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L7SjnQp0rdFcU-8RRxCWNA.jpeg" /></figure><p>Select ‘yes’ to accept Facebook’s Policies and click on the ‘register’. Yeah it’s that simple. So we move on to the next step.</p><h4><strong>Get Facebook App ID and configure the settings for your App</strong></h4><p>Follow the rest of the steps on <a href="https://developers.facebook.com/docs/apps/register">https://developers.facebook.com/docs/apps/register</a> to get an App ID. I will add more on the config for Account kit. Navigate to the dashboard of the App you have created. Click on the Add Product button to add Account Kit to your App.</p><p><em>Note: The App secret you see on the dashboard is not the same as that of the Account Kit</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vApeCpdt1AyHS7yT9Yx6Cg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d4fZe3Vjs75Sek-pLAk0-Q.jpeg" /></figure><p>Click on ‘Get Started’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HBhfW5TVECDEcSo-eKXbNA.jpeg" /><figcaption>Select ‘Yes’ and click on ‘Get Started’</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JLUwSuBu5ew5k_-OybIkw.jpeg" /><figcaption>Copy the details marked for use in your Application and make the setting like above. Click on ‘Save Changes’</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lgb3HorBrFBmaUlTcKmcVQ.jpeg" /><figcaption>Add Server URL and other details as you desire.</figcaption></figure><p>You can also customise the interface of the phone dialog and the email to your taste. Then click on Save. With that we are done with the Accountkit setup. So let’s move to Laravel.</p><h4><strong>Setup your Laravel application</strong></h4><p>Here, I will make some assumptions and I hope that I am correct. I assume you are using <a href="https://laravel.com/docs/5.3/homestead">Homestead</a> vagrant box, as working with Laravel on Homestead is seamless. You can decide to set up Homestead or just <a href="https://laravel.com/docs/5.3/installation">install a Laravel Application</a> and use <em>php artisan serve </em>command to start up the Local Development Server. I also assume that you are using Laravel 5.3 because that is the latest version as at now. But this is easily applicable in all Laravel 5 versions. With this, We have a Laravel application, up and running.</p><h4><strong>Implement AccountKit</strong></h4><ul><li>Open <em>composer.json </em>file and add <a href="http://docs.guzzlephp.org/en/latest/">Guzzle HTTP</a> to make Http requests like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkNkgAgxsgjtVBfWyS6f0w.jpeg" /></figure><ul><li>Run <em>composer update</em></li><li>Add the APP_ID and APP_SECRET values from Facebook like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIare2DQ_vJBqxVnLESh_w.jpeg" /></figure><ul><li>Add a custom file to the <em>config </em>directory e.g <em>accountkit.php</em> like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bOBr4xPiTOtRzLn_UNgOA.jpeg" /></figure><ul><li>Create sample input fields like below in <em>resources/views/</em> directory:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pz2ttkSYz_l9-hHkj41kJA.jpeg" /><figcaption>A sample login form</figcaption></figure><ul><li>Add AccountkSDit SDK in your html like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZC-IM27Pagrx79MHqxF0oQ.jpeg" /><figcaption>AccountKit JS SDK</figcaption></figure><ul><li>Create a custom JS file in the <em>public/js </em>directory and initialize account kit like this:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bp6nU1GrthmAC196zqKVfw.jpeg" /><figcaption>Initialise AccountKit and create login functions and a callback</figcaption></figure><ul><li>Remember to add your appId to the custom <em>js</em> file.</li><li>Create a simple page to show the data returned:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywz0D8pKVuo5f66ZxmJlAA.jpeg" /></figure><ul><li>Config our routes in the <em>routes/web.php</em> file:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iWtQIkIoC5bu3HYPWNeF9A.jpeg" /></figure><ul><li>Create a controller file by running <em>php artisan make:controller MainController </em>on the terminal in the root of your application<em>:</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZKfmfKhrhGRt8am0BjRIKg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8kBy-eUW3okl82-qU76Lg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sLPCvvyjE_02JmI2rX3Llw.jpeg" /></figure><p>With all we have done so far, we have created a working Laravel application that implements AccountKit. A demo of the steps taken is live on <a href="https://lagosworkshop.herokuapp.com/">https://lagosworkshop.herokuapp.com/</a> and the code can be checked on <a href="https://github.com/andela-sakande/accountKit/">https://github.com/andela-sakande/accountKit/</a>. The slides I used in presenting this can be found on <a href="https://speakerdeck.com/sirolad/facebooks-account-kit-on-laravel">https://speakerdeck.com/sirolad/facebooks-account-kit-on-laravel</a></p><p>I hope I did not bore you. For corrections, clarifications or suggestions , you can reach me on surajudeen.akande@andela.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a40fbce516ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dev-magazine/implementing-account-kit-in-laravel-a40fbce516ad">Implementing Account Kit In Laravel</a> was originally published in <a href="https://medium.com/dev-magazine">dotdev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>