<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: dev-aspires</title>
    <description>The latest articles on Forem by dev-aspires (@devaspires).</description>
    <link>https://forem.com/devaspires</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F842231%2F72416243-7bb5-4f53-8ba6-9349acc4e321.jpeg</url>
      <title>Forem: dev-aspires</title>
      <link>https://forem.com/devaspires</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/devaspires"/>
    <language>en</language>
    <item>
      <title>My Developer Journey, Captured in My New Portfolio</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Sun, 15 Dec 2024 18:34:21 +0000</pubDate>
      <link>https://forem.com/devaspires/my-developer-journey-captured-in-my-new-portfolio-3245</link>
      <guid>https://forem.com/devaspires/my-developer-journey-captured-in-my-new-portfolio-3245</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hey devs, I just launched my portfolio! How does it look?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m excited to share that my developer portfolio is finally live! After countless hours of designing, coding, and tweaking, it’s out in the wild. It’s a showcase of my skills, projects, and a bit about me as a developer.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I’d love your feedback&lt;/em&gt;&lt;br&gt;
Since you’re my fellow devs, I know you have a good eye for detail. I’d really appreciate it if you could take a look and let me know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the design feel clean and professional?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is it easy to navigate?&lt;/li&gt;
&lt;li&gt;What could be improved?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I built this with a focus on highlighting my work and making the experience seamless for visitors. But, as we all know, there’s always room to grow!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open to opportunities&lt;/strong&gt;&lt;br&gt;
I’m also currently open to work or collaborations. I specialize in frontend development (React, Next.js), backend work (Node.js, Express), and database management (MongoDB). If you have a project or role in mind, let’s chat!&lt;/p&gt;

&lt;p&gt;Here’s the link to my portfolio: &lt;a href="https://johnossai.com.ng/" rel="noopener noreferrer"&gt;Portfolio Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look, share your thoughts, and let me know if there’s anything I can improve—or if you think it’s ready to share with the world!&lt;/p&gt;

&lt;p&gt;Thanks for taking the time, and I look forward to hearing your thoughts!&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br&gt;
John Ossai&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>career</category>
    </item>
    <item>
      <title>Suggest me a writing Gig.</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Thu, 21 Apr 2022 14:03:09 +0000</pubDate>
      <link>https://forem.com/devaspires/suggest-me-a-writing-gig-2pi4</link>
      <guid>https://forem.com/devaspires/suggest-me-a-writing-gig-2pi4</guid>
      <description>&lt;p&gt;Hi Fellow devs,&lt;br&gt;
My name is John Ossai.&lt;br&gt;
I am looking for a writing gig, if you have any you can recommend me to, I will certainly be glad. Thank you.&lt;/p&gt;

</description>
      <category>writing</category>
    </item>
    <item>
      <title>While loops in Java</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Sat, 09 Apr 2022 08:13:15 +0000</pubDate>
      <link>https://forem.com/devaspires/understanding-loops-in-java-while-loop-3e3g</link>
      <guid>https://forem.com/devaspires/understanding-loops-in-java-while-loop-3e3g</guid>
      <description>&lt;p&gt;Incase you missed my last tutorial on Java for loops, you can click the link below.&lt;a href="https://dev.to/devaspires/understanding-loops-in-java-java-for-loop-1607"&gt;Java For Loops&lt;/a&gt; In the last tutorial I explained in details, the concept of for loops in Java, and how to use it in your programs. However, in this tutorial I will be explaining the concept of while loop in Java, the syntax of while loop and how to use a while loop to iterate through an array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The concept of a while loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While loop is among the types of loops associated with Java, and it's been regarded as the most basic type of loop in Java, and therefore, can be utilize for several purposes within your program. Just like the for loop, a while loop can be used to perform some operations on the basis of a condition. In while loop, a counter is not always included. The number of iteration of a while loop depends on how often the while loop condition returns &lt;code&gt;true&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Initialization in while loop, most times can be optional, unlike for loop. Sometimes a while loop doesn't always execute in a cycle.&lt;br&gt;
