<?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: Abednego Emonena</title>
    <description>The latest articles on DEV Community by Abednego Emonena (@codynego).</description>
    <link>https://dev.to/codynego</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%2F971635%2Fd5ad6fce-1a69-497b-81d5-34f545ffd091.png</url>
      <title>DEV Community: Abednego Emonena</title>
      <link>https://dev.to/codynego</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codynego"/>
    <language>en</language>
    <item>
      <title>Implementing Linear Regression from scratch using python</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Tue, 05 Sep 2023 11:09:16 +0000</pubDate>
      <link>https://dev.to/codynego/implementing-linear-regression-from-scratch-using-python-3o1o</link>
      <guid>https://dev.to/codynego/implementing-linear-regression-from-scratch-using-python-3o1o</guid>
      <description>&lt;p&gt;Linear Regression is an essential machine learning algorithm used in various applications today. It works by finding the relationship between a variable or target and one or more data points also known as features by fitting linear equations on the data points. As a machine learning engineer or an aspiring machine learning engineer, you will most possibly find yourself using this algorithm on a day-to-day basis to solve some machine learning problems. In this article, I will be walking you through a step-by-step process on how to implement this same algorithm yourself from scratch using Python. We will also be exploring the linear algorithm intuition so you can understand the mathematical equations behind this powerful algorithm.&lt;/p&gt;

&lt;p&gt;lets dive in ...&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is linear Regression?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Linear regression is an algorithm that aims to find the best fit linear relationship between an independent variables(features) and a dependent variable(target). It is denoted by this formula:&lt;/p&gt;

&lt;p&gt;y = wx + b&lt;/p&gt;

&lt;p&gt;where:&lt;/p&gt;

&lt;p&gt;w = parameters (weights)&lt;/p&gt;

&lt;p&gt;b = Bias (parameters)&lt;/p&gt;

&lt;p&gt;X = features&lt;/p&gt;

&lt;p&gt;the goal is to find the parameters w and b that will best fit the data.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How does linear regression works?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Linear regression works by multiplying the weights and the features plus the bias and constantly updating the parameters till the cost J(X) is minimized&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since the goal in linear regression is to find the best line that fits the data, the cost function is the metric used to measure how well the model is performing. This is done by calculating the difference between the predicted value and the actual value.&lt;/p&gt;

&lt;p&gt;In linear regression, the popular cost function used is "Mean Squared Error Cost Function"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6vnwO8Vj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1693841803620/b63ad0b9-a94a-439f-b893-c81eb6a243ff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6vnwO8Vj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1693841803620/b63ad0b9-a94a-439f-b893-c81eb6a243ff.png" alt="" width="391" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;where h(x) is the predicted value ^y gotten using the linear function y = wx + b across all training examples&lt;/p&gt;

&lt;p&gt;y = the actual value&lt;/p&gt;

&lt;p&gt;m = the number of training examples&lt;/p&gt;

&lt;p&gt;and by constantly optimizing the value of weights and bias, we can minimize the cost function and therefore increase the model accuracy.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Gradient Descent&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One very fascinating question is that, "how do we optimize the parameters?". Well, this is done by iterating n number of times, and for each iteration, we take the derivative of the cost J(X), subtract it from the learning rate and updating the parameter with it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ABPg9_I_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1693842654246/cea53987-6bdf-4dcf-8198-9593ad6ba139.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ABPg9_I_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1693842654246/cea53987-6bdf-4dcf-8198-9593ad6ba139.png" alt="" width="382" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know it sounds confusing,&lt;/p&gt;

&lt;p&gt;theta(j) is the parameter weights&lt;/p&gt;

&lt;p&gt;alpha = the learning rate, it can be a constant value.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Linear Regression in Python code&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import numpy as np

class LinearRegression:
    def __init__ (self, learning_rate=0.01, iter=1000):
        self.lr = learning_rate
        self.iter = iter
        self.weights = None
        self.bias = 0

    def fit(self, X, y):
        n_sample, n_feature = X.shape
        self.weights = np.zeros(n_feature)
        y_pred = self.predict(X)

        for _ in range(self.iter):
            self.weights = self.weights - self.lr * np.dot(
                                           X.T, y_pred - y)
            self.bias = self.bias - self.lr * np.sum(y_pred - y)

    def predict(self, X):
        y_pred = np.dot(X, self.weights) + self.bias
        return y_pred

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

