<?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: TimothyAgevi</title>
    <description>The latest articles on DEV Community by TimothyAgevi (@timothyagevi).</description>
    <link>https://dev.to/timothyagevi</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%2F608521%2F4d39f05d-05d8-4570-b5b8-a2c5fa87dfe8.png</url>
      <title>DEV Community: TimothyAgevi</title>
      <link>https://dev.to/timothyagevi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/timothyagevi"/>
    <language>en</language>
    <item>
      <title>Intro To Python Apis and Docker</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Sun, 12 Sep 2021 21:03:54 +0000</pubDate>
      <link>https://dev.to/timothyagevi/intro-to-python-apis-and-docker-2918</link>
      <guid>https://dev.to/timothyagevi/intro-to-python-apis-and-docker-2918</guid>
      <description>&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt; is an open source containerisation platform. Basically, it’s a toolkit that makes it easier, safer and faster for developers to build, deploy and manage containers. Although it began as an open source project, Docker today also refers to Docker, Inc., the company that produces the commercial Docker product. Currently, it is the most popular tool for creating containers, whether developers use Windows, Linux or MacOS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some of the tools and terminology commonly used with Docker include the following:&lt;/strong&gt;&lt;br&gt;
Docker Engine: The runtime environment that allows developers to build and run containers.&lt;br&gt;
&lt;strong&gt;Dockerfile&lt;/strong&gt;: A simple text file that defines everything needed to build a Docker container image, such as OS network specifications and file locations. It’s essentially a list of commands that Docker Engine will run in order to assemble the image.&lt;br&gt;
&lt;strong&gt;Docker Compose&lt;/strong&gt;: A tool for defining and running multi-container applications. It creates a YAML file to specify which services are included in the application and can deploy and run containers with a single command via the Docker CLI.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;container&lt;/strong&gt; is an executable unit of software that packages application code with its dependencies, enabling it to run on any IT infrastructure. A container stands alone; it is abstracted away from the host operating system (OS) — usually Linux — which makes it portable across IT environments.&lt;br&gt;
One way to understand the concept of a container is to compare it to a virtual machine (VM). Both are based on virtualization technologies, but while a container virtualizes an OS, a VM leverages a hypervisor — a lightweight software layer between the VM and a computer’s hardware — to virtualize physical hardware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices&lt;/strong&gt; is a service-oriented architecture pattern wherein applications are built as a collection of various smallest independent service units. It is a software engineering approach that focuses on decomposing an application into single-function modules with well-defined interfaces. These modules can be independently deployed and operated by small teams that own the entire lifecycle of the service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Micro-service Architecture&lt;/strong&gt; is an architectural development style that allows building applications as a collection of small autonomous services developed for a business domain. It is a variant of structural style architecture that helps arrange applications as a loosely coupled service collection. The Micro-service Architecture contains fine-grained services and lightweight protocols.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to microservices using Python, flask, and docker.&lt;/strong&gt;&lt;br&gt;
Flask is super useful for building Microservices. You can utilize any number of it’s built-in extensions to design and deploy Microservices at high velocity. It will help you to get your offerings to market fast.&lt;/p&gt;

&lt;p&gt;Note that you can create each service with a different language, one service you can use Javascript Nodejs and expressjs while the other uses flask or FastAPI.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;monolithic application&lt;/strong&gt;,has a single code base with several multiple application packages and modules.&lt;/p&gt;

&lt;p&gt;Each module has separate business logic. This type of application has a single build for the entire application and delivered as a single deploy-able.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics of Microservice Architecture&lt;/strong&gt;&lt;br&gt;
1.Microservices communicate with each other by using well-defined APIs and this implementation is hidden from other microservices. &lt;br&gt;
-Microservices don’t need to share the same technology stack, libraries, or frameworks.&lt;/p&gt;

&lt;p&gt;2.Microservices can be deployed independently and more frequently.&lt;br&gt;
3.Microservices architecture consists of a collection of small services. Each service is self-contained. It implements a single business function. It should do one thing only and do it well.&lt;/p&gt;

&lt;p&gt;Credits to &lt;a class="mentioned-user" href="https://dev.to/grayhat"&gt;@grayhat&lt;/a&gt; for explaining this during a bootcamp. &lt;br&gt;
&lt;strong&gt;Using Docker&lt;/strong&gt;&lt;br&gt;
   &lt;strong&gt;note : ** a ** docker image&lt;/strong&gt;  is a read-only, inert template that comes with instructions for deploying containers. In Docker, everything basically revolves around images.&lt;br&gt;
An image consists of a collection of files (or layers) that pack together all the necessities—such as dependencies, source code, and libraries—needed to set up a completely functional container environment.&lt;/p&gt;

&lt;p&gt;** Code Samples**&lt;br&gt;
FROM python 3.8&lt;br&gt;
 COPY ./src&lt;/p&gt;

&lt;p&gt;WORKDIR ./requirements.txt/src/requirements.txt&lt;/p&gt;

&lt;p&gt;EXPOSE 5000:5000&lt;/p&gt;

&lt;p&gt;RUN pip install -r requirements.txt&lt;/p&gt;

&lt;p&gt;CMD [ "python", "app.py"]&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python Syntax</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Tue, 03 Aug 2021 16:28:15 +0000</pubDate>
      <link>https://dev.to/timothyagevi/python-syntax-228k</link>
      <guid>https://dev.to/timothyagevi/python-syntax-228k</guid>
      <description>&lt;p&gt;&lt;strong&gt;1 .When writing functions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just as other programming languages python uses parenthesis (),when declaring functions.
