<?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 Paul Gathegu on Medium]]></title>
        <description><![CDATA[Stories by Paul Gathegu on Medium]]></description>
        <link>https://medium.com/@gathegu.p?source=rss-a648d15d8dcb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*acwHWyvHNdqPB5uNdUAhZA.jpeg</url>
            <title>Stories by Paul Gathegu on Medium</title>
            <link>https://medium.com/@gathegu.p?source=rss-a648d15d8dcb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 01:06:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gathegu.p/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[Adapting to Challenge]]></title>
            <link>https://medium.com/@gathegu.p/starting-to-adapt-f3de88f4c258?source=rss-a648d15d8dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3de88f4c258</guid>
            <category><![CDATA[andela]]></category>
            <category><![CDATA[adaptation]]></category>
            <dc:creator><![CDATA[Paul Gathegu]]></dc:creator>
            <pubDate>Tue, 03 Jul 2018 10:31:18 GMT</pubDate>
            <atom:updated>2018-07-03T12:29:06.055Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Is6RWSy3suKK4H3422aq_Q.jpeg" /></figure><p>I am enjoying every bit of time I am spending in Andela. It is an opportunity for me to forge relationships and make good friends with other professionals that are familiar with my tech stack.</p><p>The first few weeks were like anything else new; lots of introductions to new concepts and people. I have come to embrace a lot of disciplines and methodologies in my work and the fast-paced environment of the bootcamp has immensely boosted my confidence in my ability to identify and solve problems under pressure.</p><p>Andela is impacting so much experience and everyday is a challenging day. This is greatly helping me stay engaged with my work and improve a lot on my skills. I have developed a more collaborative approach to problems solving and seeking help from colleagues when necessary. I understand that there isn’t one type of knowledge. For example, someone can be book smart and another can be people smart and the best kind of relationship is where both people balance each other out and where they both feel that they have things they can learn from each other. It has also presented an opportunity for me to make more use of project management tools like PivotalTracker to track all my work and ensure that I meet deadlines.</p><p>I have come to embrace Test Driven Development (TDD). This has led me to write better, testable and maintainable code. It is an evolutionary approach to development where you write a test before you write production code to fulfill that test and refactoring. I have learned that the core of solving a difficult issue is understanding the issue. Always to take time to fully understand the logic behind every syntax.</p><p>Everybody in Andela uses git for version control. I have come to learn how to use this tool well particularly in a team setup. I no longer edit files on master branch directly in a project but instead I’ll create a branch named after a feature I want to implement and work on that separate branch and pushing often in case I need to go back to a previous version. Once that feature is finished, I can then merge it with the master branch.</p><p><strong><em>Any Advice?</em></strong></p><p>Andela is fast paced and conscientious and they take their work very seriously. They want a team of individuals who are really passionate about technology and are sociable and collaborative. I would advise someone to keep an open mind, not to get overwhelmed by the details and to be thoroughly prepared and perhaps find a mentor who will help them become a well-equipped coder with a passion to grow their knowledge and propel them into a world of possibilities. But most importantly, <em>Do your job.</em> Your hard work and knowledge will speak volumes. Go above and beyond the expectations and deliver superb work.</p><p><strong><em>Final Thoughts</em></strong></p><p>In order to perform well in Andela, you have to be innovative, dedicated and passionate. You have to go above and beyond. Everyday I am embracing these values and pushing for the best. There have been ups and downs in my pursue of excellence in Andela. But then there have been days of “Aha” moments when things start clicking and I get things to work. Those are the moments that propel me into more code and additional concepts. And it is there I can actually see myself grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3de88f4c258" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Week in the Andela Bootcamp]]></title>
            <link>https://medium.com/@gathegu.p/my-first-week-in-the-andela-bootcamp-f856c1e6c937?source=rss-a648d15d8dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f856c1e6c937</guid>
            <category><![CDATA[andela-bootcamp]]></category>
            <category><![CDATA[relations]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Paul Gathegu]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 11:12:47 GMT</pubDate>
            <atom:updated>2018-06-27T11:17:37.374Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZmHVX97yHX8SDpiSH3xgQ.jpeg" /><figcaption>Building relations</figcaption></figure><p>I was anxious for the first day of the bootcamp because I was looking forward to meeting the friendly people I had been slacking with for the past few weeks. On the first day of the bootcamp it was both fun and informative. We started by playing warm-up games on a field and this was really good because it loosened up people and eased any tensions they might have had.</p><p>We finally proceeded to a class where the lead LF (Learning Facilitator) Chrispin Chiedo called out for people to make introductions and point out interesting things about themselves. This was interesting as the list of fun things ranged from watching “Rick and Morty” to baking cakes.</p><p>After introductions we had a small class led by Chrispin Chiedo where we reviewed Andela values and their expectations from the bootcampers. The class ended with a short lesson about “Growth Mindeset” from Ann Mukundi “Mama Bootcamp” as she is famously known.</p><p>The end of the class saw us enter into another phase of the program where we were put into groups each lead by an LFA (Learning Facilitator Assistant). This was my first time to meet my LFA Robert Njane who we had previously communicated on slack. Robert is an intelligent, charming guy who is passionate about technology and is a fellow from a previous cohort (Cohort 20). He is very helpful as a facilitator and is always giving us constructive feedback on our outputs. He is in charge of a group of 4 namely, Derrick Kirwa, Brian Wandera (Wandesky), Andrew Njaya and myself included.</p><p>Derrick Kirwa is not just a good team member, he is also a good friend. He is passionate about technology and the fine stuff. He loves art and is also very drawn to design. I made contact with Derrick even before been grouped together. We found out that we have a lot in common to the point where we had the same setup on our computers — the media streaming apps and even the same code editor configuration. Derrick is a very intelligent guy and am always interested in getting feedback from him on my work.</p><p>Brian Wandera is an open-minded guy. He is very eager to learn and is currently doubling the Andela Learning Community (ALC) <em>(an initiative by Andela, Google and Udacity, to provide aspiring technologists with the tools to become globally competitive software developers)</em> with the bootcamp. He is a die-hard fun of martial arts and it was interesting to listen to him explain <em>“Adaptability and Growth Mindset” </em>drawing examples from martial arts disciplines. He said, <em>“we should all be like water that takes the shape of the object it meets.”.</em> I thought that was awesome.</p><p>Andrew Njaya is a kind-hearted guy who is very committed to figuring things out when faced with challenge. He is very collaborative and always reaching out to other team members when he has a blocker in his work. Andrew has come along way in his learning putting into considerations that he had no prior knowledge of the processes and tools used in programming.</p><p>I am learning a lot from my team members and I feel very privileged to be one of them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f856c1e6c937" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into Flask and Project Management]]></title>
            <link>https://medium.com/@gathegu.p/diving-into-flask-and-project-management-ce76c7a9adee?source=rss-a648d15d8dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce76c7a9adee</guid>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Paul Gathegu]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 16:49:27 GMT</pubDate>
            <atom:updated>2018-06-26T16:56:00.402Z</atom:updated>
            <content:encoded><![CDATA[<p>I am constantly learning new technologies because the industry is constantly changing and evolving. I’ve recently joined the Andela Bootcamp in Nairobi and one of the requirements is to use Flask framework for application development.</p><p>Though, not new to the Python programming language, I’ve never used Flask before and this meant diving deep into the framework. What I’ve learned so far is that the key to understanding a language is immersion and mentorship. The following are some of the challenges and takeaways from my experience so far.</p><p><strong>Why Python?</strong></p><p>Python is a fairly established language used by many companies. It is extremely proficient at mathematical functions having been written by a mathematician. It is also highly used in robotics and data science. Python is quite simple enough and most people who check out the code can figure out what’s going on even if they are not python developers.</p><p>The first few weeks were like anything else new; lots of introductions to new concepts and people. While I have learned way too many concepts, thoughts, ideas, processes, systems, languages, and methodologies to write about in this short post; it is the absolute trust in the mentors to guide me on this journey that has helped me solidify and continue on my coding journey.</p><p><strong><em>Test Driven Development</em></strong></p><p>I have come to embrace Test Driven Development (TDD) and appreciate it even more. Andela champions the use of TDD and this has led me to write better, testable and maintainable code. It is an evolutionary approach to development where you write a test before you write production code to fulfill that test and refactoring. I have learned that the core of solving a difficult issue is understanding the issue. Always to take time to fully understand the logic behind every syntax.</p><p><strong><em>Using Git effectively</em></strong></p><p>Learning how to use Git branches can prevent you from experiencing deep, gut-wrenching heartbreak. I used to edit everything on the master branch in a project. Anytime I got to a point where my code was all messed up and I couldn’t undo my way back to half-decent code, I would start over. Now, I’m rarely ever working directly on the master branch. If there is a specific feature that I want to work on, I’ll create a branch named after that feature and work on that separate branch and pushing often in case I need to go back to a previous version. Once that feature is finished, I can then merge it with the master branch.</p><p><strong><em>Asking for help when needed</em></strong></p><p>In Andela, if you don’t plan your work it can definitely feel like an endless amount of assignments and you can end up working crazy hours tying to finish everything assigned by the end of each night. This has led me to developing a more collaborative approach to problems and seeking help from colleagues when necessary. It has also presented an opportunity for me to make more use of project management tools like PivotalTracker to track all my work and ensure that I meet deadlines.</p><p>I’ve also been networking by attending meetups and training events both online and offline and this has greatly improved not only my skills but has given me the opportunity to connect with other professionals that are familiar with my tech stack.</p><p><strong>Any Advice?</strong></p><p>What advice would I give someone thinking about this? First, keep an open mind. Don’t get overwhelmed by the details. Second, find a mentor. They will help you become a well-equipped coder with a passion to grow your knowledge and propel you into a world of possibilities. Third, don’t stop on one language because when you are a capable creative developer, learning to understand code from other languages can increase your overall value as a programmer and increase your skills in your base language. And finally, breathe! While there have been ups and downs, in the end, I’ve made some really amazing connections, learned more than I ever imagined.</p><p><strong>Final Thoughts</strong></p><p>I’ve had frustrating moments with hardware and software alike. Lots of ups and downs. But then you have days of “Aha” moments; when things start clicking and you get things to work. Those are the moments that propel me into more code and additional concepts. And it is there I can actually see myself grow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce76c7a9adee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding JSON Web Tokens (JWT)]]></title>
            <link>https://medium.com/@gathegu.p/understanding-json-web-tokens-jwt-3387a1b99f04?source=rss-a648d15d8dcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3387a1b99f04</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[jwt]]></category>
            <dc:creator><![CDATA[Paul Gathegu]]></dc:creator>
            <pubDate>Mon, 25 Jun 2018 14:25:27 GMT</pubDate>
            <atom:updated>2018-06-26T04:09:29.531Z</atom:updated>
            <content:encoded><![CDATA[<p>Regardless of platform, you will need to build APIs to serve data between different client applications and endpoints. To ensure secure connection between the client and the server for storing and exchanging session related information, we use JWT.</p><p><strong>So, what is JWT anyway?</strong></p><p>JSON Web Token (JWT) is a string that contains three distinct parts (<em>header, payload, signature</em>). This string is saved on client side only and is sent in HTTP requests from client to server to validate authenticity of the client.</p><p><strong>Makeup of JWT</strong></p><p>JWT consists of three distinct parts that are separated by dots (.)</p><p>· Header</p><p>· Payload</p><p>· Signature</p><p><strong>JWT Format:</strong></p><pre>header.payload.signature</pre><p><strong>Header</strong></p><p>The header is a dictionary that usually contains two keys: type of the token (typ), which is JWT, and the hashing algorithm being used (alg), such as HMAC SHA256 or RSA.</p><p>Example of a header:</p><p><em>{</em></p><p><em>&quot;alg&quot;: &quot;HS256&quot;,<br> &quot;typ&quot;: &quot;JWT&quot;</em></p><p><em>}</em></p><p><strong>Payload</strong></p><p>Payload is also a JSON string that contains data that you want to store inside a JWT. This data is also known as “claims”. This data is base64url encoded and should never include any sensitive information as anyone can decode and read it. Tampering with this data invalidates the JWT.</p><p>Example of a payload:</p><p>{</p><p>&quot;userId&quot;: &quot;12&quot;,<br> &quot;role&quot;: &quot;user&quot;,<br> &quot;exp&quot;: &quot;2018-07-26&quot;</p><p>}</p><p><strong>Signature</strong></p><p>Signature is an encrypted string. It is the only part of JWT that is not publicly readable because it is encrypted with a secret key. This data can be decrypted only if the user has the secret key.</p><p>A signature is made by encrypting the base64url encoded first two parts of a JWT. That is, the <em>base64urlEncode(header) and base64urlEncode(payload) </em>with the algorithm (alg) defined in the header.</p><p>If using the HMAC SHA256 algorithm, the signature will be created in the following way:</p><pre><em>HMACSHA256(<br>   base64UrlEncode(header) + “.” +<br>   base64UrlEncode(payload),<br>   secret)</em></pre><p><strong>Scenarios where JSON Web Tokens are useful:</strong></p><p><strong><em>Authorization</em></strong></p><blockquote>JWT tokens are generated by the server, and they should be unique for each user. If possible, tokens should have a time frame when these are considered valid. Tokens should be constructed using a method which cannot be done by third parties. In case third parties can reproduce the token generation algorithm, then our API is compromised because any request can be set up using a valid token. Token based authentication is stateless and allows for easy scale of our application.</blockquote><p>In a RESTful API, every request should be authenticated. Which means tokens should be added to every request. Usually tokens are set in the HTTP headers. Since JWT is lightweight and is a self-contained JSON payload. You can store user identity in the JSON, sign it and send the token to the clients. Since it’s signed we can verify and validate it with just our secret key. Just share the secret key privately and all your services can read the data stored inside the JWT.</p><p>This is how authentication workflow works;</p><ul><li>Client provides email and password, which is sent to the server</li><li>Server then verifies that email and password are correct and responds with an auth token</li><li>Client stores the token and sends it along with all subsequent requests to the API</li><li>Server decodes the token and validates it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7T41R0dSLEzssIXPHpvimQ.png" /><figcaption>Verifying user authenticity using JWT</figcaption></figure><p><strong><em>Information Exchange</em></strong></p><p>Because we can sign JWT using public/private key pairs, we can securely exchange information between two parties. Additionally, as the signature is calculated using the header and the payload, you can also verify that the content hasn’t been tampered with.</p><p><strong>Put it all together:</strong></p><p>The header and claims are JSON that are base64url encoded. The header, payload, and signature are appended together with a dot (.) to make a JWT.</p><p>So, the final JWT would be represented by the following pseudocode:</p><pre><em>var header = base64URLencode(header);<br>var payload = base64URLencode(payload);<br>var data = header + “.” + payload;<br>var signature = base64URLencode(HMACSHA256(data, secret));</em></pre><pre><em>var JWT = data + “.” + signature;</em></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3387a1b99f04" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>