<?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>Forem: ivy imoh</title>
    <description>The latest articles on Forem by ivy imoh (@i_moh).</description>
    <link>https://forem.com/i_moh</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%2F3727908%2F10e7d6a4-542f-4637-a21c-8319841e06d9.png</url>
      <title>Forem: ivy imoh</title>
      <link>https://forem.com/i_moh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/i_moh"/>
    <language>en</language>
    <item>
      <title>The Power Of P2P</title>
      <dc:creator>ivy imoh</dc:creator>
      <pubDate>Mon, 23 Mar 2026 15:00:49 +0000</pubDate>
      <link>https://forem.com/i_moh/the-power-of-p2p-1mdk</link>
      <guid>https://forem.com/i_moh/the-power-of-p2p-1mdk</guid>
      <description>&lt;p&gt;&lt;strong&gt;Beyond my repo: What a P2P(Peer to Peer) Audit taught me about Tech Culture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Doing audits is a core part of our learning process, but this past week was a total eye-opener.&lt;/p&gt;

&lt;p&gt;Our module set a challenge: two weeks to complete two projects. The cohort split between Groupie-Tracker and Net-Cat. My team dove into Groupie-Tracker, where I took the lead on the models and API fetching. I really leaned into Agile methodology and Test-Driven Development (TDD);it was a masterclass in clean, functional Go code.&lt;/p&gt;

&lt;p&gt;Then came the twist.&lt;/p&gt;

&lt;p&gt;The audit system is a lottery; you might end up auditing a project you didn't even touch. I drew Net-Cat. Not wanting to show up empty-handed, I spent time brushing up on the concepts so I could ask the right questions.&lt;/p&gt;

&lt;p&gt;In tech, you meet two types of people: those who guard their knowledge and those who are thrilled to share it. I got lucky. This group didn't just 'pass' the audit; they invited me into their logic. They explained every line of code as a collective, and I left that session feeling significantly smarter.&lt;/p&gt;

&lt;p&gt;The Win: P2P isn't just about code review. It's about navigating different social cues, building bridges between teams, and realizing that the best way to learn is often to let someone else teach you.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>writing</category>
      <category>community</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Push_Swap, Paralysis, and Why I Finally Chose the Turk Algorithm</title>
      <dc:creator>ivy imoh</dc:creator>
      <pubDate>Tue, 03 Mar 2026 22:12:19 +0000</pubDate>
      <link>https://forem.com/i_moh/pushswap-paralysis-and-why-i-finally-chose-the-turk-algorithm-3a2p</link>
      <guid>https://forem.com/i_moh/pushswap-paralysis-and-why-i-finally-chose-the-turk-algorithm-3a2p</guid>
      <description>&lt;p&gt;This past week, I almost hid behind “learning.”&lt;/p&gt;

&lt;p&gt;I was working on the push_swap project — a constrained sorting challenge where you must sort a stack of integers using only a limited set of stack operations (sa, pb, ra, etc.). No built-in sort. No shortcuts. Just operations and strategy.&lt;/p&gt;

&lt;p&gt;Instead of building, I kept researching.&lt;/p&gt;

&lt;p&gt;Radix sort?&lt;br&gt;
Turk algorithm?&lt;br&gt;
LIS-based approach?&lt;br&gt;
Chunking?&lt;/p&gt;

&lt;p&gt;I wanted the best algorithm before writing a single serious line of code.&lt;/p&gt;

&lt;p&gt;Time was moving. I wasn’t.&lt;/p&gt;

&lt;p&gt;Eventually, I realized something uncomfortable: I was optimizing for certainty instead of progress.&lt;/p&gt;

&lt;p&gt;So I started building.&lt;/p&gt;

&lt;p&gt;The Structure: Two Executables, One System&lt;/p&gt;

&lt;p&gt;Push_swap requires two programs:&lt;/p&gt;

&lt;p&gt;push_swap → generates sorting instructions&lt;/p&gt;

&lt;p&gt;checker → reads instructions and verifies if the stack ends sorted&lt;/p&gt;

&lt;p&gt;That separation is powerful.&lt;/p&gt;

&lt;p&gt;push_swap does the thinking.&lt;br&gt;
checker enforces correctness.&lt;/p&gt;

&lt;p&gt;It forced me to design properly:&lt;/p&gt;

