<?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>DEV Community: Emmanuel John Ayarma</title>
    <description>The latest articles on DEV Community by Emmanuel John Ayarma (@ejayarma).</description>
    <link>https://dev.to/ejayarma</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%2F752149%2F531ec56d-0d73-4018-9fb5-dffc275f4f08.jpeg</url>
      <title>DEV Community: Emmanuel John Ayarma</title>
      <link>https://dev.to/ejayarma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ejayarma"/>
    <language>en</language>
    <item>
      <title>Unlocking the Command Line: Episode 2 - The Shell and the shell prompt</title>
      <dc:creator>Emmanuel John Ayarma</dc:creator>
      <pubDate>Wed, 31 Jan 2024 13:12:50 +0000</pubDate>
      <link>https://dev.to/ejayarma/unlocking-the-command-line-episode-2-the-shell-and-the-shell-prompt-47hd</link>
      <guid>https://dev.to/ejayarma/unlocking-the-command-line-episode-2-the-shell-and-the-shell-prompt-47hd</guid>
      <description>&lt;p&gt;In the previous episode, we explored the enduring significance of the Command Line Interface (CLI) and its indispensability for developers, system administrators, and power users. Despite the rise of Graphical User Interfaces (GUIs), the CLI has persisted due to its efficiency, flexibility, and &lt;strong&gt;scripting&lt;/strong&gt; capabilities. In this episode, we will focus on the evolution of the shell and the components of a shell prompt.&lt;/p&gt;

&lt;p&gt;The CLI's roots can be traced back to the Multics project, which introduced the concept of a command-line interpreter in the 1960s. It was during this time that the term "shell" was coined by French computer scientist Louis Pouzin.&lt;br&gt;
The Unix operating system, emerging in the early 1970s, brought a powerful command-line environment. The V6 shell, developed by Ken Thompson in 1971, played a pivotal role and heavily influenced subsequent shells.&lt;br&gt;
The Bourne shell, introduced in 1977, replaced the V6 shell and served as an interactive command interpreter and &lt;strong&gt;scripting&lt;/strong&gt; language, featuring structured programming capabilities. It paved the way for shells like KornShell (ksh), Almquist shell (ash), and the popular Bourne-again shell (Bash).&lt;/p&gt;

&lt;p&gt;The Z Shell (Zsh), created in 1990, combined features from ksh and tcsh, offering advanced functionalities such as programmable command-line completion, extended file globbing, improved variable/array handling, and customizable prompts.&lt;br&gt;
As Unix gained popularity, different shells were developed to enhance the user experience. The C Shell (csh), created by Bill Joy, introduced features like command-line editing and history. Stephen Bourne developed the Bourne Shell (sh) around the same time.&lt;/p&gt;

&lt;p&gt;In the 1980s, the GNU Project aimed to create a free and open-source Unix-like operating system. As part of this project, Brian Fox developed Bash, incorporating features from both the C Shell and the Bourne Shell. Bash's extensive capabilities have made it one of the most popular shells.&lt;br&gt;
The Linux Kernel, developed by Linus Torvalds in 1991, combined with the GNU project's utilities to form the Linux operating system. Typically, the combination of GNU tools, the Linux kernel, and additional software is commonly referred to as a Linux distribution or distro in short. Bash remains the default shell for Unix-like systems, while Zsh is the default on macOS. On Windows, the command prompt (cmd.exe) and PowerShell serve as terminal applications.&lt;/p&gt;

&lt;p&gt;Throughout this series, we will primarily focus on Bash due to its ubiquity. Windows users can follow along using Cygwin, an open-source package that provides a Unix-like CLI. Most commands are similar across zsh, bash, and Cygwin, ensuring compatibility.&lt;br&gt;
Bash offers advanced features such as command history, inline editing, &lt;strong&gt;scripting&lt;/strong&gt; capabilities, &lt;strong&gt;aliases&lt;/strong&gt;, and &lt;strong&gt;variables&lt;/strong&gt;. Its extensive feature list includes conditional statements, functions, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scripting&lt;/strong&gt; enables us to store pre-defined commands in a file, allowing us to execute them later using the bash shell. It incorporates programming elements that facilitate the automation of sequences, enabling us to accomplish tasks efficiently and swiftly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aliases&lt;/strong&gt; serve as convenient nicknames for commands. They allow us to create shorter versions of lengthy commands, making it easier and quicker to execute them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt; are used to store information for both the bash shell and the user. They not only serve as containers for data but can also modify the behavior of commands. By utilizing variables, we can customize and adjust the way commands operate to suit our specific needs.&lt;/p&gt;