&lt;/div&gt;



&lt;p&gt;e&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import numpy as np&lt;/code&gt;: This line imports the NumPy library and aliases it as &lt;code&gt;np&lt;/code&gt;. NumPy is used for numerical computations, and it's a fundamental library for data manipulation in Python.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;class LinearRegression:&lt;/code&gt;: This defines a Python class named &lt;code&gt;LinearRegression&lt;/code&gt;, which is used to encapsulate the linear regression model and its methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;def __init__ (self, learning_rate=0.01, iter=1000):&lt;/code&gt;: This is the constructor method for the &lt;code&gt;LinearRegression&lt;/code&gt; class. It initializes the class attributes:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;def fit(self, X, y):&lt;/code&gt; This method is used to train the linear regression model. It takes two parameters:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inside this method:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It calculates the number of samples (&lt;code&gt;n_sample&lt;/code&gt;) and the number of features (&lt;code&gt;n_feature&lt;/code&gt;) in the input data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initializes the &lt;code&gt;weights&lt;/code&gt; attribute as an array of zeros with a length equal to the number of features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Predicts the target variable (&lt;code&gt;y_pred&lt;/code&gt;) using the &lt;code&gt;predict&lt;/code&gt; method (which is expected to be defined elsewhere in the class).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It performs gradient descent to update the &lt;code&gt;weights&lt;/code&gt; and &lt;code&gt;bias&lt;/code&gt; iteratively based on the prediction error (the difference between &lt;code&gt;y_pred&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt;) and the learning rate.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;def predict(self, X):&lt;/code&gt;: This method is used to make predictions using the trained linear regression model. It takes the input features &lt;code&gt;X&lt;/code&gt; as a parameter and returns the predicted values &lt;code&gt;y_pred&lt;/code&gt;. Inside this method:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Linear regression is absolutely an essential and interesting algorithm to use as a machine learning engineer.&lt;/p&gt;

&lt;p&gt;With this model, you can now solve any supervise learning problem, Also, note that this implementation of linear regression is quite simple and might need some optimization method to help it predict more accurate value.&lt;/p&gt;

&lt;p&gt;Thanks for reading&lt;/p&gt;

</description>
      <category>linearregression</category>
      <category>machinelearning</category>
      <category>supervisedlearning</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Machine Learning explained for complete Newbie</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Mon, 04 Sep 2023 11:12:32 +0000</pubDate>
      <link>https://dev.to/codynego/machine-learning-explained-for-complete-newbie-1ho9</link>
      <guid>https://dev.to/codynego/machine-learning-explained-for-complete-newbie-1ho9</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Machine learning is a buzzword that has fascinated a lot of people and has the potential to greatly change how we interact with technology, from virtual assistants, self-driving cars, and large language models like Chatgpt and Bard, to Image generation like Stability AI and Mid Journey. In this blog post, I will explain to you the concept of machine learning in the smallest possible way so that even a newbie can grasp it.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is Machine Learning?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Machine Learning is a subset of Artificial intelligence that is focused on teaching computers to learn without being explicitly programmed to do so.&lt;/p&gt;