&lt;p&gt;Parse CLI arguments safely&lt;/p&gt;

&lt;p&gt;Detect duplicates&lt;/p&gt;

&lt;p&gt;Handle both "3 2 1" and 3 2 1 formats&lt;/p&gt;

&lt;p&gt;Exit early if already sorted&lt;/p&gt;

&lt;p&gt;Output instructions exactly as required&lt;/p&gt;

&lt;p&gt;It stopped being “just a sorting problem” and became a systems problem.&lt;/p&gt;

&lt;p&gt;My Flow&lt;/p&gt;

&lt;p&gt;I structured my program like this:&lt;/p&gt;

&lt;p&gt;Parse input&lt;/p&gt;

&lt;p&gt;Validate integers&lt;/p&gt;

&lt;p&gt;Reject duplicates&lt;/p&gt;

&lt;p&gt;Check if already sorted&lt;/p&gt;

&lt;p&gt;Handle small cases (2–3 numbers)&lt;/p&gt;

&lt;p&gt;Delegate large input to the Turk algorithm&lt;/p&gt;

&lt;p&gt;For 3 elements, I hard coded permutations. Why?&lt;/p&gt;

&lt;p&gt;Because there are only 6 possible arrangements. A general algorithm would be overkill. Optimizing small cases reduces total move count dramatically.&lt;/p&gt;

&lt;p&gt;Then came the real decision: what algorithm to use for larger inputs.&lt;/p&gt;

&lt;p&gt;Why I Chose the Turk Algorithm&lt;/p&gt;

&lt;p&gt;Radix sort is simpler to implement. It’s deterministic. It works.&lt;/p&gt;

&lt;p&gt;But push_swap scoring is based on number of moves, not time complexity alone.&lt;/p&gt;

&lt;p&gt;Radix tends to produce more operations.&lt;/p&gt;

&lt;p&gt;The Turk algorithm is different. It’s a greedy insertion strategy:&lt;/p&gt;

&lt;p&gt;Push elements from stack A to stack B&lt;/p&gt;

&lt;p&gt;Calculate the cost to insert each element back into the correct position&lt;/p&gt;

&lt;p&gt;Choose the element with minimal rotation cost&lt;/p&gt;

&lt;p&gt;Optimize rotations using combined operations (rr, rrr)&lt;/p&gt;

&lt;p&gt;Instead of blindly grouping bits (like Radix), Turk evaluates cost dynamically.&lt;/p&gt;

&lt;p&gt;It’s smarter about move count.&lt;/p&gt;

&lt;p&gt;That mattered to me more than implementation ease.&lt;/p&gt;

&lt;p&gt;Was it harder? Yes.&lt;/p&gt;

&lt;p&gt;Did it force me to understand rotation cost pairing and stack state deeply? Absolutely.&lt;/p&gt;

&lt;p&gt;But it produced better results within scoring constraints.&lt;/p&gt;

&lt;p&gt;What I Learned Technically&lt;/p&gt;

&lt;p&gt;Early exits matter.&lt;br&gt;
Checking if the stack is already sorted saves unnecessary computation.&lt;/p&gt;

&lt;p&gt;Small-case optimization is powerful.&lt;br&gt;
Sorting 3 numbers manually is faster and cleaner than general logic.&lt;/p&gt;

&lt;p&gt;Instruction output must be deterministic.&lt;br&gt;
The checker reads from STDIN. One wrong newline breaks everything.&lt;/p&gt;

&lt;p&gt;Algorithm choice depends on constraints.&lt;br&gt;
If this were real-world production code, I’d use sort.Ints().&lt;br&gt;
Here, the constraint is operations. That changes everything.&lt;/p&gt;

&lt;p&gt;Architecture &amp;gt; brute force.&lt;br&gt;
Separating algorithm logic into its own package made iteration easier.&lt;/p&gt;

&lt;p&gt;What I Would Improve&lt;/p&gt;

&lt;p&gt;If I refactor this project, I would:&lt;/p&gt;

&lt;p&gt;Implement an LIS (Longest Increasing Subsequence) strategy to reduce pushes.&lt;/p&gt;

&lt;p&gt;Add a post-processing compression layer to merge:&lt;/p&gt;

