<?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 Moses Gitau on Medium]]></title>
        <description><![CDATA[Stories by Moses Gitau on Medium]]></description>
        <link>https://medium.com/@gitaumoses4?source=rss-32aeeb8f7212------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Moses Gitau on Medium</title>
            <link>https://medium.com/@gitaumoses4?source=rss-32aeeb8f7212------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:51:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gitaumoses4/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[Patching and making persistent changes to an npm package in node_modules.]]></title>
            <link>https://medium.com/@gitaumoses4/patching-and-making-persistent-changes-to-an-npm-package-in-node-modules-1ad4cb7c2f64?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ad4cb7c2f64</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[node-modules]]></category>
            <category><![CDATA[patch]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Thu, 18 Jun 2020 12:02:18 GMT</pubDate>
            <atom:updated>2020-06-18T12:02:18.223Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*afuhKrZTtVwoXSEN" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">NeONBRAND</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I have encountered issues with npm packages multiple times, rushed to their github repos only to find pull requests awaiting review. In this tutorial, I’ll show you how to patch npm packages in order to proceed with their usage as you wait for the issues to be fixed.</p><h4>Identify the package causing the problem.</h4><p>The first and most important thing is to confirm that the package you are using is the main source of the problem. You need to accurately identify the line(s) that need to be changed in order to fix your bug.</p><h3>Patching</h3><p>A patch is a set of changes to a computer program or its supporting data designed to update, fix, or improve it. For example, let’s say you have a package called gitaumoses-react which has the following lines of code, and you would like to include GigaBytes as part of the file size calculation.</p><pre><em>function fileSize</em>(bytes) {<br>  <em>if </em>(!bytes) {<br>    <em>return </em>&#39;&#39;;<br>  }<br>  <em>if </em>(bytes &lt; 1024) {<br>    <em>return </em>Math.round(bytes) + &#39; bytes&#39;;<br>  } <em>else if </em>(bytes &lt; 1024 * 1024) {<br>    <em>return </em>Math.round(bytes / 1024) + &#39; KB&#39;;<br>  } <em>else</em> {<br>    <em>return </em>Math.round(bytes / (1024 * 1024)) + &#39; MB&#39;;<br>  }<br>}</pre><p>Follow the following steps to patch this package.</p><p>Install patch-package</p><pre>yarn add patch-package </pre><pre>// or for npm<br>npm i patch-package</pre><p>Make the required changes to the npm package in your node_modules folder.</p><pre><em>function fileSize</em>(bytes) {<br>  <em>if </em>(!bytes) {<br>    <em>return </em>&#39;&#39;;<br>  }<br>  <em>if </em>(bytes &lt; 1024) {<br>    <em>return </em>Math.round(bytes) + &#39; bytes&#39;;<br>  } <em>else if </em>(bytes &lt; 1024 * 1024) {<br>    <em>return </em>Math.round(bytes / 1024) + &#39; KB&#39;;<br>  } <em>else if </em>(bytes &lt; 1024 * 1024 * 1024) {<br>    <em>return </em>Math.round(bytes / (1024 * 1024)) + &#39; MB&#39;;<br>  } <em>else </em>{<br>    <em>return </em>Math.round(bytes / (1024 * 1024 * 1024)) + &#39; GB&#39;;<br>  }<br>}</pre><p>Run the following command to create a patch file. In this case, the package is gitaumoses-react</p><pre>patch-package gitaumoses-react</pre><p>This will create a patches folder in your project directory.</p><p>Add the following script in your package.json in order to have your patch applied everytime yarn install or npm install is run.</p><pre>&quot;scripts&quot;: {<br>   ...<br>   &quot;postinstall&quot;: &quot;patch-package&quot;,<br>}</pre><p>And now you will have the changes applied to your npm package.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ad4cb7c2f64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git rebase — a tool for excellent git workflow.]]></title>
            <link>https://medium.com/@gitaumoses4/git-rebase-a-tool-for-excellent-git-workflow-3aaa1bba40a4?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/3aaa1bba40a4</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[rebase]]></category>
            <category><![CDATA[git-workflow]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Sun, 30 Sep 2018 19:02:00 GMT</pubDate>
            <atom:updated>2018-09-30T19:32:27.510Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6oVTvcFjYdSLgkR3CZgvg.png" /></figure><p>The dictionary definition for the word rebase is: to establish a new base or level for something. Well, that’s actually what we will be discussing. Git rebase allows you to rewrite history (and no, we will not be making a time machine. Let’s do that another day, shall we?). We will be rewriting your commit history.</p><p>We will begin with a develop branch that’s a few commits ahead of the master branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*6QAVTliUYzOr48UuSftC1w.png" /></figure><p>We will have two collaborators, let’s call them Alice and Bob. We will assign Bob a task to work on the user login feature, and Alice will work on the user registration feature. Bob decides to name his branch feature_login and Alice names her branch feature_registration. After 2 days of unremitting hard work, Alice has made 4commits on her branch while Bob has made 3 commits. (Yes Bob is very lazy).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*ZcaN3SaPknEsAH22biC5Qg.png" /></figure><p>Our good employee Alice completes her work and she is ready to raise a pull request to the develop branch. She does a great job and we accept her pull request and merge her branch to the develop branch.</p><p>Since the feature_registration branch was based from the base of the develop branch, the merge does a fast-forward merge, which means, it applies the commits added by Alice to the develop branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*DB70te_tX512e-0TOEGMNg.png" /><figcaption>git merge feature_registration</figcaption></figure><p>Our lazy friend Bob continues to work on his feature and adds 2 more commits. He is now ready to make a pull request to the develop branch.</p><p>He has two problems:<br>1. He does not have the latest changes on the develop branch.<br>2. A fast-forward merge cannot be performed since the base of the feature_login branch is not at the HEAD of the develop branch.<br>3. Alice and Bob might have worked on the same files, and hence making a pull request may cause a merge conflict.</p><p>To avoid this, Bob decides to pull the changes from the develop branch and rebase his branch feature_login to the develop branch.</p><pre>git pull --rebase origin develop</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vP-321Y1tU1RbK2vTGShw.png" /><figcaption>(While at feature_login branch) git pull — rebase origin develop</figcaption></figure><p>As seen from the image above, the base of the feature_login branch is now at the HEAD of the develop branch. This will help Bob solve his problems in the following ways:<br>1. He now has the latest changes of the develop branch<br>2. He can now perform a fast forward merge since the base of his branch is at the HEAD of the develop branch. <br>3. He was able to resolve all the merge conflicts on his local workspace before pushing the changes to the remote repository.<br>4. He was able to continue working on his task, while Alice was working on her task without having to wait for her in order to branch off the develop branch.</p><p>Bob can now push his changes to the remote repository. We need to use the force push since the rebase rewrites the branch history.</p><pre>git push -f origin feature_login</pre><p>When Bob creates a pull request, we commend him for the job well done, give him a few dollars and merge his work to the develop branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTdCzX_lRYxCxrx3c0gYOA.png" /><figcaption>After merging the Pull Request made by Bob</figcaption></figure><p>Now, the develop and the feature_login branch are at the same commit. This creates a smooth workflow between Bob and Alice, their commits are easily tracked and the workflow is well structured.</p><h4>What would have happened if Bob did not rebase</h4><p>Let’s assume Bob was lazy and didn’t care about the workflow between him and Alice. After making his changes, he creates a pull request. Lucky for him, there are no merge conflicts and we merge his work to the develop branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YSfj834XsQW7YmRiiapEAQ.png" /></figure><p>This creates a merge commit (as seen at the HEAD of the develop branch). Comparing this and the previous workflow, the branching tree would have gotten more complex supposing we had employed many employees.</p><p>Git rebase is a powerful tool that allows collaborators to improve their workflow and structure a well built organization structure among them. Bob and Alice are a good example of how this tool can be of use.</p><h4>Credits</h4><p><a href="https://git-school.github.io/visualizing-git/">Git visualization tool </a>— helped in creating the diagrams seen from this article.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aaa1bba40a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python and PostgreSQL without ORM]]></title>
            <link>https://medium.com/@gitaumoses4/python-and-postgresql-without-orm-6e9d7fc9a38e?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e9d7fc9a38e</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[psycopg2]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Tue, 05 Jun 2018 12:03:46 GMT</pubDate>
            <atom:updated>2018-06-05T13:51:53.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*sSzO9HpsKbFCekkXCoxR2w.png" /></figure><p>With a wide range of databases, MySQL, PostgreSQL, SQLite, MongoDB, to mention but a few, and the need to switch between each of them in different states of the software development, Object Relational Mappers such as SQLAlchemy, ORMLite e.t.c always comes to the rescue. You may at some point find yourself in a position where you are required to implement a feature without an ORM at hand. In this tutorial, I am assuming you have the basic knowledge of the following:</p><ol><li>Python — the language. :)</li><li>PIP — a package management system to manage and install software packages.</li><li>Creating virtual environments with Python <strong>virtualenv</strong></li><li>You have already installed PostgreSQL. If you are running on Ubuntu, check my previous post <a href="https://medium.com/@gitaumoses4/installing-postgresql-on-a-machine-running-ubuntu-335f22f247bf">here</a>.</li></ol><h3>Getting Started</h3><p>Create a virtual environment and activate it in your project folder, if you have not already done so.</p><pre># On Windows<br>py -3 -m venv venv<br>source venv/Scripts/activate</pre><pre># On Linux<br>$ python3 -m venv venv;<br>$ source venv/bin/activate</pre><h4>Installing psycopg2</h4><p>When you think of Python, PostgreSQL and no ORM, psycopg2 should come in mind. It is the most popular adapter for Python with the core functionality to the Python DB API 2.0. It generally helps you execute your SQL statements and query the database.</p><p>With the virtual environment activated, run the following command to install psycopg2 to your environment.</p><pre>pip install psycopg2</pre><p>Okay, good.. Now let’s dive in into the code.</p><h3>Integrating psycopg2 into your python application.</h3><p>We will first need to import it to our python file. Remember to follow the <a href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> style guide. :)</p><pre>import psycopg2</pre><h4>Connecting to a database.</h4><p>Before connecting to your database, make sure the following conditions are satisfied:</p><ol><li>The postgreSQL server is up and running.</li><li>You have a database user created. (You may also use the ‘postgres’ user)</li><li>You have set the database password for the user are going to use. You can use the following commands to change the password for the postgres user.</li></ol><pre>\password postgres</pre><p>To change the password for any other user:</p><pre>\password &lt;user_name&gt;</pre><p>Okay, that’s done. Let’s connect to the database. Add the following line to your code:</p><pre>con = psycopg2.connect(&#39;dbname=&#39;testdb&#39; user=&#39;postgres&#39; host=&#39;localhost&#39; password=&#39;my_password&#39;)</pre><ol><li>Replace<strong> testdb </strong>with your database name.</li><li>Replase <strong>postgres</strong> with the user you will chose.</li><li>Replace <strong>‘localhost’ </strong>with the IP address of the database, keep it that way if the database is local.</li><li>Replace <strong>my_password</strong> with your user password.</li></ol><h4>Executing SQL statements</h4><p>You will need to create a cursor object to execute SQL statements to the database.</p><pre>cur = con.cursor()</pre><p>We are now ready to execute calls. Here is an example to create a simple table.</p><pre>cur.execute(&quot;CREATE TABLE test(id serial PRIMARY KEY, name varchar, email varchar)&quot;)</pre><p>Here is a simple example to query items from the table and obtain the result as a python object(s).</p><pre>cur.execute(&quot;SELECT * FROM test&quot;)<br>items = cur.fetchall()</pre><p>Finally, after all is done, make the changes persistent to the database by calling the commit function from the connection object.</p><pre>con.commit()</pre><h4>Close the database</h4><p>Once your application has successfully completed it’s need for the database connection, always remember to clean up :).</p><pre>cur.close()<br>con.close()</pre><h4>Psycopg2 Documentation</h4><p>This article helps you get started on creating the database connection and learning how to execute commands to the database. The full documentation for psycopg2 can be found <a href="http://initd.org/psycopg/docs/usage.html">here</a>.</p><blockquote>Gracias :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e9d7fc9a38e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adaptability, flexibility and embracing change.]]></title>
            <link>https://medium.com/@gitaumoses4/adaptability-flexibility-and-embracing-change-224056cc4e99?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/224056cc4e99</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[andela]]></category>
            <category><![CDATA[adaptability]]></category>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Tue, 05 Jun 2018 10:39:50 GMT</pubDate>
            <atom:updated>2018-06-05T13:16:20.850Z</atom:updated>
            <content:encoded><![CDATA[<p>Cockroaches, these little creatures with the connotation of disgusting habits, are very interesting. They will eat pretty much anything, and have even been known to eat other cockroaches and human flesh, gross right? With the ability to live to up to one week without a head. Yes, that’s right, WITHOUT a head!! They have also been known to hold their breath for up to 40 minutes. What’s my point anyway? Adaptability, these disgusting little creatures have incredible skills to adapt to their environment. And it got me thinking…</p><h4>The need for Adaptability</h4><p>I have recently been participating in Andela BootCamp Cycle 28 and I have had the chance to familiarize myself with different tools that are used in the software development world. With tasks to complete, deadlines to meet and outputs to deliver, and challenges to face, comes the need to adapt, restructure my previous coding skills and practices to show my A game.<br>I decided to switch to using VIM. VIM is a powerful text editor created by Bram Moolenaar and released in 1991, it gives the user a wide range of functionality and ability to navigate through with only the use of a keyboard. With a wide range of commands to use and remember. It’s is well known for the inability of users to exit the program. And I thought, hmmm, I joined Andela for the main reason to learn, why don’t I add one more item to the box and see how this goes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*CnpwkZvY4stTacCk7yppRg.png" /><figcaption>What they say.</figcaption></figure><p>During the Andela BootCamp week one, we were required to create an API with Flask, which comes hand in hand with learning new tools such as Pylint — a python linting program, git — a version control program and pivotal tracker — a project management tool. The use of these tools requires frequently switching between open windows back and forth which to me was quite frustrating based on the fact that I could keep up to 12 windows open. terminals, a huge number of browser windows and IDEs to edit different sections of my project.</p><p>When I first decided to use VIM, I could hardly keep up with using the commands: selecting text, jumping to a new line, replacing and finding text, switching between tabs and windows. It was hectic and slowing me down in completing my tasks for each day. But I couldn’t give up. I couldn’t let my initial experience in this new tool push me back from learning something. With a few tutorials from different sources all over the internet, I got to catch to a point where I was comfortable with this new and amazing tool. <br>With regard to the expectations for the Andela Bootcamp Challenge, I managed to learn how to install plugins such as autopep8 which automatically formats my Python code to follow the PEP8 convention and pylint which displays linting errors and warnings in VIM that actually helped me achieve what was expected of me in the challenge.</p><p>I can’t hold back my excitement in being able to complete my Andela Challenge and yet adapt myself to a new coding environment and skill.</p><p>Adaptability is always about being ready for change, embracing new skills and not giving up. I really appreciate the first session I had on Andela BootCamp day one about “growth mindset and being open-minded” that set me rolling into trying out new things and being ready to face challenges. I was challenged enough to find myself browsing for tools to help me keep up with the tasks assigned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=224056cc4e99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Flask application on Heroku]]></title>
            <link>https://medium.com/@gitaumoses4/deploying-a-flask-application-on-heroku-e509e5c76524?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/e509e5c76524</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[flask]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Thu, 31 May 2018 17:34:08 GMT</pubDate>
            <atom:updated>2018-05-31T17:36:48.692Z</atom:updated>
            <content:encoded><![CDATA[<p>Andela Bootcamp day 4, and I got the chance to deploy my first application to Heroku, and I would say, it was one of the challenging issues I have faced so far. It all began when my application was ready for deployment, I did my research as usual and had a few resources helping me out in the process, watching YouTube tutorials and reading medium blogs. After hours browsing relentlessly, I managed to pick up a few crucial instructions that I will discussion in the following section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSkUtK8pYPBSNeaVotU4Ug.png" /></figure><h4>Installing Heroku CLI</h4><p>This will help you manage your application directly from command line.</p><blockquote><a href="https://devcenter.heroku.com/articles/heroku-cli">Download and Install Heroku CLI</a></blockquote><h4>Creating a Heroku Account</h4><p>If you don’t have a Heroku account yet, don’t worry it’s free, you will head over to <a href="https://dashboard.heroku.com/login">Heroku</a> and get yourself a free account.</p><h4>Getting started</h4><p>You will need to have basic knowledge of git commands, using terminal (command line), running virtual environments in Python and creating Flask applications.</p><p>Login to heroku in your terminal with the following command.</p><pre>heroku login</pre><p>You will be prompted to enter your email and password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*3RJdJ79R_ya-PVv16lnyTw.png" /></figure><h4>Initializing a git repository</h4><p>Run the following command to initialize a git repository. Skip this step if you already have a git repository.</p><pre>git init</pre><h4>Create a heroku application</h4><p>You will be required to create a heroku application. In this example, I will create an application called <strong>your-first-heroku-app, </strong>which will be accessed from the link:<br><em>https://your-first-heroku-app.herokuapp.com. </em>Feel free to name your application as you wish.</p><pre>heroku create your-first-heroku-app --buildpack heroku/python</pre><p>Add the remote heroku git repository. (remember to replace <strong>your-first-heroku-app</strong> with the name of the heroku app you chose):</p><pre>heroku git:remote -a your-first-heroku-app</pre><h4>Install gunicorn</h4><p>Gunicorn is a python WSGI HTTP server that will serve your Flask application at heroku.</p><pre>pip install gunicorn</pre><p>Finally you will need to create <strong>requirements.txt</strong> file in your project root folder in order for heroku to detect it as a Python project. Run the following command within the project root folder.</p><pre>pip freeze &gt; requirements.txt</pre><p><em>Ensure your requirements.txt is in the project root folder, else your heroku application will fail to deploy.</em></p><h4>Adding a Procfile</h4><p>Create a Procfile in the project root folder and add the following line:</p><pre>web: gunicorn app:app</pre><p>The first app represents the name of the python file that runs your application or the name of the module it is in. The second app represents your app name. For example if your application runs from a run.py file that looks like this:</p><pre><em>from </em>flask <em>import </em>Flask<br><br>my_awesome_app = Flask(__name__)<br><br><br>@my_awesome_app.route(&#39;/&#39;)<br><em>def </em>hello_world():<br>    <em>return </em>&#39;Hello World!&#39;<br><br><br><em>if </em>__name__ == &#39;__main__&#39;:<br>    my_awesome_app.run()</pre><p>Then you will add the following line in your Procfile</p><pre>web: gunicorn run:my_awesome_app</pre><h4>Committing the files to Heroku’s repository master branch</h4><p>Stage the files for a commit and commit them</p><pre>git add .<br>git commit -m &quot;First commit for heroku&quot;</pre><p>Push the changes from your local master branch to heroku’s master branch.</p><pre>git push heroku master</pre><p>If you want to push from a different branch, say develop branch, you can use the following command</p><pre>git push heroku develop:master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*uvsTjT6MJRb9gqR3qygZRQ.png" /></figure><h4>Almost there</h4><p>Now fire up your browser and got to: ( remember to replace <strong>your-first-heroku-app</strong> with the name of the app you created.)</p><blockquote><a href="https://your-first-heroku-app.herokuapp.com/">https://your-first-heroku-app.herokuapp.com</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e509e5c76524" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teamwork is connected Independence]]></title>
            <link>https://medium.com/@gitaumoses4/teamwork-is-connected-independence-10ee27b5a71b?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/10ee27b5a71b</guid>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Wed, 30 May 2018 09:12:50 GMT</pubDate>
            <atom:updated>2018-05-30T11:05:32.606Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s Andela Bootcamp day 3, and all I can say is how amazed I am at the welcoming, brilliant, social and intelligent minds I have been engaged with, in the past few days. Andela is a community of developers and prospective developers that taps into the potential of young brilliant minds in most parts of the world. I have had the opportunity to be part of this amazing community and since then, not only have I learned much more than I expected, but I have had an opportunity to meet brilliant minds in the same journey as I am.</p><p>I received an email inviting me to go to Andela Open Saturday on 19th May. This is a day where we, the boot campers, are engaged in a session to familiarize ourselves with the environment and the resources we’ll use during our time at Andela if at all we make it. I arrived quite early, let’s say among the first 10 participants. Being quite reserved, I walked in into the conference, everyone was engaging in conversations excited that they made it past the interview. I find a vacant seat in the middle of the room.</p><h4>Making Friends</h4><p>Just as I sat down, another participant walks in (Maxwell Githinji, a name I got to learn a few moments later.) He is filled with excitement and walks straight to where I am seated, I grab a chair from the desk behind and pulls it to the empty space on my left. “Morning, I am Maxwell”, he breaks the silence. “Morning Maxwell, Moses here”, I say offering a firm handshake. I remembered a maxgit from our Slack channel. “Hmm, this must be him”, I quickly made an inference. I got to learn more about him and how he had begun learning by himself about Project Management tools like Pivotal Tracker, version control structures like Github and programming languages like Python. We managed to set up a Github repository and integrate with Pivotal Tracker as we engaged in our expectations for the day. It was a really fun moment and I got to learn a lot from him. His passion for excellence really challenged me.</p><p>It was now lunchtime. Yes, I can’t fail to mention that. We were instructed on the direction to follow in order to access the meals. As I left the room, I felt someone tap my shoulder, “Hey, you also made it to Bootcamp”, she says. I remembered her name from the pre-interview interactions. She goes by the name Janet Wairimu. I remembered her from the time before our interviews. Having a conversation about our expectations for the interviews and how we would encourage ourselves that we would all make it. I was glad that we both made it to boot camp. I managed to know here more when we were done with the Open Saturday as we were seated installing Ubuntu. She is a Multimedia University second year student taking Mathematics and Computer Science which apparently is the same course I am taking at JKUAT, which made me feel interested to know more about her passion for programming. I got to know her as a very friendly, reserved, brilliant person with a zeal for excellence and very determined.</p><p>I couldn’t fail to mention Kelvin Mwangemi, who caught my attention when we got assigned to the same group. Seated next to me, we got to know each other and had the change to help each other in a challenge we had been assigned before. I managed to know him more during the lunch break and I was fascinated by his passion to learn. He was a student from The Institute of Advanced Technology, he had begun learning by himself, a few months ago about version control systems and more of Python. I couldn’t believe such a talented, intelligent and interactive colleague had never been in Andela, being our first time here, we encouraged each other to be better persons, not give up and always help each other for the period during the Bootcamp.</p><p>The first day of Bootcamp started with all of us gathering outside for a “warm-up” exercise. That’s how I got to know my guide, Valeria Chemtai. She struck me as a very welcoming, fun and engaging person. I remember her introducing us to a game where we were supposed to remember each other’s names. She managed to break the ice among the Bootcamp participants and made us feel warm and welcome. And more-so when she was assigned to us, a group of five, as a guide during the week one boot camp. She gathered us outside for some fresh air and gave us directions on how to go about the challenges assigned to us. Her being a Bootcamp Facilitator and talking to her in Slack made me even more encouraged to be part of this amazing community.</p><p>I have had the chance to make many more friends and each one of them has made me know that teamwork is more important than solitude.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10ee27b5a71b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first Test Driven Development encounter]]></title>
            <link>https://medium.com/@gitaumoses4/my-first-test-driven-development-encounter-baab92b9ce68?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/baab92b9ce68</guid>
            <category><![CDATA[tdd]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Tue, 29 May 2018 12:31:00 GMT</pubDate>
            <atom:updated>2018-05-29T13:46:39.525Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*Ap7iq8I9HuobwyuRKJfNNA.png" /></figure><p>It’s Andela bootcamp day 2. I am excited to start working on my Python project. I have a lot ahead of me, outputs to provide and much more to learn. I decide to begin with gathering data and tapping information from all kinds of sources relevant to today’s tasks:</p><blockquote>Test Driven Development</blockquote><p>I head over to YouTube, wait, I think I am mentioning this too much. But well, that’s what happened. I am eager to know what Test Driven development is all about, so with my limited knowledge in this field I type out the first keyword that comes in my mind, “TDD”. A few videos popup, hmm! I hate making choices. Okay! okay! The first one is always the easiest, because well, it’s the first one. If you are familiar with agile researching then that’s what happened.</p><p>It’s a 50 minutes video, I lean forward ready to absorb as much knowledge as possible. I am tempted to click on the colorful videos on the right of the page, but I need to keep time. After 60 minutes of pausing and writing short notes, I feel wise enough to begin working on my task for the day. Did I mention I was tempted to click a video titled “How to Watch YouTube Videos?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*G2KAAjWv7ZX72Fn-uv_XOQ.jpeg" /><figcaption>20 minutes into my TDD tutorial video.</figcaption></figure><h3>Learning Experience</h3><p>I was able to learn how useful Test Driven Development is in all kinds of software development procedures. As a software development methodology introduced by Kent Beck of Extreme Programming fame. With this and much more in mind, I got down to structure my project, laying down the basic models and building up a concrete structure in mind. Based on the information I gathered and my level of understanding I would personally give a thumbs up to the Test Driven Development methodology.</p><h4>Stages of Test Driven Development</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*SY2qSO11sdH11x9d5dweug.gif" /></figure><p>So before you get down to code, and you have neither structured your own code nor engaged yourself in Test Driven Development, always keep this in mind.</p><blockquote>The bitterness of poor quality remains long after the sweetness of meeting the schedule has been forgotten.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baab92b9ce68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Success - a result of persistence.]]></title>
            <link>https://medium.com/@gitaumoses4/success-a-result-of-persistence-c3e0a32001f6?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3e0a32001f6</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[piano-lessons]]></category>
            <category><![CDATA[piano]]></category>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Mon, 28 May 2018 12:13:48 GMT</pubDate>
            <atom:updated>2018-05-28T19:57:15.644Z</atom:updated>
            <content:encoded><![CDATA[<p>Well, Colin Powel once said,</p><blockquote>Success is the result of perfection, hard work, learning from failure, loyalty, and persistence.</blockquote><h4>The Passion</h4><p>It once began when I was very young, my passion for piano grew overwhelming and intense. And I decided that when I grow up, I will definitely learn this intriguing and mind blowing musical instrument. I could visualize it, the keys well laid in order of black and white, I would feel an excitement gush through my spine when I saw anyone carrying this beautiful device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*oDWCLY1HNcN_t4O6y4cXpQ.jpeg" /><figcaption><a href="https://www.pexels.com/photo/black-and-white-blur-close-up-fingers-221569/">https://www.pexels.com/photo/black-and-white-blur-close-up-fingers-221569/</a></figcaption></figure><p>It all began when I got to high school, I got the opportunity to be exposed to a piano keyboard that was owned by the school Christian Union. Every Saturday there was this guy who used to practice all afternoon. His skills intrigued me. His fingers moving incredibly fast, the piano bowing down to his admirable skills. The music digging deep into my heart, blowing my mind away. “I have to learn this”, I said to myself. Feeling so discouraged that I couldn’t get the opportunity to learn from him. Well, I was a minor and he was a senior. And this meant that he wouldn’t waste his time teaching me.</p><p>I am always willing to learn new skills, and especially when it involves electronics gadgets. My passion increased as days got by and finally I got myself a piano a few months back. And I decided this was it.</p><blockquote>The time has finally come.</blockquote><h4>The Learning Experience</h4><p>Back to the Internet, and as usual <a href="https://google.com/">Google</a> comes to our rescue. Time to gather learning materials. Downloading PDFs and tutorial videos from <a href="https://youtube.com/">YouTube,</a> listening to masterpiece music pieces from well known pianists. This is too much. There was so much to learn, so much to comprehend and understand. Finding a relevant learning source was nearly impossible. I spend most of my days browsing on YouTube videos and but all I could find was really complex piano practices that were not at my level yet. Oh NO!!</p><p>It starts with learning sheet music, well, to me it wasn’t that easy. The coordination between my brain and my fingers was literally impossible. It felt as if trying to read that one language you have never been familiar with. If you don’t know how to read Chinese, then that’s a good example of what I was going through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*SNXqxIdNWe8E8cDwADIVag.jpeg" /><figcaption>Seen this somewhere? Yes, That’s Sheet Music.</figcaption></figure><p>No, I can’t give up. I remember Colin Pawel, “<em>Success is the result of perfection, hard work, learning from failure, loyalty, and persistence.</em>”, but still it was four months now, still feeling like I have not made any progress so far. Back to YouTube, but the tutorial videos seemed as if they were all meant to discourage me. Did I mention I am also an upcoming Computer Programmer? Well, now you know. Giving this much though, I decided that I was not meant to be a pianist, based on the fact that it didn’t take me much effort to understand the basics of Computer Programming.</p><blockquote>“Some skills are meant for some people”, I thought.</blockquote><h4>The Growth Mindset</h4><p>I came across a certain YouTube video titled <a href="https://www.youtube.com/watch?v=iHNe_iWSaQ4"><strong>2 Years Piano Progress [Self Taught]</strong></a><strong>.</strong> I couldn’t believe it, the perfection, the persistence and hard work of the narrator gave me a speck of encouragement. So small, yet effective that It reminded me of <strong>Colin Pawel.</strong></p><blockquote>I think it’s time I made myself proud.</blockquote><p>I headed back to YouTube, browsed coherently searching for probable tutorials and pieces that would water my speck of encouragement. And this passion to learn more increased consistently in me. After a whole week of intense searching and trying all kinds of tutorials, I finally found a savior. One that I envy in every way. An erudite of all kinds of piano knowledge. I was stunned by his skills, and not forgetting the amazing teacher he was. He goes by the name <strong>Nikolas Nuñez, </strong>a professional and amazing piano teacher and offers his tutorials at <a href="https://improvpianotips.com/">ImprovPianoTips</a>. I was determined to learn and grow in terms of my passion for being a professional pianist.</p><h4>Conclusion</h4><p>It has been one month now, and the progress I have made so far is intensely amazing. With the resources from Nikolas Nuñez, I have advanced greatly in the field and I am eager to continue in the same way, with a growth mindset and yearn for knowledge.</p><h4>Application in Andela Bootcamp</h4><p>As I mentioned I am an upcoming software developer and recently had the privilege to join Andela, a company that trains Software developers. Based on my personal inference from the past days I have been in Andela, and the tasks assigned to me, growth mindset is definitely a skill I am going to improve on. I have come to value being persistent and adaptable in order to grow. And I have developed my own slogan:</p><blockquote>With persistence and adaptability comes growth and consequently <strong>success</strong>.</blockquote><p>I look forward to self-learning, being challenged and most of all learning from my fellow team mates. Everyday I have been engaged with something I never knew before. New technical skills and non-technical skills including collaboration, seeking feedback, having a growth mindset and focusing on teamwork. YOYO!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3e0a32001f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing PostgreSQL on a machine running Ubuntu]]></title>
            <link>https://medium.com/@gitaumoses4/installing-postgresql-on-a-machine-running-ubuntu-335f22f247bf?source=rss-32aeeb8f7212------2</link>
            <guid isPermaLink="false">https://medium.com/p/335f22f247bf</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Moses Gitau]]></dc:creator>
            <pubDate>Sun, 20 May 2018 12:41:18 GMT</pubDate>
            <atom:updated>2018-05-21T05:17:40.376Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*PY24xlr4TpOkXW04HUoqrQ.jpeg" /></figure><p>If you are here, I assume you have had one or two issues with PostgreSQL installation. Well, you are not alone, and hopefully I will be of help to solving your problem. Enough with the jibber-jabber let’s get to work.</p><h4>Remove all previous installation of PostgreSQL</h4><p>First and foremost, you might need to remove all the previous installation of PostgreSQL packages from your machine. That is if you have tried the installation before. The following beautiful command will help you do so.</p><pre>$ sudo apt-get remove --purge &quot;postgresql.*&quot;</pre><p>Once all is said and done. You will see some disturbing output like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*uDmQgfpQrIX1uoF4qvu66Q.png" /></figure><h4>Installation</h4><p>Here comes the elephant. Don’t run away yet. Brace yourself. It’s gonna be a smooth ride.</p><blockquote>You will need to update your packages, <strong>sudo apt-get update</strong>, and make sure you are connected to the Internet. But I guess you are, otherwise you might not be reading this. :)</blockquote><pre>$ sudo apt-get update</pre><blockquote>Finally install PostgreSQL. Run the following command</blockquote><pre>$ sudo apt-get install postgresql postgresql-contrib</pre><h4>Starting the Server</h4><p>Once the installation is complete, you will need to start the PostgreSQL server.</p><pre>$ sudo service postgresql start</pre><p>Relax, we are almost there. :) Finally, you will login as postgres user in your machine to be able to login into the database. The following command will log you in.</p><pre>$ sudo su postgres</pre><p>And finally you can now connect to the database.</p><pre>$ psql</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*8Wsj5ZRENTIHVOO5CBUZeA.png" /></figure><h4>Changing Database Password</h4><p>Type in the following command to change the <strong>postgres</strong> user password</p><pre>\password</pre><p>Remember, every step is as important as any other. Goodluck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=335f22f247bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>