<?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: Yasir Umayyah Shamon</title>
    <description>The latest articles on DEV Community by Yasir Umayyah Shamon (@yasir_umayyah_shamon).</description>
    <link>https://dev.to/yasir_umayyah_shamon</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%2F3510313%2F27c8a5ef-f5b9-43f6-8324-3067e0875630.jpg</url>
      <title>DEV Community: Yasir Umayyah Shamon</title>
      <link>https://dev.to/yasir_umayyah_shamon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasir_umayyah_shamon"/>
    <language>en</language>
    <item>
      <title>Can Simple Calculator Projects Be Turned Into Real-World Tools?</title>
      <dc:creator>Yasir Umayyah Shamon</dc:creator>
      <pubDate>Thu, 18 Sep 2025 05:01:52 +0000</pubDate>
      <link>https://dev.to/yasir_umayyah_shamon/can-simple-calculator-projects-be-turned-into-real-world-tools-49l8</link>
      <guid>https://dev.to/yasir_umayyah_shamon/can-simple-calculator-projects-be-turned-into-real-world-tools-49l8</guid>
      <description>&lt;p&gt;Most beginners build a basic calculator in JavaScript when learning HTML, CSS, and JS. It’s a great way to practice logic and functions — but here’s my question:&lt;/p&gt;

&lt;p&gt;Can we take this simple project and make it solve real-world problems?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;My Example: UAE Gratuity Calculator&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the UAE, employees are entitled to gratuity (end-of-service benefits) when they resign or their contract ends.&lt;/p&gt;

&lt;p&gt;The problem? The calculation depends on:&lt;/p&gt;

&lt;p&gt;Basic salary&lt;/p&gt;

&lt;p&gt;Years of service&lt;/p&gt;

&lt;p&gt;Contract type (limited or unlimited)&lt;/p&gt;

&lt;p&gt;It’s not easy to calculate by hand, so I decided to turn a basic calculator project into a practical tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;A Small JavaScript Snippet&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here’s a simplified version of the formula:&lt;/p&gt;

&lt;p&gt;function calculateGratuity(salary, years) {&lt;br&gt;
  if (years &amp;lt; 1) return 0; // Not eligible before 1 year&lt;/p&gt;

&lt;p&gt;if (years &amp;lt;= 5) {&lt;br&gt;
    return (salary * 21 / 30) * years; // 21 days per year&lt;br&gt;
  } else {&lt;br&gt;
    const firstFive = (salary * 21 / 30) * 5;&lt;br&gt;
    const extraYears = (salary * 30 / 30) * (years - 5);&lt;br&gt;
    return firstFive + extraYears;&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Full Tool&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I built a live version here:&lt;br&gt;
&lt;a href="https://calculategratuity.ae/" rel="noopener noreferrer"&gt;https://calculategratuity.ae/&lt;/a&gt;&lt;br&gt;
It applies the official UAE labor law and gives instant results.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;My Question to You&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Have you ever taken a beginner project (like a calculator, to-do app, etc.) and turned it into something that people actually use in real life?&lt;/p&gt;

&lt;p&gt;Do you think these kinds of projects are worth building, or should beginners move on quickly to “bigger” projects?&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
