<?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: Rakib Hasan</title>
    <description>The latest articles on Forem by Rakib Hasan (@meetrakib).</description>
    <link>https://forem.com/meetrakib</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%2F3650406%2Fc5ded418-235f-4c9f-80dd-54447d107880.png</url>
      <title>Forem: Rakib Hasan</title>
      <link>https://forem.com/meetrakib</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/meetrakib"/>
    <language>en</language>
    <item>
      <title>I Built a Mini Derivatives Exchange in Python. Here's How I Used Cursor Without Letting It Run the Show.</title>
      <dc:creator>Rakib Hasan</dc:creator>
      <pubDate>Sun, 01 Mar 2026 20:05:51 +0000</pubDate>
      <link>https://forem.com/meetrakib/i-built-a-mini-derivatives-exchange-in-python-heres-how-i-used-cursor-without-letting-it-run-the-500e</link>
      <guid>https://forem.com/meetrakib/i-built-a-mini-derivatives-exchange-in-python-heres-how-i-used-cursor-without-letting-it-run-the-500e</guid>
      <description>&lt;p&gt;This year I wanted to level up in AI assisted coding as a senior engineer. Also I have interests on Trading. So I built a paper derivatives exchange: order book, limit and market orders, matching engine, positions. Python, FastAPI, PostgreSQL. I used Cursor the whole time, but not the way you might think. I didn't type "build me an exchange" and hit enter. I wrote the architecture first. Then I drove Cursor one module at a time. That made all the difference.&lt;/p&gt;

&lt;p&gt;If you're thinking of building something like this with an AI pair programmer, here's what actually worked for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write the plan before you write (or generate) any code
&lt;/h2&gt;

&lt;p&gt;The first thing I did was open a doc, not the IDE. I wrote a single architecture and projects file. In it I spelled out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How repos are split (frontend and backend always separate, one deployable per backend).&lt;/li&gt;
&lt;li&gt;Which repo does what (exchange API, demo UI, where gamification would plug in later).&lt;/li&gt;
&lt;li&gt;Tech choices: FastAPI, PostgreSQL, Binance public API for prices. Why no Kafka yet.&lt;/li&gt;
&lt;li&gt;Module boundaries: core, market_data, orders, matching, positions, integration. Each with a clear job and a public interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That doc became the plan Cursor and I worked from. When Cursor suggested putting the UI in the same repo as the API, I pointed back at the doc and said no. That's basically what Cursor calls Plan Mode: get the design and the file-level plan right before you let the agent write code.&lt;/p&gt;

&lt;h2&gt;
  
  
  One deployable, but with real boundaries (modular monolith)
&lt;/h2&gt;

&lt;p&gt;I went with a modular monolith. One service, one database, but strict module boundaries. Each module has a public interface (like OrderService.place, OrderBook.add). Nothing crosses the boundary by importing another module's internals.&lt;/p&gt;

&lt;p&gt;Why? Two reasons. First, ops stay simple. Second, I could give Cursor very focused tasks. "Implement OrderService.place in the orders module and wire it to the matching engine." Not "build the whole trading flow." I pasted or pointed at the architecture doc so it didn't invent a different structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  The matching engine: break it into steps you can verify
&lt;/h2&gt;

&lt;p&gt;The matching engine is the heart of the thing. I wanted price-time priority, limit and market orders, and on fill we'd update positions and optionally ping a gamification API.&lt;/p&gt;

&lt;p&gt;I didn't ask for "a matching engine" in one go. I broke it down.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data structures.&lt;/strong&gt; Define Order, Fill, and an OrderBook (bids and asks by price level). I described the behavior I wanted and had Cursor implement add, insert, cancel, best bid, best ask.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matching logic.&lt;/strong&gt; When we place an order, load the book from the DB (all open limit orders), run book.add(order), get back a list of Fills. Cursor implemented that. I reviewed how fills were applied to orders and positions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistence.&lt;/strong&gt; Orders and positions live in PostgreSQL. The book is rebuilt from the DB on every place and cancel. So we don't rely on long-lived in-memory state. That was a deliberate trade: simplicity and correctness over ultra-low latency for this project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step was one focused prompt with clear success criteria. When something was wrong (for example the maker order not updating on fill), I didn't keep patching in chat. I reverted, tightened the plan, and ran the agent again. Cursor's own docs say to do that. It works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the agent find context. You own the boundaries.
&lt;/h2&gt;