&lt;p&gt;To open the terminal, Linux or macOS users can simply search for and run the Terminal application. Windows users can open Cygwin after downloading and installing it.&lt;br&gt;
The terminal emulator program mimics the practical terminal discussed in the previous episode as illustrated in the cover image above. When a terminal application is launched, the shell prompt becomes a vital part of the interface. It not only indicates that commands can be executed but also provides valuable information to the user. The prompt's structure may vary between distributions but typically includes &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the username&lt;/li&gt;
&lt;li&gt;system name or hostname and &lt;/li&gt;
&lt;li&gt;current directory (another name for folder).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5k6ul3ryckr7qhvcpcc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5k6ul3ryckr7qhvcpcc.png" alt="A terminal window on a linux system" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A prompt typically concludes with one of the following characters: &lt;code&gt;$&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, or &lt;code&gt;-&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In Unix and its derivatives, it is common for the prompt to end with &lt;code&gt;$&lt;/code&gt; or &lt;code&gt;%&lt;/code&gt; when the user is a regular user, while it ends with &lt;code&gt;#&lt;/code&gt; if the user is a superuser (referred to as "root" in Unix terminology).&lt;/p&gt;

&lt;p&gt;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;yarmycode@johns-computer:~$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt above includes the user's name, system name, and the current directory. In this case, the user's name is &lt;code&gt;yarmycode&lt;/code&gt;, the system name is &lt;code&gt;johns-computer&lt;/code&gt; and the current directory is &lt;code&gt;~&lt;/code&gt;. The &lt;code&gt;~&lt;/code&gt; symbol denotes the user's home directory, typically located under &lt;code&gt;/home&lt;/code&gt; and named after the user account. We can also tell that &lt;code&gt;yarmycode&lt;/code&gt; is a normal user by the &lt;code&gt;$&lt;/code&gt; symbol.&lt;/p&gt;

&lt;p&gt;Let's begin by learning our first command, which is used to display our location in the file system (current directory). To print the current working directory, which is usually the user directory when you first open the terminal, type &lt;code&gt;pwd&lt;/code&gt; and press the &lt;code&gt;Enter&lt;/code&gt; or &lt;code&gt;Return&lt;/code&gt; key on your keyboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Like so:&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;yarmycode@johns-computer:~$ pwd
&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;/home/yarmycode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pwd&lt;/code&gt; is an abbreviation for &lt;strong&gt;print working directory&lt;/strong&gt; and does exactly what it says.&lt;/p&gt;

&lt;p&gt;Now let's print the content of our directory using the &lt;code&gt;ls&lt;/code&gt; command. &lt;code&gt;ls&lt;/code&gt; is used to list files. In this case &lt;code&gt;ls&lt;/code&gt; will list the files in our home directory. Directories are seen as a special type file in Unix-based systems.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarmycode@johns-computer:~$ ls
&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;Desktop  Documents  Downloads  Music  Pictures
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't bother about the output of the commands for now. Your output may be different from mine.&lt;/p&gt;

&lt;p&gt;We will explore directories in more depth in future episodes, so stay tuned. In the next episode, we will continue to delve into the capabilities and practical applications of the Command Line Interface (CLI). Happy navigating!&lt;/p&gt;

</description>
      <category>cli</category>
      <category>unix</category>
      <category>linux</category>
      <category>bash</category>
    </item>
    <item>
      <title>Unlocking the Command Line: Episode 1 - Exploring Origins</title>
      <dc:creator>Emmanuel John Ayarma</dc:creator>
      <pubDate>Tue, 16 Jan 2024 13:00:23 +0000</pubDate>
      <link>https://dev.to/ejayarma/unlocking-the-command-line-episode-1-exploring-origins-1cog</link>
      <guid>https://dev.to/ejayarma/unlocking-the-command-line-episode-1-exploring-origins-1cog</guid>
      <description>&lt;p&gt;When it comes to computer interaction, you have two primary avenues: the widely-used Graphical User Interface (GUI) and the less-frequented Command Line Interface (CLI).&lt;br&gt;
GUI allows users to navigate a computer system by clicking buttons, widgets, or icons on a visual screen. In contrast, CLI offers a different experience, relying solely on keyboard commands. Imagine a plain screen with text instead of visually appealing icons – no mouse or touchpad, just your keyboard to send commands.&lt;br&gt;
But why opt for this seemingly less user-friendly approach? To answer that, let's step back in time. In an era when computers were not as ubiquitous, mainframe computers were stationed in institutions like universities. Users across different parts of the campus connected to these mainframes using setups comprising only a keyboard and a monitor – essentially, a "terminal."&lt;/p&gt;

&lt;p&gt;Despite the availability of monitors, CLI was the dominant mode of interaction. Early computers lacked the resources for a GUI due to limited RAM and processing power. This meant users had to acquaint themselves with a set of commands. The CLI was particularly adept at tasks such as sending emails, web surfing, server configuration, and system administration.&lt;br&gt;
During those times, major operating systems like Linux and UNIX primarily used CLI. Today's OSes like Windows and macOS default to GUI, but they still provide a CLI option through a program called a terminal emulator. This software recreates the terminal experience, offering a rectangular window with a prompt, allowing users, especially developers and system administrators, to be more productive with specific tasks compared to GUI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2t37phrwfs3z7nmfwek.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2t37phrwfs3z7nmfwek.png" alt="Diagram depicting how OS Kernel interacts with a terminal emulator through the shell. The diagram uses concentric circles where the shell wraps around the kernel. The shell is then wrapped by the terminal emulator" width="750" height="746"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When commands are entered in the CLI, they are directed to a program called a shell, which wraps around the kernel – the actual operating system. In the GUI, users interact with visual elements, while in the CLI, users communicate with the kernel through the shell. Some use "shell" and "terminal" interchangeably. The key difference lies in the user's role: in GUI, users are told what to do by the available widgets; in CLI, users tell the computer what to do directly, utilising a set of commands that integrate tightly with the OS.&lt;/p&gt;