&lt;p&gt;Machine Learning involves training computers to learn from data to make predictions or make decisions. For example, you can train a computer on a bunch of e-commerce data and it will learn how to predict which product has the potential to make a hit.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Types of Machine Learning&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Machine Learning is a wide field that can be divided into different types..&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Supervised learning:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Supervised learning is a type of machine learning that involves training a computer with data that includes its label, For example, you can train a computer on the height, weight as well as gender of a person along with their age, and have it learn and predict the age of another person given the weight, height and gender. In summary, in supervised learning the computer is trained on data containing the features as well as its corresponding output or target.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Unsupervised Learning:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In unsupervised Learning, the machine or computer is given only a set of data without the corresponding output so it learns to understand the data and group similar data together based on what it has learned. This type of machine learning algorithm is mostly used for customer segmentation, anomaly detection, recommendation systems, image and audio processing, natural language processing(NLP) etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Reinforcement Learning:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;"Reinforcement Learning" is one of the major categories of machine learning and artificial intelligence that focuses on training intelligent agents to make sequences of decisions in an environment to maximize a cumulative reward signal. It is often used in scenarios where an agent interacts with an environment, learns from these interactions, and adapts its behavior to achieve specific goals or tasks. Here's an explanation of the key concepts and components of reinforcement learning:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent&lt;/strong&gt; : The learner or decision-maker that interacts with the environment. The agent makes a sequence of decisions to achieve a goal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt; : The external system or world with which the agent interacts. The environment provides feedback to the agent based on its actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State (s)&lt;/strong&gt;: A representation of the current situation or configuration of the environment. The state is crucial for decision-making as it encodes all relevant information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Action (a)&lt;/strong&gt;: The choices or decisions made by the agent in response to the current state. Actions are selected from a set of possible options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Policy ()&lt;/strong&gt;: A strategy or function that defines the mapping from states to actions. It guides the agent's decision-making process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reward (r)&lt;/strong&gt;: A numerical signal provided by the environment after each action. The reward indicates the immediate benefit or cost associated with the chosen action. The agent's objective is typically to maximize the cumulative reward over time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Trajectory or Episode&lt;/strong&gt; : A sequence of states, actions, and rewards that occur during the interaction between the agent and the environment. A trajectory represents one complete interaction cycle.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reinforcement learning is mostly used in various domains, including robotics, games, self-driving cars, recommendation engines etc. It is a powerful paradigm for enabling machines to learn and make decisions in complex, dynamic environments through trial and error.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Popular Algorithm in Machine Learning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Linear Regression:&lt;/strong&gt; Linear Regression is a popular machine-learning algorithm that aims to find the relationship between a variable (target) and one or more features. It learns to achieve this by fitting a linear equation to the data. This type of algorithm falls under the supervised learning category and it is mostly used for data where their target is a continuous value, such as predicting the price of a house or predicting the salary of a person based on the number of experience etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logistic Regression:&lt;/strong&gt; Logistic regression is mostly used to learn data where their output or target is binary 0 or 1. This is mostly used to solve classification problems and then has only 2 possible outputs. This algorithm is supervised learning and it's used in cases such as predicting if an email is spam or not, checking if the rain will fall or not or predicting if the stock market will go green or red etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;K-Means Algorithm:&lt;/strong&gt; The k-means algorithm falls under the unsupervised learning category.&lt;br&gt;It is also a clustering method designed to partition a dataset into 'k' distinct, non-overlapping groups or clusters. These clusters are formed based on the similarity of data points, where each cluster represents data points that are more similar to each other than to those in other clusters.&lt;/p&gt;

&lt;p&gt;Machine learning is such an interesting field for people who are excited about AI, curious about data, and eager to explore the limitless possibilities of training intelligent systems. Whether you aspire to teach machines to recognize patterns in vast datasets, create robots that can navigate complex environments, or develop algorithms that mimic human decision-making, the world of machine learning offers an incredible journey of discovery and innovation. As technology continues to advance, the opportunities to shape the future through machine learning are boundless, making it an exhilarating path for those with a passion for pushing the boundaries of what's possible.&lt;/p&gt;

&lt;p&gt;Thank yu for reading.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>machinelearningfundamental</category>
      <category>ai</category>
      <category>supervisedlearning</category>
    </item>
    <item>
      <title>Understanding Latency vs Throughput - system design</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Sat, 27 May 2023 12:02:13 +0000</pubDate>
      <link>https://dev.to/codynego/understanding-latency-vs-throughput-system-design-288h</link>
      <guid>https://dev.to/codynego/understanding-latency-vs-throughput-system-design-288h</guid>
      <description>&lt;p&gt;Understanding the difference between latency and throughput in a system design will help you design better system that is both scalable and high in performance. It is also an important metric to measure the performance of a system.&lt;/p&gt;

&lt;p&gt;In this article, you will understand the difference between this two and how it can affect your system positively and negatively.&lt;/p&gt;

&lt;p&gt;But what exactly is &lt;strong&gt;Latency&lt;/strong&gt;?&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is latency?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Latency refers to how long or how much time it takes a system to handle a request, this is often measured in milliseconds or microseconds.&lt;/p&gt;

&lt;p&gt;An increase in latency or high latency will mean that your system takes longer time to process a request.&lt;/p&gt;

&lt;p&gt;Let use a web server as an example.&lt;/p&gt;

&lt;p&gt;Assuming it takes your web server 0.05 milliseconds to process a single request and probably due to network congestion, inefficient algorithm or load on resources, it now takes your server 2millisec to process a request, this is said to be high latency.&lt;/p&gt;