However instead of using curly brackets{ }to to embed its code,it uses &lt;strong&gt;indentation&lt;/strong&gt;
below is an example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;def greeting():&lt;br&gt;
      return hello World!&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Commenting Out code&lt;/strong&gt;&lt;br&gt;
-use # for single line comments&lt;br&gt;
-Use triple quotes for multiple line comments &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python Introduction</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Sat, 24 Jul 2021 16:45:18 +0000</pubDate>
      <link>https://dev.to/timothyagevi/python-introduction-31k8</link>
      <guid>https://dev.to/timothyagevi/python-introduction-31k8</guid>
      <description>&lt;h2&gt;
  
  
  Working with virtual environment
&lt;/h2&gt;

&lt;p&gt;When working on a python project its always advisable to create for it a virtual environment.&lt;/p&gt;

&lt;p&gt;Steps for doing that include :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to the project's directory then&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;strong&gt;python -venv dev&lt;/strong&gt;&lt;br&gt;
-note &lt;strong&gt;dev&lt;/strong&gt; is just the name of the virtual environment ,your free to name it however you prefer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;3.Activate the virtual environment using this command :&lt;br&gt;
&lt;strong&gt;source dev/bin/activate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-&lt;strong&gt;Note&lt;/strong&gt; if you are using windows run &lt;strong&gt;dev\Scripts\activate&lt;/strong&gt; &lt;br&gt;
instead.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;create a &lt;strong&gt;requirements.txt&lt;/strong&gt; file using the command :
** pip freeze &amp;gt; requirements.txt**&lt;/li&gt;
&lt;li&gt;&lt;p&gt;this file will contain all packages installed for thespecified project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install any packages required using &lt;strong&gt;pip install &lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat command in step 4, to update the requirements.txt.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Use of Github</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Mon, 31 May 2021 11:05:43 +0000</pubDate>
      <link>https://dev.to/timothyagevi/use-of-github-1oh7</link>
      <guid>https://dev.to/timothyagevi/use-of-github-1oh7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Important Terms&lt;/strong&gt;&lt;br&gt;
1 Local repository- directory within ones machine.&lt;br&gt;
2.Remote repository- directory on Github servers.&lt;br&gt;
-they are two types of remotes : &lt;br&gt;
   a)Origin - Within ones personal github account.&lt;br&gt;
   b)Upstream- repository which someone forked from.&lt;br&gt;
&lt;strong&gt;working on a Repository&lt;/strong&gt;&lt;br&gt;
step 1: On github navigate to repositories,then click the green button on the right "New" &lt;/p&gt;

&lt;p&gt;step 2: Go to your terminal/gitbash/cmd  change to the directory you would like to clone the repository to e,g cd Desktop/&lt;/p&gt;

&lt;p&gt;step 3: type " &lt;strong&gt;git clone&lt;/strong&gt; 'URL of cloned repository'&lt;br&gt;
step 4:After cloning , &lt;strong&gt;cd&lt;/strong&gt; 'directory created for the new repository'&lt;br&gt;
step 5:After making changes,cloned repository,&lt;strong&gt;git add .&lt;/strong&gt;&lt;br&gt;
step 6: &lt;strong&gt;git commit -m "initial commit"&lt;/strong&gt;&lt;br&gt;
step 7: &lt;strong&gt;git push origin 'branch name'&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Javascript Functions</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Mon, 17 May 2021 13:29:50 +0000</pubDate>
      <link>https://dev.to/timothyagevi/javascript-functions-5881</link>
      <guid>https://dev.to/timothyagevi/javascript-functions-5881</guid>
      <description>&lt;h1&gt;
  
  
  important terms
&lt;/h1&gt;

&lt;p&gt;1.function-Subprogram called to perform a particular task.&lt;br&gt;
2.Variable- identifier used to represent a single data item.&lt;br&gt;
3.Parameter-Variable used to store values ,within a function.&lt;br&gt;
4.Arguments-Actual values stored within a function.&lt;/p&gt;
&lt;h1&gt;
  
  
  3 Ways of Declaring Function
&lt;/h1&gt;

&lt;p&gt;a)1.traditional way&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function calAge(cyear,yob){ &lt;br&gt;
      return cyear-yob;&lt;br&gt;
}&lt;br&gt;
console.log(calAge(2021,2000))&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;b)embedding it in a variable&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const age=function calAge(cyear,yob){&lt;br&gt;
                          return cyear-yob;  &lt;br&gt;
                     }&lt;br&gt;
                     console.log(age(2021,2000)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;c)Using Arrow&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const age  = (cyear, yob)  =&amp;gt; {&lt;br&gt;
            return cyear - yob; &lt;br&gt;
            }&lt;br&gt;
                console.log(age(2021,2000)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  note
&lt;/h1&gt;

&lt;p&gt;for all the above the output is 21,&lt;/p&gt;

&lt;p&gt;parameters are those inside the function parenthesis while auguments are the 2021,2000 values within the console.log().&lt;/p&gt;

&lt;h1&gt;
  
  
  try it yourself,happy coding Nerds
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Grouping in CSS</title>
      <dc:creator>TimothyAgevi</dc:creator>
      <pubDate>Sat, 08 May 2021 18:56:48 +0000</pubDate>
      <link>https://dev.to/timothyagevi/grouping-in-css-2den</link>
      <guid>https://dev.to/timothyagevi/grouping-in-css-2den</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.thisOtherClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.yetAnotherClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;In Grouping we separate selectors with commas (,) Alternative of the above 10 lines of code is as shown below:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.thisOtherClass&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.yetAnotherClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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