<?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: DoreenNangira</title>
    <description>The latest articles on Forem by DoreenNangira (@doreen970).</description>
    <link>https://forem.com/doreen970</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%2F1177104%2F8d461109-9dfe-4a59-a4df-dd463fff8b2a.jpeg</url>
      <title>Forem: DoreenNangira</title>
      <link>https://forem.com/doreen970</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/doreen970"/>
    <language>en</language>
    <item>
      <title>My software engineering journey</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Sat, 29 Jun 2024 17:10:24 +0000</pubDate>
      <link>https://forem.com/doreen970/my-software-engineering-journey-1okc</link>
      <guid>https://forem.com/doreen970/my-software-engineering-journey-1okc</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;Dear readers, my name is Doreen Nangira. I am a software engineer and a data lover. Today I am going to talk about my software engineering journey, the challenges I have faced and also the happy moments.&lt;/p&gt;

&lt;h2&gt;
  
  
  EDUCATION BACKGROUND
&lt;/h2&gt;

&lt;p&gt;After completing my high school studies, I joined the  Technical University Of Kenya. I got enrolled in a Bachelor Of Science In Information Technology. Wow! I was finally happy that I got to join the university since it had always been my dream since I was a kid. I thought that everything was going to be straightforward like in high school but this was not the case. We immediately started got introduced to units that did not ring a bell to me. Units like object oriented programming, computer architecture and even a simple introduction to computers seemed like Greek to me. Most of my classmates had initially studied computer studies in high school but when it came to me, I was hearing of computer terms for the first time. Simple things like connecting the computer to the power supply or pressing the CPU button were new to me. As a result I really struggled during my first years. To make the matter worse, I got into this course without having a clear picture of what I wanted to be after these. I thought that IT only involved hardware maintenance and networking since these are the things I did during my school attachments. Three years down the line, I realized I did not want to be a computer repair person for the rest of my life. After completed my four years, graduated then went on a journey of self discovery.  I realized I enjoyed interacting with people and therefore ventured into the customer experience field.&lt;/p&gt;

&lt;h2&gt;
  
  
  THE BREAKTHROUGH
&lt;/h2&gt;

&lt;p&gt;After being in this field for 5 years, I realized I was not growing. I still loved the job but I wanted something more. I therefore quit my job and started looking for other things that I could do. I wanted something that I would do without getting bored and still have the freedom of doing this thing from anywhere. That is when I stumbled upon Danny Thompson's Linkedin. I went through his story and learnt of how he ventured into software engineering. The more I read about Danny the more I fell in love with software engineering. I started looking for videos on Youtube and stumbled upon Mosh Hamedani's tutorial on Python for beginners. Mosh explained the concepts so well that he made everything seem easy. As I wrote my code along I realized I wanted more of that. That is when I realized that indeed programming in the university was not that hard. I only needed the right foundations. I then realized that this is the thing I wanted to do for the rest of my life. &lt;/p&gt;

&lt;h2&gt;
  
  
  ALX AFRICA PROGRAM
&lt;/h2&gt;

&lt;p&gt;As I was still searching online for more learning resources, I embarked on ALX SOFTWARE ENGINEERING program. This is a one year program that equips one with full stack software engineering skills. It is through ALX that I finally got to understand some of the units we covered while at the university. The projects and tasks in their curriculum ensured that one had the key fundamentals of software engineering. &lt;/p&gt;

&lt;h2&gt;
  
  
  HNG INTERNSHIP
&lt;/h2&gt;

&lt;p&gt;While pursuing my ALX studies, I also stumbled upon HNG internship program. This is a fast paced internship that helps software engineers to put their skills into use. Since I like both software engineering and data science, I enrolled in two of their tracks. I enrolled in the data analytics track and the backend software engineering track. Why did I choose backend track? I chose the backend track because I realized I enjoy working with databases, APIs and creating functionalities than the visual part of the frontend. I realized that when it comes to frontend engineering I usually struggle a lot but with backend things just flow. The same applies to data science or data analytics. When given data, my face just gets a smile. I can work with data the whole night trying to find insights without getting bored. &lt;/p&gt;

&lt;h2&gt;
  
  
  CHALLENGES
&lt;/h2&gt;

&lt;p&gt;One of the major challenges I have faced during my software engineering journey is unstable internet. This has made me lag behind in my ALX journey and even forced me to defer at one point. When it comes to challenging projects, the list is endless. One of my most recent project that I did was coming up with a web crawler in Django. It was a Django project and therefore the web crawler had to be one of the applications. Finding the right tools or modules for this was a challenge. I had to do a lot of research on various web crawling tools out there and find the most suitable for the task at hand. Understanding the difference between web crawling and web scrapping was also a challenge. I had initially done a web scrapping project but this one entailed web crawling. I had to create a group of me and two other fellow Django developers and we worked on a mini web crawling task before I finally embarked on mine. Collaborating with friends made me learn a lot and it made the project look simpler or easier than before. &lt;/p&gt;

&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;Software engineering is a very beautiful and also a wide field. One can decide to be a frontend engineer, backend engineer or even full-stack. In my case, I decided to concentrate on backend engineering first, since I believe that is where my strengths are. My love for  databases, APIs integration and data is just so unbelievable.  You do not have to start big or start with a big project by the way. The secret to starting out is to start small and build more as you go. &lt;/p&gt;

&lt;p&gt;For those who want to check out ALX PROGRAM or HNG internship, you can click on the links below:&lt;br&gt;
ALX&lt;br&gt;
&lt;a href="https://www.alxafrica.com/"&gt;https://www.alxafrica.com/&lt;/a&gt;&lt;br&gt;
HNG&lt;br&gt;
&lt;a href="https://hng.tech/internship"&gt;https://hng.tech/internship&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire"&gt;https://hng.tech/hire&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>womenintech</category>
      <category>learning</category>
    </item>
    <item>
      <title>SALES DATA ANALYSIS</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Sat, 29 Jun 2024 13:30:39 +0000</pubDate>
      <link>https://forem.com/doreen970/sales-data-analysis-264m</link>
      <guid>https://forem.com/doreen970/sales-data-analysis-264m</guid>
      <description>&lt;h2&gt;
  
  
  INTRODUCTION
&lt;/h2&gt;

&lt;p&gt;Dear readers, in this article, I am going to share my findings of a data analysis project that I recently undertook during my HNG internship program. HNG is a fast paced program that helps developers and people in the tech field to practice their skills according to their domain. In this task, we were given sample datasets from Kaggle and we were asked to perform analysis on the project. The main aim of this project was to come up with a detailed data analysis report. Without wasting more time, let's dive into the details. &lt;/p&gt;

&lt;h2&gt;
  
  
  PREREQUISITES AND PREPARATION
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Install necessary tools&lt;/strong&gt;&lt;br&gt;
You can use either Excel, SQL, Python or your preferred tool. In my case, I used Python. I installed the Python libraries for data analysis such as Pandas for data manipulation and Matplotlib for visualization. &lt;br&gt;
&lt;strong&gt;Extract your data&lt;/strong&gt;&lt;br&gt;
I extracted my data from kaggle using Pandas. The following is the link&lt;br&gt;
&lt;a href="https://www.kaggle.com/datasets/kyanyoga/sample-sales-data"&gt;https://www.kaggle.com/datasets/kyanyoga/sample-sales-data&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perform your data cleaning and analysis&lt;/strong&gt;&lt;br&gt;
After extracting your data, study it then start working on it&lt;/p&gt;

