<?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: Tala Amm</title>
    <description>The latest articles on DEV Community by Tala Amm (@talaamm).</description>
    <link>https://dev.to/talaamm</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%2F3326618%2F7e5f6adc-d76a-443d-8328-694a04e52442.png</url>
      <title>DEV Community: Tala Amm</title>
      <link>https://dev.to/talaamm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/talaamm"/>
    <language>en</language>
    <item>
      <title>Host Your JSON File in 2 minutes FOR FREE</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Fri, 05 Jun 2026 20:18:00 +0000</pubDate>
      <link>https://dev.to/talaamm/wanna-host-json-data-you-might-already-have-everything-you-need-193g</link>
      <guid>https://dev.to/talaamm/wanna-host-json-data-you-might-already-have-everything-you-need-193g</guid>
      <description>&lt;p&gt;Many people ask: What is the best solution to host a simple JSON file and fetch it? Recently, I needed a place to host a JSON file without setting up a server, database, or paying for storage.&lt;/p&gt;

&lt;p&gt;Turns out, if you have a GitHub account, you can use &lt;strong&gt;GitHub Gists&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create a new Gist
&lt;/h2&gt;

&lt;p&gt;Go to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and from the dropdown choose Gists.&lt;/p&gt;

&lt;p&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%2Fwmczkth1c6wmzc8hev8v.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%2Fwmczkth1c6wmzc8hev8v.png" alt="Github gists" width="503" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Create a Gist.&lt;/p&gt;

&lt;p&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%2F24vs7qcmkvffpbzx92e3.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%2F24vs7qcmkvffpbzx92e3.png" alt="create a gist button" width="621" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give your file a name such as &lt;code&gt;data.json&lt;/code&gt;, file description is &lt;strong&gt;optional&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Paste your data or upload it as a file from the button below.
&lt;/h2&gt;

&lt;p&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%2Fnv8kui4r4ihf1ru68ulj.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%2Fnv8kui4r4ihf1ru68ulj.png" alt="adding json data" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Save and Publish Gist
&lt;/h2&gt;

&lt;p&gt;Before clicking on Create Gist, you can choose whether it's a &lt;strong&gt;Secret Gist&lt;/strong&gt; or a &lt;strong&gt;Public Gist&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For JSON data hosting, choosing &lt;strong&gt;Secret Gist&lt;/strong&gt; is better&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But here is a Quick Comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Public Gists&lt;/th&gt;
&lt;th&gt;Secret Gists&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Searchable?&lt;/td&gt;
&lt;td&gt;Yes, via search engines and GitHub (show up in "Discover" feed).&lt;/td&gt;
&lt;td&gt;No, completely unlisted.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visible on Profile?&lt;/td&gt;
&lt;td&gt;Yes, visible to anyone visiting your profile.&lt;/td&gt;
&lt;td&gt;No, only visible to you when logged in.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Appears in Discover Feed?&lt;/td&gt;
&lt;td&gt;Yes, listed on the global feed.&lt;/td&gt;
&lt;td&gt;No.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessible via URL?&lt;/td&gt;
&lt;td&gt;Yes, anyone with the link can view it.&lt;/td&gt;
&lt;td&gt;Yes, anyone with the link can view it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best Used for&lt;/td&gt;
&lt;td&gt;Sharing useful code snippets, templates, or instructions with the developer community.&lt;/td&gt;
&lt;td&gt;Keeping personal work notes, saving scratchpad code, or sharing snippets with a limited audience.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Crucial Security Warning&lt;br&gt;
Secret gists are not secure vaults. If someone guesses, intercepts, or stumbles upon the URL of your secret gist, they can read all of its contents. &lt;strong&gt;Never store API keys, passwords&lt;/strong&gt;, or confidential database credentials inside a secret gist. In fact, GitHub actively applies automated secret scanning to secret gists to catch leaked credentials.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&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%2Fpt3hkldaghjsj5irmyac.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%2Fpt3hkldaghjsj5irmyac.png" alt="public-secret-gists" width="317" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub will now host that file for you and keep a version history whenever you update it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Get the Raw Link
&lt;/h2&gt;

&lt;p&gt;Now the most important part.&lt;/p&gt;

&lt;p&gt;Open your file and click Raw.&lt;/p&gt;

&lt;p&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%2F9awozvch6unn2pp2m1vw.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%2F9awozvch6unn2pp2m1vw.png" alt="Raw button in gist" width="799" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub will redirect you to a URL that looks something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gist.githubusercontent.com/username/gist-id/raw/8c6f8d7f2d1a4f4f7f9f/data.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that random-looking section after &lt;code&gt;/raw/&lt;/code&gt;?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8c6f8d7f2d1a4f4f7f9f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's tied to a specific time version of your gist.&lt;/p&gt;

&lt;p&gt;If you use that URL and later update your JSON, your application may keep fetching the old version.&lt;/p&gt;

&lt;p&gt;Instead, remove the revision hash and keep only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gist.githubusercontent.com/username/gist-id/raw/data.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now every request will fetch the latest version of your file.&lt;/p&gt;

&lt;p&gt;That's it!&lt;/p&gt;




&lt;p&gt;Why I liked this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free hosting&lt;/li&gt;
&lt;li&gt;Version history&lt;/li&gt;
&lt;li&gt;No Backend&lt;/li&gt;
&lt;li&gt;No Database&lt;/li&gt;
&lt;li&gt;Easy to update&lt;/li&gt;
&lt;li&gt;Public access through a URL&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This works great for small datasets, configs, portfolios, mock APIs, and personal projects. If your JSON starts reaching tens of megabytes, you should probably consider a real storage solution rather than a Gist.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes the simplest backend is no backend at all 😄!&lt;/p&gt;

</description>
      <category>json</category>
      <category>github</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Thought More Threads ALWAYS Improve Performance, My Assumption Was Wrong!</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Fri, 05 Jun 2026 13:14:23 +0000</pubDate>
      <link>https://dev.to/talaamm/i-thought-more-threads-always-improve-performance-my-assumption-was-wrong-370k</link>
      <guid>https://dev.to/talaamm/i-thought-more-threads-always-improve-performance-my-assumption-was-wrong-370k</guid>
      <description>&lt;h1&gt;
  
  
  I Thought More Threads Would Make Matrix Multiplication Faster. My Benchmarks Said Otherwise.
&lt;/h1&gt;

&lt;p&gt;When I started implementing multithreaded matrix multiplication, I thought I already knew how the results would look.&lt;/p&gt;

&lt;p&gt;More threads should mean better performance.&lt;/p&gt;

&lt;p&gt;Right?&lt;/p&gt;

&lt;p&gt;After all, if one thread performs the work in one second, then two threads should finish in roughly half a second, four threads should be even faster, and sixteen threads should be significantly better.&lt;/p&gt;

&lt;p&gt;That intuition sounds reasonable.&lt;/p&gt;

&lt;p&gt;My benchmarks told a different story.&lt;/p&gt;

&lt;p&gt;In this article, I'll walk through the experiment, the implementations, the benchmark results, and the surprising lessons I learned about parallel programming, cache locality, and performance engineering.&lt;/p&gt;




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

&lt;p&gt;The objective was simple:&lt;/p&gt;

&lt;p&gt;Implement matrix multiplication in C using POSIX threads and compare different workload distribution strategies.&lt;/p&gt;

&lt;p&gt;I implemented four versions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sequential baseline&lt;/li&gt;
&lt;li&gt;Row-wise parallel multiplication&lt;/li&gt;
&lt;li&gt;Column-wise parallel multiplication&lt;/li&gt;
&lt;li&gt;Block-based (tiled) parallel multiplication&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then I benchmarked them using several matrix sizes and thread counts.&lt;/p&gt;

&lt;p&gt;The goal was not only to measure execution time, but to understand why certain approaches performed better than others.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Matrix Multiplication?
&lt;/h2&gt;

&lt;p&gt;Matrix multiplication is one of the most common operations in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Machine learning&lt;/li&gt;
&lt;li&gt;Scientific computing&lt;/li&gt;
&lt;li&gt;Computer graphics&lt;/li&gt;
&lt;li&gt;Numerical simulation&lt;/li&gt;
&lt;li&gt;High-performance computing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The classic algorithm performs a huge number of arithmetic operations.&lt;/p&gt;

&lt;p&gt;For an &lt;code&gt;N×N&lt;/code&gt; matrix:&lt;/p&gt;

&lt;p&gt;The time complexity is: &lt;code&gt;O(N³)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This makes it an excellent candidate for parallelization.&lt;/p&gt;

&lt;p&gt;There is a lot of work to distribute among threads.&lt;/p&gt;

&lt;p&gt;Or at least that's what I thought.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Baseline
&lt;/h2&gt;

&lt;p&gt;Before introducing threads, I implemented a traditional single-threaded matrix multiplication algorithm.&lt;/p&gt;

&lt;p&gt;The baseline served two purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Correctness reference&lt;/li&gt;
&lt;li&gt;Performance comparison point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every parallel implementation was verified against the baseline output.&lt;/p&gt;

&lt;p&gt;This turned out to be more important than expected because one of my parallel implementations initially produced incorrect results despite appearing to run faster.&lt;/p&gt;

&lt;p&gt;Performance is meaningless if the answers are wrong.&lt;/p&gt;




&lt;h3&gt;
  
  
  Strategy 1: Row-Wise Parallelization
&lt;/h3&gt;

&lt;p&gt;The first parallel approach divided the output matrix rows among threads.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Thread 1 computes rows 0–249&lt;/p&gt;

&lt;p&gt;Thread 2 computes rows 250–499&lt;/p&gt;

&lt;p&gt;And so on.&lt;/p&gt;

&lt;p&gt;This strategy has a nice property:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Each thread writes to a completely separate region of memory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No locks. No mutexes.&lt;/p&gt;

&lt;p&gt;No synchronization overhead.&lt;/p&gt;

&lt;p&gt;It is conceptually simple and relatively cache-friendly.&lt;/p&gt;

&lt;p&gt;I expected this implementation to perform well.&lt;/p&gt;

&lt;p&gt;And it did.&lt;/p&gt;




&lt;h3&gt;
  
  
  Strategy 2: Column-Wise Parallelization
&lt;/h3&gt;

&lt;p&gt;The second approach divided columns among threads.&lt;/p&gt;

&lt;p&gt;At first glance, it seemed almost identical to row-wise decomposition.&lt;/p&gt;

&lt;p&gt;The amount of mathematical work was nearly the same.&lt;/p&gt;

&lt;p&gt;The number of threads was the same.&lt;/p&gt;

&lt;p&gt;The matrix dimensions were the same.&lt;/p&gt;

&lt;p&gt;So I expected similar performance.&lt;/p&gt;

&lt;p&gt;I was wrong. Very wrong.&lt;/p&gt;

