<?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: Maiko Miyazaki</title>
    <description>The latest articles on Forem by Maiko Miyazaki (@maikomiyazaki).</description>
    <link>https://forem.com/maikomiyazaki</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%2F222649%2F1a81c08c-9c97-456c-b709-331f0b9d8866.JPG</url>
      <title>Forem: Maiko Miyazaki</title>
      <link>https://forem.com/maikomiyazaki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/maikomiyazaki"/>
    <language>en</language>
    <item>
      <title>How to create a related post component with gatsby-remark-related-posts plugin</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Tue, 22 Jun 2021 14:39:02 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/how-to-create-a-related-post-component-with-gatsby-remark-related-posts-plugin-58he</link>
      <guid>https://forem.com/maikomiyazaki/how-to-create-a-related-post-component-with-gatsby-remark-related-posts-plugin-58he</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;small&gt;This article is originally published on &lt;a href="https://miyazakimaiko.com/" rel="noopener noreferrer"&gt;miyazakimaiko.com&lt;/a&gt;. Photo by &lt;a href="https://unsplash.com/@girlwithredhat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Girl with red hat&lt;/a&gt; on &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash.&lt;/a&gt;&lt;/small&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;I recently deployed my personal blog &lt;a href="https://miyazakimaiko.com" rel="noopener noreferrer"&gt;miyazakimaiko.com&lt;/a&gt;, but I had difficult time dealing with a related post component when I build this website. I found a couple of ways to implement it without a plugin, but I wanted it as simple as possible, preferably complete it on the build time, and didn't mind using a plugin for it. Then I found gatsby-remark-related-posts plugin, which seemed feasible, but I couldn't find solutions to some of the issues I came across when implementing it. So this article is for the people who stuck like me. I'll summarise implementation steps to make it as easy as possible to understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Using allMarkdownRemark for querying .md files&lt;/strong&gt;&lt;br&gt;
Unfortunately, it seems like it's not compatible with .mdx files or mdx query. If you find it possible, please let me know in the comment section!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;gatsby-remark-related-posts plugin is installed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To install the plugin, please refer to &lt;a href="https://www.gatsbyjs.com/plugins/gatsby-remark-related-posts/" rel="noopener noreferrer"&gt;this page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File hierarchy&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;project&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;gatsby&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;gatsby&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&lt;/span&gt;   
&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;blog&lt;/span&gt; 
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;article1&lt;/span&gt;   
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;md&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;featured_image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;jpg&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;article2&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;md&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="nx"&gt;featured_image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;jpg&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;       
&lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;   &lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;templates&lt;/span&gt; 
&lt;span class="err"&gt;│&lt;/span&gt;       &lt;span class="err"&gt;└───&lt;/span&gt;&lt;span class="nx"&gt;article&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;js&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;p&gt;This folder is used as the example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  gatsby-config.js
&lt;/h3&gt;

&lt;p&gt;Set directory where you include your markdown files in &lt;code&gt;posts_dir&lt;/code&gt;, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gatsby-remark-related-posts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;posts_dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/content/blog`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;doc_lang&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&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;h3&gt;
  
  
  gatsby-node.js
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Query part&lt;/strong&gt;&lt;br&gt;
This code below allows the plugin to create relatedFileAbsolutePaths field in the each &lt;code&gt;MarkdownRemark&lt;/code&gt; node. Details: &lt;a href="https://www.gatsbyjs.com/plugins/gatsby-remark-related-posts/" rel="noopener noreferrer"&gt;https://www.gatsbyjs.com/plugins/gatsby-remark-related-posts/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;createPages action part&lt;/strong&gt;&lt;br&gt;
Pass the &lt;code&gt;relatedFileAbsolutePaths&lt;/code&gt; as a variable to the individual page. To do so, we can simply set &lt;code&gt;relatedFilePaths: post.node.fields.relatedFileAbsolutePaths.slice(0,4)&lt;/code&gt; inside context. You could just pass whole list of related file absolute paths, or specify how many article you want to pass by slicing the list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createPages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;graphql&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;actions&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createPage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;actions&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;blogPostCollection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;graphql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`
      {
        allMarkdownRemark {
          edges {
            node {
              fileAbsolutePath
              fields {
                relatedFileAbsolutePaths
              }
              frontmatter {
                title
                slug
              }
            }
          }
        }
      }
    `&lt;/span&gt;
  &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Create an individual article page for each article.&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;allMarkdownRemark&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;edges&lt;/span&gt;

    &lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;createPage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`blog/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frontmatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`./src/templates/article.js`&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frontmatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;relatedFilePaths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;relatedFileAbsolutePaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="c1"&gt;// Create blog list pages here..&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;blogPostCollection&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;p&gt;&lt;em&gt;Caution with the Query: In my blog, I set &lt;code&gt;slug&lt;/code&gt; as a part of frontmatter, but most of cases you have &lt;code&gt;slug&lt;/code&gt; field.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  templates/article.js
&lt;/h2&gt;