&lt;p&gt;I didn't paste the whole codebase into the prompt. I kept an architecture doc and a README as the "rules." I pointed at existing code: "Add the integration call where we apply fills, same pattern as in positions/service.py." I let Cursor use grep and semantic search to find where orders are saved and where positions are updated.&lt;/p&gt;

&lt;p&gt;That kept prompts short and kept the agent inside the boundaries I'd set.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I shipped and what I'd do next
&lt;/h2&gt;

&lt;p&gt;I ended up with: order book, limit and market orders, positions, real market data from Binance (no API key), optional POST to a gamification API on fill, and a README with an architecture diagram, system design notes, and an API table. Docker Compose for local run.&lt;/p&gt;

&lt;p&gt;What I'd do before calling it production-ready: add rate limiting (e.g. Redis) and proper unit tests for the matching engine (OrderBook.add, insert, cancel) plus integration tests for place, cancel, and book. Then the agent can iterate against a test suite too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;A mini derivatives exchange is a real project. Using Cursor like a senior meant: (1) writing the architecture and module map first, (2) breaking implementation into small steps I could review, (3) giving the agent clear boundaries and examples instead of "build everything," and (4) reverting and refining the plan when it went off spec. The result is a codebase I can explain in an interview and a story about how I used AI without letting it own the design.&lt;/p&gt;

&lt;p&gt;If you're building something similar, try starting with a one-pager: repos, modules, and why this way. Then drive Cursor one module at a time. You'll get better code and a better story.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Repo links:&lt;/strong&gt; &lt;a href="https://github.com/meetrakib/mini-derivatives-exchange" rel="noopener noreferrer"&gt;mini-derivatives-exchange&lt;/a&gt; (backend), &lt;a href="https://github.com/meetrakib/mini-exchange-ui" rel="noopener noreferrer"&gt;mini-exchange-ui&lt;/a&gt; (frontend). Both READMEs have architecture diagrams, API docs, and system design notes.&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>vibecoding</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How Early Success in Tech Almost Stalled My Growth</title>
      <dc:creator>Rakib Hasan</dc:creator>
      <pubDate>Wed, 17 Dec 2025 13:15:02 +0000</pubDate>
      <link>https://forem.com/meetrakib/how-early-success-in-tech-almost-stalled-my-growth-1bi8</link>
      <guid>https://forem.com/meetrakib/how-early-success-in-tech-almost-stalled-my-growth-1bi8</guid>
      <description>&lt;p&gt;Early success in tech feels like momentum you can’t lose.&lt;/p&gt;

&lt;p&gt;You get paid well.&lt;br&gt;
People respect your skills.&lt;br&gt;
Opportunities start coming to you instead of the other way around.&lt;/p&gt;

&lt;p&gt;I experienced that early in my software engineering career and I didn’t realize that the same success was slowly pushing me off track.&lt;/p&gt;

&lt;p&gt;This is not a story about failure due to lack of skill.&lt;br&gt;
It’s a story about losing direction after success and what it took to recognize and correct it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accidental Beginnings, Real Momentum
&lt;/h2&gt;

&lt;p&gt;I didn’t plan to become a software engineer.&lt;/p&gt;

&lt;p&gt;I learned Python during university to do small side hustles. My original plan was to focus on .NET, but Python projects kept finding me. Small scripts turned into paid freelance work. Then came web projects, Django applications, payment integrations, production systems.&lt;/p&gt;

&lt;p&gt;Within a few years, I was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Working on real-world production systems&lt;/li&gt;
&lt;li&gt;Handling clients directly&lt;/li&gt;
&lt;li&gt;Designing backend architectures&lt;/li&gt;
&lt;li&gt;Leading engineering teams in startups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the outside, everything looked right.&lt;/p&gt;

&lt;p&gt;Inside, I believed something dangerous:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If my skills got me here, they’ll keep me here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  When Success Stops Teaching You
&lt;/h2&gt;

&lt;p&gt;The problem with early success is that it reduces urgency.&lt;/p&gt;