&lt;p&gt;The column-wise implementation became one of the most interesting results in the entire project.&lt;/p&gt;




&lt;h3&gt;
  
  
  Strategy 3: Block-Based Parallelization
&lt;/h3&gt;

&lt;p&gt;The final approach used tiled matrix multiplication.&lt;/p&gt;

&lt;p&gt;Instead of processing entire rows or columns, matrices were divided into smaller blocks.&lt;/p&gt;

&lt;p&gt;Each thread worked on groups of tiles.&lt;/p&gt;

&lt;p&gt;The idea was to improve cache utilization.&lt;/p&gt;

&lt;p&gt;Modern CPUs are incredibly fast at arithmetic.&lt;/p&gt;

&lt;p&gt;What often slows programs down is moving data between memory and the processor.&lt;/p&gt;

&lt;p&gt;By keeping smaller regions of matrices inside cache longer, block-based multiplication attempts to reduce expensive memory accesses.&lt;/p&gt;

&lt;p&gt;This turned out to be the winning strategy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Benchmark Setup
&lt;/h2&gt;

&lt;p&gt;Hardware:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AMD Athlon Silver 7120U&lt;/li&gt;
&lt;li&gt;2 CPU cores / 4 Logical Processors&lt;/li&gt;
&lt;li&gt;WSL Ubuntu&lt;/li&gt;
&lt;li&gt;GCC with -O2 optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Matrix sizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100×100&lt;/li&gt;
&lt;li&gt;500×500&lt;/li&gt;
&lt;li&gt;1000×1000&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thread counts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2&lt;/li&gt;
&lt;li&gt;8&lt;/li&gt;
&lt;li&gt;16&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each experiment was repeated multiple times and average execution times were recorded. You can &lt;a href="https://github.com/talaamm/Matrix-Multiplication-Performance-Analysis/blob/main/results/all-outputs.txt" rel="noopener noreferrer"&gt;find them here&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How Matrix Size Changed Everything
&lt;/h2&gt;

&lt;p&gt;The thread-count experiments were only part of the story.&lt;/p&gt;

&lt;p&gt;I also wanted to understand how each implementation behaved as the problem size increased.&lt;/p&gt;

&lt;p&gt;To do this, I benchmarked three matrix dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100×100&lt;/li&gt;
&lt;li&gt;500×500&lt;/li&gt;
&lt;li&gt;1000×1000&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The resulting execution-time graph for each 16 threads strategy, revealed a pattern that is common in high-performance computing but easy to overlook.&lt;/p&gt;

&lt;p&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%2Fgy57cb0isdgpoug2puci.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%2Fgy57cb0isdgpoug2puci.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For small matrices, there was relatively little difference between implementations.&lt;/p&gt;

&lt;p&gt;In some cases, the sequential baseline was actually faster than the multithreaded versions.&lt;/p&gt;

&lt;p&gt;This might seem surprising at first.&lt;/p&gt;

&lt;p&gt;After all, multiple threads should mean more computational power.&lt;/p&gt;

&lt;p&gt;The explanation lies in overhead.&lt;/p&gt;

&lt;p&gt;Creating threads, scheduling them, and coordinating their work introduces additional cost.&lt;/p&gt;

&lt;p&gt;For small workloads, these costs represent a significant fraction of the total execution time.&lt;/p&gt;

&lt;p&gt;The computational problem simply isn't large enough to benefit from parallelism.&lt;/p&gt;

&lt;p&gt;As matrix size increased, however, the situation changed dramatically.&lt;/p&gt;

&lt;p&gt;The amount of arithmetic work in matrix multiplication grows approximately with O(N³).&lt;/p&gt;

&lt;p&gt;This means that increasing matrix dimensions has a much larger effect on runtime than many developers initially expect.&lt;/p&gt;

&lt;p&gt;A 1000×1000 multiplication is not merely ten times larger than a 100×100 multiplication.&lt;/p&gt;

&lt;p&gt;It requires roughly one thousand times more arithmetic operations.&lt;/p&gt;

&lt;p&gt;As the workload increased, the overhead of thread management became relatively less important.&lt;/p&gt;

&lt;p&gt;The actual computation began to dominate execution time.&lt;/p&gt;

&lt;p&gt;This is where the advantages of parallel execution became visible.&lt;/p&gt;

&lt;p&gt;The row-wise and block-based implementations began outperforming the sequential baseline by increasingly larger margins.&lt;/p&gt;

&lt;p&gt;The block-based implementation showed the strongest scalability.&lt;/p&gt;

&lt;p&gt;Its execution time increased more slowly than the other approaches as matrix size grew.&lt;/p&gt;

&lt;p&gt;This suggests that its cache-friendly design becomes more valuable as the amount of data increases.&lt;/p&gt;

&lt;p&gt;Interestingly, the column-wise implementation did not scale as effectively.&lt;/p&gt;

&lt;p&gt;As matrix dimensions increased, its inefficient memory access patterns generated more cache misses and reduced overall performance.&lt;/p&gt;

&lt;p&gt;The graph highlights an important principle of performance engineering:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Optimization strategies that appear insignificant on small datasets often become critical on large datasets.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is why benchmarking only small inputs can be misleading.&lt;/p&gt;

&lt;p&gt;A program that appears efficient for a 100×100 matrix may behave very differently when processing matrices that are ten or one hundred times larger.&lt;/p&gt;

&lt;p&gt;The matrix-size experiments demonstrated that scalability is not only about adding threads.&lt;/p&gt;

&lt;p&gt;It is also about ensuring that memory access patterns remain efficient as the workload grows.&lt;/p&gt;

&lt;p&gt;In this project, the block-based implementation achieved the best balance between parallelism and memory efficiency, allowing it to scale more effectively than the other approaches.&lt;/p&gt;




&lt;h2&gt;
  
  
  The First Surprise: More Threads Didn't Always Help
&lt;/h2&gt;

&lt;p&gt;One of the assumptions I made, as a beginner, about parallel programming is:&lt;/p&gt;

&lt;p&gt;"More threads equals more speed."&lt;/p&gt;

&lt;p&gt;The benchmark results immediately challenged that assumption.&lt;/p&gt;

&lt;p&gt;For smaller matrices, multithreading often performed worse than the sequential implementation.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because threads are not free.&lt;/p&gt;

&lt;p&gt;Creating threads costs time.&lt;/p&gt;

&lt;p&gt;Scheduling threads costs time.&lt;/p&gt;

&lt;p&gt;Context switching costs time.&lt;/p&gt;

&lt;p&gt;Managing threads introduces overhead.&lt;/p&gt;

&lt;p&gt;When the workload is small, those costs can exceed the benefit of parallel execution.&lt;/p&gt;

&lt;p&gt;The computation simply isn't large enough to justify the extra complexity.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Second Surprise: Row-Wise and Column-Wise Were Not Equal
&lt;/h2&gt;

&lt;p&gt;This was the most interesting result of the project.&lt;/p&gt;

&lt;p&gt;Row-wise decomposition consistently outperformed column-wise decomposition.&lt;/p&gt;

&lt;p&gt;At first this seemed strange.&lt;/p&gt;

&lt;p&gt;Both implementations perform essentially the same arithmetic operations.&lt;/p&gt;

&lt;p&gt;So why the difference?&lt;/p&gt;

&lt;p&gt;The answer lies in memory layout.&lt;/p&gt;

&lt;p&gt;Matrices were stored in row-major order.&lt;/p&gt;

&lt;p&gt;That means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;A&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="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;A&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;A&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;A&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="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which are adjacent in memory.&lt;/p&gt;

&lt;p&gt;Rows are contiguous.&lt;/p&gt;

&lt;p&gt;Columns are not.&lt;/p&gt;

&lt;p&gt;When the row-wise implementation accessed matrix elements, it often read memory sequentially.&lt;/p&gt;

&lt;p&gt;Processors love sequential memory access.&lt;/p&gt;

&lt;p&gt;Caches become highly effective.&lt;/p&gt;

&lt;p&gt;The column-wise implementation frequently jumped around memory. In physical RAM addresses, it would look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0x02, 0x06, 0x0A, 0x0E, ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because of the row-major layout, column elements are physically separated by a "stride" (the width of the row). &lt;/p&gt;

&lt;p&gt;Those jumps cause more cache misses, and stalls.&lt;/p&gt;

&lt;p&gt;Because the data brought into the cache is thrown away unused.&lt;/p&gt;

&lt;p&gt;More cache misses meant more trips to slower memory RAM to fetch the next value.&lt;/p&gt;

&lt;p&gt;The arithmetic was the same.&lt;/p&gt;

&lt;p&gt;The memory behavior was not.&lt;/p&gt;

&lt;p&gt;And memory behavior won.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Third Surprise: Cache Locality Was More Important Than Thread Count
&lt;/h2&gt;

&lt;p&gt;The best-performing implementation was not simply the one with the most threads.&lt;/p&gt;

&lt;p&gt;It was the one with the best cache behavior.&lt;/p&gt;

&lt;p&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%2F7og8ytca96v4a38v48px.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%2F7og8ytca96v4a38v48px.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The block-based algorithm consistently produced the strongest results.&lt;/p&gt;

&lt;p&gt;The reason wasn't additional parallelism.&lt;/p&gt;

&lt;p&gt;It was improved cache reuse.&lt;/p&gt;

&lt;p&gt;The same arithmetic operations were being performed.&lt;/p&gt;

&lt;p&gt;But the processor spent less time waiting for memory.&lt;/p&gt;

&lt;p&gt;This was one of the most valuable lessons from the project.&lt;/p&gt;

&lt;p&gt;Performance engineering is often about moving data efficiently rather than performing calculations faster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Speedup
&lt;/h2&gt;

&lt;p&gt;To evaluate parallel performance, I measured speedup.&lt;/p&gt;

&lt;p&gt;Speedup is defined as:&lt;/p&gt;

&lt;p&gt;Speedup = Sequential Time / Parallel Time&lt;/p&gt;

&lt;p&gt;A speedup of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1.0 means no improvement&lt;/li&gt;
&lt;li&gt;2.0 means twice as fast&lt;/li&gt;
&lt;li&gt;4.0 means four times as fast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&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%2F4s8a1nuygiqrfa349g9x.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%2F4s8a1nuygiqrfa349g9x.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The block-based implementation achieved the highest speedup.&lt;/p&gt;

&lt;p&gt;However, another interesting pattern emerged.&lt;/p&gt;

&lt;p&gt;The speedup did not scale linearly with thread count.&lt;/p&gt;

&lt;p&gt;Doubling the number of threads did not double the performance.&lt;/p&gt;

&lt;p&gt;This is a classic result in parallel computing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Efficiency
&lt;/h2&gt;

&lt;p&gt;After computing speedup, I calculated efficiency.&lt;/p&gt;

&lt;p&gt;Efficiency = Speedup / Threads&lt;/p&gt;

