<?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: Farshan Ahamed</title>
    <description>The latest articles on DEV Community by Farshan Ahamed (@farshan).</description>
    <link>https://dev.to/farshan</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%2F491722%2F086307e2-dd2f-4725-8a73-fe9e6b4b2cc9.jpeg</url>
      <title>DEV Community: Farshan Ahamed</title>
      <link>https://dev.to/farshan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farshan"/>
    <language>en</language>
    <item>
      <title>Timezone for developers</title>
      <dc:creator>Farshan Ahamed</dc:creator>
      <pubDate>Tue, 08 Feb 2022 05:47:00 +0000</pubDate>
      <link>https://dev.to/farshan/timezone-for-developers-1f66</link>
      <guid>https://dev.to/farshan/timezone-for-developers-1f66</guid>
      <description>&lt;p&gt;When it comes to date and time, developers prefer a value of more than just hours and minutes. It should be a precise value that includes seconds, milliseconds, and in some cases, a timezone.&lt;/p&gt;

&lt;p&gt;Most of us are familiar with the term timezone. UTC is a timezone that stands for Universal Time Coordinated. It is equivalent to GMT, which stands for Greenwich Mean Time and has a timezone offset of +0:00. The remaining timezones are all relative to UTC. For instance, The Pacific Time (-8:00) is 8 hours behind UTC.&lt;/p&gt;

&lt;h3&gt;
  
  
  UTC in database
&lt;/h3&gt;

&lt;p&gt;When storing a date in a database, it is usually in 24-hour format with millisecond precision(&lt;code&gt;yyyy-MM-dd HH:mm:ss.fff&lt;/code&gt;). For example, '2022-02-01 14:25:43.899'. Furthermore, regardless of the time zones in which the developers/applications are located, always save the date and time in the UTC timezone. When converting a time to UTC, the timezone offset is normally subtracted from the actual time. The offset will be one hour less than usual during daylight saving time (summer).&lt;/p&gt;

&lt;p&gt;When returning data to the client (browser), adding a 'Z' at the end of the date allows browsers to identify it as UTC and convert it to local time while showing. Most DateTime pickers in modern frameworks are set to convert to UTC by default. There are also some libraries that convert to and from UTC and handle all cases, including DST.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xZjFPIa5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msw1kj3r85yvzhlyie5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xZjFPIa5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msw1kj3r85yvzhlyie5o.png" alt="UTC Flow chart" width="880" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What if we don't use UTC
&lt;/h3&gt;

&lt;p&gt;User A from Australia (+11:00) uploads a photo at time &lt;code&gt;2022-02-01 11:30 PM&lt;/code&gt; and the same date and time are stored in the database. User B from Canada (-5:00) opens this photo at the same time will see the uploaded date as &lt;code&gt;2022-02-01 11:30 PM&lt;/code&gt; where the present time of User B is &lt;code&gt;2022-02-01 7:30 AM&lt;/code&gt;. The uploaded date shown to User B is a future date and that is wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to solve this issue using UTC
&lt;/h3&gt;

&lt;p&gt;User A from Australia (+11:00) uploads a photo at time &lt;code&gt;2022-02-01 11:30 PM&lt;/code&gt; and the date and time are converted to UTC (&lt;code&gt;2022-02-01 12:30 PM&lt;/code&gt;) and stored in the database. User B from Canada(-5:00) open this photo at the same time will see the uploaded date as &lt;code&gt;2022-02-01 7:30 AM&lt;/code&gt; where the present time of User B is &lt;code&gt;2022-02-01 7:30 AM&lt;/code&gt;. The uploaded date shown to User B is the present date and is correct.&lt;/p&gt;

&lt;p&gt;Even though there are many benefits to UTC, there exist cases where we don't need the overhead of using UTC and thus avoid complicating things. Yet, if the date is accessible worldwide then, it is recommended to keep the date in UTC. Since there are different calendar systems in different regions, developers often deal with interesting date and time issues and every new problem is an opportunity to learn.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>opensource</category>
      <category>database</category>
    </item>
    <item>
      <title>Lost in comfort zone</title>
      <dc:creator>Farshan Ahamed</dc:creator>
      <pubDate>Mon, 24 Jan 2022 11:07:51 +0000</pubDate>
      <link>https://dev.to/farshan/lost-in-comfort-zone-3pld</link>
      <guid>https://dev.to/farshan/lost-in-comfort-zone-3pld</guid>
      <description>&lt;p&gt;Recently, I learned Angular and completed a task in an Angular Project. It was merged into the Main branch and successfully released into Production. So I should be confident to do a similar task in Angular, right? Unfortunately, I wasn't.&lt;/p&gt;

&lt;p&gt;I had a feeling that I'm not good as others think I am. I doubt myself if I'm able to do this. Developers often have this situation and people call this Imposter Syndrome. This happens among developers as the internet says. Every time I intend to try something different, I was renewing my fear. I read more about this and found many ways to get rid of it but, my case was different. There was another factor influencing my fear. &lt;/p&gt;

