<?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>Ahmad's Site</title><link>https://atbk.dev/</link><description>Recent content on Ahmad's Site</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>© 2026 Ahmad Tabbakha</copyright><lastBuildDate>Sun, 21 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://atbk.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>apkudo device test in progress</title><link>https://atbk.dev/apkudo-device-test/</link><pubDate>Sun, 21 Dec 2025 00:00:00 +0000</pubDate><guid>https://atbk.dev/apkudo-device-test/</guid><description>&lt;p&gt;I had an iPhone 13 mini that was sitting bricked and unusable. The device would power on and display a small message at the bottom of the screen which said &amp;ldquo;apkudo device test in progress.&amp;rdquo; I tried all kinds of hand gestures and other various tricks to get this phone to unlock. Nothing worked, but the fix turned out to be simple. All this really took was a simple software update and restore. I connected the device to my MacBook to run update, and restore. Once that was complete I had a cute operable iphone 13 mini running iOS 26.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I had an iPhone 13 mini that was sitting bricked and unusable. The device would power on and display a small message at the bottom of the screen which said &ldquo;apkudo device test in progress.&rdquo; I tried all kinds of hand gestures and other various tricks to get this phone to unlock. Nothing worked, but the fix turned out to be simple. All this really took was a simple software update and restore. I connected the device to my MacBook to run update, and restore. Once that was complete I had a cute operable iphone 13 mini running iOS 26.</p>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>Do Not Disturb</title><link>https://atbk.dev/do-not-disturb/</link><pubDate>Fri, 20 Jun 2025 15:35:58 -0500</pubDate><guid>https://atbk.dev/do-not-disturb/</guid><description>&lt;p&gt;My phone keeps beeping, vibrating and calling for my attention. How on earth am I supposed to get anything done? Someone liked your post. Someone sent you a message. Someone emailed you. &amp;ldquo;Oh wonderful - I&amp;rsquo;ll check this, respond quickly and I&amp;rsquo;ll get back to whatever I was doing&amp;rdquo; - This is what I used to tell myself. That did not happen. What did happen after I checked those messages or emails is I would end up going through multiple apps and notification chains.&lt;/p&gt;</description><content:encoded><![CDATA[<p>My phone keeps beeping, vibrating and calling for my attention. How on earth am I supposed to get anything done? Someone liked your post. Someone sent you a message. Someone emailed you. &ldquo;Oh wonderful - I&rsquo;ll check this, respond quickly and I&rsquo;ll get back to whatever I was doing&rdquo; - This is what I used to tell myself. That did not happen. What did happen after I checked those messages or emails is I would end up going through multiple apps and notification chains.</p>
<p>If I attempt to reply to a friend on Instagram, I&rsquo;ll find myself checking stories, watching a few reels and liking posts - &ldquo;So many interesting things are going on!&rdquo; The simple notification has gone from a quick check to a deep dive into many different worlds. Going back to writing text or coding is not as stimulating. My brain would end up being very disappointed. After years of dealing with this during my education and career the detriments of the technology became clearer.</p>
<p>The problem was two fold - One, I completely forgot what I was doing before and now I&rsquo;m on my phone for the 12th time. The second problem is that I&rsquo;ve found myself in a viciously addictive environment again. It&rsquo;s hard to get out of dopamine hell. While I check all cool reels and stories I quickly lose track of time and find myself bouncing between multiple apps. Each notification pulls me in like a blue light attracting a mosquito *ZAP*. Hours gone in a way that&rsquo;s opaque to me by the end of the day. I check my screen time at the end of the day and gasp in horror - Some days I&rsquo;d see up to 4 hours on that one application.</p>
<p>The same justification was always used.</p>
<blockquote>
<p>I&rsquo;ll check a few things, respond quickly and I&rsquo;ll get back to whatever I was doing</p>
</blockquote>
<p>&ldquo;It&rsquo;s a new day&rdquo; I say - &ldquo;I won&rsquo;t be addicted today&rdquo; I tell myself. &ldquo;Productive activities are all that I will engage in&rdquo;. &ldquo;Let me place my phone over there far away and I&rsquo;ll be good&rdquo;. A few hours go by and my productivity is pretty good. Focus, flow, and at this point I won the war against my phone. *Ring Ring Ring* I run to my phone and see it&rsquo;s my mother so I answer it. &ldquo;Hey mom, how are you doing? I&rsquo;m doing well. I&rsquo;ll come over at 6PM and have dinner. Ok &hellip; love you too &hellip; bye!&rdquo;. That was a nice wholesome phone call right? Well now this evil device is in my hand again.</p>
<p>I know! I have a great idea! I deserve to be rewarded for my hard work and focus - &ldquo;Let me check my favorite social media platform - Instagram time!&rdquo; Thirty minutes go by and I realize I&rsquo;ve seen enough coffee reels. Let me go make a coffee too and I&rsquo;ll get right back to what I was doing. These mini episodes of checking your phone are slowly making you go mad. We need to fight back somehow. This cycle may or may not repeat itself multiple times throughout your day.</p>
<blockquote>
<p>I&rsquo;ll check a few things, respond quickly and I&rsquo;ll get back to whatever I was doing
Stop Ahmad STOP<br>
There has to be a better way to deal with this</p>
</blockquote>
<p>Through some miracle I stumbled upon Cal Newport&rsquo;s books Digital Minimalism, and Deep Work. I told myself that I&rsquo;d apply some of the principles found in these two books. The most important one being &ldquo;Do Not Disturb&rdquo;. I needed to dumb my phone down and prevent it from pulling me in. Do Not Disturb helped me avoid almost every single notification on android. Don&rsquo;t worry, my loved ones could still message and call me. I set up exceptions for necessary contacts.</p>
<p>The other thing I did was remove Instagram because that application is a black hole. The reasons I used Instagram were not compelling enough for me to have access to it 24/7. I instead moved to using the web version. The web version is less addicting and my addiction slowly faded into nothing.</p>
<p>After about 2-3 years I can only imagine how many hours I&rsquo;ve saved myself. 3-4 hours a day over the course of 2-3 years adds up. We&rsquo;re talking something like 2-3k hours?!</p>
<p>I&rsquo;d highly suggest for anyone wanting to deal with this to come up with a plan. To avoid doom scrolling and being sucked in - to the roulette machine. Cal&rsquo;s books are a good starting point. He may convince you to use them in a way that&rsquo;s less detrimental than the way these apps were designed to be used.</p>
]]></content:encoded></item><item><title>Open source for learning</title><link>https://atbk.dev/chainlink/</link><pubDate>Wed, 18 Dec 2024 00:00:00 +0000</pubDate><guid>https://atbk.dev/chainlink/</guid><description>&lt;p&gt;Early on in my career as a software engineer I decided to spend some of my spare time learning a little about how blockchain works. The reason I was interested in the technology was because many of my coworkers were discussing how revolutionary it was during lunch.
After spending some time reading about it I decided to learn some more.&lt;/p&gt;
&lt;p&gt;Prior to learning about blockchain I&amp;rsquo;d learned about how open source development can be a great learning tool and experience.
There were many projects to choose from so at first I wasn&amp;rsquo;t sure which project to work on.
After some research I decided to contribute to the &lt;a href="https://github.com/smartcontractkit/chainlink"&gt;Chainlink project&lt;/a&gt;. The project attempts to solve what&amp;rsquo;s known as the Oracle problem for blockchains.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Early on in my career as a software engineer I decided to spend some of my spare time learning a little about how blockchain works. The reason I was interested in the technology was because many of my coworkers were discussing how revolutionary it was during lunch.
After spending some time reading about it I decided to learn some more.</p>
<p>Prior to learning about blockchain I&rsquo;d learned about how open source development can be a great learning tool and experience.
There were many projects to choose from so at first I wasn&rsquo;t sure which project to work on.
After some research I decided to contribute to the <a href="https://github.com/smartcontractkit/chainlink">Chainlink project</a>. The project attempts to solve what&rsquo;s known as the Oracle problem for blockchains.</p>
<blockquote>
<p>The blockchain oracle problem refers to the inability of blockchains to access external data, making them isolated networks, akin to a computer with no Internet connection. Bridging the connection between the blockchain (onchain) and the outside world (offchain) requires an additional piece of infrastructure—an oracle.</p>
<p>from chain.link</p>
</blockquote>
<p>Chainlink also piqued my interest because the developers used Go, Ethereum and Solidity which were technologies I found interesting and wanted to learn about.
I immediately jumped in and over the course of a year I began working on various tasks like building out new command line commands, adding pagination to API endpoints, and contributing to the core of the chainlink <a href="https://docs.chain.link/chainlink-nodes">node</a>.</p>
<p>The project is an example of an excellent codebase.
I reference the chainlink codebase still today for best practices in Go standards and overall design.
The other great thing I got out of contributing to it was meeting some very talented people and they helped me grow.</p>
<p>Steve Ellis (Cofounder of Chainlink) and the maintainers provided me with great feedback.
That feedback was invaluable in helping me learn about Go, design patterns, and working with others remotely. This turned out to be a great decision because everything became remote during the COVID era.</p>
<p>If you&rsquo;re looking to learn about a specific set of technologies while working on a project that&rsquo;s interesting to you then try dabbling with open source.
You&rsquo;ll most likely find projects that are enjoyable and a breath of fresh air.
In the open source world you don&rsquo;t necessarily need to contribute code to benefit.
Being able to observe and study popular technologies is highly beneficial too.</p>
<p>Work that&rsquo;s contributed to open source impacts many people in a profound way.
Millions of developers rely on various open source technologies to build software without having to reinvent the wheel.
It&rsquo;s rewarding and fascinating that my code has been running on potentially thousands of different machines.</p>
<p>In the end I was able to use open source as a tool to assist me in learning new skills, advance my career, and meet knowledgeable people.
If you want to advance your understanding in any technology then give open source a try.</p>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>Too many aliases</title><link>https://atbk.dev/too-many-aliases/</link><pubDate>Sun, 03 Nov 2024 00:00:00 +0000</pubDate><guid>https://atbk.dev/too-many-aliases/</guid><description>&lt;p&gt;Everyone wants to master the art of the command line. We spend time learning the basics and early on we learn about aliases. If you install zsh and oh-my-zsh you&amp;rsquo;ll have so many aliases that you won&amp;rsquo;t know if you should summon one or type out the full command. Command line users typically have their aliases memorized by heart but there are some that don&amp;rsquo;t fully have your heart.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve devised an alias that helps you find that lovely little command you like to run. &lt;code&gt;fa&lt;/code&gt;. To know what find alias does (fa) we need to find it.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Everyone wants to master the art of the command line. We spend time learning the basics and early on we learn about aliases. If you install zsh and oh-my-zsh you&rsquo;ll have so many aliases that you won&rsquo;t know if you should summon one or type out the full command. Command line users typically have their aliases memorized by heart but there are some that don&rsquo;t fully have your heart.</p>
<p>I&rsquo;ve devised an alias that helps you find that lovely little command you like to run. <code>fa</code>. To know what find alias does (fa) we need to find it.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span>➜  blog git:<span style="color:#89dceb;font-weight:bold">(</span>master<span style="color:#89dceb;font-weight:bold">)</span> fa fa
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">2</span><span><span style="color:#f5e0dc">fa</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;alias | grep&#39;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">3</span><span><span style="color:#f5e0dc">gfa</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;git fetch --all --tags --prune --jobs=10&#39;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">4</span><span><span style="color:#f5e0dc">gofa</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;go fmt ./...&#39;</span></span></span></code></pre></div>
<p>This alias helps us search and grep for aliases by simply typing <code>fa keyword</code>. I&rsquo;ll conclude with how I use it.</p>
<p>I need to see commands that deal with volumes. So I type <code>fa volume</code> and I get the following.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span>➜  blog git:<span style="color:#89dceb;font-weight:bold">(</span>master<span style="color:#89dceb;font-weight:bold">)</span> fa volume
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">2</span><span><span style="color:#f5e0dc">dvi</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;docker volume inspect&#39;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">3</span><span><span style="color:#f5e0dc">dvls</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;docker volume ls&#39;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">4</span><span><span style="color:#f5e0dc">dvprune</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;docker volume prune&#39;</span></span></span></code></pre></div>
<p>If you want to have this alias for yourself simply add it to your bash/zshrc.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span><span style="color:#89dceb">alias</span> <span style="color:#f5e0dc">fa</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#39;alias | grep&#39;</span></span></span></code></pre></div>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>Informal pairing</title><link>https://atbk.dev/informal-pairing/</link><pubDate>Sat, 02 Nov 2024 00:00:00 +0000</pubDate><guid>https://atbk.dev/informal-pairing/</guid><description>&lt;p&gt;Having small informal calls with your teammates can be highly beneficial. This is something I&amp;rsquo;ve been doing since working as a remote employee. There are a few very notable benefits that happen during these calls.&lt;/p&gt;
&lt;p&gt;As a developer I&amp;rsquo;ve been using this strategy to mentor/pair/think with teammates. When I mentor or onboard someone new I spend a bit of time each week pairing with them. This is the only chance I usually get to understand the person at a deeper level. I&amp;rsquo;m then able to determine what kind of resources that person needs. The individuals that work with me on this always end up teaching me something new too.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Having small informal calls with your teammates can be highly beneficial. This is something I&rsquo;ve been doing since working as a remote employee. There are a few very notable benefits that happen during these calls.</p>
<p>As a developer I&rsquo;ve been using this strategy to mentor/pair/think with teammates. When I mentor or onboard someone new I spend a bit of time each week pairing with them. This is the only chance I usually get to understand the person at a deeper level. I&rsquo;m then able to determine what kind of resources that person needs. The individuals that work with me on this always end up teaching me something new too.</p>
<p>I noticed that the meetings tend to be very productive where a lot of information and knowledge is shared rapidly. I&rsquo;ve shared many small tips and tricks related to software development. Once I showed a teammate how good fzf was and it blew their mind. The biggest advantage is that both people level up and can usually focus really well.</p>
<p>Keep these sessions short and sweet and if you&rsquo;re finding them extremely advantageous do them regularly.</p>
<p>Not everyone likes to do this because some people are introverted but some love it.</p>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>Timezone testing locally</title><link>https://atbk.dev/timezone-tests/</link><pubDate>Thu, 24 Oct 2024 00:00:00 +0000</pubDate><guid>https://atbk.dev/timezone-tests/</guid><description>&lt;p&gt;Have you ever had failing tests when testing locally but not in your CI/CD platform? There&amp;rsquo;s an easy fix to get around this in any programming language.&lt;/p&gt;
&lt;p&gt;There have been instances where I&amp;rsquo;ve had to make adjustments in my code so that I could get tests to pass locally. Some developers might accidentally write unit tests without knowing that those unit tests will fail on another machine in a different timezone. Code that will fail on a different machine can look like this.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Have you ever had failing tests when testing locally but not in your CI/CD platform? There&rsquo;s an easy fix to get around this in any programming language.</p>
<p>There have been instances where I&rsquo;ve had to make adjustments in my code so that I could get tests to pass locally. Some developers might accidentally write unit tests without knowing that those unit tests will fail on another machine in a different timezone. Code that will fail on a different machine can look like this.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-golang" data-lang="golang"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span><span style="color:#6c7086;font-style:italic">// this code asserts that the timestamp is equal to the value below</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">2</span><span><span style="color:#6c7086;font-style:italic">// assume the one who wrote this has their machine set to UTC</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">3</span><span>got <span style="color:#89dceb;font-weight:bold">:=</span> time.<span style="color:#89b4fa">Unix</span>(<span style="color:#fab387">1729825337</span>, <span style="color:#fab387">0</span>).<span style="color:#89b4fa">Format</span>(time.RFC3339)
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">4</span><span>assert.<span style="color:#89b4fa">Equal</span>(t, <span style="color:#a6e3a1">&#34;2024-10-25T03:02:17Z&#34;</span>, got)</span></span></code></pre></div>
<p>If you run the above 2 lines on a machine not in the utc timezone you&rsquo;ll get an error. This is because time.Unix will use the local timezone of the machine.</p>
<p>Output on my machine</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 1</span><span>➜  days git:<span style="color:#89dceb;font-weight:bold">(</span>master<span style="color:#89dceb;font-weight:bold">)</span> go <span style="color:#89dceb">test</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 2</span><span>--- FAIL: TestTimeAssertion <span style="color:#89dceb;font-weight:bold">(</span>0.00s<span style="color:#89dceb;font-weight:bold">)</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 3</span><span>    time_test.go:24:
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 4</span><span>        Error Trace:    time_test.go:24
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 5</span><span>        Error:          Not equal:
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 6</span><span>                        expected: <span style="color:#a6e3a1">&#34;2024-10-25T03:02:17Z&#34;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 7</span><span>                        actual  : <span style="color:#a6e3a1">&#34;2024-10-24T22:02:17-05:00&#34;</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 8</span><span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c"> 9</span><span>                        Diff:
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">10</span><span>                        --- Expected
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">11</span><span>                        +++ Actual
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">12</span><span>                        @@ -1 +1 @@
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">13</span><span>                        -2024-10-25T03:02:17Z
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">14</span><span>                        +2024-10-24T22:02:17-05:00
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">15</span><span>        Test:           TestTimeAssertion
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">16</span><span>FAIL
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">17</span><span><span style="color:#89dceb">exit</span> status <span style="color:#fab387">1</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">18</span><span>FAIL    github.com/whatsadebugger/golangplaybook/days   0.115s</span></span></code></pre></div>
<p>There is a short and sweet solution. You could match your timezone to match what&rsquo;s written in the test. This helps you avoid rewriting many lines of code where the timezone is using local time. This approach is sometimes seen as a hack rather than a fix by some.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span>➜ <span style="color:#f5e0dc">TZ</span><span style="color:#89dceb;font-weight:bold">=</span><span style="color:#a6e3a1">&#34;UTC&#34;</span> go <span style="color:#89dceb">test</span>
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">2</span><span>PASS
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">3</span><span>ok      github.com/whatsadebugger/golangplaybook/days   0.112s</span></span></code></pre></div>
<p>When writing code it helps to validate that it can work on any machine to reduce friction. This helps developers/consumers of the application tremendously.
In my career I&rsquo;ve seen many instances where it&rsquo;s difficult to run <code>go test</code> without setting up dependencies.</p>
<p>Setting the timezone explicitly here creates a specific expectation that&rsquo;s reproducible across machines.</p>