&lt;p&gt;I stopped asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What should I learn next?&lt;/li&gt;
&lt;li&gt;What will matter in five years?&lt;/li&gt;
&lt;li&gt;Who am I surrounding myself with?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead, I focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delivering&lt;/li&gt;
&lt;li&gt;Earning&lt;/li&gt;
&lt;li&gt;Staying busy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn’t notice that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My learning became shallow&lt;/li&gt;
&lt;li&gt;My routines disappeared&lt;/li&gt;
&lt;li&gt;My curiosity declined&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I was still productive but I wasn’t growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The People Problem Engineers Don’t Talk About
&lt;/h2&gt;

&lt;p&gt;One of my biggest mistakes had nothing to do with code.&lt;/p&gt;

&lt;p&gt;I spent years around people who weren’t my peers.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Friends with mentors&lt;/li&gt;
&lt;li&gt;Noise with insight&lt;/li&gt;
&lt;li&gt;“Marketing” with shortcuts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I tried to learn business and marketing from the wrong people. I invested time and money chasing knowledge that wasn’t real. That environment slowly distorted my thinking.&lt;/p&gt;

&lt;p&gt;As engineers, we often underestimate how much our circle shapes our trajectory.&lt;/p&gt;

&lt;p&gt;Wrong people don’t slow you down immediately.&lt;br&gt;
They slowly pull you off course.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Cost of Losing Direction
&lt;/h2&gt;

&lt;p&gt;Losing direction doesn’t look like failure.&lt;/p&gt;

&lt;p&gt;It looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No long-term learning roadmap&lt;/li&gt;
&lt;li&gt;Ignoring new technology waves&lt;/li&gt;
&lt;li&gt;Poor financial discipline despite good income&lt;/li&gt;
&lt;li&gt;Escaping stress instead of fixing systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the AI wave started accelerating, I realized something painful:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I was late, not because I lacked intelligence, but because I lacked focus.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That realization hit harder than any rejection or failed project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Wake-Up Moment
&lt;/h2&gt;

&lt;p&gt;At one of my lowest points, I disconnected from almost everyone.&lt;/p&gt;

&lt;p&gt;One day, I found an old note I wrote years earlier — a personal roadmap.&lt;br&gt;
It had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear goals&lt;/li&gt;
&lt;li&gt;Daily routines&lt;/li&gt;
&lt;li&gt;Learning plans&lt;/li&gt;
&lt;li&gt;A disciplined version of myself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That version felt unfamiliar.&lt;/p&gt;

&lt;p&gt;That’s when I understood:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I didn’t lose my skills.&lt;br&gt;
I lost alignment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What Early Success Taught Me (The Hard Way)
&lt;/h2&gt;

&lt;p&gt;Here are the lessons I wish I understood earlier:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Early success hides structural problems&lt;/strong&gt;&lt;br&gt;
Momentum can mask bad habits for years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Skills decay without intentional learning&lt;/strong&gt;&lt;br&gt;
Especially in fast-moving fields like software and AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Routine matters more than motivation&lt;/strong&gt;&lt;br&gt;
Consistency beats intensity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Your environment is part of your system&lt;/strong&gt;&lt;br&gt;
Choose peers, not just friends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Direction &amp;gt; speed&lt;/strong&gt;&lt;br&gt;
Moving fast in the wrong direction is still failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rebuilding With Intention
&lt;/h2&gt;

&lt;p&gt;Today, I’m rebuilding my career with clarity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI and system design as core learning paths&lt;/li&gt;
&lt;li&gt;Strong routines for work and life&lt;/li&gt;
&lt;li&gt;Better boundaries with people and time&lt;/li&gt;
&lt;li&gt;Long-term thinking instead of short-term wins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This time, I’m not chasing momentum.&lt;br&gt;
I’m building systems that sustain growth.&lt;/p&gt;




&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;If you’re early in your career and things are going well, pause and audit your direction.&lt;/p&gt;

&lt;p&gt;If you’re successful but uneasy, trust that feeling.&lt;/p&gt;

&lt;p&gt;And if you feel lost:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You don’t need a new career.&lt;br&gt;
You need a new system.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;P.S: Follow me to learn from my real experiences. I'm sharing my journey publicly.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.meetrakib.com/blog/i-lost-my-direction-after-early-success-in-tech-heres-what-i-learned/" rel="noopener noreferrer"&gt;https://www.meetrakib.com/blog/i-lost-my-direction-after-early-success-in-tech-heres-what-i-learned/&lt;/a&gt; on December 16, 2025.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>softwareengineering</category>
      <category>python</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
