<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>How-To on Amir Pourmand</title>
    <link>https://amirpourmand.ir/tags/how-to/</link>
    <description>Recent content in How-To on Amir Pourmand</description>
    <image>
      <title>Amir Pourmand</title>
      <url>https://amirpourmand.ir/opengraph/opengraph.png</url>
      <link>https://amirpourmand.ir/opengraph/opengraph.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>All content on this site is licensed under a CC-BY-4.0 license.</copyright>
    <lastBuildDate>Fri, 20 Feb 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://amirpourmand.ir/tags/how-to/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to model any DFA using SQL</title>
      <link>https://amirpourmand.ir/posts/2026/how-to-model-any-dfa-sql/</link>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://amirpourmand.ir/posts/2026/how-to-model-any-dfa-sql/</guid>
      <description>&lt;h3 id=&#34;the-problem&#34;&gt;The Problem&lt;/h3&gt;
&lt;p&gt;This was one of the challenges I had to handle recently. I wanted to model a Definitive Finite Automata (&lt;a href=&#34;https://en.wikipedia.org/wiki/Deterministic_finite_automaton&#34;&gt;DFA&lt;/a&gt;) using SQL. This reminded me of one of the courses I took in my bachelors (&lt;a href=&#34;https://www.geeksforgeeks.org/theory-of-computation/introduction-of-finite-automata/&#34;&gt;+&lt;/a&gt;). This is where I understood how to use DFA for a SQL problem which at first, seems unsolvable.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s define the problem clearly. Note that this is a real-life business problem. I&amp;rsquo;m not talking about theory and a made-up problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Derive Most Math Trigonometry Formulas via Euler Identity</title>
      <link>https://amirpourmand.ir/posts/2025/math-trigonometry-formulas-euler/</link>
      <pubDate>Wed, 03 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://amirpourmand.ir/posts/2025/math-trigonometry-formulas-euler/</guid>
      <description>&lt;p&gt;When I was in high school, I remember that I had to memorize all trigonometry formulas. I didn&amp;rsquo;t have a single way to resort to when I was locked.&lt;/p&gt;
&lt;p&gt;Fortunately, As I will show here, most trigonometry formulas can be derived via simple algebraic modifications of &lt;code&gt;Euler&#39;s Formula&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This way, any time we are locked and can&amp;rsquo;t remember what the formula was, we can simply derive it.&lt;/p&gt;
&lt;p&gt;I have used some LLM to generate proofs. So, this is the only post ever I&amp;rsquo;ve used LLMs. But I had to tell.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting Up Caddy for Reverse Proxy is dead simple</title>
      <link>https://amirpourmand.ir/posts/2024/caddy-reverse-proxy/</link>
      <pubDate>Wed, 03 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://amirpourmand.ir/posts/2024/caddy-reverse-proxy/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently found Caddy as a tool to assign urls to my docker services and I&amp;rsquo;m quite happy with it. I&amp;rsquo;ve done other reverse proxies like Nginx and Traefik in the past but they are too complicated for my needs.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s say that you want to assign your url like &lt;code&gt;newservice.amirpourmand.ir&lt;/code&gt; to a service in a VM with a public IP address. I&amp;rsquo;ll go you through it.&lt;/p&gt;
&lt;p&gt;Also, It has multiple benefits. The first one is that you don&amp;rsquo;t have to do IPs. You don&amp;rsquo;t have to deal with ugly IPs that may change in the future. You deal with Secure URLs. The second is that the connection is &lt;code&gt;https&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