&lt;p&gt;High latency slows down your system performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is throughput?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Throughput refers to the number of requests a system can handle at the same time. It is usually measured in requests per second, transactions per second, or even bits per seconds.&lt;/p&gt;

&lt;p&gt;There are different factor's that can affect throughput:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Limited CPU&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Memory capacity etc&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An increase in throughput should always be considered when designing a system that is scalable. It is also widely considered when designing systems such as network, database or storage systems&lt;/p&gt;

&lt;p&gt;Here are 4 ways to increase throughput in your system and increase scalability.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Load Balancing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Caching mechanisms&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimized algorithm or data structure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increase hardware capacity etc&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Load Balancing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is when you use reverse proxy to distribute incoming requests to different servers such that each server is able to process requests without exceeding it's capacity.&lt;/p&gt;

&lt;p&gt;Let's say we have 1 million request coming in through the load Balancer and you have 4 web servers, this requests will not be sent to a single server but rather distributed using an algorithm equally to this 4 servers. This approach can help increase throughput in your system at the cost of latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching mechanisms
&lt;/h3&gt;

&lt;p&gt;Caching is also an important factor when increasing throughput, and this is by storing frequently used data in a cache. This is to avoid fetching data too frequently from the primary database beyond the server capacity.&lt;/p&gt;

&lt;p&gt;Caching can significantly reduce the need for repetitive computations or data retrieval, improving overall system throughput.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Optimized algorithm or data structure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You need to always look for opportunities to improve your algorithm and data structure. Using an optimized algorithm can affect your system greatly positively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Increase hardware capacity
&lt;/h3&gt;

&lt;p&gt;If your system is limited by your hardware resources, you should consider upgrading or increasing it. This could include increasing CPU cores, memory capacity, disk I/O speed, or network bandwidth to handle higher workloads.&lt;/p&gt;

&lt;p&gt;In summary, There is great benefit when you consider latency and throughput when designing a system but there is a tradeoff, increasing your throughput often results in high latency so you should consider which to sacrifice and best for your system.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A step by step guide to building Blog ApI with Django Rest Framework Part 1</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Thu, 16 Mar 2023 20:41:14 +0000</pubDate>
      <link>https://dev.to/codynego/a-step-by-step-guide-to-building-blog-api-with-django-rest-framework-part-1-5a21</link>
      <guid>https://dev.to/codynego/a-step-by-step-guide-to-building-blog-api-with-django-rest-framework-part-1-5a21</guid>
      <description>&lt;p&gt;In this post, I will cover how you can build a blog API in DRF (Django Rest Framework). This is a step-by-step guide that will help you get started in building your (probably) first API project.&lt;/p&gt;

&lt;p&gt;I will assume you already have python installed on your computer and that you know at least basic python, if not you can check out other tutorials on how to do that.&lt;/p&gt;

&lt;p&gt;so lets get started:&lt;/p&gt;

&lt;p&gt;First open your VSCode Editor or your ubuntu terminal but for this project i will be using my ubuntu terminal but the process remains almost the same with your vscode&lt;/p&gt;

&lt;p&gt;create a project project and change into it&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;Next is to setup a virtual environment so as to isolate your project from other projects.&lt;/p&gt;

&lt;p&gt;And you can do that using this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv &amp;lt;virtual evironment name&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;you can replace  with any name of your choice but for this tutorial, we will be using "env" as our vuitual environment name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv env

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

&lt;/div&gt;



&lt;p&gt;Activate your virtual environment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source .env/Scripts/activate
or
./env/Scripts/activate

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

&lt;/div&gt;



&lt;p&gt;you will notice your terminal changed to something like this&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(env) PS C:\Users\HP\BlogAPI&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;depending on what you are using.&lt;/p&gt;

&lt;p&gt;Now lets move to the next step, which is installing Django.&lt;/p&gt;

&lt;p&gt;In your current working directory,&lt;/p&gt;

&lt;p&gt;type this command to install django&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;wait for fews seconds and voila...Django finally installed&lt;/p&gt;

&lt;p&gt;if you have come this far without experiencing any error, congratulation and if you did, that's also awesome&lt;/p&gt;

&lt;p&gt;take a deep breath, recheck where you messed up, google your errors as you try to fix them. Bux and Developers are the most closest partners .&lt;/p&gt;

&lt;p&gt;Now let's proceed..&lt;/p&gt;