&lt;p&gt;We can simply query related posts when fetching the single article like below. Make sure to mention the argument &lt;code&gt;$relatedFilePaths: [String]&lt;/code&gt;, which we passed to this page in the gatsby-node.js file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;graphql&lt;/span&gt;&lt;span class="s2"&gt;`
    query BlogTemplate($slug: String! $relatedFilePaths: [String]) {
        markdownRemark(frontmatter: { slug: { eq: $slug } }) {
            ...
        }
        allMarkdownRemark(filter: {fileAbsolutePath: {in: $relatedFilePaths}}, limit: 4) {
            edges {
              node {
                ...
            }
        }
    }  
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the template, you'll be able to access the main article data from &lt;code&gt;props.data.markdownRemark&lt;/code&gt; and related posts data from &lt;code&gt;props.data.allMarkdownRemark.edges&lt;/code&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%2F5cpxsccqa6zky5folvkw.jpg" 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%2F5cpxsccqa6zky5folvkw.jpg" alt="related post component is created"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hooray! Now I have a related posts component available to the each page 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Consideration
&lt;/h2&gt;

&lt;p&gt;This plugin accumulates related posts on the build time rather than runtime, so I'd say it's highly efficient. However, I do not have much articles on my blog so I don't yet know tell how it affects the speed of the build time. I'll do more research about it, and update this article when I find any realization in the future.&lt;/p&gt;

&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! &lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>20 things I learned about Scrum from Learning Agile</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 02 May 2021 15:55:26 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/20-things-i-learned-about-scrum-from-learning-agile-book-47ob</link>
      <guid>https://forem.com/maikomiyazaki/20-things-i-learned-about-scrum-from-learning-agile-book-47ob</guid>
      <description>&lt;p&gt;As I will be joining a company where Scrum seems prevalent, I decided to read a book called &lt;a href="https://books.google.ie/books/about/Learning_Agile.html?id=XLxUBQAAQBAJ&amp;amp;printsec=frontcover&amp;amp;source=kp_read_button&amp;amp;redir_esc=y#v=onepage&amp;amp;q&amp;amp;f=false"&gt;Learning Agile&lt;/a&gt; written by &lt;a href="https://twitter.com/AndrewStellman?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor"&gt;Andrew Stellman&lt;/a&gt; and &lt;a href="https://twitter.com/JennyGreene"&gt;Jennifer Greene&lt;/a&gt;. It's such a great book that given me a better idea of what it's like to be a part of a scrum team.&lt;/p&gt;

&lt;p&gt;In this article, I'll summarise 20 things from the book that I found particularly useful and important for a complete newbie including myself.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Each role has a different perspective on user stories
&lt;/h1&gt;

&lt;p&gt;There are many roles to form a Scrum team such as Product Owner, Scrum Master, Team lead, Lead developer, etc. &lt;/p&gt;

&lt;p&gt;For developers, for instance, a user story is the functionality written in a simple and easy way to understand. We use user stories to break up and organise tasks. For the team lead, user stories are a tool to communicate with developers to help them figure out what should be done next.&lt;/p&gt;

&lt;p&gt;The product owner, on the other hand, sees the list of user stories as values that will be delivered to the company. User stories are the tool to communicate with customers to validate what they are looking for.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Before diving into coding, have discussions to see user stories in the shoes of other roles
&lt;/h1&gt;

&lt;p&gt;Because understanding of a user story can differ depending on the roles, developers could make wrong assumptions on what they are making. Without taking the time to understand user stories correctly, we could end up making big changes to the codes that could have been avoided.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. It's not enough to have the "correct" process or the "best" practice
&lt;/h1&gt;

&lt;p&gt;Take the time and have conversations with your team to understand why you are doing what you are doing with process and tools, and how people on the team work together with it. Things can go wrong if we just follow them blindly.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Focus on working software rather than comprehensive documentation
&lt;/h1&gt;

&lt;p&gt;There are many kinds of documentation are very useful for the team including wireframes or sequence diagram, but is not the goal to the project. Documentation is only a means toward the end of working software.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. The term "Working software" has a specific definition
&lt;/h1&gt;

&lt;p&gt;"Working software" is not just the software that is functioning. In a Scrum team, Working software is the software that adds value to the organization. &lt;/p&gt;

&lt;h1&gt;
  
  
  6. Be cautious when you are constantly "negotiating" to protect yourself
&lt;/h1&gt;

&lt;p&gt;When teams don't collaborate toward the single goal of delivering working software, they often treat each other as if they're working on a contract. It may protect us from getting into trouble when things go wrong, but is highly counterproductive.&lt;/p&gt;

&lt;h1&gt;
  
  
  7. Constantly look for changes
&lt;/h1&gt;

&lt;p&gt;If we work the wrong plan, we'll build the wrong product. However, it's common for a person who built a plan to resist changing them. Even that's the case, changes cost more later on, so constantly make effort to find out necessary changes as early as possible.&lt;/p&gt;

&lt;h1&gt;
  
  
  8. Principles add life, character and heart into Practices
&lt;/h1&gt;

&lt;p&gt;A team cannot get the full benefit of solid practices without principles.&lt;br&gt;
In order to gain the full benefit of agile practices, do not kill collaboration by only thinking about developer stuff. Have a lot of communication to see the project in the perspective of a team, not your own perspective as a developer.&lt;/p&gt;

&lt;h1&gt;
  
  
  9. Scrum Master doesn't own the plan
&lt;/h1&gt;

&lt;p&gt;Everyone on a scrum team owns the project. The Scrum Master guides the team's decisions, use of Scrum and its principles.&lt;/p&gt;

&lt;h1&gt;
  
  
  10. Product Owner makes decisions on behalf of the business
&lt;/h1&gt;

&lt;p&gt;Product Owner doesn't just sit around to wait for the sprint to finish. They work with all of the team members every day, being the voice of the business, to help the team to understand the value of software. It is important to &lt;em&gt;actually&lt;/em&gt; listen to the product owner's opinions and ideas.&lt;/p&gt;

&lt;h1&gt;
  
  
  11. Programming isn't the only important thing in a project
&lt;/h1&gt;

&lt;p&gt;Many programmers take the attitude, and many companies encourage this when they structure their teams around a core set of technical people. Be wary when you see everyone else except developers as "outsiders".&lt;/p&gt;

&lt;h1&gt;
  
  
  12. Be cautious when prioritising your own professional goal
&lt;/h1&gt;

&lt;p&gt;When we have this mindset, we are not committed but merely involved in the project. During a sprint, the success of the project is more important than getting closer to your own professional goal. For instance, if we choose technology for the project because we want to learn it, we are putting weight on our own professional goals, rather than the success of the project.&lt;/p&gt;

&lt;h1&gt;
  
  
  13. The more people outside the team involved, the more value he or she can potentially add
&lt;/h1&gt;

&lt;p&gt;For instance, users of the software should be involved because their opinion matters. That's one of the reasons to release working software to the users on a regular basis to keep them involved.&lt;/p&gt;

&lt;h1&gt;
  
  
  14. Collective commitment rather than committing to individual tasks
&lt;/h1&gt;

&lt;p&gt;When a team makes a collective commitment, that means each team member agrees and commits genuinely to deliver the most valuable software they can to their users and stakeholders at the end of each sprint.&lt;/p&gt;

&lt;h1&gt;
  
  
  15. Task assignments come from the team member themselves
&lt;/h1&gt;

&lt;p&gt;The team members themselves are the source of the task assignments. &lt;/p&gt;

&lt;p&gt;So ask yourself what you think you should do, rather than simply asking the team lead what your next task is.&lt;/p&gt;

&lt;h1&gt;
  
  
  16. Daily Scrum is not a way for the team lead to manage the schedule
&lt;/h1&gt;

&lt;p&gt;Daily Scrum is a stand-up meeting. It's for the team to plan the next day's work but not for the team lead to get status updates. To achieve it, each team members inspect the work that the team is doing. It gives the flexibility to make the right decisions including task assignments in the last responsible moment.&lt;/p&gt;

&lt;h1&gt;
  
  
  17. Ask each other 3 questions every day on the Daily Scrum
&lt;/h1&gt;

&lt;p&gt;Ask these three questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What have I done since our last meeting?&lt;/li&gt;
&lt;li&gt;What am I planning on doing between now and our next meeting?&lt;/li&gt;
&lt;li&gt;What roadblocks are in my way?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By everyone on the team inspecting what everyone else is doing in the same way every day, a lot of problems get caught before they become costly.&lt;/p&gt;

&lt;h1&gt;
  
  
  18. Pleasant surprises for users/stakeholders can be almost as damaging as unpleasant ones
&lt;/h1&gt;

&lt;p&gt;Avoid any surprises at all cost. To do so, keep everyone up to date on all of the changes they discover during the daily scrum. That's why the attendance of users/stakeholders to the Daily Scrum is valuable.&lt;/p&gt;

&lt;h1&gt;
  
  
  19. Have a concrete definition of "Done"
&lt;/h1&gt;

&lt;p&gt;For developers, it's easy to feel like it's finished when looking back at what they've just built. But calling it "Done" in this situation can create problematic misunderstanding on the team because your "Done" is ambiguous for anyone else on the team.&lt;/p&gt;

&lt;p&gt;Get used to refer Condition of Satisfaction/Acceptance Criteria which defines the concrete definition of "Done" for the task. For each work in the task to get it done, it must also be understood, built, tested and deployed.&lt;/p&gt;

&lt;h1&gt;
  
  
  20. A lifetime to master
&lt;/h1&gt;

&lt;p&gt;The basic practices of Scrum are straightforward to learn and adapt, but there'll be many challenges if we want to master it.&lt;/p&gt;




&lt;p&gt;While I was reading through the book Learning Agile to write this summary, I was also reading a book called "&lt;a href="https://books.google.ie/books/about/The_Courage_To_Be_Disliked.html?id=IggxDwAAQBAJ&amp;amp;printsec=frontcover&amp;amp;source=kp_read_button&amp;amp;redir_esc=y#v=onepage&amp;amp;q&amp;amp;f=false"&gt;Courage to be disliked&lt;/a&gt;" written based on Alfred Adler's theories in tandem. As reading through this book, I noticed that there are many things in common with Scrum and Alfred Adler's theories. It was an interesting realisation.&lt;/p&gt;

&lt;p&gt;If you don't buy some practices of Scrum, I highly recommend reading the book &lt;a href="https://books.google.ie/books/about/The_Courage_To_Be_Disliked.html?id=IggxDwAAQBAJ&amp;amp;printsec=frontcover&amp;amp;source=kp_read_button&amp;amp;redir_esc=y#v=onepage&amp;amp;q&amp;amp;f=false"&gt;Courage to be Disliked&lt;/a&gt;, and not to mention, &lt;a href="https://books.google.ie/books/about/Learning_Agile.html?id=XLxUBQAAQBAJ&amp;amp;printsec=frontcover&amp;amp;source=kp_read_button&amp;amp;redir_esc=y#v=onepage&amp;amp;q&amp;amp;f=false"&gt;Learning Agile&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>agile</category>
      <category>codenewbie</category>
      <category>scrum</category>
    </item>
    <item>
      <title>C# date &amp; time conversion CheatSheet</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Wed, 28 Apr 2021 14:59:14 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/c-date-time-conversion-cheatsheet-3fm8</link>
      <guid>https://forem.com/maikomiyazaki/c-date-time-conversion-cheatsheet-3fm8</guid>
      <description>&lt;p&gt;When dealing with data, we often find ourselves handling date and time. Although it is not particularly difficult, I often find myself googling the same conversion over and over again.&lt;/p&gt;

&lt;p&gt;This post will share a cheat sheet of date and time conversion to eliminate such little time-consuming procedures and explain each technique in the following sections.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blogimagesbucket129368.s3-eu-west-1.amazonaws.com/CS+datetime+conversion+cheat+sheet.pdf" rel="noopener noreferrer"&gt;Open in PDF&lt;/a&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%2Ftdci1rjmybvyo2nlwaw7.jpg" 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%2Ftdci1rjmybvyo2nlwaw7.jpg" alt="C sharp datetime conversion cheat sheet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;p&gt;1️⃣ String to DateTime object&lt;br&gt;
2️⃣ String that is not parsable with Parse() to DateTime object&lt;br&gt;
3️⃣ DateTime Object to String&lt;br&gt;
4️⃣ String to String&lt;br&gt;
5️⃣ DateTime Object to Unix Timestamp in Seconds&lt;br&gt;
6️⃣ Unix Timestamp in Seconds to DateTime Object&lt;br&gt;
7️⃣ UTC timezone String to DateTimeOffset object in a different timezone&lt;br&gt;
8️⃣ 24-hour time String to 12-hour time String&lt;br&gt;
9️⃣ Download PDF file&lt;/p&gt;




&lt;h2&gt;
  
  
  String to DateTime object&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"31-12-2021"&lt;/code&gt;&lt;br&gt;
Output: Datetime object &lt;code&gt;"31/12/2021 00:00:00"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;DateTime.Parse()&lt;/code&gt; to create a DateTime object from a string. &lt;code&gt;Parse&lt;/code&gt; method takes target string as an argument.&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%2F8nnwn4xjfryb4gsugqsa.jpg" 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%2F8nnwn4xjfryb4gsugqsa.jpg" alt="String to DateTime object with parse method"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  String that is not parsable with Parse() to DateTime object&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"31122021"&lt;/code&gt;&lt;br&gt;
Output: Datetime object &lt;code&gt;"31/12/2021 00:00:00"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;DateTime.ParseExact()&lt;/code&gt; to create a DateTime object from a string that is not parsable with &lt;code&gt;Parse()&lt;/code&gt; method. &lt;code&gt;ParseExact()&lt;/code&gt; takes three arguments -- target string, a string to explain the format, and Format Provider which pecifies format of the DateTime conventions associated with language, region, calendar, etc.&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%2Fs71fqv8mk73e8to3j6cp.jpg" 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%2Fs71fqv8mk73e8to3j6cp.jpg" alt="String to DateTime object with ParseExact method"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  DateTime object to String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: DateTime object &lt;code&gt;"31/12/2021 00:00:00"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"2021-12-31"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;ToString()&lt;/code&gt; methodto convert a DateTime object into String. The method takes desired string format as an argument.&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%2Fvupizctlll53dscen4kx.jpg" 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%2Fvupizctlll53dscen4kx.jpg" alt="DateTime object to String"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  String to String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"31122021"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"2021-12-31"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To convert a string into a different format of a string, we first need to convert it into a DateTime object. Then we can use &lt;code&gt;ToString()&lt;/code&gt; methodto specify a format and convert it into a string.&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%2Fyzg982v0p6gez3jnalh2.jpg" 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%2Fyzg982v0p6gez3jnalh2.jpg" alt="String to String"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  DateTime Object to Unix Timestamp in Seconds&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: DateTime Object &lt;code&gt;"31/12/2021 00:00:00"&lt;/code&gt;&lt;br&gt;
Output: Long &lt;code&gt;1640908800&lt;/code&gt; (Unix Timestamp in seconds)&lt;/p&gt;

&lt;p&gt;To convert DateTime Object into Unix Timestamp in seconds, we first need to convert the DateTime into a DateTimeOffset object. Then we can use &lt;code&gt;ToUnixTimeSeconds()&lt;/code&gt; methodto convert it into a timestamp in Long.&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%2Fuslx062agjgl9ecclqt9.jpg" 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%2Fuslx062agjgl9ecclqt9.jpg" alt="DateTime Object to Unix Timestamp in Seconds"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Unix Timestamp in Seconds to DateTime Object&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: Long &lt;code&gt;1640908800&lt;/code&gt; (Unix Timestamp in seconds)&lt;br&gt;
Output: DateTime object with &lt;code&gt;"31/12/2021 00:00:00"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To convert a Unix timestamp (in seconds) into a DateTime object, we first need to convert the timestamp into a DateTimeOffset object. Then we can use &lt;code&gt;DateTime&lt;/code&gt; propertyto get the DateTime object.&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%2Fr1drwrthtloc24nrr504.jpg" 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%2Fr1drwrthtloc24nrr504.jpg" alt="Unix Timestamp in Seconds to DateTime Object"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  UTC timezone String to DateTimeOffset object in a different timezone&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"31-12-2021 08:33:00 -0400"&lt;/code&gt; (New York timezone)&lt;br&gt;
Output: DateTime object &lt;code&gt;"31/12/2021 21:33:00 +09:00"&lt;/code&gt; (Tokyo timezone)&lt;/p&gt;

&lt;p&gt;There are two main steps to convert a UTC timezone String into a DateTimeOffset object in a different timezone. &lt;/p&gt;

&lt;p&gt;Firstly, we need to calculate the UTC offset of the output timezone. To do so, we can use &lt;code&gt;TimeSoneInfo.FindSystemTimeZoneById&lt;/code&gt;to get the TimeZoneInfo object, and then calculates the offset using &lt;code&gt;GetUtcOffset()&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Next, we create a DateTimeOffset object from the input string using &lt;code&gt;DateTimeOffset.ParseExact()&lt;/code&gt;. After that, convert the DateTimeOffset using &lt;code&gt;ToOffset()&lt;/code&gt; method with the offset calculated in the first step.&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%2Fgews5wxe0w5i1bd8sknc.jpg" 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%2Fgews5wxe0w5i1bd8sknc.jpg" alt="UTC timezone String to DateTimeOffset object in a different timezone"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  24-hour time String to 12-hour time String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"20:00"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"08:00 pm"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We first need to convert String into a DateTime object. Right after, 12-hour time string can be created using &lt;code&gt;ToString&lt;/code&gt; method.&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%2Fhynm2d5hstxotiz197fp.jpg" 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%2Fhynm2d5hstxotiz197fp.jpg" alt="24-hour time String to 12-hour time String"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Download PDF file&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://blogimagesbucket129368.s3-eu-west-1.amazonaws.com/CS+datetime+conversion+cheat+sheet.pdf" rel="noopener noreferrer"&gt;Open PDF&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/in/maiko-miyazaki-442ab0169/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt; or Twitter &lt;a href="https://twitter.com/MaikoMiyazaki" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/dotnet/standard/datetime/converting-between-datetime-and-offset" rel="noopener noreferrer"&gt;Converting between DateTime and offset - Microsoft docs&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tooffset?view=netframework-4.7.2" rel="noopener noreferrer"&gt;DateTimeOffset.ToOffset - Microsoft docs&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/7908343/list-of-timezone-ids-for-use-with-findtimezonebyid-in-c" rel="noopener noreferrer"&gt;List of timezone IDs for use with findtimezonebyid - Stackoverflow&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>csharp</category>
      <category>codenewbie</category>
      <category>todayisearched</category>
    </item>
    <item>
      <title>Python date &amp; time conversion CheatSheet</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sat, 10 Apr 2021 10:17:59 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/python-date-time-conversion-cheatsheet-3m69</link>
      <guid>https://forem.com/maikomiyazaki/python-date-time-conversion-cheatsheet-3m69</guid>
      <description>&lt;p&gt;When dealing with data, we often find ourselves handling date and time. Although it is not particularly difficult, I often find myself googling the same conversion over and over again.&lt;/p&gt;

&lt;p&gt;In this post, I'll share a cheat sheet of date and time conversion to eliminate such little time-consuming procedures and explain each technique in the following sections.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blogimagesbucket129368.s3-eu-west-1.amazonaws.com/Python+date+%26+time+Conversion+Cheat+Sheet+(1).pdf" rel="noopener noreferrer"&gt;Open in PDF&lt;/a&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%2F22penwtw672vtmq31wgp.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%2F22penwtw672vtmq31wgp.png" alt="Python date &amp;amp; time conversion CheatSheet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;p&gt;1️⃣ String to DateTime object&lt;br&gt;
2️⃣ DateTime object to String&lt;br&gt;
3️⃣ String to String&lt;br&gt;
4️⃣ UTC timestamp in seconds to DateTime object&lt;br&gt;
5️⃣ UTC timestamp in seconds to String&lt;br&gt;
6️⃣ UTC time string to UTC DateTime object in different GMT&lt;br&gt;
7️⃣24-hour time String to 12-hour time String&lt;br&gt;
7️⃣Download PDF file&lt;/p&gt;




&lt;h2&gt;
  
  
  String to DateTime object&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"08/04/2021"&lt;/code&gt;&lt;br&gt;
Output: Datetime object &lt;code&gt;"2021-04-08 00:00:00"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;datetime.strptime&lt;/code&gt; to create a DateTime object from a string. &lt;code&gt;strptime&lt;/code&gt; method takes two arguments -- target string and string to explain the format of the target string.&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%2Fd07appjcwb6dvobr62x8.jpg" 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%2Fd07appjcwb6dvobr62x8.jpg" alt="String to DateTime object"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DateTime object to String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: DateTime object &lt;code&gt;"2021-04-08 00:00:00"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"08/04/2021"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;datetime.strftime&lt;/code&gt;to convert a DateTime object into String. This &lt;code&gt;strftime&lt;/code&gt; method takes two arguments -- DateTime object and String to specify desired string format.&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%2Fvk5hniejj6f87lxhr3gy.jpg" 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%2Fvk5hniejj6f87lxhr3gy.jpg" alt="DateTime object to String"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  String to String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"08/04/2021"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"2021-04-08"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To convert datetime string into a different format of a string, we first need to convert it into a DateTime object. Then we can use &lt;code&gt;strptime&lt;/code&gt;to specify and convert into the desired format.&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%2Fezgvcmh2sn4qatxersar.jpg" 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%2Fezgvcmh2sn4qatxersar.jpg" alt="String to String"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  UTC timestamp in seconds to DateTime object&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: float &lt;code&gt;1617836400.0&lt;/code&gt; (UTC timestamp in seconds)&lt;br&gt;
Output: DateTime object with &lt;code&gt;"2021-04-08 00:00:00"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To convert float of timestamp into a DateTime, can use &lt;code&gt;datetime.fromtimestamp()&lt;/code&gt;. It takes timestamp as an argument and returns DateTime object.&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%2F823m3uozr95aqlmc0hjo.jpg" 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%2F823m3uozr95aqlmc0hjo.jpg" alt="timestamp to DateTime object"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  UTC timestamp in seconds to String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: float &lt;code&gt;1617836400.0&lt;/code&gt; (UTC timestamp in seconds)&lt;br&gt;
Output: String &lt;code&gt;"08/04/2021"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To convert float of timestamp into String, we first get a DateTime object. Using &lt;code&gt;strftime&lt;/code&gt; method, we can then create desired format of String.&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%2Fqpqzsq96cmkrrq6y501c.jpg" 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%2Fqpqzsq96cmkrrq6y501c.jpg" alt="timestamp to String"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  UTC time string to UTC DateTime object in different GMT&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"08-04-2021 08:33:00-0400"&lt;/code&gt; (New York timezone)&lt;br&gt;
Output: DateTime object &lt;code&gt;"2021-04-08 21:33:00+09:00"&lt;/code&gt; (Tokyo timezone)&lt;/p&gt;

&lt;p&gt;To convert an UTC time string, we first convert it into a DateTime object. After that, we can use &lt;code&gt;astimezone&lt;/code&gt; method to create a DateTime object in specified GMT.&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%2Fxwnxgsb2pvy7rjbkhd6k.jpg" 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%2Fxwnxgsb2pvy7rjbkhd6k.jpg" alt="UTC String to different UTC DateTime object"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  24-hour time String to 12-hour time String&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Input Example: String &lt;code&gt;"20:00"&lt;/code&gt;&lt;br&gt;
Output: String &lt;code&gt;"08:00 PM"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We first need to convert String into a DateTime object. Right after, 12-hour time string can be created using &lt;code&gt;strftime&lt;/code&gt; method.&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%2Fg47btuhimb15dulk9h3o.jpg" 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%2Fg47btuhimb15dulk9h3o.jpg" alt="24-hour time String to 12-hour time String"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Download PDF file&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://blogimagesbucket129368.s3-eu-west-1.amazonaws.com/Python+date+%26+time+Conversion+Cheat+Sheet+(1).pdf" rel="noopener noreferrer"&gt;Open PDF&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/in/maiko-miyazaki-442ab0169/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt; or Twitter &lt;a href="https://twitter.com/MaikoMiyazaki" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>codenewbie</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Let's remember the concept of Abstraction, Generalisation, Decomposition and Encapsulation in one go!</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Fri, 26 Mar 2021 16:42:48 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/let-s-remember-the-concept-of-abstraction-generalisation-decomposition-and-encapsulation-in-one-go-1i85</link>
      <guid>https://forem.com/maikomiyazaki/let-s-remember-the-concept-of-abstraction-generalisation-decomposition-and-encapsulation-in-one-go-1i85</guid>
      <description>&lt;p&gt;Did you just begin to learn Object-Oriented Design/Programming recently? Are you struggling to grasp the general idea of Abstraction, Generalisation, Decomposition and Encapsulation? Are you not sure about the differences between each concept?&lt;/p&gt;

&lt;p&gt;If that sounds like you, you are not alone! For newbies, there are so many concepts to remember and it can be overwhelming.&lt;/p&gt;

&lt;p&gt;In this post, we'll be looking at the summary of each principle and then move onto each of them. To help us remember the concepts in one go, we will be looking at the four main principles in a setting simulating a retail company similar to IKEA. &lt;/p&gt;

&lt;p&gt;As a result, we'll be able to grasp the general ideas and understand why they are useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;Related words&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Abstraction&lt;/td&gt;
&lt;td&gt;Reduces complexity by showing only relevant information&lt;/td&gt;
&lt;td&gt;abstract class, abstract method, extend&lt;/td&gt;
&lt;td&gt;A row header for chairs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Generalization&lt;/td&gt;
&lt;td&gt;Reduces complexity by having an umbrella term&lt;/td&gt;
&lt;td&gt;superclass, subclass, interface, implements, extends&lt;/td&gt;
&lt;td&gt;Furniture for chairs, tables and chests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decomposition&lt;/td&gt;
&lt;td&gt;Reduces complexity by separating problems&lt;/td&gt;
&lt;td&gt;association, aggregation, composition&lt;/td&gt;
&lt;td&gt;Fitted Kitchen&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Encapsulation&lt;/td&gt;
&lt;td&gt;Restrict access to data to protect them and reduce complexity&lt;/td&gt;
&lt;td&gt;getter method, setter method, private, protected, public&lt;/td&gt;
&lt;td&gt;System of a restaurant section&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now let's dive into details.&lt;/p&gt;




&lt;h1&gt;
  
  
  Abstraction&lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Abstraction can reduce complexity by &lt;strong&gt;hiding irrelevant information&lt;/strong&gt; of things. In other words, it clarfy things by &lt;strong&gt;showing only relevant information&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's look at examples.&lt;/p&gt;

&lt;p&gt;Imagine we sell chairs in our retail company. On our website, we listed our products and information to help customers to make purchase decisions. The product pages of chairs would contain those information listed below &lt;strong&gt;without having concepts of abstraction&lt;/strong&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%2Fsriy9mgljyi7j6860rln.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%2Fsriy9mgljyi7j6860rln.png" alt="Without Abstraction"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think about the representation? Are some of them irrelevant to customers to make purchase decisions? &lt;/p&gt;

&lt;p&gt;In such a situation, &lt;strong&gt;we usually show only relevant information&lt;/strong&gt; to help make our customer's purchase decisions without confusion.&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%2Flv6bicjp9hqwuu48b8m5.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%2Flv6bicjp9hqwuu48b8m5.png" alt="With Abstraction"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What we can see here is a much less complex structure because irrelevant information were ignored and rest of them are organized.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstraction is like creating the row header in the picture. They can become attributes within a Chair class&lt;/strong&gt;. As a result, it is much easier to create a new type of chair because you have column headers, which is a class in OOP, as a template.&lt;/p&gt;




&lt;h1&gt;
  
  
  Generalization&lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Generalization can reduce complexity by creating an umbrella term. In other words, having an umbrella term can reduce redundancy and improve efficiency.&lt;/p&gt;

&lt;p&gt;Now, let us continue to use the example of the retail company to look at how generalization can be used.&lt;/p&gt;

&lt;p&gt;At the moment, we sell chairs, tables and chests in the retail section of our company. At the moment, we have a column header for chairs including &lt;code&gt;Product name&lt;/code&gt;, &lt;code&gt;Type&lt;/code&gt;, &lt;code&gt;Article number&lt;/code&gt;,  &lt;code&gt;Width&lt;/code&gt;, &lt;code&gt;Depth&lt;/code&gt;, &lt;code&gt;Height&lt;/code&gt;, &lt;code&gt;Seat width&lt;/code&gt;, &lt;code&gt;Seat depth&lt;/code&gt;, &lt;code&gt;Seat height&lt;/code&gt;, &lt;code&gt;Max. seat height&lt;/code&gt;, &lt;code&gt;Tested for&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When we looked at each title carefully, you may notice that some of them are obviously necessary for tables and wardrobes as well, but others are only applicable for chairs.&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%2F58o81fc973vaqm0rkfeo.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%2F58o81fc973vaqm0rkfeo.png" alt="Common attributes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, it is clear that &lt;code&gt;Width&lt;/code&gt;, &lt;code&gt;Depth&lt;/code&gt;, &lt;code&gt;Height&lt;/code&gt; must be included in any products we have, because &lt;strong&gt;they are the key factors for any furniture to evaluate if it is compatible with the customer's usage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If that's the case, we can state that &lt;code&gt;Width&lt;/code&gt;, &lt;code&gt;Depth&lt;/code&gt;, &lt;code&gt;Height&lt;/code&gt; as well as &lt;code&gt;Product name&lt;/code&gt; and &lt;code&gt;Type&lt;/code&gt; are must-have information to include in an umbrella term which we could name it &lt;code&gt;Furniture&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Decomposition&lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Decomposition can reduce the complexity of a problem by separating it into smaller chunks.&lt;/p&gt;

&lt;p&gt;Imagine we started selling more products including kitchen appliances in our retail company. Now, we are planning to sell fitted kitchens and set the fitted kitchen samples at our shop. &lt;/p&gt;

&lt;p&gt;So far, we have specified what to include in a fitted kitchen sample &lt;strong&gt;without decomposition&lt;/strong&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%2Fic2x160ml068ses2t0ky.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%2Fic2x160ml068ses2t0ky.png" alt="Without Decomposition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think of it? Isn't it complicated and unclear? For now, the list is small enough for the sake of simplicity, but what could happen if we include all the functionalities? &lt;/p&gt;

&lt;p&gt;Without decomposition, an object could have too many responsibilities and purpose.&lt;/p&gt;

&lt;p&gt;In such a situation, we usually separate the responsibilities into smaller chunks to make things clearer and easier to maintain.&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%2Fghsej5fc6xbu980c83z4.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%2Fghsej5fc6xbu980c83z4.png" alt="With decomposition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three types of relationships between the decomposed Fitted Kitchen object and its components, namely &lt;strong&gt;Composition&lt;/strong&gt;, &lt;strong&gt;Aggregation&lt;/strong&gt; and &lt;strong&gt;Association&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Composition (with Dimension)
&lt;/h3&gt;

&lt;p&gt;Composition creates &lt;strong&gt;the strongest relationship&lt;/strong&gt;. In the example above, the Fitted Kitchen could have a relationship with &lt;code&gt;Dimension&lt;/code&gt; because when the Fitted Kitchen is destroyed, &lt;code&gt;Dimension&lt;/code&gt; should also be destroyed. In other words, &lt;em&gt;&lt;code&gt;Dimension&lt;/code&gt; cannot exist without the Fitted Kitchen itself&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Aggregation (with Tap, Ventilation fan, Oven...)
&lt;/h3&gt;

&lt;p&gt;Aggregation is &lt;strong&gt;a looser relationship than composition&lt;/strong&gt;. In the example, Tap, Ventilation fan, Oven, Hob, Fridge, Freezer and Cupboard could have aggregation relationships with Fitted Kitchen if we decide that &lt;em&gt;Fitted Kitchen should not be presented to customers without one of the components&lt;/em&gt;. That being said, &lt;em&gt;each component can exist or be sold individually even though the Fitted Kitchen is destroyed&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Association (with Designer)
&lt;/h3&gt;

&lt;p&gt;Association is &lt;strong&gt;a loose relationship&lt;/strong&gt;. In the example, &lt;code&gt;Designer&lt;/code&gt; could have an association relationship with the Fitted Kitchen, if &lt;em&gt;the existence of Designer does not affect the existence of the Fitted Kitchen and vice versa&lt;/em&gt;. In other words, the Designer can exist and do their job even though the Fitted Kitchen is destroyed.&lt;/p&gt;




&lt;h1&gt;
  
  
  Encapsulation&lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Encapsulation can reduce the complexity of issues by bundling data and the methods that work on the data within one unit. &lt;/p&gt;

&lt;p&gt;Let's say we are planning to have a restaurant section in our retail company like IKEA does.&lt;/p&gt;

&lt;p&gt;We decided to have three menus like below:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dish Name&lt;/th&gt;
&lt;th&gt;Comes with&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Grilled Salmon&lt;/td&gt;
&lt;td&gt;Small soup, French fries&lt;/td&gt;
&lt;td&gt;8.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vegetable Soup&lt;/td&gt;
&lt;td&gt;Small Salad, A slice of soda bread&lt;/td&gt;
&lt;td&gt;8.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Beef Sandwich&lt;/td&gt;
&lt;td&gt;Small Salad, Crisps&lt;/td&gt;
&lt;td&gt;8.50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Without encapsulation, we are forced to have a buffet-style bar that customer can serve themselves freely. To put it another way, a customer is able to change the Small Salad to Grilled Salmon as the side, because they are set to &lt;code&gt;public&lt;/code&gt;. As a result, the price and the system of the restaurant would break.&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%2Fgdzkexytvqyctplmjxtl.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%2Fgdzkexytvqyctplmjxtl.png" alt="With Encapsulation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Encapsulation enables the restaurant system to have staff who control the changes in the dishes. In other words, each component of the dish is set to protected or private. They can allow a customer's request if it's allowed, or reject if they cannot change so that prevent direct changes and mistakes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;As I found these design principles terms a bit demotivating to remember at first, I prefer to include all of them in a single setting. I hope those examples help you to remember and distinguish the differences!&lt;/p&gt;




&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:6771886321091821568/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt; or Twitter &lt;a href="https://twitter.com/MaikoMiyazaki" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.coursera.org/learn/object-oriented-design" rel="noopener noreferrer"&gt;Object-Oriented Design - Coursera&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.guru99.com/java-data-abstraction.html#:~:text=Abstraction%20is%20the%20concept%20of,unnecessary%20details%20from%20the%20users." rel="noopener noreferrer"&gt;What is Abstraction in OOPs? Java Abstract Class &amp;amp; Method - Guru99&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackify.com/oop-concept-abstraction/" rel="noopener noreferrer"&gt;OOP Concept for Beginners: What is Abstraction? - Stackify&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/19291776/whats-the-difference-between-abstraction-and-generalization#:~:text=While%20abstraction%20reduces%20complexity%20by,functions%20with%20a%20single%20construct." rel="noopener noreferrer"&gt;What's the difference between abstraction and generalization? - Stackoverflow&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.cs.sjsu.edu/faculty/pearce/modules/lectures/oop/basics/generalization.htm" rel="noopener noreferrer"&gt;Generalization - SAN JOSÉ STATE UNIVERSITY&lt;/a&gt;&lt;br&gt;
&lt;a href="https://wiki.c2.com/?PrematureGeneralizationIsEvil" rel="noopener noreferrer"&gt;Premature Generalization Is Evil - Wiki Wiki Web&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.bbc.co.uk/bitesize/guides/zqqfyrd/revision/1" rel="noopener noreferrer"&gt;Decomposition - BBC Bitesize&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackify.com/oop-concept-for-beginners-what-is-encapsulation/" rel="noopener noreferrer"&gt;OOP Concept for Beginners: What is Encapsulation - Stackify&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Newbie's Cheatsheet: Commonly used verbs for naming functions, methods and variables</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Mon, 15 Mar 2021 14:47:39 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/beginner-s-cheat-sheet-commonly-used-verbs-for-naming-functions-methods-and-variables-509i</link>
      <guid>https://forem.com/maikomiyazaki/beginner-s-cheat-sheet-commonly-used-verbs-for-naming-functions-methods-and-variables-509i</guid>
      <description>&lt;p&gt;Do you follow your instinct when choosing a verb in your function?&lt;/p&gt;

&lt;p&gt;Do you use a number of synonyms for the same purpose inconsistently?&lt;/p&gt;

&lt;p&gt;If the answer is yes, you are not the only one. &lt;/p&gt;

&lt;p&gt;In order to write a clean code, or at least to attempt it, we need to know what words are commonly used so that we can use them, and people can understand easier what we are trying to do. &lt;/p&gt;

&lt;p&gt;At the same time, we need to stick with &lt;strong&gt;one word for one concept&lt;/strong&gt; rather than using synonyms inconsistently.&lt;/p&gt;

&lt;p&gt;In this post, I'll summarise commonly used verbs found in programming books and Github regardless of the type of programming language, so we can find the best-suited verbs for our own needs.&lt;/p&gt;

&lt;p&gt;On the tables below, we'll see 5 rows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The verb&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The number of times the verb is written on Github to give us some ideas on how commonly it's used&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Its general definition&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Synonyms to avoid using to express the same concept&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just bear with me, this is not a complete list of common words, so please do let me know in the comment if you find some of the definition is too biased on certain programming languages. I'll also be grateful if you could teach me any other verbs that you think it's common!&lt;/p&gt;

&lt;p&gt;I hope this post helps us, newbies choose a suitable verb and stick to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Table of Contents
&lt;/h3&gt;

&lt;p&gt;1️⃣ Alteration&lt;br&gt;
2️⃣ Creation&lt;br&gt;
3️⃣ Establishment&lt;br&gt;
4️⃣ Obtainment&lt;br&gt;
5️⃣ True or False Statement&lt;br&gt;
6️⃣ Conclusion&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Alteration&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Verb&lt;/th&gt;
&lt;th&gt;Written&lt;br&gt;on Github&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Synonyms&lt;br&gt;to avoid&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;set&lt;/td&gt;
&lt;td&gt;2B&lt;/td&gt;
&lt;td&gt;Often used to put data in an existing resource such as an attribute of an object.&lt;/td&gt;
&lt;td&gt;set_name(), set_store_id()&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;change&lt;/td&gt;
&lt;td&gt;668M&lt;/td&gt;
&lt;td&gt;Often used when a whole thing, such as image, is replaced by something else&lt;/td&gt;
&lt;td&gt;change_image(), change_colour()&lt;/td&gt;
&lt;td&gt;edit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;edit&lt;/td&gt;
&lt;td&gt;325M&lt;/td&gt;
&lt;td&gt;Often used same as change. It could be used especially when action is responsible for rendering the view.&lt;/td&gt;
&lt;td&gt;edit_title(), edit_record()&lt;/td&gt;
&lt;td&gt;change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;update&lt;/td&gt;
&lt;td&gt;739M&lt;/td&gt;
&lt;td&gt;Often used when one or more of the components is updated as a result, and something new could also be added.&lt;/td&gt;
&lt;td&gt;update_file()&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;add&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Often used to add something into a group of the things.&lt;/td&gt;
&lt;td&gt;add_item(), add_member()&lt;/td&gt;
&lt;td&gt;append&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;append&lt;/td&gt;
&lt;td&gt;287M&lt;/td&gt;
&lt;td&gt;Often used same as add. It could be used when it does not modify the original group of things but produce the new group.&lt;/td&gt;
&lt;td&gt;append_item(), append_element()&lt;/td&gt;
&lt;td&gt;add&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;remove&lt;/td&gt;
&lt;td&gt;824M&lt;/td&gt;
&lt;td&gt;Often used when a given thing is removed from a group of the things.&lt;/td&gt;
&lt;td&gt;remove_record(), remove_item()&lt;/td&gt;
&lt;td&gt;delete&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;delete&lt;/td&gt;
&lt;td&gt;455M&lt;/td&gt;
&lt;td&gt;Often used same as remove, but it could also render nonrecoverable.&lt;/td&gt;
&lt;td&gt;delete_record(), delete_item()&lt;/td&gt;
&lt;td&gt;remove&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;save&lt;/td&gt;
&lt;td&gt;478M&lt;/td&gt;
&lt;td&gt;Often used when preserving data to avoid loss.&lt;/td&gt;
&lt;td&gt;save_json(), save_order()&lt;/td&gt;
&lt;td&gt;store&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;store&lt;/td&gt;
&lt;td&gt;396M&lt;/td&gt;
&lt;td&gt;Often used the same way as save.&lt;/td&gt;
&lt;td&gt;store_json(), store_order()&lt;/td&gt;
&lt;td&gt;save&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;disable&lt;/td&gt;
&lt;td&gt;586M&lt;/td&gt;
&lt;td&gt;Often used to configure a resource an unavailable or inactive state.&lt;/td&gt;
&lt;td&gt;disable_user()&lt;/td&gt;
&lt;td&gt;hide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;hide&lt;/td&gt;
&lt;td&gt;237M&lt;/td&gt;
&lt;td&gt;Often has the same intention as disable, by hiding it.&lt;/td&gt;
&lt;td&gt;hide_field()&lt;/td&gt;
&lt;td&gt;disable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;split&lt;/td&gt;
&lt;td&gt;276M&lt;/td&gt;
&lt;td&gt;Used when separating parts of a resource.&lt;/td&gt;
&lt;td&gt;split_table(), split_group()&lt;/td&gt;
&lt;td&gt;separate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;separate&lt;/td&gt;
&lt;td&gt;151M&lt;/td&gt;
&lt;td&gt;Often used the same way as the verb split.&lt;/td&gt;
&lt;td&gt;separate_table(), separate_group()&lt;/td&gt;
&lt;td&gt;split&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;merge&lt;/td&gt;
&lt;td&gt;312M&lt;/td&gt;
&lt;td&gt;Often used when creating a single resource from multiple resource.&lt;/td&gt;
&lt;td&gt;merge_records(),  merge_tables()&lt;/td&gt;
&lt;td&gt;join&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;join&lt;/td&gt;
&lt;td&gt;220M&lt;/td&gt;
&lt;td&gt;It can be used in a same way as merge.&lt;/td&gt;
&lt;td&gt;join_records(),  join_tables()&lt;/td&gt;
&lt;td&gt;merge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Creation&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Verb&lt;/th&gt;
&lt;th&gt;Written&lt;br&gt;on Github&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Confusing&lt;br&gt;synonyms&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;create&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Used when creating a resource.&lt;/td&gt;
&lt;td&gt;create_package(), create_directory()&lt;/td&gt;
&lt;td&gt;make, generate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;make&lt;/td&gt;
&lt;td&gt;797M&lt;/td&gt;
&lt;td&gt;Often used in a same way as create.&lt;/td&gt;
&lt;td&gt;make_package(), make_statement()&lt;/td&gt;
&lt;td&gt;create, generate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;generate&lt;/td&gt;
&lt;td&gt;286M&lt;/td&gt;
&lt;td&gt;Often used in a same way as create.&lt;/td&gt;
&lt;td&gt;generate_directory(), generate_statement()&lt;/td&gt;
&lt;td&gt;create, make&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;copy&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Used when creating a resource with the same structure and data as the original one.&lt;/td&gt;
&lt;td&gt;copy_file(), copy_graph()&lt;/td&gt;
&lt;td&gt;clone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;clone&lt;/td&gt;
&lt;td&gt;147M&lt;/td&gt;
&lt;td&gt;Could be used in a same way as copy.&lt;/td&gt;
&lt;td&gt;clone_file(), clone_graph()&lt;/td&gt;
&lt;td&gt;copy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  3. Establishment&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Verb&lt;/th&gt;
&lt;th&gt;Written&lt;br&gt;on Github&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Confusing&lt;br&gt;synonyms&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;start&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Generally used when initiating an operation.&lt;/td&gt;
&lt;td&gt;start_listening()&lt;/td&gt;
&lt;td&gt;begin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;begin&lt;/td&gt;
&lt;td&gt;342M&lt;/td&gt;
&lt;td&gt;Often used in a same way as start.&lt;/td&gt;
&lt;td&gt;begin_listening()&lt;/td&gt;
&lt;td&gt;start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;open&lt;/td&gt;
&lt;td&gt;854M&lt;/td&gt;
&lt;td&gt;Used when changing state of a resource to make it accessible or usable.&lt;/td&gt;
&lt;td&gt;open_file()&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  4. Obtainment&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Verb&lt;/th&gt;
&lt;th&gt;Written&lt;br&gt;on Github&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Confusing&lt;br&gt;synonyms&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;get&lt;/td&gt;
&lt;td&gt;2B&lt;/td&gt;
&lt;td&gt;Generally used to obtain a resource.&lt;/td&gt;
&lt;td&gt;get_data(),  get_store_id()&lt;/td&gt;
&lt;td&gt;fetch, retrieve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fetch&lt;/td&gt;
&lt;td&gt;146M&lt;/td&gt;
&lt;td&gt;Can be used in a same way as get.&lt;/td&gt;
&lt;td&gt;fetch_data(), fetch_store_id()&lt;/td&gt;
&lt;td&gt;get, retrieve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;retrieve&lt;/td&gt;
&lt;td&gt;116M&lt;/td&gt;
&lt;td&gt;Can be used in a same way as get or fetch&lt;/td&gt;
&lt;td&gt;retrieve_data(), retrieve_store_id()&lt;/td&gt;
&lt;td&gt;get, fetch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;read&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Used when acquiring data from a source.&lt;/td&gt;
&lt;td&gt;read_file()&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;find&lt;/td&gt;
&lt;td&gt;672M&lt;/td&gt;
&lt;td&gt;Used when looking for an unknown data in a container.&lt;/td&gt;
&lt;td&gt;find_element(), find_keyword()&lt;/td&gt;
&lt;td&gt;search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;search&lt;/td&gt;
&lt;td&gt;438M&lt;/td&gt;
&lt;td&gt;Generally used in a same way as find. It may refer to look for an unknown data from multiple containers.&lt;/td&gt;
&lt;td&gt;search_element(), search_keyword()&lt;/td&gt;
&lt;td&gt;find&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;close&lt;/td&gt;
&lt;td&gt;492M&lt;/td&gt;
&lt;td&gt;Used when changing state of a resource to make it inaccessible or unusable.&lt;/td&gt;
&lt;td&gt;close_file()&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  5. True or False Statement&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Verb&lt;/th&gt;
&lt;th&gt;Written&lt;br&gt;on Github&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;is&lt;/td&gt;
&lt;td&gt;3B&lt;/td&gt;
&lt;td&gt;Used when defining state of a resource.&lt;/td&gt;
&lt;td&gt;Method: is_available(), is_correct()&lt;br&gt;Variables: name_is_available, date_is_correct&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;has&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Used to define whether a resource contains a certain data.&lt;/td&gt;
&lt;td&gt;Method: has_name(), has_date()&lt;br&gt;Variables: person_has_name, course_has_date&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;can&lt;/td&gt;
&lt;td&gt;2B&lt;/td&gt;
&lt;td&gt;Used to define a certain ability of a resource.&lt;/td&gt;
&lt;td&gt;can_load(), can_create()&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;should&lt;/td&gt;
&lt;td&gt;1B&lt;/td&gt;
&lt;td&gt;Used to define a certain obligation of a resource.&lt;/td&gt;
&lt;td&gt;should_render(), should_print_message()&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  6. Conclusion&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Writing clean code is not a skill that we can obtain overnight. But at the same time, I believe that we can improve the quality of code significantly and constantly by learning the wisdom of other people's clean code. To write this bost, I gained so many ideas from the book &lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship-ebook/dp/B001GSTOAM"&gt;Clean Code written by Robert C. Martin&lt;/a&gt; and many codes on Github. I especially recommend the book for anyone who is just started coding. Many of the contents might seem going too far for newbies, but I am certain that this book will be my forever reference for my career as a developer. &lt;/p&gt;

&lt;p&gt;Thanks to these people who share their own hard work!&lt;/p&gt;

&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:6771886321091821568/"&gt;@Maiko Miyazaki&lt;/a&gt; or Twitter &lt;a href="https://twitter.com/MaikoMiyazaki"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Focus on being FAST at getting work done rather than Quality or Quantity.</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 07 Mar 2021 00:08:25 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/can-t-choose-quality-or-quantity-focusing-on-speed-would-be-the-solution-as-a-junior-dev-21c5</link>
      <guid>https://forem.com/maikomiyazaki/can-t-choose-quality-or-quantity-focusing-on-speed-would-be-the-solution-as-a-junior-dev-21c5</guid>
      <description>&lt;p&gt;Have you ever been in a situation where you cannot tell which is more important -- Quality or Quantity? Or, have you felt that you never fulfil quality nor quantity on your tasks?&lt;/p&gt;

&lt;p&gt;I have. In many situations, including but not limited to college tasks, freelance work, and blog posts. But I've never been happy with choosing one of the other simply because sometimes you need both quality and quantity.&lt;/p&gt;

&lt;p&gt;So how can we overcome this contradiction? &lt;/p&gt;

&lt;p&gt;As you can see in the title, &lt;strong&gt;focusing on speed rather than quality or quantity&lt;/strong&gt; would be the solution.&lt;/p&gt;

&lt;p&gt;In the former section of this article, you'll know &lt;strong&gt;why SPEED is more important than quality or quantity&lt;/strong&gt;. &lt;br&gt;
In the latter section, you'll see &lt;strong&gt;3 concrete tips&lt;/strong&gt; to speed up.&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%2Fqdxnz27z7spux4h0pt1y.jpg" 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%2Fqdxnz27z7spux4h0pt1y.jpg" alt="Speed is the key"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SPEED is the key?
&lt;/h2&gt;

&lt;p&gt;If we have your own strategy to speed up your tasks, then &lt;strong&gt;we'll be able to change your focus on quality or quantity easily depending on the requirements&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Although we often hear the Quality vs Quantity debate, it's not that straight forward in a real-life. For instance, your team may tend to value quality over quantity, but one of your bosses might think highly of quantity rather than quality. The same is applicable to clients. We are required to be flexible.&lt;/p&gt;

&lt;p&gt;Moreover, if you are a junior developer who does not have experience in the industry, you might find yourself lack of skills to fulfil neither quality nor quantity.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But what if we have our own strategy to complete tasks faster?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If we can focus on speed, that means &lt;strong&gt;we'll be able to complete a task faster than we used to be. After completion, we'll be able to ask what they are looking for further from us, either quality or quantity&lt;/strong&gt;. Because you now have extra time, you'll be able to improve it further as required.&lt;/p&gt;

&lt;p&gt;This is the main goodness of focusing on SPEED.&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%2F25ulz0yz1wmpg3kh4z7y.jpg" 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%2F25ulz0yz1wmpg3kh4z7y.jpg" alt="speed up"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to SPEED UP?
&lt;/h2&gt;

&lt;p&gt;There are three easiest principles to improve the speed of your tasks. &lt;br&gt;
&lt;strong&gt;Provide answer right away&lt;/strong&gt;, &lt;strong&gt;Start right away&lt;/strong&gt; and &lt;strong&gt;Put forward earlier&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;We may think that it is not easy. But for us, these three ways are the easiest ones to achieve higher speed on tasks since it does not require skills but just mindset.&lt;/p&gt;

&lt;p&gt;Moreover, they are the only ways to be faster than our counterparts who are more experienced than us. They can for sure complete tasks earlier than us if we start at the same time on a task.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Provide answer right away&lt;/strong&gt;, &lt;strong&gt;Start right away&lt;/strong&gt; and &lt;strong&gt;Put forward earlier&lt;/strong&gt;.&lt;/em&gt; These principles can be the best way to achieve a higher speed on tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Provide an answer right away
&lt;/h3&gt;

&lt;p&gt;By answering right away, we'll be able to remove obstacles as early stage as possible.&lt;/p&gt;

&lt;p&gt;In many situations, you might feel you need several hours to give some answer. But such a slight delay can get bigger. Even if that's not the case, these delays do not give a positive impression to the person who is waiting for your answer.&lt;/p&gt;

&lt;p&gt;The good news is that it can be eliminated easily by answering right away and tell them what your concern exactly is.&lt;/p&gt;

&lt;p&gt;For instance, imagine you are asked if you want to work on certain tasks or project. But you are not sure if you have the required skills for it.&lt;/p&gt;

&lt;p&gt;Even though you may feel you need some time to give an answer, tell them right away some kind of answers. It could be letting them know the date you can give the final answer, or telling them that you want to do it but you are not sure with certain skills. &lt;/p&gt;

&lt;p&gt;The point is to &lt;strong&gt;share your circumstances and ask for help as early as possible&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By doing so, your boss or client can provide you with support as early as possible and you don't need to waste your time considering on your own.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Start right away
&lt;/h3&gt;

&lt;p&gt;If we start working on a task on the day we were asked to do it, we have a chance to be able to complete it faster than our experienced counterpart. &lt;/p&gt;

&lt;p&gt;In other words, we will not be able to reach a higher standard in quality nor quantity if we don't start working on it earlier.&lt;/p&gt;

&lt;p&gt;This might seem very simple and obvious, but many people, including me, tend to underestimate the power of starting early ending up procrastinate. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start working on the task on the day you are asked to do it, regardless of the deadline.&lt;/strong&gt; If we could manage to start working on the tasks earlier, then we can be faster. It's that simple.&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%2Fx4itv29bm9n3hjzdph2w.jpeg" 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%2Fx4itv29bm9n3hjzdph2w.jpeg" alt="Which is better for your client and team member?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Put forward earlier
&lt;/h3&gt;

&lt;p&gt;By putting forward earlier, you'll have a chance to ask for feedback if you should brush up on quality or quantity by the actual deadline. This mindset is vital to have if we are newbies in the field.&lt;/p&gt;

&lt;p&gt;Have you ever had this experience -- looking back at your own work that you have spent a long, long time to achieve higher quality, but when you look at it now, the quality is shite? Or you thought you did very well on assessment but it turns out not as good as you expected?&lt;/p&gt;

&lt;p&gt;Because we don't have much experience, we oftentimes misevaluate the quality or quantity of our own work.&lt;/p&gt;

&lt;p&gt;If we could &lt;strong&gt;put forward our work earlier than the deadline, then we'll be able to ask opinions on where to improve, quality or quantity as required.&lt;/strong&gt;&lt;/p&gt;




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

&lt;p&gt;All these tips might sound difficult, but for people in a junior position, it is much easier than trying to focus only on improving quality or quantity.&lt;/p&gt;

&lt;p&gt;I think of my ability to learn things slower than other people and often find myself focusing too much on the quality. I was always in a hurry to catch up with other people.&lt;/p&gt;

&lt;p&gt;Then I came across these principles in a book called "内定者への手紙(A letter for our new employees)" written by &lt;a href="https://twitter.com/yuigak" rel="noopener noreferrer"&gt;Yuiga Kitano&lt;/a&gt; and realized I was underestimating these essence.&lt;/p&gt;

&lt;p&gt;Since I keep these three principles in mind and focusing on speeding up on tasks, I feel much more confident and have more time brushing up on my work.&lt;/p&gt;

&lt;p&gt;As an apprentice, I am going to keep this mindset while I'm in on-the-job training so that I can grow as fast as possible.&lt;/p&gt;

&lt;p&gt;Thanks for reading. If you have any opinion or question, please leave a comment below! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:6771886321091821568/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt; or Twitter &lt;a href="https://twitter.com/MaikoMiyazaki" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>todayilearned</category>
      <category>productivity</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Creating Class diagram - 3 basic steps to make it easier</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 28 Feb 2021 20:13:23 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/creating-class-diagram-3-basic-steps-to-make-it-easier-2nc4</link>
      <guid>https://forem.com/maikomiyazaki/creating-class-diagram-3-basic-steps-to-make-it-easier-2nc4</guid>
      <description>&lt;p&gt;A class diagram could play a key role in a solid software design. However, I hardly knew where to start when it comes to the class diagram even though I take the time to analyze requirements.&lt;/p&gt;

&lt;p&gt;In this article, we will discuss steps to discover the path to create a class diagram from a scenario.&lt;/p&gt;

&lt;p&gt;To summerise, we will go through these steps:&lt;/p&gt;

&lt;p&gt;0️⃣ Our scenario&lt;br&gt;
1️⃣ Write user stories&lt;br&gt;
2️⃣ Create CRC cards&lt;br&gt;
3️⃣ Translate CRC cards into a class diagram&lt;br&gt;
4️⃣ Conclusion&lt;/p&gt;

&lt;p&gt;Let's get started 😊&lt;/p&gt;

&lt;h2&gt;
  
  
  O. Our scenario&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Assuming we have a client who owns 5 cafes and a kitchen where kitchen staff make food items every morning for all shops. The system they need is food ordering software where each shop manager submits food orders for the next few days and the kitchen staff view them. We have a report that summarises objectives, criteria, all the requirements and limitations.&lt;/p&gt;

&lt;p&gt;Our goal, for now, is to create a class diagram. But can we start drawing by looking at the report? As long as the report is well organized already aiming to create a class diagram, or if we are experienced, I assume we can. Otherwise, we may want to start by writing &lt;strong&gt;user stories&lt;/strong&gt; that help us ensure to meet each requirement.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Write user stories&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;A user story looks like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As an admitted user, I want to add an item with quantity to my order list so that an admitted user can view them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Point is to write from the perspective of end-users so that verbs are in the active forms. If we fix the sentence in the &lt;strong&gt;"As a ... , I want to ... so that ... ."&lt;/strong&gt; form, we can find important information easily. "so that" part can be eliminated if the objective is obvious.&lt;/p&gt;

&lt;p&gt;I personally like writing user stories on Evernote or Spreadsheet, because user stories can be moved around to organize with no hassle.&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%2Fcpe8ypmdszr45thgyics.gif" 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%2Fcpe8ypmdszr45thgyics.gif" alt="Organizing user stories"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can identify objects when looking at &lt;strong&gt;nouns&lt;/strong&gt; in the user stories like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"As an &lt;strong&gt;admitted user&lt;/strong&gt;, I want to add an &lt;strong&gt;item&lt;/strong&gt; with quantity to my &lt;strong&gt;order list&lt;/strong&gt; so that an &lt;strong&gt;admitted user&lt;/strong&gt; can view them."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And &lt;strong&gt;verbs&lt;/strong&gt; can help identify requirements that the object might have.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"As an admitted user, I want to &lt;strong&gt;add&lt;/strong&gt; an item with quantity to my order list so that an admitted user can &lt;strong&gt;view&lt;/strong&gt; them."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With this sentence, we can say that the &lt;code&gt;order list&lt;/code&gt; object could have the responsibility related to &lt;code&gt;add&lt;/code&gt; and &lt;code&gt;view&lt;/code&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%2F7ynvp53l8n47pbjvd2es.jpg" 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%2F7ynvp53l8n47pbjvd2es.jpg" alt="User stories highlighted"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Assuming the above list includes all the requirements we need to implement. For now, we can simply highlight nouns and verbs, so we can look into details in the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Create CRC cards&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In this section, we'll organize the components that we just highlighted in the user stories. Here we use CRC cards.&lt;/p&gt;

&lt;p&gt;CRC cards are a great way to refine and record the components of the system design. They are like a pre-class diagram. What we need are a pen and physical cards - I personally like to use large size post-it, but we could also use online platforms like Lucidchart.&lt;/p&gt;

&lt;p&gt;A CRC card has three sections:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Class name&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Responsibilities&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collaborators&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Firstly, we'd like to find the &lt;strong&gt;class names&lt;/strong&gt;. Let's look at the first user story on the list.&lt;/p&gt;

&lt;p&gt;"As an &lt;strong&gt;admitted user&lt;/strong&gt;,  I want to &lt;strong&gt;add&lt;/strong&gt; an &lt;strong&gt;item&lt;/strong&gt; to &lt;strong&gt;item list&lt;/strong&gt;. Each &lt;strong&gt;item&lt;/strong&gt; is created with its &lt;strong&gt;name&lt;/strong&gt;, &lt;strong&gt;description&lt;/strong&gt;, &lt;strong&gt;production cost&lt;/strong&gt; and &lt;strong&gt;availability&lt;/strong&gt;."&lt;/p&gt;

&lt;p&gt;In the above sentence, we can see three potential objects: (admitted)user, item, and item list which are all &lt;strong&gt;nouns&lt;/strong&gt;. They can be classes, so create CRC cards with their class names.&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%2Fvk7tymuyxcwgf2a5m16f.jpg" 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%2Fvk7tymuyxcwgf2a5m16f.jpg" alt="CRC cards - class names are defined"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next section is &lt;strong&gt;Responsibilities&lt;/strong&gt;. Here we can focus on &lt;strong&gt;verbs&lt;/strong&gt; in the user stories and consider who is responsible for the action. For instance in the sentence, "add" is the responsibility of the class &lt;code&gt;ItemList&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But when you think about it, it's a bit strange, right? Because in real-life, if you are a user of a box and if you want to put something into it, the activity itself is not the responsibility of the box but rather the users. So why the &lt;code&gt;add&lt;/code&gt; is the responsibility of &lt;code&gt;ItemList&lt;/code&gt;, not the &lt;code&gt;User&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Because &lt;strong&gt;in object-oriented thinking, objects are all self-aware, even if it's not a living thing&lt;/strong&gt;. So we think all objects can &lt;code&gt;do&lt;/code&gt; something too.&lt;/p&gt;

&lt;p&gt;Imagine our &lt;code&gt;ItemList&lt;/code&gt; is a living thing that works very hard for you. If a user tells it to put something into it, they'll do it. If they can do it, you should leave the responsibility to them.&lt;/p&gt;

&lt;p&gt;So the CRC card for the class &lt;code&gt;ItemList&lt;/code&gt; can have a list of items and the ability to add an item into the list. &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%2Fiav6pqs43y5jc7vkiv44.jpg" 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%2Fiav6pqs43y5jc7vkiv44.jpg" alt="CRC card for ItemList class"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, we'll find &lt;strong&gt;Collaborators&lt;/strong&gt;. For &lt;code&gt;ItemList&lt;/code&gt; class, a collaborator can be &lt;code&gt;Item&lt;/code&gt; because it's the object that will be added in the &lt;code&gt;ItemList&lt;/code&gt; using the &lt;code&gt;add&lt;/code&gt; activity. Therefore they are collaborators to each other.&lt;/p&gt;

&lt;p&gt;While creating CRC cards, it is good practice to look at the collaborators' section and place the cards next to each other if they have a relationship. We can move around as you add new information. &lt;/p&gt;

&lt;h2&gt;
  
  
  3.Translate CRC cards into a class diagram&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;When we have covered most of the nouns and verbs on CRC cards, we can move on to translating them into a class diagram. &lt;/p&gt;

&lt;p&gt;It's now much easier to draw it using both user stories and CRC cards. I personally like using &lt;a href="//www.lucidchart.com"&gt;Lucidchart&lt;/a&gt; that helps create clear diagrams easier.&lt;/p&gt;

&lt;p&gt;For instance, I have translated the CRC card to the class like this:&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%2F97zgg49a4mbuwcv188oy.jpg" 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%2F97zgg49a4mbuwcv188oy.jpg" alt="a CRC card translated to class diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Responsibilities in the CRC card such as &lt;em&gt;its name&lt;/em&gt;, &lt;em&gt;description&lt;/em&gt;, &lt;em&gt;production cost&lt;/em&gt;, &lt;em&gt;availability&lt;/em&gt; was included as &lt;strong&gt;attributes&lt;/strong&gt;, and &lt;strong&gt;methods&lt;/strong&gt; were evolved from &lt;em&gt;edit each component&lt;/em&gt; responsibility. Ideas of relationships came from the collaborator section.&lt;/p&gt;

&lt;p&gt;Make sure to cross out each user story as you create related class diagram components -- so that we won't miss out on any requirements.&lt;/p&gt;

&lt;p&gt;If you have difficulties to identify Objects or relationships, I'll highly recommend taking a look at &lt;a href="https://www.coursera.org/learn/object-oriented-design" rel="noopener noreferrer"&gt;Object-Oriented Design course on Coursera&lt;/a&gt; -- You could even learn most of the module by just reading its class note pdf.&lt;/p&gt;

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

&lt;p&gt;Creating a class diagram is something that can help us create a solid software design as well as to communicate with other members of the team or future self, but at the same time, we may not have much time to spend on this activity. Using these small techniques would help us achieve a better result at the end of the day.&lt;/p&gt;

&lt;p&gt;Thank you so much for reading, if you have any thoughts, please leave a comment! In the meantime, please follow me on Linkedin &lt;a href="https://www.linkedin.com/in/maiko-miyazaki-442ab0169/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>todayilearned</category>
      <category>todayisearched</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How to create hourly weather auto-collector using AWS Lambda with Python 🐍</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sat, 20 Feb 2021 12:15:44 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/how-to-create-hourly-weather-auto-collector-using-aws-lambda-with-python-5dko</link>
      <guid>https://forem.com/maikomiyazaki/how-to-create-hourly-weather-auto-collector-using-aws-lambda-with-python-5dko</guid>
      <description>&lt;p&gt;In this post, we'll be creating an hourly weather auto-collector using AWS Lambda. &lt;/p&gt;

&lt;p&gt;This Lambda function will collect the &lt;strong&gt;previous day hourly weather data&lt;/strong&gt; from OpenWeatherMap API, clean it, then upload it on the S3 bucket. &lt;/p&gt;

&lt;p&gt;The weather data will look like this:&lt;br&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%2Fufekpxkumph3vstylkjz.jpg" 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%2Fufekpxkumph3vstylkjz.jpg" alt="Weather data in CSV"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it will be done once a day, so we'll have yesterday's hourly weather data uploaded daily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assuming we already have:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;AWS account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Have an S3 bucket where we will upload the data on&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openweathermap.org/price" rel="noopener noreferrer"&gt;Free version of OpenWeatherMap API key&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Steps we will go through
&lt;/h2&gt;

&lt;p&gt;1️⃣ Create a policy&lt;br&gt;
2️⃣ Create a role&lt;br&gt;
3️⃣ Set up a Lambda Function&lt;br&gt;
4️⃣ Write code to fetch, clean the data from OpenWeatherMap&lt;br&gt;
5️⃣ Install libraries in the same directory&lt;br&gt;
6️⃣Upload the zip file on the Lambda console&lt;br&gt;
7️⃣ Set up CloudWatch&lt;br&gt;
➡️ Done!&lt;/p&gt;

&lt;p&gt;Let's get started 😊&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Create a policy&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;To begin with, we first need to create a policy allowing a role to upload files on our S3 bucket.&lt;/p&gt;

&lt;p&gt;Open your IAM console, and click &lt;code&gt;Policies&lt;/code&gt;, then &lt;code&gt;Create permission&lt;/code&gt; button.&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%2Fjby7bk8m2ka8ybj7r5bg.jpg" 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%2Fjby7bk8m2ka8ybj7r5bg.jpg" alt="Create policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next page, we'll be able to write a policy in JSON format. It should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:PutObject",
           "Recource": "arn:aws:s3:::yourbucketnamehere/*"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When it's ready, click &lt;code&gt;Next: Tags&lt;/code&gt; button, then click the &lt;code&gt;Next&lt;/code&gt; button to review.&lt;/p&gt;

&lt;p&gt;Name the policy and click &lt;code&gt;Create policy&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Create a role&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Now we will create a role that we will attach the policy we just created.&lt;/p&gt;

&lt;p&gt;On the same IAM console, click &lt;code&gt;Roles&lt;/code&gt;, then &lt;code&gt;Create role&lt;/code&gt;.&lt;br&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%2F9j74dil0r8fdmhv2jmhc.jpg" 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%2F9j74dil0r8fdmhv2jmhc.jpg" alt="IAM console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next page, select AWS services as the entity and Lambda as a use case. Click the &lt;code&gt;Permission&lt;/code&gt; button to go to the next page.&lt;br&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%2F2o9pl40rqk737lduoj6m.jpg" 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%2F2o9pl40rqk737lduoj6m.jpg" alt="Create a role"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next page, you can define what permission you are going to give to this role. Search the policy name you have given to the policy we just created.&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%2F6emcgqiu66munsn96whg.jpg" 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%2F6emcgqiu66munsn96whg.jpg" alt="attach policy to the role"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check the policy and click the &lt;code&gt;Next&lt;/code&gt; button. Click the &lt;code&gt;Next&lt;/code&gt; button again to name your role. &lt;/p&gt;

&lt;p&gt;Then click Create role.&lt;/p&gt;

&lt;p&gt;The Lambda function we will be developing in the next step will be allowed to upload files if this role is attached.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Set up Lambda Function&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Next, we will set up our Lambda function.&lt;br&gt;
Open the Lambda console and click &lt;code&gt;Create&lt;/code&gt; button.&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%2Frw8lq6bhtos1tehllcbs.jpg" 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%2Frw8lq6bhtos1tehllcbs.jpg" alt="Lambda console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select &lt;code&gt;Author from scratch&lt;/code&gt;, and enter the Function name you like. In this tutorial, we will use Python3.8.&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%2Fwonl9uxlaxrq70bqpw7q.jpg" 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%2Fwonl9uxlaxrq70bqpw7q.jpg" alt="create lambda function page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the Permissions section, select &lt;code&gt;Use an existing role&lt;/code&gt;. Then choose your role we just created. When it's done, we can click the &lt;code&gt;Create Function&lt;/code&gt; button.&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%2Fyo16l2wn865mv0dyl2lg.jpg" 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%2Fyo16l2wn865mv0dyl2lg.jpg" alt="Lambda function permissions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we could attempt writing function code on the page, but most of our essential libraries cannot be imported through the Lambda function.&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%2Fwsz9opugwd65j9b8gqd8.jpg" 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%2Fwsz9opugwd65j9b8gqd8.jpg" alt="Lambda function attempt"&gt;&lt;/a&gt;&lt;/p&gt;
Attempt to write code



&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%2Fzboyp783csgw9125qc56.jpg" 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%2Fzboyp783csgw9125qc56.jpg" alt="failed"&gt;&lt;/a&gt;&lt;/p&gt;
Unable to import modules.



&lt;p&gt;Therefore we will first need to create the &lt;code&gt;lambda_function.py&lt;/code&gt; file locally and install the necessary libraries on the same directory.&lt;/p&gt;


&lt;h2&gt;
  
  
  4. Write code to fetch, clean the data from OpenWeatherMap&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Ok, now we will write code to clean the weather data fetched from OpenWeatherMap API.&lt;/p&gt;

&lt;p&gt;Create a folder locally with &lt;code&gt;lambda_function.py&lt;/code&gt; file in it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step1: Get the data
&lt;/h3&gt;

&lt;p&gt;We start by getting the hourly weather data in a certain location.&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;lambda_function.py&lt;/code&gt; file, firstly import all the necessary libraries and define &lt;code&gt;lambda_handler&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timezone&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;lambda_handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;## We will start writing code here
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the &lt;code&gt;lambda_handler&lt;/code&gt; function, we'll fetch weather data from OpenWeatherMap. To do so, firstly assign necessary information into variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="n"&gt;api_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your_own_api_key_here&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://api.openweathermap.org/data/2.5/onecall/timemachine&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;yesterday&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;yesterday&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;lat&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;53.349805&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;lon&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-6.26031&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;units&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;metric&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;appid&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The geographical coordinates are set to Dublin, Ireland. Please find out your location by googling &lt;code&gt;longitude and latitude [your location]&lt;/code&gt;. South and East are set to negative.&lt;/p&gt;

&lt;p&gt;Now we will send a request to get hourly weather data for yesterday.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result_json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;result_json&lt;/code&gt; variable, we should have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{'lat': 53.3498,
 'lon': -6.2603,
 'timezone': 'Europe/Dublin',
 'timezone_offset': 0,
 'current': {'dt': 1613668586,
  'sunrise': 1613633820,
  'sunset': 1613670073,
  'temp': 6.92,
  'feels_like': 1.1,
  'pressure': 998,
  'humidity': 76,
  'dew_point': 2.99,
  'uvi': 0.84,
  'clouds': 75,
  'visibility': 10000,
  'wind_speed': 6.17,
  'wind_deg': 240,
  'wind_gust': 12.35,
  'weather': [{'id': 803,
    'main': 'Clouds',
    'description': 'broken clouds',
    'icon': '04d'}]},
 'hourly': [{'dt': 1613606400,
   'temp': 9.62,
   'feels_like': 4.5,
   'pressure': 991,
   'humidity': 81,
   'dew_point': 6.52,
   'clouds': 75,
   'visibility': 10000,
   'wind_speed': 6.17,
   'wind_deg': 160,
   'weather': [{'id': 500,
     'main': 'Rain',
     'description': 'light rain',
     'icon': '10n'}],
   'rain': {'1h': 0.51}},
  {'dt': 1613610000,
   'temp': 9.75,
   'feels_like': 2.49,
   'pressure': 987,
   'humidity': 81,
   'dew_point': 6.65,
   'clouds': 75,
   'visibility': 10000,
   'wind_speed': 9.26,
   'wind_deg': 170,
   'wind_gust': 16.46,
   'weather': [{'id': 500,
     'main': 'Rain',
     'description': 'light rain',
     'icon': '10n'}],
   'rain': {'1h': 0.89}}, .....
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step2: Clean the data
&lt;/h3&gt;

&lt;p&gt;What we want to know is only the hourly data from the JSON data, so we get that part in &lt;code&gt;weather_data&lt;/code&gt; variable using pandas.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json_normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;result_json&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hourly&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&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%2F3wrf1200dfay1rxcor48.jpg" 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%2F3wrf1200dfay1rxcor48.jpg" alt="Weather data normalized"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, what we want to get from this dataframe is only &lt;code&gt;dt&lt;/code&gt; and &lt;code&gt;feels_like&lt;/code&gt;, and the data that are still nested inside the 'weather' column, so we will change the above code into this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json_normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;result_json&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hourly&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;record_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;weather&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;feels_like&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we will get only the necessary data.&lt;br&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%2Fj6z9ds3acohjetvj5zu9.jpg" 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%2Fj6z9ds3acohjetvj5zu9.jpg" alt="Only necessary data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can use these data as it is, but I chose to remove some of the columns as they are redundant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;main&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;icon&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;temp&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;clouds&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we get the minimum required data in the data frame.&lt;br&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%2Feiacwtyt4c860ctjy9iv.jpg" 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%2Feiacwtyt4c860ctjy9iv.jpg" alt="Cleaned data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We would also like the &lt;code&gt;dt&lt;/code&gt; column as easy-to-read format, so we will change it too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromtimestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# we will also assign date as a part of file name later on.
&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%m-%d-%Y&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&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%2Fbjzg56mpbx953dpc4krw.jpg" 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%2Fbjzg56mpbx953dpc4krw.jpg" alt="timestamp into datetime"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We could also change the format to &lt;code&gt;"%m/%d/%Y %H:%M:%S"&lt;/code&gt; if you'd like.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%m/%d/%Y %H:%M:%S&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&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%2Fvjk1y4hqvtjd9bsbhj38.jpg" 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%2Fvjk1y4hqvtjd9bsbhj38.jpg" alt="date format changed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, we don't want the data from 0:00 to 5:00, 21:00 to 23:00, so we'll get rid of them as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;:])&lt;/span&gt;
&lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&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%2F1cim97v8r3y9yvj09p4e.jpg" 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%2F1cim97v8r3y9yvj09p4e.jpg" alt="hourly weather data from 6am to 8pm"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step3: Write a file on the S3 bucket
&lt;/h3&gt;

&lt;p&gt;Now we will write the data into a file and upload it on the S3 bucket.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Convert&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="n"&gt;into&lt;/span&gt; &lt;span class="n"&gt;CSV&lt;/span&gt;
&lt;span class="n"&gt;csv_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s3&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your_bucket_name_here&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{}.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/{}.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;w&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;csv_writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;delimiter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;csv_reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;csv_reader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# each row looks like this..
&lt;/span&gt;        &lt;span class="c1"&gt;# ['id', 'dt', 'feels_like']
&lt;/span&gt;        &lt;span class="c1"&gt;# ['801', '02/18/2021 06:00:00', '-2.49']
&lt;/span&gt;        &lt;span class="c1"&gt;# ['801', '02/18/2021 07:00:00', '-1.84']....
&lt;/span&gt;        &lt;span class="c1"&gt;# write each row on f using csv_writer
&lt;/span&gt;        &lt;span class="n"&gt;csv_writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writerow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upload_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/{}.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Install libraries in the same directory&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In AWS Lambda, many libraries cannot be imported therefore we need to have them in the same directory where we have the &lt;code&gt;lambda_function.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For our lambda function, we need to have NumPy, Pandas and Requests installed.&lt;/p&gt;

&lt;p&gt;I have found &lt;a href="https://korniichuk.medium.com/lambda-with-pandas-fd81aa2ff25e" rel="noopener noreferrer"&gt;this article&lt;/a&gt; extremely helpful, so please have a look if you'd like to know the way step by step.&lt;/p&gt;

&lt;p&gt;After installing all the libraries, we need to compress all the file. I have mine as &lt;code&gt;archive.zip&lt;/code&gt; but the name doesn't really matter.&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%2Fz9m7upesnvy6n1i8lh51.jpg" 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%2Fz9m7upesnvy6n1i8lh51.jpg" alt="my files are ready to go"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Upload the zip file on the Lambda console&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In your lambda console, we'll be able to find &lt;code&gt;Upload a zip file&lt;/code&gt; button inside the &lt;code&gt;Actions&lt;/code&gt; dropdown. Up load your zip file from there.&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%2Fz229eq7xqbhmoajvao7p.jpg" 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%2Fz229eq7xqbhmoajvao7p.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it's done, we can run a test from the &lt;code&gt;Test&lt;/code&gt; button that is located top-right of the page. You'll need to configure the test event, but you don't have to do much here, so just name the test and hit &lt;code&gt;Create&lt;/code&gt;. Then hit the &lt;code&gt;Test&lt;/code&gt; again.&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%2Fdp6c7983v8fexp2ln1a6.jpg" 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%2Fdp6c7983v8fexp2ln1a6.jpg" alt="Test Run successful"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sweet! It says the test has run successfully.&lt;br&gt;
Let's see if the CSV file is correctly saved in the S3 bucket.&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%2Fb1e8ohhrlg6gxo7meph5.jpg" 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%2Fb1e8ohhrlg6gxo7meph5.jpg" alt="CSV file is saved on S3 bucket"&gt;&lt;/a&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%2Fwa6vcsrsvy3mvqtjnp67.jpg" 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%2Fwa6vcsrsvy3mvqtjnp67.jpg" alt="CSV file that are uploaded from lambda function"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It seems the file is uploaded correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Set up CloudWatch&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Setting Cloudwatch for our lambda function enables the function to run automatically.&lt;/p&gt;

&lt;p&gt;Let's open the CloudWatch console. Click the &lt;code&gt;Create rule&lt;/code&gt; button.&lt;br&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%2Fpphjeo9yaim8lhgi2cmb.jpg" 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%2Fpphjeo9yaim8lhgi2cmb.jpg" alt="CloudWatch console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Event Source section, select &lt;code&gt;Schedule&lt;/code&gt; and set our desired interval. I'll set it to run once a day.&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%2Fjqpcl0noe5a4yhkn0h79.jpg" 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%2Fjqpcl0noe5a4yhkn0h79.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Target section, select &lt;code&gt;Lambda function&lt;/code&gt; and choose our function name from the list. Hit the &lt;code&gt;Configure details&lt;/code&gt; button.&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%2Fzw1uimld1gxcacyglw84.jpg" 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%2Fzw1uimld1gxcacyglw84.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name your CloudWatch rule on the next page, and hit &lt;code&gt;Create rule&lt;/code&gt; button.&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%2Ffq86tbtwkkabr1cd4194.jpg" 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%2Ffq86tbtwkkabr1cd4194.jpg" alt="CloudWatch successfully set"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perfect!&lt;/p&gt;

&lt;p&gt;Check if your function was run as soon as you created the CloudWatch rule as well as running as your expected interval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete code in the lambda_function.py
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timezone&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;lambda_handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your_openweathermap_api_key_here&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://api.openweathermap.org/data/2.5/onecall/timemachine&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="n"&gt;yesterday&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;yesterday&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;lat&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;53.349805&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;lon&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-6.26031&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;units&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;metric&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;appid&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;# Fetch hourly weather data in Dublin from OpenWeatherMap API
&lt;/span&gt;    &lt;span class="n"&gt;input_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;result_json&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="c1"&gt;# Flatten and clean hourly weather data
&lt;/span&gt;    &lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json_normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;result_json&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hourly&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;record_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;weather&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                    &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;temp&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;feels_like&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;clouds&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;main&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;description&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;icon&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;temp&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;clouds&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromtimestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%m-%d-%Y&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%m/%d/%Y %H:%M:%S&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;:])&lt;/span&gt;
    &lt;span class="n"&gt;weather_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="n"&gt;csv_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;#call your s3 bucket
&lt;/span&gt;    &lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s3&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your_bucket_name_here&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{}.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/{}.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;w&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;csv_writer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;delimiter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;csv_reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="c1"&gt;# Iterate over each row in the csv using reader object
&lt;/span&gt;        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;csv_reader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# row variable is a list that represents a row in csv
&lt;/span&gt;            &lt;span class="n"&gt;csv_writer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writerow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;#upload the data into s3
&lt;/span&gt;    &lt;span class="n"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upload_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/{}.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Thanks for reading!
&lt;/h2&gt;

&lt;p&gt;If you have any ideas to improve the function, please leave your view in the comment! I would truly appreciate it 😊 In the meantime, follow me on Linkedin &lt;a href="https://www.linkedin.com/in/maiko-miyazaki-442ab0169/" rel="noopener noreferrer"&gt;@Maiko Miyazaki&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://korniichuk.medium.com/lambda-with-pandas-fd81aa2ff25e" rel="noopener noreferrer"&gt;AWS Lambda with Pandas and NumPy by Ruslan Korniichuk&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=vf1m1ogKYrg" rel="noopener noreferrer"&gt;AWS Lambda with Pandas and NumPy|Pandas &amp;amp; AWS Lambda|Pandas Lambda with Python3 by BidDataOnlineSchool&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>todayilearned</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>First meeting with a client? Knowing requirement gathering techniques makes a difference</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 14 Feb 2021 18:53:02 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/first-meeting-with-a-client-knowing-requirement-gathering-techniques-makes-a-difference-1p6b</link>
      <guid>https://forem.com/maikomiyazaki/first-meeting-with-a-client-knowing-requirement-gathering-techniques-makes-a-difference-1p6b</guid>
      <description>&lt;p&gt;When we have a project to develop a system, we would be gathering requirements before diving into &lt;a href="https://dev.to/maikomiyazaki/3-main-benefits-of-feasibility-study-27e"&gt;feasibility study&lt;/a&gt;. Whether it is for a client or for ourselves.&lt;/p&gt;

&lt;p&gt;Assuming we have received an email from an education provider saying that they are looking to develop their own application system and asking if we can develop them. The first thing we want to know is if that's feasible to develop, so we sent them back an email to schedule a meeting in several days.&lt;/p&gt;

&lt;p&gt;At this point, let's say we already have some ideas on the outline of the system and get excited about the project. Probably, we'll be saying in our mind, "&lt;em&gt;Oh, maybe we can use the new technology that is popular these days.&lt;/em&gt;" or "&lt;em&gt;Perfect! This is a great opportunity to use the programming languages that we've been interested in&lt;/em&gt;".&lt;/p&gt;

&lt;p&gt;So, what will we do in the first meeting? Will we tell them about our ideas and what we are capable of?&lt;/p&gt;

&lt;p&gt;Not quite. That's actually what we should avoid doing. What we must to do is to &lt;strong&gt;focus on being an active listener&lt;/strong&gt; and &lt;strong&gt;gather all the information including underlying needs&lt;/strong&gt;. Requirements gathering techniques will help us achieve it. &lt;/p&gt;

&lt;p&gt;But why do we have to do that? Why not jump into the feasibility study right away?&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%2Fi%2Ftrvu7adl3ly7tf0fssd3.jpg" 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%2Fi%2Ftrvu7adl3ly7tf0fssd3.jpg" alt="running requirement gathering"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasons for running requirement gathering
&lt;/h2&gt;

&lt;p&gt;There are many reasons that we need to allocate time for gathering requirements. &lt;/p&gt;

&lt;h4&gt;
  
  
  1. Help to discover important requirements that could influence the development cycle.
&lt;/h4&gt;

&lt;p&gt;Imagine we decided to start designing the online application system for the education provider mentioned earlier. The head of the organization told us to implement specific functionalities, so we simply implemented them. &lt;/p&gt;

&lt;p&gt;But what if she/he didn't understand what the senior management team really needs? What if we discover that the system is being used mostly by the management team, then we need to align the project with the management team's need after deployment? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's not always the case that essential requirements are always evident and visible&lt;/strong&gt;, that's why we need to take time to gather requirements from all users.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Solve possible misinformation or misconception
&lt;/h4&gt;

&lt;p&gt;We, humans, are not perfect. Especially when it comes to understanding others, it requires certain skills and techniques. &lt;/p&gt;

&lt;p&gt;As English is not my first language, I often find myself misunderstanding what others really meant more often than when I communicate with others in Japanese. So, at least to me, when misunderstanding each other, we have a different definition of certain words in mind. &lt;/p&gt;

&lt;p&gt;This is applicable especially in the IT field where you communicate with people who do not have the same understanding of technology.&lt;/p&gt;

&lt;p&gt;Assuming we are aiming to create a sensible system for their business, then it's not for ourselves, therefore we need to &lt;strong&gt;avoid misunderstanding what the client means at all cost&lt;/strong&gt; by having jargon-free conversations.&lt;/p&gt;

&lt;p&gt;Because small things add up to a big difference.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Put their mind to the systems development.
&lt;/h4&gt;

&lt;p&gt;It is important the client feel they are heard and understand that their involvement and voices are crucial for the successful project. &lt;/p&gt;

&lt;p&gt;For instance, if we talk too much about our vision or explaining about new technologies instead of listening to the client, they are more likely to feel that their opinions are not in the highest priority, or they may conclude that they don't need to put their mind to it because we sound like knowing enough about the project. &lt;/p&gt;

&lt;p&gt;Requirement gathering techniques can help us to avoid deepening the gap between the client and the development team's perspective and motivation.&lt;/p&gt;

&lt;p&gt;To sum up, the effect of gathering requirements should not be underestimated and the techniques should be learned and used effectively.&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%2Fi%2Fbttdf482klu3fkplidp2.jpg" 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%2Fi%2Fbttdf482klu3fkplidp2.jpg" alt="Preparation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 0: Preparation
&lt;/h2&gt;

&lt;p&gt;Now we will discuss the techniques useful for the meetings and interviews. The first thing is preparation.&lt;/p&gt;

&lt;p&gt;What we do here is to &lt;strong&gt;research the client as much as possible&lt;/strong&gt;. When you think about an interviewer you believe they are highly skilled, you may surprise how much they have given research about the interviewee. If I were to be interviewed by them, I would be more open-minded to answer questions.&lt;/p&gt;

&lt;p&gt;To achieve the same effect on our client, we could gather information online but recommended to &lt;strong&gt;review documents if they are available from the client&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What we aim here is to examine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Company's objectives and goals&lt;/li&gt;
&lt;li&gt;Organization structure&lt;/li&gt;
&lt;li&gt;Their information systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Getting ideas about these topics will enable us to &lt;strong&gt;identify what kind of questions we should ask the specific person&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After the research, interview questions can be listed and organized carefully, so the questions are complete and can be answered without confusion.&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%2Fi%2F4z875hpg64h5d4nizncu.jpg" 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%2Fi%2F4z875hpg64h5d4nizncu.jpg" alt="Open-Ended Questions"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 1: Open-Ended Questions
&lt;/h2&gt;

&lt;p&gt;Open-Ended questions let the &lt;strong&gt;interviewee talk about the topic freely&lt;/strong&gt; rather than providing a specific answer. For instance, questions such as &lt;em&gt;"What are your reactions to the current/new online application system?"&lt;/em&gt; can be one of them.&lt;/p&gt;

&lt;p&gt;This style of questions is especially helpful if we want to delve into the topic and look into the underlying issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 2: Closed Questions
&lt;/h2&gt;

&lt;p&gt;Closed questions, on the other hand, is the way to &lt;strong&gt;clarify the ideas and specific answers&lt;/strong&gt;. Questions can be answered with "Yes/No", "Agree/Disagree" or specific numbers. &lt;/p&gt;

&lt;p&gt;For example, "&lt;em&gt;Do you agree or disagree that the current system is obstructing your productivity?&lt;/em&gt;" can lead the interviewee to one of the other answers.&lt;/p&gt;

&lt;p&gt;We can also alter the above question to be more specific, by asking "What specifically is the problem on the current system that is obstructing your productivity?". &lt;/p&gt;

&lt;p&gt;This can be altered depending on how much you already asked or understand the interviewee's perspective about the topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of Open-Ended and Closed questions
&lt;/h2&gt;

&lt;p&gt;There are possible disadvantages if we use only one of the other style of the question mentioned above. &lt;/p&gt;

&lt;p&gt;If Open-Ended questions make up the majority of the questions, it is harder for us to control the interview. Moreover, we may not be able to obtain a sufficient amount of information compared to the time we spent on the interview. &lt;/p&gt;

&lt;p&gt;Oppositely, only asking closed questions may fail to take out detailed information because they could answer single word if we don't delve into it. &lt;/p&gt;

&lt;p&gt;As far as I imagine, it's rare to be using only closed questions in a real conversation, so most of us use mixed styles or open-ended style only. &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%2Fi%2Fao70q13tr6bl7tnjm5vq.jpg" 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%2Fi%2Fao70q13tr6bl7tnjm5vq.jpg" alt="Pyramid Structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 3: Pyramid Structure
&lt;/h2&gt;

&lt;p&gt;In order to prevent falling into a vicious cycle of interviews or meetings, we need to organize the order of questions depending on who we are interviewing.&lt;/p&gt;

&lt;p&gt;Pyramid Structure is one way to organize them. Under this method, the sequence of questions starts from very detailed, often closed type. And then we can gradually broaden the topics.&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%2Fi%2Flkyw70xe2kzp5ta318zp.jpg" 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%2Fi%2Flkyw70xe2kzp5ta318zp.jpg" alt="Pyramid Structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the interviewee is the lower-level users in the current system, then they might need this structure of questions to warm up to the topic. &lt;/p&gt;

&lt;p&gt;A good example is questionnaires, where the level of understanding about the topic may not be the same among respondents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 4: Funnel Structure
&lt;/h2&gt;

&lt;p&gt;Not like the Pyramid, Funnel Structure can start with general questions and gradually narrow the topics, and conclude with the closed type of questions.&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%2Fi%2Fg6uulaqmcctbwkmanfqv.jpg" 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%2Fi%2Fg6uulaqmcctbwkmanfqv.jpg" alt="Funnel Structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This method is especially effective for an interviewee who could have deliberated the topics already. It's likely that the person you see at the first meeting has clear opinions about the topic already, so it might be a good idea to structure questions funnel style.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technique 5: Modelling
&lt;/h2&gt;

&lt;p&gt;Because the requirements can be complicated, it is often difficult to see each component and relationships in a big picture. Especially for the client, it can be challenging.&lt;/p&gt;

&lt;p&gt;Modelling is a diagrammatic way of representing system components enabling us to study the requirements intuitively. &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%2Fi%2Ffzo25947czop7gokqbg0.jpg" 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%2Fi%2Ffzo25947czop7gokqbg0.jpg" alt="Use Case Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UML (Unified Modeling Language) is a common way to create many styles of diagrams in a clear manner. The above image is called Use Case Diagram, which can be created to clarify how different types of users interact with the system.&lt;/p&gt;

&lt;p&gt;In other words, we can summerise the information we collected during the interview by creating diagrams. When it's done, It can be investigated by clients and the development team.&lt;/p&gt;

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

&lt;p&gt;Requirement gathering techniques are mostly about active listening skills, and how we could align perspectives of the client and ourselves. This can be challenging.&lt;/p&gt;

&lt;p&gt;But if we could cover all of the mentioned above, we would be more confident about what we are doing, getting trust from the client while creating a solid base to build a successful project on top of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.w3computing.com/systemsanalysis/open-ended-closed-interview-questions/" rel="noopener noreferrer"&gt;Open-Ended and Closed Type Interview Questions&lt;/a&gt;&lt;br&gt;
&lt;a href="https://tallyfy.com/uml-diagram/" rel="noopener noreferrer"&gt;All You Need to Know About UML Diagrams: Types and 5+ Examples&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/learning/programming-foundations-object-oriented-design-3?trk=share_android_course_learning&amp;amp;shareId=qEw%2FDsfsRbuMnMkKCVhnXw%3D%3D" rel="noopener noreferrer"&gt;Object-Oriented Foundations - Linkedin Learning&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>todayilearned</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>3 Main Benefits of Feasibility Study</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 07 Feb 2021 16:51:30 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/3-main-benefits-of-feasibility-study-27e</link>
      <guid>https://forem.com/maikomiyazaki/3-main-benefits-of-feasibility-study-27e</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;I am participating Female Apprenticeship programme coordinated by FIT since December 2020, and I've been writing posts about what I've learned in the Off-the-job training. In this post, I am going to summarize the main benefits of feasibility study which is a part of the first phase of the software development life cycle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Table of contents
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Benefit 1: Avoid risks to fall a project by the wayside.&lt;/li&gt;
&lt;li&gt;Benefit 2: Avoid reinventing the wheel.&lt;/li&gt;
&lt;li&gt;Benefit 3:  Clarify tasks to discover requirements.&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefit 1: Avoid risks to fall a project by the wayside.&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Whether or not we are developing our own personal project or an app for a client, there are a number of risks that'll lead us to give up the project itself. Running feasibility study should play a key role here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Economical issues&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Economical issues are one of the factors that may force us to cease the project. Let's say, for example, we've been asked to develop a website for your friend, Bob's restaurant, for free. We readily answered that we can do it since we were just beginning to learn web development, so we thought it would be a great opportunity to upskill. We began to create it on our computer locally right away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ydPkrWbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ql0h1at2g9arwml7v0v3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ydPkrWbj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ql0h1at2g9arwml7v0v3.png" alt="Developing a website" width="731" height="738"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, you began to realize that running website costs some money for web servers, domain name and features that Bob requires. So you decided to ask him if he would be able to pay for it, but he replied to us that he cannot afford any of it. What you can do now is to pay it with your money or cease the project. &lt;/p&gt;

&lt;p&gt;If we could run a feasibility study at the very beginning, we could take measures to make a better choice.&lt;/p&gt;

&lt;p&gt;So when running the study, we need to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;What are the required costs?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;How much is the budget?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;If this project fails, could it put the business at risk?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;What is the expected benefit regarding revenue?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Is it a good investment overall?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Technical Issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Other potential risks can arise from technical issues. After few days Bob told us that he can't afford running the website,&lt;br&gt;
he came back and told us that he spared his money. So we restarted creating his website from where we left off. &lt;/p&gt;

&lt;p&gt;We kept working on the project and finally, it was successfully released online. What an achievement!&lt;/p&gt;

&lt;p&gt;However, we didn't know the server can be down if the website got many visitors more than it can manage. The tragedy happened because Bob's restaurant was so popular in recent years so the website became viral very very quickly. Now we need to change the webserver that can maintain the number of visitors that the website has, but it costs some money and time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9BhFHb54--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/l6ud7u7cskq068qvaodn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9BhFHb54--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/l6ud7u7cskq068qvaodn.png" alt="Server failure" width="750" height="793"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we could run a feasibility study at the very beginning, we could choose a suitable server in the first place.&lt;/p&gt;

&lt;p&gt;Therefore, when running the study we need to list up obligations which can be written with should/must. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;The website must be able to maintain .. visitors at once.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Users should be able to send a message from query form.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;_The website must transfer the messages to a certain email address. _&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operational issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like the factors mentioned above, the operational problem should be discovered before we began planning the project. For instance, if we are to develop a sales forecast app for a client who has 5 cafes in town, and they want a system to help each shop to bake pastries just right amount in the right time.&lt;/p&gt;

&lt;p&gt;Assuming we successfully developed and deployed the project but after several weeks we realized that they rarely use the app. The reason was that each shop was very very busy and they only have just enough staff, so no one could manage to go to the office to open the app and check the forecast when they are running for the customers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--70TPTuF0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/a9xxvcahb9fpwh1ptk2m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--70TPTuF0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/a9xxvcahb9fpwh1ptk2m.png" alt="Not working on smart phone" width="764" height="764"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we could run a feasibility study at the very beginning, we could realize this would happen.&lt;/p&gt;

&lt;p&gt;Like the technical issues, we need to list up obligations which can be written with should/must. For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;The system should be used on a tablet or smartphone easily.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The system must be intuitive to understand how to use.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefit 2: Avoid reinventing the wheel.&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In the feasibility study, we can discover resources that can be used for the project. For instance, we need data about sold out items when developing a sales forecast application, so we implemented a form for users to let the system know that the item was sold out. But later on, we discovered that they've been collecting information about soldout items on their cashier system. We could actually fetch the data from there rather than implementing the feature from scratch.&lt;/p&gt;

&lt;p&gt;Inventing the wheel might bring advantages, but it is depending on whether it is intentional or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wR_Pr7Ku--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kxfcx4zicavq2zfyjvym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wR_Pr7Ku--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kxfcx4zicavq2zfyjvym.png" alt="Reinventing the wheel" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On top of that, investigating available resources is vital because we have a deadline in many cases, therefore creating what is already out there should be often avoided. As a result, we will be able to spare time to focus on high-risk requirements.&lt;/p&gt;

&lt;p&gt;In order to identify what's available, we could ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;What the flowchart of the current system looks like?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Where does the current system collect certain data from?&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefit 3:  Clarify tasks to discover requirements.&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Because we now have an exhaustive list of issues is documented, required information and solution are easier to be identified in the next step. In other words, without the feasibility study, we may be less likely / less confident that the requirements are all-inclusive.&lt;/p&gt;

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

&lt;p&gt;Feasibility Study is one of the things I wish I knew about at the very beginning of my freelance web developer journey. I've created many websites for clients and personal projects while teaching myself how to code, but I had always a tough time when it comes to planning and all the process onwards. Shame on me -- I didn't know how vital to take time in understanding if the project itself is worth going forward in terms of technical, operational and economical perspectives. That's one of the reason many of my projects failed to reach deployment. So I believe that knowing why the feasibility study is crucial can be a great starting point to successfully develop projects.&lt;/p&gt;

&lt;p&gt;This investigation can be done as a preliminary investigation, so you could do it at the very first meeting with your client but I would also do it when I come up with personal project ideas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/system_analysis_and_design/system_analysis_and_design_planning.htm"&gt;System Analysis &amp;amp; Design - System Planning - tutorialspoint.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading until the end!&lt;br&gt;
If you have any questions or opinions, please leave a comment 😊&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Why SDLC? -- Things I've learned in off-the-job training</title>
      <dc:creator>Maiko Miyazaki</dc:creator>
      <pubDate>Sun, 31 Jan 2021 09:33:11 +0000</pubDate>
      <link>https://forem.com/maikomiyazaki/things-i-ve-learned-in-off-the-job-training-why-sdlc-2bjh</link>
      <guid>https://forem.com/maikomiyazaki/things-i-ve-learned-in-off-the-job-training-why-sdlc-2bjh</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I am participating Apprenticeship programme coordinated by FIT since December 2020. In the programme, we learn about software development in a college for the first six months (we call it off-the-job training. )and moving onto on-the-job training several days a week.&lt;/p&gt;

&lt;p&gt;If you are interested in how I got hired as an apprentice by a financial service firm in Ireland, please refer to &lt;a href="https://dev.to/maikomiyazaki/started-software-development-apprenticeship-program-in-fit-ireland-og1"&gt;my post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At the moment, we are on the module of Systems Analysis and Design and I am going to summarize what I've learned so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SDLC and who should learn them?
&lt;/h2&gt;

&lt;p&gt;The Software Development Life Cycle is a general term for many SDLC methodologies which are approaches to tactically develop high-quality software.&lt;/p&gt;

&lt;p&gt;Developing a piece of software without strategy is like trying to solve an issue while you don't know what it is nor how to solve it. We may think that we know what we want to create and might be possible to jump into coding without a strategy, but along the way you are likely to face issues such as unexpected cost, prolonging schedule or even loss of motivation.&lt;br&gt;
Understanding SDLC is never more important if we are working in a team, but also on your personal project.&lt;/p&gt;

&lt;p&gt;So if you are a self-taught developer who&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;..wants to develop a personal project successfully&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;..is working as a freelance and want to gain trust from clients&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;..is stuck with your own project because of the budget issue or loss of motivation&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;..started to look for a software development job&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;..wants to develop software in a team&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Learning SDLC methodologies will help you significantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is SDLC like?
&lt;/h2&gt;

&lt;p&gt;All SDLC methodologies not only but focus on these phases:&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Plan, gather and analyse&lt;/strong&gt;&lt;br&gt;
   This phase answers questions like...&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- What are the objectives?

- Who uses the system?

- What functionality do we need?

- How the users use the system?

- Are they feasible to implement? ...etc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;2) &lt;strong&gt;Design&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- How will the software work?

- How will it look? ...etc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;3) &lt;strong&gt;Implement&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- How can they be programmed?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;4) &lt;strong&gt;Test&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Does each unit work?

- Does each unit work when combined as a group?

- Does the full system work when all units are integrated?

- Can the system support the business and users in a real situation? ...etc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;5) &lt;strong&gt;Deploy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;5)&lt;strong&gt;Maintenance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each methodology approaches these phases differently, but the basic idea about each of them are generally similar.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the basic SDLC Models?
&lt;/h2&gt;

&lt;p&gt;There are many more models out there, but in this section, I am going to summerise 4 types of SDLC models namely Waterfall, V-model, Spiral and Agile.&lt;/p&gt;

&lt;h3&gt;
  
  
  Waterfall Model(1956~)
&lt;/h3&gt;

&lt;p&gt;Waterfall methodology is one of the oldest and simplest one amongst the others. It is categorised as a &lt;strong&gt;linear-sequential lifecycle model&lt;/strong&gt;, which means the whole process is divided into separate phases, and each phase of the development has to be completed before moving onto the next one.&lt;/p&gt;

&lt;p&gt;Like the name “Waterfall”, the flow of the development is moving from the top to the bottom -- from analysing requirements to deployment and maintenance phase -- and it doesn’t allow us to go back to the previous phases even if we want to add or alter a requirement. So if we need alteration, we need to start from the very beginning. That being said, we will not be able to see the prototype or working software until the very end of the project, but the advantage is the ease to manage and monitor the whole process for the development team. &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%2Fi%2F0cgdqz2zmi7j7i6r9bnv.jpg" 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%2Fi%2F0cgdqz2zmi7j7i6r9bnv.jpg" alt="Water Model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If all the requirements are very clear and unlikely to change over time, this model enables us to deploy the system in an efficient manner, however, it often not applicable for the larger projects where not all of the requirements might not be transparent in the beginning. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Used in manufacturing and construction industries&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reference:&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Waterfall_model" rel="noopener noreferrer"&gt;Waterfall model - wikipedia&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  V-Model(1980s)
&lt;/h3&gt;

&lt;p&gt;The V-Model is similar to the Waterfall Model since it is a sequential type in which each stage begins only after the previous stage has ended. It also has the same development cycle as the Waterfall, however, &lt;strong&gt;each cycle includes planning for tests&lt;/strong&gt; associated with each phase. In other words, the corresponding testing phase of the development phase is planned in parallel. &lt;/p&gt;

&lt;p&gt;Like the Waterfall Model, the steps go through the business requirement analysis, System design, Architecture design, Module design, and then the team dives into the coding phase. After completing the implementation, it goes through all the testing phases that had been planned beforehand.  &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%2Fi%2Fqlol7zz6u7d4v9mbt2s4.jpg" 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%2Fi%2Fqlol7zz6u7d4v9mbt2s4.jpg" alt="V Model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This methodology allows the management team to decide everything before getting into the coding phase, more precisely than the Waterfall model. In order to function this model, the clarity of the requirements is also vital like the Waterfall Model. For this reason, the V-Model can be only ideal for the smaller projects but can be problematic to apply if the project requires flexibility for the requirements. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Used in medical development field&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reference:&lt;br&gt;
&lt;a href="https://www.tutorialspoint.com/sdlc/sdlc_v_model.htm" rel="noopener noreferrer"&gt;SDLC - V model - tutorialspoint&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/V-Model_(software_development)" rel="noopener noreferrer"&gt;V-model - wikipedia&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Spiral Model(1986)
&lt;/h3&gt;

&lt;p&gt;Unlike these two models above, the Spiral Model does not follow sequential steps but &lt;strong&gt;iterative development&lt;/strong&gt;, which begins by specifying and developing just a part of the system and iteratively enhances the evolving versions until the full system is implemented, thus it won’t be an issue if not all the requirements are crystal clear at the beginning of the process. For this reason, this model can be plausible when the customer or the owner of the system has only a vague idea of the requirements, or the requirements are complicated.&lt;/p&gt;

&lt;p&gt;The advantage of the Waterfall Model - systematic control aspect - is included in this model which is the Identification of a requirement, Engineering, Evaluation and Risk Analysis. Compared to the sequential type of models, the Spiral Model requires &lt;strong&gt;customer evaluation&lt;/strong&gt; in the last part of each iteration, so that customer needs to be able to involve in the development more frequently than the former two models. &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%2Fi%2F2tq3xq7srw3noshp4m99.jpg" 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%2Fi%2F2tq3xq7srw3noshp4m99.jpg" alt="Spiral Model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A typical iteration is somewhere between 6 months and 2 years and it can also be a long-term commitment owing to the addition or changes for requirements overtime. This flexibility can be a disadvantage as the team might be unable to estimate the end of the project, and it requires more attention from the management team as this structure is more complex than the former two models.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Used to develop the early version of Windows in Microsoft.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reference:&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/4632795/difference-between-agile-model-and-spiral-model" rel="noopener noreferrer"&gt;Difference between agile model and spiral model - stackoverflow&lt;/a&gt;&lt;br&gt;
&lt;a href="http://tryqa.com/what-is-spiral-model-advantages-disadvantages-and-when-to-use-it/" rel="noopener noreferrer"&gt;What is Spiral model- advantages, disadvantages and when to use it? - TRY QA&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.intellectsoft.net/blog/spiral-model-sdlc/" rel="noopener noreferrer"&gt;Spiral Model SDLC: Top Choice for Large, High-Risk Software Projects? - intellectsoft&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Agile Model(2001)
&lt;/h3&gt;

&lt;p&gt;The last model that I am going to mention is Agile, which is a &lt;strong&gt;combination of the iterative process&lt;/strong&gt; like the Spiral model with a &lt;strong&gt;focus on process adaptability&lt;/strong&gt;. It produces a working software product at the end of each iteration which may not be true for the Spiral model. &lt;/p&gt;

&lt;p&gt;Every iteration of the Agile model involves cross-functional teams working simultaneously on various areas and these teams are identified as Planning, Requirement Analysis, Design, Engineering, Unit testing and Acceptance Testing. Because of the structure of the model, it doesn’t always require a concrete plan or requirements at the beginning but develops a system through repeated cycles in smaller portions at a time. This style enables us to prioritize developing working systems rather than creating concrete documentation and to be flexible for change rather than following a concrete plan. &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%2Fi%2Fbxwt0ywaq0cf41dpji1l.jpg" 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%2Fi%2Fbxwt0ywaq0cf41dpji1l.jpg" alt="Agile Model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every iteration of the Agile model is typically shorter -- 2 to 4 weeks in most cases, therefore you’ll be able to see and monitor the progress through the working system more frequently. That being said, it can be harder to maintain the development because of the adaptability, therefore a management team plays the key role to maintain the direction of the team at all times. Also, each team must be self-organized, highly collaborative and accountable for their own work. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Used on nearly any large scale project in any industry&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reference: &lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/software-engineering-comparison-between-agile-model-and-other-models/#:~:text=The%20main%20principle%20of%20the%20Spiral%20model%20is%20risk%20handling,but%20customer%20interaction%20is%20less" rel="noopener noreferrer"&gt;Software Engineering | Comparison between Agile model and other models - geeksforgeeks&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Agile_software_development" rel="noopener noreferrer"&gt;Agile software development - wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.wrike.com/project-management-guide/faq/who-uses-agile/" rel="noopener noreferrer"&gt;Who Uses Agile? - Wrike&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;To summarize, the Waterfall and V-Model require strict planning at the beginning of the project, therefore it is often not suitable for many systems that are going to be used in a dynamic environment. This is one of the reasons for not being popular in recent years. On the other hand, the Spiral model or Agile Model can be more sensible for many situations unless you have developed exactly the same system in the past.  So, if I were to build my own development team or develop a software for a client I would adopt Spiral or Agile methodology. Comparing these two methodologies, I would prefer Agile since it lets the team focus on customer satisfaction which I always believe is most important. &lt;/p&gt;

&lt;p&gt;Do you agree? Please share your thoughts in the comments!&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>todayilearned</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