&lt;h2&gt;
  
  
  KEY VARIABLES AND DATATYPES
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Numeric(Integers and Floats):&lt;br&gt;
I. Sales&lt;br&gt;
II. Price Each&lt;br&gt;
III. Quantity Ordered&lt;br&gt;
IV. Order Number&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Categorical:&lt;br&gt;
I. Country&lt;br&gt;
II. City&lt;br&gt;
III. Customer Name&lt;br&gt;
IV. Product Line&lt;br&gt;
V. Deal Size&lt;br&gt;
VI. Status&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Date:&lt;br&gt;
I. Order Date&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  INITIAL INSIGHTS
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The dataset has 2823 rows and 25 columns
This is achieved by using .shape method on your Dataframe eg if your Dataframe is named df, below is how you can implement this.
&lt;code&gt;print(df.shape)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;There is a total of 7 products in the dataset that is unique names in the PRODUCTLINE column&lt;/li&gt;
&lt;li&gt;The dataset has null values and these are found in 3 columns namely 
State, Address line 2 and Postal code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;SALES PERFORMANCE BY PRODUCT&lt;/strong&gt;&lt;br&gt;
Among the 7 products in the dataset, classic cars have the highest total sales of &lt;strong&gt;3.27 million&lt;/strong&gt; while Trains have the lowest of &lt;strong&gt;201 thousand&lt;/strong&gt;. Also, classic cars have the highest orders of &lt;strong&gt;28,547&lt;/strong&gt; while trains have the least number of orders of &lt;strong&gt;2,395&lt;/strong&gt;.&lt;br&gt;
Below is a Pie chart showing sales of each product in percentage:&lt;br&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%2F6p4j5df4adacgxucpu9x.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%2F6p4j5df4adacgxucpu9x.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;SALES PERFORMANCE BY TERRITORY&lt;/strong&gt;&lt;br&gt;
EMEA has the highest number of sales while Japan has the lowest number of sales&lt;br&gt;
&lt;strong&gt;SALES PERFORMANCE BY MONTH&lt;/strong&gt;&lt;br&gt;
November has the highest number of sales of &lt;strong&gt;2.1 million&lt;/strong&gt; while June has the lowest number of sales of &lt;strong&gt;454,756.78&lt;/strong&gt; thousand. &lt;br&gt;
Below is a figure that shows this data:&lt;br&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%2Fwatxjhm2gamxkm9ovhku.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%2Fwatxjhm2gamxkm9ovhku.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;PERFORMANCE BY STATUS&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2617&lt;/strong&gt; products were successfully shipped&lt;br&gt;
**60 **products that were initially ordered got cancelled&lt;/p&gt;

&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;Initial observation of the sales dataset reveals sales distribution over key metrics such as year, month, territory and even products. More insights to be found include:&lt;br&gt;
a. Customers with highest number of sales&lt;br&gt;
b. The countries with least number of sales and the ones with highest number of sales&lt;br&gt;
c. Customers that have the highest number of orders cancelled&lt;/p&gt;

&lt;p&gt;To view a detailed analysis of this project, check my repository on github below:&lt;br&gt;
&lt;a href="https://github.com/Doreen970/HNG_data"&gt;https://github.com/Doreen970/HNG_data&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn about HNG internship, follow the following links:&lt;br&gt;
&lt;a href="https://hng.tech/internship"&gt;https://hng.tech/internship&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire"&gt;https://hng.tech/hire&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>hnginternshi</category>
      <category>python</category>
      <category>dataanalytics</category>
    </item>
    <item>
      <title>Python Modules: A developer's guide</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Wed, 14 Feb 2024 16:31:52 +0000</pubDate>
      <link>https://forem.com/doreen970/python-modules-a-developers-guide-1lhj</link>
      <guid>https://forem.com/doreen970/python-modules-a-developers-guide-1lhj</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;As a python developer, I am sure you have once encountered this term. For those who are just starting out on their python journey, don't worry because by the time you are done with this tutorial you will have a better understanding of python modules. So, let's get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a module?
&lt;/h3&gt;

&lt;p&gt;A module refers to a file containing a set of defined variables, functions and statements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do we use modules?
&lt;/h3&gt;

&lt;p&gt;Modules help us to reuse our code. For instance, if you are writing a new program then you remember there is a code you wrote in a previous program that might be useful in your current program, you can implement the concept of modules here. We will see how to go about this in our next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of modules in python
&lt;/h2&gt;

&lt;p&gt;We have two main types of modules in python. These are &lt;strong&gt;built-in **modules and **user-defined&lt;/strong&gt; modules. As the name suggests, built-in modules are those that come with python when you install python in your computer. You don't need to make them. An example of a built-in module in python is the sys module which contains many predefined functions and variables. The second type of module is the user-defined module. As the name suggests, the end user is the one who makes these modules. In this tutorial we will concentrate on user-defined modules and how to make them.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you make a module?
&lt;/h3&gt;

&lt;p&gt;First of all you need to make sure you have python installed in your machine. Open your favorite code editor then navigate to the directory or folder where you want to write your programs. Create a python file called &lt;strong&gt;add_0.py&lt;/strong&gt;. This is the file that will act as our module. Add the following lines of code to your file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/python3
def add(a, b):
    """My addition function

    Args:
        a: first integer
        b: second integer

    Returns:
        The return value. a + b
    """
    return (a + b)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's go through the above code. The first line is a shebang line to tell us that this is a python script. The line says that it runs on python3 version. If you want a different version of python you can specify there. The second line defines a function named add. This function takes in two arguments which are integers. It then returns the sum of those two integers by adding them.&lt;br&gt;&lt;br&gt;
Good! We have now finished creating a file that will act as our module. I am sure you are now asking yourself, how do we make use of this module? Well let's do this in the next step.&lt;/p&gt;
&lt;h2&gt;
  
  
  Create a file that will make use of the module
&lt;/h2&gt;

