<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ShoeheyOt</title>
    <description>The latest articles on DEV Community by ShoeheyOt (@shoeheyot).</description>
    <link>https://dev.to/shoeheyot</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%2F1151687%2Ff9a73edb-d251-4cb3-8535-f367d7658c76.png</url>
      <title>DEV Community: ShoeheyOt</title>
      <link>https://dev.to/shoeheyot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shoeheyot"/>
    <language>en</language>
    <item>
      <title>Tailwind Color Configuration Generator</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Thu, 29 May 2025 01:31:04 +0000</pubDate>
      <link>https://dev.to/shoeheyot/tailwind-color-configuration-generator-4lp7</link>
      <guid>https://dev.to/shoeheyot/tailwind-color-configuration-generator-4lp7</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;If you’ve ever customized colors in Tailwind CSS, you probably know the struggle—finding the perfect palette is fun, but turning that into a usable Tailwind config? Not so much.&lt;/p&gt;

&lt;p&gt;That’s why I made a simple tool to help: a Color Palette Generator that not only gives you a nice set of colors, but also spits out a ready-to-use Tailwind config. Just copy, paste, and go.&lt;/p&gt;

&lt;p&gt;No more manually converting hex codes or worrying about naming conventions. Whether you're theming a new project or just want to speed things up, this tool’s designed to save time and keep things smooth. &lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;The generator isn’t just throwing together random shades — it’s built around color theory.&lt;/p&gt;

&lt;p&gt;You start by picking a base color, and then choose a color pattern like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Complementary&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Triadic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Square&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Analogous, and more&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you pick a pattern, the generator creates a palette using that harmony rule. Then it turns those colors into a ready-to-go tailwind.config.js snippet — already formatted and named for easy copy-paste into your project.&lt;/p&gt;