&lt;p&gt;This metric measures how effectively each thread contributes useful work.&lt;/p&gt;

&lt;p&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%2Fmsefaccglkzx3vr59rbq.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%2Fmsefaccglkzx3vr59rbq.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One surprising observation was:&lt;/p&gt;

&lt;p&gt;Execution time improved while efficiency decreased.&lt;/p&gt;

&lt;p&gt;At first this seems contradictory. But it isn't.&lt;/p&gt;

&lt;p&gt;The program was getting faster.&lt;/p&gt;

&lt;p&gt;But each additional thread contributed less benefit than the previous one.&lt;/p&gt;

&lt;p&gt;This phenomenon is called diminishing returns.&lt;/p&gt;

&lt;p&gt;It appears in almost every parallel system.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Efficiency Drops
&lt;/h3&gt;

&lt;p&gt;As more threads are added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scheduling overhead increases&lt;/li&gt;
&lt;li&gt;Context switching increases&lt;/li&gt;
&lt;li&gt;Cache contention increases&lt;/li&gt;
&lt;li&gt;Memory bandwidth becomes shared&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Eventually the overhead begins to dominate.&lt;/p&gt;

&lt;p&gt;The program may still become faster.&lt;/p&gt;

&lt;p&gt;Just not proportionally faster.&lt;/p&gt;

&lt;p&gt;This explains why efficiency graphs often trend downward even when performance continues to improve.&lt;/p&gt;




&lt;h2&gt;
  
  
  Hardware Matters
&lt;/h2&gt;

&lt;p&gt;One important limitation of my experiment was hardware.&lt;/p&gt;

&lt;p&gt;The machine only had a small number of CPU cores.&lt;/p&gt;

&lt;p&gt;Despite testing 8 and 16 threads, the processor could not execute all of them simultaneously.&lt;/p&gt;

&lt;p&gt;The operating system had to continuously schedule and reschedule threads.&lt;/p&gt;

&lt;p&gt;This limited scalability.&lt;/p&gt;

&lt;p&gt;The results illustrate a fundamental principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Software parallelism cannot completely overcome hardware limitations, we still need some hardware support.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At some point, the hardware becomes the bottleneck.&lt;/p&gt;

&lt;p&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%2Fxrgiltkj187rnw9lwnc8.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%2Fxrgiltkj187rnw9lwnc8.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;This project taught me several lessons that I fully appreciate after running real benchmarks.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;More threads do not guarantee better performance.&lt;/li&gt;
&lt;li&gt;Memory access patterns matter enormously.&lt;/li&gt;
&lt;li&gt;Cache locality can outweigh algorithmic differences.&lt;/li&gt;
&lt;li&gt;Benchmarking often disproves intuition.&lt;/li&gt;
&lt;li&gt;Correctness verification is essential.&lt;/li&gt;
&lt;li&gt;Performance engineering is as much about memory as computation.&lt;/li&gt;
&lt;li&gt;Smaller benchmarks create "Performance Illusions".&lt;/li&gt;
&lt;li&gt;Parallelism introduces a "thread tax" (creation, context switching, and synchronization overhead).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Perhaps the biggest lesson was that performance optimization should be driven by measurements, not assumptions.&lt;/p&gt;

&lt;p&gt;Several results contradicted my expectations.&lt;/p&gt;

&lt;p&gt;Without benchmarks, I would have drawn the wrong conclusions.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Before this project, I viewed multithreading primarily as a way to divide work.&lt;/p&gt;

&lt;p&gt;After this project, I see it differently.&lt;/p&gt;

&lt;p&gt;The number of threads is only one piece of the puzzle.&lt;/p&gt;

&lt;p&gt;Memory layout, cache behavior, workload distribution, and hardware characteristics can have a greater impact on performance than simply adding more workers.&lt;/p&gt;

&lt;p&gt;The block-based implementation won not because it created more threads, but because it used memory more intelligently.&lt;/p&gt;

&lt;p&gt;That was the most valuable takeaway from the entire experiment.&lt;/p&gt;

&lt;p&gt;Sometimes the fastest code isn't the code doing the least work.&lt;/p&gt;

&lt;p&gt;It's the code waiting the least for memory.&lt;/p&gt;

</description>
      <category>multithreading</category>
      <category>programming</category>
      <category>productivity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Small Go Detail That Changes How Your Project Looks</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sat, 30 May 2026 20:39:54 +0000</pubDate>
      <link>https://dev.to/talaamm/small-go-detail-that-changes-how-your-project-looks-o3h</link>
      <guid>https://dev.to/talaamm/small-go-detail-that-changes-how-your-project-looks-o3h</guid>
      <description>&lt;p&gt;Today I learned something simple, but it changes how “professional” your Go project feels.&lt;/p&gt;

&lt;p&gt;It’s about this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go mod init github.com/yourname/module-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;vs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go mod init module-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first, it feels like just naming.&lt;/p&gt;

&lt;p&gt;But in Go, this is actually your &lt;strong&gt;project identity&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  💡 What this really means
&lt;/h1&gt;

&lt;p&gt;When you use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;github.com/yourname/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you are not just naming a folder.&lt;/p&gt;

&lt;p&gt;You are defining a &lt;em&gt;real&lt;/em&gt; package in the Go ecosystem.&lt;/p&gt;

&lt;p&gt;It makes imports globally unique, prepares the project for versioning, simplifies dependency management, and allows other developers to consume it as a package without restructuring later.&lt;/p&gt;

&lt;p&gt;The code doesn't change with the module name, but the engineering mindset does.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why this matters
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. It matches real Go projects
&lt;/h2&gt;

&lt;p&gt;Most real-world Go projects look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes → &lt;code&gt;github.com/kubernetes/kubernetes&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Docker → &lt;code&gt;github.com/docker/docker&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So your project instantly feels “industry-level structured”.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Your code becomes importable
&lt;/h2&gt;

&lt;p&gt;Someone can literally do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"github.com/your_name/module_name/pkg"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which means your project is no longer “local code”.&lt;/p&gt;

&lt;p&gt;It behaves like a reusable library.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. It prevents messy imports later
&lt;/h2&gt;

&lt;p&gt;Without a proper module path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;imports become fragile&lt;/li&gt;
&lt;li&gt;moving folders breaks stuff&lt;/li&gt;
&lt;li&gt;Go cannot resolve dependencies cleanly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;everything is globally unique&lt;/li&gt;
&lt;li&gt;structure stays stable&lt;/li&gt;
&lt;li&gt;refactoring becomes safer&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. It unlocks Go modules properly
&lt;/h2&gt;

&lt;p&gt;Tools like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go mod tidy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;work smoothly because Go knows exactly where your module lives.&lt;/p&gt;

&lt;p&gt;The module path is basically the “root identity” of your dependency graph.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. It signals seriousness in your project
&lt;/h2&gt;

&lt;p&gt;This is subtle but important.&lt;/p&gt;

&lt;p&gt;Compare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;module module_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;vs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;module github.com/your_name/module_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One looks like a practice project.&lt;/p&gt;

&lt;p&gt;The other looks like something that belongs in a repo people can actually use.&lt;/p&gt;




&lt;h2&gt;
  
  
  The mindset shift 🧠
&lt;/h2&gt;

&lt;p&gt;This is the part that stood out to me:&lt;/p&gt;

&lt;p&gt;You’re not just writing code for your machine anymore.&lt;/p&gt;

&lt;p&gt;You’re structuring it like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a system that someone else could clone, understand, and run&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That’s a different level of thinking.&lt;/p&gt;




&lt;h1&gt;
  
  
  🔥 Bottom line
&lt;/h1&gt;

&lt;p&gt;This small line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go mod init github.com/yourname/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;doesn’t change how your code runs.&lt;/p&gt;

&lt;p&gt;But it changes how your project is &lt;strong&gt;perceived, structured, and scaled&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;If I had to summarize it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;local naming → personal experiment&lt;br&gt;
GitHub module path → real software project&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Something I learned is that professionalism in software isn't always about complex algorithms.&lt;/p&gt;

&lt;p&gt;Sometimes it's about making small decisions today that prevent friction when a project grows tomorrow ;)&lt;/p&gt;

</description>
      <category>go</category>
      <category>github</category>
      <category>cleancode</category>
      <category>programming</category>
    </item>
    <item>
      <title>10 Skills That Every Junior Developer MUST Have in 2026</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sun, 15 Mar 2026 20:27:20 +0000</pubDate>
      <link>https://dev.to/talaamm/10-skills-that-actually-make-junior-developers-valuable-in-2026-45i1</link>
      <guid>https://dev.to/talaamm/10-skills-that-actually-make-junior-developers-valuable-in-2026-45i1</guid>
      <description>&lt;p&gt;Most developers spend years learning frameworks but never learn how real systems work.&lt;/p&gt;

&lt;p&gt;I reviewed a lot of junior developer portfolios, and I keep seeing the same pattern.&lt;/p&gt;

&lt;p&gt;Every year juniors are told the same advice:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Learn frameworks.”&lt;br&gt;
“Build more projects.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But the reality in &lt;strong&gt;2026&lt;/strong&gt; is different. With the insane AI tools we have, companies don’t just hire juniors to write features anymore. Writing code alone is no longer enough...&lt;/p&gt;

&lt;p&gt;They hire juniors to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy apps&lt;/li&gt;
&lt;li&gt;Debug production issues&lt;/li&gt;
&lt;li&gt;Automate tasks&lt;/li&gt;
&lt;li&gt;Connect systems together&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So here are the &lt;strong&gt;skills that actually make juniors valuable today.&lt;/strong&gt; 😊&lt;/p&gt;




&lt;h1&gt;
  
  
  1. Debugging &amp;amp; Code Fixing
&lt;/h1&gt;

&lt;p&gt;This is probably the &lt;strong&gt;most underrated skill&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many developers can write code.&lt;/p&gt;

&lt;p&gt;Few can &lt;strong&gt;debug broken systems&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The developer who fixes production issues quickly is often more valuable than the one who wrote the feature.&lt;/p&gt;

&lt;p&gt;Especially with AI and “vibe coding” becoming common, this skill is now more valuable than ever.&lt;/p&gt;

&lt;p&gt;Being able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read logs&lt;/li&gt;
&lt;li&gt;Trace errors&lt;/li&gt;
&lt;li&gt;Inspect APIs&lt;/li&gt;
&lt;li&gt;Find performance issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Makes you extremely valuable as a junior.&lt;/p&gt;

&lt;p&gt;In many teams, juniors spend &lt;strong&gt;more time fixing bugs than writing features.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Backend API Development
&lt;/h1&gt;

&lt;p&gt;Every modern product is API-driven.&lt;/p&gt;

&lt;p&gt;Juniors should understand how APIs work and how to build them for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good API design is a huge advantage.&lt;/p&gt;




