<?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 Simgesonmez on Medium]]></title>
        <description><![CDATA[Stories by Simgesonmez on Medium]]></description>
        <link>https://medium.com/@simgesonmez90?source=rss-b05359268519------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sqstgMKgY8XSTuqn.jpg</url>
            <title>Stories by Simgesonmez on Medium</title>
            <link>https://medium.com/@simgesonmez90?source=rss-b05359268519------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:57:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@simgesonmez90/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 MICROSERVICES — Designing Fine-Grained Systems]]></title>
            <link>https://medium.com/@simgesonmez90/building-microservices-part-1-5d450f7b244a?source=rss-b05359268519------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d450f7b244a</guid>
            <dc:creator><![CDATA[Simgesonmez]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 21:45:48 GMT</pubDate>
            <atom:updated>2026-11-20T10:56:09.350Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Sam Newman<br>Part 1</blockquote><h3>MicroServices</h3><h4>Key Benefits</h4><p>1- Technology Heterogeneity: Technology agnostic APIs, no constraint on other tech choices.<br>2- Scaling: We can scale only the service that need scaling.<br>3- Ease of Deployment: Mitigates the large impact and high risk encountered when deploying the whole monolith app.<br>4- Resilience: Failures should not be cascading.<br>5- Organizational Alignment: Small &amp; compact teams — easy to shift.<br>6- Composability: Reusable services — can be dynamically combined with other services in various combinations to build complex workflows or new business capabilities.<br>7- Optimizing for Replaceability: Easy to replace or remove without giving much harm.</p><h3>The Evolutionary Architect</h3><h4>Principled Approach</h4><p>There are many trade-off the architects and developers make decisons on: picking a data store, picking a technology stack or how many technology stack is to be used the system etc…<br>The book suggests Principled Approach here, outlines are:</p><h4>Strategic Goals:</h4><p>High level non-tech goals, can be defined at a company level or a divison level. (Where organization is headed, how it sees itself within a term…)</p><h4>Principles</h4><p>The rules driving the operations of tech teams, aligned with strategic rules.<br>Ex: If not planning to deliver a new feature, a principle could be to run more tests and perform benchmarking to harden the existing products against possible performance &amp; security issues.</p><h4>Practices</h4><p>More technical decisions, change more often than the principles.<br>Ex: Picking of a perf optimization technique could be an example of these practices for the perf team.</p><h4>Common Characteristics of a Well-Behaved Services</h4><p>“<em>it needs to be a cohesive system made of many small parts with autonomous lifecycles but all coming together.</em>” — Ben Christensen (Netflix)</p><p><strong>1- Monitoring:</strong> Each service should emit relevant health and usage metrics to provide actionable insights.<br><strong>2- Interface:</strong> Each service should standardize on a small set of interface technologies to simplify consumer onboarding.<br><strong>3- Architectural Safety: </strong>System should be designed wholly in a way to keep a failure or slowdown in one part of a distributed system from cascading and taking down everything else (Circuit Breaker Pattern).</p><h3>How to Model Services</h3><h4>What Makes a Good Service?</h4><p><strong>Loose Coupling : </strong>A change to one service should not require a change to another service in collaboration with it. Chatty communication can increase the risk of tight coupling.</p><p><strong>High Cohesion : </strong>Related behaviours must be bundled together. If the relevant behaviours are scattered around services, any changed needed may require changes in different service — which is a bad practice.</p><h4>The Bounded Context</h4><p>The two key definitions:<br><strong>1- Domain Driven Design and the concept of Domain <br></strong>Where domain defines a specific business area, such as e-commerce, finance or healthcare, DDD is a software design approach that models the real-world domain rules and processes -enforced by the domain- in collaboration with the domain experts.<br><strong>2- Bounded Contexts<br></strong>Decoupled system components and responsibilities using clear, explicit boundaries. If any component makes requests to the other in order to access an information within its bounded context, it must communicate with its explicit boundary using models (reminded me very much of the APIs of microservices).</p><p>Here, we distinguish between <strong>Shared Models</strong> — which are exposed across bounded contexts — and <strong>Hidden Models</strong>, which are used strictly internally. This means that bounded contexts communicate via shared models.</p><p>The book suggests that when identifying bounded contexts and their boundaries, we can initially envision the system as a monolith and treat those contexts as its modules. Once those contexts and boundaries have matured, these <strong>modules </strong>become ideal candidates for extraction into <strong>microservices</strong>.</p><p>Hence, this is an important warning from the author of the book as the best practice: <strong><em>Prematurely decomposing a system</em></strong><em> into microservices can be costly, especially if you are new to the domain. In many ways, having an existing codebase you want to decompose into microservices is much easier than trying to go to microservices from the beginning.</em></p><p>*** When defining a bounded context, we should ask three key questions:</p><ol><li><strong>What capabilities</strong> does this context provide to the rest of the world?</li><li><strong>What data</strong> does it need internally to fulfill those capabilities?</li><li><strong>What models</strong> should it expose and exchange across its boundary to deliver that functionality?</li></ol><p>To Be Continued…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d450f7b244a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Quick Brush-Up On Type Traits Part 1]]></title>
            <link>https://medium.com/@simgesonmez90/c-back-to-basics-09c7d5fd0dd8?source=rss-b05359268519------2</link>
            <guid isPermaLink="false">https://medium.com/p/09c7d5fd0dd8</guid>
            <dc:creator><![CDATA[Simgesonmez]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 18:58:42 GMT</pubDate>
            <atom:updated>2026-11-11T20:33:30.087Z</atom:updated>
            <content:encoded><![CDATA[<p>Reference: <br>- <strong>YT / Template Metaprogramming: Type Traits by Jody Hagins </strong><br>- Google &amp; AI Research &amp; cppreference</p><h3><strong>Introduction</strong></h3><p>Although C++20 Concepts have been around for a while and are much easier to grasp than type traits, I still believe a solid understanding of type traits is essential for building a strong metaprogramming foundation.</p><p>This article serves as a concise summary of type traits — what they are and what they aren’t — alongside a few fundamental practices and key takeaways for my own reference.</p><p>Introduced in C++11 and defined in the &lt;type_traits&gt; header, type traits can be thought of as compile-time properties of types. They are used to query, inspect, and transform types, making them exceptionally powerful in metaprogramming.</p><p><strong>Primary type categories: </strong>Targeting to check fundamental type properties-std::is_integral, std::is_floating_point, std::is_class, std::is_enum, std::is_pointer...</p><p><strong>Type Relationships &amp; Modifiers:</strong> Compare or transform types- std::is_same, std::remove_const, std::add_pointer, std::make_signed...</p><p><strong>Compile-Time Helpers:</strong> Many traits expose a static ::value (boolean or integral constant) or inherit from std::true_type / std::false_type. <br>Since C++17, variable template shorthands ending in _v (e.g., std::is_integral_v&lt;T&gt;) directly yield the boolean result.</p><h3>How they relate to Substitution Failures?</h3><p>Before diving into the mechanics, let’s briefly revisit SFINAE and its relationship with type traits:</p><p><strong>SFINAE</strong> = <strong>Substitution Failure Is Not An Error</strong>. <br>Under this core metaprogramming rule, if substituting template parameters results in an invalid expression during overload resolution, the compiler does not treat it as a hard error. <br>Instead, it quietly discards that candidate from the overload set and continues searching for alternatives. A compilation error is triggered only if no viable overload remains.</p><p>SFINAE enables compilers pick the best template fits best to the context, and performs the best when combined with type traits. <br>Developers use SFINAE (often paired with tools like std::enable_if) to selectively enable or disable functions depending on the traits or capabilities of a given type.</p><p><strong>SFINAE WITHOUT </strong><strong>std::enable_if:</strong></p><pre>// Only to be resolved when T has a nested `type`,<br>// if not, compiler will keep searching<br>template &lt;typename T, typename = std::void_t&lt;typename T::type&gt;&gt; print_trait(T) {<br>    std::cout &lt;&lt; &quot;Has a nested type\n&quot;;<br>}</pre><p><strong>SFINAE WITH </strong><strong>std::enable_if:</strong></p><pre>template &lt;typename T, typename = void&gt;<br>struct has_nested_type : std::false_type {};<br><br>template &lt;typename T&gt;<br>struct has_nested_type&lt;T, std::void_t&lt;typename T::type&gt;&gt; : std::true_type {};<br><br>template &lt;typename T&gt;<br>static constexpr bool has_nested_type_v = has_nested_type&lt;T&gt;::value;<br><br><br>// Only enabled if T is an integral (integer) type<br>template &lt;typename T&gt;<br>std::enable_if_t&lt;has_nested_type_v&lt;T&gt;, void&gt; print_trait(T val) {<br>    std::cout &lt;&lt; &quot;Has a nested type\n&quot;;<br>}</pre><h3>The heart of C++ type traits: integral_constant</h3><p>At its core, <strong>std::integral_constant</strong> is a fundamental building block of C++ template metaprogramming. Introduced in C++11 within the &lt;type_traits&gt; header, its sole job is to wrap a static compile-time constant of any integer, enumeration, or character type into a proper type.</p><p><strong>Definition and Structure</strong></p><pre>template&lt; class T, T v &gt;<br>struct integral_constant {<br>    static constexpr T value = v;<br>    using value_type = T;<br>    using type = integral_constant;<br>    constexpr operator value_type() const noexcept { return value; }<br>    constexpr value_type operator()() const noexcept { return value; } // since C++14<br>};</pre><h3>Rules</h3><blockquote>…explicit specializations of standard library type traits (templates in &lt;type_traits&gt;) are <strong>undefined behavior</strong> unless explicitly permitted by the Standard.</blockquote><p>Because;</p><p>If you specialize a standard type trait for a custom class, you break the compiler’s intrinsic assumptions, which causes silent codegen bugs, internal compiler errors or incorrect template instantiation paths.</p><h3><strong>Specilization</strong></h3><p><em>A </em><strong><em>UnaryTypeTrait</em></strong><em> is a class template that describes a property of its template type parameter with an integral_constant (typically bool_constant, if not transfroming the value) specialization.</em></p><p>My example below with a bit of humor :)</p><pre>#include &lt;cstdio&gt;<br>#include &lt;type_traits&gt;<br><br>template &lt;bool v&gt;<br>struct my_unary_type_trait : std::integral_constant&lt;bool, v&gt; {};<br>using my_type = my_unary_type_trait&lt;true&gt;;<br>using not_my_type = my_unary_type_trait&lt;false&gt;;<br><br>struct Blonde {};<br>struct OtherType {};<br><br>// generic template, returning false<br>template &lt;typename T&gt;<br>struct is_my_type : not_my_type {};<br><br>// specialization for my custom type<br>template &lt;&gt;<br>struct is_my_type&lt;Blonde&gt; : my_type {};<br><br>#define LOG_INFO(msg, ...) fprintf(stdout, &quot;[INFO] &quot; msg &quot;\n&quot; __VA_OPT__(,) __VA_ARGS__)<br><br>int main(void) {<br><br>    LOG_INFO(&quot;Blonde is %s&quot;, is_my_type&lt;Blonde&gt;::value ? &quot;my type&quot; : &quot;not my type&quot;);<br>    LOG_INFO(&quot;OtherType is %s&quot;, is_my_type&lt;OtherType&gt;::value ? &quot;my type&quot; : &quot;not my type&quot;);<br>    return 0;<br>}</pre><p><em>Output:</em></p><blockquote>[INFO] Blonde is my type<br>[INFO] OtherType is not my type</blockquote><h3>Partial Specialization</h3><p>Rather than handling the full set of types, partial specialization handles only a part of the possibilities:</p><pre>// Primary template: evaluates when Condition is true<br>template &lt;bool Condition, typename T, T TrueVal, T FalseVal&gt;<br>struct smart_eval : std::integral_constant&lt;T, TrueVal&gt; {};<br><br>// Partial specialization: evaluates when Condition is false<br>template &lt;typename T, T TrueVal, T FalseVal&gt;<br>struct smart_eval&lt;false, T, TrueVal, FalseVal&gt; : std::integral_constant&lt;T, FalseVal&gt; {};<br><br>template &lt;typename T, T TrueVal, T FalseVal&gt;<br>inline constexpr T true_value_v = smart_eval&lt;true, T, TrueVal, FalseVal&gt;::value;<br>template &lt;typename T, T TrueVal, T FalseVal&gt;<br>inline constexpr T false_value_v = smart_eval&lt;false, T, TrueVal, FalseVal&gt;::value;<br><br>int main()<br>    LOG_INFO(&quot;true_value_v&lt;bool, true, false&gt;::value is %s&quot;, true_value_v&lt;bool, true, false&gt; ? &quot;true&quot; : &quot;false&quot;);<br>    LOG_INFO(&quot;false_value_v&lt;bool, true, false&gt;::value is %s&quot;, false_value_v&lt;bool, true, false&gt; ? &quot;true&quot; : &quot;false&quot;);<br>    return 0;<br>}</pre><p><em>Output:</em></p><blockquote>[INFO] true_value_v&lt;bool, true, false&gt;::value is true<br>[INFO] false_value_v&lt;bool, true, false&gt;::value is false</blockquote><h3><strong>Before a Break: Detection Idiom</strong></h3><p>Very beneficial C++ pattern — specifically using <strong>SFINAE</strong> (Substitution Failure Is Not An Error) along with std::void_t—t<em>o check at compile time whether a class has a specific member function or interface:</em></p><pre>// is_serializable&lt;T&gt; returns true only if T type has a serialize() method<br>template &lt;typename T, typename = void&gt;<br>struct is_serializable : std::false_type {};<br><br>template &lt;typename T&gt;<br>struct is_serializable&lt;T, std::void_t&lt;decltype(std::declval&lt;T&gt;().serialize())&gt;&gt; : std::true_type {};</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09c7d5fd0dd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Local Ollama Models with Continue Extension in VS Code]]></title>
            <link>https://medium.com/@simgesonmez90/using-local-ollama-models-with-continue-extension-in-vs-code-6001e6ae3afb?source=rss-b05359268519------2</link>
            <guid isPermaLink="false">https://medium.com/p/6001e6ae3afb</guid>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[continue]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Simgesonmez]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 09:01:33 GMT</pubDate>
            <atom:updated>2026-11-05T10:26:04.631Z</atom:updated>
            <content:encoded><![CDATA[<h3>0- Motivation</h3><p>Recently, I’ve been diving into ClickHouse source code to better understand modern database internals. My goal isn’t just passive reading, but more than that, I’m targeting to trace query execution paths, map underlying storage structures, and submit fixes to open-source issues.</p><p>To speed up my navigation, I started using GitHub Copilot. Instead of asking Copilot to generate fixes directly, I used it to <strong>accelerate code tracing and to pinpoint logic flow </strong>by inserting strategic log statements to inspect dynamic data structures and code flow in real time.</p><p>With databases, one can quickly run into usage limits. Even for a tiny 20-line method in an OLAP engine, Copilot has to send thousands of lines of surrounding code to the model just to give it enough context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Rd5BAEMJVzWFCc7DWLxtJw.png" /><figcaption>Copilot subscription upgrade warning prompt</figcaption></figure><p>Reaching the limits of the standard Copilot tier forced a decision: pay for a higher subscription level or pivot to self-hosting. I chose to test a local LLM setup using Ollama. That’s what I love about VS Code : it’s lightweight, incredibly customizable, and lets me run my own models without tying me to a single paid ecosystem.</p><h3><strong>1- Running Local Models with Ollama</strong></h3><p><strong>Choosing the Right Models for My Hardware</strong></p><p>Running LLMs locally requires balancing model size with speed. Based on my <strong>NVIDIA GeForce RTX 4070 Ti Super (16GB VRAM)</strong>, I selected targeted models with the help of GPT for two specific developer workflows:</p><h4>i. Autocomplete / FIM (Fill-in-the-Middle)</h4><p><strong>Model:</strong> qwen2.5-coder:1.5b-base<br><strong>Why:</strong> Delivers sub-100ms latency to provide instant completions without interrupting typing flow.</p><h4>ii. Chat, Refactoring, &amp; Deep Reasoning</h4><p><strong>Models:</strong> qwen3.6:35b-a3b (Sparse MoE)<br><strong>Why:<br></strong>qwen3.6:35b-a3b uses a Sparse Mixture-of-Experts architecture, routing only ~3B active parameters per token for fast speeds while maintaining deep reasoning capabilities.</p><h4><strong>Run commands below in order to download &amp; run models</strong></h4><blockquote>ollama pull qwen3.6:35b-a3b<br>ollama pull qwen2.5-coder:1.5b-base</blockquote><blockquote>OLLAMA_CONTEXT_LENGTH=32768 ollama serve</blockquote><h3>2- Using Local LLMs in VS Code via Copilot OR Continue?</h3><p>After running into a wall with Copilot’s tool-calling compatibility with my local models when editing local source code, I decided to switch over to the <strong>Continue</strong> extension. Honestly, the setup and customization experience turned out to be remarkably smooth and super easy.</p><p>If your workflow relies on local models using explicit tool calls (like readfile or editfile), pay close attention to how tool_use is declared. A misconfigured schema will break tool-calling file-edits.</p><p>Tips for configuration: <a href="https://docs.continue.dev/customize/deep-dives/configuration">https://docs.continue.dev/customize/deep-dives/configuration</a></p><p>Here is the exact ~/.continue/config.yaml setup I&#39;m using for reference:</p><blockquote>name: Main Config<br>version: 1.0.0<br>schema: v1<br>models:<br> — name: qwen3.5:35b-a3b<br> provider: ollama<br> model: qwen3.5:35b-a3b<br> roles:<br> — chat<br> — edit<br> — apply<br> capabilities:<br> — tool_use<br> — name: Qwen2.5-Coder 1.5B<br> provider: ollama<br> model: qwen2.5-coder:1.5b-base<br> roles:<br> — autocomplete</blockquote><p><strong>There are built-in tools of course like:</strong></p><p>read_file<br>edit_existing_file<br>create_new_file<br>run_terminal_command<br>grep_search ...</p><p>Here is a quick look at how Continue Chat handles inline code edits via tool capability:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WhJ9ouBEf5VvtKl_EtaxQ.png" /><figcaption>Prompting Continue Chat to edit @inheritance.cpp</figcaption></figure><p>Read more about Continue &amp; Ollama : <a href="https://ollama.com/blog/continue-code-assistant">https://ollama.com/blog/continue-code-assistant</a></p><h3>3- Why I Ended Up Going Back to GitHub Copilot</h3><p>Running local models on consumer hardware works brilliantly for small projects. But as soon as you toss a massive codebase at them, context limits hit hard, leaving the model struggling to parse, trace, and connect the dots across complex source files:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*jMhk_bnuqe2r_H43vCiqyA.png" /><figcaption>Model context warning when reading file contents</figcaption></figure><p>Handling complex architectures and deep stack traces demands more raw capacity and bigger context windows than local setups can comfortably handle. That pushed me to reactivate my Copilot subscription and given how much speed it brings back to my workflow, it’s been worth every penny.</p><p>Simge Sonmez</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6001e6ae3afb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>