&lt;p&gt;currently this is how your directory should look like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BlogApi/
 env/
     Scripts/
     include/
     lib/
     pyvenv.cfg

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

&lt;/div&gt;



&lt;p&gt;now lets create our django project.. in the same directory, type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject blogapi .

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

&lt;/div&gt;



&lt;p&gt;and our django app&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py startapp blog

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

&lt;/div&gt;



&lt;p&gt;by now your directory should be like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BlogApi/
 env/
    bin/
    include/
    lib/
    pyvenv.cfg
 manage.py
 blogapi/
    __init__.py
    settings.py
    urls.py
    wsgi.py
 blog/
     __init__.py
     admin.py
     apps.py
     models.py
     tests.py
     views.py

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

&lt;/div&gt;



&lt;p&gt;if all is as it is, then lets proceed&lt;/p&gt;

&lt;p&gt;When this is done, you will have to add your app to your main project. Here is how to do that&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the &lt;a href="http://settings.py"&gt;&lt;code&gt;settings.py&lt;/code&gt;&lt;/a&gt; file located in your project folder &lt;code&gt;BlogApi/blogapi/settings.py&lt;/code&gt; using your code editor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the &lt;code&gt;INSTALLED_APPS&lt;/code&gt; list in the file, which should already have some default apps installed like &lt;code&gt;django.contrib.admin&lt;/code&gt;, &lt;code&gt;django.contrib.auth&lt;/code&gt;, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the name of your app &lt;code&gt;'blog'&lt;/code&gt; at the end of the list, like this:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'blog',
]

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

&lt;/div&gt;



&lt;p&gt;Now let's define our Blog model in the &lt;a href="http://models.py"&gt;&lt;code&gt;models.py&lt;/code&gt;&lt;/a&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db import models

class Category(models.Model):
    name = models.CharField(max_length=100)

    def __str__ (self):
        return self.name
class Post(models.Model):
    title = models.CharField(max_length=100)
    content = models.TextField()
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    category = models.ForeignKey(Category, on_delete=PROTECT)

    def __str__ (self):
        return self.title

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

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;Post&lt;/code&gt; model with four fields: &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;content&lt;/code&gt;, &lt;code&gt;created_at&lt;/code&gt;, and &lt;code&gt;updated_at&lt;/code&gt;. The &lt;code&gt;created_at&lt;/code&gt; field will be automatically set to the current date and time when a new post is created, and the &lt;code&gt;updated_at&lt;/code&gt; field will be automatically updated to the current date and time whenever a post is updated.&lt;/p&gt;

&lt;p&gt;after creating your models, you have to run the this command to make the neccesary migrations&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py makemigrations
python manage.py migrate

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

&lt;/div&gt;



&lt;p&gt;Next, let's create a serializer for our &lt;code&gt;Post&lt;/code&gt; model. But before we do that, we first need to install &lt;code&gt;django rest framework&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;then add it in to your list of installed app in your &lt;code&gt;settings.py&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'blog',
    'djangorestframework',
]

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

&lt;/div&gt;



&lt;p&gt;Now when that is done, create a &lt;code&gt;serializer.py&lt;/code&gt; file in your app directory.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="http://serializers.py"&gt;&lt;code&gt;serializers.py&lt;/code&gt;&lt;/a&gt; file in the &lt;code&gt;blog&lt;/code&gt; app, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework import serializers
from .models import Post, Category

class CategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = Category
        fields = ('id', 'name')

class PostSerializer(serializers.ModelSerializer):
    Category = CategorySerializer()
    class Meta:
        model = Post
        fields = ('id', 'title', 'content', 'created_at', 'updated_at', 'category')

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

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;PostSerializer&lt;/code&gt; that will serialize our &lt;code&gt;Post&lt;/code&gt; model into JSON format. The serializer includes all the fields in the &lt;code&gt;Post&lt;/code&gt; model same thing also applies to the category but if you noticed we added a category field to the &lt;code&gt;PostSerializer&lt;/code&gt; this is so that we can include the category the post belongs to when we call the API.&lt;/p&gt;

&lt;p&gt;Now we need to create views that will handle the HTTP requests for our API. In the &lt;a href="http://views.py"&gt;&lt;code&gt;views.py&lt;/code&gt;&lt;/a&gt; file in the &lt;code&gt;blog&lt;/code&gt; app, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework import generics
from .models import Post
from .serializers import PostSerializer

