<?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: Victoria Mutai</title>
    <description>The latest articles on DEV Community by Victoria Mutai (@vicky__mutai).</description>
    <link>https://dev.to/vicky__mutai</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%2F329260%2F39cc9f34-8e15-48fc-a7dd-a2e9ad6589f8.jpg</url>
      <title>DEV Community: Victoria Mutai</title>
      <link>https://dev.to/vicky__mutai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vicky__mutai"/>
    <language>en</language>
    <item>
      <title>Developer training Developers!</title>
      <dc:creator>Victoria Mutai</dc:creator>
      <pubDate>Thu, 25 May 2023 19:01:56 +0000</pubDate>
      <link>https://dev.to/vicky__mutai/developer-training-developers-5d7d</link>
      <guid>https://dev.to/vicky__mutai/developer-training-developers-5d7d</guid>
      <description>&lt;p&gt;3 months went by so fast....&lt;br&gt;
I recently started out as an instructor at &lt;a href="https://techtenum.com/"&gt;techtenum&lt;/a&gt; for frontend web development.&lt;br&gt;
Weirdly, I never thought of myself as a teacher or trainer. Yes this was my first official gig as a trainer. &lt;/p&gt;

&lt;p&gt;My main role was to ensure students learn web development from 0 to 100. The students did not have any knowledge on web dev, they had never interacted with the IDE or even written their first line of code. &lt;/p&gt;

&lt;p&gt;Our first class was introduction to the web and it was interesting to see how they yearned to learn more and become experts. We did a bit of UI/UX, an introduction to Version Control then went ahead to learn HTML, CSS and JS. We also introduced the students to webhosting on ghpages and netlify&lt;/p&gt;

&lt;p&gt;The program included from theory, practicals and projects. This ensured that the students are able to apply what they learn practicaly and build real life projects.&lt;/p&gt;

&lt;p&gt;Some of the projects the students worked on included a personal portfolio, a school website, a calculator, IG clone, EPL table clone(they love football) and two projects of their choice. This projects ensured that whatever they learnt in class was implemented.&lt;/p&gt;

&lt;h3&gt;
  
  
  My favorite parts of the program included....
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lesson Prep&lt;/strong&gt;: This included coming up with notes for the next class. This made me learn more and more concepts, which I believe has even made me a better developer. For concepts that seemed complex I had to do before hand and hence making me an expert at it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implementation of JS concepts&lt;/strong&gt;: This was quite interesting to see the students implement the concepts they didnt think they could use before. Eg creating a responsive navbar using JS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CSS Layouts&lt;/strong&gt;: I did not make lots of practice on CSS layouts before and after going through the session I felt am ready to go back to CSS and use it all the time. I literally learnt all over again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project presentation&lt;/strong&gt; and Reviews: Our mode of reviews involved the students presenting what they worked with and everyone would give feedback on how they felt about it and changes they wanted to see.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debugging&lt;/strong&gt;: By the end of month one, the students owned the debbuging sessions and it was interesting to see the different approaches they take in bug solving.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Guo4RGj6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ek92p6lqyjqfcvv3p36h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Guo4RGj6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ek92p6lqyjqfcvv3p36h.png" alt="&amp;gt; Software development is a commitment to continous learning - Wayne Gakuo" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The entire three months was impactful for me! I was both an instructor and learner. I would do this again and again. The satisfaction that come with seeing beginners become experts...&lt;br&gt;
Huge shoutout to the students for taking time to learn and never giving up on the difficult concepts. I can't wait to see what the latest web developers achieve in the next few months and years. Thanks to techtenum for the opportunity to train! &lt;/p&gt;

&lt;p&gt;Will I do this again? Yes and even much more better!&lt;/p&gt;