&lt;h1&gt;
  
  
  3. SQL &amp;amp; Databases
&lt;/h1&gt;

&lt;p&gt;Many developers treat databases like a black box.&lt;/p&gt;

&lt;p&gt;But understanding databases helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design good schemas&lt;/li&gt;
&lt;li&gt;Optimize queries&lt;/li&gt;
&lt;li&gt;Debug backend problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basic skills should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Joins&lt;/li&gt;
&lt;li&gt;Indexing&lt;/li&gt;
&lt;li&gt;Query optimization&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  4. Cloud &amp;amp; DevOps Basics
&lt;/h1&gt;

&lt;p&gt;You don’t need to be a DevOps engineer.&lt;/p&gt;

&lt;p&gt;But every developer should know how to &lt;strong&gt;ship software&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Basic knowledge should include tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;CI/CD pipelines&lt;/li&gt;
&lt;li&gt;GitHub Actions&lt;/li&gt;
&lt;li&gt;Cloud basics (AWS / GCP)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many companies actually hire juniors to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy applications&lt;/li&gt;
&lt;li&gt;Fix pipelines&lt;/li&gt;
&lt;li&gt;Configure servers&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  5. Real-Time Systems
&lt;/h1&gt;

&lt;p&gt;Modern apps are increasingly real-time.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chat systems&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;li&gt;Collaborative tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding technologies like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;Event systems&lt;/li&gt;
&lt;li&gt;Message queues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;is a huge plus.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. Automation &amp;amp; Scripting
&lt;/h1&gt;

&lt;p&gt;One of the most in-demand skills today. Developers who automate tasks save companies huge amounts of time.&lt;/p&gt;

&lt;p&gt;Common tools include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python scripts&lt;/li&gt;
&lt;li&gt;CLI tools&lt;/li&gt;
&lt;li&gt;Automation pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can automate things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Report generation&lt;/li&gt;
&lt;li&gt;Data processing&lt;/li&gt;
&lt;li&gt;Internal tools&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  7. AI API Integration
&lt;/h1&gt;

&lt;p&gt;AI is now part of many products. But you &lt;strong&gt;don’t need to train models&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Most real products just integrate APIs.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chatbots&lt;/li&gt;
&lt;li&gt;Summarization tools&lt;/li&gt;
&lt;li&gt;AI assistants&lt;/li&gt;
&lt;li&gt;Automation with AI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowing how to integrate these APIs is a valuable skill.&lt;/p&gt;




&lt;h1&gt;
  
  
  8. Understanding System Architecture
&lt;/h1&gt;

&lt;p&gt;Great developers understand how systems connect together.&lt;/p&gt;

&lt;p&gt;Not just writing backend code, but understanding the full flow of an application.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Frontend
↓
API
↓
Queue
↓
Worker
↓
Database
↓
Deployment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Developers who understand this flow can debug and build systems much faster.&lt;/p&gt;




&lt;h1&gt;
  
  
  9. Web Scraping &amp;amp; Data Automation
&lt;/h1&gt;

&lt;p&gt;Many companies need automated data collection.&lt;/p&gt;

&lt;p&gt;Developers are often hired to build tools that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor competitors&lt;/li&gt;
&lt;li&gt;Collect market data&lt;/li&gt;
&lt;li&gt;Track product information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Common tools include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Puppeteer&lt;/li&gt;
&lt;li&gt;Playwright&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many startups rely heavily on scraped data.&lt;/p&gt;




&lt;h1&gt;
  
  
  10. Building Small SaaS Tools
&lt;/h1&gt;

&lt;p&gt;One of the best ways to grow as a developer is building small software as a service (SaaS) tools.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dashboards&lt;/li&gt;
&lt;li&gt;Automation tools&lt;/li&gt;
&lt;li&gt;Niche productivity apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some developers even turn these tools into small &lt;strong&gt;SaaS products&lt;/strong&gt; that generate side income.&lt;/p&gt;




&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;If you're a junior developer in 2026, focus on learning:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Debugging real systems&lt;/li&gt;
&lt;li&gt;Backend API development&lt;/li&gt;
&lt;li&gt;SQL &amp;amp; databases&lt;/li&gt;
&lt;li&gt;Cloud &amp;amp; DevOps basics&lt;/li&gt;
&lt;li&gt;Real-time systems&lt;/li&gt;
&lt;li&gt;Automation &amp;amp; scripting&lt;/li&gt;
&lt;li&gt;AI API integration&lt;/li&gt;
&lt;li&gt;System architecture&lt;/li&gt;
&lt;li&gt;Web scraping &amp;amp; data automation&lt;/li&gt;
&lt;li&gt;Building small SaaS tools&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I'm still early in my career myself, but after many conversations with senior engineers, CTOs, and founders, the same themes keep appearing.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Final Advice
&lt;/h1&gt;

&lt;p&gt;Don't just learn frameworks. Learn how &lt;strong&gt;systems actually work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers who understand &lt;strong&gt;systems&lt;/strong&gt; will always be more valuable than developers who only know &lt;strong&gt;frameworks&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  For Junior developers:
&lt;/h3&gt;

&lt;p&gt;What skills are you currently working on this year?&lt;/p&gt;

&lt;h3&gt;
  
  
  For Senior engineers:
&lt;/h3&gt;

&lt;p&gt;What skills do you wish you had focused on when you were a junior?&lt;/p&gt;

</description>
      <category>programming</category>
      <category>career</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How I Built a Résumé that Passed High-Tech Companies (Google, Amazon, and Microsoft)!</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Fri, 06 Feb 2026 21:42:22 +0000</pubDate>
      <link>https://dev.to/talaamm/how-i-built-a-resume-that-passed-high-tech-firms-google-amazon-and-microsoft-1ima</link>
      <guid>https://dev.to/talaamm/how-i-built-a-resume-that-passed-high-tech-firms-google-amazon-and-microsoft-1ima</guid>
      <description>&lt;p&gt;I’m writing this post after a long break, and honestly, I feel like this story &lt;em&gt;deserved&lt;/em&gt; to be written.&lt;/p&gt;

&lt;p&gt;I’m still a student. A computer engineering student.&lt;br&gt;
I took an &lt;strong&gt;intensive full-stack development course&lt;/strong&gt; that exposed me to a wide range of software engineering topics, but at the end of the day… I was still &lt;em&gt;just a student&lt;/em&gt; with &lt;strong&gt;no previous job experience&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So when I say that &lt;strong&gt;my very first job application ever&lt;/strong&gt; was for a&lt;br&gt;
&lt;strong&gt;Part-Time Student Software Engineering Internship @ Google&lt;/strong&gt;. Yes, I know. Bold. Maybe delusional. Definitely scary.&lt;/p&gt;

&lt;p&gt;Was I excited? Absolutely.&lt;br&gt;
Was I motivated? …not really.&lt;/p&gt;

&lt;p&gt;I genuinely thought: &lt;em&gt;“Nah. Will **GOOGLE&lt;/em&gt;* really look at Tala’s CV? Probably not.”*&lt;/p&gt;

&lt;p&gt;But I shot my shot anyway.&lt;/p&gt;

&lt;p&gt;And guess what?&lt;/p&gt;

&lt;h3&gt;
  
  
  They replied.
&lt;/h3&gt;

&lt;p&gt;After a whole month, I got an email.&lt;br&gt;
An actual reply.&lt;br&gt;
&lt;strong&gt;An invitation to do an Online Assessment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was shocked. Like, &lt;em&gt;sit-up-straight-and-re-read-the-email&lt;/em&gt; shocked.&lt;/p&gt;

&lt;p&gt;(I’ll talk about the OA and interview experience in detail in another post 👀)&lt;/p&gt;

&lt;p&gt;I did the assessment… and honestly?&lt;br&gt;
I walked away feeling like I messed &lt;em&gt;everything&lt;/em&gt; up. I completely deleted the idea of moving forward from my head.&lt;/p&gt;

&lt;p&gt;But then. GUESS WHAT AGAIN???&lt;/p&gt;

&lt;p&gt;They moved me to the &lt;strong&gt;interview stage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two technical interviews.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the end, I wasn’t selected.&lt;br&gt;
And yes, that was disappointing.&lt;/p&gt;

&lt;p&gt;But I truly believe the reason wasn’t my technical skills, it was that my &lt;strong&gt;CV, portfolio, LinkedIn, and overall profile lacked extracurricular activities&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The recruiter literally encouraged me to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Get out of the classroom. Join hackathons. Be more active in the CS community.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that’s exactly what I’m doing now.&lt;/p&gt;




&lt;h2&gt;
  
  
  What did I learn from this?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Never underestimate yourself
&lt;/h3&gt;

&lt;p&gt;Six months ago, if someone told me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You’ll get Google interviews before you even graduate”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I would’ve laughed.&lt;/p&gt;

&lt;p&gt;Even though it didn’t work out, I walked away with &lt;strong&gt;something priceless&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;self-confidence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My &lt;em&gt;first ever&lt;/em&gt; application was to Google, and I reached the &lt;strong&gt;last possible stage&lt;/strong&gt; for a student internship. That alone changed how I see myself.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ This was NOT a failure, it was a huge level-up
&lt;/h3&gt;

&lt;p&gt;I always thought I wasn’t good at data structures and algorithms.&lt;/p&gt;

&lt;p&gt;Now?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I can discuss and solve most problems put in front of me&lt;/li&gt;
&lt;li&gt;I can analyze time &amp;amp; space complexity&lt;/li&gt;
&lt;li&gt;I can think about optimizations&lt;/li&gt;
&lt;li&gt;And most importantly... &lt;strong&gt;I can explain my thought process clearly&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compared to two months ago?&lt;br&gt;
This is a completely different version of me.&lt;/p&gt;

&lt;p&gt;So no, this wasn’t a rejection.&lt;br&gt;
This was growth.&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ I got free feedback (lol)
&lt;/h3&gt;

&lt;p&gt;I now know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where my weak points are in DSA&lt;/li&gt;
&lt;li&gt;How technical interviews actually work&lt;/li&gt;
&lt;li&gt;That I broke my fear barrier from interviews&lt;/li&gt;
&lt;li&gt;That I lack extracurricular activities, and I’m actively fixing that&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A review of myself &lt;em&gt;and&lt;/em&gt; my résumé, for free?&lt;br&gt;
I’ll take it.&lt;/p&gt;




&lt;h2&gt;
  
  
  So… how did I build my résumé?
&lt;/h2&gt;

&lt;p&gt;Back to the main topic.&lt;/p&gt;

&lt;p&gt;As a student who had &lt;strong&gt;never written a résumé before&lt;/strong&gt;, I was lucky enough to have a &lt;strong&gt;Senior Software Engineering mentor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I asked them for help, and they shared their own résumé as a template.&lt;br&gt;
I didn’t reinvent the wheel, I followed the structure, adapted it to my experience, and built my first real résumé from there.&lt;/p&gt;

