<?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 Nyaga Andre Roy on Medium]]></title>
        <description><![CDATA[Stories by Nyaga Andre Roy on Medium]]></description>
        <link>https://medium.com/@nyagaandreroy?source=rss-4821b2092a7c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OaMZtAkHjIPk9ljV.jpg</url>
            <title>Stories by Nyaga Andre Roy on Medium</title>
            <link>https://medium.com/@nyagaandreroy?source=rss-4821b2092a7c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:50:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nyagaandreroy/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[The path of a self-taught developer.]]></title>
            <link>https://medium.com/@nyagaandreroy/the-path-of-a-self-taught-developer-52ca8f0e050e?source=rss-4821b2092a7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/52ca8f0e050e</guid>
            <category><![CDATA[path]]></category>
            <category><![CDATA[self-taught]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Nyaga Andre Roy]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 21:10:24 GMT</pubDate>
            <atom:updated>2020-03-27T21:10:24.717Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F0je1X60UIVRDYia2SKGEQ.jpeg" /><figcaption>At some point in our lives, our progress greatly depends on our self-taught abilities.</figcaption></figure><p>Acquiring a new skill is good but knowing exactly which path to take in advance is best. For every decision taking to learn something new, there is always this “where” or “what” question. Where will I start, what should I do, where will I get material, what so ever be the case there is always a “where” or “what” question. Knowing exactly which path to take as a newbie in technology is almost impossible unless you follow a strict guide from a mentor or any other source. This article is more like a guide through the walk of a self-taught web developer.</p><p>Some years ago when I started learning python, I asked a friend about a road map to becoming a programmer and what he did was to send me a copy of his computer science curriculum. I wasn’t asking to go back to school, all I needed was a guide on how to become a self-taught developer and not a computer science curriculum. So I decided to come up with something like this to help those who are presently in the same situation that I was. In this article I will be sharing the stages I went through to become a Ruby full-stack developer.</p><h3><strong>Who is this article for?</strong></h3><p>Everybody is not capable of paying for programming classes nor boot camps where they could have the privilege of interacting one-on-one with a mentor or teacher but there is a lot of free information out there that can get you started which is the purpose of this article. I learned programming without spending a dine on online resources, I kept my money for my internet bills.</p><p>How do I become a self-taught developer?</p><h3>Choose a programming language.</h3><p>The very first thing you need to address as a newbie is to choose a programming language to focus your energy on. There are a lot of programming languages out there but there is a specific one for you which you need to identify based on the following criteria;</p><ul><li>Availability of resources: You will not want to choose a programming language that has limited material online. To avoid being stuck all the time, choose a language that has good documentation and a vast spectrum of resources out there. If you have someone who guides you, it will be preferable to start with the language that he does to ensure that you have someone you can turn to whenever you get stuck.</li><li>Easy learning scope: For people without a programming background, this point should highly be considered. As a biology student who loved programming, I started learning Java and with all my motivation I gave up on programming due to the complexity of the language. Later on, I fell on a youtube video that listed programming languages based on complexity and salary, Python was the first on the list so I decided to start learning python which I realized was very easy to understand and my motivation was increased.</li><li>I will recommend languages such as Python, P.H.P, and Ruby for those who are still wondering what programming language to choose.</li></ul><h3>Join an online community.</h3><p>Creating an online community is a normal exercise that every programming group practices in order to share maximum information about their technology and to help people who get stuck at some point. Every programming language has a community so choose a focused learning community based on your programming language and start contributing as little as you can by asking questions and answering those that you know. When I started programming in Ruby, I studied on a free platform called <a href="https://www.theodinproject.com/">Odin Project</a>. It has a very good curriculum on learning full-stack development as a Ruby on Rails developer and a community made up of professionals and learners who are ready to help you whenever you get stuck. Presently I am a member of a Ruby group on Facebook and on Linkedin and it is amazing when a good number of people give you feedback on something that you are working on. If you have not yet joint any group, do a Facebook search on the groups that utilize the programming language that interests you, join the group and start participating.</p><h3>learning tools.</h3><p>There are excellent courses on UDEMY and I wish I had the money to purchase some for myself. For those who have financial limitations as I did, there are many other options out there that we will be discussing here. For visual learners, there is the popular Youtube. There are a lot of videos on Youtube and you should be careful about choosing the course you wish to take. Choose video courses based on the number of views, likes, subscribers and most importantly the publishing date. I will advise you to, first of all, take complete courses before getting into videos explaining specific concepts, this will help to keep you on track so you don’t get lost all the time.</p><p>For learners who love reading, we have platforms like F<a href="https://www.freecodecamp.org/">reecodecamp</a>, <a href="https://www.codecademy.com/">Codecademy</a>, <a href="https://www.theodinproject.com/">Odin project</a>, <a href="http://w3schools.com/">W3schools</a>, etc. I strongly recommend Freecodecamp. They teach by example and also have an online text editor where you can solve exercises and a place where to check for solutions if you are unable to solve an exercise. For Ruby Programmers, I will strongly recommend the Odin project.</p><p>After learning data structures, it’s a good habit to practice solving algorithmic challenges. Up till today, I practice algorithms 2 hours a day just to keep my brain active. Remember that your primary duty as a developer is to solve problems and good practice for your problem-solving skills is to work on algorithmic exercises. Suggested platforms for this exercise include <a href="https://www.hackerrank.com/">Hackerrank</a>, <a href="https://leetcode.com/">Leetcode</a>, and <a href="https://repl.it/">Repl</a>.</p><h3>Project-based learning.</h3><p>As a self-taught developer, one of the ways you can evaluate yourself is by working on projects. This is one of the reasons why the Odin project is a unique platform. It provides you with projects that will help you test your understanding of the concepts you learn. I remember the first time I completed a JavaScript course, I was so happy and excited but when I decided to take a project, I realized I did not understand most of the concepts. Before telling people that you know a particular programming language, make sure to have done at least 5 projects using the language if not you will embarrass yourself.</p><blockquote>Before telling people that you know a particular programming language, make sure to have done at least 5 projects using the language if not you will embarrass yourself.</blockquote><h3>What to do when you get stuck.</h3><p>Don’t be afraid of getting stuck because you can’t escape from it. Even professional programmers get stuck at some point proven that nobody is the master of knowledge. In this last section of the article, we are going to talk about what to do when you get stuck. Asking questions is so important to a developer that I completed a whole project on that. I will limit the scope of this section to revealing some important sites where you can ask questions in case your respective forums are unable to help you but do make sure to read articles on how to properly ask questions, there are even some Youtube videos on that.</p><p>Before asking a question to a friend or to any forum, make sure that you were unable to find the answer on google. As a programmer, your best friend is Google. Always make sure to google search any difficulty that you have because you can’t be the first person having it.</p><blockquote>As a programmer, your best friend is Google.</blockquote><p>I was building an e-commerce app and I got stuck when trying to implement the payment method using a third party API called Monetbil. Nobody knew about Monetbil in my Forum since it is a Cameroonian payment method. The only option left was the support team. I wrote to them and I was surprised to see how fast they responded after I had wasted time searching for solutions in other places. Always contact the support team of a resource you want to consume whenever you get stuck.</p><blockquote>Always contact the support team of a resource you want to consume whenever you get stuck.</blockquote><p>There is an important platform for asking questions that you need to know about. It is called <a href="https://stackoverflow.com/">StackOverflow</a>. StackOverflow allows you to ask questions and to answer other people&#39;s questions with the best answers being upvoted. Most of the questions I google search when I get stuck have answers on StackOverflow since other programmers faced the same difficulty and went ahead and asked.</p><p>I know it was a very long article and I hope it worth your time. Feel free to contact me If you need any further information that I failed to provide in this article and I am also open to counseling newbies who want to have their way through the tech world but are afraid of a lot of unknowns. God bless you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52ca8f0e050e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Powerful admin dashboard with rails activeadmin.]]></title>
            <link>https://medium.com/@nyagaandreroy/powerful-admin-dashboard-with-rails-activeadmin-6bcf0b9d163f?source=rss-4821b2092a7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bcf0b9d163f</guid>
            <category><![CDATA[dashboard-design]]></category>
            <category><![CDATA[admin]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Nyaga Andre Roy]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 20:58:28 GMT</pubDate>
            <atom:updated>2020-03-27T20:58:28.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GSO6pdt5VJAOGAROlaObDw.jpeg" /><figcaption>Save time and efforts with activeadmin in your rails applications.</figcaption></figure><p>Do you have an application that needs administrative activities from specific authenticated users? active admin is what you need. Long before active admin, developers had to go through the stress of not just building applications but also user admin dashboards through which content could be added or manipulated. Some months ago, I built an eCommerce website using rails and after implementing active admin, I realized I saved up to 30% development time compared to when I did not use active admin. Simple to implement but powerful features is how I describe activeadmin.</p><p>I am going to take you through a step by step explanation on how to setup activeadmin in any rails application.</p><p><a href="https://rubygems.org/gems/activeadmin">Activeadmin</a> is an administration framework for Ruby on Rails. Opppps!! did I just use a complicated word? Nothing to be scared of, It simply means, activeadmin provides you with a fully functional administrative dashboard in your rails administration. Enough with the praises, let’s give this app an administrative dashboard.</p><h4>Step-One: Setting up a rails application.</h4><p>Create a rails application using the rails new command in your terminal.</p><pre>~$ rails new activeadmin-application</pre><p>Wait until the command is fully carried out. Open the application folder that gets created(activeadmin-application) in your preferred text editor. Go to the <a href="https://rubygems.org/">ruby gem</a> main site, make a copy of the gems activeadmin and device. If you are wondering why we need device, It is a dependency of activeadmin that is used to create and authenticate admin users. Paste the two gems in your Gemfile and run bundle install.</p><pre>gem &#39;activeadmin&#39;, &#39;~&gt; 2.6&#39;, &#39;&gt;= 2.6.1&#39;<br>gem &#39;device&#39;, &#39;~&gt; 0.0.0&#39;</pre><p>Make sure to set a root route for the application and a controller to which the route maps to. This is to avoid routing errors after running the development server. To save time, we will not do that in this article but just to hint you a little bit, generate a controller with an action, and use the route of the action as the root route defined in your route file. In case you generated an articles controller with an index action, this is how you would define the root route.</p><pre>root &quot;articles#index&quot;</pre><p>Do not forget to create a view for the action to avoid missing template errors.</p><p><strong>Step-Two: Creating models.</strong></p><p>For this example, we will use two models, article and comment in a many-to-one relationship. This means that an article can have many comments while a comment can only belong to an article.</p><pre>rails g model Article content:text<br>rails g model Comment article:references comment:string</pre><p>article:references will create a many-to-one relationship between articles and comments. The above commands will create two migration files that you will have to migrate using the command.</p><pre>rails db:migrate</pre><p>Include the relationships in your model files.</p><pre>activeadmin-application/app/models/article.rb</pre><pre>class Article &lt; ApplicationRecord<br> has_many :comments<br>end</pre><p>for the comment model.</p><pre>activeadmin-application/app/models/comment.rb</pre><pre>class Comment &lt; ApplicationRecord<br> belongs_to :comment<br>end</pre><p><strong>Step-Three: setting up activeadmin.</strong></p><p>Run the following command in your terminal.</p><pre>rails generate active_admin:install</pre><p>This will create a new folder called admin in your app directory and a migration file in the activeadmin-application/db/migrate folder. Migrate the database by running the command</p><pre>rails db:migrate</pre><p>Open activeadmin-application/db/seed.rb file and ensure that the following line of code is included.</p><pre>AdminUser.create!(email: ‘<a href="/service/mailto:admin@example.com">admin@example.com</a>’, password: ‘password’, password_confirmation: ‘password’) if Rails.env.development?</pre><p>This line is responsible for creating an admin user who will use the above credentials to log in to the dashboard in the development environment. For production, remove the snippet which says</p><pre>if Rails.env.developmen?</pre><p>Seed your development database with the following command to create a user.</p><pre>rails db:seed</pre><p><strong>Step-Four: Registering models to the admin dashboard</strong></p><p>After creating our models and setting up activeadmin, we need to register our models to the dashboard for them to display on the dashboard. In order to do this, run the command</p><pre>rails generate active_admin:resource[MyModelName]</pre><p>In our case, it will be</p><pre>rails generate active_admin:resource Article</pre><p>and</p><pre>rails generate active_admin:resource Comment</pre><p>The above commands will create two files, app/admin/article.rb and app/admin/comment.rb. Open the files and configure them as such</p><pre>app/admin/article.rb</pre><pre>ActiveAdmin.register Article do<br>  permit_params :content<br>end</pre><pre>app/admin/comment.rb</pre><pre>ActiveAdmin.register Comment do<br>  permit_params :article_id, :comment<br>end</pre><p><strong>Step-Five: Viewing dashboard on Browser</strong></p><p>We have setup activeadmin and registered our models, now is the time to view our work on the browser. Startup your development server by running the command</p><pre>rails s</pre><p>Open your browser and visit the URL given by your development server on the command line. By default, it is <a href="http://localhost:3000/">http://localhost:3000</a>. This will open the view that the root route maps to. To access the dashboard, visit the URL <a href="http://localhost:3000/admin">http://localhost:3000/admin</a> and you will be prompted to enter your credentials as an admin. Remember we seeded an admin user to the database with defined credentials. If you can’t remember, visit your db/seed.rb and check this line to see your credentials.</p><pre>AdminUser.create!(email: ‘<a href="/service/mailto:admin@example.com">admin@example.com</a>’, password: ‘password’, password_confirmation: ‘password’) if Rails.env.development?</pre><p>Enter your credentials and you should have access to the dashboard. On the navbar, you should see all your registered models, click on any one of them to view, create, update and delete resources.</p><p>Thanks for making it to the end of this tutorial, I hope it helped you and added a new trick in your bag of programming tricks. Stay blessed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bcf0b9d163f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Naming CSS selectors in a creative and consistent way.]]></title>
            <link>https://medium.com/@nyagaandreroy/naming-css-selectors-in-a-creative-and-consistent-way-c0e4ba59499c?source=rss-4821b2092a7c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0e4ba59499c</guid>
            <category><![CDATA[id]]></category>
            <category><![CDATA[selectors]]></category>
            <category><![CDATA[naming]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[class]]></category>
            <dc:creator><![CDATA[Nyaga Andre Roy]]></dc:creator>
            <pubDate>Mon, 25 Nov 2019 19:25:46 GMT</pubDate>
            <atom:updated>2019-11-25T19:25:46.403Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNF9eD7murgk0fY5YnCJLw.jpeg" /></figure><blockquote>There are two major problems in computer science of which the assigning of names is among — Phil Karlton.</blockquote><p>The effectiveness in selecting names for CSS selectors comes as an extinct with experience as you frequently play around with CSS. Even if you don’t read this article, with time you will still be able to figure out how to achieve this but reading this article till the end will help you save some time in the process of understanding how it works.</p><p>The information I am about to share with you comes from my personal experience in solving conflicting CSS selector names. It is also important to note that there is no standard or a particular way of doing this. Emphasizing structural organization and consistency may save you a lot of time in trying to choose the name of a CSS selector that will not conflict with subsequent names that you will want to use.</p><p>Imagine you realized your code has a bug and in trying to solve the bug, you come across a CSS selector you can’t remember what it does and why it is where it is. You will have to trace the origin of the selector before solving the issue which will increase debugging time. This is common in big projects with a lot of HTML and CSS.</p><p>You could also be In a situation where you want to name a selector but nothing comes in mind or you unknowingly give a previously used name to a selector resulting in conflicting names.</p><p>I wish to emphasize that I won’t be talking about the rules of CSS naming conversions built around the <a href="https://www.freecodecamp.org/news/css-naming-conventions-that-will-save-you-hours-of-debugging-35cea737hd849/">BEM(Block, Element, Modifier) methodology</a>.</p><p>To refresh our minds, a CSS selector is an <a href="https://www.w3schools.com/html/html_attributes.asp">HTML attribute</a> that is used to get an HTML content for styling or other javascript manipulations. To reduce the scope of this article we will focus more on simple selectors, precisely ids and classes.</p><pre><strong>&lt;div class=&quot;navbar&quot; id=&quot;navbar-div&quot;&gt;This is navbar&lt;/div&gt;</strong></pre><p><a href="https://www.w3schools.com/tags/att_id.asp">Ids</a> are unique and no two HTML tags should have the same id in order to avoid conflicts while <a href="https://www.w3schools.com/cssref/sel_class.asp">CSS classe</a>s represent a group of HTML content that will have to share a common property, it could be color type, font-size, list or links, etc.</p><p>The way I name selectors is very basic and practical and it consists of Figuring out the name of the section to be styled. Given that I want to style an eCommerce web-page and I am at the level of the navbar. All the HTML elements of the navbar will have Ids and classes prefixed or suffixed with navbar which is the name of the section to be styled.</p><pre>&lt;section <strong>id=&quot;navbar-div&quot;</strong>&gt;</pre><pre>  &lt;div <strong>id=&quot;navbar-links-div&quot;</strong>&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-first-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-second-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-third-link&quot;</strong>&gt;click&lt;/a&gt;<br>  &lt;/div&gt;<br>&lt;/section&gt;</pre><p><strong>This is important in three ways:</strong></p><ol><li><strong>It facilitates creativity on time:</strong> Imagining names for selectors some times is confusing especially for beginners. If you know the name of the section you wish to style then this point shouldn’t be too much of a problem as you can start <em>with what you know. </em>So if I am styling the about section of a website, the first name that strikes my mind is about page and that alone is enough as the name of a wrapper.</li><li><strong>It ensures uniqueness of names:</strong> Different sections of a webpage usually have the same HTML elements that we may want to style differently. The navbar may have links as well as the footer but the names of the sections will help us give different CSS properties to those links. The name of the links of the navbar will be prefixed or suffixed by navbar(navbar-links) while those of the footer will be prefixed by footer(footer-links).</li></ol><pre>&lt;section <strong>id=&quot;navbar-div&quot;</strong>&gt;</pre><pre>  &lt;div <strong>id=&quot;navbar-links-div&quot;</strong>&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-first-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-second-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>    &lt;a <strong>class=&quot;navbar-links&quot;</strong> <strong>id=&quot;navbar-third-link&quot;</strong>&gt;click&lt;/a&gt;<br>  &lt;/div&gt;<br>&lt;/section&gt;</pre><pre>&lt;section <strong>id=&quot;footer-div&quot;</strong>&gt;</pre><pre>   &lt;div <strong>id=&quot;footer-links-div&quot;</strong>&gt;</pre><pre>      &lt;a <strong>class=&quot;footer-links&quot;</strong> <strong>id=&quot;footer-first-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>      &lt;a <strong>class=&quot;footer-links&quot;</strong> <strong>id=&quot;footer-second-link&quot;</strong>&gt;click&lt;/a&gt;</pre><pre>      &lt;a <strong>class=&quot;footer-links&quot;</strong> <strong>id=&quot;footer-third-link&quot;</strong>&gt;click&lt;/a&gt;<br>   &lt;/div&gt;<br>&lt;/section&gt;</pre><p>3. Debugging purposes: Section naming conversions also facilitates debugging. Imagine the links of the about section are not properly responding. Tracing won’t be an issue since you already know the prefix or suffix of the names of the selectors you assigned to them.</p><p>This may not be a complex concept as compared to others but having this in mind at an early stage as a front end developer may save you from a lot of complications attributed to naming.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0e4ba59499c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>