Take for example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System.out.println("You Input a wrong number");
       int i = input.nextInt();
       while(i==1||i==2||i==3||i==4){
           System.out.println("inside the while loop block");
       }
       //if the user chooses any number different from 1,2,3 and 4.
       System.out.println("outside the while loop block")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code uses a while loop to validate a user input, on the basis of some conditions, this while loop therefore iterates only once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax of a while loop&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while(condition){
//Statements
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The while loop condition accept an argument that returns a boolean value &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;,  if &lt;code&gt;true&lt;/code&gt; the code within the while loop execute, but if &lt;code&gt;false&lt;/code&gt; the while loop terminates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The flow of every while loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The while loop has an accepted flow: &lt;em&gt;initialization&amp;gt;condition&amp;gt;statements execution&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The first stage is the initialization stage, it is regarded as the first stage of a while loop, this could be done by declaring a variable and initializing it as well.&lt;br&gt;
The second stage is the condition stage, this stage must either return a &lt;code&gt;true&lt;/code&gt; value, or &lt;code&gt;false&lt;/code&gt; value. If it returns &lt;code&gt;true&lt;/code&gt;, the Statement in the while loop execute, but if it returns &lt;code&gt;false&lt;/code&gt;, the while loop terminates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using while loop as a counter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just like a for loop, a while loop can also be used as a counter. The below program uses a while loop to iterate through from, 2 - 20, to print out even numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int j = 2;
       while(j &amp;lt;=20){
           System.out.println(j);
           j+=2;
       }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, j is initialize to 2, the condition is checked if j is less than or equals to 20, if it returns true, the statement execute, but if it returns false the while loop terminates.&lt;br&gt;
If you look closely, the statement enclosed in the while loop has an incrementor, which is used to increment the value of i to avoid an infinite loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While loop can be used to iterate through an array&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int[] age = {20, 30, 40, 40, 90};
        int i = 0;
        while (i &amp;lt; age.length)
        {
            System.out.println(age[i]);
            i++;
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code, we have an array of age, the while loop is used to iterate through the array and print out each elements in the array. The &lt;code&gt;age.length&lt;/code&gt; is use to check the total number of elements in the array, in the above program &lt;code&gt;i&lt;/code&gt; serves as an index.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Break statement in while loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A break statement can also be used in while loop, just like a for loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int i = 1;
        while (true)
        {
            System.out.println(i);
            if (i == 20)
            {
                break;
            }
            i++;
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program a break statement was used to stop the program from been infinite. &lt;code&gt;while(true)&lt;/code&gt; means the program will forever return true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While loop can be used to validate a user input&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;System.out.println("Select an option\n"+
         "1.Add Users\n"+
         "2.Delele Users");
         int x = input.nextInt();
         while(x==1||x==2){
         //Do something
         }
System.out.println("You Input a wrong number");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program a while loop is used to validate the user input, and to ensure that the user chooses either 1 or 2, if the user choose a different number this statement &lt;code&gt;System.out.println("You Input a wrong number");&lt;/code&gt; execute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Condition statement with while loop&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int i = 0;
        while(i&amp;lt;10){

            i++;
            if(i==5){
                continue;
            }             System.out.println(i);         
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A condition statement can also be used in a while loop, to skip a particular iteration. In the above program an if statement is used to check if &lt;code&gt;i==5&lt;/code&gt;, it it returns &lt;code&gt;true&lt;/code&gt; then that particular iterate will be skipped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While loop project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the last for loop tutorial we built a guessing game using for loop, However, in this tutorial, we will be building the same guessing game using a while loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.*;

public class Main
{
    static Scanner input = new Scanner(System.in);

    static boolean hasWon;
    static int count;
    static int guess;

    public static void main (String[] args)
    {
        System.out.println("Welcome to guess world");

        System.out.println("Do you want to start the game? ");
        System.out.println("1.Yes\n" +
                           "2.No");
        int option= input.nextInt();
        int guessNumber = (int) Math.floor(Math.random() * 10 + 1);
        if (!( option == 2 ))
        {
            System.out.println("Welcome, choose a guess between 1 and 10\n" +
                               "you have only ten trials");


            while (count &amp;lt;= 10)
            {
                int userGuess = input.nextInt();
                if (userGuess == guessNumber)
                {
                    hasWon = true;
                    System.out.println("Congratulation, you guessed right at " + count + " count");

                    count++;      
                    break;
                }
                else if (userGuess &amp;lt; guessNumber)
                {
                    hasWon = false;
                    System.out.println("Oops, you guessed a lower number, try an higher one");
                    count++;
                }
                else if (userGuess &amp;gt; guessNumber)
                {
                    System.out.println("Oops, you guessed an high number, try an lower one");
                    hasWon = false;
                }
            }
            if (hasWon == false)
            {
                System.out.println("You trials exceeds 10");
            }
        }


    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, we are building a guessing game using while loop, the player has only 10 trials, once the the number of times he had played the game exceeds 10, the game terminate, but if the player guessed right, a congratulations message will be shown on the console.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
While loop, while powerful, can be easy to learn, it is the second most used java loops, and can be used for several purposes. However, in this tutorial I have explained the concept of Java while loops with some 'get to do' examples.&lt;/p&gt;

</description>
      <category>java</category>
      <category>whileloops</category>
      <category>loops</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to create an option menu with checkbox in Android, Java</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Thu, 07 Apr 2022 01:41:27 +0000</pubDate>
      <link>https://forem.com/devaspires/how-to-create-an-option-menu-with-checkbox-in-android-java-26ba</link>
      <guid>https://forem.com/devaspires/how-to-create-an-option-menu-with-checkbox-in-android-java-26ba</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fue943qhwk4fhx0xsn3ju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fue943qhwk4fhx0xsn3ju.png" alt="Picture tutorial"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Android menus, are one of the most important components of every modern android application, it provides a means of allowing developers display certain functionalities such as Settings, Search, About app, etc.&lt;br&gt;
The Option menu, is one of the types of menu available in android. It is positioned at the toolbar of some android application. Option menu can be more complex and may require additional components to perform certain functions. Components such as Radion Buttons, Checkboxes, etc, can be used with a menu layout. However, in the cause of this tutorial, we will be buiding a Dark Option menu with several checkboxes. &lt;br&gt;
This tutorial will be divided into five(5) steps for easy understanding and guide.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a new project, File/New project/input the name of the app as MenuCheckBoxTutorial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Navigate to the res/layout/activity_main.xml, add the following code:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#FF000000"&amp;gt;

    &amp;lt;android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        android:padding="5dp"
        android:background="#FF000000"&amp;gt;

        &amp;lt;android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:popupTheme="@style/PopUpDarkMenu"/&amp;gt;

    &amp;lt;/android.support.design.widget.AppBarLayout&amp;gt;
&amp;lt;/LinearLayout&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In Step 2, we are creating a simple Dark layout for the Linear layout and Tool bar, take note of the attribute &lt;code&gt;app:popupTheme="@style/PopUpDarkMenu"&lt;/code&gt; it will be used to add styles to our menu.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Create a menu file res/menu/menu_item.xml.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the menu_item.xml file, we are going to define the content of our menu layout. If you look closely at the tutorial result, the first menu item has a sub-menu, to create a sub-menu under an item, we will create a new menu under the first menu item. For  the check box, we will used the &lt;code&gt;android: clickable= "true";&lt;/code&gt; which will be used to display the checkbox icon on our menu item.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&amp;gt;

    &amp;lt;item
        android:id="@+id/click_action"
        android:title="Click Action"&amp;gt;
        &amp;lt;menu&amp;gt;
            &amp;lt;item
                android:id="@+id/item"
                android:title="Item"/&amp;gt;
        &amp;lt;/menu&amp;gt;
    &amp;lt;/item&amp;gt;
    &amp;lt;item
        android:id="@+id/hide_tracks"
        android:title="Hide Short Tracks"
        android:checkable="true"/&amp;gt;

    &amp;lt;item
        android:id="@+id/show_tracks"
        android:title="Show Track Duration"
        android:checkable="true"/&amp;gt;

    &amp;lt;item
        android:id="@+id/show_overflow"
        android:title="Show Overflow"
        android:checkable="true"/&amp;gt;

    &amp;lt;item
        android:id="@+id/round_corners"
        android:title="Round Corners"
        android:checkable="true"/&amp;gt;

    &amp;lt;item
        android:id="@+id/fast_scrollers"
        android:title="Fast Scroller"
        android:checkable="true"/&amp;gt;

    &amp;lt;item
        android:id="@+id/multi_select"
        android:title="Multi select"
        /&amp;gt;

&amp;lt;/menu&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Navigate to the res/values/style.xml file. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the style.xml file, we will defined the look of our menu. Create a new style with name "PopUpDarkMenu" and the add the below code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;resources&amp;gt;
   &amp;lt;style name="PopUpDarkMenu" parent="Theme.AppCompat.Light"&amp;gt;
        &amp;lt;!-- Customize your theme here. --&amp;gt;
        &amp;lt;item name="android:textColor"&amp;gt;#ffffff&amp;lt;/item&amp;gt;
        &amp;lt;item name="android:colorBackground"&amp;gt;#444444&amp;lt;/item&amp;gt;

        &amp;lt;item name="colorControlNormal"&amp;gt;#ffffff&amp;lt;/item&amp;gt;   &amp;lt;!-- normal border color change as you wish --&amp;gt;
        &amp;lt;item name="colorControlActivated"&amp;gt;#ffffff&amp;lt;/item&amp;gt; &amp;lt;!-- activated color change as you wish --&amp;gt;       
    &amp;lt;/style&amp;gt;

&amp;lt;/resources&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;android:textColor&lt;/code&gt; is used to set the color of our menu layout text.&lt;br&gt;
&lt;code&gt;colorControlNormal&lt;/code&gt; is used to set the border color of the check box.&lt;br&gt;
&lt;code&gt;colorControlActivated&lt;/code&gt; is used to set the color of a checked checkbox.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 5 :&lt;/strong&gt; Navigate to the MainActivity.class. Add the following codes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

package com.mycompany.checkbox;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity
{

    @Override
    protected void onCreate (Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
    }

    @Override
    public boolean onCreateOptionsMenu (Menu menu)

    {
        getMenuInflater().inflate(R.menu.list_item, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected (MenuItem item)
    {
        switch (item.getItemId())
        {
            case R.id.hide_tracks:

                if (item.isChecked())
                {

                    item.setChecked(false);
                }
                else
                {
                    item.setChecked(true);
                    Toast.makeText(getApplication(), "Track Hidden", Toast.LENGTH_SHORT).show();
                }
                break;
            case R.id.show_tracks:
                if (!item.isChecked())
                {
                    item.setChecked(true);

                    Toast.makeText(getApplication(), "Track Shown", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    item.setChecked(false);
                }
                break;
            case R.id.show_overflow:
                if (!item.isChecked())
                {
                    item.setChecked(true);

                    Toast.makeText(getApplication(), "Overflown", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    item.setChecked(false);
                }
                break;
            case R.id.round_corners:
                if (!item.isChecked())
                {
                    item.setChecked(true);

                    Toast.makeText(getApplication(), "Round Corners", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    item.setChecked(false);
                }
                break;
            case R.id.fast_scrollers:
                if (!item.isChecked())
                {
                    item.setChecked(true);

                    Toast.makeText(getApplication(), "Fast Scrollers enabled", Toast.LENGTH_SHORT).show();
                }
                else
                {

            item.setChecked(false);
                }
                break;
        }
        return true;
    }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the Above code snippet, aside the oncreate method, we also have two other methods, the &lt;code&gt;onCreateOptionMenu(Menu menu)&lt;/code&gt; and &lt;code&gt;onOptionItemSelected(Menu item)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;onCreateOnptionMenu (Menu menu)&lt;/code&gt; This function accept one argument, which is our menu. However, inorder to create out menu, we need to inflate it to the activity_main.xml, this can be done using the &lt;code&gt;getMenuInflater().inflate()&lt;/code&gt;&lt;br&gt;
The inflate method is used to pass our menu_item.xml layout to the menu object.&lt;br&gt;
&lt;code&gt;The onCreateOptionMenu (Menu item)&lt;/code&gt; will return a boolean value, however for the cause of this tutorial the return value is true.&lt;br&gt;
The second method is the &lt;code&gt;onOptionItemSelected (Menu item)&lt;/code&gt;&lt;br&gt;
While the &lt;code&gt;onCreateOnptionMenu (Menu menu)&lt;/code&gt; is used to create our menu, the &lt;code&gt;onOptionItemSelected (Menu item)&lt;/code&gt; is used to handle onclick event for each menu item in our menu. It accept one argument, which represents a particular item in our menu list.&lt;br&gt;
The &lt;code&gt;item.getItemById()&lt;/code&gt; is used to find any item id that matches the id passed, we will be using the switch statement to handle multiple id.&lt;br&gt;
The &lt;code&gt;item.setChecked(boolean b)&lt;/code&gt; is used to check if the item check box is checked or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Understanding how menus works will be helpful to you as a developer, in this tutorial I have explained in details with code snippet, on how to implement checkboxes on menu in your android applications.&lt;/p&gt;

</description>
      <category>java</category>
      <category>android</category>
      <category>menu</category>
      <category>howto</category>
    </item>
    <item>
      <title>Understanding Loops in Java: Java for Loop</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Tue, 05 Apr 2022 17:47:37 +0000</pubDate>
      <link>https://forem.com/devaspires/understanding-loops-in-java-java-for-loop-1607</link>
      <guid>https://forem.com/devaspires/understanding-loops-in-java-java-for-loop-1607</guid>
      <description>&lt;p&gt;Years back, while I was learning Java Programming, I was stucked at learning Loops in Java. Loops sometimes, can be frustrating and difficult to learn, most especially when you don't get the right resources for your learning.&lt;/p&gt;

&lt;p&gt;In this article, I will explain Loops in Java, in the most simplified and comprehensive way, with easy to understand terms, and at the end we will build a simple project using a for Loop. &lt;/p&gt;

&lt;p&gt;Requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understandings of Java Variable declaration.&lt;/li&gt;
&lt;li&gt;Understandings of Java expression.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Because of the need to explain java loops comprehensively, this article will be divided into three.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For loop&lt;/li&gt;
&lt;li&gt;While loop&lt;/li&gt;
&lt;li&gt;Do while loop.
each will have a different article.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Concept of Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loops is a broad phenomenon in the field of Computer science. Basically, every functioning Programming language has a support for Loops. Loops simply means doing something repeatedly. From the programming perspective, Loops means, repeatedly carrying out an instruction on the basis of some conditions. These conditions are what prevents a loop from been infinite. The usefulness of every loops makes us to write redundant-free codes and easy to understand codes.&lt;/p&gt;

&lt;p&gt;Think for a moment, if you were ask to print "Hello, John" in the console 10 times, how will you get that done?&lt;br&gt;
There are basically one option you will use, You are definitely going to keep rewriting "Hello, John" Untill it count up to 10&lt;/p&gt;

&lt;p&gt;&lt;em&gt;for example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Main {
    public static void main(String[] args) {
    System.out.println("Hello, John");
    System.out.println("Hello, John");
    System.out.println("Hello, John");
    System.out.println("Hello, John");
    System.out.println("Hello, John");        System.out.println("Hello, John");
    System.out.println("Hello, John");     System.out.println("Hello, John");     System.out.println("Hello, John");
    System.out.println("Hello, John");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While this method may result to the expected output, thus, it's been regarded inefficient! in Programming you must not repeat yourself, the above lines of codes looks unprofessional. However, we can print same result in an entirely different way, more efficient and less lines of code:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For example:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.*;
public class Main{
    public static void main(String[] args) {
        for(int i = 0; i&amp;lt;=10; i++){
            System.out.println("Hello, John");
        }  
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could see the difference, With loops you can write less lines of code with better result, and it can be helpful in times of debugging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Loops in java is further divided into three,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For Loop&lt;/li&gt;
&lt;li&gt;While Loop&lt;/li&gt;
&lt;li&gt;Do...While Loop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;For Loop&lt;/strong&gt;&lt;br&gt;
The for Loop is used to repeat a statement until a condition is met. It makes use of a counter/index, which is always incremented or decremented at the end of a statement each time the loop run. The essentiality of this index or counter is to meet a condition.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The basic syntax of Java for Loop is:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for(initialization; test; increment){
//Some statements
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vyMDMdTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jkm4f14szthyf98ft4k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vyMDMdTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4jkm4f14szthyf98ft4k.jpg" alt="Image description" width="432" height="507"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;lets understand each parameter in the for loop&lt;/em&gt;_&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initialization:&lt;/strong&gt;The initialization is the first stage of every for loop and its indicates the starting point of any for loop. it's usually called a counter or an iterator or index. The initialization is usually a variable, once the statement in the loop is executed, the counter is incremented.&lt;/p&gt;

&lt;p&gt;If you're iterating through each element in an array, then the counter will be equals to 0, this is because, arrays starts from 0 index, Sometimes, you might want to initialize the counter starting from 1, it all depends on what you're iterating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test:&lt;/strong&gt; This is a boolean expression, that it's returned value is a determinant to terminate the loop or continue executing the statement, the test return value must either be true or false. If false: the loop terminate,  if true, the loop continue executing, until it returns false.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;for example&lt;/em&gt;&lt;br&gt;
In ensuring that a loop execute a statement 5 times, the counter must be checked to ensure that when it is equals to 5 it should be terminated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;i &amp;lt; = 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the counter becomes equals to 5 the loops terminate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increment:&lt;/strong&gt;This is the basis of the test return value, it is an expression that is meant to call the loop to an end, once the statement in the for loop runs, the increment takes into action by either increasing the counter or decreasing the counter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;i++ or i--
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The counter is being incremented.&lt;/p&gt;

&lt;p&gt;Here is an explanation of the flow of the for loop. the first stage is the initialization, where by a counter variable is declared and initialize. At the second stage, the loop is checked, if it returns true, it run the statement within the for loop, and i is incremented, the loop run again as long as the test keep returning true.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's take an example&lt;/em&gt;&lt;br&gt;
You remember our "Hello, John" program?&lt;/p&gt;

&lt;p&gt;Let's try to print "Hello, John" with the for loop with explanation. Hello John is to be printed 10 times.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.*;
public class Main {
    public static void main(String[] args) {
        for(int i = 1; i&amp;lt;=10; i++){
            System.out.println("Hello, John");
        }  
    }   
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First i is initialize to 1;&lt;br&gt;
Second i is checked if it less than or equals to 10, currently &lt;code&gt;i is 1&lt;/code&gt; , so the condition returns true;&lt;br&gt;
Third,  "Hello, John" is printed once in the console&lt;br&gt;
Fourth, i is incremented, i now is 2;&lt;/p&gt;

&lt;p&gt;The loops runs again, now i is 2,&lt;br&gt;
Second i is checked if it less than or equals to 10, currently &lt;code&gt;i is 2&lt;/code&gt; , so the condition returns true;&lt;br&gt;
Third,  "Hello, John" is printed twice in the console&lt;br&gt;
Fourth, i is incremented, i now is 3;&lt;/p&gt;

&lt;p&gt;It keeps going untill when i becomes 10, the condition is checked if i is equals to 10,and currently i is equals to 10, which makes the test to return value of false, at this stage the for loop is terminated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Break statement with for loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once a break statement is called within a loop it forcefully terminate the loop, normally a loop is meant to stop once the condition no longer return true. But sometimes we would want to break from the for loop when certain condition has been met.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for(int i = 1; i&amp;lt;=20; i+=2){
System.out.println(i);
If(i == 20){
break;
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, we are trying to print out the even numbers between 2 and 20, but we would like to stop at 12. The if statement checks if the i is equals to 12, if true the program terminate leaving the other iterations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Continue statement with java for loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes you might want to forcefully break out from a for loop, at another time you need something entirely different, you probably need to skip an iterator, then continue with the rest, this can be done using the &lt;code&gt;continue&lt;/code&gt; statement.&lt;/p&gt;

&lt;p&gt;Let come back to our even program, but this time, we will like to skip the even number 12.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (int i = 2 ; i&amp;lt;=20 ; i+=2)
        {
            if(i == 12){
                continue;
            }
       System.out.println(i);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the loop get to 12, it skip that particular iterate and continue with the remain interations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Loops can be decremented&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since the beginning of this article, we have been incrementing the counter, the counter can also be decremented using the decrement operator. Using the decrement operator requires some changes in both the counter initialization and the condition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( int i = 20 ; i &amp;gt;=1  ; i--)
        {        
            System.out.println(i);
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the program above, we are trying to count down from 20 to 1, so we used the &lt;code&gt;i--&lt;/code&gt;operator&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Loops can be nested&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A for loop can iterates inside another for loop, when you place a for loop inside another for loop, you are directly creating a nested loop. In nested for loop the inner loop must complete it iteration cycle before moving to the next outer loop.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Format of a nested for loop&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Outer Loop
for ( initialization; test ; increment)
        {
 //Inner Loop
for(initialization; test; increment){
                //Some statements
           }
       } 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;take for example&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for(int i = 1; i&amp;lt;= 5; i++)
    {
      //inner loop
      for(int j = 1; j &amp;lt;= i; j++)
      {
        System.out.print( "* " );
      }
      System.out.println(); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*
* *
* * *
* * * *
* * * * *
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Scoping in Java for loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Throughout this article we have been declaring and initializing the counter variables between the for loop brackets, making it a local variable, which implies non-accessibility outside the for loop block. Sometimes we might be writing a program where we need to access the value of the counter value, this method may not work.&lt;br&gt;
&lt;em&gt;for example&lt;/em&gt;&lt;br&gt;
If we try to run the following code we will get an error&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( int i = 1 ; i &amp;lt;=20  ; i++)
        {

        }
     System.out.println(i);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: i cannot be resolved to a variable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this error means is, the variable &lt;code&gt;int i = 1&lt;/code&gt; cannot be visible out the scope of the for loop. However to make this code run, you are certainly going to declare the &lt;code&gt;int i&lt;/code&gt; outside the scope of the for loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  int i;
  for ( i = 1 ; i &amp;lt;20  ; i++)
        {

        }
     System.out.println(i);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the value of i can be visible from outside the scope of the for loop.&lt;br&gt;
Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Infinite for loop&lt;/strong&gt;&lt;br&gt;
Infinite for loop is type of loop were it condition always return true, and can never be terminated.&lt;br&gt;
&lt;em&gt;for example&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( int i = 1 ;  ; i++ )
        {
     System.out.println( i );
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code the condition statement never return false, and therefore &lt;code&gt;int i = 1&lt;/code&gt; will keep incrementing, until you force the loop to stop, by either exiting the compiler, or rebooting your computer😁.&lt;/p&gt;

&lt;p&gt;But sometimes we can set a condition for infinite loop, so that when that condition is met, out loop will terminate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( int i = 1 ;  ; i++ )
        {
     System.out.println( i );
     if(i == 12){
     break;
     }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, we are trying to check the condition at runtime, so once the loop get to &lt;code&gt;i = 12&lt;/code&gt; the loop terminate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ganging up the for loop&lt;/strong&gt;&lt;br&gt;
Sometimes we may be working on more complex program, and there is need to make multiple initializations and increment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int i, j;
        for ( i = 0, j=10; i&amp;lt;=j; i++, j--)
        {
            System.out.println("i "+i+":"+"j "+j);
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you need to run this kind of program, multiple initialization and increment must be separated by a comma.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project time&lt;/strong&gt;&lt;br&gt;
At the beginning of this article I said we are going to build a project using java for loops:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The project we are going to build using the Java for loop is a guessing game, in this guessing the user will be given 10 trial the to guess the right number between 1 and 10, if the user guess it correct &lt;code&gt;A congratulations message will be printed on the console&lt;/code&gt;. We will be using the Java for loop to iterate the 10 time the user is meant to Guess.&lt;br&gt;
.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Code snippet.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.*;

public class Main
{
    //scanner class for accepting inputs
    static Scanner input;
    /*variable declaration for the number of times
    the user has guess, the second variable is the 
    variable declaration that will hold the random number
    value
    */
    static int count, randomNumber;
    //a boolean to check if the user has won
    static boolean hasWon;
    public static void main ( String[] args )
    {
        input = new Scanner( System.in );
        //Asking the user if he is ready to play the game
        System.out.println( "Do you want to begin the game?\n" +
                           "1. Yes\n" +
                           "2. No" );
        //variable for collecting the user response
        int option = input.nextInt( );
        //validatinf if the use choosed 1
        if ( option == 1 )
        {
            //if the use choosed one, then we begin the game
            System.out.println( "Welcome to guess world\n" +
                               "You have only 10 trials go guess the right number" );
            //processing the random number value
            randomNumber = (int)Math.floor(Math.random()*10+1);
            //Asking the user to Guess a number between 1 and 10
            System.out.println("Guess a number from 1 - 10");

            //Looping through from 1 - 10
            for(int i = 1; i&amp;lt;=10; i++){
                //At each iteration the user is asked to input a guess
                int userGuesses = input.nextInt();
                //If the guess is correct
                if(userGuesses == randomNumber){
                    //haswon is set to true
                    hasWon=true;
                    System.out.println("Congratulation, you guessed the right number at count: "+count);
                //If guess is greater than the random number
                }else if(userGuesses&amp;gt;randomNumber){
                    System.out.println("Oops! Try a lesser number");
                    //haswon is set to false
                    hasWon = false;
                //If guess is lesser than the random number
                }else if(userGuesses&amp;lt;randomNumber){
                    System.out.println("Oops! Try a greater number");
                    //has won is set to false
                    hasWon = false;
                }
                //At the end of each count, the count variable is incremented
                count++;

            }
            //check if haswon is false
            if(hasWon == false){
                System.out.println("Trial exceed 10, the guess is "+randomNumber);
            }

       //if the user chooses 2, then the game is going to be exited
        }else{
            System.out.println("Guess game exiting...");
        }

    }

}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
For loop is an important feature in every Programming language, the importance of for loop make it necessary to always use it while building advance programs. By now you should have a brief concrete understanding of what java for loop is, how to use it, manipulatingg it etc.&lt;/p&gt;

</description>
      <category>java</category>
      <category>forloop</category>
      <category>loops</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to become a self-taught Computer Programmer: A Comprehensive guide, 2022</title>
      <dc:creator>dev-aspires</dc:creator>
      <pubDate>Tue, 05 Apr 2022 06:46:14 +0000</pubDate>
      <link>https://forem.com/devaspires/how-to-become-a-self-taught-computer-programmer-a-comprehensive-guide-2022-417n</link>
      <guid>https://forem.com/devaspires/how-to-become-a-self-taught-computer-programmer-a-comprehensive-guide-2022-417n</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbud4cu9ntiyfiald6moo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbud4cu9ntiyfiald6moo.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You have just derived an interest in Computer Programming, or probably planning to build the next Fintech app, and the need to understand a programming language becomes a necessity, as well, you have also been confronted with tons of suggestions about sticking to the appropriate programming language to learn.&lt;br&gt;
If your answers are Yes, then I've got you covered. 😉&lt;br&gt;
This article is written to lay down the road map for an aspiring self-taught programmer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why being a self-taught Programmer is important?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before delving into understanding why being a self-taught Programmer is important, let's understand some basic conceptions about self-taught programmers. When you learn a programming language, Frameworks, Libraries, Tools, with all level of independency, by reading books, constantly visiting resource websites, watching videos from YouTube, following up Programming forums, without haven enrolled for a programming school, you are implicitly teaching yourself a programming language.&lt;/p&gt;

&lt;p&gt;Think a moment, learning how to ride a Bicycle, while most people learn how to ride a bicycle through assistance from others, some learned it all by themselves, without any assistance to them on how to ride a Bike.&lt;/p&gt;

&lt;p&gt;Self-taught programming processes are similar to the latter, in teaching yourself programming, you are left to find information yourself, solve the problem yourself, and as well improve your existing knowledge all by yourself. The adventures of every self-taught Programmer relies on the basis of learning anything related without any form of supervision and thus, may seem exhausting and frustrating.&lt;br&gt;
Benefits of being a Self-taught Programmer&lt;br&gt;
You don't need to be a &lt;/p&gt;

&lt;p&gt;computer science graduate or rather enroll for programming courses in other to build your desired app or website. In today's contemporary society, there is presence of adequate information that can be utilized by you in building your dream app or website. But one thing is common, how do I choose the appropriate information source? This could sound difficult, but I am going to disclose how to choose the right information sources for your self-learning in this article.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Some benefits associated to being a self-taught Programmer&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access to varied information&lt;/strong&gt;&lt;br&gt;
Learning a programming language by yourself implies searching for information by yourself, this information gotten are relevant to the knowledge intended to acquire. As a self-learner, you become adaptive towards asking google everything you need.&lt;br&gt;
... lately I was working on a particular project where I was faced with a gigantic bug, as a self-taught Programmer I had no superior to lay my problems to, guess what, I googled about my bug, at that, I saw tons of web page linked to my search queries, well, clicking just about two webpages, I got an answer to my problem, someone may ask how do you know the best website to choose for your answers? I will explain how to sift information from the web, keep reading...&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Global Recognition&lt;/strong&gt;&lt;br&gt;
In a study carried out by stack overflow, 2018, about 87% programmers actually learned programming all by themselves. Do you sense the influence?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning Independence&lt;/strong&gt;&lt;br&gt;
Learning programming language becomes independent, you don't need to rely on anyone inorder to get the right information. When you have some problems you sort the problems yourself.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How to become a self-taught programmer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, let's begin the climax; The steps involved in becoming a self-taught programmer may seem daunting, but your level of consistency and determination will take you where you want to be. Some steps are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understanding your intents&lt;/li&gt;
&lt;li&gt;Choose a programming language&lt;/li&gt;
&lt;li&gt;Learn Basic syntax&lt;/li&gt;
&lt;li&gt;Build projects&lt;/li&gt;
&lt;li&gt;Keep Learning&lt;/li&gt;
&lt;li&gt;Be harmonious!&lt;/li&gt;
&lt;li&gt;Do not forsake the 8. Documentation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Understanding your Intents&lt;br&gt;
What are your Intents?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first consideration of every aspiring self-taught programmer, is the identification of what you intend to do. Your Intents may be: to build a world-class social networking site, or probably to create an alternative of Gmail, or rather thinking about the web, like creating websites for SME's businesses, or specialization in creating websites for managements enterprises. In both aspect of your Intents concluded, it must be linked to a broad aspect of programming.&lt;/p&gt;

&lt;p&gt;Let's get more practical, if your Intents is bound to building app related products, you certainly consider Mobile Development, still under this you could choose an aspect of mobile development you wish to specialize in, such as building android apps, iOS apps, or both(cross-platform).&lt;br&gt;
In another thought, you might be more interested in web, i.e. creating websites: you should probably consider web development, this can also have some subsection such as choosing between frontend (client side programming: UI and interactions) or backend (server side programming) or full stack(the combination of both).&lt;/p&gt;

&lt;p&gt;There are other aspects that might spark your interest to programming, such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Desktop app development&lt;/li&gt;
&lt;li&gt;System Programming&lt;/li&gt;
&lt;li&gt;Data science and Artificial intelligence&lt;/li&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;li&gt;Networking&lt;/li&gt;
&lt;li&gt;Blockchain&lt;/li&gt;
&lt;li&gt;Cybersecurity&lt;/li&gt;
&lt;li&gt;IOT, and among others&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's very important not to disregard this stage, since it probably the first stage of you becoming a self-taught programmer, and must be carefully done based on your interest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose a Programming Language&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This stage might seem difficult, but I swear, it can be easy if properly guided. Presently, there are tons of Programming languages available, sticking to one appropriate to your needs, might be daunting.&lt;br&gt;
By now you already know why you want to learn Programming, the next step is linking your Intents to a particular Programming language. Two Programming languages might do a particular thing, choosing the appropriate one depends on your Self-agreement, in terms of availability of community forum, easy to comprehend syntax, well written documentation etc.&lt;br&gt;
Here are list of aspect of programming and popular programming languages related:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mobile Development: Java(Android), Flutter(Android &amp;amp; iOS), React Native(Android &amp;amp; iOS), Kotlin(Android), C++(Android), Python(Android &amp;amp; iOS);&lt;/li&gt;
&lt;li&gt;Web Development
Front end:HTML, CSS and JavaScript etc.
Backend: PHP, Python, Java, C++, JavaScript etc.&lt;/li&gt;
&lt;li&gt;Desktop app Development: Java, Python, JavaScript, C++, C# etc.&lt;/li&gt;
&lt;li&gt;Game development: C++, C, C#, Python, Java etc.&lt;/li&gt;
&lt;li&gt;Cybersecurity: Java, PHP, Python, SQL, PowerShell etc.&lt;/li&gt;
&lt;li&gt;Networking: Python, Golang, C, Java, C++ etc.&lt;/li&gt;
&lt;li&gt;System Programming: C++, Java, Python, Golang, C# etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Learn Basic Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which ever programming language you have chosen, learning the basic syntax is necessary. Syntax refers to the rules that define the structure of a language. Syntax in computer programming means the rules that control the structure of the symbols, punctuation, and words of a programming language.&lt;/p&gt;

&lt;p&gt;Without syntax, the meaning or semantics of a language is nearly impossible to understand. Basically, every programming language has it own syntax, the syntax of Java is different from the syntax of Python. Learning a programming language syntax acquaint you with what you are likely going to use, some syntax might be easy to learn, while others might not be easy, it all depends on your stage one and stage two.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes Projects, the one with "s", you practice what you learned, by engaging yourself in simple projects, building of projects takes you from the space of learning to the space of using what you learned to solve some simple problems. There are several projects you can build, though it depends on the level of knowledge you possessed. For beginners, projects like guessing game and password generator are good projects to consider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep Learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;'Never stop learning' you are bound to keep learning without any relent, learn some advance topics as related, such as OOP, Exceptions, Thread, Data Structures and Algorithm, "Advance topics may defers in programming languages" this helps in self-development.&lt;br&gt;
Be Harmonious!&lt;/p&gt;

&lt;p&gt;There is no much gain engaging in Individualism, As a self-taught programmer, develop some level of Collectivism, relate with fellow programmers, make discussion about some related concept, build collective Projects. Being harmonious  can be possible through membership with programming forums, social media forum and among others. In addition, you could participate in devfest, hackathon etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not forsake the documentation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As I stated earlier, you must maintain a cordial relationship with various documentations, documentations serves as guides, or from the librarian perspective, (Reference materials). You certainly need to consult a guide for your work flow, try to understand how to navigate to various section of a documentation, some documentation might seem too complex to flow through.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources for learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choosing the appropriate resource for learning is one of the core factor for development, mostly for aspiring self-taught learners, in this section I will outline the various resource of learning, in hierarchy of importance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Video Tutorial:&lt;/strong&gt; Literally, I choose this first, Video tutorials serves as mind opener, through watching of several video tutorials you could get a glance of the concept you intend to learn. YouTube is a good example, where you can find tons of explanatory video at your request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Book:&lt;/strong&gt; Book is undoubtedly very important to all categories of programmers, reading books do not only give you concrete knowledge about programming concepts, but also have a wide scope. Some source of e-books is: &lt;a href="http://www.pdfdrive.com" rel="noopener noreferrer"&gt;www.pdfdrive.com&lt;/a&gt;, &lt;a href="http://www.oreilly.com" rel="noopener noreferrer"&gt;www.oreilly.com&lt;/a&gt; and among others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource website:&lt;/strong&gt; The usefulness of resource web is essential to every aspiring self-taught programmer, because information in this website are relatively released on a regular interval, thus making it easy to track down recent developments. Examples of some resource websites are &lt;a href="http://www.w3schools.com" rel="noopener noreferrer"&gt;www.w3schools.com&lt;/a&gt;, &lt;a href="http://www.freecodecamp.com" rel="noopener noreferrer"&gt;www.freecodecamp.com&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documentations:&lt;/strong&gt; Sometimes when I get confuse I consult the the documentation page, A documentation is like guide to programmers, and are mainly for consultation.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Sifting the right information.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;&lt;br&gt;
Sifting right information from pool of information can be difficult at times, most especially to beginners, some website has worthful contents, while some do not... As an independent learner of programming, it might seem difficult for you to choose the appropriate content for your use; Here are list of websites that contains worthful contents, and of which I have personally used when the need to solve a problem arise:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;W3Schools&lt;/li&gt;
&lt;li&gt;Freecodecamp&lt;/li&gt;
&lt;li&gt;Medium&lt;/li&gt;
&lt;li&gt;Guru99&lt;/li&gt;
&lt;li&gt;Geeksforgeeks&lt;/li&gt;
&lt;li&gt;Stackoverflow&lt;/li&gt;
&lt;li&gt;Simplilearn&lt;/li&gt;
&lt;li&gt;Sciencetecheasy&lt;/li&gt;
&lt;li&gt;Studytonight&lt;/li&gt;
&lt;li&gt;Tutorialspoint.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There could be more other relevant websites, but these are my most useful websites for learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For you to become a Self-taught Programmer, you must be ready to code at least 2.5-4.0(hrs) daily, this could be done with determination and dedication... Basically, not all self-taught Programmer ended as they wish, some got frustrated, or rather could not cope with system... But I am assuring you, if you can strictly follow the principles I had laid earlier, you will definitely go farther as a self-taught Programmer.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>python</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