&lt;p&gt;Here is a screen shot of the project, you start from left side and get the snippet in right side like example below:&lt;br&gt;
&lt;a href="https://media2.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%2F1mgnocivtiggt8p0l160.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1mgnocivtiggt8p0l160.png" alt="screen-shot" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example:&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="c1"&gt;// tailwind.config.js&lt;/span&gt;
&lt;span class="nx"&gt;colors&lt;/span&gt; &lt;span class="p"&gt;:{&lt;/span&gt;
  &lt;span class="nl"&gt;primaryLighter&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#eb2b2b&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;primary&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#c91313&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;primaryDarker&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#a10f0f&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;light&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#fce5e5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;dark&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#280404&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;secondary&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#13c913&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;tertiary&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#1313c9&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Frontend
&lt;/h4&gt;

&lt;p&gt;React-ts / Vite / Tailwind CSS&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Vite: It is fast to spin up and reloads instantly while developing. The config is minimal, which keeps things simple and smooth.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tailwind CSS: I like how quick it is to build UI with utility classes. It keeps styles consistent and lets me prototype without leaving my HTML/JSX.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  State &amp;amp; Data
&lt;/h4&gt;

&lt;p&gt;React Query /Zod / Zustand&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Zustand: It is a small and easy-to-use state manager. No boilerplate, just define your store and start using it — perfect for a project like this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Zod: I use Zod to validate color input and keep things safe. It works great with TypeScript and helps prevent weird bugs before they happen.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This was a fun little project to build — not just because I like working with colors, but also because I wanted something practical. Being able to instantly generate a ready-to-paste Tailwind config saves time and helps keep design systems consistent from the start.&lt;/p&gt;

&lt;p&gt;It’s a small tool, but I hope it’s helpful for other developers looking to speed up their workflow or get inspired by different color combinations.&lt;/p&gt;

&lt;p&gt;Github repo : &lt;a href="https://github.com/ShoeheyOt/colorPaletteGenerator-react-ts" rel="noopener noreferrer"&gt;https://github.com/ShoeheyOt/colorPaletteGenerator-react-ts&lt;/a&gt;&lt;/p&gt;



&lt;h3&gt;
  
  
  Future Improvements
&lt;/h3&gt;

&lt;p&gt;There’s still a lot I want to improve:&lt;/p&gt;

&lt;p&gt;UI polish: Right now it’s functional, but not the prettiest. I’d like to refine the layout and make the overall design feel more intuitive and clean.&lt;/p&gt;

&lt;p&gt;Dark mode preview: Seeing how a palette looks in both light and dark themes could be super useful for Tailwind users.&lt;/p&gt;

&lt;p&gt;Copy button UX: The config is easy to copy now, but I might improve feedback (like a toast or animation) so it feels nicer to use.&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>beginners</category>
      <category>react</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Understanding LeetCode Problem #83: Removing Duplicates from Sorted Lists</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Fri, 20 Sep 2024 19:06:39 +0000</pubDate>
      <link>https://dev.to/shoeheyot/understanding-leetcode-problem-83-removing-duplicates-from-sorted-lists-2go2</link>
      <guid>https://dev.to/shoeheyot/understanding-leetcode-problem-83-removing-duplicates-from-sorted-lists-2go2</guid>
      <description>&lt;p&gt;LeetCode problem #83, "Remove Duplicates from Sorted List," is a classic challenge that tests your ability to manipulate linked lists efficiently. In this article, we'll delve into a solution step-by-step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem Statement
&lt;/h2&gt;

&lt;p&gt;Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the modified list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Constraints
&lt;/h2&gt;

&lt;p&gt;The number of nodes in the list is in the range &lt;code&gt;[0, 300]&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;-100 &amp;lt;= Node.val &amp;lt;= 100&lt;/code&gt;&lt;br&gt;
The list is guaranteed to be sorted in ascending order.&lt;br&gt;
Solution Approach&lt;br&gt;
Let's break down the problem-solving process:&lt;/p&gt;

&lt;p&gt;Here is the link of the official.&lt;br&gt;
Link&lt;/p&gt;
&lt;h2&gt;
  
  
  Understand the input structure
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Analyze the constraints&lt;/li&gt;
&lt;li&gt;Implement the solution&lt;/li&gt;
&lt;li&gt;Optimize and refine&lt;/li&gt;
&lt;li&gt;Understanding the Input Structure&lt;/li&gt;
&lt;li&gt;The input is a singly-linked list node defined as follows:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ListNode&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;val&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ListNode&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;ListNode&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;undefined&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="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;next&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;p&gt;Each node contains a value and a reference to the next node in the list.&lt;/p&gt;
&lt;h3&gt;
  
  
  Analyzing the constraints
&lt;/h3&gt;

&lt;p&gt;Ths input node is onlh ascending order which means we don't need to care about making it sorted, focusing on finding duplicate and delete it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Designing an Efficient Algorithm
&lt;/h3&gt;

&lt;p&gt;Our approach will involve a single-pass traversal of the list, identifying and removing duplicate nodes as we go.&lt;/p&gt;
&lt;h3&gt;
  
  
  Implementing the Solution
&lt;/h3&gt;

&lt;p&gt;Let's look at the implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;deleteDuplicates&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ListNode&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ListNode&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;head&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;Let's break down this solution:&lt;/p&gt;

&lt;p&gt;Initializing a current pointer to the head of the list. This allows us to modify the next pointers while still having access to the original head.&lt;/p&gt;

&lt;p&gt;The outer loop &lt;code&gt;while(current)&lt;/code&gt; continues until we reach the end, which means &lt;code&gt;current&lt;/code&gt; becomes &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Inner while loop, while both a)next node is existing and b)value of next node is same as current node, conditions are met, skip the next node. When a duplicate is found, we skip over it by setting &lt;code&gt;current.next = current.next.next&lt;/code&gt;. &lt;br&gt;
When one of the conditions becomes false, we move current pointer to the next node.&lt;br&gt;
Finally, we return original head with modified list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time and Space Complexity
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Time complexity: O(n), where n is the length of the linked list. We traverse the list once.&lt;/li&gt;
&lt;li&gt;Space complexity: O(1), as we only use a constant amount of space regardless of input size.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Solution Works
&lt;/h2&gt;