class PostList(generics.ListCreateAPIView):
    queryset = Post.objects.all()
    serializer_class = PostSerializer

class PostDetail(generics.RetrieveUpdateDestroyAPIView):
    queryset = Post.objects.all()
    serializer_class = PostSerializer

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

&lt;/div&gt;



&lt;p&gt;The first class &lt;code&gt;PostList&lt;/code&gt; will handle the get and post request which means that you can retrieve all posts and create a new post in the database. While the second class &lt;code&gt;PostDetail&lt;/code&gt; will handle the get, put, patch and delete of a specific post .&lt;/p&gt;

&lt;p&gt;Here's a brief overview of what these methods mean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;GET&lt;/code&gt;: Used to retrieve a resource or a list of resources from a server. It is a safe method that should not modify any resources on the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;PUT&lt;/code&gt;: Used to update a resource on the server. It replaces the entire resource with the new data provided in the request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;PATCH&lt;/code&gt;: Used to update a resource on the server. It is similar to PUT, but only updates the fields that are provided in the request, leaving the rest of the fields unchanged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;DELETE&lt;/code&gt;: Used to delete a resource from the server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;now that you understand what each of these methods means, lets proceed to the next step which is configuring our urls.&lt;/p&gt;

&lt;p&gt;If you check your directory &lt;code&gt;Blog&lt;/code&gt;, you will notice that &lt;code&gt;urls.py&lt;/code&gt; file isn't present by default, so we are going to create one..&lt;/p&gt;

&lt;p&gt;when created,In the &lt;a href="http://urls.py"&gt;&lt;code&gt;urls.py&lt;/code&gt;&lt;/a&gt; file in the &lt;code&gt;blog&lt;/code&gt; app, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path
from blog.views import PostList, PostDetail

urlpatterns = [
    path('posts/', PostList.as_view(), name='post-list'),
    path('posts/&amp;lt;int:pk&amp;gt;/', PostDetail.as_view(), name='post-detail'),
]

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

&lt;/div&gt;



&lt;p&gt;This creates two URLs: &lt;code&gt;/posts/&lt;/code&gt; for the &lt;code&gt;PostList&lt;/code&gt; view, and &lt;code&gt;/posts/&amp;lt;int:pk&amp;gt;/&lt;/code&gt; for the &lt;code&gt;PostDetail&lt;/code&gt; view&lt;/p&gt;

&lt;p&gt;Also the &lt;code&gt;urls.py&lt;/code&gt; in the &lt;code&gt;blogapi&lt;/code&gt; project directory, you need to map your app urls to your project urls.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="http://urls.py"&gt;&lt;code&gt;urls.py&lt;/code&gt;&lt;/a&gt; file, import the &lt;code&gt;include&lt;/code&gt; function from the &lt;code&gt;django.urls&lt;/code&gt; module&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path, include

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

&lt;/div&gt;



&lt;p&gt;Then define a URL pattern that includes the URL patterns of your app. You can do this by adding the following line of code to the urlpatterns list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;urlpatterns = [
    path('admin/', admin.site.urls)),
    path('blog/', include('blog.urls')),
   # other URL patterns go here
]

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

&lt;/div&gt;



&lt;p&gt;Hooray!!!&lt;/p&gt;

&lt;p&gt;If you made it this far, it means you have finally created your own BlogApi project, you can now start the development server and access your API by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py runserver

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

&lt;/div&gt;



&lt;p&gt;and access your api using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; http://localhost:8000/posts/
or
 http://localhost:8000/posts/&amp;lt;postid&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;So thats it, congratulation !!!, In my next post, i will share with you how to add Filtering, Searching and Ordering feature to your API project.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GPT-4 has finally arrived: Here is what you need to know</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Thu, 16 Mar 2023 07:57:12 +0000</pubDate>
      <link>https://dev.to/codynego/gpt-4-has-finally-arrived-here-is-what-you-need-to-know-3e49</link>
      <guid>https://dev.to/codynego/gpt-4-has-finally-arrived-here-is-what-you-need-to-know-3e49</guid>
      <description>&lt;p&gt;If you are as excited as I am, then you probably have been expecting the arrival of GPT-4 as well. It was less than 1 year ago when OpenAI opened access to the most advanced chatbot called chatgpt, The AI with about 175,000,000 parameters is capable of generating human-like text with almost 100% accuracy, able to write codes, writes documents, communicating and answering questions faster and better than a google search.&lt;/p&gt;

