<?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 Oyinloye Ayodeji on Medium]]></title>
        <description><![CDATA[Stories by Oyinloye Ayodeji on Medium]]></description>
        <link>https://medium.com/@oyinloyeayodeji?source=rss-c3add2d123dd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OC6UE9T1rox-3Rw_5jYcqg.jpeg</url>
            <title>Stories by Oyinloye Ayodeji on Medium</title>
            <link>https://medium.com/@oyinloyeayodeji?source=rss-c3add2d123dd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 15:50:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oyinloyeayodeji/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[Tips for deploying with Kamal]]></title>
            <link>https://oyinloyeayodeji.medium.com/tips-for-deploying-with-kamal-df751517d6c0?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/df751517d6c0</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[kamal]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 21:14:42 GMT</pubDate>
            <atom:updated>2024-12-04T21:43:17.334Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2HsUnhxbxUTBxhilC-GOvQ.png" /></figure><p>You sure must have heard about the new guy on the block(Maybe not so new in technology parlance because it is just over a year old). I have been working with it recently to move <a href="https://www.repiki.com/">Repiki</a>(my pet project) from heroku to digital ocean.</p><blockquote>Shameless Plug: Need a Digital Ocean account? Use my <a href="https://m.do.co/c/a2d62858007f">Referal Code</a> to get $200 for two months</blockquote><p>Now to the tips</p><h4><a href="https://github.com/basecamp/kamal/issues">Issues are your friend</a></h4><p>Most likely someone has had the problem that you are having and as Kamal is still a pretty young deployment solution, there are teething problems so the fastest way to get an answer might be the issues.</p><p>One tricky issue that I got past(I won’t say solved) was with my environment variables not being set because I was using dotenv-rails and I expected it to pickup the variable from there but I saw from the issues that I needed to export the variables to my terminal env instead.</p><blockquote>export KAMAL_REGISTRY_PASSWORD=dckr_pasdfk883hlskdsfld</blockquote><h4>Learn the basics of containers</h4><p>Learn about how docker works because you are dealing with containers all the way. Get to know nifty commands that can help you search for problems like</p><blockquote>docker container ls — see all the current containers running</blockquote><blockquote>docker logs &lt;container-id&gt; — view the logs of different containers</blockquote><blockquote>docker rm -f $(docker ps -aq) — Stop and remove all containers in one swoop(only use this if you are working on a new host)</blockquote><p>One thing I did often was to just cleanup all the containers with the command above when “kamal setup” hit a snag. It sure helped me iterate faster.</p><h4>ChatGPT</h4><p>Yeah…You might not really get the best answers but it helps to giving perspective to a problem you are facing. I never expect the solution to my problems from it but I definitely get a different idea and sometimes an answer which would be icing on the cake.</p><p>I am still fiddling with Kamal and learning more about it. I am sure in the next couple of weeks I will be able to write a more expansive post on it and some things I learnt while using it. Till then enjoy, playing with it and building awesome products.</p><p>See you in Kamal-land.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df751517d6c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add Tailwindcss to Rails]]></title>
            <link>https://oyinloyeayodeji.medium.com/add-tailwindcss-to-rails-e959b1708b5?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/e959b1708b5</guid>
            <category><![CDATA[tailwind-css-tutorial]]></category>
            <category><![CDATA[tailwind]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Sun, 05 Jun 2022 20:23:42 GMT</pubDate>
            <atom:updated>2022-06-05T20:23:42.886Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRQTp9ABhgNngUNFHtZS7w.png" /></figure><p>Tailwindcss helps you rapidly build modern websites without ever leaving your HTML, which is something everybody<em>(okay almost everybody)</em> wants. Adding tailwindcss to your rails project is super easy if you are interested in the promise of never leaving you HTML.</p><p>First add tailwind to your Gemfile via the console, run;</p><pre>./bin/bundle add tailwindcss-rails</pre><p>This will add gem “tailwindcss-rails” to your Gemfile</p><p>Secondly, run;</p><pre>./bin/rails tailwindcss:install</pre><p>This command does a couple of things to our app.</p><p>It adds</p><ul><li><em>“app/assets/stylesheets/application.tailwind.css”</em> which is where the base classes for tailwind is imported and allows you to define some of your own defaults.</li><li><em>&lt;%= stylesheet_link_tag “tailwind”, “inter-font”, “data-turbo-track”: “reload” %&gt;</em> and a <em>‘main’ </em>html tag to surround our yield tag which renders the page</li><li>a configuration file at <em>“config/tailwind.config.js”</em></li><li>a <em>“Procfile.dev”</em> which contains commands to start the rails server and also watch tailwindcss for any changes in the project so it can effectively reload the css.</li><li>a <em>“bin/dev”</em> file which runs a bash command to check if Foreman exists in the hosts local gemset and installs Foreman if it isn’t already installed.</li></ul><p>That sums up how tailwindcss gets from the wind into a rails project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e959b1708b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding Recaptcha to a Ruby on Rails Application]]></title>
            <link>https://oyinloyeayodeji.medium.com/adding-recaptcha-to-a-ruby-on-rails-application-5876a3d6600?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5876a3d6600</guid>
            <category><![CDATA[google-recaptcha]]></category>
            <category><![CDATA[recaptcha]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby-on-rails-development]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Mon, 02 Nov 2020 02:22:47 GMT</pubDate>
            <atom:updated>2020-11-02T02:27:48.768Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dILJUNOke10IR-FXEeftiA.png" /></figure><p>Are you a robot?</p><p>This has become a classic question on the internet when filling forms. And has become super easy to implement in rails with the Recaptcha gem.</p><p>For the Video Tutorial of this writing visit — <a href="https://youtu.be/MiZG5zcHjaI">Youtube</a></p><p>For the Final Code, <a href="https://github.com/itzbernoulli/recaptcha_tutorial.git">Github</a></p><h4>Let&#39;s Get Started</h4><p>Setup Application</p><p>For this tutorial, I will be using the <a href="https://github.com/ambethia/recaptcha">recaptcha</a> gem and <a href="https://github.com/bkeepers/dotenv">dotenv</a> gem</p><pre>gem ‘dotenv-rails’, groups: [:development, :test]</pre><pre>gem ‘recaptcha’</pre><p>Now, let&#39;s instantiate the rails application that we will be using as our test subject. Incidentally, we will also call it test_app. Run the following commands in your terminal.</p><pre>rails new test_app</pre><pre>rails g scaffold User firstname lastname email</pre><pre>rails db:create db:migrate</pre><p>Step 2</p><p>Visit <a href="https://www.google.com/recaptcha/admin/create">https://www.google.com/recaptcha/admin/create</a> to create the needed credentials. You should see a semblance of the page below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xjYidd7CNwxL_rsfzWDYQw.png" /><figcaption>Google Recaptcha Page</figcaption></figure><p>That is my configuration on the google admin page. On submitting, you get a page with your SITE_KEY and SECRET_KEY.</p><p>Create a .env file at the root of the project that will be used by dotenv-rails gem to load the environment variables when we are in development mode. Drop in the credentials into the .env file and we are good to go.</p><pre>RECAPTCHA_SITE_KEY:6Lc6BAAAAAAAAChqRbQZcn_yyyyyyyyyyyyyyyyy</pre><pre>RECAPTCHA_SECRET_KEY:6Lc6BAAAAAAAAKN3DRm6VA_xxxxxxxxxxxxxxxxx</pre><p>Step 4</p><p>Add recaptcha tags to the form of the user scaffold at any position you will like to have it displayed. It is usually best displayed right before the submit button.</p><pre>&lt;%= form_for @foo do |f| %&gt;</pre><pre># …</pre><pre>    &lt;%= recaptcha_tags %&gt;</pre><pre># …</pre><pre>&lt;% end %&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_v6TksTEXbaHpLfnzo5YkA.png" /><figcaption>Result of recaptcha tags in the form</figcaption></figure><p>Step 5</p><p>Verify recaptcha in your controller</p><pre>@user = User.new(params[:user].permit(:name))</pre><pre>    if verify_recaptcha(model: @user) &amp;&amp; @user.save</pre><pre>        redirect_to @user</pre><pre>     else</pre><pre>        render ‘new’</pre><pre>     end</pre><p>And we are good to go. You have Recaptcha rolling already.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5876a3d6600" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Tests In Rails With RSpec]]></title>
            <link>https://oyinloyeayodeji.medium.com/setting-up-tests-in-rails-with-rspec-a00e341eec71?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a00e341eec71</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[rspec]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Sat, 08 Aug 2020 22:11:50 GMT</pubDate>
            <atom:updated>2020-08-08T22:11:50.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXN5J_-BJL0soYR5j9DqSA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@antoine1003?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Antoine Dautry</a> on <a href="https://unsplash.com/s/photos/software-test?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You love that confidence you have when your codebase is well tested? Yeah me too.</p><p>Did it a couple of times and didn’t want to go around trying to remember the whole process so I wrote this for future me. So sit back and enjoy my note to future me.</p><p>This process covers RSpec because that is what I use. I will give Cucumber and Minitest a shot(sometime later in the future) to see the full setup cycle.</p><p>Gems to add</p><pre>gem ‘rspec-rails’, ‘~&gt; 4.0.0’</pre><pre>gem ‘factory_bot_rails’</pre><pre>gem ‘faker’, :git =&gt; ‘https://github.com/faker-ruby/faker.git&#39;, :branch =&gt; ‘master’</pre><pre>gem ‘shoulda-matchers’, ‘~&gt; 4.0’</pre><pre>gem ‘simplecov’</pre><h3>Raison d’être — Reasons to be</h3><p><em>so why all these gems to start with?</em></p><p><strong>Factory_bot_rails</strong> — Gives us a nifty template to churn out as many objects that we need and allows the flexibility of changing objects at will. Think of Tesla without a factory?? How will they produce the millions of Model they plan to ship?</p><p><strong>Faker</strong> — gives you access to a repository of realistic-fake data for you to populate your database with, so it doesn’t look malnourished.</p><p><strong>Shoulda-matcher</strong>s — enables one-line statements to execute your tests. Pretty smooth</p><p><strong>Simplecov</strong> — wanna know how covered your codebase is with tests? This is your plug. It is a code coverage analysis tool for ruby. Make sure you are not missing any component of your app.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F7MZ0v9KynmiSA%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftest-testing-expected-7MZ0v9KynmiSA&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2F7MZ0v9KynmiSA%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="254" frameborder="0" scrolling="no"><a href="https://medium.com/media/7cf753d8eb74f7e48be214fdbacb48e8/href">https://medium.com/media/7cf753d8eb74f7e48be214fdbacb48e8/href</a></iframe><p>When all the gems are safely in your Gemfile, run</p><pre>$bundle install</pre><h3>Generators</h3><pre>$rails generate rspec:install</pre><p>Generate Rspec boilerplate configuration files below</p><pre>.rspec</pre><pre>spec</pre><pre>spec/spec_helper.rb</pre><pre>spec/rails_helper.rb</pre><pre>$rails generate rspec:model user</pre><p>Generates boilerplate code(factory and spec files) for the user model if it already exists. If it doesn’t exist, on generating your new model, the necessary spec files are automatically added to your spec folder</p><h3>Configurations</h3><p>Add the following configuration setting to the bottom of <em>rails_helper.rb</em></p><p>This sets up shoulda_matchers to start matching</p><pre>Shoulda::Matchers.configure do |config|</pre><pre>    config.integrate do |with|</pre><pre>        with.test_framework :rspec</pre><pre>        with.library :rails</pre><pre>    end</pre><pre>end</pre><p><a href="https://github.com/thoughtbot/shoulda-matchers#activerecord-matchers">Reference Link for Matchers</a></p><p>Next, make FactoryBot syntax easier to type and also easier on the eyes by eliminating the need to always have <em>FactoryBot </em>before all your commands. This config allows you to do</p><pre>create(:user)<br>build(:user)</pre><p>instead of</p><pre>FactoryBot.create(:user)<br>FactoryBot.build(:user)</pre><p>so add it and save yourself some precious time.</p><pre>config.include FactoryBot::Syntax::Methods</pre><h3>What to Test</h3><p>For now, this is a list of what I test for. The list will surely expand as I consider more edge cases but use this as a primer.</p><h4>Model Tests</h4><p><strong>Validations</strong></p><ul><li>test each validation</li><li>test valid object</li><li>test invalid object</li></ul><p><strong>Associations</strong></p><ul><li>test that associations exist</li></ul><p><strong>Scopes</strong></p><p>make sure your scope returns the expected result. One way to do that is to;</p><ul><li>create dummy objects</li><li>add the some with the conditions you are testing for</li><li>add some without the conditions you are testing for</li><li>check the result count if it is what is expected or</li><li>drill into the result to check the object the scope returns to be double sure although it might not be necessary</li></ul><p><strong>Test other private methods</strong></p><h4>Controller Tests</h4><p>CRUD Test — Make sure all your controller methods give back the response code you expect them to give int different scenarios</p><h4>System Test</h4><p>Draft user stories or success paths and write tests to make sure the full cycle works and they are crash-proof.</p><p>If you got this far, then feel free to follow me on twitter <a href="https://twitter.com/itzbernoulli">@itzbernoulli</a></p><p>and</p><p>if there is any Ruby on Rails role available preferrable Remote, don’t be shy to let me know. My transfer window is currently open.</p><p>Keep Testing and increasing code-fidence 😉 😉</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3xz2BzIY0GXnOX4mFG%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmodel-naomi-campbell-catwalk-3xz2BzIY0GXnOX4mFG&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2F3xz2BzIY0GXnOX4mFG%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="268" frameborder="0" scrolling="no"><a href="https://medium.com/media/be05d71600e99ca5c762e4b892260d16/href">https://medium.com/media/be05d71600e99ca5c762e4b892260d16/href</a></iframe><p>Cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a00e341eec71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java Keywords and Descriptions]]></title>
            <link>https://oyinloyeayodeji.medium.com/java-keywords-and-descriptions-3fc2f97037bd?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fc2f97037bd</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[java8]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Fri, 10 Apr 2020 08:46:01 GMT</pubDate>
            <atom:updated>2020-04-10T09:04:27.650Z</atom:updated>
            <content:encoded><![CDATA[<p>I was surfing 🏄 the internet to work on my Java skills and I landed on a page with a list of java keywords and I got curious to see if I could actually adequately explain all of them in the simplest forms without losing meaning…So I took a swing at it. I obviously fell short in some and spied the information superhighway but it’s all good we learn every day. Here it is. Enjoy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1beYojgomyz3FLs0R0vjEQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Caspar Camille Rubin</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>There are 51 reserved words in Java that your compiler will cry foul when you try to use as a variable here is a list and a short description</p><p><strong>1 abstract</strong> — is a class modifier that indicates a class has abstract methods i.e methods that do not have a body.</p><p><strong>2 assert</strong> — is used to declare an expected boolean condition in a program.</p><p><strong>3 boolean </strong>— is a primitive type which takes the value of true or false. It is used in conditional statements to verify the state of an object.</p><p><strong>4 break</strong> — is a statement used in loops to end the loop or terminate the program construct. So based on if a condition is met or not you can end your loop and go back to your normal program flow.</p><p><strong>5 byte </strong>— is an 8-bit signed datatype ranging from -128 to 127.</p><p><strong>6 case</strong> — is used to specify conditions in a switch statement.</p><p><strong>7 catch</strong> — is used in a try block. It handles the code execution when an error or exceptions occurs in a try block.</p><p><strong>8 char</strong> — this is a primitive datatype used to declare single characters.</p><p><strong>9 class</strong> — A class is a blueprint or model of an object to be created.</p><p>💀<strong>const</strong> — const gives read-only access to a variable. Unfortunately, it is no longer used in java as the “final” keyword is now being used. So we have a keyword gathering dust in the store.</p><p><strong>10 continue</strong> — it makes the loop skip one iteration and jump to the next iteration.</p><p><strong>11 default</strong> — is used to specify the fail-safe condition in a switch statement after all cases have not been met.</p><p><strong>12 do</strong> — is used with a while keyword to run a block of statements until a condition is true. The block of code is run first before checking condition.</p><p><strong>13 double</strong> — is a primitive datatype used to store decimal numbers that have a precision higher than the float. It is a double-precision number format that occupies 64-bits in memory. It can store decimal digits maximum of 15–16 digits i.e 0.1234567890123456</p><p><strong>14 else</strong> — is used to specify the fail-safe condition in an if or ‘else if’ block after all conditions have not been met.</p><p><strong>15 enum</strong> — is a datatype which contains a group or fixed set of constants. They are static and final implicitly e.g days of the week or months of the year should be used as enums.</p><p><strong>16 extends</strong> — this is used when a child wants to determine who the parent is. A child class inherits the properties and attributes of a parent class by extending the parent class with the extend keyword.</p><p><strong>17 false</strong> — is the default value of a boolean primitive datatype. It is also one of two values a boolean can assume.</p><p><strong>18 final </strong>— the coup d’etat master. Took over from const in defining variables with “read-only access”. Once set, a variable marked as final cannot be modified.</p><p><strong>19 finally</strong> — This is used in conjunction with the try-catch block. Code within finally will run after either try or catch has run. Hence code in finally will always run. Marriage commitments should use ‘till death do us part’ in the finally block so there won’t be divorces no more. 💑 👫</p><p><strong>20 float</strong> — is a primitive datatype used to store decimal. It is a single-precision number format that occupies 32-bits in memory. It can only store decimal digits maximum of 7 digits i.e 0.1234567</p><p><strong>21 for</strong> — is used to run a block of code for a specified number of iterations.</p><p>💀<strong>goto</strong> — a jump statement that redirects the program flow to another line specified but isn’t used in java anymore. I guess nothing lasts forever. 💀 💀</p><p><strong>22 if</strong> — is the almighty conditional statement. It is used to verify if a given condition is true or false.</p><p><strong>23 implements</strong> — is used to add an interface to a class.</p><p><strong>24 import</strong> — makes external dependencies and packages available to use in the current source file so that classes can be used just by calling their names.</p><p><strong>25 instanceof</strong> — is used for checking if a reference variable is containing a given type of object reference or not.</p><p><strong>26 int</strong> — is a 32-bit signed integer datatype ranging from -2³¹ to 2³¹-1.</p><p><strong>27 interface</strong> — is a totally abstract class i.e all method bodies are empty and any class that implements the interface has to define those methods.</p><p><strong>28 long</strong> — is a 64-bit signed integer datatype ranging from -2⁶³ to 2⁶³-1</p><p><strong>29 native</strong> — It marks a method that will be implemented in other languages, not in Java. It works together with JNI (Java Native Interface).</p><p><strong>30 new</strong> — this keyword is used to instantiate or create an instance of an object.</p><p><strong>31 null</strong> — this indicates when an object has not been instantiated. If you have not created it, then it doesn’t exist. Simple.</p><p><strong>32 package</strong> — is used to encapsulate or group similar classes.</p><p><strong>33 private</strong> — one of four access modifiers which enables access to attributes or methods within the defining class alone.</p><p><strong>34 protected</strong> — this is one of four access modifiers which enables only other classes in the same package to access its properties or attributes.</p><p><strong>35 public</strong> — this is one of four access modifiers which enables the class, attribute or methods to be accessed within the package and from external packages.</p><p><strong>36 return</strong> — used in methods that give back a value at the end of execution. The return statement is usually the last statement in such methods to show the end of code execution.</p><p><strong>37 short</strong> — is a 16-bit signed integer datatype ranging from -²¹⁵ to ²¹⁵-1.</p><p><strong>38 static</strong> — is used to indicate a class member can be used before or without the class being instantiated.</p><p><strong>39 strictfp</strong> — is used to force the precision of floating-point calculations (float or double). It can be used with classes, interfaces and methods.</p><p><strong>40 super</strong> — is used in the child class to call properties or methods from the immediate parent class.</p><p><strong>41 switch</strong> — is a control structure that can be used to replace the if …else block. The switch statement is more syntactically juicy.</p><p><strong>42 synchronized — </strong>is used to prevent different threads from accessing the same resource simultaneously thereby locking the resource to external modification until one thread is finished before passing control to another thread.</p><p><strong>43 this </strong>— is a reference type that refers to the current object. 👈</p><p><strong>44 throw</strong> — is used to throw an exception.</p><p><strong>45 throws</strong> — is used in method signatures to say “hey, I might do ABC so implement a try-catch block to handle me”. This will mostly be needed when doing abstractions and you want to ensure the caller is safely implementing by preparing for exceptions.</p><p><strong>46 transient</strong> — is used to indicate a member variable is not to be serialized.</p><p><strong>47 true</strong> — it is one of two values a boolean primitive datatype can assume.</p><p><strong>48 try</strong> — is used to define a block of code to be tested for errors while it is being executed.</p><p><strong>49 void</strong> — indicates a method that does not return a value.</p><p><strong>50 volatile</strong> — is used as an indicator to the Java compiler to never cache the variable but the compiler should always read the variable from main memory.</p><p><strong>51 while</strong> — is used to run a block of statements until a condition is true. This is different from the do-while as it checks the condition first before executing the code block.</p><p>There they are…The 51 musketeers 😀 😀 modifications are always welcome.</p><p>If you ❤️ this post please feel free to 👏 👏 👏 till those hands on the medium clap icon ache. 😉😉</p><p>You can follow me on Twitter and Instagram: @itzbernoulli</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fc2f97037bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Return A Response for Android Volley When Using WorkManager]]></title>
            <link>https://oyinloyeayodeji.medium.com/return-a-response-for-android-volley-when-using-workmanager-e030ecda4dd4?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/e030ecda4dd4</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[workmanager]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[synchronous]]></category>
            <category><![CDATA[volley]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Thu, 07 Nov 2019 19:21:47 GMT</pubDate>
            <atom:updated>2019-11-07T19:21:47.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flIZ4WoJ1tj3Gsb04OKVZQ.png" /></figure><p>While developing my app <a href="https://play.google.com/store/apps/details?id=com.turdla.www.afrolang">Afrolang</a>: a bite-sized African language learning app. I ran into a scenario where I needed the result of my Volley Request to be the success or failure result of my Work Manager. Work Manager in itself creates a separate thread to run its operation when the system resources are available and Volley library also spins up a new thread to make a network call. Putting an Async process into another creates two separate processes that do not wait for each other and this can make using Volley in a WorkManager a bit confusing. This post profers a solution and assumes you are familiar with Work Manager and Volley. If you are not, click these links to learn more about <a href="https://developer.android.com/topic/libraries/architecture/workmanager">work manager</a> and <a href="https://developer.android.com/training/volley">volley</a></p><p>The link to a demo of the project on GitHub is below</p><p><a href="https://github.com/itzbernoulli/VolleyRequestFuture">VolleyRequestFuture</a></p><h3>Introducing Volley RequestFutures</h3><p>A RequestFuture is used to make a synchronous HTTP Request using volley.</p><p>Setup your Volley Singleton in <em>VolleySingleton.java</em></p><pre>private static VolleySingleton <em>mInstance</em>;<br>private RequestQueue mRequestQueue;<br>private static Context <em>mContext</em>;</pre><pre>private VolleySingleton<em>(</em>Context context<em>){<br>    mContext </em>= context;<br>    //Get the requiest queue<br>    mRequestQueue = getmRequestQueue<em>()</em>;<br><em>}</em></pre><pre>public static synchronized VolleySingleton getmInstance<em>(</em>Context context<em>){<br>    </em>//If instance is null then initialize new instance<br>    if<em>(mInstance </em>== null<em>){<br>        mInstance </em>= new VolleySingleton<em>(</em>context<em>)</em>;<br>    <em>}<br>    </em>//Return MySingleton new instance<br>    return <em>mInstance</em>;<br><em>}</em></pre><pre>public RequestQueue getmRequestQueue<em>() {<br>    </em>//If RequestQueue is null the intialize new RequestQueue<br>    if<em>(</em>mRequestQueue == null<em>){<br>        </em>mRequestQueue = Volley.<em>newRequestQueue(mContext</em>.getApplicationContext<em>())</em>;<br>    <em>}<br>    </em>return mRequestQueue;<br><em>}</em></pre><pre>public<em>&lt;</em>T<em>&gt; </em>void addToRequestQueue<em>(</em>Request<em>&lt;</em>T<em>&gt; </em>request<em>){<br>    </em>//Add the specified request to the request queue<br>    getmRequestQueue<em>()</em>.add<em>(</em>request<em>)</em>;<br><em>}</em></pre><p>Setup your worker in <em>TestWorker.java</em>, extend <em>Worker</em> and slot in your request within a Volley RequestFuture</p><pre>private static final String <em>TAG </em>= TestWorker.class.getSimpleName<em>()</em>;<br>private String url = &quot;https://jsonplaceholder.typicode.com/todos/1&quot;;<br>public TestWorker<em>(</em>@NonNull Context context, @NonNull WorkerParameters workerParams<em>) {<br>    </em>super<em>(</em>context, workerParams<em>)</em>;<br><em>}</em></pre><pre>@NonNull<br>@Override<br>public Result doWork<em>() {</em></pre><pre><em>//Setup a RequestFuture object<br>   </em>RequestFuture<em>&lt;</em>JSONObject<em>&gt; </em>future = RequestFuture.<em>newFuture()</em>;</pre><pre>//Pass the future into the JsonObjectRequest    <br>JsonObjectRequest request = new JsonObjectRequest<em>(</em>Request.Method.<em>GET</em>, url, null, future, future<em>)</em>;</pre><pre>//Add the request to the Request Queue</pre><pre>VolleySingleton.<em>getmInstance(</em>getApplicationContext<em>())</em>.addToRequestQueue<em>(</em>request<em>)</em>;</pre><pre>    try <em>{</em></pre><pre><em>//Set an interval for the request to timeout. This will block the //worker thread and force it to wait for a response for 60 seconds //before timing out and raising an exception</em></pre><pre>JSONObject response = future.get<em>(</em>60, TimeUnit.<em>SECONDS)</em>;</pre><pre>//Log Response and return Result.success() or your output data to //any observer<br>        Log.<em>d(TAG</em>, response.toString<em>())</em>;<br>        return Result.<em>success()</em>;<br>    <em>} </em>catch <em>(</em>InterruptedException e<em>) {<br>        </em>e.printStackTrace<em>()</em>;<br>        // exception handling<br>        return Result.<em>failure()</em>;<br>    <em>} </em>catch <em>(</em>ExecutionException e<em>) {<br>        </em>e.printStackTrace<em>()</em>;<br>        return Result.<em>failure()</em>;<br>        // exception handling<br>    <em>} </em>catch <em>(</em>TimeoutException e<em>) {<br>        </em>e.printStackTrace<em>()</em>;<br>        return Result.<em>failure()</em>;<br>    <em>}<br>}</em></pre><p>Call it wherever you need it. For testing purposes, I will call mine in <em>MainActivity.java</em></p><pre>@Override<br>protected void onCreate<em>(</em>Bundle savedInstanceState<em>) {<br>    </em>super.onCreate<em>(</em>savedInstanceState<em>)</em>;<br>    setContentView<em>(</em>R.layout.<em>activity_main)</em>;</pre><pre>    OneTimeWorkRequest oneTimeWorkRequest = new     OneTimeWorkRequest.Builder<em>(</em>TestWorker.class<em>)</em>.build<em>()</em>;<br>    WorkManager.<em>getInstance()</em>.enqueue<em>(</em>oneTimeWorkRequest<em>)</em>;<br><em>}</em></pre><p>If this was helpful, feel free to clap as many times as you deem fit.</p><p>I always love new friends so you can follow me on twitter <a href="https://twitter.com/itzbernoulli">@itzbernoulli</a></p><p>Cheers</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e030ecda4dd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Historic Tension Between Strength and Safety]]></title>
            <link>https://oyinloyeayodeji.medium.com/the-historic-tension-between-strength-and-safety-efd67fc9294d?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/efd67fc9294d</guid>
            <category><![CDATA[church-leadership]]></category>
            <category><![CDATA[christianity]]></category>
            <category><![CDATA[church]]></category>
            <category><![CDATA[church-and-christian-life]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Sat, 19 Jan 2019 06:06:30 GMT</pubDate>
            <atom:updated>2019-01-19T06:06:30.505Z</atom:updated>
            <content:encoded><![CDATA[<p>NOTE: This is a message preached by Bishop Wayne Malcolm at House On The Rock. I just felt I was too awesome to not share it with the world.</p><blockquote>Prov 18:16 A man’s gift maketh room for him, and bringeth him before great men.</blockquote><p>The gift and calling of God are like two sides of a coin, they are inseparable for he has not called anyone he has not gifted and he has not gifted anyone he has not called. So, in essence, your gift is a calling. In the day you discover your unique gifting and start deploying it to serve mankind, it brings you into the Arena of Greatness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UaXIHPM08g2g6hyf4dIaOQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/_r4DM9jIaKY?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">rawpixel</a> on <a href="https://unsplash.com/search/photos/meeting?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Greatness is that level where you have mastered your craft and converted your talent to a skill. We look at people in the arena of greatness and gaze at them aspiring to be one of them or be like them one day. We gaze at them and sigh saying “one day that’s going to be me”</p><p>But one rude discovery we always come across in the end is that,The arena of greatness is not a safe place. We spend our lives getting out of the fish bowl to go into the ocean then we discover that there are sharks, killer whales, sting rays and all sorts of predators in the ocean.</p><blockquote>The arena of greatness is not a safe place. We spend our lives getting out of the fish bowl to go into the ocean then we discover that there are sharks, killer whales, sting rays and all sorts of predators in the ocean.</blockquote><p>If Security is your highest priority or value, you have nothing doing searching or aspiring to be great for you will not survive the arena of greatness. The moment you get to the top, you become the topic of many conversations.</p><blockquote>The moment you get to the top, you become the topic of many conversations.</blockquote><p>You will meet haters, talebearers, treachery, abandonment, rejection, naysayers, backbiters and it usually doesn’t come from the expected corners but from the places you least expect it from. So, since the arena of greatness is not a safe place, then we need to become strong.</p><blockquote><em>Since the arena of greatness is not a safe place, then we need to become strong.</em></blockquote><blockquote>Luke 10:3 <em>Go! I am sending you out like lambs among wolves.</em></blockquote><p>What this means is Jesus saying I am sending you into toxicity, violence, a predatory environment, an environment filled with hostility, hate and backstabbing. As you well know, lambs are utterly defenceless creatures with no strength, no fangs, no horns, no weapon of defence whatsoever, so when Jesus says “I am sending you out like lambs among wolves” he simply means without me, you don’t stand a chance.</p><p>That is why David wrote in</p><blockquote>Psalm 23:4 Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.</blockquote><p>because he came to this realization that God is my only comfort meaning the only comfort I get is the comfort that God is with me and He has the tools to fight off my enemies. That was David’s coping mechanism. Simply knowing God was with him.</p><p>Not everyone gets to work in the church where there are nice people all around, people always saying nice things about God, speaking in tongues, singing songs of worship…. Some folks have to go out on Mondays to work in hostile environments, where they don’t get to pick their co-workers, an environment laden with profanity, an environment where people have no regard for God and where people hold different ideals. Some folks leave the church and head back to a house full of aggression and strife. Or if not a house what about the community filled with so many vices?</p><p>In essence our Monday, Tuesday, Wednesday, Thursday, Friday, Saturday are usually utterly different from our reality on Sunday when we go to church which is always spiritually safe.</p><p>But on a Monday we need to be very strong.</p><p>On Tuesday, we need to be strong.</p><p>On Wednesday, we need to be strong.</p><p>On Thursday, we need to be strong.</p><p>On Friday, we need to be strong.</p><p>On Saturday, we need to be strong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_ZXSWrusHYR6N9UDV5kUw.jpeg" /></figure><p>This causes a tension, a tension between being safe and being strong.</p><p>The ministry or the leaders of the church are at a crossroad of deciding whether to keep the church safe or to make the church strong.</p><p>Those who think their primary role is to keep the church safe are coming up with rules and commandments more than 613 of them so as to shield the church from the big bad ugly world but there are others who are making the church strong and are saying you know what, the big bad ugly world is real, you are going to go into it on Monday, we aren’t going to be with you but God is going to be with and you are going to have to be a stronger person because there is only so far we can keep you safe.</p><p>So on a Sunday, we need spiritual safety and security but on Monday we need strength. The sounds at work are not the same sounds being played in church, the tongues are a different one from what you hear in church. When the benediction and the last Amen are said we head back into a world we would rather not go back to. This tension between safety and strength is perhaps the most ancient tension and it started right in the Garden of Eden.</p><blockquote>The Big Question: Do we keep you safe or do we make you strong?</blockquote><p>We know that the land of Eden was a vast land and we know that the garden of Eden was planted by God eastward in Eden. So Eden is not the Garden neither is the Garden all of Eden. The Garden is a space within a wider territory. And God put man in the Garden he planted. It was a safe place. The difficult piece to believe is that the garden of Eden was surrounded by a wall. It was never said that it was a visible nor physical wall, nor was it said to be made of bricks but we can be pretty sure there was at least a boundary separating the Garden from the rest of Eden. We also know an angel was posted at the entrance to prevent Adam from coming back into the Garden. So it’s logical to conclude that if you have an entrance, then there definitely are boundaries of some sort.</p><p>So this is a safe place because it’s walled be it a visible or invisible wall.</p><p>Interestingly when people build walls they build walls to keep danger out. When you build walls you build it to protect what is inside from what’s outside. We do not know how big or small the wall was but we know there was some protection for Adam and Eve and they were safe. Yet we discover that the biggest threat to their life was not coming from something outside the wall. The biggest threat to their lives was coming from something that was in their midst, from a snake that was inside the Garden.</p><p>When you begin to look at your life you discover that the biggest threat is not coming from anything outside the walls you have built to protect yourself it is coming from something that is inside.</p><blockquote>So now we get the tension. Do we build bigger walls or do we build bigger people? Do we pick safety or do we pick strength?</blockquote><p>If we build bigger walls it will protect us from what is outside but not from what is inside. If we build bigger people, a bigger person will be able to say to the serpent “hold on buddy, you are sounding very contrary right now. That is not what God said.”</p><p>God is in the business of building bigger people because there some places you will go and there is simply nothing the church can do to protect you. You will simply have to become a stronger person to be able to deal with the realities and eventualities of your life.</p><h4>A Familiar Tension</h4><p>Every one of us has been through this tension of safety vs strength in our natural maturation from childhood to adulthood. It was probably more intense for some than the others.</p><p>We are born into a safe place where we are protected, fed, nurtured, catered for, everything is done for us and we are never alone. All we need to do is cry and someone comes to our attention. That is the environment in which we are born and the first few years of our life, we are raised that way.</p><p>But then something happens called your first day at school. Momma takes you to a room and hands you over to a stranger that you do not know and you do not trust and now she is turning her back and walking away. It dawns on you that this is a different situation… Some even express this dawning realization in tears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*zx6TVjRk_t6fDJuNUKQdBQ.jpeg" /><figcaption>Credit: Akhila Das Blah</figcaption></figure><p>You were safe at home but now you have to be strong.</p><p>Now you’ve got to navigate other children, some of them like you while some don’t, some of them are trying to rob you while some are trying to hurt you. Now you are on your own as a little child and momma has gone.</p><p>You have to be strong.</p><p>Then after a while, you get to know people in school, you make friends, work together, play together and then you become safe again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*XBupoh3ixIBjkIo31uZa2w.jpeg" /><figcaption>Credits: Lupinamy</figcaption></figure><p>But Safety just doesn’t last so long. You are done with school and have to head out into the workplace. Your school teacher is not with you, your school friends are not with you, you are having to work into a new space and navigate it. Now you have to be strong again.</p><blockquote>The true price of strength is your security.</blockquote><p>You need to give up your security in order to find strength and you need to give up your strength to become secure. The true price of strength is your security.</p><p>To further elucidate and bring it home, there comes a point where mothering is no longer mothering but becomes smothering. When a child is smothered meaning they are overprotected, they are not getting stronger they are getting weaker. So the price of making someone feel absolutely safe is that you are robbing them of strength.</p><p>In the maturation of a child there comes a point where helping is hindering the growth of a child. So when you are born, momma puts the food in your mouth, and as you go along and eat more solid food, she picks it up and puts it in your mouth. And then there comes a turning point day when conversations like this breakout:</p><blockquote>You: Momma, where is the food</blockquote><blockquote>Mother: the food is on the table in a bowl and next to it is a spoon. You gotta start eating your food by yourself. What I used to do for you, you now do for yourself.</blockquote><p>And if she wants the child to grow really strong she allows him to throw a temper tantrum and cry it all out. Notice what is happening now, she is taking away the security so that the child can become a little bit stronger. Now as the years go on the child walks in and another conversation ensues:</p><blockquote>You: Yo Momma, where is the food?</blockquote><blockquote>Momma: The food is in the fridge or in the cupboard.</blockquote><blockquote>You: What? You mean you are not cooking it for me?</blockquote><blockquote>Momma: No, I’m not because you need to learn how to cook it yourself.</blockquote><p>Then yet another day comes when another conversation breaks out:</p><blockquote>You: Where is the food?</blockquote><blockquote>Momma: The food is in the shop. You go and buy it.</blockquote><p>And she gives you the money to get the food from the food vendor. As time goes on and you say Momma, where is the food?</p><blockquote>She’s going to say it’s in the shop</blockquote><blockquote>You’re gonna ask where is the money?</blockquote><blockquote>She’s gonna say it’s in your Job. You get out and work, find you some money and get the food.</blockquote><p>That is why virtually the same day the children of Israel crossed the Jordan and entered into the promised land, the pillar of cloud and the pillar of fire disappeared. Virtually the same day the manna stopped falling from heaven. Virtually the same day their shoes stopped growing with their feet and their clothes stopped growing with their stature. Virtually the same day all the benefits enjoyed with Moses were gone under Joshua’s leadership.</p><p>Why?</p><p>Because Moses presided over a baby nation called Israel.</p><p>The parting of the Red Sea was a metaphoric parting of water and birth of a baby. What came out on the other side of the red sea was a baby. And all they knew how to do was cry.</p><p>But when Joshua took over his job was not to babysit a nation but to raise an army and transform a country. You can’t keep feeding people who are old enough to feed themselves. You can’t keep clothing people who are old enough to cloth themselves. So the withholding of those miracles was God’s way of saying. I kept you safe in the wilderness now you are in the promised land and you have to become strong, you have to become intelligent, you have to become creative, you have to become industrious, you have to become disciplined, you have to organize, plan and make things happen because I am not doing it for you.</p><blockquote>I kept you safe in the wilderness now you are in the promise land and you have to become strong, you have to become intelligent, you have to become creative, you have to become industrious, you have to become disciplined, you have to organize, plan and make things happen because I am not doing it for you.</blockquote><h3>The story of your life</h3><blockquote>Matthew 15:26 But he answered and said, It is not meet to take the children’s bread, and to cast it to dogs.</blockquote><p>You will notice that the Genesis or beginning of any move of God is characterized by multiple miracles. Lots of miracles at the early stage then they fizzle out. And there is a reason why it fizzles out. It is the story of your life. There was a time in your life that you will go to sleep in one place and wake up in another. How miraculous was that? There was a time in your life when you were hungry and food ended up in your mouth miraculously. There was a time when you messed up real bad and pooed all over your body and miraculously you were cleaned up in no time. And if we could have interviewed you at that stage of your life and asked “ brother how are you doing right now? You would have responded listen I am living in a realm of the miraculous. When I am hungry I am fed, when I mess up I am cleaned. It’s is absolutely supernatural. I also experience the miracle of transportation… I sleep in one place and wake up in another place and don’t even know how I got there.</p><p>But if we interview you 10 years later, it seems like those miracles are gone. Then you have the options of either going to prayer meetings binding and casting the devil or you can wake up and say perhaps he has withheld these miracles for a reason because now I can do for myself what God used to do for me.</p><h4>The Eagle Analogy</h4><p>Eagles are born safe because mama eagle creates a safe place for nesting. Then in the coming weeks, she goes out and grabs food rips it up and put the food in the eaglet&#39;s beak.</p><p>A day comes when mama comes home with nothing in her beak, nothing in her claws and a strange look in her eyes, then the baby eaglets get scared. Momma eagle starts taking the leaves, and feathers that pad the nest. She starts destroying the very fabrics that creates comfort in the nest. And you know what the baby eaglets do at that time?</p><p>They come together and plead the blood. They get together, start fasting and praying, binding the devil for trying to rip up their life then they start singing:</p><blockquote>Give me that old time religion</blockquote><blockquote>Give me that old time religion</blockquote><blockquote>Give me that old time religion</blockquote><blockquote>And it’s good enough for me.</blockquote><p>Or</p><blockquote>Take me back, take me back dear Lord</blockquote><blockquote>To the place where I first received you.</blockquote><blockquote>Take me back, take me back dear Lord where I</blockquote><blockquote>First believed.</blockquote><p>But momma eagle isn’t moved by those songs because momma eagle is singing a different song altogether she, on the other hand, is singing:</p><blockquote>I believe you can fly</blockquote><blockquote>I believe you can touch the sky</blockquote><blockquote>I think about it every night and day</blockquote><blockquote>Spread your wings and fly away</blockquote><blockquote>I believe you can soar</blockquote><blockquote>I see you running through that open door …</blockquote><p>See momma knows you are born a baby but she also knows you are not born to remain a baby. Momma knows if she keeps feeding you then you’ll never discover or know the strength that is within you. You’ll never know how to use your wings. You’ll never know what power you have until you are pushed by situations and circumstances.</p><p>Joseph felt this first hand… Being tossed into a pagan palace. Esther married to a pagan king. This Jewess having to navigate the culture and traditions in a pagan palace. I think of Daniel, how he served God in the palaces of devils, whose work colleagues were wizards and witches. And then I think of how weak we are. Wanna leave the workplace because one witch is there. Wanna put in a prayer request because one witch moved into the department. But Daniel’s colleagues, all of them were witches and wizards. And I think to myself, maybe we’ve had this diet of miracles for so many years that we think that’s is how it’s always meant to be.</p><blockquote>But Daniel’s colleagues, all of them were witches and wizards.</blockquote><p>Lots of churches still have their USP(Unique Selling Point) as;</p><p>You are unmarried, come get a miracle spouse,</p><p>you need a baby, come get a miracle,</p><p>you need money come and get a miracle,</p><p>you need a job, come get a miracle.</p><p>If something is going wrong, come here and miracles are going to happen for you.</p><p>This sounds so beautiful but what it produces after many generations is a people who are don’t know how to organize their finances intelligently, a people who are not socially intelligent, a people who are not financially intelligent, a people who are not emotionally intelligent, a people who are not physically intelligent and a people who are not politically intelligent because they don’t need any intelligence, they just need the move of God.</p><p>There is Grace for your space but the problem now is you are praying for God to change the space and acting like Greater is he that is in the world than he that is in you. The witch is far more frustrated by your presence than you are of it. That is why God will send you to the difficult places because you are the light of the world, you are the salt of the earth. You are a change agent.God will put us in toxic environments so we can change the place.</p><blockquote>2 Corinthians 12:7–9 And lest I should be exalted above measure through the abundance of the revelations, there was given to me a thorn in the flesh, the messenger of Satan to buffet me, lest I should be exalted above measure.</blockquote><blockquote>For this thing I besought the Lord thrice, that it might depart from me.</blockquote><blockquote>And he said unto me, My grace is sufficient for thee: for my strength is made perfect in weakness. Most gladly therefore will I rather glory in my infirmities, that the power of Christ may rest upon me.</blockquote><p>The paraphrased answer God gave to Paul is I will not change your circumstance I will change you.</p><h4>The promised land</h4><p>There are two classes of prayers but God only answers one, just one;</p><p>God change the world and God change me so I can change the world.</p><p>God only answers the latter. You are the only one that will change your circumstances. He will give you wisdom, he will give you capacity, he will give you strategies, he will give you concepts. That is what he effectively said to Joshua because under Moses they looked up for food and manna fell from heaven but now they need to look down and till the soil. Under Moses they spoke to rocks and water came out, but under Joshua, they had to dig wells.</p><p>God promised the Israelites a land flowing with milk and honey. But in the promised land, there were Hittites, Perizzites, Amorites, Canaanites, Girgashites, Jebusites etc there. There were worshippers of Molech sacrificing their children. When you get to the promise land your safety will be in your strength. It will be in the strength of your faith, the strength of your conviction, the strength of your understanding of God’s word.</p><p>That is why God told Joshua to be strong and be of good courage. You need to be strong because your promise land is filled with devils.</p><p>If you are scared of devils, you might as well camp out in the wilderness. If you’re scared of devils, don’t bother building a business, don&#39;t release an album, don’t do any exploits where you are because when you get to the arena of greatness that is where you meet devils. And God will let you meet devils because he wants you to meet them. He wants you to get stronger. He wants you to maximize the grace that is available for the space he has created for you. That is why you need to go through different levels of stress tests to be sure you are ready for the next level. Nobody comes out of the gym looking all prim and proper, all fresh and cute. A gym is a place of travail where you strain, stress and sometimes tear muscles. To build muscles, you need to put the existing one under stress and strain to the point that it fails. When you are done and the muscles heal, you come out feeling stronger with more defined muscles. Then you go for heavier weights that strain and stress the current level till it fails again and this cycle of straining, healing and becoming stronger continues for as long as you want to continually get stronger.</p><blockquote>Reference</blockquote><blockquote>Preacher: Bishop Wayne Malcolm @businessbishop</blockquote><blockquote>Topic: There is Grace for your space</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efd67fc9294d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Minimum Viable Products(MVPs) as Humans]]></title>
            <link>https://oyinloyeayodeji.medium.com/minimum-viable-products-mvps-as-humans-3638018e3f74?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3638018e3f74</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[product-design]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Sun, 25 Nov 2018 23:26:58 GMT</pubDate>
            <atom:updated>2018-11-25T23:26:58.377Z</atom:updated>
            <content:encoded><![CDATA[<p>I had a moment of epiphany while taking a late evening shower thinking of the various products I was working on. It might have been further stimulated by some excess food I ate today, but still, enjoy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*OxHjbfeA6aFb_vWMpGXUZQ.jpeg" /><figcaption>MVP Paradox Credits: Hackernoon</figcaption></figure><p>An MVP can be perceived as a newborn baby which has been birthed into the world. Some MVPs come with Angel investors who have already put down their cash even before they see what the baby looks like. Right from the moment they observe the heartbeat of the fetus and contractions of the mother’s uterus, they are already sold on the product. People who get this type of product birth opportunity are usually;</p><ul><li>entrepreneurs with a proven track record: the investors think, hey this guy has raised a kid(company) successfully before, we believe his semen is really viable and would almost always produce good kids(companies) so what’s the worst that could happen?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*N2qkSv9vY0nZMzuQv6tsgw.gif" /><figcaption>Giphy.com</figcaption></figure><ul><li>con men: these guys can sweet-talk deadmen back to life. Even without a product and track record, they promise the investors heaven and earth just so the money can be dropped. It’s pretty easy to know what the result of a kid raised by a con-man will be. You can take wild guesses yourself.</li><li>people who are just plain lucky: these guys are just lucky like Domino (Zazie Beetz) in Deadpool 2 who everything just kinda works out for as she goes along on the journey (sorry if you can’t relate).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*UBzw8HQbnguwFDM-Jt7mow.gif" /><figcaption>Domino Credits: Giphy.com</figcaption></figure><p>They keep escaping one death trap after another without doing anything spectacular in their own capacity to survive it. They find a nice guy that just probably likes what he heard from the Electronic Fetal Monitoring (EFM) Machine(I think that’s the name) or just likes their drive or probably just their faces(if that is possible) and he is sold. He lands the cash in their hands and the game is on.</p><p>These three categories of guys ‘almost always’ think money will solve their problems. So when any problem arises, they are busying pumping money into it and yeah money has its effects on the short run but then they end up raising spoilt kids on the long run.</p><p>Also, some of these guys are connected so their solutions can be more easily accepted by their network (or at least sometimes) even if its shit. Just like when the CEO&#39;s kid comes to work in the company. No matter how much they suck, they still get a job in the company with very generous remunerations too.</p><p>Then there are these guys called “Folorunsho” (one protected by God) in Yoruba. They go through 9 months of pregnancy (product development) with no assurance that their babies will have the resources to survive in the outside world. These guys are actually pretty interesting because they have so much faith that the community will like their baby enough to help them train and nurture their baby to grow strong and healthy. So they introduce their babies into the world and as you know mortality rates are usually high for infants so there is no doubt a whole lot of their/these kids actually die and only a few truly survive.</p><p>These folks become heavily dependent on customer feedback because that is where they draw their life source from. The ones that neglect the feedback die. Simple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Uyc31lhM51WLShb8f8ArAA.gif" /><figcaption>Giphy.com</figcaption></figure><blockquote>Lean Startup by Eric Ries becomes their Bible, they read it till it tears into two.</blockquote><p>This in itself is the real hustle as there is no money to waste, the drawing board is where they always sit to draw and redraw plans when the previous ones failed. It like the saying that it takes a whole village to raise a child. So one day Jane (let’s assume that is the name of their kid/product) is growing and the community thinks hey;</p><ul><li>Jane needs shoes and the idea or literal shoes are donated.</li><li>Jane needs to wear her shoes properly and a community member does the training.</li><li>Jane needs to learn proper table manners, again a community member does the needful.</li><li>Jane needs this and Jane needs, community members keep doing the needful until Jane is a fully grown young lady being courted by guys in all directions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*mQA_CvwGBfmO11qzMzGc3w.gif" /><figcaption>Giphy.com</figcaption></figure><p>Jane becomes the pride of the community as it was a joint effort to make Jane who she is. Everybody takes pride in her and talks about her. People now refer their friends to Jane for a chat because they were part of the development process. Now, this is a customer-centric development process and one which I strive to imbibe and live by as I work on being a maker.</p><blockquote>If you liked this article, be generous with your claps and clap some more after clapping.</blockquote><p>If you spot a literal error or an erroneous thought that needs to be remedied, please do let me know in the comments section below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3638018e3f74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Responding to click events in Android]]></title>
            <link>https://oyinloyeayodeji.medium.com/responding-to-click-events-in-android-5329eb86bb09?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/5329eb86bb09</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Fri, 25 May 2018 16:10:33 GMT</pubDate>
            <atom:updated>2018-05-25T16:10:33.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tp1sCE9Palf9L1Kq2ABeoQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/t8TOMKe6xZU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Pathum Danthanarayana</a> on <a href="https://unsplash.com/search/photos/android?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Lets see the implementation for responding to click events:</p><ol><li>Implement an anonymous class and get stuff done on the go</li></ol><pre>Button btn = (Button) findViewById(R.id.mybutton);<br></pre><pre>btn.setOnClickListener(new View.OnClickListener() {</pre><pre>@Override</pre><pre>public void onClick(View v) {</pre><pre>   //Do some cool stuff</pre><pre>}</pre><pre>});</pre><p>2. Implement the View.OnClickListener interface on the Activity class</p><pre>public class TestActivity extends AppCompatActivity implements View.OnClickListener{</pre><pre>    //Dump this method in the onCreate<br>    public void initializeControl{<br>        Button btn = (Button) findViewById(R.id.mybutton);<br>        btn.setOnClickListener(this);<br>    }<br>    <br>    @Override<br>    public void onClick(View view) {<br>        try {<br>            switch (view.getId()){<br>                case R.id.mybutton:<br>                    //Do some cool stuff<br>                    break;<br>            }<br>        } catch (JSONException e) {<br>            e.printStackTrace();<br>        }<br>    }<br>}</pre><p>This looks cumbersome at first but ends up being syntactically juicy as your clickable layout elements increase in number.</p><p>3. Pass it in the xml and handle it in the Activity where a View.OnClickListener() is being called automagically under the hood.</p><p>This has a couple of caveats though being that</p><ul><li>the method is only searched for in the calling activity so if this view is inflated in a fragment, the click method cannot be accessed.</li><li>if used in custom views, the click event will have to be in every calling Activity which is cumbersome</li></ul><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;!-- layout elements --&gt;<br>&lt;Button android:id=&quot;@+id/mybutton&quot;<br>    android:layout_width=&quot;wrap_content&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    android:text=&quot;Click me!&quot;<br>    android:onClick=&quot;myTestMethod&quot; /&gt;</pre><p>and the code snippet in the activity looks like</p><pre>public void myTestMethod(View v) {<br>    // does some cool stuff<br>}</pre><p>And there you have it. Let your app users click away and get cool stuff done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5329eb86bb09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One year down and 5 apps up: My Android Journey]]></title>
            <link>https://oyinloyeayodeji.medium.com/one-year-down-and-5-apps-up-my-android-journey-4cf0dca88315?source=rss-c3add2d123dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cf0dca88315</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Oyinloye Ayodeji]]></dc:creator>
            <pubDate>Fri, 29 Dec 2017 18:27:58 GMT</pubDate>
            <atom:updated>2017-12-29T18:27:58.203Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometime around December 2016 I began my android journey while I was an Entrepreneur-In-Training(EIT) at the Meltwater Entrepreneurial School of Technology(MEST) Africa. Needless to say it was a tough journey for me even though I had some basic knowledge of programming. Having developed a desktop application in C# as my final year project in school, tried and failed to run a startup(travelNigeria) and being a junior developer for seven months at one of the fastest growing courier companies in Nigeria before heading out to Ghana, It was tough because even though I consider myself smart, I’m still a slow learner. So when I began this journey, it required lots of grinding and sleepless nights.</p><p>At the start of MEST we set goals and I had three for tech which were</p><ul><li>learn ruby — a syntactically juicy language,</li><li>learn rails — the web platform built on a syntactically juicy language</li><li>learn android — a mobile platform.</li></ul><p>Note that we had business and communications goals so there was alot to be done in just one short year.</p><p>So in December I was very clear on what I wanted to do. I did an interview with Asoriba but I knew I didn’t want to do anything web or Django related for the internship as I had chosen ruby as my web language. I spoke with Gerald a member of the Beam Team and he told me he would consider my proposition to come learn android at his company and when December came I was in. Believe you me December 2016 was one of my most hateful Decembers in history. I always remember Frederick Boateng coming to the empty room(Room 14- Sandcity hostel) I used for my coding expeditions and telling me to go sleep. I really wanted to sleep but I just couldn’t until I had typed one more line of code.</p><p>Four things that kept me going were</p><ul><li><a href="https://www.youtube.com/watch?v=K0G9T5Bnjlc">Sam Smith — Money on my mind</a></li></ul><p>This song was always on repeat on my VLC player till I went to bed around 4am. The song sounds weird now but it was all the music I needed to foster the love I required to continue in the midst of my coding turmoil.Music is something every developer needs as most times I am less productive without music bouncing off my ears.</p><ul><li>Coffee</li></ul><p>I always juiced up for I knew the reaper will always come by for his share of rest at night for I always denied him his due at night and during the day. So I set him at bay with coffee.</p><ul><li>Tutorials</li></ul><p>Lots and lots of tutorials really helped me, for any problem I was thinking of, there almost always existed a tutorial for it.</p><ul><li>Determination to learn.</li></ul><p>Determination is just pure determination. Really hard to explain why I continued even though I didn’t want to.</p><h3>Projects</h3><ul><li>Cardless</li></ul><p>Seeing failure VS Success as 0 VS 1, I saw my first project as a 0.5. The project I was given was to develop an OCR(Optical Character Recognition) scanner using Tessaract library and openGL for boundary analysis in the image so as to refocus the camera for better text recognition.</p><blockquote>At that time I didn’t even know what an activity was nor did I know of gradle.</blockquote><p>At that time I didn’t even know what an activity was nor did I know of gradle. I went through loads of tutorials and got my hands dirty with code and used my church mind to refactor and get my desired results.</p><p>I ended up with an application that converted 30% of the text and used loads and loads of the device GPU(Graphical Processing Unit). It took almost 1 minute to try to get an outline and then process the text.</p><p>The experience was sometimes horrible but I didn’t fall into the pit of despair. I always kept the faith.</p><p>Testing my employability quotient I went on Job boards to checkout the requirements for android devs and I came across this company that required at least 5 apps on the playstore before you could be considered for an interview. I thought it was a good metric to use and I added it as one of my goals for the year.</p><blockquote>Build and upload 5 applications to the <a href="https://play.google.com/store/apps/developer?id=Turdla+Innovations">playstore</a> before the end of 2017.</blockquote><p>Another race began and in a bid to achieve this, any hook or crook was good. So I uploaded an Udacity Portfolio course project I did as my first android app on the playstore, “<a href="https://play.google.com/store/apps/details?id=com.oyinloyeayodeji.www.miwok">Learning Miwok</a>”.</p><ul><li>Learning Miwok</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*-gX2SP8AKOlUf3mv7thVgQ.png" /><figcaption>A snapshot of Learning Miwok App</figcaption></figure><p>Alot of other developers did same so miwok will generate tons of results for you on the playstore. I cleaned it up and posted it to get to know how uploading an app on the playstore looked like.</p><ul><li>My Sprirtual Journal</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*R9-nDu-uspDSV7UkUOSJHA.png" /><figcaption>A Snapshot of My Spiritual Journal</figcaption></figure><p>Then came a freelance gig to develop a <a href="https://play.google.com/store/apps/details?id=com.oyinloyeayodeji.www.devotion2">spiritual journal</a> where you put in your daily devotionals and review how well you are doing at the end of the week. A little bit unsure of my capability to deliver, I took on the challenge nonetheless and sleepless nights began in January again. The project ended up lasting longer than it should as design assets never came through and not having a knack for designs, I had to use my crappy designs as I deemed fit.</p><ul><li>Foodie and Proxeepay</li></ul><p>After this came two projects which I personally found really interesting, <a href="https://play.google.com/store/apps/details?id=com.oyinloyeayodeji.www.foodapp">Foodie</a> and <a href="https://play.google.com/store/apps/details?id=com.oyinloyeayodeji.www.shicacho">Proxeepay</a></p><p>They both utilized firebase as the back-end (probably the reason why I enjoyed them was because I was getting to learn about another cool product).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*8fUOEOQbN0Y8KzrlpLhJ8w.png" /><figcaption>A Snapshot of Foodie App</figcaption></figure><p>Foodie was to help restaurants manage orders. I felt really bad when progress was not made on the business side as I was hoping this will be my first fully featured production app but alas I had to wait a little while longer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*A7Zocgco62E0Tj7Bx6JcQg.png" /><figcaption>A Snapshot of Proxeepay</figcaption></figure><p>Proxeepay was a capstone project done by Two Nigerians(myself included) and two Ghanaians. We set out to solve the problem of mobile money centralization in Ghana by adopting the Uber model such that getting cash from mobile money accounts become decentralized and at the click of a button you can be connected to someone around you that had cash and an exchange can be done. The project went smoothly and being the only mobile dev on the team, the MVP became my duty to produce. One month and some days down the line we pitched the idea and investors loved it but were not really convinced on the security aspect of it as it was seen as a means to know who holds cash and rip them off of it(more like an answered prayer for thieves). Lessons were learnt and we all moved on to other projects as this added my fourth portfolio project to the playstore.</p><p>Planned or not I had four projects already on my playstore portfolio and they were good enough to land me a fifth and sixth gig which are being wrapped up at the moment.</p><p>This year I am switching my metrics for judging productivity to the number of active users I have on my apps on the playstore and before working for any client I need to know if its a serious minded client that will see the project through and acquire users not just folks that feel good and want to develop an app.</p><h3>Things That Helped Me Grow Faster</h3><p><strong>Get Projects</strong></p><p>Major reason I have grown and learnt a whole lot in the space of this one year was because I had projects to work on. Every project has unique needs and these needs make you learn new things or ways to optimize the old things that you have initially developed.When on a project the only option left is to deliver the best quality and believe you me clients can make lots and lots of demands so you will have no choice but to meet those demands as they come.</p><p><strong>Get Mentors</strong></p><p>Have mentors you can always run to for advice and whom you can freely brainstorm implementation ideas with.People who can sometimes or alot of times do code reviews with and for you.This helps to not stay frustrated for too long on a particular issue.</p><h3>Credits</h3><p>I remain ever grateful to Gerald Pharin <a href="https://twitter.com/pharingee">@pharingee</a> and Kingston Tagoe <a href="https://twitter.com/NiiMantseAflah">@NiiMantseAflah</a> of @beamcrew. Without them giving me that internship position back then i doubt I would be where i am today.</p><p>Thanks to Andrew Berkowitz <a href="https://twitter.com/bezerkowitz">@bezerkowitz</a> the first Jew I met personally for letting me use his card to pay for my playstore developer subscription(<a href="https://play.google.com/store/apps/developer?id=Turdla+Innovations">Turdla Innovations</a>) and not getting tired of me asking questions about my android issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cf0dca88315" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>