&lt;p&gt;Single-pass efficiency: We only need to traverse the list once.&lt;br&gt;
In-place modification: We modify the existing list structure without creating new nodes, optimizing memory usage.&lt;br&gt;
Handling edge cases: Our solution works correctly even for empty lists or lists with no duplicates.&lt;br&gt;
Preserving order: By keeping the first occurrence of each number, we maintain the sorted nature of the list.&lt;/p&gt;

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

&lt;p&gt;Removing duplicates from a sorted linked list is a fundamental problem in algorithm design. This solution demonstrates efficient traversal and manipulation of linked list structures. &lt;br&gt;
Thank you for reading.&lt;/p&gt;

</description>
      <category>leetcode</category>
    </item>
    <item>
      <title>To-Do from CLI with Rust</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Thu, 12 Sep 2024 21:40:00 +0000</pubDate>
      <link>https://dev.to/shoeheyot/to-do-from-cli-with-rust-36l4</link>
      <guid>https://dev.to/shoeheyot/to-do-from-cli-with-rust-36l4</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hey there 👋&lt;br&gt;
This article is about how I challenged new thing, learned its principal features, and succeeded less than a month.&lt;br&gt;
As a software developer, I am always excited to try new technologies. Recently I decided to build a command-line to-do list application using Rust, despite having no prior experience with the language.&lt;/p&gt;

&lt;p&gt;I had been looking for a simple, light and fast to-do app while coding and decided to create one by myself. Since I have used some services made with Rust,(like a code editor, formatter,etc.) and I know how fast they are. So I decided to use Rust. &lt;/p&gt;

&lt;p&gt;I believe this project not only pushed up my skill but also showcased my ability to quickly adapt to new technologies.&lt;/p&gt;
&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I started learning Rust less than a month ago, 100% self-studying using materials which are all made by Rust Official.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Official documentation&lt;/li&gt;
&lt;li&gt;Rust By Example&lt;/li&gt;
&lt;li&gt;Rustling hands-on course
&lt;a href="https://www.rust-lang.org/learn" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmz3jckla0sjsklk92lup.png" alt="Rust recommended materials" width="" height=""&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;Nothing fancy in terms of features, you can display all remained tasks, add or delete a task.&lt;br&gt;
The point is that all operations are done from a terminal.&lt;/p&gt;

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

