<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oğuz Berkay Yerdelen on Medium]]></title>
        <description><![CDATA[Stories by Oğuz Berkay Yerdelen on Medium]]></description>
        <link>https://medium.com/@berkayyerdelen?source=rss-f682e4d45db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*FnpoGVTLjlgVSXvOThetjg.jpeg</url>
            <title>Stories by Oğuz Berkay Yerdelen on Medium</title>
            <link>https://medium.com/@berkayyerdelen?source=rss-f682e4d45db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:02:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@berkayyerdelen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a geo-search system that survives failure (and why we designed it this way)]]></title>
            <link>https://berkayyerdelen.medium.com/building-a-geo-search-system-that-survives-failure-and-why-we-designed-it-this-way-e6259b5636df?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6259b5636df</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[rabbitmq]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 06:02:35 GMT</pubDate>
            <atom:updated>2026-06-08T06:27:16.645Z</atom:updated>
            <content:encoded><![CDATA[<p>A “nearby shops” feature looks trivial on paper. You take a location, query a database, return results. But at scale, that simple mental model breaks immediately. What you actually end up building is not a query system — it’s a distributed consistency system with a fast read layer on top. And once you accept that, the architecture becomes much clearer. I’ll also share github link but let start to with database.</p><p>We made a deliberate choice:</p><blockquote><em>MongoDB is the system of record. Everything else is a projection.</em></blockquote><p>That single decision drives everything that follows.</p><p>Here is sequence diagram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMvzqSMQERI3vlp4tq4TFQ.png" /></figure><h3>🏪 We refuse to couple writes to downstream systems</h3><p>When a shop is created or updated, the Shop Service writes to MongoDB and an outbox table in the same operation. We do not publish events during the request. We do not update Redis inline. We do not call external systems synchronously. This is intentional, and it is non-negotiable in this architecture. Because in distributed systems, the fastest way to create inconsistency is to tie correctness to network calls.</p><p>So instead, we enforce one rule:</p><blockquote><em>If the database commit succeeds, the system considers the change durable — everything else is asynchronous.</em></blockquote><p>This eliminates an entire class of failure modes: partial writes across systems.</p><h3>⚙️ The outbox pattern is not optional — it is the boundary</h3><p>We treat the outbox table as the <strong>only safe bridge between the transactional world and the event-driven world</strong>. If an event is not in the outbox, it does not exist. This is important because it makes failure explicit instead of implicit.</p><p>We are not relying on:</p><ul><li>best-effort publishes</li><li>retries in application code</li><li>or “hope-based delivery”</li></ul><p>Instead, we rely on a simple invariant:</p><blockquote><em>Database write + event write is atomic. Everything else is retryable.</em></blockquote><p>The Outbox Publisher then becomes a boring but critical component. It polls, publishes to RabbitMQ, waits for acknowledgements, and only then marks events as processed. This design is not elegant — but it is correct under failure. And correctness is the only thing that matters here.</p><h3>📡 RabbitMQ is not a system of truth — and never should be</h3><p>We use RabbitMQ purely as a transport layer. Not as storage. Not as a log. Not as a source of truth. This distinction matters more than most teams realize.</p><p>RabbitMQ gives us:</p><ul><li>delivery guarantees (at-least-once)</li><li>backpressure handling</li><li>consumer decoupling</li></ul><p>But it does not give us:</p><ul><li>global ordering</li><li>deduplication</li><li>replay guarantees</li></ul><p>So we explicitly design around those limitations. We assume messages will be duplicated. We assume consumers will crash. We assume reprocessing will happen. If your system cannot tolerate that assumption, it is already fragile.</p><h3>🗺️ Redis is not your database — it is your projection</h3><p>We use Redis for one reason only <em>to make geo queries fast. </em>Nothing else. Redis contains a derived view of the world, not the world itself. Every event from RabbitMQ eventually updates Redis. But that update is idempotent by design. We never rely on Redis being complete or perfectly consistent at any given moment. Instead, we rely on a simpler property:</p><blockquote><em>Redis converges toward correctness over time.</em></blockquote><p>This is what allows us to keep it fast. Because the moment you treat Redis as a source of truth, you lose the ability to rebuild it safely.</p><h3>Why the read path is intentionally simple</h3><p>When a user performs a geo search, the system does one thing: It queries Redis. That’s it. No fallback logic in the critical path. No fan-out queries. No complex aggregation. We optimize aggressively for the read path because that is the only user-visible latency boundary that matters. Everything else — ingestion, deduplication, synchronization — happens asynchronously. This separation is not accidental. It is the entire architecture.</p><h3>We design for failure as the default state</h3><p>We assume every component will fail independently. Not occasionally — continuously.</p><p>So we design accordingly:</p><ul><li>If MongoDB succeeds and everything else fails → nothing is lost (outbox persists)</li><li>If RabbitMQ goes down → backlog accumulates safely</li><li>If consumers crash → messages are re-delivered</li><li>If Redis disappears → it is fully rebuildable</li></ul><p>This is not resilience as a feature. This is resilience as the baseline operating condition. If your system only works when all components are healthy, it is not production-ready.</p><h3>The core philosophy: everything after the database is disposable</h3><p>This is the most important design decision in the entire system.</p><p>We treat everything except MongoDB as replaceable infrastructure.</p><ul><li>RabbitMQ can be swapped</li><li>Redis can be rebuilt</li><li>Consumers can be restarted</li><li>Entire projections can be regenerated</li></ul><p>But MongoDB defines reality. This gives us something most distributed systems lack <em>a </em><strong><em>single, unambiguous source of truth that can reconstruct everything else</em></strong><em> </em>Without this, systems eventually collapse under operational complexity.</p><h3><strong>The System at Scale: What Happens When Things Go Wrong?</strong></h3><h4>What if Redis crashes and loses all data?</h4><h3>Option 1: Full Rebuild</h3><p>The simplest approach is:</p><ol><li>Read all shops from MongoDB</li><li>Replay them into Redis</li><li>Reconstruct GEO indexes</li></ol><p>This works well for hundreds of thousands of shops but eventually rebuild times become problematic. Its easiest and simple solution also depends on numbers.</p><h3>Option 2: Dual Redis Strategy</h3><p>Some companies run Redis with replicas If Primary dies promote Replica so no rebuild needed which sounds perfectly fine but the downside is infrastructure cost and maintainence.</p><h3>What if Redis is empty during startup?</h3><p>This is a more interesting question. Imagine Redis restarted and Redis contains zero shops.</p><p>Users immediately start searching. What happens? There are multiple strategies.</p><h3>Strategy 1: Fail Closed</h3><p>Return: Search temporarily unavailable. Rarely acceptable because of revenue lose.</p><h3>Strategy 2: Database Fallback</h3><p>Maps API: miss data in redis then hit back to database to keep this operational. Downsides higher db load and slower responses but users continue working</p><h3>Strategy 3: Progressive Rehydration</h3><p>My favorite approach. When Redis comes online: Load regions incrementally based on most requested areas first. Users experience partial degradation instead of complete unavailability.</p><pre>Region A -&gt; Amsterdam<br>Region B -&gt; Paris<br>Region C -&gt; London<br>Region D -&gt; Berlin</pre><h3><strong>What if Redis becomes too large?</strong></h3><p>This is the question every successful system eventually faces.Memory is finite. Growth isn’t. At some point we will see high memory usage and timeouts.</p><p><strong>Option 1: Redis Cluster and sharding</strong></p><p>Each shard owns part of the dataset.</p><p>Pros:</p><ul><li>straightforward scaling</li><li>minimal architecture changes</li></ul><p>Cons:</p><ul><li>higher cost</li><li>more operational complexity</li><li>resharding events</li></ul><h3>Hot/Cold Architecture</h3><p>This is where many mature systems eventually land.</p><p>Instead of storing everything:</p><pre>Redis = Hot Data<br>MongoDB/PostGIS = Cold Data</pre><p>Popular regions remain in Redis. Rarely queried regions remain in durable storage. This dramatically reduces memory requirements.</p><h3>🚀 Final perspective</h3><p>A geo-search system is not a “query problem”.</p><p>It is a <strong>consistency problem disguised as a product feature</strong>.</p><p>The reason this architecture works is not because Redis is fast or RabbitMQ is reliable.</p><p>It works because we are extremely strict about boundaries:</p><ul><li>writes are durable before anything else</li><li>events are asynchronous by default</li><li>consumers are idempotent</li><li>projections are disposable</li><li>recovery is always possible</li></ul><p>That mindset matters more than the tools themselves. Because at scale, the difference between a fragile system and a resilient one is not performance. It is whether the system still behaves correctly when parts of it stop working. And in real-world systems, parts will stop working. Thanks for reading</p><p>Github link : <a href="https://github.com/berkayyerdelen/shop">https://github.com/berkayyerdelen/shop</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6259b5636df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I’m talking about redefining my life, but I’m still drinking the same terrible coffee!]]></title>
            <link>https://berkayyerdelen.medium.com/im-talking-about-redefining-my-life-but-i-m-still-drinking-the-same-terrible-coffee-0523a197d2bc?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/0523a197d2bc</guid>
            <category><![CDATA[self-awareness]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 19:49:19 GMT</pubDate>
            <atom:updated>2026-06-05T19:49:19.340Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been quite a long time since I last wrote anything. Of course, a lot has happened in my life during that time. I decided to start writing here again, almost like a journal, as a way of leaving notes for myself. I’m still learning as I go. Life can be difficult sometimes. I wish we could recognize and understand certain things earlier, before they happen. But that’s just how life works. I think it starts with accepting that this is a natural part of the process.</p><p>Over the past few months, I’ve had plenty of time to reflect on life and revisit some of the experiences that have shaped me. Looking back, I found myself reevaluating many things — decisions I made, lessons I learned, and even some chapters I thought were already closed. I gave certain things another chance, despite having previously sworn them off and declared them finished. Was that a good idea or a bad one? I’m still not sure. But experience is experience, right?</p><p>I’ve also been practicing positive reframing lately, which is a brand-new skill for me because I usually operate in “assume the worst” mode. Well, I am an engineer after all — probability calculations come preinstalled in my default settings! 😄 By now, if you’re still reading, I imagine you’re starting to sound like one of my professors saying, “Alright, get to the point already.”</p><p>During this period, I started redefining who I am. I questioned my own values and thought deeply about how to become the next version of Berkay. At the same time, there’s a possibility that I went into full “crazy mode” and lost my mind a little 😄. I always wondered what companies meant when they talked about their “core values.” It always sounded a bit ridiculous to me. Then one day I thought, “What if I had my own core values?”</p><p>I wasn’t exactly overflowing with creativity, so I asked ChatGPT what I should read on the subject, and it recommended several books. Since then, I’ve started working through them and reflecting on what actually matters to me. The more I read, the more I realized that defining personal values isn’t about creating a fancy mission statement — it’s about understanding what guides your decisions when things get complicated.</p><p>And honestly, that’s where I am right now: trying to figure out what principles I want to carry forward into the next chapter of my life.</p><p><strong>I’ve listed the books below in order:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*czr4fh0v4uybliMS.jpeg" /></figure><ol><li><strong>The Four Agreements</strong> — Don Miguel Ruiz</li><li><strong>The Subtle Art of Not Giving a F*ck</strong> — Mark Manson</li><li><strong>Everything is F*cked</strong> — Mark Manson</li><li><strong>Surrounded by Idiots</strong> — Thomas Erikson</li><li><strong>The Gifts of Imperfection</strong> — Brené Brown</li><li><strong>How to Talk to Anyone</strong> — Leil Lowndes</li></ol><p>Yes, yes! I’m coming back to the “core values” part — which can also be translated as <em>personal values</em> or <em>core principles</em>. I’ve always liked the word “principle,” so I’ll keep using “core principles” throughout the rest of the text.</p><p>At first, I thought these principles were the same as general principles, but of course I was wrong 😄 — here I am, presenting myself as a completely clueless beginner! Because of that, I’ve come to believe that if you sit down and actually write down the principles you already unconsciously live by, you solve a huge part of the problem. Proven by experience! 😊 Now, let’s move on to the principles I’ve chosen for myself.</p><p>“Be impeccable with your word” is not just about the promises we make to others, but also about the promises we make to ourselves. This principle emphasizes being honest, precise, and careful not only in how we speak to others, but also in our internal dialogue. Saying negative or harmful things to ourselves can create internal conflict, whereas being kind and truthful to ourselves leads to a healthier mind and life. In other words, “be true to your word” also includes being loyal to your inner voice. Being honest with yourself is what enables you to be honest with the outside world as well. It highlights how inner validation is actually more important than external validation. (This principle appears in <em>The Four Agreements</em> as the “First Agreement.”)</p><p>“Do not try hard” — sometimes in life, forcing everything, pushing too hard, or trying to control every moment can actually take you further away from what you want. Forced effort often leads to burnout and unhappiness, because life doesn’t always go the way we expect. Expecting everything to be perfect only leads to disappointment. (This idea partially overlaps with <em>The Subtle Art of Not Giving a F*ck</em> by Mark Manson — “don’t try” in a certain sense.)</p><p>“Not every battle is worth fighting.” Not everything deserves your energy, and not every situation requires a reaction. Similarly, everything you hear doesn’t need a response. The important thing is learning to decide what actually matters to you. There is no need to take everything personally.</p><p>“Your happiness is more important than anything.” When you feel like you have to say yes even though you want to say no, or when you constantly put other people’s needs above your own, you slowly burn out. Happiness is not a bonus you earn after making sure everyone else is okay. Understanding that prioritizing yourself is not selfish is an important step. Remember: your happiness comes first. Taking care of yourself and your needs allows you to help others in a healthier and stronger way.</p><p>Maybe these principles will change over time — new ones will come, old ones will go. I can’t say for sure. But during this process of redefining myself, the books I read and especially the focus on personal principles have been a really important step for me. Even though change can be uncomfortable at times, writing things like this helps me understand my own growth more clearly. It lets me see both how much I’ve changed and the values I’m shaping myself around.</p><p>I also want to mention a Dutch singer I really like: Davina Michelle. If you’ve made it this far, I’m sharing a song with her in it at the end of this writing.</p><p>See you in better days.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcZ0ebTYhohA%3Fstart%3D2%26feature%3Doembed%26start%3D2&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcZ0ebTYhohA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcZ0ebTYhohA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e16463e55b717692ed4d3e45f38e9a22/href">https://medium.com/media/e16463e55b717692ed4d3e45f38e9a22/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0523a197d2bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Notes to myself…]]></title>
            <link>https://berkayyerdelen.medium.com/notes-to-myself-8b6c438a3b60?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b6c438a3b60</guid>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 14:37:53 GMT</pubDate>
            <atom:updated>2026-06-03T14:43:03.357Z</atom:updated>
            <content:encoded><![CDATA[<p>After a long break, I’m back in front of you again. This time, I’m sharing notes from a training I attended in recent weeks.</p><p>Normally, I tend to see most trainings like this as unnecessary — you know, I usually prefer self-learning :) — but the person I attended it with is one of the authors of <em>Evolutionary Architecture</em>, and I must say they have a fantastic perspective. During the sessions, I tried to ask the questions I had been struggling with and figure out where my thinking might be off. In this article, I’ll share some of the key insights I took away from the training.</p><p>First, I started by reflecting on which category I fall into. I focused on the relationship between <em>Maker</em> and <em>Amplifier</em>. As a developer, I’ve generally been considered an individual contributor. I had a task in front of me, and my job was to think it through and solve it by the end of the day. What I enjoyed most in this setup was seeing the outcome clearly. In the end, I built something, and seeing it used by people in a live system was incredibly motivating. That’s also part of why I work at a startup — moving fast, building things, and shipping to production quickly fits my working style well.</p><p>But I’m now starting to realize that this approach can eventually wear a person down. I guess this is where the idea of “work smarter, not harder” comes from.</p><p>By the way, I tend to question ideas quite deeply, but I’ve noticed I often apply that questioning to everything except myself. In reality, the first step is turning an unknown into a known unknown. Once something becomes a known unknown, I can actually work with it.</p><p>To understand this, you only need to ask a simple question: “How often do I delegate tasks to others?” If the answer is “almost never,” welcome to the club — but at least now you recognize that this is a known unknown for you.</p><p>Second, there is the distinction between essential complexity and accidental complexity. I think this is something we all do: we often take something that could be simple and make it unnecessarily complicated.</p><p>There’s a great TED Talk on this topic, which I’ll link here. The core idea is simple: <em>“Simplicity is the ultimate sophistication.”</em></p><p>Besides this, it introduced a new diagram into my life. Everyone experiences this diagram on an intuitive level. I strongly recommend that you stop reading here and spend some time thinking about this diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*ojdfgtbnPYoxcWQF.png" /><figcaption><a href="https://en.wikipedia.org/wiki/Mihaly_Csikszentmihalyi">https://en.wikipedia.org/wiki/Mihaly_Csikszentmihalyi</a></figcaption></figure><p>You can model this as a kind of loop.</p><p>When you encounter a difficulty, struggle with it, eventually solve it, and finally reach a point where it becomes simple for you, that entire arc can be treated as a narrative structure. Once you start consciously recognizing this cycle, it becomes easier to tolerate the next problem you face. Knowing that you will go through the same loop again helps you remember that the stress and anxiety you feel are part of the process, not signals that something is going wrong. This awareness significantly increases the likelihood that you will keep going instead of giving up.</p><p>Another thing I learned is the idea of “make time for you.” It’s a simple but powerful statement.</p><p>If you need time, you prioritize tasks, move less urgent ones further down the queue, and create space for yourself. There is always work that needs to be done, and stakeholders may see everything as important — but it might not all be equally important for you personally. Learning to balance this and deliberately making space for yourself is crucial, because your stability matters more than anything else in the long run.</p><p>There is also another useful diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*wyDZyCSDFwkNMkWD.png" /><figcaption><a href="https://leansixsigmagroep.nl/en/lean-agile-and-six-sigma/eisenhower-matrix/">https://leansixsigmagroep.nl/en/lean-agile-and-six-sigma/eisenhower-matrix/</a></figcaption></figure><p>In this article, I’ve tried to put into words my current understanding of things, based on my own experiences and what I’ve learned so far.</p><p>I hope it was also a useful read for you.Take care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b6c438a3b60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your System Is Gaslighting You: The Lost Updates Problem]]></title>
            <link>https://berkayyerdelen.medium.com/your-system-is-gaslighting-you-the-lost-updates-problem-c009e387f003?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/c009e387f003</guid>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[java-concurrency]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 14:37:35 GMT</pubDate>
            <atom:updated>2026-06-04T07:07:31.125Z</atom:updated>
            <content:encoded><![CDATA[<p>This topic has always bothered me because I know a few ways to prevent it, but they are mostly intuitive. In this article, I’ll break it down and present a more structured way to solve the problem.</p><p>Let’s start with the problem statement. ‘Lost updates’ simply means that some updates are being overwritten or lost. More precisely, at runtime, more than one resource tries to read, modify, and write the same data concurrently. When these operations overlap, one of the changes can be overwritten, meaning we lose at least one of the updates. That’s why the term ‘lost updates’ makes sense.</p><h3>Next: Where does the problem happen?</h3><p>Lost updates typically occur in systems where multiple operations can access and modify the same state concurrently thats we already know but this can happen at different levels, mainly:</p><ul><li><strong>Database level (most common)</strong></li><li><strong>In-memory / application-level state</strong></li><li><strong>Distributed systems (multiple services or nodes)</strong></li></ul><p>Let’s start from the closest layer to the application: in-memory state.</p><h3>1. In-memory / Application-side solutions</h3><p>At the application level, lost updates usually happen when multiple threads or async tasks modify shared state without proper coordination.</p><p>Below are simple <strong>in-memory Java examples</strong> showing how updates can be lost, and how to prevent it using:</p><p><strong>Problem: Let say multiple threads incrementing a shared counter:</strong></p><pre>class Counter {<br>    int count = 0;<br><br>    void increment() {<br>        count = count + 1; <br>    }<br>}</pre><p>If two thread try to incresae at the same time we will endup with this scnerioe</p><ul><li>Thread A reads count: 0</li><li>Thread B reads count: 0</li><li>Both compute: 1</li><li>Both write back: 1</li></ul><p>In the end one increment is lost.</p><h4>Solution using <strong>synchronized</strong></h4><pre>class Counter {<br>    private int count = 0;<br><br>    public synchronized void increment() {<br>        count = count + 1;<br>    }<br><br>    public synchronized int getCount() {<br>        return count;<br>    }<br>}</pre><p><strong>Useful when:</strong></p><ul><li>Only <strong>one thread at a time</strong> can enter the method</li><li>Read → modify → write becomes atomic</li></ul><h4>Solution using <strong>Reentrantlock</strong></h4><p>This gives more control than synchronized such as Fairness, Timeout, Condition queues, Interruptible,</p><pre>import java.util.concurrent.locks.ReentrantLock;<br><br>class Counter {<br>    private int count = 0;<br>    private final ReentrantLock lock = new ReentrantLock();<br><br>    public void increment() {<br>        lock.lock();<br>        try {<br>            count = count + 1;<br>        } finally {<br>            lock.unlock();<br>        }<br>    }<br><br>    public int getCount() {<br>        lock.lock();<br>        try {<br>            return count;<br>        } finally {<br>            lock.unlock();<br>        }<br>    }<br>}</pre><h3>Solution using ReadWriteLock</h3><p><strong>Useful when:</strong></p><ul><li>Many reads</li><li>Few writes</li></ul><pre>import java.util.concurrent.locks.ReadWriteLock;<br>import java.util.concurrent.locks.ReentrantReadWriteLock;<br><br>class Counter {<br>    private int count = 0;<br><br>    private final ReadWriteLock rwLock = new ReentrantReadWriteLock();<br><br>    public void increment() {<br>        rwLock.writeLock().lock();<br>        try {<br>            count = count + 1;<br>        } finally {<br>            rwLock.writeLock().unlock();<br>        }<br>    }<br><br>    public int getCount() {<br>        rwLock.readLock().lock();<br>        try {<br>            return count;<br>        } finally {<br>            rwLock.readLock().unlock();<br>        }<br>    }<br>}</pre><p><strong>Useful when:</strong></p><ul><li>Multiple threads can read <strong>at the same time</strong></li><li>Writes are still exclusive</li></ul><h3>Solution using AtomicInteger</h3><p>AtomicInteger only helps for <strong>single variable atomic operations</strong>.</p><p><strong>Useful when:</strong></p><p>The cleanest in-memory fix for the classic lost update problem when you only need simple atomic operations like incrementing.</p><p>It works using <strong>CAS (Compare-And-Swap)</strong> under the hood, so no explicit locks are needed.</p><pre>import java.util.concurrent.atomic.AtomicInteger;<br><br>class Counter {<br>    private AtomicInteger count = new AtomicInteger(0);<br><br>    public void increment() {<br>        count.incrementAndGet();<br>    }<br><br>    public int getCount() {<br>        return count.get();<br>    }<br>}</pre><p>incrementAndGet() is atomic.</p><p>Internally it does something like:</p><pre>1. read current value<br>2. compute new value = old + 1<br>3. try to update it<br>4. if another thread changed it → retry</pre><p>This is done using <strong>CAS (Compare-And-Swap)</strong>:Only update if the value is still what I originally read but this also brings another problem which is ABA.</p><p>CAS checks: <strong>if value == expected</strong> → update but if value <strong>A → B → A</strong></p><p>The value looks unchanged, but something did happen in between.</p><h3>2. Database-level solutions</h3><p>At the database level, lost updates are one of the most common concurrency problems. They happen when multiple transactions read and modify the same row at the same time, and one update overwrites the other.</p><p>To solve this, databases provide several concurrency control techniques. The main approaches are <strong>pessimistic locking, optimistic locking, atomic updates, and isolation levels</strong>.</p><h4>1. Pessimistic locking (SELECT … FOR UPDATE)</h4><p>This approach prevents conflicts by locking the data before it is modified.</p><pre>SELECT balance.  <br>FROM account<br>WHERE id = 1<br>FOR UPDATE;<br><br>UPDATE account<br>SET balance = balance + 50<br>WHERE id = 1;</pre><p><strong>How it works:</strong></p><ul><li>The selected row is locked for the duration of the transaction</li><li>Other transactions trying to access the same row must wait</li><li>Guarantees no lost updates</li><li>Strong consistency</li><li>Can block other transactions</li><li>Risk of deadlocks under heavy contention</li></ul><h4><strong>2. Optimistic locking (version-based control)</strong></h4><p>Instead of locking data upfront, optimistic locking detects conflicts when updating.</p><p>A <strong>version column</strong> is added to the table.</p><h3>Read:</h3><pre>SELECT balance, version<br>FROM account<br>WHERE id = 1;<br><br><br>UPDATE account<br>SET balance = 150,<br>    version = version + 1<br>WHERE id = 1 AND version = 1;</pre><h4>How it works:</h4><ul><li>Each update checks if the version is unchanged</li><li>If another transaction modified the row → update fails</li><li>No locking → better performance</li><li>Works well under low contention</li><li>Requires retry logic in application</li><li>Fails under high contention</li></ul><h3>3. Atomic update statements</h3><p>The safest and simplest case: let the database handle the update atomically.</p><pre>UPDATE account<br>SET balance = balance + 50<br>WHERE id = 1;</pre><h4>How it works:</h4><ul><li>The database performs the read-modify-write internally as a single atomic operation</li><li>No intermediate state is exposed</li><li>No explicit locking required in application code</li></ul><h3><strong>Isolation Levels</strong></h3><h4>1.Read Uncommitted</h4><p>At this level, nothing is really protected. Transactions can see even uncommitted changes from others, which already makes things unsafe.</p><p>Because there is no isolation between reads and writes, lost updates can easily happen. Two transactions can read the same old value and both write back different results, with the last one simply overwriting the first.</p><p>So at this level, lost updates are fully expected and not prevented at all.</p><h4>2.Read Committed</h4><p>This is one of the most commonly used default isolation levels in databases like PostgreSQL and Oracle.</p><p>Here, a transaction only sees data that has been committed. That solves the problem of dirty reads, but it does <strong>not solve lost updates</strong>.</p><p>The reason is subtle but important: each query sees a fresh committed snapshot, but there is no coordination between the “read” and the later “write”.</p><p>So two transactions can still:</p><ul><li>read the same value</li><li>compute new values independently</li><li>write back their results</li></ul><p>Whichever writes last simply overwrites the other. This is the classic “last write wins” behavior.</p><p>So even though Read Committed sounds safe, it still allows lost updates.</p><h4>3.Repeatable Read</h4><p>Repeatable Read improves things by giving each transaction a consistent snapshot of the data. Once a transaction reads a value, it will continue seeing the same value throughout its execution.</p><p>This eliminates non-repeatable reads and makes the transaction feel stable from a reading perspective.</p><p>However, this still does not automatically guarantee protection against lost updates. Why? Because two transactions can still:</p><ul><li>read the same snapshot value</li><li>compute independently</li><li>attempt to write updates</li></ul><p>Depending on the database implementation, one of two things may happen:</p><ul><li>the last writer overwrites the previous one (lost update still happens), or</li><li>the database detects a conflict and aborts one transaction (in stricter systems)</li></ul><p>So Repeatable Read improves consistency, but lost update protection is not guaranteed everywhere.</p><h4>4.Serializable (strongest level)</h4><p>Serializable isolation is the only level that fully prevents lost updates in all cases.</p><p>It forces transactions to behave as if they are executed one after another, even though they may run concurrently internally.</p><p>This means the database ensures that:</p><ul><li>two transactions cannot silently overwrite each other</li><li>if a conflict happens, one transaction will be delayed or forced to retry</li></ul><p>So instead of allowing inconsistent overwrites, the database enforces correctness by making concurrent execution behave like sequential execution.</p><p>This is the only isolation level where lost updates are fully eliminated without needing extra application logic.</p><h3><strong>Final words</strong></h3><p>In this article, we discussed the problem of lost updates — how they occur when multiple threads or transactions try to modify the same data concurrently without proper coordination. We started with simple in-memory examples and then moved on to database-level solutions and isolation levels. Please leave a comment if you have any input. Knowledge increases when shared</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c009e387f003" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Requirements to Reality: How I Think About Systems]]></title>
            <link>https://berkayyerdelen.medium.com/from-requirements-to-reality-how-i-think-about-systems-6c3315cad856?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c3315cad856</guid>
            <category><![CDATA[sdlc]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 13:38:51 GMT</pubDate>
            <atom:updated>2026-06-02T13:38:51.077Z</atom:updated>
            <content:encoded><![CDATA[<p>I don’t really trust “clean” software design explanations anymore.</p><p>Most books on architecture, microservices talks, even well-written blog posts — they smooth out the messy parts. Everything looks logical, layered, and tidy. But real systems don’t behave like that. They grow in uneven directions, under constraints you didn’t fully see at the start.</p><p>Over time, I’ve ended up with a few <strong>heuristics</strong> I keep coming back to when things get complicated.</p><h3>Start with why — or at least don’t skip it</h3><p>A lot of engineers rush straight into solutions. I’ve done it too. It’s probably the most common mistake.</p><p>If you don’t understand why something exists, you end up optimizing something irrelevant. That said, the “why” is rarely fully available at the beginning. In real work, it’s usually fuzzy, political, or partially wrong.</p><p>So I don’t wait for perfect clarity anymore. I start with a guess about the why, and then I try to break it early. If it survives contact with reality, good. If not, I adjust.</p><p>The key thing is not being right upfront — it’s not getting attached to being wrong.</p><h3>Functional requirements are easy. Non-functional ones are where things break</h3><p>Most systems don’t fail because someone forgot a feature.</p><p>They fail because of things that were “assumed” would be fine.</p><p>The usual suspects:</p><p><strong>Reliability</strong><br> If the system breaks often, nothing else matters. Users don’t care about architecture diagrams — they just remember downtime.</p><p><strong>Maintainability</strong><br> This one gets underestimated constantly. A system can look fine for the first release and still be painful for the next five years of changes.</p><p><strong>Scalability</strong><br> People either ignore it or overthink it. Both are expensive. Some systems never need to scale much. Others explode suddenly. Guess which ones everyone wishes they had planned for.</p><p>And honestly, depending on the domain, security or correctness might matter even more than all of these. There’s no universal ranking, even though people like to pretend there is.</p><h3>C4 is not documentation — it’s forcing yourself to think clearly</h3><p>I’ve seen C4 diagrams treated like deliverables. That’s missing the point.</p><p>The value isn’t the diagram. It’s the act of trying to explain the system without hand-waving.</p><p>Most confusion in systems work comes from mental models that were never made explicit. Once you write them down — even roughly — you immediately see what you don’t understand.</p><p>That said, diagrams rot. Fast. So if you’re not revisiting them, they become decoration pretty quickly.</p><h3>Simplicity is something you keep paying for</h3><p>Everyone says they want simple systems. Nobody disagrees with that.</p><p>But systems don’t naturally stay simple. They accumulate structure — sometimes for good reasons, sometimes just because people were trying to “do the right thing” at the time.</p><p>There is complexity you cannot avoid. That part is real and usually comes from the domain itself.</p><p>But there’s also a second kind: the accidental kind. Too many abstractions. Premature generalization. Layers added “just in case.”</p><p>The tricky part is that both kinds look similar while you’re building them.</p><p>So simplicity is less of a design principle and more of a constant cleanup activity.</p><h3>Intuition is real — but it lies sometimes</h3><p>At some point, you start noticing things without being able to immediately explain why.</p><p>A design feels off. A dependency graph feels wrong. A service boundary feels forced. That’s intuition. It’s useful because it’s usually compressed experience. But it’s not always correct. Sometimes it’s pointing at a real issue you just haven’t articulated yet. Other times it’s just your brain pattern-matching the wrong thing. So I try not to “trust” it blindly. I use it as a reason to dig, not as a conclusion. If it survives investigation, it becomes knowledge. If not, you move on.</p><h3>Final words</h3><p>Most of the real work in systems isn’t choosing the “right architecture.” It’s managing tradeoffs while your understanding of the system keeps changing. And honestly, the biggest mistakes usually come from locking in assumptions too early — not from picking the “wrong” pattern.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c3315cad856" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ From Code to Cloud: A Backend Developer’s Journey into Infrastructure Using a Free Tier Account]]></title>
            <link>https://berkayyerdelen.medium.com/from-code-to-cloud-a-backend-developers-journey-into-infrastructure-using-a-free-tier-account-ee94c4dafb98?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee94c4dafb98</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s-cluster-management]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Tue, 02 Jun 2026 13:17:06 GMT</pubDate>
            <atom:updated>2026-06-02T13:17:06.262Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Disclamer: </strong>In this article, I’ll walk through a playground system I recently built to experiment with different ideas. There’s still plenty to improve, but I’m sharing it in its current state because it may provide useful insights for those who are new to this topic and looking to get started.</p><p>As a backend developer, my world used to end at the git push command. I’d write back-end services, optimize my SQL queries, and ensure my APIs were robust. But the moment that code left my local machine, it entered a “Black Box” managed by the DevOps team.</p><p>Recently, I decided to break that, actually in a few hours with AI help.</p><p>I wanted to understand exactly where my code lives, how it scales, and most importantly how to automate the entire process from scratch.</p><p>This is the story of how I built a production-grade AWS environment using Terraform, EKS, ECR, and GitHub Actions.</p><p>Mermaid Flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uR1PGFnYG8rd1xqm" /></figure><h3>🏗️ Phase 1: Mastering the “Foundation”</h3><p>Before I could run a single pod, I needed a network. In the past, I might have clicked around the AWS Console to create a VPC, but I learned quickly that “Click-Ops” is the enemy of reliability.</p><p>I turned to Terraform.</p><p>The Challenge: Subnets, Internet Gateways, and Route Tables. It felt like learning a second language. The Breakthrough: I realized that a VPC is just like a package structure in Java. You want isolation, you want clear boundaries, and you want it to be reproducible. I built a modular VPC spanning multiple Availability Zones. If one AWS data center goes down, my backend stays alive.</p><h3>📦 Phase 2: Solving the “Warehouse” Problem (Dynamic ECR Architecture)</h3><p>As a backend developer, local docker commands are easy. But when you move to the cloud, you need a high-performance Private Registry that can keep up with your CI/CD pipeline.</p><p>Instead of treating each container registry as a one-off task, I approached this with a microservices-first mindset.</p><h3>1. The Power of for_each (Scaling to 100 Microservices)</h3><p>I didn’t want to write duplicate Terraform code for every new microservice (like user-api or payment-api). My goal was: <em>“New service? One line of config.”</em></p><p>The Implementation: In my envs/dev/<a href="http://main.tf/">main.tf</a>, I used avariable “ecr_repositories”that accepts a list of strings. I then called myecrmodule with afor_eachloop.</p><pre>module &quot;ecr&quot; {<br>  for_each = toset(var.ecr_repositories)<br>  source   = &quot;../../modules/ecr&quot;<br>  repository_name = each.value<br>}</pre><p>Terraform automatically iterates through that list and provisions a unique ECR repository for every single service. This is how you transition from “Dev” to “Platform Engineer” you build the system that builds the registries.</p><h3>2. Tag Mutability: Speed vs. Safety</h3><p>I explicitly configured the image_tag_mutability flag.</p><ul><li>The Thinking: In a Production environment, you want tags to be IMMUTABLE. You never want a version like v1.2.3 to be overwritten.</li><li>The Reality of Dev: In this project, I used MUTABLE. Why? Because during development, we push the :latest tag dozens of times an hour while debugging. If the registry was immutable, our CI/CD pipeline would crash on the second push. By using mutable tags in dev, we prioritize developer velocity.</li></ul><h3>3. The Automated Garbage Collector (Lifecycle Policies)</h3><p>Every time you push a new image with the :latest tag, the previous image doesn’t just vanish it becomes an “untagged” ghost. These ghosts are expensive and take up massive space.</p><ul><li>The Solution: I implemented an aws_ecr_lifecycle_policy that looks for any untagged images and deletes them after they reach a certain count. It’s an automated garbage collection for your cloud storage, ensuring your AWS bill only reflects the images you are actually using.</li></ul><h3>4. Security: Scan on Push &amp; Encryption</h3><p>I enabled scan_on_push = true. This tells AWS: <em>“Every time my GitHub Action pushes a new image, run a security scan immediately.”</em> If my Spring Boot base image has a critical vulnerability (CVE), I’ll see it right in the AWS console. I also ensured that every image is encrypted at rest using AWS-managed keys.</p><h3>5. Forced Deletion for Clean Teardowns</h3><p>Finally, I added force_delete = true. In the cloud, AWS tries to protect you by preventing the deletion of a registry that still has images inside. This can be frustrating when you’re running a terraform destroy. By enabling force delete, I’m telling Terraform: <em>“I trust you, wipe it all clean if I ask for a teardown.”</em> 🧹</p><h3>🔐 Phase 3: The End of AWS Secrets</h3><p>One of my biggest fears was accidentally committing an AWS_ACCESS_KEY_ID to GitHub. It’s a classic developer nightmare.</p><p>̶I̶ ̶d̶i̶s̶c̶o̶v̶e̶r̶e̶d̶ ̶a̶ ̶b̶e̶t̶t̶e̶r̶ ̶w̶a̶y̶ still not sure but it was nice exploration: OpenID Connect (OIDC).</p><p>Instead of generating permanent keys, I created a trust relationship between GitHub and AWS. Now, my GitHub Actions runner “proves” who it is, and AWS hands it a temporary, 60-minute token. No keys to leak, no secrets to manage. This was my first “Aha!” moment during learning process.</p><h3>☸️ Phase 4: Deploying to the “Brain” (The Amazon EKS Masterclass)</h3><p>Moving from running docker-compose on my local laptop to a managed Amazon EKS (Kubernetes) cluster was the single biggest leap of this project. It was a transition from “managing containers” to “orchestrating a distributed operating system.”</p><h3>1. The Access Entry Renaissance (No more ConfigMaps!)</h3><p>In the old days of EKS, managing permissions was a nightmare. You had to manually edit a YAML ConfigMap inside the cluster called aws-auth. If you made a typo, you could lock yourself out of your own cluster!</p><p>The Breakthrough: I implemented the modern EKS Access Entry API. Instead of fighting with ConfigMaps, I used Terraform to create a native aws_eks_access_entry for my GitHub Actions role. By setting the authentication_mode to API_AND_CONFIG_MAP, I told AWS: <em>“Trust the IAM API to handle my cluster permissions.”</em> This allowed my CI/CD pipeline to have cluster-admin rights natively, securely, and completely automated.</p><h3>2. Architecture: Multi-AZ and High Availability</h3><p>I didn’t just spin up a cluster; I built a high-availability environment.</p><ul><li>Networking: I spread my Managed Node Group across multiple Availability Zones (eu-west-1a and eu-west-1b).</li><li>The Logic: If an entire AWS data center goes offline, Kubernetes is smart enough to see the failure and automatically reschedule my Spring Boot pods onto the healthy nodes in the other data center. This is “Self-Healing” infrastructure at its finest.</li></ul><h3>3. Taming the JVM (Resource Requests &amp; Limits)</h3><p>Java Spring Boot applications are notorious for their “appetite” for memory. Without limits, a single microservice can consume an entire worker node’s RAM and crash everything around it.</p><ul><li>The Solution: I explicitly defined Resource Limits (cpu: 500m, memory: 512Mi) in my Kubernetes</li></ul><h3>⚙️ Phase 5: The “Infinite” Loop of CI/CD</h3><p>With the infrastructure ready, it was time for the grand finale: Stitching it all together.</p><p>I built a GitHub Actions pipeline that does it all:</p><ol><li>Authenticates via OIDC.</li><li>Builds a multi-stage Docker image (using Java 21 JRE for a tiny footprint).</li><li>Pushes to my private ECR.</li><li>Deploys using kubectl apply.</li><li>Rolls out a fresh restart to ensure the cluster pulls the absolute latest version.</li></ol><h3>💡 The Takeaway</h3><p>B̶y̶ ̶m̶a̶s̶t̶e̶r̶i̶n̶g̶ ̶T̶e̶r̶r̶a̶f̶o̶r̶m̶ ̶a̶n̶d̶ ̶K̶u̶b̶e̶r̶n̶e̶t̶e̶s̶,̶ Of course, I can’t master anything in just a few hours that would be a joke. I simply turned some “unknown knowns” into “known knowns.” I was already familiar with the tools and had been using them, but with AI support, I was able to do this development in 1–2 hours and identify what I was missing but The wall is gone. 🚀</p><h3>🛠️ The Tech Stack in this Journey:</h3><ul><li>IaC: Terraform (Modular Design)</li><li>Compute: Amazon EKS (Kubernetes 1.33)</li><li>Registry: Amazon ECR (with Lifecycle Policies)</li><li>Security: IAM OIDC (Keyless Auth)</li><li>CI/CD: GitHub Actions (Multi-job workflows)</li><li>Backend: Java 21 / Spring Boot 4.0.5</li></ul><p>Github links:</p><p><a href="https://github.com/berkayyerdelen/terraform">https://github.com/berkayyerdelen/terraform</a></p><p><a href="https://github.com/berkayyerdelen/default-spring">https://github.com/berkayyerdelen/default-spring</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5ab2Pq5YEfs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5ab2Pq5YEfs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5ab2Pq5YEfs%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ee0a9b005577147f13c30360f00f6e1/href">https://medium.com/media/2ee0a9b005577147f13c30360f00f6e1/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee94c4dafb98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kendime notlar…]]></title>
            <link>https://berkayyerdelen.medium.com/kendime-notlar-a3c677e53240?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3c677e53240</guid>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Sat, 20 Apr 2024 07:26:02 GMT</pubDate>
            <atom:updated>2024-04-20T07:43:39.881Z</atom:updated>
            <content:encoded><![CDATA[<p>Uzunca bir aradan sonra tekrar sizlerin karşısındayım. Bu sefer ise karşınıza geçen haftalarda almış olduğum bir eğitimden notlar ile karsiniza cikiyorum. Normalde bu tür eğitimlerin birçoğunu gereksiz görürüm malum, kendi kendine öğrenmeyi seven biriyim :) ama eğitim aldığım kişi evolutionary architecture kitabının yazarlarından birisi ve harika bir bakış açısı olduğunu söylemeliyim. İkilemde olduğum soruları aralarda sorup nerelerde yanlış yaptığımı anlamaya çalıştım. Bu makalede eğitim sırasında farkına vardığım önemli yaklaşımları sizlerle paylaşacagim.</p><p>İlk olarak, kendimin hangi kategoride olduğumu anlayarak başladım. Maker/Amplifier arasındaki ilişkiye odaklandım. Developer olarak çalıştığım için genellikle bireysel katkıda bulunan biri olarak düşünülürdüm. Elimde bir görev vardı ve bunun üzerine kafa yorup günün sonunda çözmekten başka bir işim yoktu. Aslında burada, sonucu tamamen gormek beni mutlu ediyordu. Sonuçta, bunu ben yaptım ve canlı sistemde insanlar tarafından kullanılıyor olması, beni inanılmaz derecede motive eden bir eylemdi. Zaten bu yüzden bir start-up’ta çalışıyorum. Hızlıca hareket etmek, geliştirmeyi yapmak ve canlıya çıkarmak tam bana göre bir çalışma hayatıydı ama bu sürecin bir süre sonra insanı yorabileceğini yeni yeni anlamaya başladım. “Work smarter, not harder” sanırım buradan geliyor. Bu arada kavramları ciddi şekilde sorgulayan bir yapım var ama sanırım bu sorgulama olayı kendim haricindeki her şey için geçerliymiş gibi. Burada olması gereken durum aslında bilinmeyen bir şeyi bilinen bir bilinmeyene dönüştürmemle başlıyor. Artık benim için bilinen bir bilinmezlik olduğu için bunun üzerine çalışabilirim. Bu arada bunu anlayabilmek için çok basit bir soru sormanız gerekiyor: “Ne sıklıkla bir şeyleri başkalarına devrediyorum?” Eğer bu sorunun yanıtı neredeyse hiç ise, kulübe hoş geldiniz demektir ama en azından bunun sizin için bilinen bir bilinmez olduğunu anlamışsınızdır.</p><p>Ikinci olarak, <strong>Essential complexity vs. Accidental complexity</strong>, sanırım hepimizin yaptığı bir şey; çok basit çözülebilecek bir durumu gereksiz bir şekilde karmaşık hale getiriyoruz. Aslinda cok guzel bir tedex konusmasi var bunun icin <a href="https://www.youtube.com/watch?v=eWczWFPMA7o">linki</a> burada. Temasi kisaca “Simplicity is the ultimate sophistication”.</p><p>Bunun haricinde hayatıma yeni bir diyagram kazandırdı. Bu diyagramı hissi olarak herkes yaşıyor. Kesinlikle burada okumayı bırakıp bu diyagram üzerinde bir süre düşünmenizi istiyorum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*wuPBz1GHWRnxnyZA.png" /><figcaption>Reference : <a href="https://en.wikipedia.org/wiki/Mihaly_Csikszentmihalyi">https://en.wikipedia.org/wiki/Mihaly_Csikszentmihalyi</a></figcaption></figure><p>Herhangi bir zorlukla karşılaşıp sonra o problemi çözüp en sonunda ise sizin için basit bir şeye dönüşmesi üzerinde bir kurgu yapabilirsiniz. Bilinçli bir şekilde bu döngüyü görmeye başladıktan sonra, önünüze gelen bir sonraki problemde de aynı döngüyü yaşayacağınızı bilmek, yaşadığınız stresin, kaygının bu sürecin bir parçası olduğunu hatırlayıp devam etme olasılığınızı fazlasıyla artırıyor.</p><p>Bir diğer öğrendiğim konu ise ‘make time for you’. Gerçekten inanılmaz bir söylem. Çok basit ve anlaşılabilir bir cümle. Eğer zamana ihtiyacın varsa, öncelik sırasına göre işleri sırala ve kuyruğun sonunda olanları beklet ve o zamanı kendin için kullan. Yapılması gereken bir iş var, paydaşlar için bu iş önemli görünüyor olabilir ama senin için o kadar önemli olmayabilir. Bunun dengesini kurup kendine vakit ayır, çünkü senin stabil halde olman her şeyden çok daha önemli. Cok guzel bir diagram daha var :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1VWKvOy3NeAaHSIr.png" /><figcaption>Reference : <a href="https://leansixsigmagroep.nl/en/lean-agile-and-six-sigma/eisenhower-matrix/">https://leansixsigmagroep.nl/en/lean-agile-and-six-sigma/eisenhower-matrix/</a></figcaption></figure><p>Bu makalede, kendi deneyimlerimden ve öğrendiklerimden yola çıkarak sizlere şu anki benim anladığım kadarıyla kelimelere dökmeye çalıştım. Umarım sizler için de faydalı bir okuma olmuştur. Kalın sağlıcakla.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3c677e53240" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Şirket içerisindeki o darboğaz…]]></title>
            <link>https://berkayyerdelen.medium.com/%C5%9Firket-i%C3%A7erisindeki-o-darbo%C4%9Faz-e9a5098788ac?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9a5098788ac</guid>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[team-management]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 15:55:25 GMT</pubDate>
            <atom:updated>2023-11-11T16:39:50.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Bu aralar, sanırım gereğinden fazla vaktim var ve tekrar kendimi yazmaya verdim. İşin garip yanı, çok ciddi bir kontrol denetiminden geçirmeden yazıları yayınlamak, benim yapmam dediğim davranışlardan biri olabilirdi ama her nasılsa artık umursamamayı öğrenmişe benziyorum. Evet, sanırım yaptığım işin kontrolünü yapmam alışkanlığa dönüşmüş olabilir. Dünyada kaos olacak deseler, ilk soracağım şey kontrol edilen türünden mi, şeklinde olurdu. Neyse, bugün paylaşmak istediğim konu, herkesin şahit olduğu şirket içindeki darboğazlar. Darboğaz derken, bunun bir şahıs olduğunu belirtmem gerekiyor. İleride, şirketlerin işleyişlerindeki diğer darboğaz tiplerine de değinebiliriz.</p><p>Darboğazın herkes tarafından anlaşılabilir anlamı sarp ve dar geçit demekmiş. IT dünyasındaki karşılığı ise bu durumda işlerin yavaşlamasına sebep olan kişi oluyor en azından bu makale kapsamında. Darboğaz olarak nitelendirebileceğim iki opsiyon var. Mevcut çalışanın işteki performansı düşükse, işlerin yavaşlaması mantıken çok normal. Mantıken birisi beklenileni yerine getiremiyorsa, burada yapılabilecek adımlar sabittir. Şahsın performansını artırmaya yönelik birkaç adım atılır, ve belirli aralıklarla performansı üzerine kıyaslama yapıldıktan sonra devam mı yoksa hiç kimsenin hoşlanmadığı bir yola mı gidileceğine karar verilir ama bu makalenin konusu düşük performans sergileyen arkadaşlar degil tam tersine “A player” dediğimiz kişiler.</p><p>Şimdi işler biraz karıştı, değil mi? Nasıl elinden gelenin fazlasını yapan ve iyi performans sergileyen bir kişi, şirket içerisinde darboğaz oluşturabilir ki? Aslında gayet basit; her elin beş parmağı birbirinden farklıdır. Belirli bir süre sonra bu A player arkadaşlar, şirket içinde tanınırlığı artar, çünkü genellikle her işten anlayan kesim bu insanlardır ve günün sonunda insanlar bu arkadaşlara bağımlı hale gelebilirler. Düşünsenize, işinizi iyi yapıyorsunuz, ama insanlar size bağımlı hale geldikten sonra, her kritik karar için sizin fikrinizi istemsizce sorar hale geliyor. Belirli bir süre sonra bu soruları soran insanlar, bu durumu alışkanlık haline getiyorlar.</p><p>Peki, ölçeği şirket içinde bulunabilecek en küçük gruplara yani takımlara indirecek olursak, bu durum nasıl hissediliyor? Tek kelime ile korkunç, çünkü bu darboğazı oluşturan kişinin etkisi daha büyük hissedilir; bu tıpkı depremin yüzeye yaklaştıkça etkisini daha çok hissetmemiz gibi. Şimdi, bu kişileri işini özveriyle yaptığı için suçlayabilir miyiz? Tabii ki hayır, ama bu darboğazı genişletip bir süre sonra darboğazdan kurtulabiliriz. Burada kişinin işten atılmasını kastetmiyorum, aksine kontrol etmenin, daha doğrusu takıma hakimiyetin ne denli önemli olduğunun altını çiziyorum.</p><p>Aslında gayet basit ama bir o kadar etkili yöntemlerle bu durum aşılabilir. Burada denkleme bu kişinin ne kadar paylaşmayı sevdiği gibi birçok değişkenler giriyor. Anahtar kelime ise “bilgi” ve bunu diğer takım arkadaşlarıyla hatta şirket çalışanlarıyla paylaşabileceği ortamı sağlamak. Burada birçok yöntem izlenebilir ama her şirketin kendine ait bir genetiği olduğu için, şu formülü izlerseniz bu durum ortadan kalkar diyemiyorum. Kullanılacak yöntem doğrultusunda şirket içerisindeki bilgi birikimi ne denli artarsa, bu darboğaz oluşturan iyi niyetli arkadaşlarımızın sayısı azalır, hem de iş yükleri azalacağından daha mutlu atmosfer içerisinde çalışacaklardır. Unutmayın, bu darboğazları oluşturanlar da ortadan kaldıranlar da bizleriz.</p><p>Tekrar bir makalenin sonuna geldik. Kendimi oldum olası hep teknik biri olarak düşünürdüm, aslında halen öyleyim, ama son zamanlarda teknik gelişimin haricinde insanların sorunlarını çözerken bulur hale geldim ve şaşırtıcı bir şekilde hoşuma gitmeye başladı. Bu konuda olabildiğince yalın bir şekilde düşüncelerimi paylaşmaya çalışıyorum. Herhangi bir geri bildiriniz varsa, iletişime geçmekten hiç çekinmeyin. Kalın sağlıcakla.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9a5098788ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yapılması gereken çok iş var, başımı kaldıracak zamanım yok ve hiçbir şey zamanında teslim…]]></title>
            <link>https://berkayyerdelen.medium.com/yap%C4%B1lmas%C4%B1-gereken-%C3%A7ok-i%C5%9F-var-ba%C5%9F%C4%B1m%C4%B1-kald%C4%B1racak-zaman%C4%B1m-yok-ve-hi%C3%A7bir-%C5%9Fey-zaman%C4%B1nda-teslim-a9ec8ab8d567?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9ec8ab8d567</guid>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Wed, 08 Nov 2023 09:44:25 GMT</pubDate>
            <atom:updated>2023-11-08T09:56:27.019Z</atom:updated>
            <content:encoded><![CDATA[<h3>Yapılması gereken çok iş var, başımı kaldıracak zamanım yok ve hiçbir şey zamanında teslim edilemiyor.</h3><p>Yazılım geliştirme süreçlerinde en sık karşılaşılan sorunlardan biri, verilen sözlerin zamanında tutulmamasıdır. Bunun birden fazla sebebi olabilir, ancak genellikle başlıkta belirtilen ifadeler zihninizde canlanıyorsa, bu makale sizin için doğru adres gibi görünüyor.</p><p>Geliştirme sürecinin, olması gereken süreden daha uzun sürdüğü nedenleri anlamak istiyorsanız, işte size olasi nedenler</p><ul><li>Hep yeni feature gelistiriyoruz, teknik borclanma aldi basini gitti dur diyen yok.</li><li>Bütün gün boyunca dikkatimi dağıtacak zibilyon durum gerçekleşiyor.</li><li>Planlamayı detaylı yapmalıyız</li><li>Diğer takım geliştirmeyi bitirene kadar bloke olduk.</li><li>Sanki gün 24 saat değilmiş gibi yeni istekler sıraya ekleniyor olması.</li></ul><p>Hâlihazırda yazılım geliştirme yaşam döngüsü içerisindeyseniz, listeye hiç yabancılık çekeceğinizi düşünmüyorum. Sondan başa gidecek şekilde elimden geldiğince kendi düşüncelerimi aktarmaya çalışacağım</p><p><strong>Bir gun nasil 72 saat olabilir ki?</strong></p><p>Client dünyasında bir günde 72 saat olsa da, ayakları yere basan yazılım ekipleri için bir gün hala 24 saattir. Hatta inanamayabilirsiniz, ancak insanlar günlük olarak sadece 4 saat boyunca üretken bir şekilde kod yazabilirler. Kulaklarınıza inanamayabilirsiniz, ama insanlar kendilerini zaman zaman iyi hissetmeyebilir ve üretkenlikleri dalgalanabilir. Bu nedenle, iş sizin üzerinize düşüyor, sevgili Product owner arkadaşlar. Siz sadece ürün teslimatından sorumlu değilsiniz, aynı zamanda takım metriklerinde istikrarı sağlamak da sizin sorumluluğunuzdadır. Bir parantez açmak gerekirse, takım metrikleri dediğimiz şey, düşündüğünüz çıktılar değil aslında verilen sözlerin yerine getirilmesidir.</p><blockquote>Developer lisaniyla rezervasyon servisine redis implemente edecegiz.</blockquote><blockquote>Rezervasyon service response surelerini 20% oranında hızlandırdık</blockquote><p>Burada büyük bir yük PO’ların sırtına biniyor oluyor. Çirkinleşebilecek bir iş bile olsa, takımı dışarıdan gelen taleplere karşı korumak önemlidir. Bu sayede size gelen talepleri önceliklendirebilir ve hatta business’e herhangi bir katkısı olmadığını düşünerek reddedebilirsiniz. Burada asıl vurgulamak istenilen, yapılan işin ne kadar katma değer sağladığıdır. Elimizdeki sınırlı kaynaklarla bu taleplere değer katmak ve önceliklendirmek, adeta bir sanat gibidir. Tabii ki her icraatin alıcısı farklıdır, bu da acı bir gerçektir</p><p><strong>Planlamayi detayli yapmaliyiz</strong></p><p>Ne yazık ki, insanlık genellikle kendini sağlanmış güvenli alandan çıkmaktan kaçınır. Bu, oldukça temel bir dürtüdür ve kişinin kendini güvende hissetme isteğinin son derece normal bir hissiyattır. Aynı zamanda, 100% emin olunmadan adım atılmadığı için bir tür darboğaz yaratabilir. Bu nedenle, her zaman “Kalbinin ve zihninin sesini dinle” kuralını takip etmek önemlidir. Eğer bir iş kalemi için %80 kesinlik ve %20 belirsizlik oranı varsa, bu kabul edilebilir bir durumdur. Bu belirsizlik, “Ne yapacağımı bilmiyorum” anlamına gelmez, ancak gereken iş senaryolarının doğru bir şekilde aktarıldığı, ancak uygulama aşamasında olan %20&#39;lik kısmını ifade eder. Bu, tamamen geliştiricinin üstesinden gelmesi gereken bir durumdur ve zamanla bu %20&#39;lik belirsizlik giderek azalır.</p><p><strong>Hep yeni feature gelistiriyoruz, teknik borclanma aldi basini gitti</strong></p><p>En sevdiğim konulardan biri teknik borçlanma. Tam anlamıyla bir paradoks ve kesin bir çözümü yok, ancak semptomlarını azaltabilecek etkenler bulunuyor, grip gibi. Şimdi özne-yüklem ilişkisi kurarak teknik borçlanmanın doğrudan nedenleri olabilecek grupları inceleyelim. Genellikle probleme nereden başlayacağımı bilmiyorsam, ilk olarak özne ve yüklemi bulurum, ardından olası nedenleri kullanarak çözüm önerilerinde bulunurum.</p><p>Teknik borçlanma kimler tarafından oluşturuluyor? Açıkçası, çok fazla seçeneğimiz yok. PO, QA ve developar’lar, elimizdeki olası kişilerdir. Şimdi, bu kişiler arasından kimlerin codebase’e doğrudan erişimi olduğunu belirlemek gerekiyor. Farkındayım seçenekler hızlıca daraldı. Teknik borçlanmanın sıkça geliştiriciler tarafından dile getirilmesinin nedeni, code base’e erişimi olan tek grup olmalarıdır.</p><p>Burada bir dipnot eklemek istiyorum: PO veya QA, muhtemelen bu endişelerinizi tam olarak anlayamayacaktır, genellikle onlar da baskı altında oluyorlar. Ancak buna rağmen, teknik borçlanmayı azaltmaya yönelik bireysel bazda yaklaşımlar sergileyebiliriz ve bunlar genellikle geliştiricilerin sorumluluğunda gerçekleşiyor.</p><ul><li>Her zaman yanlış kararlar verilebilir, bunu kabul edip backlog’a maintenance task olarak eklemek önemlidir.</li><li>Eğer ciddi teknik borçlanma varsa, %10–20 oranında önceden oluşturulan maddeleri maintenance-task olarak sprinte almak önemlidir.”</li><li>En güvenilir yaklaşım, mimari bir yaklaşım sergilemektir. Event-driven, clean architecture gibi karmaşık kavramlardan bahsetmiyorum. Aslında, çok basit bir proje şablonu ile başlarsanız, bilinçli ve bilinçsiz hata yapma oranınızı düşürecektir. Tüm projeleriniz aynı klasörleme ve isimlendirme standartlarına sahipse, hiç aşina olmadığınız bir projeyi bile rahatlıkla adapte edebilirsiniz.</li><li>Kesinlikle uzak durulması gereken bir diğer konu, her bir proje için farklı çözümler üretmektir. Bundan kesinlikle kaçınılmalıdır. Mümkünse, yeniden kullanılabilir bileşenlere dönüştürüp projeler içinde kullanmak en verimli yaklaşımdır</li><li>Eğer mimari bir değişiklik yapıyorsanız, mümkün olduğunca dokümante edin. Adı umurumda değil, ADR olsun, Confluence sayfasında düz bir doküman yazın veya duvara yazın, ancak yapılan değişikliklerin tarihsel olarak belgelenmesi hayat kurtarabilecek bilgilerdir.</li></ul><p><strong>Bütün gün boyunca dikkatimi dağıtacak zibilyon durum gerçekleşiyor.</strong></p><ul><li>Bu durum genellikle insanlar domain konusunda uzman olduklarında veya şirket içinde bu alanda güvenilir bir isim olduklarında meydana gelir. Bu durumda, oldukça temel bir yöntem takip ediyorum. Takvimi açıp tekrarlayacak şekilde, öğleden önce 10:00–12:00 ve öğleden sonra 14:00–16:00 arasına toplantılar atıyorum. Bu süre zarfı içinde aktif olarak geliştirme yapiyorum. Eğer insanlar senin bilgi ve deneyimini gereksiz yere talep ediyorlarsa, bu durumu çözmek için kararlı ve açık bir tutum sergilemelisin hatta suratını ekşitebilirsin.</li><li>Knowledge transfer sessionları takım içinde bilgi paylaşımını ve yetenek gelişimini teşvik edebilir. Bu, uzun vadeli ve sabir gerektıren bir çözüm olabilir, çünkü daha fazla kişinin uzmanlık alanlarını paylaşması, takım içindeki yeteneklerin artmasına ve tek bir kişiye aşırı yüklenmeden bilgi akışının sağlanmasına yardımcı olabilir. Böylece, bir kişinin her şeyi bilmek zorunda olmadığı ve diğer üyelerin de bilgi ve becerileri arttıkça daha güçlü bir takım oluşturulabilir. Bu, uzun vadeli başarı ve sürdürülebilirlik açısından önemlidir.</li></ul><p><strong>Diğer takım geliştirmeyi bitirinceye kadar bloke olduk.</strong></p><p>Bu işin doğası gereği beklenmedik engellemeler meydana gelebilir ve işler gecikebilir. Bu tür durumlar aslında proaktif iletişim ile kolayca çözülebilir. Tek yapmanız gereken doğru yerde ve doğru zamanda doğru soruları sormaktır.</p><p>Sonunca uzunca bir makalenin sonuna geldik. Benim icinde uzun bir süre sonra tekrar sahalara dönmek gibi oldu. Son birkaç senedir gördüğüm ve olması gerektiğini düşündüğüm yaklaşımları, dilim döndüğünce anlatmaya ve daha da önemlisi paylaşıp fikirlerinizi almak istedim. Bir sonraki makalede görüşmek dileğiyle sağlıcakla kalın.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9ec8ab8d567" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[World of Warcraft ve TDD]]></title>
            <link>https://berkayyerdelen.medium.com/world-of-warcraft-ve-tdd-796a7260982a?source=rss-f682e4d45db------2</link>
            <guid isPermaLink="false">https://medium.com/p/796a7260982a</guid>
            <category><![CDATA[fluentassertions]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[net-core-3]]></category>
            <dc:creator><![CDATA[Oğuz Berkay Yerdelen]]></dc:creator>
            <pubDate>Thu, 30 Jul 2020 20:14:34 GMT</pubDate>
            <atom:updated>2020-07-30T20:51:37.861Z</atom:updated>
            <content:encoded><![CDATA[<p>Herkese selamlar, uzun bir aranın ardından bayram tatilini de fırsat bilip kendime tatil için bir meşgale bulmak istedim. To-Do listem içerisinde uzun süredir örneğini yapmayı ötelediğim <strong>TDD</strong> maddesi gözüme çarptı ve ufaktan işe koyuldum. Gün içerisinde eski oyun arkadaşlarımdan biriyle geçmişi yad edince TDD’de ele alacağım konuyu da şans eseri belirlemiş oldum. Evet domain olarak World of Warcraft seçtim. Bir neslin ömrünü yediği daha doğrusu büyüttüğü ve halen müdavimlerinin kopamadığı mmorpg tarzı olan bir oyundur kendileri.</p><p>Aslında domain olarak Wow’da bulunan temel konseptleri kullanarak önce testlerni yazıp sonradan domain katmanını oluşturmayı planlıyorum. İsterseniz ilk olarak TDD nedir, ne işe yarar adı altında bir girizgah yapalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PwZSOdOS1TLvv9WzOFPgeQ.png" /></figure><p><strong>Test-Driven Development nedir? Ne işe yarar? Bana ne faydası var?</strong></p><p>Genellikle benim jenerasyonumda bulunan yazılımcıların sordukları sorular bunlar oluyor. 😁 Aslında en temel soru şu olmalı Test-Driven development neyi çözüyor ve hangi sebepten ötürü ortaya çıkmıştır. Bu tarz yaklaşımların varoluşsal sebebini zihnimizde canlandırabildiğimiz zaman kavramları daha kolay anlayıp uygulayabiliyoruz.</p><p>✔Öncelikle <strong>TDD</strong> development sürecinde kullanılan bir yaklaşım ve bu yaklaşımı uygularken aslında test case’ler oluşturup öncelikle başarısız olduklarını gördükten sonra refactor edip başarılı hale getirmek en temel amacımız. Zaten hali hazırda test case’in ilk seferde geçmesinin bize hiçbir faydası yok sonuçta başarılı şekilde gececek birşeyin testini yazmak hiç mantıklı degil :)</p><p>✔TDD’nin en güzel avantajlarından biri de ihtiyaçlarımızı tam anlamıyla kavramamızı sağlıyor. Kısacası nelere ihtiyaç duyduğumuzu belirleyip bunun haricinde olan kısımları ise mevcut yapıdan çıkarabiliyoruz. Bunun avantajı ise test edilebilir küçük birimler oluşturup bizi kompleks sınıflardan kurtarması.</p><p>🚩Burada özellikle değineceğim bir kısım daha var genellikle test coverage’ı önemseyen firmalarda sıklıkla göze çarpıyor. Bir unit için birden fazla test yazmaya çalışıp gerçekte neyi test ettiklerini unutuyorlar ve günün sonunda hedeflerinden tamamen sapıyorlar. Küçük bir dipnot olarak belirtmek istedim. 😝</p><p>Buraya kadar olabildiğince soyut kavramlar hakkında konuştuk şimdi ise kod bölümüne geçebiliriz. Makale sonunda aşağıdaki gibi bir proje yapasına sahip olacağız.</p><p><strong>🔹 Proje Yapısı</strong></p><pre>|-Wow.Domain/ <br>|   |-Abstract<br>|      |-Character.cs<br>|      |-Class.cs<br>|   |-Entities<br>|      |Priest.cs<br>|   |-Enums <br>|      |-ClassType.cs<br>|      |-Gender.cs<br>|      |-RaceType.cs<br>|-Wow.DomainTests/ <br>|   |-CharacterTest.cs<br>|   |-ClassTest.cs<br>|   |-PriestTest.cs</pre><p>İlk olarak Enum klasörü altında bulunan enum sabitleri ile başlayalım. ClassType, Gender ve RaceType aslında Wow dünyasında standartlaşmış metaları belirtmek için kullandım. Hemen öncesinde test case’leri daha kolay yazabilmek için nuget üzerinden FluentAssertions paketini indirdim.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e9fc2ce7146c9ea136d7b32bbc9ae5d/href">https://medium.com/media/8e9fc2ce7146c9ea136d7b32bbc9ae5d/href</a></iframe><p>Bu noktadan sonrası artık TDD ‘yi uygulamaya başladığımız nokta oluyor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2075a41c4acaa7c964a829e1a6a7ac56/href">https://medium.com/media/2075a41c4acaa7c964a829e1a6a7ac56/href</a></iframe><p>Mevcut abstract sınıfı oluşturduktan sonra Wow.DomainTest projesi altında Class sınıfını test etmek için test case’lerimizi yazmaya başlıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53012c584ce8bd00d77f52f27e0fa82b/href">https://medium.com/media/53012c584ce8bd00d77f52f27e0fa82b/href</a></iframe><p>👉 Nuget üzerinden Moq gibi paketler kullanmak yerine ClassMock isimli bir sınıf oluşturup ClassMock üzerinden instance alarak unit testleri gerçekleştirmek çok daha kolay oldu. Aynı şekilde Character sınıfı içinde unit testlerini oluşturuyorum.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9318b2a827534d684506f99e7bfa7cc5/href">https://medium.com/media/9318b2a827534d684506f99e7bfa7cc5/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4451a85699681698560f14ba4fc7be87/href">https://medium.com/media/4451a85699681698560f14ba4fc7be87/href</a></iframe><p>Bu noktaya kadar yapılan testler class üzerinden obje oluşturmak içindi. Tabii ki gerçek hayatta sadece objeler için unit yazmıyoruz aynı şekilde iş akışının da doğru bir şekilde ilerleyip ilerlemediğini test etmemiz lazım.</p><p>🚩 Bu yüzden Wow domaini üzerinde basit bir iş akışını test edeceğiz. Ilk olarak Wow literatüründe olan resurection’dan bahsedeyim. Adından da anlaşılacağı üzere PVP anında kaybettiğimiz takım arkadaşımızı tekrar hayata döndürme işlemi diyebiliriz ama bu işlem belirli bir mana cost’a mâl olmakta. Eğer oyuncunun Mana’sı Resurection skill’i için gereken mana cost’undan az ise oyuncuyu hayata döndürmek için gereken resurection skill’ini cast etmemeli. Mana yeterli ise Resurection’ı cast edebilmeli ve mevcut Mana’sından reslemek için kullanılan mana’nın farkı alınmalı.</p><p>İlk olarak Priest isimli bir sınıf oluşturalım ve iş akışımızı buraya taşıyalım.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FBMfO1VW3khCEsqEvcg%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fwarcraft-world-of-warcraft-BMfO1VW3khCEsqEvcg&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2FBMfO1VW3khCEsqEvcg%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="179" frameborder="0" scrolling="no"><a href="https://medium.com/media/620257aae751a57eb1bc5cc5ae13b4e3/href">https://medium.com/media/620257aae751a57eb1bc5cc5ae13b4e3/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a5871adb6e3919a2410c4ab0d2eee3e/href">https://medium.com/media/9a5871adb6e3919a2410c4ab0d2eee3e/href</a></iframe><p>Priest sınfı içerisinde Resurrection isimli bir method tanımlıyoruz ve Mana cost için double tipli bir parametre alıyor. İkinci If condition üzerinde ise bunun doğrulamasını yapıyor. Aslında burada ilk iş akışını sağladık ama daha sonrasında oyuna Combat olarak isimlendirilen yeni bir konsept daha ekleniyor. Bu case’de eğer oyuncu combat’ta ise Resurrection işlemini yapmamalı. Tabii bu akışlar değişirken paralel olarak test case’lerininde değişmesi gerekiyor 😂</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/260dd6a1840381564295c3fdd94029ed/href">https://medium.com/media/260dd6a1840381564295c3fdd94029ed/href</a></iframe><p>En nihayetinde TDD bize mevcut sistemde olan ve oluşabilecek tüm case’leri test etme konusunda muazzam bir esneklik sağlıyor. Sonuçta unit testler bizim uygulamamızda bulunan ilk defans hattımız. Yazdığımız kodun uygulamada nasıl bir davranış sergileyebileceğini ilk elden görebileceğimiz parçalar.</p><p>Umarım baştan sona kadar okuyanlar için faydalı bir örnek olmuştur. Bir sonraki makalede görüşmek dileğiyle, kalın sağlıcakla ✌️ Buradan sonrası sizde :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F7YDaJq1YJmlt1sHHjg%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fwarcraft-world-of-warcraft-7YDaJq1YJmlt1sHHjg&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2F7YDaJq1YJmlt1sHHjg%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="179" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4784cfd3e8cf021ecce24938cc3db39/href">https://medium.com/media/b4784cfd3e8cf021ecce24938cc3db39/href</a></iframe><p>Uygulamanın kaynak kodlarına Github üzerinden erişim sağlayabilirsiniz.</p><p><a href="https://github.com/berkayyerdelen/Wow.Tdd">berkayyerdelen/Wow.Tdd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=796a7260982a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>