&lt;p&gt;ra + rb → rr&lt;/p&gt;

&lt;p&gt;rra + rrb → rrr&lt;/p&gt;

&lt;p&gt;Refactor stack operations into methods for stronger cohesion.&lt;/p&gt;

&lt;p&gt;Benchmark Turk vs Radix for 100 and 500 elements.&lt;/p&gt;

&lt;p&gt;There is always a cleaner abstraction.&lt;/p&gt;

&lt;p&gt;The Real Lesson&lt;/p&gt;

&lt;p&gt;The biggest breakthrough wasn’t algorithmic.&lt;/p&gt;

&lt;p&gt;It was mental.&lt;/p&gt;

&lt;p&gt;I was stuck trying to choose the perfect approach before writing code.&lt;/p&gt;

&lt;p&gt;Once I built a working version — even if imperfect — clarity followed.&lt;/p&gt;

&lt;p&gt;Progress created insight.&lt;/p&gt;

&lt;p&gt;Push_swap isn’t really about sorting.&lt;/p&gt;

&lt;p&gt;It’s about thinking under constraints.&lt;br&gt;
It’s about minimizing cost.&lt;br&gt;
It’s about separating generation from validation.&lt;br&gt;
It’s about designing small systems that behave predictably.&lt;/p&gt;

&lt;p&gt;And most importantly:&lt;/p&gt;

&lt;p&gt;Movement beats theoretical perfection.&lt;/p&gt;

&lt;p&gt;Build first. Optimize second. Reflect third.&lt;/p&gt;

&lt;p&gt;That’s the real algorithm.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>devjournal</category>
      <category>learning</category>
    </item>
    <item>
      <title>Why "Hello, World"</title>
      <dc:creator>ivy imoh</dc:creator>
      <pubDate>Sat, 07 Feb 2026 14:15:18 +0000</pubDate>
      <link>https://forem.com/i_moh/why-hello-world-il4</link>
      <guid>https://forem.com/i_moh/why-hello-world-il4</guid>
      <description>&lt;p&gt;At the beginning of every language, the program is simple, and universal,"Hello,World!" Why?&lt;br&gt;
Ever wondered? Of all the words in the English vocabulary, why this. I took myself through the journey of figuring out why the most basic program was universal across all programming languages. I found something very interesting yet common, how we casually say "hello" each time we call or pick a call, how we unconsciously do a 'mic check' before speaking.I found out that Graham Bell did not come up with 'hello' neither was it some romantic phone call to her wife as the tale goes. It was a lab accident and the first time a signal was sent from one side to another giving "birth" to our now phones. Sometimes a beautiful story is better than a reality. Sometimes the illusion of it makes a great cover!&lt;br&gt;
Now back to our topic, "hello, world" is used to identify that the languages' environment is installed correctly and that the operator understands basic for you.&lt;br&gt;
It is essentially a "handshake"&lt;br&gt;
A way for the machine to tell the human that they are understanding each other.&lt;br&gt;
I went further into my research of 'hello world' and learnt what happened behind the hood, how strings were converted into ones and zeros.&lt;br&gt;
I was intrigued by the fact that each language printed their "hello, world" in a certain way.&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%2Fs5vqtr55ln4nqefpbme1.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%2Fs5vqtr55ln4nqefpbme1.png" alt=" " width="800" height="276"&gt;&lt;/a&gt;&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%2F0t2vhqmmjzuihnp7nczm.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%2F0t2vhqmmjzuihnp7nczm.png" alt=" " width="800" height="285"&gt;&lt;/a&gt;&lt;br&gt;
As I begin my 'handshake' into the Tech world, walk with me through this journey.  &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Poetry and coding</title>
      <dc:creator>ivy imoh</dc:creator>
      <pubDate>Fri, 23 Jan 2026 08:11:02 +0000</pubDate>
      <link>https://forem.com/i_moh/poetry-and-coding-12f6</link>
      <guid>https://forem.com/i_moh/poetry-and-coding-12f6</guid>
      <description>&lt;p&gt;Who would have thought that not tying my identity to a role would propel me to these waters. Where, I dream of fixing bugs and running code…not in writing feelings and escaping reality.&lt;br&gt;
If you had asked me at 18, I would have told you words are my way into the world.&lt;br&gt;
Perhaps it still is!!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