&lt;p&gt;Type one of the number from 1 to 4 for operation you desire e.g. Type 1 and display remained task.&lt;/p&gt;
&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;I utilize &lt;code&gt;match { }&lt;/code&gt; inside &lt;code&gt;loop{ }&lt;/code&gt; as flow of control for infinite loop unless user's input is 4, using module &lt;code&gt;std::io&lt;/code&gt; to detecte user input.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
 &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;

 &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
   &lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nf"&gt;some_oparation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

     &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  
   &lt;span class="p"&gt;},&lt;/span&gt;

   &lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&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="s"&gt;"4"&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;end_oparation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

     &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;},&lt;/span&gt;
   &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;fall_back&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;continue&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;p&gt;For now, the todo items are stored in a text file(if it doesn't exist, new txt file will be created).&lt;/p&gt;

&lt;h2&gt;
  
  
  What I succeeded and learned
&lt;/h2&gt;

&lt;p&gt;I successfuly implemeneted basic feature of to-do from terminal.&lt;br&gt;
It was a good experience to create with Rust. The thing I struggled with most of the time is ownership/borrowing.&lt;/p&gt;
&lt;h3&gt;
  
  
  Owenership
&lt;/h3&gt;

&lt;p&gt;Ownership is a core concept and a set of rule in Rust that governs how memory is managed. Each value has an owner that is responsible for deallocating the value when it is no longer needed. There can be only one owner to each value. When the owner of a value goes out of scope, the value will be dropped.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;//example 1 Ownership&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;                        &lt;span class="c1"&gt;//s is invalid at this line &lt;/span&gt;
                         &lt;span class="c1"&gt;//as it is not decleared yet&lt;/span&gt;

  &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;       &lt;span class="c1"&gt;// s owns the string "hello" and s is now valid&lt;/span&gt;

  &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;new_s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;         &lt;span class="c1"&gt;// the ownership of the string "hello" is transfered &lt;/span&gt;
                         &lt;span class="c1"&gt;//to variable new_s and s is no longer valid&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;                        &lt;span class="c1"&gt;// this is end of scope and new_s is not valid anymore&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*scope is block &lt;code&gt;{}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Borrowing
&lt;/h3&gt;

&lt;p&gt;Borrowing is a Rust's feature which lets you use values without taking ownership. You can use this by adding symbol &lt;code&gt;&amp;amp;&lt;/code&gt; before variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;//example 2 Borrowing&lt;/span&gt;
  &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="nf"&gt;print_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   

      &lt;span class="nd"&gt;print!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// still available to use variable `s`&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;print_string&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nd"&gt;print!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{} world"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//display hello world in terminal&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in example 2, &lt;code&gt;&amp;amp;s&lt;/code&gt; means borrowing the value of &lt;code&gt;s&lt;/code&gt; not taking ownership of it.&lt;br&gt;
Not like example 1, variable &lt;code&gt;s&lt;/code&gt; is not reassigned to an another one, so it seems &lt;code&gt;s&lt;/code&gt; is still able to be used in &lt;code&gt;print!()&lt;/code&gt;(BTW this is same as &lt;code&gt;console.log()&lt;/code&gt; in Javascript/Typescript) without additional ampersands. It is needed. Passing a variable(not borrowing) to a function is similar to reassigning, so if you still need to use variable &lt;code&gt;s&lt;/code&gt; in same scope, one way it to pass a variable as reference to a function &lt;code&gt;print_string()&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Mutability
&lt;/h3&gt;

&lt;p&gt;The default behavior of variable in Rust is immutable which is good in point of safety and concurrency, so what if you want to update the value in a variable like Example 3?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;
&lt;span class="c1"&gt;//Example 3 Mutability&lt;/span&gt;
 &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
  &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"goodbye"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&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;Example 3 is invalid. If you &lt;code&gt;cargo run&lt;/code&gt;(&lt;code&gt;npm run&lt;/code&gt; in Javascript) with the example 3, it would dislplay below error message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;
error[E0384]: cannot assign twice to immutable variable `s`
&lt;/span&gt;&lt;span class="gp"&gt; --&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;src/main.rs:3:5
&lt;span class="go"&gt;  |
&lt;/span&gt;&lt;span class="gp"&gt;2 |     let s = "hello";&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;  |         -
  |         |
  |         first assignment to `s`
  |         help: consider making this binding mutable: `mut s`
&lt;/span&gt;&lt;span class="gp"&gt;6 |     s = "goodbye";&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;  |     ^^^^^^^^^^^^^ cannot assign twice to immutable variable

For more information about this error, try `rustc --explain E0384`.
warning: *** generated 1 warning
&lt;/span&gt;&lt;span class="gp"&gt;error: could not compile *** due to 1 previous error;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;1 warning emitted
&lt;span class="go"&gt;

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

&lt;/div&gt;



&lt;p&gt;You might notice within error message, it sometimes gives us hint which saved me time during the project.(Be careful, it is just a hint, not an answer) &lt;/p&gt;

&lt;p&gt;To fix the issue, you need to explicity tell Rust this variable is mutable using keyword &lt;code&gt;mut&lt;/code&gt; like below example 3-1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;
&lt;span class="c1"&gt;//Example 3-1 Mutability&lt;/span&gt;
 &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
  &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"goodbye"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&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;
  
  
  Why it is needed  - Ownership and Borrowing
&lt;/h3&gt;

&lt;p&gt;All programs have to manage how to use memory of computer while running. Some languages have garbage collector that regulary check memory which is no longer used while running. In Rust, memory is managed through this ownership concept. At the closing curly brackets, special function called &lt;code&gt;drop&lt;/code&gt; is automatically called. This is the timing where the owner of value returns the memory.&lt;br&gt;
So no garbage collectoer or explicitly free memory execution is needed, it automatically frees memory when variables goes out of scope. This concept of Rust make it fast, memory-efficient and memory-safety yet flexible language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improvements
&lt;/h2&gt;

&lt;p&gt;There are two things I would like to improve&lt;/p&gt;

&lt;h3&gt;
  
  
  Editing feature
&lt;/h3&gt;

&lt;p&gt;The current features are adding, reading, and deleting, but you might forget which tasks are in progress and which are not if there are more than you can remember. It is nice to see progress, so I am planning to add editing feature so that a user can check whether remained tasks are in progress or haven't been started yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Refactor
&lt;/h3&gt;

&lt;p&gt;With current implementation, a newly created task is saved to text file which is located in the root of working space(if not exist, new file would be created), which is not ideal in performance, scalability or data integrity perspectives. Instead it is better to  implement storing data in database, like PostgreSQL or mySQL and I will change it soon.&lt;/p&gt;

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

&lt;p&gt;Through this my first Rust project, even it is simple one, I felt how safe and fast the language is, and not 'that' hard to learn and create something with it. I was thinking this language was not for me, too difficult to learn until I started this project. If you haven't done anything with it and are looking for something new to learn, I would recommend Rust.&lt;/p&gt;

&lt;p&gt;Thank you for reading so far, if you have any question or suggestion, please leave a comment or contanct me via Linkedin.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ShoeheyOt/to-do-cli" rel="noopener noreferrer"&gt;Github Repo&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/shuhei-ota/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://doc.rust-lang.org/book/" rel="noopener noreferrer"&gt;Rust Official Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doc.rust-lang.org/rust-by-example/" rel="noopener noreferrer"&gt;Rust By Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rust-lang/rustlings/" rel="noopener noreferrer"&gt;Rustlings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>beginners</category>
      <category>programming</category>
      <category>development</category>
    </item>
    <item>
      <title>The shopping list</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Wed, 22 May 2024 19:39:21 +0000</pubDate>
      <link>https://dev.to/shoeheyot/the-shopping-list-1j81</link>
      <guid>https://dev.to/shoeheyot/the-shopping-list-1j81</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Have you ever experienced forgetting what to buy which you had just remembered until a second ago? Well, I have, many times. So does my partner.. In order to keep them in memo, I created a app which can remember what to buy for us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;The goal is to implement create/read/delete interactive communication with database without complicated operation.&lt;br&gt;
'Simple' is kind of important keyword in this app as it is used by not only me but also my partner who is not familier with programming.&lt;/p&gt;

&lt;p&gt;You might wonder why 'update' feature(U from CRUD) is not included. That's because my app doesn't need to modify &lt;br&gt;
item(s) in the list. I focused on three create/read/delete features to keep it simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;A user oparates via communication tool, LINE(I would say the app ,LINE, is one of the most popular communication tool in my coutry.), it has nice API feature which can do webhook to call a function deployed somewhere else, this time I deployed a my codes to supabase. Sending a message to LINE API account (each LINE user can create their own API account) triggers to call it. Once triggered, LINE API sends a request to supabase edge functions where I deployed and get response from it depend on what message a user sends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fli4javrav1m4rwkfhw3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fli4javrav1m4rwkfhw3k.png" alt="diagram how it works" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The events depends on the input keyword.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create
&lt;/h3&gt;

&lt;p&gt;If a user input doesn't include either 'Display', 'Clear', 'Delete', which means add a new item to the list, all you have to do is to type a item you want to memo and tap send button.&lt;br&gt;
Below is example how it works, only you need to do is to send a word to line account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvx9b06llgqqcruk5anv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvx9b06llgqqcruk5anv.png" alt="example image of how to add to list 'create'" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Read
&lt;/h3&gt;

&lt;p&gt;It is main feature of the app, if you want to get a list from database, just type "Display", and it responds with all item in the iist. I set capital D as first letter of keyword because we both are iphone users, which has keyboard feature that first letter of a sentence is automatically in capital as default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0duqay0sqgsdn0jrzd6j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0duqay0sqgsdn0jrzd6j.png" alt="example image of how to read the list" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete
&lt;/h3&gt;

&lt;p&gt;There are two ways to delete item from the list.&lt;/p&gt;

&lt;h4&gt;
  
  
  "Delete ***"
&lt;/h4&gt;

&lt;p&gt;one is using keyword "Delete", this is used when you want to delete specific item.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh8ok7aqn3ig7kqfgetkz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh8ok7aqn3ig7kqfgetkz.png" alt="example image when 'Delete' is used" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  "Clear"
&lt;/h4&gt;

&lt;p&gt;The other way is using "Clear". When you input this keyword, it clears all item in the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6nck6tkfl2hcbski3xp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6nck6tkfl2hcbski3xp7.png" alt="example image when 'Clear' is used" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Utilize Line Feature
&lt;/h3&gt;

&lt;p&gt;Actually(you might imagine), keywords "Diplay" and "Clear" are the frequently used in this app. &lt;br&gt;
so I added ready-for-tapped buttons called "Rich Menu", this is one feature of Line that you can assign arbitrary command easily.&lt;br&gt;
with only one tap, and you can see the list or delete them all.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8boiezsuje6ho0fwcwzd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8boiezsuje6ho0fwcwzd.png" alt="example image of Rich Menu" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TechStack
&lt;/h2&gt;

&lt;p&gt;Frontend --- Line message API,&lt;br&gt;
Backend --- supabase edge function in Typescript&lt;br&gt;
Database --- supabase&lt;/p&gt;

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

&lt;p&gt;This app is useful. we have been using it for a few weeks and works well so far. It is also good practice to understand how to deploy, connect to database.&lt;/p&gt;

&lt;p&gt;Thank you for reading. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Algorithm Assignment</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Fri, 06 Oct 2023 04:25:03 +0000</pubDate>
      <link>https://dev.to/shoeheyot/-algorithm-assignment-1p5</link>
      <guid>https://dev.to/shoeheyot/-algorithm-assignment-1p5</guid>
      <description>&lt;h2&gt;
  
  
  Leet Code no.1 "Two Sum"
&lt;/h2&gt;

&lt;p&gt;This article is for school task, The detail of the task is below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write 1 blog/article about algorithms in any manner, not limited to JavaScript.You can write about objectives or how algorithms solve problems. You can provide information, offer suggestions and advice to a reader who may not know what an algorithm is.&lt;br&gt;
  Writing a script to give examples is also valued and recommended. You may write an article that revolves around the topic of JavaScript.&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;I don't have any working experience as a developer, have just started learning programming, so with meaning of review and deepen understanding of basic of algorithm, I tried to explain how to solve Leet code no.1 "Two Sum".&lt;/p&gt;

&lt;p&gt;Below is the explanation of two sum problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Leet Code Two Sum explanation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt; Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
 You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.

 Example1
 Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]

