<?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 owen adira on Medium]]></title>
        <description><![CDATA[Stories by owen adira on Medium]]></description>
        <link>https://medium.com/@owenadira?source=rss-17f2b5276284------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oPSvDnJM3IXQ_fXM.</url>
            <title>Stories by owen adira on Medium</title>
            <link>https://medium.com/@owenadira?source=rss-17f2b5276284------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:53:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@owenadira/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[Growth..Growth..Growth.]]></title>
            <link>https://medium.com/@owenadira/growth-growth-growth-2317928d8ca6?source=rss-17f2b5276284------2</link>
            <guid isPermaLink="false">https://medium.com/p/2317928d8ca6</guid>
            <category><![CDATA[growth-mindset]]></category>
            <dc:creator><![CDATA[owen adira]]></dc:creator>
            <pubDate>Tue, 23 Oct 2018 08:35:03 GMT</pubDate>
            <atom:updated>2018-10-23T08:35:03.188Z</atom:updated>
            <content:encoded><![CDATA[<p>As an aspiring andelan, Its a requisite to be ready to, step out of your comfort zone to better yourself and always seek to better your skills through constant self evaluation and feedback.I recently signed up Andela’s workshop which gave me an opportunity to learn and interact. Let me share with you my experience as i walk through this journey.</p><p>The workshop was a three week event where we learned by implementing a complete project ,which included developing a stackoverflow alike website, using HTML, css and a Flask back-end.At the end of the workshop we were tasked with a project to which would be used as a stepping stone to join the bootcamp,(Which am currently attending). Since Andela uses version control to manage code one is required to understand the working of git. At first git was a puzzle to me and took awhile for me to grasp and have a full understanding of it.I would advice practice on use of the command line interface, its daunting at first but the payoff is good. There’s nothing cool like having the power to create different versions of your projects at will with a single command. This to me adds so much flexibility to my ability to manipulate and maintain a project as a developer. TO spice it up there&#39;s a workflow incorporated with git, git-workflow which makes it easy to mange and work on a project as a team.I love the workflow and have applied it to my personal way of writing code too.<br>After the workshop we were tasked with to create a solution for a Store Manager using the same tech stack but an solve it individually. Its an imersive learning experience, And the learning curve is steep too. Andela even acknowledge it too, And that&#39;s why i believe the environment they provide helps the developer counter this. Personally i have been asking questions on fields that challenge me and the support it good.Everyone is ready to help as long as you know and can identify the problem you are facing.</p><p>As i progress with my week on challenge, Am constantly working on my self , Writing my daily goals and making an effort constantly to achieve them.I like the challenge it reminds me of an axiom, “Nothing rests; everything moves; everything vibrates”. Adieu.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2317928d8ca6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flask-RESTful Data Marshalling using Fields]]></title>
            <link>https://medium.com/@owenadira/flask-restful-data-marshalling-using-fields-2ecee98c45f4?source=rss-17f2b5276284------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ecee98c45f4</guid>
            <category><![CDATA[field]]></category>
            <category><![CDATA[flask-resful]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[owen adira]]></dc:creator>
            <pubDate>Mon, 22 Oct 2018 13:38:49 GMT</pubDate>
            <atom:updated>2018-10-22T13:38:49.705Z</atom:updated>
            <content:encoded><![CDATA[<p>Today am going to write about user data validation using fields module. For the purpose of illustration and explanation, i will use an api i have already developed using Flask-RESTful, a flask extension that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries and it also encourages best practices with minimal setup.</p><p>Fields module allows a developer to define the expected data type of the requests body he/her expects for the api. Definition of the fields can be done in a dictionary or ordered dictionary, where the key identifies the specific data field and the value is the the expected data type for the field.The module also lets you format and filter the response so the developer wont have to worry about exposing internal data structures.Another interesting thing about this module is It’s syntax is very clear, when looking at your code its easy for one to understand what data will be rendered and how it will be formatted.</p><p>let me illustrate the above statements with some code to be more practical.First, am using a flask application, Store Manger which allows a user to manage a list of products in a store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*zzvy01KyAx9-IJECq3eu6Q.png" /><figcaption>product resource declaration using Flask_RESTful extension.</figcaption></figure><p>The above code declares a class Product, which inherits from Resource provided by Flask-RESTful to define our product resource for the api.Since am using OOP paradigm ,we’ll also have to define a model for the Product class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*HXKgO2OnVKqwenl4ej53-w.png" /></figure><p>From the above, we can tell that our request is expected to have 5 data fields, 3 generated by user input 2 generated using the api. The three fields are product_name, price and stock.</p><p>Now to make our request:These is where fields come in the picture,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*zVX5ZfnTn8ut97NVcdeCJQ.png" /><figcaption>define the data fields data types</figcaption></figure><p>and now to make a request we need this;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*1ql0sARBebnkDRLyPN70JQ.png" /><figcaption>post a product function</figcaption></figure><p>The decorator marshal_with is what actually takes your data object and applies the field filtering. Data marshalling can work on single objects, dicts, or lists of objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*Thkizeox3CFsgp-vqIehQA.png" /></figure><p>from the above example, we can see the id, stock and price values of the post request have been converted to Integer data type even though it was sent as a string.Notice the uri key from the product_fields dictionary. It declares a URL field data type which in response, is a url that points to the created product and identified as by is unique id.</p><p>From the above illustration I hope you can see the power of the fields module.Also to mention fields provide Custom Fields &amp; Multiple Values.Adiue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ecee98c45f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Networking The Andela Way]]></title>
            <link>https://medium.com/@owenadira/networking-the-andela-way-e515231d8edd?source=rss-17f2b5276284------2</link>
            <guid isPermaLink="false">https://medium.com/p/e515231d8edd</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[owen adira]]></dc:creator>
            <pubDate>Wed, 25 Jul 2018 12:24:17 GMT</pubDate>
            <atom:updated>2018-07-25T12:46:02.657Z</atom:updated>
            <content:encoded><![CDATA[<p>Networking is about creating connections with new people with whom you have mutual interests for employment or business.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qtmNsCUfOOiEp1bgAEXntg.jpeg" /></figure><p>Since 23 July 2018, I have a part of Team Alpha-23-boot-camp-30 with two other members Diana Kerubo and Byron Taaka, our Learning Facilitator is Maryanne Ng’anga.I will share with you some interesting attributes about our team.</p><p>I’ll start with our facilitator, Maryanne Ng’ang’a. She’s been an Andela fellow since February 2017.Her education background include a Computer Technology degree from JKUAT and she’s a certified Cisco Network Associate too. Currently she’s working as a DevOps engineer. From my interaction with her i can attest she’s very supportive of any issue you raise to her and also dedicated too see us the recruits qualify for the week 2 challenge and eventually be part of Andela’s battalion that is helping solve the worlds problem using technology.Apart from the technical side of her, she got soul too, I can tell you she’ll listen to music from all genre’s, she got love for comedy, Science and world documentaries or TV shows,she appreciates nature and the list is endless, Met up with her and you’ll have a taste of what am trying to explain in real life.</p><p>They always say ladies first, so the second person am sharing with you my personal experience with is Diana Kerubo or as she prefers just call her by last name. Kerubo is a student of Computer Science at Maasai Mara University where she’s yet to graduate.She has some experience using machine learning, and passionate creating algorithms and solving mathematical computation.Yes she isn&#39;t afraid to new learn new ideas and her passion for software development motivated her to aspire becoming an Andelan and its evident since we’re in the same team. Technical aside, Kerubo likes traveling, she also has a liking for trying out new delicacies. A fact i can confirm is she takes lemon water all the time, I have witnessed this first hand she always got the bottle besides her.She enjoys Sci-Fi related movies and a fan of clash of clans, which i believe is an Android game.</p><p>The last person, am sharing with you my experience is Byron Taaka. Byron has an education background from Kisii University where he was studying Applied Computer Science and graduated back in December 2017. He is a Cyber Security specialist, hmm yes! He does penetration tests and programming . [pause] and understand the previous two statements, if you’re familiar with a TV show Mr.Robot, Byron is like Eliot. He even got Kali Linux as his OS, fact! I have seen it with my own eyes. Byron is reserved in nature but i’ll share some interesting facts i have learned about him. Apart from being on his laptop, He enjoys poetry from local poets like Mufasa and Qui Qarre. Another fact about him is he continuously seeks to improve himself and eventually qualify as an Andela fellow.</p><p>Hope you can see the magic in our group, Everyone is motivated to achieve success we all make effort towards its attainment. Another fun fact about our group is, when brain storming for a group name, i suggest the number 23 because in NBA basketball, my favorite player Lebron James( King James) wears the same number as a reminder that he is trying to surpass the current GOAT (greatest of all time) Micheal Jordan. and in the Kings own words “Am chasing the ghost of Chicago”, for the non-basketball, we’re all pursuing success but in our own definition. another fact is the group was created on 23, how magical. Adiue!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e515231d8edd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TDD — using pytest]]></title>
            <link>https://medium.com/@owenadira/tdd-using-pytest-d3310d71a902?source=rss-17f2b5276284------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3310d71a902</guid>
            <category><![CDATA[pytest]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[owen adira]]></dc:creator>
            <pubDate>Mon, 23 Jul 2018 13:01:44 GMT</pubDate>
            <atom:updated>2018-07-24T07:00:59.719Z</atom:updated>
            <content:encoded><![CDATA[<p>As an aspiring Andelan, i can sellout a hack to get yourself enrolled as a fellow in the istitution, you will and will alway will write tests for the code you write. As part of my bootcamp challenge my requirements were to create an API using flask framework and it goes without saying “thou shall write tests for your code.”<br>There are several frameworks for testing python code but my requirements specified pytest. Pytest framework definition according to the official documentation is defined as a framework that makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.From my little personal experience with the framework, i completely agree to the definition&#39;s accuracy.<br>Pytest can be install be easily installed via <strong>pip install pytest </strong>(its best practice to use a virtual environment for every python project you work on). Pytest is a software test framework, it runs in the terminal hence it automatically finds tests you’ve written, runs the tests, and reports<br>the results. It has a library of goodies that you can use in your tests to help you test more effectively. It can be extended by writing plugins or installing third-party plugins. It can be used to test Python distributions and it integrates easily with other tools like continuous integration and web automation.<br>I will write a simple test and demonstrate using pytest to test our code.</p><p>first write a test that pass and test it. <br>1.create a file test_one.py and write the below code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*BBYsffOEQjuSrL4c2QrDIg.png" /></figure><p>The above test is a passing test that evaluates values of two tuples with three strings of, “one”, “two”, and “three”.the test pass because the evaluation results to True. Notice the period after the file name, that is pytest annotation for a passed test.Here is a screenshot of the test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*qaecJD-p014P8WCwyNwtRg.png" /><figcaption>test result for test_one.py</figcaption></figure><p>Next, I’ll demonstrate testing a failing test.<br>create a file test_two.py and write the below code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*YeYfTUjEa2Jfn3Lv0vOTpQ.png" /></figure><p>the code above is a failing test because we’re trying to assert if a tuple of integers is equal to a tuple of strings, though they mean the same thing, they are two different data types according to python, and so we expect our test to fail.<br>To run our file: <strong>cd</strong> to the directory where the file is and run<br> <strong>pytest test_two.py .</strong></p><p>the result should be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*p9J7hefU-mewm2UmnNB-cQ.png" /><figcaption>test_two.py test results</figcaption></figure><p>A failing test is denoted with an F after the file name.</p><p>From the above examples,I hope you can see the power and simplicity of pytest and why its being adapted into developer’s workflow rapidly.<br>To learn more about TDD using Pytest, I found a book on the topic and explains every nit grit about pytest and all its goodies in simple form as possible. <a href="https://pragprog.com/book/bopytest/python-testing-with-pytest">Python Testing with pytest by Brian Okken</a>. Am reading it back to back and i highly recommend it to all python developers who want to get a grasp of the new Pytest framework .More content coming, but for now, Adiue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3310d71a902" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>