&lt;p&gt;This has put a lot of people in fear that their job will be replaced by AI very soon. OpenAI also announced that they were working on another version of AI known as GPT-4 and it would have over 100,000,000,000(100 billion) parameters. This would mean that it would have more than 10 times the current capacity of GPT-3.&lt;/p&gt;

&lt;p&gt;Less than 48hours ago, OpenAi finally launched GPT-4 and this post will give you 5 awesome abilities of GPT-4:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Generate Codes: unlike GPT-3, GPT-4 can generate more larger and accurate codes and can handle 25K input words. You can just simply tell it "Generate a python code for todo app" and it will. Not only that, but it can also be your best debug partner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create websites from mockup: This is one amazing ability that makes GPT-4 so awesome.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build working video games: The ability for it to create an entire game from scratch in any language makes it so super scary. You can tell it to write you a game of pong or even a snake game or to beat it all, tell it to write you a 3d video game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate meaning from images: If you ever come across an image or photo in which you arent sure whats going on in it, give it to GPT-4 and it will explain and tell you what the image is all about.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prepare and ace exams: With GPT-4, you can prepare and even ace you exams with ease&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Web stack Monitoring Made Easy: Why you need to set up web stack monitoring</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Wed, 15 Mar 2023 20:30:45 +0000</pubDate>
      <link>https://dev.to/codynego/web-stack-monitoring-made-easy-why-you-need-to-set-up-web-stack-monitoring-12ec</link>
      <guid>https://dev.to/codynego/web-stack-monitoring-made-easy-why-you-need-to-set-up-web-stack-monitoring-12ec</guid>
      <description>&lt;h3&gt;
  
  
  What is web stack monitoring?
&lt;/h3&gt;

&lt;p&gt;When most people hear the word "monitoring", they know this to be when you are being watched or you are watching over something.&lt;/p&gt;

&lt;p&gt;But in software engineering, web stack monitoring is simply when you pay constant attention or monitoring to a different component of your web stack such as web server, application server, database, and other services..&lt;/p&gt;

&lt;p&gt;And the type of monitoring can range from collecting data from various performance metrics such as CPU usage, memory usage, network traffic, and disk space utilization, to monitoring the availability and response time of web services, applications, and databases. Depending on the needs and requirements of the organization, monitoring can be performed at various levels, including server-level, application-level, and user-level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do we need to monitor?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FR03zThn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1678911828308/39641c76-9f9d-43d5-85c5-402d87a6f23f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FR03zThn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1678911828308/39641c76-9f9d-43d5-85c5-402d87a6f23f.png" alt="" width="800" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Webstack monitoring is an important aspect of maintaining the health and performance of your system, application, or network. Always remember your application isn't perfect and there are times when you will experience failure may be due to high traffic or something else.&lt;/p&gt;

&lt;p&gt;Here are 3 reasons why you should consider setting up web monitoring:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Preventing Security Breaches: Not only will you be able to detect some security issues, and you will also be able to detect flaws, potential security threats, and vulnerabilities before hackers have the chance to take advantage of them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance Optimization: Monitoring can help identify bottlenecks, slow response times, and other performance issues that can impact user experience. By analyzing metrics such as response time, throughput, and resource utilization, you can optimize system performance and improve the user experience. For example, if a web page is taking too long to load, monitoring can help identify the cause of the issue and allow you to take corrective action to improve load times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improve Decision-Making: Monitoring provides you with valuable data and insights that can help you make informed decisions about resource allocation, capacity planning, and infrastructure investments. By tracking KPIs and analyzing trends, you can identify patterns and make data-driven decisions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;so when next you are thinking of building your next project or you already have an existing one, then you should always consider adding a monitoring tool such as datadog, this way, when your application is about to fail be it from the server, load balancer, database, etc you will be able to detect it early then fix it.&lt;/p&gt;

&lt;p&gt;In my next post, I will be sharing with you how to set up a web monitoring tool like (datadog) into your web stack.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What happens when you type google.com in your browser and press Enter?</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Tue, 07 Feb 2023 08:27:06 +0000</pubDate>
      <link>https://dev.to/codynego/what-happens-when-you-type-googlecom-in-your-browser-and-press-enter-45ld</link>
      <guid>https://dev.to/codynego/what-happens-when-you-type-googlecom-in-your-browser-and-press-enter-45ld</guid>
      <description>&lt;p&gt;This post will give you an overview of what happens whenever you try to access a web page through a web browser...&lt;/p&gt;