&lt;p&gt;While GUI has its moments, our focus here is the CLI – its origin, importance, how it works, and what it can do. This exploration into the command line isn't just a summary; it's a starting point. Stay tuned for more insights into advanced techniques and the vast capabilities of the command line in upcoming episodes. Happy navigating!&lt;/p&gt;

</description>
      <category>cli</category>
    </item>
    <item>
      <title>Is Learning Programming/Coding Difficult?</title>
      <dc:creator>Emmanuel John Ayarma</dc:creator>
      <pubDate>Mon, 06 Dec 2021 15:21:03 +0000</pubDate>
      <link>https://dev.to/ejayarma/is-learning-programmingcoding-difficult-19k6</link>
      <guid>https://dev.to/ejayarma/is-learning-programmingcoding-difficult-19k6</guid>
      <description>&lt;h2&gt;
  
  
  What is programming or coding?
&lt;/h2&gt;

&lt;p&gt;You might have heard it before; programming or coding. What is it actually and is it hard? This is what I think. First of all, these two words are similar but are actually not the same as some misconstrue them to be.&lt;/p&gt;

&lt;p&gt;Programming simply refers to telling a computer to do something. Computers are very powerful and have changed the way we do virtually everything. However, a computer is one of the dumbest thing to exist because you have to tell it what to do, how to do it, and sometimes when to do it. Everything you do with a computer you are able to do because of a particular software. This software is made up of instructions written by humans. So all the logic and steps that tell the computer what to do has to do with programming. Coding on the other hand is where these instructions are expressed in a language. This means you can even code in English. Computers do not understand English, so we use programming languages to write programs. Code written in these programming languages have to be converted into machine code (which is in a binary form of 0s and 1s), the only language computers really understand. I’m sure you get the picture now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it difficult?
&lt;/h2&gt;

&lt;p&gt;Learning to code is like learning any new skill. All you need is the right material to learn from, the will to learn and a good start. Because programming has to do with logic, knowing Math sometimes is an advantage. There is a whole branch of Math dedicated to this logic: Discrete Mathematics. I will be frank with you; you don’t need to know math to program. Once you grab the basic concepts you’re good to fly. The rudiments are more important. You will get better with practice and learn new concepts as you come to need them in your journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning to program/code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Normal Way&lt;/strong&gt;&lt;br&gt;
Just like any other skill, you must choose a way to learn it. You can take an online course on Udemy, Pluralsight, Coursera or YouTube. Maybe you like in-person training. You can also opt for a programming class or a bootcamp (a fast-paced training over a short period of time, usually days). You know how you learn best so it’s up to you to decide. Since there are dozens of programming languages out there and a lot of careers that require you to know programming, you might want to do some research before putting in any effort. Do you want to code for fun? Do you want to build a website or a mobile app or develop a desktop app? Once you are sure of what you want to do, pick a programming language. I would recommend Python. Python is a good programming language by all standards. What makes Python stand out is that it’s beginner friendly as it uses almost English-like expressions and easy-to-grasp syntax. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Simple C++ program to display "Hello World"&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;#include&amp;lt;iostream&amp;gt;

using namespace std;

int main()
{
    cout&amp;lt;&amp;lt;"Hello World";
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Simple Python program to display "Hello World"&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;print('Hello world')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Output of both programs&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;Hello world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use Python for web development, data science, game development, scripting, etc. If you want to build a website, you should probably jump in with HTML and CSS which are not programming languages themselves but are a great start. You can add JavaScript later which is the programming language for adding interactivity to a website. JavaScript can also be used to write server-side scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A beginner friendlier way&lt;/strong&gt;&lt;br&gt;
Scratch is a programming language that uses graphical elements with drag and drop features to make things happen. It is a fun way to start programming. Find more about it here. &lt;a href="https://scratch.mit.edu/"&gt;Scratch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ue1xv2mv87j8s1lksmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ue1xv2mv87j8s1lksmo.png" alt="A scratch program" width="800" height="358"&gt;&lt;/a&gt;&lt;a href="https://scratch.mit.edu/projects/607889870"&gt;Image Source&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;Find a mentor. Get in touch with people who have achieved what you want to achieve with programming especially those who use the languages you’re interested in. Whether they are software developers or have tech roles, don’t be shy to approach them. They are more willing to help than you think. Finally, don’t forget to apply what you learn. Pick a project; get your hands dirty. It may be a simple app, a basic website or the automation of an ordinary task. Practice makes perfect and always remember:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every expert was once a beginner. - Anonymous&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

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