&lt;p&gt;From the beginning, I built my tech stack around C# and related frameworks. I became fluent in ASP.NET Core and created many APIs in the past years. My comfort zone was filled with API development. But in a 10 member team, you have to Juggle multiple balls to cover all projects. So when I was assigned a front-end task on Angular for the first time, I was very excited and afraid at the same time. Learning new things always gives me a push and fortunately, I finished the first task without much hassle. Since I'm good at back-end development, I thought of ASP.NET Core as my hometown and I'll always go back there. When another front-end task was assigned, a couple of thoughts crossed my mind. “What if I couldn't complete the task? What if I'm not able to learn Angular well? I'm arguably fitted in the back-end team. I don't belong here.”. These uncertain thoughts almost pulled me back. But I didn't give much chance for these unwanted thoughts to grow. When I started doing the task, all my fears went away. I was able to finish it better than I expected. Also, I enjoyed learning new things in Angular and I even tried out some of those learnings in my hobby project on the weekend. It wasn't that bad, after all.&lt;/p&gt;

&lt;p&gt;Every time I was assigned to do new things, I had this fear inside me. The fear of getting thrown out of my comfort zone and underestimating my capabilities. Later I figured it was not worth my time. I realized nobody is going to push me forward, it has to be me. I have to drive myself and get out of my comfort zone. There exist people who are facing their own fears and couldn't end up where they desired to be. It is okay to have fears in life and maybe we can't get rid of them all of a sudden yet, remember a small step is enough for a good start. Determining not to put pressure while trying new things was the first step I took, and indeed it laid a big ground for every step I took since then.&lt;/p&gt;

</description>
      <category>motivation</category>
      <category>devjournal</category>
      <category>career</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>The way I lost my logic</title>
      <dc:creator>Farshan Ahamed</dc:creator>
      <pubDate>Fri, 21 Jan 2022 12:19:58 +0000</pubDate>
      <link>https://dev.to/farshan/the-way-i-lost-my-logic-j6j</link>
      <guid>https://dev.to/farshan/the-way-i-lost-my-logic-j6j</guid>
      <description>&lt;p&gt;I remember the old days where I switch on the computer only to use Paint and it was a new experience for me. Later, when I was introduced to programming, I saw only black and white screens. I tried to learn simple things at first. It is a basic rule that, If we are learning something, we must perceive the basics first. So does the programming.&lt;/p&gt;

&lt;p&gt;At the school, they spoon-fed the basics of programming, and the first language I learned was SQL. I remember I was only taught the &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, and &lt;code&gt;WHERE&lt;/code&gt; commands. I used this handful of commands to solve the questions in the exams. When I started the 101 of C Language, the &lt;code&gt;printf&lt;/code&gt;, &lt;code&gt;scanf&lt;/code&gt; was all about day one. Years passed, I have gone through many of the algorithms like sorting, searching, and more. Every new thing I have learned excites and keeps me motivated. Meanwhile, the technology was getting advanced day by day, also there came new languages, new ways of programming which made the programmers' lives easier. There are one-liners for many of the logical functionalities, there are community answers to many of the logical problems I have. I get used to it and I never had to use the algorithms I have learned. Eventually, the brain began to remove unused resources. Here I'm managing multiple stacks and doing different projects and learning new things, but literally, I'm not challenging my brain as I used to do in my starting days.&lt;/p&gt;

&lt;p&gt;As a developer, it is good to have ready-to-use functionalities, it saves our time and gets better results. It is better to challenge our brains with logical questions every once in a while. After all, we should try to keep up with the technology updates every day. For me, It helps while making decisions.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>career</category>
      <category>algorithms</category>
      <category>learning</category>
    </item>
    <item>
      <title>My way of solving a problem</title>
      <dc:creator>Farshan Ahamed</dc:creator>
      <pubDate>Sat, 04 Dec 2021 19:50:22 +0000</pubDate>
      <link>https://dev.to/farshan/my-way-of-solving-a-problem-137c</link>
      <guid>https://dev.to/farshan/my-way-of-solving-a-problem-137c</guid>
      <description>&lt;p&gt;Since problems are a part of our life, I'm sure everyone has their own way of approaching a problem. This is how my brain deals with my daily developer problems.&lt;/p&gt;

&lt;p&gt;First of all, my brain finds out if the problem is lying inside my knowledge domain. Eg: If it is a .NET Core problem, my brain will say, 'You got it, pal'. If it is something outside of my boundaries, my brain will say, 'A couple of google searches will lead you to the solution'. &lt;/p&gt;

&lt;p&gt;Once I'm fed up with the google search, my brain will say, 'Go and find all the possible Github issues and read all comments. and there will be your answer.'  &lt;/p&gt;

&lt;p&gt;If there is no clue even after all these suggestions, my brain will awkwardly recommend approaching a peer. And if the solution still remains uncovered, I usually stop listening to my brain and go for a nap. And Voila, there comes my solution. I feel like "Yes! these memes are right. A good nap can bring you solutions.".&lt;/p&gt;

&lt;p&gt;And every time I solve a problem, my brain tries to cache it and when similar problems arise, I know where to look.&lt;/p&gt;

&lt;p&gt;All these processes might be different for each of us. But never lose hope for a good solution. Patience is a good-to-have personality trait for a Developer.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