&lt;p&gt;Whenever you entered a URL such as &lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt; into your web browser, the browser sends a request to DNS in order to translate the beautiful and easily remembered URL (&lt;a href="http://google.com"&gt;google.com&lt;/a&gt;) into the IP Address (e.g 127.243.753.12) of the server in which the web page is stored. When the IP is identified, a TCP/IP (Transmission Control Protocol/Internet Protocol) is established. This ensures that data is transmitted successfully and efficiently between your device and the server it is trying to access.&lt;/p&gt;

&lt;p&gt;The moment a &lt;strong&gt;TCP/IP&lt;/strong&gt; connection is made, the next is the &lt;strong&gt;FIREWALL&lt;/strong&gt; (which checks for incoming and outgoing network traffic based on certain set of rules) which will check if the request is allowed through to the server.&lt;/p&gt;

&lt;p&gt;Once the request is cleared by the &lt;strong&gt;FIREWALL&lt;/strong&gt; , your request will be sent to the &lt;strong&gt;LOAD BALANCER&lt;/strong&gt; which will distribute network traffic among other servers (2 or more) so that a single server will not be overloaded with traffic which might cause a server break down or SPOF (single point of failure).&lt;/p&gt;

&lt;p&gt;After passing through the &lt;strong&gt;LOAD BALANCER&lt;/strong&gt; , the request will be sent to the web server which will handle your request and server the necessary css, html and javascript needed to make up the website.&lt;/p&gt;

&lt;p&gt;The web server then sends the request to the application server, which is responsible for executing any server-side code and querying the database to retrieve any necessary information.&lt;/p&gt;

&lt;p&gt;When that is done, the application server sends the request to the database, which retrieves the requested data and sends it back to the application server. The application server then formats the data and sends it back to the web server, which returns it to the user's browser to be displayed as the Google website.&lt;/p&gt;

&lt;p&gt;It's also important to note that, the request is using HTTPS (HTTP Secure), a security protocol that encrypts the transmitted data, adding an extra layer of security to the process. The SSL (Secure Sockets Layer) certificate which is used to encrypt the traffic is also verified by the browser.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>5 Most Used Linux Commands For Beginners</title>
      <dc:creator>Abednego Emonena</dc:creator>
      <pubDate>Sun, 13 Nov 2022 09:49:47 +0000</pubDate>
      <link>https://dev.to/codynego/5-most-used-linux-commands-for-beginners-3a1j</link>
      <guid>https://dev.to/codynego/5-most-used-linux-commands-for-beginners-3a1j</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2qnz9Emz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cunllyya2wbuh9yujwwn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2qnz9Emz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cunllyya2wbuh9yujwwn.jpeg" alt="A Linux Command line" width="700" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a few months of learning to code in the command line, I have come to understand and get to love using Linux to write most of my programs.&lt;/p&gt;

&lt;p&gt;As a beginner who is starting to use Linux, you might find it challenging to use the command line especially if you have gotten so use to working on GUI.&lt;/p&gt;

&lt;p&gt;In this post, I will share with you 10 most used Linux Command and it's uses.&lt;/p&gt;

&lt;p&gt;1.&lt;br&gt;
pwd: Since you are working in the command line, it might sometimes be difficult for you to know which directory you are working on, that's why &lt;code&gt;pwd&lt;/code&gt; meaning &lt;code&gt;print working directory&lt;/code&gt; will print out the current directory you are working on.&lt;br&gt;
Usage:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;2.&lt;br&gt;
cd: Also known as &lt;code&gt;change directory&lt;/code&gt; will help you navigate your way into directory directory&lt;br&gt;
for example: to change into another directory in the same directory you type&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;3.&lt;br&gt;
ls:  Known as &lt;code&gt;less&lt;/code&gt; will will all the files and directory in the current working directory&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;4.&lt;br&gt;
sudo apt-get install: I use this command most of the time to install essential tools or programs into my Linux machine&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install &amp;lt;program_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.&lt;br&gt;
ps: This command is used to print the PID or Process Id of all currently running processes within your Linux machine.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This are my most used Linux Command,which tend to come in whenever I work in the Linux CLI&lt;br&gt;
Thanks for reading.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