&lt;p&gt;While in the same directory as the one where you created your module file, create a second file called &lt;strong&gt;0-add.py&lt;/strong&gt;. Please note that you can give your file any name that you want. Add the following code in your newly created file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/python3
from add_0 import add
a = 1
b = 2
add(a, b)
print(f"{a} + {b} = {add(a, b)}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's discuss the code we just wrote&lt;br&gt;
The first line is the normal shebang line that tells us this is a python script .&lt;br&gt;
The second line is where the adventure begins. You can see there is a mention of our module file which we named add_0. Since we want to use the add function in our code we need to import it from the owner. The owner here is add_0. We can look at it as a parent and a child. add_0 which is our module file is a parent. This parent has children so in this case let us say add_0 has a child called add. We want to send this child to go run some errands for us. So we will need to ask for permission from the parent first before we can give tasks to the child. So we go to the parent and ask him or her to give us the permission. This is where we use the &lt;strong&gt;import&lt;/strong&gt; statement. The &lt;strong&gt;import&lt;/strong&gt; here is like borrowing the child from the parent. After this we can then use the child who in our case is called &lt;strong&gt;add.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we recall, add is a function that accepts two arguments and returns the sum. So in our case, we first defined two integers &lt;strong&gt;a and b. ** We then call the function add and pass our variables a and b to it. **add(a, b)&lt;/strong&gt; &lt;br&gt;
In the last line we now print the result. &lt;br&gt;
&lt;strong&gt;print(f"{a} + {b} = {add(a, b)}")&lt;/strong&gt;&lt;br&gt;
The print statement takes in the values of a and b and also their sum. Here we have used a string formatter, f-strings &lt;strong&gt;f&lt;/strong&gt;. This f-string here converts all our values in the print statement into strings and concatenates them. We mostly use f-strings when we want to embed variables and expressions into string literals. &lt;br&gt;
You can read more about f-strings in the python official documentation  [&lt;a href="https://docs.python.org/3/tutorial/inputoutput.html"&gt;https://docs.python.org/3/tutorial/inputoutput.html&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;To check if your code is running, you can now run your code. You can either run it by writing python3 0-add.py or you can convert your file to an executable file first then run it directly without python3 word. To convert it to an executable write &lt;strong&gt;chmod u+x 0-add.py&lt;/strong&gt; After making it an executable file you can run it by writing &lt;strong&gt;./0-add.py.&lt;/strong&gt; You will see the result of the addition as shown below.&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%2Frguy0lsqht2c4r37a2nb.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%2Frguy0lsqht2c4r37a2nb.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
There are many ways of importing the module add_0.py. The above example is only one of the ways. The following code shows another way of importing our module. Make another file called &lt;strong&gt;para.py&lt;/strong&gt; then 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;#!/usr/bin/python3
import  add_0

a = 1
b = 2
add_0.add(a, b)
print(f"{a} + {b} = {add_0.add(a, b)}")

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

&lt;/div&gt;



&lt;p&gt;The above code is almost similar to the one we wrote but in this case we are not using the from statement. We are importing our module first then when we want to use the &lt;strong&gt;add()&lt;/strong&gt; function, we use dot notation. Look it as a way of calling the child of a parent. eg if we have a parent called &lt;strong&gt;Jane&lt;/strong&gt; we want her child who is called &lt;strong&gt;Mary&lt;/strong&gt;, we will say &lt;strong&gt;Jane.Mary&lt;/strong&gt;. So it is like we are saying call Mary who is the child of Jane. If the &lt;strong&gt;add()&lt;/strong&gt; function is called without referencing the parent who is &lt;strong&gt;add_0&lt;/strong&gt;, our function will not execute. Python will not recognize it and you will get errors.&lt;br&gt;
When you run your new file para.py, you will get the same result as you got when you ran 0-add.py as shown below.&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%2Fl78cmn7rnaf0a1hneb18.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%2Fl78cmn7rnaf0a1hneb18.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we create our files in the same directory as the module directory?
&lt;/h2&gt;

&lt;p&gt;I know you must have asked yourself this question. Well, this is because when you import a module, python always looks for the name of that module within your folder. If the module you specified is not in the same folder as the file you are running, python will give you an error and say module not found. &lt;/p&gt;

&lt;h2&gt;
  
  
  How do you prevent the code in your script from executing when imported?
&lt;/h2&gt;

&lt;p&gt;Sometimes you want your code to only run within the environment in which it resides. You don't want someone to go import it and use it in a different environment. How do we do this? Well, let's first of all try to import the script para.py from a python3 shell. Let's see how it behaves. To enter the python shell, write python3 on your terminal then press enter. You will enter the python interactive mode as shown below:&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%2F4d5wwpp7naxc5fwne1l4.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%2F4d5wwpp7naxc5fwne1l4.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Now try importing your file &lt;strong&gt;para.py&lt;/strong&gt; by writing &lt;strong&gt;import para&lt;/strong&gt;. You will realize that your code executes as shown below.&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%2Fgl749d0684haa8g8gbj4.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%2Fgl749d0684haa8g8gbj4.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
To stop our script from executing when imported, we need to modify our para.py file. leave the python shell by writing &lt;strong&gt;exit()&lt;/strong&gt; to go back to your initial terminal.&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%2Fp8ew612ht0flj4ny8xsf.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%2Fp8ew612ht0flj4ny8xsf.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Open para.py file and modify it to appear as below:&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%2Fl4fltbao2vvyqka3gsg6.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%2Fl4fltbao2vvyqka3gsg6.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Save your changes then run your file and you will realize it is still giving the required results. &lt;br&gt;
Now open the python interactive shell and try importing your modified file. You will realize that this time round the code is not executing. &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%2F94ahby5n4b6so1j1qmvx.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%2F94ahby5n4b6so1j1qmvx.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Good! You just prevented your file from being imported.&lt;br&gt;
So let us explain how this was achieved. &lt;br&gt;
The line if &lt;strong&gt;&lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;"&lt;/strong&gt;: is the magic. Don't forget the &lt;strong&gt;double underscore&lt;/strong&gt; characters surrounding the &lt;strong&gt;name&lt;/strong&gt; and &lt;strong&gt;main&lt;/strong&gt; as shown in our code example.&lt;br&gt;
This line says that the code below it should only be executed if the file is being run from within its original environment where it resides. If the environment is different, the code will not execute.&lt;br&gt;
You can read more about &lt;strong&gt;name&lt;/strong&gt; == "&lt;strong&gt;main&lt;/strong&gt;" and its use in the python official documentation. &lt;/p&gt;

&lt;h2&gt;
  
  
  Difference between functions and modules
&lt;/h2&gt;

&lt;p&gt;Some of you might find it difficult to differentiate between functions and modules. We all know that functions are reusable and that we can always avoid repetition by using functions. How do you differentiate between the two? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A function is meant to perform a specific task while a module is not restricted to a given task. For example, you can have a function that is only meant for adding numbers. A module on the other hand contains definitions of a mixture of many things such as functions, variables etc. A module can have many different function definitions within it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another difference is that a function resides in a file. It cannot be standalone while a module is a standalone file. A module is a whole file in itself containing different definitions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A function should always be defined and it should start with a def keyword while a module does not follow any way in which it should start. Once you write your create your module file, you can always write the things you want included there.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just few examples of the difference but the list is long. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations! You have reached the end of your tutorial. I hope by this time you have a better understanding of modules. You can now start making use of them. This tutorial is meant to give you a foundation on modules. To learn more about modules, navigate to the python documentation &lt;a href="https://docs.python.org/3/tutorial/modules.html"&gt;https://docs.python.org/3/tutorial/modules.html&lt;/a&gt;.&lt;br&gt;
See you soon! Adios!&lt;/p&gt;

</description>
      <category>pythonmodule</category>
      <category>pythontutorial</category>
      <category>coding</category>
    </item>
    <item>
      <title>Get started with Linux: A developer's friend</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Fri, 02 Feb 2024 10:56:46 +0000</pubDate>
      <link>https://forem.com/doreen970/get-started-with-linux-a-developers-friend-19gb</link>
      <guid>https://forem.com/doreen970/get-started-with-linux-a-developers-friend-19gb</guid>
      <description>&lt;p&gt;Do you want to take full control of your system operations? Want to know what happens behind the scenes? Well you need to know how to interact with the terminal. In this tutorial, we will go through some important Linux commands. This tutorial is not only for developers. System administrators, Devops engineers and cyber security professionals need this too! &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Linux?
&lt;/h2&gt;

&lt;p&gt;Linux is an open source Unix-like operating system. This means the commands that you run on any Unix machine will be similar to the ones you run on Linux.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linux distributions
&lt;/h2&gt;

&lt;p&gt;The Linux ecosystem has various distributions such as ubuntu, arch linux, fedora etc. In this tutorial we will be using ubuntu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To get started, make sure you have a Linux distribution installed in your machine. For those using MacOs or Unix machines, you do not need to install anything. You just need to open your terminal and you are good to go. &lt;/p&gt;

&lt;p&gt;For those using windows OS, you will need to first of all install WSL in your system. WSL is a feature that enables you to have a Unix like terminal in your windows machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to follow:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open windows powershell as an administrator&lt;/li&gt;
&lt;li&gt;Write pip install wsl&lt;/li&gt;
&lt;li&gt;Install ubuntu&lt;/li&gt;
&lt;li&gt;Set your username and password for your ubuntu&lt;/li&gt;
&lt;li&gt;Navigate to Microsoft official website and type windows terminal&lt;/li&gt;
&lt;li&gt;Pick download windows terminal&lt;/li&gt;
&lt;li&gt;After downloading windows terminal it will open in powershell&lt;/li&gt;
&lt;/ul&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%2F5r60epzjm7ktfdb2oneg.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%2F5r60epzjm7ktfdb2oneg.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can change the terminal from powershell to ubuntu by clicking the dropdown arrow and choosing ubuntu as shown below&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%2Frdtrwi1wdma77duwgh03.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%2Frdtrwi1wdma77duwgh03.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Once your screen appears this way, then you are ready to start!&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Linux commands
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;whoami:&lt;/strong&gt; This returns the name of the currently logged in user&lt;br&gt;
Navigate to your terminal then type &lt;strong&gt;whoami&lt;/strong&gt;. Press enter and see the magic&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%2Fb3onrzgh1ny0588uh14e.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%2Fb3onrzgh1ny0588uh14e.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;man:&lt;/strong&gt; This command stands for manual. It gives us information about other commands and usage. You can call it the linux google! &lt;br&gt;
Type man then press enter.&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%2F2w6926wyfb8qujl36jr6.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%2F2w6926wyfb8qujl36jr6.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Now type &lt;strong&gt;man&lt;/strong&gt; &lt;strong&gt;whoami&lt;/strong&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%2Ftj7kyjfjxk1dppa7km65.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%2Ftj7kyjfjxk1dppa7km65.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
To get out of man page, press **q **and get back to the terminal&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pwd:&lt;/strong&gt; This command tells you the current directory in which you are.&lt;br&gt;
This really helps a lot especially when you have to run commands in a specific directory. &lt;br&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%2Fahjivi9naz1g2mcpyo7b.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%2Fahjivi9naz1g2mcpyo7b.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Type **pwd **then press enter&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%2Fyzdhuj95he6up7hmyytn.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%2Fyzdhuj95he6up7hmyytn.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mkdir:&lt;/strong&gt; This command is used to make a new directory or folder&lt;br&gt;
Type &lt;strong&gt;mkdir&lt;/strong&gt; followed by the name of the directory you want to make&lt;br&gt;
Example let's make directory named Friday&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd:&lt;/strong&gt; To navigate to the directory you just made. type **cd **followed by name of the directory.&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%2F85ammmer1cj6mq8fxh7g.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%2F85ammmer1cj6mq8fxh7g.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ls:&lt;/strong&gt; This command is used to list the contents of your folder.&lt;br&gt;
Our current directory Friday has no content. So when you type the ls command you will not see anything. Try it.&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%2Fu3a1s7j43muxswygdvar.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%2Fu3a1s7j43muxswygdvar.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
To see some content in our directory we will need to add some content. let us do this using the next command we will learn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;touch:&lt;/strong&gt; This command is used to create files&lt;br&gt;
write touch followed by the name of your new file&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%2F26aa1esnqncuuwaezk37.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%2F26aa1esnqncuuwaezk37.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
now use the &lt;strong&gt;ls&lt;/strong&gt; command to check if the new file created is present&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%2Frwqcr7zauo71d2qa75gy.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%2Frwqcr7zauo71d2qa75gy.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ls -l:&lt;/strong&gt; This lists contents of your folder or file in long list format. It shows you the person who created the files or folder, when it was created, file permissions etc.&lt;br&gt;
type &lt;strong&gt;ls -l&lt;/strong&gt; then press enter&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%2F7zjb1oxvto5prs7zwmjq.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%2F7zjb1oxvto5prs7zwmjq.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mv:&lt;/strong&gt; This command has two main uses. it is used to rename a file and also used for moving files to a different folder.&lt;br&gt;
Let's first check the first use of renaming a file. &lt;br&gt;
type &lt;strong&gt;mv&lt;/strong&gt; followed by the current file name then the new file name&lt;br&gt;
eg &lt;strong&gt;mv afternoon evening&lt;/strong&gt;. Press enter then type &lt;strong&gt;ls&lt;/strong&gt; to check the new file name&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%2Fevhe9503on3urhm1thfu.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%2Fevhe9503on3urhm1thfu.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To implement the second use of &lt;strong&gt;mv&lt;/strong&gt; command, we need to make a new directory.&lt;br&gt;
Use the command &lt;strong&gt;mkdir&lt;/strong&gt; to make a new directory called day&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%2F3qjej9kqv20yvv7h0cy4.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%2F3qjej9kqv20yvv7h0cy4.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Now to transfer the evening file into day folder, write &lt;strong&gt;mv evening /day&lt;/strong&gt;. Please note that sometimes when you type this command you will get permission denied. This is a linux feature for security that ensures some actions are only performed by authorized users. To bypass this, write &lt;strong&gt;sudo mv evening /day&lt;/strong&gt;. The sudo command gives you administrative privileges. You will be prompted for a password when you use &lt;strong&gt;sudo&lt;/strong&gt;. Type in your linux password then press enter.&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%2Fqu3crib7juf2e6z2u5cq.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%2Fqu3crib7juf2e6z2u5cq.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Please note the / sign before name of folder. press enter.&lt;br&gt;
To check the contents of the new folder day, type &lt;strong&gt;ls /day&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rmdir:&lt;/strong&gt; This command is used to delete a directory. Let us delete the directory day. Type &lt;strong&gt;rmdir&lt;/strong&gt; followed by name of directory you want to delete. eg &lt;strong&gt;rmdir day&lt;/strong&gt;. Type ls to check that the directory no longer exists&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%2F4v2pq7g0c099lbc1drkj.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%2F4v2pq7g0c099lbc1drkj.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;rm:&lt;/strong&gt; This is used to delete a file&lt;br&gt;
let's make another file called tutor then we delete it. &lt;br&gt;
type &lt;strong&gt;touch tutor&lt;/strong&gt; to make the file then type &lt;strong&gt;ls&lt;/strong&gt; to confirm that it is present. Now type &lt;strong&gt;rm&lt;/strong&gt; &lt;strong&gt;tutor&lt;/strong&gt; to delete it then type ls to see what happens&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%2Fb1vr7chhdzz1uy1p9fxn.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%2Fb1vr7chhdzz1uy1p9fxn.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cd -:&lt;/strong&gt; We looked at cd command that means changing directory. Now what does &lt;strong&gt;cd -&lt;/strong&gt; do? The &lt;strong&gt;cd -&lt;/strong&gt; takes you back to your previous directory. Type cd - then press enter.&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%2Fwwdg1l8d1pklpc2dbyui.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%2Fwwdg1l8d1pklpc2dbyui.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have come to our end of this tutorial. This should form as a basis to get you started in the world of Linux or Unix systems. Feel free to leave your feedback and suggestions on the topics I should discuss with you. Thank you and see you in my next tutorial!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>terminal</category>
      <category>devops</category>
      <category>unix</category>
    </item>
    <item>
      <title>Understanding Reconnaissance in Cybersecurity</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Tue, 09 Jan 2024 21:59:19 +0000</pubDate>
      <link>https://forem.com/doreen970/understanding-reconnaissance-in-cybersecurity-46cb</link>
      <guid>https://forem.com/doreen970/understanding-reconnaissance-in-cybersecurity-46cb</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Wondering how hackers manage to get people's data? Are you a security professional who wants to protect your organization from cyber attack or just an individual who wants to be safe from cyber attacks? Well, this article is for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is reconnaissance?
&lt;/h2&gt;

&lt;p&gt;Reconnaissance(Recon) refers to the process of gathering information about a potential target. It is divided into two main categories, that is, Passive Recon and Active Recon.&lt;br&gt;
&lt;strong&gt;Passive recon:&lt;/strong&gt; In this process, there is no engagement with the target. One relies on public resources such as social media accounts to gather information.&lt;br&gt;
&lt;strong&gt;Active recon:&lt;/strong&gt; The person gathering information engages with the target. This can be through one on one communication such as phone calls or even using devices belonging to the target company. &lt;/p&gt;

&lt;p&gt;This article will focus on passive recon.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;In order to follow along, and understand the concepts here, one will need a basic understanding of the Linux operating system and also some networking basics. &lt;/p&gt;
&lt;h2&gt;
  
  
  Tools used for passive Recon
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;whois&lt;/strong&gt;: This command gives us information about a certain domain. It gives us information such as when the domain was registered, when it was updated etc. An attacker can use the information found such as the company email to send phishing attacks. Open your terminal and write the command whois followed by domain name. &lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@99a8ec2bac69:/# whois apple.com
   Domain Name: APPLE.COM
   Registry Domain ID: 1225976_DOMAIN_COM-VRSN
   Registrar WHOIS Server: whois.comlaude.com
   Registrar URL: http://www.comlaude.com
   Updated Date: 2023-08-28T18:33:11Z
   Creation Date: 1987-02-19T05:00:00Z
   Registry Expiry Date: 2025-02-20T05:00:00Z
   Registrar: Nom-iq Ltd. dba COM LAUDE
   Registrar IANA ID: 470
   Registrar Abuse Contact Email: abuse@comlaude.com
   Registrar Abuse Contact Phone: +442074218250
   Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
   Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
   Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
   Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
   Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
   Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
   Name Server: A.NS.APPLE.COM
   Name Server: B.NS.APPLE.COM
   Name Server: C.NS.APPLE.COM
   Name Server: D.NS.APPLE.COM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;nslookup&lt;/strong&gt;: This is used to query the Domain Name System. It shows us the IP addresses for a given domain and information related to each IP address such as mail servers etc.&lt;br&gt;
When an attacker spots vulnerability in any of the IP addresses, he or she might use this to launch an attack.&lt;br&gt;&lt;br&gt;
To get ip addresses write nslookup followed by domain name. In order to get more information such as email servers used, the nslookup will take another argument called OPTIONS. &lt;br&gt;
Syntax: &lt;strong&gt;nslookup OPTION [domain name]&lt;/strong&gt;. In our example, &lt;br&gt;
**-type=MX **is the option for getting email servers&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@99a8ec2bac69:/# nslookup apple.com
Server:         10.251.0.2
Address:        10.251.0.2#53

Non-authoritative answer:
Name:   apple.com
Address: 17.253.144.10
Name:   apple.com
Address: 2620:149:af0::10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@99a8ec2bac69:/# nslookup -type=MX apple.com
Server:         10.251.0.2
Address:        10.251.0.2#53

Non-authoritative answer:
apple.com       mail exchanger = 20 mx-in-hfd.apple.com.
apple.com       mail exchanger = 20 mx-in-vib.apple.com.
apple.com       mail exchanger = 10 mx-in.g.apple.com.
apple.com       mail exchanger = 20 mx-in-mdn.apple.com.
apple.com       mail exchanger = 20 mx-in-rno.apple.com.

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DNSdumpster&lt;/strong&gt;: A part from the command line tools, we have online tools that one can use to get information about a target. DNSdumpster is an online tool that one can use to get more information about a certain domain such us sub domains, IP addresses and even graphical representation of each IP address in relation to others. To use this tool, go to your browser, navigate to the DNSdumpster website then on the search bar write your domain name. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;We have reached the end of today's learning but this does not mean you should stop here. To gain more skills in this field, you will need to do more practice and also explore other available tools. See you soon, Adios!!&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>pentesting</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Build your first Django app part 2</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Tue, 02 Jan 2024 18:12:34 +0000</pubDate>
      <link>https://forem.com/doreen970/build-your-first-django-app-part-2-5a4g</link>
      <guid>https://forem.com/doreen970/build-your-first-django-app-part-2-5a4g</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This is a continuation of the last tutorial. If you haven't checked the previous tutorial please check it here &lt;a href="https://dev.to/doreen970/build-your-first-django-app-beginners-guide-4a30"&gt;&lt;/a&gt;&lt;br&gt;
In the previous tutorial we had already started a Django project and ran it in our local server. So let's dive into the next steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create a Django app&lt;/strong&gt;
Every Django project should have an app. An app is a feature in your project that does a particular thing. For example, if you want to make a website for posting blogs, you will have a blog app. This app will have a name, a database etc. Before we make an app, make sure you have activated your virtual environment.
Navigate to your project root directory where the manage.py file is. Then run the following command:
&lt;strong&gt;python manage.py startapp blog&lt;/strong&gt;
This will create a blog directory with the following structure:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;blog/
    __init__.py
    admin.py
    apps.py
    migrations/
        __init__.py
    models.py
    tests.py
    views.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's briefly talk about the above files.&lt;br&gt;
&lt;strong&gt;&lt;strong&gt;init&lt;/strong&gt;.py:&lt;/strong&gt; enables our folders to be recognized by python as a package&lt;br&gt;
&lt;strong&gt;admin.py:&lt;/strong&gt; a file that contains settings for the admin user ie the owner of the project&lt;br&gt;
&lt;strong&gt;apps.py:&lt;/strong&gt; contains settings for your application&lt;br&gt;
&lt;strong&gt;migrations/:&lt;/strong&gt; A folder that will contain history of changes we make to our database&lt;br&gt;
&lt;strong&gt;models.py:&lt;/strong&gt; This hosts the tables for our database&lt;br&gt;
&lt;strong&gt;tests.py:&lt;/strong&gt; a file that you will use to write tests for your application to ensure it works well&lt;br&gt;
&lt;strong&gt;views.py:&lt;/strong&gt; This is where we write the things we want our application to do. eg if we want our application to display "hello world" on home screen we will define a function for that in views.py then call this function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Register your app&lt;/strong&gt;
Navigate to settings.py file then under installed apps, add your app name there. This will let Django recognize this app.
The following is the structure:
&lt;/li&gt;
&lt;/ul&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write your first view&lt;/strong&gt;
Let's now add functionality to our app. We want the user to see the statement "Hello World" when he or she visits our home page. 
so we will write a function in views.py that displays Hello World.
&lt;/li&gt;
&lt;/ul&gt;

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

def home(request):
    return HttpResponse("Hello World")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The HttpResponse module has to be imported and it takes in an argument. The above function says that whenever the home view is called, a response of Hello World should be displayed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create a urls.py for your app&lt;/strong&gt;
In order to call the home view, we need to define a path to that view. This path is called url. When a user visits this url or link, the home view will be called. So create a new file in your blog folder and name it urls.py
Add the following code in the file.
&lt;/li&gt;
&lt;/ul&gt;

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

urlpatterns = [
    path("", views.home, name="first"),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When writing your url pattern, the first part is the pattern ie the "" above shows that it is blank meaning that this url is the base url. The first path that opens when a user runs the server, the home page.&lt;br&gt;
The second part of a url pattern is the name of the view we want. So here we want the home view.&lt;br&gt;
The third part is the name of the url. This is important especially when we want to use this url in other parts of our project. So we will just reference its name.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Include your app urls in your main urls&lt;/strong&gt;
Now navigate to the urls.py file for your main project. This file is in the same folder as settings.py. Write the following code:
&lt;/li&gt;
&lt;/ul&gt;

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

urlpatterns = [
    path("blog/", include("blog.urls")),
    path("admin/", admin.site.urls),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you open the urls.py, you will find one url path already there. This is the path to the Django admin which comes by default. Now to make your app urls to be recognized by Django, we need to make Django aware. So we need to tell Django that when it checks for urls, it should also include the urls for our blog app. So we will need to use the include function which is first imported from django.urls. Then we write the url path for all the urls in our blog app. This means that when we want to access any url in our app, the first path will be blog then followed by the exact path specified in our app urls. So for our case, to access url for our home view, the user will first navigate to blog path then the second part of the url will be blank since we left it blank in our home url.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run your server&lt;/strong&gt;
To verify that everything is working well, we need to start our server. Write the command &lt;strong&gt;python manage.py runserver&lt;/strong&gt;.
Once the server is running, navigate to &lt;a href="http://localhost:8000/blog/"&gt;http://localhost:8000/blog/&lt;/a&gt; 
You should see the text &lt;strong&gt;Hello World&lt;/strong&gt;
To stop the server, press &lt;strong&gt;CTRL + C&lt;/strong&gt;
Congratulations! You made it! You just made a functioning Django app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have finally reached the end of our tutorial. However, we have not exhausted everything about Django. I hope that this will act as a basic foundation for those of you who want to get into the world of Django. See you soon! Adios!!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>website</category>
      <category>python</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>Beginner's guide to Object Oriented Programming in python(OOP)</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Sat, 25 Nov 2023 18:59:05 +0000</pubDate>
      <link>https://forem.com/doreen970/beginners-guide-to-object-oriented-programming-in-pythonoop-15j5</link>
      <guid>https://forem.com/doreen970/beginners-guide-to-object-oriented-programming-in-pythonoop-15j5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;For most beginners, hearing the term Object-Oriented Programming for the first time can be intimidating. This is because majority look at it as a set of rules they have to follow instead of looking at it as a feature put in place to make their lives easier. In a nutshell, Object-Oriented Programming was introduced to enable us reuse various features of our code without having to write many lines. For those of us who have heard of the DRY(Don't Repeat Yourself) principle, OOP plays a crucial role in this. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Object-Oriented Programming?&lt;/strong&gt;&lt;br&gt;
This is a way of programming that involves putting together related behaviors and properties into individual objects.&lt;/p&gt;
&lt;h2&gt;
  
  
  Commonly used terms in OOP
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- Class&lt;/strong&gt;&lt;br&gt;
A user defined data type. Just like we have built-in data types such as integer(int), OOP allows us to come up with our own data types. This enables us to define the properties and variables for our data types. To come up with a class, write the keyword class followed by the name of that class then a colon. The name of a class should always start with a capital letter and it is advised to stick to CamelCase naming convention. Check the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Human:
pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Object&lt;/strong&gt;&lt;br&gt;
An item that has attributes and methods, also called an &lt;strong&gt;instance&lt;/strong&gt; of a class. This means that an object is derived from a class. For example, the class Human can have objects such as x and y. Both x and y have the characteristics of the class Human such as having eyes, hair etc. The class Human in this case is called the &lt;strong&gt;blueprint&lt;/strong&gt; of the objects x and y since it determines the characteristics an object should have. &lt;/p&gt;

&lt;p&gt;Before an object is created, one has to make sure that the object gets the attributes defined by the class. This is called &lt;strong&gt;object instantiation.&lt;/strong&gt; We use the &lt;strong&gt;&lt;strong&gt;init&lt;/strong&gt;&lt;/strong&gt; method to achieve this. The &lt;strong&gt;&lt;strong&gt;init&lt;/strong&gt;&lt;/strong&gt; method always has a default first parameter known as &lt;strong&gt;self&lt;/strong&gt;. The self parameter serves as a reference to the class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3 features of an object:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Attribute:&lt;/strong&gt; Characteristics or distinguishing features of an object. For example, the class Human can have Height, Weight etc.&lt;br&gt;
&lt;strong&gt;Method:&lt;/strong&gt; The capabilities of an object. They are always represented in form of functions. For example, the class Human can have methods such as walk, swim etc.&lt;br&gt;
&lt;strong&gt;Identity:&lt;/strong&gt; A unique name given to an object.&lt;br&gt;
The following example shows how we can go about creating our objects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Human:
 # attribute initialization
 def __init__(self, name):
  self.name = name
 # creating the methods
 def run(self):
  print("I run")
# instance creation of the class Human.
x = Human("Mary")
x.run()
print(x.run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, a class Human is created. We then introduce the attributes of the class with the &lt;strong&gt;init&lt;/strong&gt; method. The attribute name is stored in a variable called name. The next step involves defining the capabilities of the class Human. We do this by use of methods, that is, a functional representation of the capabilities. For our case, our class is given the method run. The next step is creation of a class instance or an object. The object is called x. We then give the attributes of class Human to object x by assigning it to class Human followed by the attribute in parentheses. The object x gets the capabilities of class Human when we write x.run(). When we print the output of x.run(), we get &lt;strong&gt;I run.&lt;/strong&gt; Good! You successfully created an instance of class Human!&lt;/p&gt;

&lt;p&gt;We have come to the end of this article. However, this is only an introduction to OOP. I hope this will help you get started with OOP as it will act as a foundation for OOP. Stay tuned for more! Until then, Adios!! &lt;/p&gt;

</description>
      <category>python</category>
      <category>dry</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Build Your First Django App: Beginner's Guide</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Sat, 18 Nov 2023 21:02:59 +0000</pubDate>
      <link>https://forem.com/doreen970/build-your-first-django-app-beginners-guide-4a30</link>
      <guid>https://forem.com/doreen970/build-your-first-django-app-beginners-guide-4a30</guid>
      <description>&lt;p&gt;Django is a Python framework that has been here for quite a while. Due to its robust nature and impressive features, many developers have made it the framework of their choice. However, most beginners find it challenging to get started with Django but worry not. I am here to hold your hand and walk you through this amazing journey. So, let's get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;python knowledge:&lt;/strong&gt; You need to have basic knowledge of python such as syntax, python functions and python classes.&lt;br&gt;
&lt;strong&gt;Download python:&lt;/strong&gt; Download and install python in your machine. Navigate to Python.org and get the official version for your machine whether windows, macOS or Unix. To check if python is already installed, write python --version on your terminal or command-line. This will show you your python version.&lt;br&gt;
&lt;strong&gt;Install pip:&lt;/strong&gt; pip is a python package manager that we will use throughout our project to install various features and packages. To install pip, follow the instructions provided on the official Python website, Installing with get-pip.py.&lt;br&gt;
&lt;strong&gt;IDE:&lt;/strong&gt; IDE stands for Integrated Development Environment. This is where we will write our code. Make sure you have one installed. You can use IDE of your choice such as Visual Studio Code, PyCharm etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Development
&lt;/h2&gt;

&lt;p&gt;1.Create a folder that will host your Django project. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a virtual environment. 
When dealing with Django, it is always advisable to create an isolated environment to host different Django projects. This is in order to maintain consistency and avoid future conflicts especially with your project dependencies. 
&lt;strong&gt;windows users:&lt;/strong&gt; navigate to the directory you created then  use the command &lt;strong&gt;py -m venv myenv&lt;/strong&gt;. myenv is the name of our virtual environment.
Unix/MacOS: &lt;strong&gt;python -m venv myenv&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Activate virtual environment
Windows: &lt;strong&gt;myenv\Scripts\activate.bat&lt;/strong&gt;
Unix/MacOS: &lt;strong&gt;source myenv/bin/activate&lt;/strong&gt;
Once the virtual environment is active, you will see the name of your virtual environment displayed and enclosed in brackets. &lt;strong&gt;eg(myenv)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Install Django
Run the command &lt;strong&gt;pip install Django.&lt;/strong&gt; Make sure you do this while in activated virtual environment.&lt;/li&gt;
&lt;li&gt;Create a Django project
You need a name for your Django project. After coming up with a suitable name, run &lt;strong&gt;django-admin startproject project_name .&lt;/strong&gt;
project_name is the name of your project. Please note the &lt;strong&gt;dot(.)&lt;/strong&gt; at the end after project name. This ensures that Django does not create two instances of your project name. Whenever you leave out the dot the name will appear twice and this can be confusing to beginners. Open your Django project folder and you will see some files in it such as urls.py, wsgi.py etc. This shows you you have a Django project now.&lt;/li&gt;
&lt;li&gt;Run your Django project
While still in the root folder of your project, write &lt;strong&gt;python manage.py runserver&lt;/strong&gt; and press enter. This will start the Django development server. Copy the url or address you get and paste it in your browser. If everything is well, you will see the following image.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4mzuKb11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mllhijsuitbwptohww12.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4mzuKb11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mllhijsuitbwptohww12.JPG" alt="picture of a successfully running Django project" width="800" height="595"&gt;&lt;/a&gt;&lt;br&gt;
Good! You now have a Django project. To quit the development server press CTRL+C on your keyboard.&lt;/p&gt;

&lt;p&gt;This is the end of our first series of the tutorial. We will continue with the next steps in the next tutorial.&lt;br&gt;
See you soon, Adios!!&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mastering data formatting in excel</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Thu, 16 Nov 2023 17:45:41 +0000</pubDate>
      <link>https://forem.com/doreen970/mastering-data-formatting-in-excel-5c50</link>
      <guid>https://forem.com/doreen970/mastering-data-formatting-in-excel-5c50</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Data formatting refers to the process of changing the appearance of data so as to make it visually appealing or easy to read and understand. One can perform data formatting tasks on text, numbers or even dates. &lt;/p&gt;

&lt;p&gt;The following are the most common types of data formatting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Text formatting&lt;/strong&gt;&lt;br&gt;
This involves changing appearance of text in your data. We can use excel functions such as UPPER, LOWER and PROPER.&lt;br&gt;
&lt;strong&gt;Upper()&lt;/strong&gt;&lt;br&gt;
This changes the text to uppercase. For instance, when one wants to change the content of one particular column to uppercase, we first of all need to create a helper column. This is done by inserting a column to the right of the column we want to modify. Then on the second cell of the helper column after the header cell we need to write &lt;strong&gt;=UPPER(cell reference)&lt;/strong&gt; then press enter. Cell reference refers to the second cell in the column we want to modify(The cell after the header). For example, one can navigate to cell B2 and write &lt;strong&gt;=UPPER(A2)&lt;/strong&gt; where A2 is the cell directly below header of column A while B2 is the cell below the header of helper column. &lt;br&gt;
This will display the uppercase equivalent of column A items on column B. The final step is to copy the items of column B to column A. Select column B, click copy then put cursor on column A and choose paste values option. After this you can now delete column B. Note that there is no shortcut to go about this, if you try deleting column A in order to remain with data in column B this will not work since column B is a reference to column A. &lt;br&gt;
&lt;strong&gt;Lower()&lt;/strong&gt;&lt;br&gt;
Converts text to lowercase. To use this function we follow the same steps as we did in the UPPER function but in this case we use the formula &lt;strong&gt;=LOWER(cell reference)&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Proper()&lt;/strong&gt;&lt;br&gt;
This modifies our data by converting every first letter of text to uppercase then the remaining letters are converted to lowercase. For example, when we have the word &lt;strong&gt;emma&lt;/strong&gt; and we apply PROPER function on it this word becomes &lt;strong&gt;Emma&lt;/strong&gt;. To use it we follow the same steps we used as in the previous functions while we only change the formula to &lt;strong&gt;=PROPER(cell reference)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Date formatting&lt;/strong&gt;&lt;br&gt;
Sometimes we receive data that has date values but the way the dates are written does not appeal well with us. To change the way your dates appear, select the first cell in the column you want to modify. While in your excel home screen, navigate to the &lt;strong&gt;number format&lt;/strong&gt; dialog box then click the arrow on the lower right corner. This will give you a dialog box where you can choose the type of date format you want. Select the format you want then click ok. The new date format will appear on the cell you selected. To apply this to all the other cells in the column, drag the mouse downwards or double click on the flash fill icon on the right of highlighted cell. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Removing whitespace and unwanted space&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Find and replace&lt;/strong&gt;&lt;br&gt;
Select all the data in your worksheet. Navigate to excel home then click &lt;strong&gt;find and select&lt;/strong&gt; tab on the ribbon. This will give you a dialog box. In &lt;strong&gt;find what&lt;/strong&gt; box put double space. You can use a tab key or backspace. In &lt;strong&gt;replace with&lt;/strong&gt; box put a single space then click &lt;strong&gt;replace&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Trim()&lt;/strong&gt;&lt;br&gt;
When we want to only get rid of a single space, find and replace method will not be effective. This is where the &lt;strong&gt;TRIM&lt;/strong&gt; function comes in. To use this function, we need to follow the same steps we used when using UPPER function the only difference being the formula used. Here the formula will be &lt;strong&gt;=TRIM(cell reference).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Kindly note that the above examples apply when we want to modify data in columns. If you want to modify data in rows, the same steps can be followed only that in this case a helper row is used and also to drag a formula to apply to other cells in the same row, we drag horizontally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Data formatting is a skill that every data analyst should have. Mastering this skill will help make your life as a data analyst easier and will enable you gain meaningful insights from data.&lt;/p&gt;

</description>
      <category>dataanalytics</category>
      <category>data</category>
      <category>excel</category>
      <category>datascience</category>
    </item>
    <item>
      <title>My first open source contribution: Outreachy</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Wed, 15 Nov 2023 10:59:55 +0000</pubDate>
      <link>https://forem.com/doreen970/my-first-open-source-contribution-outreachy-2h61</link>
      <guid>https://forem.com/doreen970/my-first-open-source-contribution-outreachy-2h61</guid>
      <description>&lt;p&gt;Since I embarked on my software engineering journey, I have always wanted to be contribute to open source projects. The issue is that I did not know how and where to start. Fortunately I recently applied for an outreachy internship. I got past the first stage of application and joined the contribution stage. Over the course of last month, we were tasked with selecting the projects we wanted to contribute to and record contributions. I can say choosing the right project was not that easy for me since I found that each project had skills I have always wanted to learn or practice. I used the first week of the contribution phase just reading through the projects for each company and familiarizing myself with the required tech stack. &lt;/p&gt;

&lt;p&gt;I finally settled on a project by Wikimedia foundation. This project not only attracted me but I realized that the objectives for this community really aligned with my passions. Their main goal was to migrate their software from java to python using django framework. This means that the code had to be rewritten from scratch. Starting something from scratch is something I have always loved since this means I will fully participate in the development and thus offering immense learning opportunities for me. &lt;/p&gt;

&lt;p&gt;What stood out the most during this stage was the support I got from Wikimedia community. From the onset, we were given tasks to solve so as to get familiar with the tech stack we were going to use. A part from the task, we were provided with a tutorial that served as an introduction to Django especially for beginners who had little or no knowledge of Django. Solving the tasks and going through the tutorials helped me get a clear picture of what I  was going to do. The availability of mentors and other community members to respond to our questions and give us directions whenever we got stuck was also quite amazing. I got to interact with people from various backgrounds and even made friends within the short period. Through this I was able to improve my Django skills and even got the opportunity to help my fellow interns when they got stuck. This is exactly what we call collaboration. Something I have always wanted to be part of. &lt;/p&gt;

&lt;p&gt;To anyone who has never contributed to open source, I advise you to start now. There are many learning opportunities and the good thing is that you will not do it alone. I am still learning more about open source and I hope to contribute to more communities in future. &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>outreachyinternship</category>
      <category>wikimedia</category>
    </item>
    <item>
      <title>Data cleaning with Excel</title>
      <dc:creator>DoreenNangira</dc:creator>
      <pubDate>Mon, 13 Nov 2023 19:40:13 +0000</pubDate>
      <link>https://forem.com/doreen970/data-cleaning-with-excel-37ko</link>
      <guid>https://forem.com/doreen970/data-cleaning-with-excel-37ko</guid>
      <description>&lt;p&gt;Data cleaning is one of the most essential steps in data analysis. Whenever we deal with data we are bound to encounter data inconsistencies such as duplicate values, missing values or spelling mistakes. To ensure that you get the desired results out of your data, it is advisable to equip yourself with various skills used for data cleaning. This article will take you through data cleaning methods in excel.&lt;/p&gt;

&lt;p&gt;The following are the most common data inconsistencies and ways of getting rid of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Spelling mistakes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Spelling mistakes in your data can hinder you from getting the correct results from your data. To get rid of this, select the column you want to modify, click the &lt;strong&gt;review&lt;/strong&gt; tab on excel window then click spelling. This will highlight the word that appears to be wrongly spelt and a suggestion of other words will be shown. Pick your desired suggested word and click change then okay. This will replace the wrongly spelt word with new spelling. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Empty rows&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To find empty rows, press CTRL+SHIFT+END tabs to select all data including those with blanks. Click &lt;strong&gt;Data&lt;/strong&gt; tab then click filter. After this unselect the &lt;strong&gt;select all&lt;/strong&gt; option then scroll down and select blank. This will show you a list of rows which are blank. Select the first blank row then press CTRL+SHIFT+END. This will highlight all blank rows. Right click then click delete rows. This will delete all empty rows. Click the clear button on the ribbon, this will take you back to your data that is clean without empty rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Duplicate data&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sometimes data analysts face the challenge of having unnecessary repetition of a particular data entered. For example, one can enter the details of one particular employee in the company database more than once. This leads to incorrect results when trying to get conclusions from such data. There are two ways of removing duplicate data in excel. One involves previewing the data before removing the duplicates while the other involves getting rid of the duplicate at once before preview of it. The safest method is always to preview the data before getting rid of duplicates. The following methods are used:&lt;br&gt;
&lt;strong&gt;a. Secure method&lt;/strong&gt;&lt;br&gt;
Select the column you want to modify, click conditional formatting tab on the home screen, click highlight cells rules then click duplicate values option. After this click &lt;strong&gt;ok&lt;/strong&gt; and duplicate values will be shown. Select the rows you want to delete, right click then press delete. This will get rid of duplicate values.&lt;br&gt;
&lt;strong&gt;b. Less secure method&lt;/strong&gt;&lt;br&gt;
Select the whole data in your excel sheet. Click the &lt;strong&gt;Data&lt;/strong&gt; tab then click remove duplicates. Unselect all columns then select the column where you want to remove the duplicates. This gets rid of duplicates in the selected column. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Find and replace&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Find and replace feature is another essential tool in excel that comes in handy. Take an instance where a client calls in and says that his or her last name was wrongly spelt. How do you correct this in the shortest time possible? This is where the find and replace feature comes in. Instead of going through all the rows one by one to spot the word to be corrected, we can use find and replace feature to get the word in a second. &lt;br&gt;
Click the &lt;strong&gt;find &amp;amp; select&lt;/strong&gt; tab on the excel ribbon in home screen. Type in the word you want to find, click find next then click find all to get all instances of the word. Click the replace button, write the word you want then click replace all. This will replace all instances with that new word. &lt;/p&gt;

</description>
      <category>excel</category>
      <category>dataanalytics</category>
      <category>data</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