&lt;p&gt;Thanks for reading through😊 Adios👋&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Getting Started with Flask</title>
      <dc:creator>Victoria Mutai</dc:creator>
      <pubDate>Thu, 16 Mar 2023 18:46:31 +0000</pubDate>
      <link>https://dev.to/vicky__mutai/getting-started-with-flask-12cg</link>
      <guid>https://dev.to/vicky__mutai/getting-started-with-flask-12cg</guid>
      <description>&lt;p&gt;In this article, you will learn about flask, why you should use it, its features, and how to get started with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Flask is a python framework that provides tools for building web applications quickly and more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasons for using flask
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It is lightweight, with minimal dependencies.&lt;/li&gt;
&lt;li&gt;It is simple and easy to learn and use.&lt;/li&gt;
&lt;li&gt;It is flexible.&lt;/li&gt;
&lt;li&gt;It has very good documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Getting started&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a virtual environment for your project using the venv command.&lt;br&gt;
&lt;code&gt;python -m venv virtual-name&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install flask into your project using the pip command,after creating the virtual environment.&lt;br&gt;
&lt;code&gt;pip install flask&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new flask application. Create a new file called &lt;strong&gt;main.py&lt;/strong&gt; and add code to start application. It is important to note that to create a new flask application, import Flask and use:&lt;br&gt;
&lt;code&gt;app = Flask(__name__)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
    print('Lets learn flask!')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Flask Routes
&lt;/h2&gt;

&lt;p&gt;To access the different pages, use the @app.route decorator. Routing accepts the different HTTP methods, GET is the default flask route. This is how routes look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.route('/login',methods=['GET','POST']
def login():
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;em&gt;Flask Templates&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Flask uses the Jinja2 as its template engine. Create a template directory to store your html files. To import use the render_template. With templates you can reuse common elements eg layouts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.route('/')
def index():
    return render_template('index.html')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;em&gt;Conditional Formatting&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Flask templates allow us to loop through different variables and also use conditional formatting.&lt;/p&gt;

&lt;h4&gt;
  
  
  Flask code
&lt;/h4&gt;

&lt;p&gt;The sample code below passes a variable frameworks to the template and using the conditional formatting and html lists, it prints out the data on an unordered list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@app.route('/')
def index():
    frameworks = ['Django','Flask']
    return render_template('index.html',frameworks=frameworks)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  HTML code
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;Different python modules: &amp;lt;/p&amp;gt;
&amp;lt;ul&amp;gt;
    {% for framework in frameworks %}
    &amp;lt;li&amp;gt;{{framework}}&amp;lt;/li&amp;gt;
    {% endfor %}
&amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reusing Components
&lt;/h3&gt;

&lt;p&gt;To reuse component eg layouts, use &lt;code&gt;extends&lt;/code&gt; keyword. This ensures a consistent look and feel across all your web pages. Lets do this.&lt;br&gt;
Create a &lt;code&gt;layout.html&lt;/code&gt; file and put this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Flask Lesson&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/"&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/about"&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/contact"&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
    &amp;lt;div class="content"&amp;gt;R
        {% block content %}{% endblock %}
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the &lt;code&gt;index.html&lt;/code&gt; file, add the extends keyword and put the containt into the&lt;code&gt;{% block content %}{% endblock %}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% extends 'layout.html' %}
{% block content %}

&amp;lt;h1&amp;gt;Lets talk flask&amp;lt;/h1&amp;gt;
&amp;lt;p&amp;gt;Different python modules: &amp;lt;/p&amp;gt;
&amp;lt;ul&amp;gt;
    {% for framework in frameworks %}
    &amp;lt;li&amp;gt;{{framework}}&amp;lt;/li&amp;gt;
    {% endfor %}
&amp;lt;/ul&amp;gt;
{% endblock %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To sum it up, Flask provides many useful features, including routing, templates, and support for various extensions, making it easy to build and maintain web applications.&lt;/p&gt;

&lt;p&gt;In upcoming blogs, we will deep dive into some of the topics we covered in this blog.&lt;/p&gt;

&lt;p&gt;Stay tuned to more flask content!&lt;/p&gt;

</description>
      <category>python</category>
      <category>flask</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