&lt;p&gt;Was it perfect? No.&lt;br&gt;
Was it a starting point? Absolutely.&lt;/p&gt;

&lt;p&gt;We reviewed it together, refined it, and moved on.&lt;/p&gt;




&lt;h3&gt;
  
  
  Applying to Google: what I did differently
&lt;/h3&gt;

&lt;p&gt;Before applying, I carefully read &lt;strong&gt;Google’s official résumé tips&lt;/strong&gt;&lt;br&gt;
👉 &lt;a href="https://www.google.com/about/careers/applications/how-we-hire/" rel="noopener noreferrer"&gt;https://www.google.com/about/careers/applications/how-we-hire/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I especially used their &lt;strong&gt;XYZ formula&lt;/strong&gt; to describe my projects:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;““Accomplished [X] as measured by [Y], by doing [Z].””&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then I:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read the job description &lt;strong&gt;at least 10 times&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Highlighted what they were looking for in a candidate's resume, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Relevant practical experience with: web application development, Unix/Linux,...&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Interest and ability to learn other coding languages as needed.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Please include your expected graduation date (month and year) on your resume.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;And I tailored my résumé &lt;strong&gt;specifically&lt;/strong&gt; for that role.&lt;/p&gt;

&lt;p&gt;Important details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No images&lt;/li&gt;
&lt;li&gt;No icons&lt;/li&gt;
&lt;li&gt;One page only&lt;/li&gt;
&lt;li&gt;Plain, selectable text (ATS-friendly)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  How I used AI (the right way)
&lt;/h3&gt;

&lt;p&gt;Once I had a solid draft, I used AI &lt;strong&gt;as a tool, not a writer‼️&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was the &lt;em&gt;idea&lt;/em&gt; of the prompt I used (you can improve it):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I’m applying for a Part-Time Software Engineering BS/MS Intern, 2026 at Google.&lt;br&gt;
Here is the job description: [paste it].&lt;br&gt;
Here is my résumé: [paste text or upload PDF].&lt;br&gt;
Please analyze the job posting carefully and suggest edits to better align my résumé with the role, without adding false experience.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I iterated. Refined. Tailored. Rewrote.&lt;/p&gt;

&lt;p&gt;But &lt;strong&gt;every word was mine&lt;/strong&gt;.&lt;br&gt;
No lies. No exaggerations.&lt;br&gt;
AI helped me &lt;em&gt;polish&lt;/em&gt;, not fabricate.&lt;/p&gt;




&lt;h3&gt;
  
  
  Final thoughts
&lt;/h3&gt;

&lt;p&gt;My résumé wasn’t magic.&lt;br&gt;
It wasn’t perfect.&lt;br&gt;
But it was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Honest&lt;/li&gt;
&lt;li&gt;Focused&lt;/li&gt;
&lt;li&gt;Tailored&lt;/li&gt;
&lt;li&gt;Clear&lt;/li&gt;
&lt;li&gt;And written with intention&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And it got me further than I ever imagined.&lt;/p&gt;

&lt;p&gt;After the Google rejection, I didn’t stop. I applied to student internship roles at Amazon and Microsoft, using the same résumé structure, the same tailoring process, and the same mindset.&lt;/p&gt;

&lt;p&gt;And yes!! I did get moved forward in both processes.&lt;/p&gt;

&lt;p&gt;That’s when it clicked for me: this wasn’t luck. The résumé was doing its job. And more importantly, I was definitely presenting myself properly.&lt;/p&gt;

&lt;p&gt;If you’re a student doubting whether you’re “ready”, trust me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You don’t need to feel ready.&lt;/li&gt;
&lt;li&gt;You just need to start.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have more tips, mention them in the comments!&lt;/p&gt;

&lt;p&gt;Thanks for reading 📖💞&lt;/p&gt;

</description>
      <category>google</category>
      <category>aws</category>
      <category>microsoft</category>
      <category>career</category>
    </item>
    <item>
      <title>My Linux Journey: From Intensive Bootcamp to BZU’s Linux Lab 🐧</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sun, 05 Oct 2025 11:06:24 +0000</pubDate>
      <link>https://dev.to/talaamm/my-linux-journey-from-intensive-bootcamp-to-bzus-linux-lab-6i0</link>
      <guid>https://dev.to/talaamm/my-linux-journey-from-intensive-bootcamp-to-bzus-linux-lab-6i0</guid>
      <description>&lt;p&gt;This semester, I’m taking the Linux Laboratory course at Birzeit University, and I’m genuinely excited about it!&lt;/p&gt;

&lt;p&gt;The last month, during my Full Stack Development program at Notre Dame University, we spent two intensive weeks diving deep into Linux commands, shell scripting, and Python programming; the same topics we’ll be covering throughout this 4-month course at Birzeit University.&lt;/p&gt;

&lt;p&gt;Those two weeks were intense but valuable. I learned how to navigate the Linux environment efficiently, automate repetitive tasks with shell scripts, and integrate Python into practical workflows.&lt;/p&gt;

&lt;p&gt;During that period, I created a personal Linux command cheat sheet to help me quickly recall the most useful and commonly used commands. Since the Linux Lab at BZU covers similar material, I thought it might be helpful to share it with others who are starting their Linux journey too!&lt;/p&gt;

&lt;p&gt;🗒️ Here’s my Linux Command Cheat Sheet:&lt;br&gt;
&lt;a href="https://drive.google.com/file/d/1njRnIVHlxrQiYfSVBM6adzq6U4gLMjL3/view?usp=sharing" rel="noopener noreferrer"&gt;Scripting Piscine pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope it helps other students and Linux enthusiasts make their learning process smoother and more enjoyable!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>learning</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Big O Notation: Examples</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sun, 21 Sep 2025 20:44:49 +0000</pubDate>
      <link>https://dev.to/talaamm/big-o-notation-examples-4ej</link>
      <guid>https://dev.to/talaamm/big-o-notation-examples-4ej</guid>
      <description>&lt;p&gt;Hi again!&lt;/p&gt;

&lt;p&gt;Below are clear, beginner-friendly &lt;strong&gt;step-by-step&lt;/strong&gt; examples for how to calculate common Big-O classes, using Go code snippets.&lt;/p&gt;




&lt;h2&gt;
  
  
  O(n) - Linear time
&lt;/h2&gt;

&lt;p&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%2Fjtsb169u437ig8s73bp9.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%2Fjtsb169u437ig8s73bp9.png" alt=" " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; linear search (find a value in an array).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Linear search: O(n)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;linearSearch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;     &lt;span class="c"&gt;// runs up to n times&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;         &lt;span class="c"&gt;// constant-time comparison each iteration&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;i&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="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;n is the size of input which is length of &lt;code&gt;nums&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In the worst case (target not present or last element), the &lt;code&gt;for&lt;/code&gt; loop executes n iterations.&lt;/li&gt;
&lt;li&gt;Each iteration (inside the loop) does O(1) work (compare and maybe assign).&lt;/li&gt;
&lt;li&gt;O notation is O(1*n) = &lt;strong&gt;O(n)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(log n) - Logarithmic time
&lt;/h1&gt;

&lt;p&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%2F7np6ovawk3q5fr8w46ez.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%2F7np6ovawk3q5fr8w46ez.png" alt=" " width="300" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; binary search in a sorted slice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Binary search: O(log n)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;binarySearch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;lo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;mid&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;lo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;          &lt;span class="c"&gt;// cut range in half&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mid&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="m"&gt;1&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="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each loop iteration halves the search range.&lt;/li&gt;
&lt;li&gt;After k iterations the remaining range size is about n / 2^k.&lt;/li&gt;
&lt;li&gt;It stops when n / 2^k ≤ 1 → 2^k ≥ n → k ≥ log₂(n).&lt;/li&gt;
&lt;li&gt;So number of iterations ~ ⌈log₂ n⌉ → &lt;strong&gt;O(log n)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Note: base of the logarithm doesn't matter for Big-O (log₂, log₁₀, ln are all Θ(log n)).&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(n log n) - Typical of efficient sorts
&lt;/h1&gt;

&lt;p&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%2Fm189fkg8pjv5xsu9qq1j.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%2Fm189fkg8pjv5xsu9qq1j.png" alt=" " width="774" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; merge sort (divide &amp;amp; conquer).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Merge sort: O(n log n)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;mergeSort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;mid&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
    &lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;mergeSort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;mergeSort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&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="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
            &lt;span class="n"&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="c"&gt;// append remaining&lt;/span&gt;
    &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;:&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="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;right&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;:&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;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recurrence: T(n) = 2·T(n/2) + O(n) (because we sort two halves then merge in O(n)).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Using Master Theorem or level-by-level cost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Level 0 (root): cost O(n) to merge at that level,&lt;/li&gt;
&lt;li&gt;Level 1: two merges of size n/2 → total O(n),&lt;/li&gt;
&lt;li&gt;Level 2: four merges of size n/4 → total O(n),&lt;/li&gt;
&lt;li&gt;... there are about log₂(n) levels.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Total ≈ n * (log₂(n) + 1) → &lt;strong&gt;O(n log n)&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(n²) - Quadratic time
&lt;/h1&gt;

&lt;p&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%2Flz5qmyqr9db7qa506r05.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%2Flz5qmyqr9db7qa506r05.png" alt=" " width="774" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; printing every pair (nested loops), or naive pairwise compare.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Print every ordered pair: O(n^2)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;printPairs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&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="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c"&gt;// constant-time work inside&lt;/span&gt;
            &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="c"&gt;// pretend we do O(1) work&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;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Outer loop runs n times.&lt;/li&gt;
&lt;li&gt;For every outer iteration, inner loop runs n times.&lt;/li&gt;
&lt;li&gt;Total iterations = n * n = n².&lt;/li&gt;
&lt;li&gt;Drop constants and lower-order terms → &lt;strong&gt;O(n²)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(2ⁿ) - Exponential time (base 2)
&lt;/h1&gt;

&lt;p&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%2Fyf9blut69lae7al2px4g.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%2Fyf9blut69lae7al2px4g.png" alt=" " width="774" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; generate all subsets (power set). Each element either included or excluded → 2 choices per element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Generate all subsets: O(2^n)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;subsets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[][]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[][]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;helper&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;helper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&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="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;tmp&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tmp&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="c"&gt;// exclude current&lt;/span&gt;
        &lt;span class="n"&gt;helper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="c"&gt;// include current&lt;/span&gt;
        &lt;span class="n"&gt;helper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cur&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;helper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{})&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At each index i you branch into two calls (include / exclude).&lt;/li&gt;
