<?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: Adam Alex</title>
    <description>The latest articles on DEV Community by Adam Alex (@bralexsvg).</description>
    <link>https://dev.to/bralexsvg</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%2F507089%2Fe02de6e0-7492-4888-ba21-5e5d9e6424dd.png</url>
      <title>DEV Community: Adam Alex</title>
      <link>https://dev.to/bralexsvg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bralexsvg"/>
    <language>en</language>
    <item>
      <title>TypeScript Tutorial(Part2)</title>
      <dc:creator>Adam Alex</dc:creator>
      <pubDate>Tue, 08 Nov 2022 17:05:52 +0000</pubDate>
      <link>https://dev.to/bralexsvg/typescript-tutorialpart2-49na</link>
      <guid>https://dev.to/bralexsvg/typescript-tutorialpart2-49na</guid>
      <description>&lt;p&gt;This article is a continued version of my previous article on getting started with typescript. If you are a newbie or still getting started with typescript, I will advise you to check my previous article because it introduces you to the typescript programming language. After going through it, you can now visit this article and continue.&lt;br&gt;
Click on the link to check the previous article out&lt;br&gt;
[&lt;a href="https://dev.to/bralexsvg/getting-started-with-typescript-5a9k"&gt;https://dev.to/bralexsvg/getting-started-with-typescript-5a9k&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;In the previous article, I ended by going through setting up typescript on one's computer. In this article, we will complete the setup process and write some code.&lt;/p&gt;
&lt;h2&gt;
  
  
  Now let's begin action
&lt;/h2&gt;

&lt;p&gt;Navigate into any directorate on your computer and create a new folder. In the nearly created folder, create a new file and add .ts. The extension name .ts means the file is a typescript file.&lt;br&gt;&lt;br&gt;
I am going to name my file as app.ts. You can name it anyhow you want.&lt;br&gt;
This how mine looks like👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt4eks9vz0187jdmhw0f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt4eks9vz0187jdmhw0f.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
After installing the typescript compiler globally on your computer, very to see if the installation is succesfully by executing the below command.&lt;br&gt;
&lt;code&gt;tsc -v&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The next step is to compile typescript. So now we are going to compile our newly created file called app.ts&lt;br&gt;
But first, lets write some javaScript code inside the app.ts file&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8hr120qbkcuvdmct9ix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8hr120qbkcuvdmct9ix.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Now open your command prompt and navigate into the directorate you have the app.ts file. Execute the below command&lt;br&gt;
&lt;code&gt;tsc app&lt;/code&gt;. After compiling, check back on your text editor and you will see another file by the name app.js added. Suprise to see that? Remember typescript compiles down to javascript so browser engines can understand the code. Click on the app.js file and you will realize the codes you have in the app.ts file are the same as in the app.js file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbodzi5zszv00j7kqcbf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbodzi5zszv00j7kqcbf.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want TSC to compile your code automatically, whenever you make a change, add the "watch" flag:&lt;br&gt;
&lt;code&gt;tsc index.ts -w&lt;/code&gt;&lt;br&gt;
An interesting thing about TypeScript is that it reports errors in your text editor whilst you are coding, but it will always compile your code – whether there are errors or not.&lt;br&gt;
For example, the following causes TypeScript to immediately report an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var sport = 'football';
var id = 5;

id = '5'; // Error: Type 'string' is not assignable to 
type 'number'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But if we try to compile this code with &lt;code&gt;tsc app,&lt;/code&gt; the code will still compile, despite the error.&lt;br&gt;
This is an important property of TypeScript: it assumes that the developer knows more. Even though there's a TypeScript error, it doesn't get in your way of compiling the code. It tells you there's an error, but it's up to you whether you do anything about it.&lt;/p&gt;

&lt;p&gt;Congratulations for getting here. 🎉&lt;br&gt;
Now lets delve into working with typescript properly.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic types in typescript
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Type Annotation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;String&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Number&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Boolean&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Array&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Any type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type inference&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Union type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Void type&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and many more...&lt;/p&gt;

&lt;p&gt;Now we going to learn more about each of the types mentioned above. But not everything in this particular article.&lt;/p&gt;
&lt;h2&gt;
  
  
  Type Annotation
&lt;/h2&gt;

&lt;p&gt;TypeScript uses type annotations to explicitly specify types for identifiers such variables, functions, objects, etc.&lt;br&gt;
TypeScript uses the syntax &lt;code&gt;: type&lt;/code&gt; after an identifier as the type annotation, where type can be any valid type.&lt;br&gt;
Once an identifier is annotated with a type, it can be used as that type only. If the identifier is used as a different type, the TypeScript compiler will issue an error.&lt;br&gt;
Lets take a look at how we can use type annotation in variables and constants.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let variableName: type; //declares the variable
let variableName: type = value; // declares and initialise the variable with a value
const constantName: type = value;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this syntax, the type annotation comes after the variable or constant name and is preceded by a colon (:).&lt;br&gt;
The below code uses number annotation for a variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let age: number;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, you can only assign a number to the age variable:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If you assign a string or any type to the age variable, you’ll get an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let age: number;
age = 'Thousand'; // compile error 
&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;Type '"Thousand"' is not assignable to type 'number'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following shows other examples of primitive type annotations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name: string = 'Alex';
let age: number = 25;
let active: boolean = true;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the name variable gets the string type, the age variable gets the number type, and the active variable gets the boolean type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Arrays
&lt;/h2&gt;

&lt;p&gt;To annotate an array type you use use a specific type followed by a square bracket : type[] :&lt;/p&gt;

&lt;p&gt;For example, the following declares an array of strings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let names: string[] = ['Alex', 'Adam', 'Christy', 'Mercy', 'Sumaya'];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Objects
&lt;/h2&gt;

&lt;p&gt;To specify a type for an object, you use the object type annotation. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let person: {
   name: string;
   age: number
};

person = {
   name: 'Alex',
   age: 23
}; // valid
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the person object only accepts an object that has two properties: name with the string type and age with the number type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Function arguments &amp;amp; return types
&lt;/h2&gt;

&lt;p&gt;The following shows a function annotation with parameter type annotation and return type annotation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let greeting : (name: string) =&amp;gt; string;
&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;In this example, you can assign any function that accepts a string and returns a string to the greeting variable:
&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;greeting = function (name: string) {
    return `Hi ${name}`;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following causes an error because the function that is assigned to the greeting variable doesn’t match with its function type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;greeting = function () {
    console.log('Hello');
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;ERROR:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type '() =&amp;gt; void' is not assignable to type '(name: string) =&amp;gt; string'. Type 'void' is not assignable to type 'string'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There will be a part three of this article which will feature the rest of the types.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started With TypeScript</title>
      <dc:creator>Adam Alex</dc:creator>
      <pubDate>Fri, 28 Oct 2022 15:21:53 +0000</pubDate>
      <link>https://dev.to/bralexsvg/getting-started-with-typescript-5a9k</link>
      <guid>https://dev.to/bralexsvg/getting-started-with-typescript-5a9k</guid>
      <description>&lt;p&gt;Hello there, I believe you landed on this article because you are probably a javascript fan and looking forward to upskilling yourself by learning the popular programming language called Typescript. Whatever your reason is, I promise to deliver an interesting and informative explanation of typescript and how you can adopt it in your next or existing project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Typescript
&lt;/h2&gt;

&lt;p&gt;Typescript is a programming language that builds on the javaScript programming language. But what makes typescript a language to be trusted for use in project(s). Typescript is a strongly typed superset of javaScript which compiles to plain javaScript. Typescript can be used with any browser or operating system since at the end of the day, the code that gets generated and sent to the browser is javaScript. It contains all the elements of the javaScript programming language and additional features. It is a language designed for large-scale javascript applications developement.&lt;br&gt;
TypeScript cannot run directly on the browser like javaScript. Many latest browsers do not have typescript support. It needs a compiler to compile the file and generate it in JavaScript file, which can run directly on the browser. The TypeScript source file is in ".ts" extension. We can use any valid ".js" file by renaming it to ".ts" file. TypeScript uses TSC (TypeScript Compiler) compiler, which convert Typescript code (.ts file) to JavaScript (.js file).&lt;/p&gt;

&lt;p&gt;As I mentioned earlier, typescript is a stongly typed langauage. Whcih means it approves the high usage of types in it. Now lets get to learn the tradeoff between Static and Dynamic typing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Static vs. Dynamic Typing
&lt;/h2&gt;

&lt;p&gt;The difference between static and dynamic typing has to do with when the types of the written program are checked. In statically-typed languages (TypeScript), types are checked at compile-time. In dynamically-typed languages (JavaScript), types are checked at run-time. Now lets get to the point you have been waiting for.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get started.
&lt;/h2&gt;

&lt;p&gt;The first step needed in order to use Typescript is to install it globally on your computer by using NPM (Node Package Manager). In case you are new to NPM, to use it you need to have Node.js installed on your computer (for help with Node.js installation click here). To check what version of Node.js and NPM you have just enter the following commands on your terminal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1izHCET7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbjz74mos2cf0ajht9tv.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1izHCET7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbjz74mos2cf0ajht9tv.PNG" alt="Image description" width="880" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After ensuring that you Node.js installed in your computer, enter the below command on your terminal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nbSKz0rg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fti9ipq747ekb3980yyi.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nbSKz0rg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fti9ipq747ekb3980yyi.PNG" alt="Image description" width="417" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above comman executed will install TypeScript globally in your computer allowing you to use it within any project that you have on your computer. &lt;/p&gt;

&lt;p&gt;Congratulations to you for getting this far in this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o6fJ1BM7R2EBRDnxK/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o6fJ1BM7R2EBRDnxK/giphy.gif" alt="Image description" width="498" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the ways I have found that has helped me learn stuffs easier and faster in the software developement space is, knowing the reason why I should learn a particular programming langauage, framework or library. After i am satisfied with that, it boost my morale to learn it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use TypeScript?
&lt;/h2&gt;

&lt;p&gt;Typescript is mostly used because of the following reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;TypeScript supports Static typing, Strongly type, Modules, Optional Parameters, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript supports object-oriented programming features such as classes, interfaces, inheritance, generics, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript is fast, simple, and most importantly, easy to learn.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript provides the error-checking feature at compilation time. It will compile the code, and if any error found, then it highlighted the mistakes before the script is run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript supports all JavaScript libraries because it is the superset of JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript make app development quick and easy as possible, and the tooling support of TypeScript gives us autocompletion, type checking, and source documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers can save a lot of time with TypeScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TypeScript make app development quick and easy as possible, and the tooling support of TypeScript gives us autocompletion, type checking, and source documentation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now I hope the above points have given you the reason why Typescript is one of the best programming languages out there to learn.&lt;br&gt;
I shall release part two of this article whcih will feature the technical aspects of typescript. Basically, we will learn how to write codes using the typescript programming language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/DhstvI3zZ598Nb1rFf/giphy-downsized-large.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/DhstvI3zZ598Nb1rFf/giphy-downsized-large.gif" alt="Image description" width="480" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o7qE2VAxuXWeyvJIY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o7qE2VAxuXWeyvJIY/giphy.gif" alt="Image description" width="314" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>End Of Year With Python Programming Language🍕🥂 </title>
      <dc:creator>Adam Alex</dc:creator>
      <pubDate>Fri, 31 Dec 2021 14:15:07 +0000</pubDate>
      <link>https://dev.to/bralexsvg/end-of-year-with-python-programming-language-268g</link>
      <guid>https://dev.to/bralexsvg/end-of-year-with-python-programming-language-268g</guid>
      <description>&lt;p&gt;This end-of-year python programming language article will teach you the python language from scratch. The tutorial will take you through the understanding of the Python programming language, help you deeply learn the concepts, and show you how to apply practical programming techniques to your specific challenges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you'll learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A little theory on the python programming language&lt;/li&gt;
&lt;li&gt;How to set up Python on your machine&lt;/li&gt;
&lt;li&gt;What variables are in the python language&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This particular article does not cover all the features of python. The article is intended to get you started with python programming. I will be writing more articles on other topics in the year  2022 hopefully. You can kindly grab a cup of coffee and journey with me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS PYTHON?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High-level&lt;/strong&gt;&lt;br&gt;
Python is a high-level programming language that makes it easy to learn. Python doesn’t require you to understand the details of the computer to develop programs efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;General-purpose&lt;/strong&gt;&lt;br&gt;
Python is a general-purpose language. It means that you can use Python in various domains including:&lt;br&gt;
Web applications&lt;br&gt;
Big data applications&lt;br&gt;
Testing&lt;br&gt;
Automation&lt;br&gt;
Data science, machine learning, and AI&lt;br&gt;
Desktop software&lt;br&gt;
Mobile apps&lt;br&gt;
The targeted language like SQL can be used for querying data from relational databases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interpreted&lt;/strong&gt;&lt;br&gt;
Python is an interpreted language. To develop a Python program, you write Python code into a file called source code.&lt;br&gt;
To execute the source code, you need to convert it to the machine language that the computer can understand. And the Python interpreter turns the source code, line by line, once at a time, into the machine code when the Python program executes.&lt;br&gt;
Compiled languages like Java and C# use a compiler that compiles the whole source code before the program executes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next up , &lt;br&gt;
&lt;strong&gt;Setting up python on your machine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this section, you will learn how to install python on your computer. &lt;br&gt;
first of all, &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;download the latest version of python&lt;/a&gt; from the official page. Python is available for windows, mac, and Linux operating systems. At this time of writing the article, the latest version of python is 3.10.1. Yours might differ depending on the time you are reading the article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9rm5t282rnd8nokw7lnu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9rm5t282rnd8nokw7lnu.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Second, double-click the installer file to launch the setup wizard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzdan9vudde1nknq4cze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzdan9vudde1nknq4cze.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;In progress&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gbntnkcvtnbgd0axhmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gbntnkcvtnbgd0axhmn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Set up is done&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp33sglmi1bk64i6sspas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp33sglmi1bk64i6sspas.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Verify the installation&lt;br&gt;
To verify the installation, you open the Run window and type cmd and press Enter:&lt;br&gt;
Now type python in cmd and you should see the output like mine&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl49d26rg0ovofnd0vzqs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl49d26rg0ovofnd0vzqs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you see the output like the above screenshot, you’ve successfully installed Python on your computer. You can sip more coffee at this stage😍&lt;/p&gt;

&lt;p&gt;You can also set up python on your favorite text editor such as vs code, sublime text and the likes. You can read this article to learn how to &lt;a href="https://www.pythontutorial.net/getting-started/setup-visual-studio-code-for-python/" rel="noopener noreferrer"&gt;set up python on vs code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let is print something like hello world to the screen in python.&lt;br&gt;
In cmd, type the following command and see fireworks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("hello world")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vpzv1pwyth148wowc8q.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vpzv1pwyth148wowc8q.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The print() is a built-in function that displays a message on the screen. In this example, it’ll show the message 'Hello, Word!'. hey wait, I just mentioned built-in function which might sound new to you right? Do not worry, functions are beyond the scope of this article and I will explain what functions are in python in future articles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WHAT IS A VARIABLE IN PYTHON?&lt;/strong&gt;&lt;br&gt;
A variable is a named location used to store data in the memory. It is helpful to think of variables as a container that holds data that can be changed later in the program.&lt;br&gt;
When you develop a program, you need to manage values, a lot of them. To store values, you use variables.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name = "Alex"
print(name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Here, we have created a variable called &lt;strong&gt;name&lt;/strong&gt; and we have assigned a *&lt;em&gt;value Alex *&lt;/em&gt; to the variable.&lt;br&gt;
You can think of variables as a bag to store books in it and that book can be replaced at any time.&lt;br&gt;
Now let is see how we can mutate or change the values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name = "Alex"
print(name)
name = "Dawood iddris"
print(name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Alex
Dawood iddris
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above program, we have assigned Alex to the name variable initially. Then, the value is changed to Dawood iddris. Awesome right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable Names&lt;/strong&gt;&lt;br&gt;
A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume).&lt;/p&gt;

&lt;p&gt;Rules for Python variables:&lt;/p&gt;

&lt;p&gt;A variable name must start with a letter or the underscore character&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A variable name cannot start with a number&lt;/li&gt;
&lt;li&gt;A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )&lt;/li&gt;
&lt;li&gt;Variable names are case-sensitive (age, Age and AGE are three different variables)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In conclusion, we learned a little theory about python language, setting up python on the computer, printing hello world text to the screen and we concluded with variables.&lt;/p&gt;

&lt;p&gt;Thank you for reading and do not forget to like and comment below and let me know what you think about the article.&lt;br&gt;
Happy new year to you all. Meet you in 2022 for more articles from me. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is props and how to use props in react js.</title>
      <dc:creator>Adam Alex</dc:creator>
      <pubDate>Mon, 13 Dec 2021 15:49:33 +0000</pubDate>
      <link>https://dev.to/bralexsvg/what-is-props-and-how-to-use-props-in-react-js-3kd6</link>
      <guid>https://dev.to/bralexsvg/what-is-props-and-how-to-use-props-in-react-js-3kd6</guid>
      <description>&lt;p&gt;I believe you landed on this article because you have probably started learning React Js or you want to hone your skills in it. Whatever the case, let us get started.  React js has a different approach compared to the other JavaScript frameworks when transferring data from one component to the other.  Props come in handy to provide a gateway to send data from one component to another.  To get a better understanding of how props work in react, you need a good grasp of how components work in general first. I suggest you watch my tutorial on getting with react js on my YouTube channel.  Link below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HDK0C9hS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sauoulxm1kml28zrqsut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HDK0C9hS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sauoulxm1kml28zrqsut.png" alt="Image description" width="880" height="440"&gt;&lt;/a&gt;&lt;br&gt;
(&lt;a href="https://www.youtube.com/watch?v=8sZGbdE7IZc&amp;amp;t=370s"&gt;https://www.youtube.com/watch?v=8sZGbdE7IZc&amp;amp;t=370s&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  What is/are props.
&lt;/h2&gt;

&lt;p&gt;Props stand for properties. They are arguments passed to react components via HTML attributes.&lt;br&gt;
React Props are like function arguments in JavaScript and attributes in HTML.&lt;br&gt;
Let's use a link tag in HTML for instance&lt;br&gt;
&lt;code&gt;&amp;lt;a href = "/home" /&amp;gt;&lt;/code&gt;&lt;br&gt;
href is the attribute, the value is the data wrapped in by the quotation marks. &lt;br&gt;
So basically, a prop is a special keyword in React that is being used to send data from one component to another.&lt;br&gt;
One important thing to note is, data passed via props is uni-directional only. (from parent component to child component)&lt;br&gt;
Also, the data received by the child component from the parent component is read-only. The data should never be changed inside the child component. &lt;br&gt;
How to use props&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Firstly, define an attribute and its value(data)&lt;/li&gt;
&lt;li&gt;Then pass it to child component(s) by using Props&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;3 .Finally, render the Props Data&lt;br&gt;
Create two components and name them by ParentComp.js and ChildComp.js&lt;br&gt;
Below is my Parent Component and a nested child component&lt;/p&gt;

&lt;p&gt;`import ChildComp from "./ChildComp"&lt;/p&gt;

&lt;p&gt;function ParentComp( ) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;I am the parent component&amp;lt;/h1&amp;gt;
  &amp;lt;ChildComp /&amp;gt;
    &amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;export default ParentComp`&lt;/p&gt;

&lt;p&gt;Below is our child component&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function ChildComp() {&lt;br&gt;
    return (&lt;br&gt;
        &amp;lt;div&amp;gt;&lt;br&gt;
    &amp;lt;h2&amp;gt;I will receive data from my parent soon&amp;lt;/h2&amp;gt;&lt;br&gt;
        &amp;lt;/div&amp;gt;&lt;br&gt;
    )&lt;br&gt;
}&lt;/code&gt;   &lt;/p&gt;

&lt;p&gt;That was a very good affirmation from our child component though😂&lt;br&gt;
Now that is rendered. Lets open our browser and see fireworks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---8Y_6SOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cqbczvwfc2r1mlsug0r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---8Y_6SOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cqbczvwfc2r1mlsug0r.PNG" alt="Image description" width="561" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can render our child component multiple times by just duplicating the codes a couple of times.&lt;br&gt;
`function ParentComp( ) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;I am the parent component&amp;lt;/h1&amp;gt;
  &amp;lt;ChildComp /&amp;gt;
  &amp;lt;ChildComp /&amp;gt;
  &amp;lt;ChildComp /&amp;gt;

    &amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;This is what we will see displayed on the screen&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ux8TFqew--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ba9vh4cs3xtas6fsf3wa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ux8TFqew--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ba9vh4cs3xtas6fsf3wa.PNG" alt="Image description" width="812" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem now is what if we want to have dynamic outputs?&lt;br&gt;
This is because, each of the child components may have different data. This issue can be solved by our good friend &lt;strong&gt;props&lt;/strong&gt;. Lets see how🙌&lt;br&gt;
With regards to the html link example i stated earlier on which is&lt;br&gt;
&lt;code&gt;&amp;lt;a href="www.twitter.com"&amp;gt;Click and start tweeting&amp;lt;/a&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
In the case of React js. We can also do the same by wrapping the values with &lt;strong&gt;interpolation{}&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;ChildComp attribute = {value}  /&amp;gt;&lt;/code&gt;&lt;br&gt;
We can have many attributes and assign them to their respective values in the tag. &lt;br&gt;
So now let us see a typical example. &lt;br&gt;
In our parent component, lets us serve some dynamic data to our child component because remember our child component gave an affirmation that it will be receiving data from the parent component soon🤣😂 So lets make that happened.&lt;/p&gt;

&lt;p&gt;`function ParentComp( ) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;I am the parent component&amp;lt;/h1&amp;gt;
  &amp;lt;ChildComp passion =  {'I love Coding to the fullest'} /&amp;gt;

    &amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Lets see how we can receive such data in our child component&lt;br&gt;
&lt;/code&gt;&lt;code&gt;function ChildComp( props ) {&lt;br&gt;
    return (&lt;br&gt;
        &amp;lt;div&amp;gt;&lt;br&gt;
    &amp;lt;h2&amp;gt;{props.passion}&amp;lt;/h2&amp;gt;&lt;br&gt;
        &amp;lt;/div&amp;gt;&lt;br&gt;
    )&lt;br&gt;
}&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Make sure you state the &lt;strong&gt;props&lt;/strong&gt; keyward in the function parameter.&lt;br&gt;
.&lt;br&gt;
Alternatively, we could also send the data by wrapping our values in a quotation mark. &lt;br&gt;
`&lt;br&gt;
function ParentComp( ) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;I am the parent component&amp;lt;/h1&amp;gt;
  &amp;lt;ChildComp name = "Alex" proffession = "Software Enginner" /&amp;gt;
    &amp;lt;/div&amp;gt;
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
`&lt;br&gt;
Lets us now see how we can receive the data in our child component&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vr-Xmp2G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1v864y7n95uzkk692hie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vr-Xmp2G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1v864y7n95uzkk692hie.png" alt="Image description" width="880" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recap:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Props stand for properties and is a special keyword in React&lt;/li&gt;
&lt;li&gt;Props are being passed to components like function arguments&lt;/li&gt;
&lt;li&gt;Props can only be passed to components in one way (parent to child)&lt;/li&gt;
&lt;li&gt;Props data is immutable (read-only)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Getting a good grasp on props is a very crucial when using react js to build applications.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this content?😘😍&lt;br&gt;
Please kindly leave a comment below and let me know what's on your mind about the content. 🤷‍♂️ Thank you&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>WEB DEVELOPMENT TRAINING.</title>
      <dc:creator>Adam Alex</dc:creator>
      <pubDate>Wed, 04 Nov 2020 13:09:28 +0000</pubDate>
      <link>https://dev.to/bralexsvg/web-development-training-3i5m</link>
      <guid>https://dev.to/bralexsvg/web-development-training-3i5m</guid>
      <description>&lt;p&gt;Recently, I was approached by a couple of close friends of mine to help tech them programming and web development. I was like wow! Never tried that though but will give it a shot. So I created a new channel on YouTube and also created a WhatsApp group where I included a few others that wanted to also learn basic coding. I recorded a tutorial on how the web works as a start. Then took them through the roadmap to becoming a full stack web developer. I now started with the building blocks by recording a tutorial on html 5 which I made as a crash course. After recording the tutorials, I upload them on my YouTube channel and share the  link to them on the WhatsApp platform. I also give them more insights about the tutorials on the WhatsApp platform. reviews are taken then I give them a few days to practice on their own then we move forward. Apparently, we are on CSS3. I made the CSS as a playlist since I want to take my time and really explain most of the important concepts to them. I just uploaded another video on CSS position and display properties on my channel and they have started practicing. Super excited about that though.    &lt;/p&gt;

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