Example2
Input: nums = [3,2,4], target = 6
Output: [1,2]

Example3
Input: nums = [3,3], target = 6
Output: [0,1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*If you want to read more details about Leet code, Click &lt;a href="https://leetcode.com/problems/two-sum/" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I first thought I needed to use for loop inside for loop to get target value as below code and flowchart, which means looking through all numbers one by one to find indices of the two numbers which they add up to target.&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;twoSum&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&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="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&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;target&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;j&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;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cmy1cyt9iz3qe8bljo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cmy1cyt9iz3qe8bljo.png" alt="Image description" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From Big O notation point of view, each complexity is as below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time complexity: O(n^2)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Space complexity: O(1)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It works but more numbers in the array, the more it takes to solve.&lt;br&gt;
So, I tried to find more efficient way to solve this problem, but I couldn't. Therefore, I asked best friend(the service which start from 'G', not 'C') to find better one.&lt;/p&gt;

&lt;p&gt;Point is how to avoid for loop in for loop which cause time complexity to n^2 and what I need to do is finding difference of target value and value in the array I am looking at.&lt;/p&gt;

&lt;p&gt;Difference = Target - value in array&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;twoSum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;numObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
   &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&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;numObj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;difference&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;numObj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;difference&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nx"&gt;numObj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&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;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5t15d525i3i69l2tsxd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5t15d525i3i69l2tsxd8.png" alt="Image description" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From Big O notation point of view, each complexity is as below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time complexity: O(n)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Space complexity: O(n)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here we have tradeoff, improved time complexity at the sacrifice of space complexity.&lt;br&gt;&lt;br&gt;
Well,,, you can buy space but you can't buy time.&lt;/p&gt;

&lt;p&gt;That's all, thanks for reading.&lt;br&gt;
If you find some misunderstanding in the article, please let me know. I would appreciate it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TASK_101</title>
      <dc:creator>ShoeheyOt</dc:creator>
      <pubDate>Mon, 04 Sep 2023 18:49:57 +0000</pubDate>
      <link>https://dev.to/shoeheyot/task101-1739</link>
      <guid>https://dev.to/shoeheyot/task101-1739</guid>
      <description>&lt;p&gt;&lt;strong&gt;This article is for a task from my school&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Details are below&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GOAL&lt;/strong&gt; : Write 1 blog/article about yourself and your goals to become a software developer (front/back end dev, software engineer...etc)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MYSELF&lt;/strong&gt; : Yourself (a bit of your history)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXPECTATION&lt;/strong&gt; : Your expectations for this course&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXPERIENCE&lt;/strong&gt; : How was your experience with the course so far (first week)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACHIEVEMENT&lt;/strong&gt;: What do you want to achieve after the course?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is written down accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  GOAL&lt;a id="chapter-1"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;As beginning, I would like to be a front end developer.&lt;br&gt;&lt;br&gt;
After 10 years of working as a salesperson, it is approachable for me to think how consumer/customer/client see and feel products which my company own. I found my way to sell products, which means I can make them look attractive to customers (maybe).&lt;br&gt;&lt;br&gt;
In spite that, I felt sort of fear at the same time because the products I made look attractive was not what I planned or made. In addition to that, if technical or quality issue occurred, I couldn't handle it by myself. Most of the time, I needed to ask production or planning side because it could affect to other customers we have all over the world, which made me feel I was incompetent, what I had been doing was adding something little bit to what those who planned or made products had told me to do.&lt;br&gt;
Without them, I couldn't have done anything. Therefore, I started thinking about getting new skills which I can plan/make or solve with by myself,&lt;br&gt;&lt;br&gt;
And,,, here I am.  &lt;/p&gt;

&lt;h2&gt;
  
  
  MYSELF&lt;a id="chapter-2"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Born and grew up in Osaka, Japan, in which delicious food, Japanese comedy(Owarai) exist.&lt;/li&gt;
&lt;li&gt;Graduated from Japanese high school with 1 year experience of exchange student in Canada( I was in Saskatchewan)&lt;/li&gt;
&lt;li&gt;Have BA degree, Business administration, in a university in Japan.&lt;/li&gt;
&lt;li&gt;Approx. 10 years working experience as salesperson in bicycle industry until Apr. 2023&lt;/li&gt;
&lt;li&gt;Take Web Development course at Cornerstone college from Aug.2023&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  EXPECTATION&lt;a id="chapter-3"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Getting to know&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fundamental of programming&lt;/li&gt;
&lt;li&gt;mind-set&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A guide or a lighthouse how to be a developer&lt;br&gt;&lt;br&gt;
With this 10 years experience, I realized that there are many cases which don't have one clear answer in business world.&lt;br&gt;&lt;br&gt;
Thus, I would like to get a skill or a knowledge which I can use not only to plan or make, but also solve/deal with something by myself, in order to judge which is better.&lt;/p&gt;

&lt;h2&gt;
  
  
  EXPERIENCE&lt;a id="chapter-4"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Good, besides sudden announcement of changing course schedule.&lt;br&gt;&lt;br&gt;
Even though we haven't learned any detail about &lt;em&gt;programming&lt;/em&gt; yet, the teacher is good.&lt;br&gt;&lt;br&gt;
He prepared for the class well(didn't use the material school prepared at all!).&lt;br&gt;&lt;br&gt;
His way of teaching is easy to understand.&lt;br&gt;
Therefore I would say I had good experience so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  ACHIEVEMENT&lt;a id="chapter-5"&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;| A | B | C |&lt;br&gt;
|---|---|&lt;br&gt;
| A | B | C |&lt;br&gt;
| A | B | C |&lt;/p&gt;

&lt;p&gt;I can't &lt;em&gt;even&lt;/em&gt; make a table with markdown now, like above.&lt;br&gt;
I would like to build up my skill that I can solve programming problem while planning or making something by myself after the course.&lt;/p&gt;

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