<div class="highlight"><pre tabindex="0" style="color:#cdd6f4;background-color:#1e1e2e;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-golang" data-lang="golang"><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">1</span><span>got <span style="color:#89dceb;font-weight:bold">:=</span> time.<span style="color:#89b4fa">Unix</span>(<span style="color:#fab387">1729825337</span>, <span style="color:#fab387">0</span>).<span style="color:#89b4fa">UTC</span>().<span style="color:#89b4fa">Format</span>(time.RFC3339)
</span></span><span style="display:flex;"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f849c">2</span><span>assert.<span style="color:#89b4fa">Equal</span>(t, <span style="color:#a6e3a1">&#34;2024-10-25T03:02:17Z&#34;</span>, got)</span></span></code></pre></div>
<p>Thank you for reading.</p>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>Better Examples</title><link>https://atbk.dev/better-examples/</link><pubDate>Mon, 14 Oct 2024 00:00:00 +0000</pubDate><guid>https://atbk.dev/better-examples/</guid><description>&lt;p&gt;In this post we&amp;rsquo;ll talk about creating good examples.
More effort should go into writing good examples. Any Codebase or API that lacks examples is usually harder to understand and integrate with.&lt;/p&gt;
&lt;p&gt;When creating a new function or api one might assume that the caller of that api is very familiar with it.
This assumption can lead to friction and potentially make it more difficult for the consumer. A good interface should assume the caller has as little understanding as possible.&lt;/p&gt;</description><content:encoded><![CDATA[<p>In this post we&rsquo;ll talk about creating good examples.
More effort should go into writing good examples. Any Codebase or API that lacks examples is usually harder to understand and integrate with.</p>
<p>When creating a new function or api one might assume that the caller of that api is very familiar with it.
This assumption can lead to friction and potentially make it more difficult for the consumer. A good interface should assume the caller has as little understanding as possible.</p>
<p>The go ecosystem contains some examples where documentation is easy to consume and learn from.</p>
<p>Let&rsquo;s show an example from the fmt package explaining fmt.FprintF. This example is taken from <a href="https://pkg.go.dev/fmt#Fprint">here</a>. I&rsquo;ve also added the go doc string below.</p>
<p>Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered.</p>






<pre tabindex="0"><code>func main() {
    const name, age = &#34;Kim&#34;, 22
    n, err := fmt.Fprint(os.Stdout, name, &#34; is &#34;, age, &#34; years old.\n&#34;)

    // The n and err return values from Fprint are
    // those returned by the underlying io.Writer.
    if err != nil {
    fmt.Fprintf(os.Stderr, &#34;Fprint: %v\n&#34;, err)
    }
    fmt.Print(n, &#34; bytes written.\n&#34;)
}</code></pre>






<pre tabindex="0"><code>Output:

Kim is 22 years old.
21 bytes written.</code></pre>
<p>This example does multiple things well. It explains what it&rsquo;s going to do with your input and it explains how it&rsquo;s going to respond. I don&rsquo;t think you&rsquo;ll need to jump inside of that function to read it&rsquo;s implementation any time soon.</p>
<p>In an ideal world you&rsquo;d have an interface that callers could intuitively understand and utilize with minimal effort.</p>
<p>Here&rsquo;s a fantastic resource that I used early on in my career to learn go. <a href="https://gobyexample.com/">gobyexample.com</a></p>
<p><a href="/blog" class="button">← Back to Posts</a></p>
]]></content:encoded></item><item><title>About</title><link>https://atbk.dev/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://atbk.dev/about/</guid><description>&lt;p&gt;In this page I mention my career and technical background.&lt;/p&gt;
&lt;p&gt;This all began back in 2012 when I began studying computer science at the University of Texas at Dallas. Programming was a new concept to me at the time and it was tough at first. The courses that we attended back then focused on the OG curriculum of C++, Java, Data structures, Algorithms, and various Operating Systems classes. Graduation approached much quicker than I could have ever anticipated. My job search was concluded after no-lifing a Java book for many hours in my last semester.&lt;/p&gt;</description><content:encoded><![CDATA[<p>In this page I mention my career and technical background.</p>
<p>This all began back in 2012 when I began studying computer science at the University of Texas at Dallas. Programming was a new concept to me at the time and it was tough at first. The courses that we attended back then focused on the OG curriculum of C++, Java, Data structures, Algorithms, and various Operating Systems classes. Graduation approached much quicker than I could have ever anticipated. My job search was concluded after no-lifing a Java book for many hours in my last semester.</p>
<p>Jail software is an interesting domain to start with as a fresh software engineer. Jail software makes you realize that even inmates are at the mercy of computers. This organization was also pretty OG as they were still using Visual Basic, and many many different versions of Visual Studio. The initial setup took days and many agonizing hours of tuning windows to have the right settings and version. The engineers that worked here were spectacular and friendly. The office was quiet and filled with cubicles which I came to realize later on were actually not that bad. One day during lunch I learned about blockchain. After a few conversations about how revolutionary this technology was I wanted to learn more. This led me to contribute to some open source projects written in Golang.</p>
<p>My first introduction to Golang was in 2017 where I contributed to Chainlink an Oracle software (connect blockchains to the internet). Golang became my bread and butter and miraculously it turned out that many companies were looking for this language. After attending a Golang meetup hosted at Toyota Connected I applied to work there.</p>
<p>At Toyota I worked on supporting and building the in vehicle virtual assistant. That assistant uses real time voice data to assist users in navigation and other various domains like calendar. The goal of this project was to use machine learning models that we trained ourselves to figure out what a user wants. If they wanted to go to Starbucks we&rsquo;d route them there in real time. Testing this project was difficult due to the probabilistic nature of machine learning systems. We had to ensure none of our use cases broke during a deploy. This led to a very comprehensive integration testing framework that&rsquo;s in use till today.</p>
<p>Toyota also taught me about the &ldquo;fun&rdquo; world of kubernetes. As a developer there were already enough things to learn and master. In a serious sense I&rsquo;d describe kubernetes as container orchestration platform that makes it easy to deploy hundreds of services in real time. Along with monitoring and rollback capabilities and many other deployment steroids. A less serious description I&rsquo;d give kubernetes is that it&rsquo;s just YAML. Kubernetes is YAML.</p>
<p>After spending some time writing go/python at a few companies I eventually end up working at Bitly where I wrote more Golang.</p>
<p>I was on the QR Code team building and maintaining a new product. QR Codes are everywhere and this was an impactful project. We built a system to generate QR Codes in real time but they also had to be more aesthetic. At first the QR Codes product only had minor customizations and a few color options. As a team we improved it a lot in a short time span. We added the ability to create any color, color gradients, crazy shapes, frames, and templates (preset settings of colors).</p>
<p>Since my first day of programming I developed a love for using the terminal.
I&rsquo;m not sure why I started obsessively using the command line but it drew me in for being insanely cool. Being a command line user leads you down different rabbit holes of hacker like optimizations. Vim is one of those optimizations that will always show up if you spend any time in the terminal. If you start learning vim you&rsquo;ll wonder why a sane person would do this to themselves. There is no autocomplete in most cases and moving requires spamming ctrl-d and ctrl-u all day to navigate files. Eventually I became some sort of wizard to everyone.</p>
<p>As a backend engineer in a distributed systems it was a necessity to have good debugging and profiling skills. These are my favorite tools to understand what happens at a deeper level in any system. The skills came in handy every time there was a memory leak or weird bug. It helps being able to set break points and follow the execution of a program.</p>
<p>After learning the coolest technology and techniques I began teaching others. Explaining things simply to others is something I excel at doing. Once I grasp a concept or idea my goal is to help impart that knowledge to others so that everyone benefits.</p>
<p>Non Exhaustive list Technology that i&rsquo;ve used</p>
<ul>
<li>Golang</li>
<li>Kubernetes</li>
<li>Git</li>
<li>Bash</li>
<li>cloud ( Amazon web services, Google Cloud Platform )</li>
<li>pprof (golang&rsquo;s performance profiler)</li>
<li>debugging ( delve )</li>
<li>Chainlink</li>
<li>Datadog</li>
<li>Redis</li>
<li>Postgres</li>
<li>Docker</li>
<li>Make</li>
<li>Google APIs</li>
<li>Building and Integrating Oauth</li>
</ul>
<p>Contact/Online Presence<br>
<a href="https://github.com/whatsadebugger">Github</a><br>
<a href="https://www.linkedin.com/in/ahmadtabbakha/">Linkedin</a><br>
<a href="https://drive.google.com/file/d/1HlIrZwH1bQvFIQwl4hje-3myI_53rY9M">Resume</a></p>
]]></content:encoded></item></channel></rss>