&lt;li&gt;Tree depth = n, branching factor = 2 → number of leaves = 2ⁿ.&lt;/li&gt;
&lt;li&gt;You do at least one constant amount of work per leaf (plus cost to build each subset).&lt;/li&gt;
&lt;li&gt;Total work ≈ c · 2ⁿ → &lt;strong&gt;O(2ⁿ)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Note: Some recursive exponential algorithms (like naive Fibonacci) produce growth ~φⁿ where φ ≈ 1.618; often people use O(2ⁿ) to describe general exponential growth class.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(n!) - Factorial time
&lt;/h1&gt;

&lt;p&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%2Fwzf9g70g4ycqxk9x8t3w.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%2Fwzf9g70g4ycqxk9x8t3w.png" alt=" " width="566" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; generate all permutations of n distinct elements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// Generate all permutations: O(n!)&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;permutations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;[][]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="nb"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[][]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;helper&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;helper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="kt"&gt;int&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="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;tmp&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;([]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tmp&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c"&gt;// swap&lt;/span&gt;
            &lt;span class="n"&gt;helper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c"&gt;// swap back&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;helper&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Number of permutations of n distinct items is n! = n × (n−1) × (n−2) × ... × 1.&lt;/li&gt;
&lt;li&gt;The recursion produces all n! permutations.&lt;/li&gt;
&lt;li&gt;If you also consider the cost to copy/print each permutation (of length n) then total time is O(n · n!) because for each of the n! permutations we may spend O(n) to copy or output it.&lt;/li&gt;
&lt;li&gt;But the combinatorial explosion is already n!, so algorithms with factorial behavior are impractical even for small n (n = 10 → 3,628,800 permutations).&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  O(1) - Constant Time
&lt;/h1&gt;

&lt;p&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%2Fwtat3au4c8ra9h5g219e.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%2Fwtat3au4c8ra9h5g219e.png" alt=" " width="399" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Get the first element of a slice&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// O(1) - accessing the first element&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;getFirst&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c"&gt;// single operation&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step-by-step reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Let &lt;code&gt;n = len(nums)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The function performs:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;One check: &lt;code&gt;len(nums) == 0&lt;/code&gt; → &lt;strong&gt;O(1)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;One index access: &lt;code&gt;nums[0]&lt;/code&gt; → &lt;strong&gt;O(1)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;One return → &lt;strong&gt;O(1)&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;Total operations = 3 (or some small constant c). &lt;strong&gt;Does NOT depend on &lt;code&gt;n&lt;/code&gt;.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Therefore, &lt;strong&gt;runtime = O(1)&lt;/strong&gt; — it stays constant even if &lt;code&gt;nums&lt;/code&gt; has 1 element or 1 million elements.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key takeaway:&lt;/strong&gt; Constant time algorithms do a fixed number of steps regardless of input size.&lt;/p&gt;




&lt;h1&gt;
  
  
  Quick rules / takeaways (for beginners)
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Drop constants: c·n → O(n). 5n² → O(n²).&lt;/li&gt;
&lt;li&gt;Drop lower-order terms: (n² + n)/2 → O(n²).&lt;/li&gt;
&lt;li&gt;Log base doesn't matter: log₂ n, log₁₀ n, ln n are all Θ(log n).&lt;/li&gt;
&lt;li&gt;Multiplicative rule: nested loops (n × n) → O(n²).&lt;/li&gt;
&lt;li&gt;Additive rule: if you do O(n) then O(n²), total is O(n + n²) → O(n²) (keep the dominant term).&lt;/li&gt;
&lt;li&gt;Recursive divide &amp;amp; conquer often gives O(n log n) or O(log n) depending on splitting and merging (use Master Theorem or count cost per level).&lt;/li&gt;
&lt;li&gt;Output-size matters: generating all combinations/subsets/permutations means runtime grows at least as fast as the number of outputs (2ⁿ, n!, ...).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>go</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Big O Notation pt.1: Time Complexity</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sun, 21 Sep 2025 18:36:43 +0000</pubDate>
      <link>https://dev.to/talaamm/big-o-notation-pt1-time-complexity-3676</link>
      <guid>https://dev.to/talaamm/big-o-notation-pt1-time-complexity-3676</guid>
      <description>&lt;p&gt;Hello again 🙋🏻‍♀️&lt;br&gt;
If you’re starting your programming journey, you’ve probably heard the term &lt;strong&gt;Big O notation&lt;/strong&gt; or &lt;strong&gt;Time complexity&lt;/strong&gt; of an algorithm. You may have also wondered why a solution is better than another, though they both do the same thing! At first, it might look like some scary math formula but don’t worry! In this post, we’ll break it down into simple words and examples so you can understand exactly what it means and why it matters.  &lt;/p&gt;

&lt;p&gt;This post is part one of a two-part series:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1 (this post):&lt;/strong&gt; Time Complexity
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2 (next post):&lt;/strong&gt; Space Complexity
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📑 Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
What is Big O Notation?
&lt;/li&gt;
&lt;li&gt;
Why is Big O Notation Important?
&lt;/li&gt;
&lt;li&gt;
How to Find Big O
&lt;/li&gt;
&lt;li&gt;
Properties of Big O
&lt;/li&gt;
&lt;li&gt;
Common Time Complexities
&lt;/li&gt;
&lt;li&gt;
Big O, Big Omega, and Big Theta
&lt;/li&gt;
&lt;li&gt;Practice Exercises&lt;/li&gt;
&lt;li&gt;Resources&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What is Big O Notation? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Big O time&lt;/strong&gt; is the language and metric we use to describe the efficiency of algorithms. Not understanding, not only will leave you judged harshly for not understanding it, but also you will struggle to judge your algorithms and solutions for coding problems.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why is Big O Notation Important? &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Big O notation is important for several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It provides a way to compare the performance of different algorithms and data structures, and to predict how they will behave as the input size increases.&lt;/li&gt;
&lt;li&gt;It helps analyze the efficiency of algorithms.&lt;/li&gt;
&lt;li&gt;It provides a way to describe how the runtime or space requirements of an algorithm grow as the input size increases.&lt;/li&gt;
&lt;li&gt;Allows programmers to compare different algorithms and choose the most efficient one for a specific problem.&lt;/li&gt;
&lt;li&gt;Helps in understanding the &lt;span title="a software's ability to handle a growing amount of work or users without degrading performance, achieved through system architecture that allows for growth in capacity"&gt; &lt;em&gt;scalability&lt;/em&gt;&lt;/span&gt; of algorithms and predicting how they will perform as the input size grows.&lt;/li&gt;
&lt;li&gt;Enables developers to optimize code and improve overall performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  How to Find Big O &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ignore the lower order terms and consider only highest order term.&lt;/li&gt;
&lt;li&gt;Ignore the constant associated with the highest order term.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&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%2Fmq6qtk685t0flrxsv3r3.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%2Fmq6qtk685t0flrxsv3r3.png" alt="example to how to find big o" width="633" height="202"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Properties of Big O &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reflexivity&lt;/strong&gt;: For any function f(n), f(n) = O(f(n)). &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%2Fayu8ls0kb0ogyk5g1q3q.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%2Fayu8ls0kb0ogyk5g1q3q.png" alt=" " width="283" height="92"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transitivity&lt;/strong&gt;: If f(n) = O(g(n)) and g(n) = O(h(n)), then f(n) = O(h(n)). &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%2Fjgrzo7smk2k7c4xgr6te.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%2Fjgrzo7smk2k7c4xgr6te.png" alt=" " width="682" height="128"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Constant Factor&lt;/strong&gt;: For any constant c &amp;gt; 0 and functions f(n) and g(n), if f(n) = O(g(n)), then cf(n) = O(g(n)). &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%2F4c65yqltnoqsaukhhucn.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%2F4c65yqltnoqsaukhhucn.png" alt=" " width="575" height="108"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sum Rule&lt;/strong&gt;: If f(n) = O(g(n)) and h(n) = O(k(n)), then f(n) + h(n) = O(max( g(n), k(n) ) When combining complexities, only the largest term dominates. &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%2Fi6gk8sawzfpdk19cnfvo.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%2Fi6gk8sawzfpdk19cnfvo.png" alt=" " width="558" height="105"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Product Rule&lt;/strong&gt;: If f(n) = O(g(n)) and h(n) = O(k(n)), then f(n) * h(n) = O(g(n) * k(n)). &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%2Fur9fjrgc2d9bcf71f2im.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%2Fur9fjrgc2d9bcf71f2im.png" alt=" " width="673" height="114"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Composition Rule&lt;/strong&gt;: If f(n) = O(g(n)), then f(h(n)) = O(g(h(n))). &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%2F6bvjtqvsqmc4rxmncjb0.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%2F6bvjtqvsqmc4rxmncjb0.png" alt=" " width="637" height="128"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Common Time Complexities &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Notation&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Constant&lt;/td&gt;
&lt;td&gt;O(1)&lt;/td&gt;
&lt;td&gt;Runtime is constant regardless of input size&lt;/td&gt;
&lt;td&gt;Accessing an array element by index, Stack push/ pop, if statement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logarithmic&lt;/td&gt;
&lt;td&gt;O(log n)&lt;/td&gt;
&lt;td&gt;After each iteration, input size shrinks&lt;/td&gt;
&lt;td&gt;Binary Search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;td&gt;O(n)&lt;/td&gt;
&lt;td&gt;Runtime grows linearly with the size of input&lt;/td&gt;
&lt;td&gt;Linear Search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Super Linear&lt;/td&gt;
&lt;td&gt;O(n*log n)&lt;/td&gt;
&lt;td&gt;Input of size n is processed across log n levels (a shrinking for loop idea)&lt;/td&gt;
&lt;td&gt;Quick Sort, Heap Sort, Merge Sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Polynomial&lt;/td&gt;
&lt;td&gt;O(n^k)&lt;/td&gt;
&lt;td&gt;ex: O(n^2) Runtime is proportional to the square of the input size&lt;/td&gt;
&lt;td&gt;Strassen’s Matrix Multiplication, Bubble Sort, Selection Sort, Insertion Sort, Bucket Sort&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exponential&lt;/td&gt;
&lt;td&gt;O(k^n)&lt;/td&gt;
&lt;td&gt;ex: O(2^n) Runtime doubles with each addition to the input data set&lt;/td&gt;
&lt;td&gt;Tower of Hanoi&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Factorial&lt;/td&gt;
&lt;td&gt;O(n!)&lt;/td&gt;
&lt;td&gt;Runtime grows factorially with the size of the input&lt;/td&gt;
&lt;td&gt;Determinant Expansion by Minors, Brute force Search algorithm for Traveling Salesman Problem&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h4&gt;
  
  
  Graphs
&lt;/h4&gt;

&lt;p&gt;If we plot the most common Big O notation examples, we would have graph like this:&lt;/p&gt;

&lt;p&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%2Fpkp5oonxywa5aaexwe1k.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%2Fpkp5oonxywa5aaexwe1k.png" alt=" " width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Mathematical Examples of Runtime Analysis
&lt;/h4&gt;

&lt;p&gt;Below table illustrates the runtime analysis of different orders of algorithms as the input size (n) increases.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;O notation&lt;/th&gt;
&lt;th&gt;Runtime (ex1)&lt;/th&gt;
&lt;th&gt;Runtime (ex2)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;n&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;log(n)&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2.996&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n * log(n)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;59.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n^2&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2^n&lt;/td&gt;
&lt;td&gt;1024&lt;/td&gt;
&lt;td&gt;1048576&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;n!&lt;/td&gt;
&lt;td&gt;3628800&lt;/td&gt;
&lt;td&gt;2.432902e+1818&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Big O, Big Omega, and Big Theta &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Notation&lt;/th&gt;
&lt;th&gt;Explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Big O (O)&lt;/td&gt;
&lt;td&gt;Describes the upper bound of the algorithm's running time. (&lt;em&gt;&lt;strong&gt;It describes the worst case scenario of an input&lt;/strong&gt;&lt;/em&gt;) Most commonly used when analyzing time complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Big Ω (Omega)&lt;/td&gt;
&lt;td&gt;Describes the lower bound of the algorithm's running time. (&lt;strong&gt;&lt;em&gt;It describes the best case scenario of an input&lt;/em&gt;&lt;/strong&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Big θ (Theta)&lt;/td&gt;
&lt;td&gt;Describes a tight bound, meaning both the upper and lower bounds are the same order. (&lt;strong&gt;&lt;em&gt;When the best and worst scenarios are the same&lt;/em&gt;&lt;/strong&gt;) It represents the asymptotically exact growth rate.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note&lt;/em&gt;&lt;/strong&gt;: &lt;em&gt;Average case is often analyzed separately and doesn’t always equal Θ.&lt;/em&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Diagram for Big O, Big Omega, Big Theta
&lt;/h4&gt;

&lt;p&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%2Fkwn2oz8br2vcmcf7j1dv.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%2Fkwn2oz8br2vcmcf7j1dv.png" alt=" " width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ω(n) → lower bound curve (algorithm will never be faster than this).&lt;/li&gt;
&lt;li&gt;O(n) → upper bound curve (algorithm will never be slower than this).&lt;/li&gt;
&lt;li&gt;Θ(n) → sits between them when both bounds match.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Practice Exercises &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Check out the following Blog that explain how to calculate time complexity for most common scenarios in details: &lt;a href="https://dev.to/talaamm/big-o-notation-examples-4ej"&gt;Big O Notation Examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I would really recommend checking these exercises to test your knowledge: &lt;a href="https://gist.github.com/jhwheeler/995dab35210c550b51b3b4160933a541" rel="noopener noreferrer"&gt;Big O Notation Exercises - GitHub&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Resources &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Cracking the Coding Interview Book&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/dsa/analysis-algorithms-big-o-analysis/" rel="noopener noreferrer"&gt;Big O Notation Tutorial - A Guide to Big O Analysis - GeeksforGeeks&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Thanks for reading! &lt;/p&gt;

&lt;p&gt;Happy Coding!💻😀&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
      <category>go</category>
    </item>
    <item>
      <title>Will GPT-5 &amp; Future AI Replace Junior Developers? Is Learning to Code Still Worth It?</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Sat, 09 Aug 2025 11:07:18 +0000</pubDate>
      <link>https://dev.to/talaamm/will-gpt-5-replace-junior-developers-or-just-redefine-them-588e</link>
      <guid>https://dev.to/talaamm/will-gpt-5-replace-junior-developers-or-just-redefine-them-588e</guid>
      <description>&lt;p&gt;&lt;em&gt;“GPT-5 can build a functional website in seconds. Is that the end of the junior developer… or the start of a completely new role?”&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;1. The Reality: AI as an Augmenter, Not a Replacer (For Now)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Every major AI release sparks the same debate: &lt;em&gt;“Will it take my job?”&lt;/em&gt;&lt;br&gt;
With GPT-5 and other apps ability to generate full-stack apps in one click, it’s tempting to think the answer is &lt;strong&gt;yes&lt;/strong&gt;, especially for junior developers.&lt;/p&gt;

&lt;p&gt;But the numbers tell a more nuanced story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Copilot&lt;/strong&gt; users reported finishing tasks &lt;strong&gt;56% faster&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google’s internal AI experiments&lt;/strong&gt; showed a &lt;strong&gt;21% boost&lt;/strong&gt; in developer productivity&lt;/li&gt;
&lt;li&gt;Real-world teams report &lt;strong&gt;30–50% time savings&lt;/strong&gt; on repetitive tasks like refactoring and documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&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%2Faazzzv7nglzydrb6u1um.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%2Faazzzv7nglzydrb6u1um.png" alt="ai productivity gains" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And adoption is exploding:&lt;br&gt;
Nearly &lt;strong&gt;half of all developers&lt;/strong&gt; are already using AI tools, and in some companies, the number is closer to &lt;strong&gt;92%&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;2. Where AI Still Struggles&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Yes, GPT-5 can &lt;em&gt;code&lt;/em&gt;, but it still falls short in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Business context&lt;/strong&gt; - AI doesn’t intuitively “get” the purpose behind features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture decisions&lt;/strong&gt; - It can suggest solutions, but not necessarily the right one for &lt;em&gt;your&lt;/em&gt; system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Critical thinking &amp;amp; creativity&lt;/strong&gt; - It can &lt;strong&gt;remix&lt;/strong&gt; ideas, but human originality still sets projects apart&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability&lt;/strong&gt; - AI may still produce flawed code in complex projects, that might slow teams down instead of speeding them up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In fact, a &lt;strong&gt;METR study&lt;/strong&gt; found that for some senior devs, reviewing and fixing AI code made them &lt;strong&gt;19% slower&lt;/strong&gt;. &lt;a href="https://arxiv.org/abs/2507.09089" rel="noopener noreferrer"&gt;Read more here&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3. What Industry Leaders Are Saying&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Goldman Sachs&lt;/strong&gt; economists warn that Gen Z tech workers ~especially juniors~ are at the &lt;em&gt;highest risk&lt;/em&gt; from AI-driven automation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub’s CEO&lt;/strong&gt; put it bluntly: “Embrace AI or get out”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bill Gates&lt;/strong&gt; and &lt;strong&gt;OpenAI’s Bret Taylor&lt;/strong&gt; agree: AI changes the landscape, but deep programming skills, systems thinking, and human judgment remain &lt;strong&gt;irreplaceable&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;4. The Junior Developer’s Role is Evolving&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of writing every line of code from scratch, juniors may soon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Act as &lt;strong&gt;curators&lt;/strong&gt; of AI-generated code, ensuring it meets quality and business goals&lt;/li&gt;
&lt;li&gt;Work more like &lt;strong&gt;product thinkers&lt;/strong&gt;, shaping what AI builds instead of just building it themselves&lt;/li&gt;
&lt;li&gt;Learn &lt;strong&gt;AI prompt engineering&lt;/strong&gt;, &lt;strong&gt;code review at scale&lt;/strong&gt;, and &lt;strong&gt;system integration&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&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%2F42qwskuzh377rsca4u6f.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%2F42qwskuzh377rsca4u6f.PNG" alt="Job Automation Risk" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’re not moving toward &lt;em&gt;fewer&lt;/em&gt; skills, just &lt;strong&gt;different&lt;/strong&gt; skills.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;5. So… Should You Still Learn to Code in 2025?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Absolutely!! &lt;strong&gt;but with a twist&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Takeaway&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Why It Matters&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Learn &lt;strong&gt;core coding skills&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;You’ll need to understand AI output deeply enough to trust (or reject) it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Focus on &lt;strong&gt;system design &amp;amp; architecture&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;AI can code modules; humans still design the blueprint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add &lt;strong&gt;AI literacy&lt;/strong&gt; to your toolbox&lt;/td&gt;
&lt;td&gt;Prompting, reviewing, and integrating AI into workflows is the new normal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build &lt;strong&gt;soft skills&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Collaboration, empathy, and creativity will never be automated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Final Thoughts&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Learning to code in the GPT-5 era is &lt;strong&gt;not&lt;/strong&gt; like learning to drive a horse carriage after cars were invented.&lt;br&gt;
It’s more like learning to drive in a world where &lt;strong&gt;autopilot exists&lt;/strong&gt;. You still need to know how to take the wheel when things get tricky. &lt;a href="https://www.instagram.com/reel/DKLtGJsyTsg/?utm_source=ig_web_copy_link" rel="noopener noreferrer"&gt;Watch This&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The future isn’t AI &lt;em&gt;replacing&lt;/em&gt; developers, it’s developers who understand AI replacing those who don’t.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;💬 &lt;strong&gt;What do you think?&lt;/strong&gt;&lt;br&gt;
Are junior dev roles truly at risk, or are we just entering a new golden age of human-AI collaboration?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>GPT-5 Is Here: What It Really Means for Junior Developers (Like Me)</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Fri, 08 Aug 2025 19:35:42 +0000</pubDate>
      <link>https://dev.to/talaamm/gpt-5-is-here-what-it-really-means-for-junior-developers-like-me-591k</link>
      <guid>https://dev.to/talaamm/gpt-5-is-here-what-it-really-means-for-junior-developers-like-me-591k</guid>
      <description>&lt;p&gt;Yesterday, on August 7th, 2025, OpenAI released &lt;strong&gt;GPT‑5&lt;/strong&gt;, and I've been exploring it ever since. As a junior developer, I’ve used earlier versions to help me learn, write and debug code better. But GPT‑5 genuinely changes the game.&lt;/p&gt;

&lt;p&gt;This post isn’t a generic AI hype piece, I want to walk you through what’s &lt;em&gt;actually new&lt;/em&gt; in GPT‑5, what’s improved, and how I (and other early-career developers) can &lt;em&gt;really&lt;/em&gt; benefit from it right now.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;A Smarter Brain with “Thinking Mode”&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GPT‑5 introduces a new internal design where it can switch between two reasoning engines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One for fast, lightweight responses&lt;/li&gt;
&lt;li&gt;Another for deep, multi-step reasoning (it uses it when needed or when prompted with something like: &lt;em&gt;“Think hard about this”&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Before GPT‑5&lt;/strong&gt;, I often had to rephrase my prompts multiple times to get the model to really "think". Now, GPT‑5 does it &lt;em&gt;automatically&lt;/em&gt; or on request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; When I’m stuck on a logic bug or trying to understand a concept deeply, I don’t just want an answer; I want reasoning. GPT‑5 gives me both.🫶&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Improved Code Generation. Especially for Front-End&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GPT‑5 isn’t just better at generating code, it’s &lt;em&gt;more aware&lt;/em&gt; of structure, layout, and intent. Especially when it comes to front-end code (HTML, CSS, JS, Vue, React), the output is cleaner, more semantically correct, and closer to production-ready.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt; We’d often get div soup or have to rework the styling logic manually.&lt;br&gt;
&lt;strong&gt;Now:&lt;/strong&gt; It understands component hierarchy, responsive layout, and even accessibility hints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; As someone still learning the ropes of clean UI/UX code, this accelerates my understanding by showing me &lt;em&gt;better examples&lt;/em&gt; than ever before.🫶&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;“Vibe Coding” and Canvas Preview&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This one blew my mind.&lt;/p&gt;

&lt;p&gt;GPT‑5 (paired with OpenAI’s &lt;em&gt;Canvas&lt;/em&gt;) lets us describe what we want, like: &lt;em&gt;“a minimal to-do app with dark mode and animations”&lt;/em&gt; and it starts building a real UI with &lt;strong&gt;live&lt;/strong&gt; previews. This isn't just generating code... it’s &lt;strong&gt;collaborative prototyping&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; I learn faster by &lt;em&gt;seeing and tweaking&lt;/em&gt;. Watching GPT‑5 create UI flows in real-time is like pair programming with a &lt;em&gt;senior&lt;/em&gt; dev who also happens to be a designer and product thinker.🫶🤯&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;Explains Code Like a Mentor Would&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GPT‑5 adapts explanations to our current knowledge level. If I say &lt;em&gt;“explain like I’m new to JavaScript closures”&lt;/em&gt;, I get a beginner-friendly breakdown. If I ask for &lt;em&gt;“the performance tradeoffs between useMemo and useCallback”&lt;/em&gt;, I get a much deeper dive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt; GPT sometimes gave generic or overly simplified responses.&lt;br&gt;
&lt;strong&gt;Now:&lt;/strong&gt; It feels like it's actually &lt;em&gt;teaching&lt;/em&gt;, not just answering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; No one wants just to copy code. I want to &lt;em&gt;understand&lt;/em&gt; it, how and why. GPT‑5 makes that learning curve smoother and more tailored.🫶&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;More Reliable: Fewer Hallucinations, More Honesty&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;OpenAI claims GPT‑5 hallucinates &lt;strong&gt;45% less&lt;/strong&gt; than GPT‑4o, and in my current short experience, that's true. It’s also better at &lt;em&gt;admitting when it doesn’t know&lt;/em&gt; or when a question needs clarification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt; I had to double-check almost everything it generated.&lt;br&gt;
&lt;strong&gt;Now:&lt;/strong&gt; I still review the code (always should), but I &lt;em&gt;trust&lt;/em&gt; the logic more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; As a junior dev, I don’t always know what's right or wrong, so having a more reliable assistant reduces time wasted on debugging misleading suggestions.🫶&lt;/p&gt;




&lt;h3&gt;
  
  
  6. &lt;strong&gt;Developer-Personality Presets&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;GPT‑5 includes four customizable response styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Listener&lt;/strong&gt; – calm, reflective responses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robot&lt;/strong&gt; – concise, no-fluff logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nerd&lt;/strong&gt; – super-detailed and technical&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cynic&lt;/strong&gt; – sarcastic, for fun debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried the “Nerd” mode today and actually found it helpful! It gave me ultra-detailed answers, just as I wanted, with citations and theory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; Sometimes I need a &lt;em&gt;mentor&lt;/em&gt;, other times I need a &lt;em&gt;debugging partner&lt;/em&gt;. Now I have both all the time.🫶&lt;/p&gt;




&lt;h3&gt;
  
  
  7. &lt;strong&gt;It’s Everywhere Now — Not Just in ChatGPT&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you use &lt;strong&gt;GitHub Copilot&lt;/strong&gt;, &lt;strong&gt;Cursor&lt;/strong&gt; ,&lt;strong&gt;VSCode&lt;/strong&gt;, &lt;strong&gt;Microsoft 365&lt;/strong&gt;, or even &lt;strong&gt;Azure AI Studio&lt;/strong&gt;, GPT‑5 is integrated or rolling out soon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it matters:&lt;/strong&gt; I can use GPT‑5 beyond side chats. It becomes part of my IDE, my editor, my docs, and my workflows.🫶&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;As someone still navigating the early stages of my developer journey, GPT‑5 isn’t just a tool. It’s a &lt;strong&gt;tutor, pair programmer, documentation companion, and sometimes even a confidence booster&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you’re a junior dev like me: Don’t just use GPT‑5 to get answers. Use it to &lt;strong&gt;understand&lt;/strong&gt;, &lt;strong&gt;ask better questions&lt;/strong&gt;, and &lt;strong&gt;build faster&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We finally have a model that doesn’t just “respond”, it really helps you &lt;em&gt;grow&lt;/em&gt;. Use it wisely.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Have you tried GPT‑5 yet? I’d love to hear how you’re using it in your learning or coding workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s keep learning together.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>chatgpt</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What Is a .env File and Why Should You Use It?</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Fri, 01 Aug 2025 06:01:01 +0000</pubDate>
      <link>https://dev.to/talaamm/what-is-a-env-file-and-why-should-you-use-it-599o</link>
      <guid>https://dev.to/talaamm/what-is-a-env-file-and-why-should-you-use-it-599o</guid>
      <description>&lt;p&gt;In modern development, &lt;code&gt;.env&lt;/code&gt; files are essential for managing environment-specific configuration. Whether you're building a Node.js backend, a Python app, or a full-stack project, you’ve probably seen a &lt;code&gt;.env&lt;/code&gt; file somewhere. But what exactly is it?&lt;/p&gt;




&lt;h3&gt;
  
  
  What Is a &lt;code&gt;.env&lt;/code&gt; File?
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;.env&lt;/code&gt; file (short for &lt;em&gt;environment&lt;/em&gt;) is a &lt;strong&gt;plain text file&lt;/strong&gt; where you store environment variables as key-value pairs&lt;/p&gt;

&lt;p&gt;These values are &lt;strong&gt;not hardcoded&lt;/strong&gt; into your application, which means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your config stays clean &lt;/li&gt;
&lt;li&gt;You can change settings without touching your code &lt;/li&gt;
&lt;li&gt;Sensitive data stays out of your Git repo &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What Should You Store in &lt;code&gt;.env&lt;/code&gt;?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;API keys&lt;/li&gt;
&lt;li&gt;Database URLs&lt;/li&gt;
&lt;li&gt;Secret tokens (like JWT secrets)&lt;/li&gt;
&lt;li&gt;Environment flags (e.g., &lt;code&gt;NODE_ENV=production&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Any config that varies by environment&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  How to Use &lt;code&gt;.env&lt;/code&gt; in Your Project🛠️
&lt;/h3&gt;

&lt;h4&gt;
  
  
  In &lt;strong&gt;Node.js&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a .env file in the root of your project, save in it your secret variables like a key-value pair:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PORT=3000
DB_HOST=localhost
JWT_SECRET=yourSuperSecretKeyHere
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install the &lt;code&gt;dotenv&lt;/code&gt; package, in your terminal run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt; Load the &lt;code&gt;.env&lt;/code&gt; File in Your Code
At the top of your main file (like &lt;code&gt;server.js&lt;/code&gt; or &lt;code&gt;index.js&lt;/code&gt;), add this line:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now you can access your environment variables using:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SECRET&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;JWT_SECRET&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wait, What’s &lt;code&gt;process.env&lt;/code&gt;? 🤔
&lt;/h3&gt;

&lt;p&gt;In Node.js, &lt;code&gt;process.env&lt;/code&gt; is a built-in object that gives you access to &lt;strong&gt;environment variables&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you write &lt;code&gt;process.env.JWT_SECRET&lt;/code&gt;, you're saying:&lt;/p&gt;

&lt;p&gt;"Give me the value of the environment variable named &lt;code&gt;JWT_SECRET&lt;/code&gt;."&lt;/p&gt;

&lt;p&gt;It's how your app knows which port to use, what database to connect to, or what secret to use for signing tokens, &lt;strong&gt;without hardcoding them into your source files.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🚫 Don’t Commit &lt;code&gt;.env&lt;/code&gt; to Git!
&lt;/h3&gt;

&lt;p&gt;Always add it to your &lt;code&gt;.gitignore&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .gitignore
.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.env&lt;/code&gt; files store environment variables&lt;/li&gt;
&lt;li&gt;Keep secrets out of your code&lt;/li&gt;
&lt;li&gt;Use libraries like &lt;code&gt;dotenv&lt;/code&gt; to access them&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Never commit &lt;code&gt;.env&lt;/code&gt; to version control&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Generate a Random String for a JWT Secret</title>
      <dc:creator>Tala Amm</dc:creator>
      <pubDate>Thu, 31 Jul 2025 05:55:51 +0000</pubDate>
      <link>https://dev.to/talaamm/generate-a-random-string-for-a-jwt-secret-2g1e</link>
      <guid>https://dev.to/talaamm/generate-a-random-string-for-a-jwt-secret-2g1e</guid>
      <description>&lt;h2&gt;
  
  
  How to Generate a Random String for a JWT Secret (Safely!)
&lt;/h2&gt;

&lt;p&gt;When working with &lt;strong&gt;JWT (JSON Web Tokens)&lt;/strong&gt; in your authentication system, one of the most important things is your &lt;strong&gt;JWT secret key&lt;/strong&gt;. This is the string used to &lt;strong&gt;sign&lt;/strong&gt; and &lt;strong&gt;verify&lt;/strong&gt; the token, like a password for your server to trust the token.&lt;/p&gt;

&lt;p&gt;So, how do you generate a good, secure one?&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 What Makes a Good JWT Secret?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Long (at least 32+ characters)&lt;/li&gt;
&lt;li&gt;Random (not guessable, not a real word)&lt;/li&gt;
&lt;li&gt;Includes letters, numbers, and symbols&lt;/li&gt;
&lt;li&gt;Stored securely (like in &lt;code&gt;.env&lt;/code&gt; files)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔧 Generate One Using Code
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Bash terminal (Most Recommended)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl rand &lt;span class="nt"&gt;-hex&lt;/span&gt; 64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Node.js (JavaScript)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Generate a 64-character random string&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Python
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;secrets&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;token_hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛡️ Where Do You Store It?
&lt;/h3&gt;

&lt;p&gt;In a &lt;code&gt;.env&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JWT_SECRET=9f7a41a6e23... (your generated key)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in your code (JavaScript):&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;const&lt;/span&gt; &lt;span class="nx"&gt;jwtSecret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;JWT_SECRET&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  What NOT to Do ❌
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Don't hard-code your secret in the codebase&lt;/li&gt;
&lt;li&gt;Don't commit &lt;code&gt;.env&lt;/code&gt; files to GitHub&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ Final Tip
&lt;/h3&gt;

&lt;p&gt;Regenerate your secret if you suspect a leak. Any old tokens will become invalid; which is exactly what you want in that case.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jwt</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
