<?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 Osman Sokuoğlu on Medium]]></title>
        <description><![CDATA[Stories by Osman Sokuoğlu on Medium]]></description>
        <link>https://medium.com/@osman.sokuoglu?source=rss-3d6997ec993a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gMtljQOZPs2WF8nyfaOgdg.jpeg</url>
            <title>Stories by Osman Sokuoğlu on Medium</title>
            <link>https://medium.com/@osman.sokuoglu?source=rss-3d6997ec993a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:43:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@osman.sokuoglu/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[Day #21 Stack vs Heap: What’s the Difference?]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-21-stack-vs-heap-whats-the-difference-7616001ad63a?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7616001ad63a</guid>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[heap]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 11:50:11 GMT</pubDate>
            <atom:updated>2026-08-22T11:53:43.348Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding the difference between Stack and Heap is one of the basics of memory management in .NET.</p><h3>Stack</h3><p>The <strong>Stack</strong> is a memory area used to store method execution data and local variables. It follows a <strong>LIFO (Last In, First Out)</strong> structure, making allocation and deallocation very fast.</p><h3>Heap</h3><p>The <strong>Heap</strong> is a memory area used to store objects and dynamically allocated data. Objects created with new are typically allocated on the Heap and are managed by the <strong>Garbage Collector (GC)</strong>.</p><h3>When Are They Used?</h3><p>The Stack is mainly used for method calls, local variables, and short-lived execution data. The Heap is used when objects need to live beyond a single stack frame or require dynamic memory allocation. Stack memory is automatically released when a method returns, while Heap memory is managed by the Garbage Collector. The key difference is not simply <strong>“value types = Stack, reference types = Heap”</strong>; where data is stored also depends on the context.</p><h4>💡 Tip of the Day</h4><p><strong>Don’t memorize “Value Type = Stack, Reference Type = Heap.”</strong><br>Think about <strong>where the data lives and how long it needs to live</strong> instead.</p><blockquote>Question : Are strings allocated on the managed heap like other reference types or managed on stack like other value types?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7616001ad63a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #20 SQL Server Understanding Parameter Sniffing]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-20-sql-server-understanding-parameter-sniffing-742cee10dfbb?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/742cee10dfbb</guid>
            <category><![CDATA[parameter-sniffing]]></category>
            <category><![CDATA[execution-plan]]></category>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 09:29:27 GMT</pubDate>
            <atom:updated>2026-08-21T09:29:27.731Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qpZurFL8h-T1tGHLDriDQ.png" /></figure><p><strong>Parameter Sniffing</strong> is one of those SQL Server performance issues that can be difficult to notice because the same query may be extremely fast for one parameter value and unexpectedly slow for another.</p><p>Understanding why this happens can save a lot of time when investigating inconsistent query performance.</p><h3>What Is Parameter Sniffing?</h3><p>When SQL Server executes a query or stored procedure for the first time, it uses the supplied parameter values to create an <strong>execution plan</strong>.</p><p>That plan is then stored in the plan cache and may be reused for subsequent executions.</p><p>For example:</p><pre>EXEC GetOrders @CustomerId = 10;</pre><p>If CustomerId = 10 returns only a few rows, SQL Server might create a plan optimized for a small result set.</p><p>Later, another user executes:</p><pre>EXEC GetOrders @CustomerId = 50000;</pre><p>If this value returns hundreds of thousands of rows, the previously cached plan may no longer be efficient.</p><p>The result can be surprising:</p><pre>User A → 20 ms<br>User B → 8 seconds</pre><p>Even though both users are executing the same stored procedure.</p><h3>Why Does It Happen?</h3><p>The key issue is that <strong>SQL Server optimizes for the parameter value it sees at compilation time, not for all possible parameter values</strong>.</p><p>Imagine a table containing 10 million orders. Most customers may have only a few orders, while a small number of customers may have millions of orders.</p><p>For example:</p><pre>Customer A → 5 orders<br>Customer B → 25 orders<br>Customer C → 4,500,000 orders</pre><p>SQL Server has several ways to access this data. Depending on the expected number of rows, it may choose a completely different strategy.</p><p>For a customer with only a few matching rows, an <strong>Index Seek + Key Lookup</strong> might be very efficient:</p><pre>Index Seek<br>    ↓<br>Few matching rows<br>    ↓<br>Key Lookup</pre><p>But if the query actually needs millions of rows, repeatedly performing lookups can become extremely expensive. In that case, a <strong>Scan</strong> or a different join strategy might be much more appropriate.</p><p>The problem is therefore not simply that SQL Server caches execution plans. <strong>The problem is that one cached plan may not be suitable for very different data distributions.</strong></p><p>This is where Parameter Sniffing becomes a problem.</p><p>This is especially common when a column has <strong>skewed data</strong> — meaning some values occur much more frequently than others.</p><p>In other words:</p><blockquote><strong><em>Different parameter values can require fundamentally different execution strategies, but SQL Server may reuse the same cached plan for all of them.</em></strong></blockquote><h3>How to Detect It?</h3><p>One useful indicator is comparing the <strong>Estimated Number of Rows</strong> with the <strong>Actual Number of Rows</strong> in the execution plan.</p><p>For example:</p><pre>Estimated Rows: 10<br>Actual Rows:    850,000</pre><p>A significant difference can indicate that SQL Server’s assumptions about the data are incorrect.</p><p>Also look for situations where:</p><ul><li>The same query sometimes runs fast and sometimes slowly.</li><li>Performance changes significantly depending on parameter values.</li><li>Re-running the query suddenly makes it faster.</li><li>Clearing the plan cache temporarily changes the performance.</li></ul><blockquote><strong><em>Tip:</em></strong><em> Don’t immediately assume that every execution plan mismatch is caused by parameter sniffing. Statistics, outdated indexes, cardinality estimation, and data distribution can also cause inaccurate row estimates.</em></blockquote><h3>A Temporary Solution: OPTION (RECOMPILE)</h3><p>One common workaround is to force SQL Server to compile the query again for every execution:</p><pre>SELECT *<br>FROM Orders<br>WHERE CustomerId = @CustomerId<br>OPTION (RECOMPILE);</pre><p>This allows SQL Server to generate a plan specifically for the current parameter value.</p><p>However, there is a trade-off.</p><p>Every execution requires a new compilation, which introduces additional CPU and compilation overhead.</p><p>Therefore, OPTION (RECOMPILE) can be useful for specific problematic queries, but it shouldn&#39;t automatically be treated as the default solution.</p><h3>SQL Server 2022: Parameter Sensitive Plan Optimization</h3><p>SQL Server 2022 introduced <strong>Parameter Sensitive Plan (PSP) optimization</strong> to address this type of problem.</p><p>Instead of relying on a single execution plan for all parameter values, SQL Server can maintain multiple plans for different parameter ranges.</p><p>Conceptually:</p><pre>Parameter Value<br>      │<br>      ├── Small result set  → Plan A<br>      │<br>      ├── Medium result set → Plan B<br>      │<br>      └── Large result set  → Plan C</pre><p>This allows SQL Server to select a more appropriate plan based on the parameter value being used.</p><p>For workloads affected by parameter-sensitive queries, PSP can significantly reduce the need for manual workarounds.</p><p><strong>Tip:</strong> If a query is fast for some parameter values but dramatically slower for others, don’t immediately blame the database server. Check the execution plan and the parameter values first. Parameter Sniffing may be the real culprit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=742cee10dfbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #19 Creating And Publishing a Nuget Package]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-19-creating-and-publishing-a-nuget-package-3abbe5589047?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3abbe5589047</guid>
            <category><![CDATA[nuget-package]]></category>
            <category><![CDATA[custom-nuget-package]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 09:13:47 GMT</pubDate>
            <atom:updated>2026-08-21T09:14:29.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wZZ2GevKQCjYvkLk5E0Og.png" /></figure><h3>1. Configure the Project</h3><p>In Visual Studio:<br><strong>Right-click the project → Properties → Package</strong></p><p>Configure the required package information:</p><ul><li>Package name</li><li>Version</li><li>Description</li><li>Author</li><li>Company</li><li>Repository information</li></ul><blockquote><strong><em>Note:</em></strong><em> If the </em><strong><em>Package</em></strong><em> section is not available, make sure the project is a </em><strong><em>.NET Class Library</em></strong><em>.</em></blockquote><p>You can also define the package information directly in the .csproj file:</p><pre>&lt;PropertyGroup&gt;<br>    &lt;PackageId&gt;MyLibrary&lt;/PackageId&gt;<br>    &lt;Version&gt;1.0.0&lt;/Version&gt;<br>    &lt;Authors&gt;MyCompany&lt;/Authors&gt;<br>    &lt;Description&gt;My reusable .NET library.&lt;/Description&gt;<br>&lt;/PropertyGroup&gt;</pre><h3>2. Review the Project Before Packaging</h3><p>Before creating the package:</p><ul><li>Remove unnecessary dependencies.</li><li>Keep only the required NuGet packages.</li><li>Make only the intended APIs public.</li><li>Keep internal implementation classes internal.</li><li>Review all ProjectReference entries.</li></ul><p>For example:</p><pre>&lt;ItemGroup&gt;<br>    &lt;ProjectReference Include=&quot;C:\Projects\Aware\Aware.csproj&quot; /&gt;<br>&lt;/ItemGroup&gt;</pre><blockquote><strong><em>Important:</em></strong><em> Be careful with local </em><em>ProjectReference dependencies. If the referenced project is not included or distributed with your package, consumers may not be able to resolve the dependency.</em></blockquote><p>For reusable libraries, consider publishing shared projects as separate NuGet packages instead of relying on local project references.</p><h3>3. Create the NuGet Package</h3><p>Open a terminal in the directory containing the .csproj file and run:</p><pre>dotnet pack --configuration Release</pre><p>The generated package will normally be available under:</p><pre>bin\Release\</pre><p>For example:</p><pre>bin\Release\<br>└── MyLibrary.1.0.0.nupkg</pre><h4>Version Your Packages</h4><p>Every package release should have a clear version.</p><p>For example:</p><pre>1.0.0  → Initial release<br>1.0.1  → Bug fix<br>1.1.0  → New backward-compatible functionality<br>2.0.0  → Breaking change</pre><h4>Keep the Public API Small</h4><p>Everything marked as public can become part of your package&#39;s external contract. Only expose what consumers actually need.</p><h3>4. Publish the Package to NuGet.org</h3><p>Once the .nupkg file is ready, you can publish it to <a href="https://www.nuget.org/">NuGet.org</a>. There are two common ways to publish a package to NuGet.org.</p><h4>Option 1: Upload from NuGet.org</h4><p>For a manual release, you can upload the .nupkg file directly through the NuGet.org web interface.</p><ol><li>Sign in to NuGet.org.</li><li>Go to the package upload page.</li><li>Select your .nupkg file.</li><li>Review the package information.</li><li>Submit the package.</li></ol><p>This is convenient when publishing a package manually.</p><h4>Option 2: Publish Using the .NET CLI</h4><p>First, sign in to NuGet.org and go to <strong>API Keys</strong>. Create a new API key with the <strong>Push</strong> permission and copy the generated key. Then open a terminal in the folder containing your .nupkg file and run:</p><p>For CLI-based publishing or CI/CD pipelines, use:</p><pre>dotnet nuget push MyLibrary.1.0.0.nupkg \<br>    --api-key YOUR_API_KEY \<br>    --source https://api.nuget.org/v3/index.json</pre><p>The .NET CLI requires authentication when pushing packages to NuGet.org.</p><p>If the upload is successful, NuGet.org will process the package and make it available on the package page.</p><blockquote><strong><em>Important:</em></strong><em> Packages published to NuGet.org are publicly visible. Also, treat your API key like a password. Never commit it to source control or include it directly in your code.</em></blockquote><h3>5. Preparing a New Version</h3><p>When releasing a new version, first update the package version in the .csproj or Visual Studio&#39;s <strong>Package</strong> settings.</p><p>For example:</p><pre>&lt;PropertyGroup&gt;<br>    &lt;Version&gt;1.1.0&lt;/Version&gt;<br>&lt;/PropertyGroup&gt;</pre><p>Then review your changes, update the <strong>Change Notes</strong>, build the project, and create the new package:</p><pre>dotnet pack --configuration Release</pre><p>Before publishing, it is a good idea to test the new .nupkg in a sample or test project to make sure the package works as expected.</p><h3>6. Maintain Change Notes</h3><p>Change Notes should be short and focused on what changed for the package consumer.</p><p>A simple format works well:</p><pre>## 1.1.0 - 2026-08-21</pre><pre>### Added<br>- Added support for XYZ.</pre><pre>### Changed<br>- Updated ABC behavior.</pre><pre>### Fixed<br>- Fixed an issue with XYZ validation.</pre><p>For a smaller release, you don’t need to include every section:</p><pre>## 1.0.1 - 2026-08-21</pre><pre>### Fixed<br>- Fixed an issue where XYZ could return an incorrect result.</pre><blockquote><strong><em>Important:</em></strong><em> Change Notes should describe the </em><strong><em>impact of the release</em></strong><em>, not every individual code change or commit.</em></blockquote><p>For example, this is useful:</p><pre>- Added support for multiple authentication providers.</pre><p>Instead of:</p><pre>- Refactored AuthenticationService.<br>- Changed method X.<br>- Added class Y.<br>- Updated variable Z.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3abbe5589047" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #18 C# Task vs Thread Quick Look]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-18-c-task-vs-thread-quick-look-8296e265035e?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8296e265035e</guid>
            <category><![CDATA[tasks]]></category>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[csharp-programming]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 06:46:33 GMT</pubDate>
            <atom:updated>2025-01-29T06:46:33.563Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Threads </strong>run independently and require manual creation and management (start, stop, pause). Each thread has its own stack and heap memory, which can lead to high system resource consumption.</p><pre>Thread threadInstance= new Thread(() =&gt; {});<br>threadInstance.Start();<br>threadInstance.Sleep(1000);</pre><p>A <strong>Task </strong>represents a unit of work that runs asynchronously without requiring manual control (creation, start, stop). The .NET runtime automatically manages thread operations for tasks, resulting in cleaner and more concise code. Tasks utilize the thread pool, making them more efficient and lightweight compared to threads. They support awaiting, returning values, and error handling using try-catch blocks.</p><pre>public static async Task&lt;string&gt; Main()<br>{<br>  Task taskInstance= Task.Run(() =&gt; {return &quot;some value&quot;;});<br>  return await taskInstance;<br>}<br><br></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8296e265035e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #17 C# Lock Statement]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-17-c-lock-statement-544982dfd059?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/544982dfd059</guid>
            <category><![CDATA[lock-statement]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 20:27:03 GMT</pubDate>
            <atom:updated>2025-01-28T20:28:13.243Z</atom:updated>
            <content:encoded><![CDATA[<p>Suppose our application has a shared resource or value, and multiple threads attempt to access and modify it simultaneously. In such cases, a situation known as a race condition can occur, leading to the shared resource being updated with unexpected or incorrect values.</p><blockquote>For instance, if the AddToBasket() method is called simultaneously by two threads, the itemCount value might end up being 1 instead of 2. This happens because both threads read the initial value as 0 and increment it by 1 independently.</blockquote><pre>public class BasketService{<br>  private readonly int itemCount=0;<br><br>  public void AddToBasket(){<br>    itemCount = itemCount + 1;<br>  }<br>}</pre><p>Another scenario is a deadlock, where multiple threads attempt to access the same resources but in a different order.</p><blockquote>For example, imagine we have two resources, x and y. Thread 1 locks x, and Thread 2 locks y. Now, Thread 1 tries to access y, while Thread 2 attempts to access x. Since both resources are already locked, neither thread can proceed :/</blockquote><p>To address the situations mentioned above, .NET provides the lock mechanism. It ensures that only one thread can execute the code within the lock block at a time.</p><pre>public class BasketService{<br>  private readonly int itemCount=0;<br>  private readonly object lockObj=new object();<br><br>  public void AddToBasket(){<br>    lock (lockObj)<br>    {<br>       itemCount = itemCount + 1;<br>    }<br>  }<br>}</pre><p>Starting with .NET 9 and C# 13, the System.Threading.Lock class was introduced for improved performance. For earlier versions, any object type (except string) is sufficient as a lock object.</p><p>It’s important to avoid using the same lock object for different shared resources, as this can lead to deadlocks. However, multiple methods can use the same <strong>lock </strong>instance to control access to the same resource, preventing simultaneous access by different threads.</p><pre>public class BasketService{<br>  private readonly int itemCount=0;<br>  <br>  //For C# 13 use System.Threading.Lock for better performance<br>  private readonly System.Threading.Lock lockObj= new();<br><br>  //For previous versions use object type<br>  private readonly object lockObj=new object();<br><br>  public void AddToBasket(){<br>    lock (lockObj)<br>    {<br>       itemCount = itemCount + 1;<br>    }<br>  }<br><br>  public void RemoveFromBasket(){<br>    lock (lockObj)<br>     {<br>       itemCount = itemCount -1;<br>     }<br>  }<br>}<br><br>var service = new BasketService();<br>var tasks = new Task[10];<br>for (int i = 0; i &lt; tasks.Length; i++)<br>{<br>  if(i%2==0)<br>    tasks[i] = Task.Run(() =&gt; service.AddToBasket());<br>  else<br>    tasks[i] = Task.Run(() =&gt; service.RemoveFromBasket());<br>}<br>await Task.WhenAll(tasks);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=544982dfd059" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #16 C# Interview — Singleton vs Static]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-16-c-interview-singleton-vs-static-d0ba667a4d36?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0ba667a4d36</guid>
            <category><![CDATA[singleton]]></category>
            <category><![CDATA[static]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 19:26:30 GMT</pubDate>
            <atom:updated>2025-01-20T19:26:30.264Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day #16 C# Interview — Singleton vs Static</h3><p>Can you describe the differences between a singleton or a static class? In what scenarios would you choose one over the other?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0ba667a4d36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #15 Javascript Reverse a Sentence]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-15-javascript-reverse-a-sentence-000ae7a7929f?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/000ae7a7929f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reverse]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Fri, 17 Jan 2025 08:33:57 GMT</pubDate>
            <atom:updated>2025-01-17T08:34:42.492Z</atom:updated>
            <content:encoded><![CDATA[<p>Consider a sentence such as “Life belongs to those who want to live it.” and your task is to reverse the order of the words. The result should be “it. live to want who those belongs Life”</p><p><strong>Solution:</strong></p><pre>function reverseWords(sentence) {<br>    return sentence.split(&#39; &#39;).reverse().join(&#39; &#39;);<br>}<br>console.log(reverseWords(&quot;Life belongs to those who want to live it.&quot;)); <br>// Output: &quot;it. live to want who those belongs Life&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=000ae7a7929f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #14 Javascript Null vs Undefined]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-14-javascript-null-vs-undefined-181f40f27544?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/181f40f27544</guid>
            <category><![CDATA[null]]></category>
            <category><![CDATA[undefined]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 10:24:47 GMT</pubDate>
            <atom:updated>2025-01-05T10:24:47.559Z</atom:updated>
            <content:encoded><![CDATA[<p>What is the difference between null and undefined?</p><p><strong>undefined </strong>means a variable has been declared but not assigned a value. If you do not assign a value to a variable, it automatically gets the value undefined.</p><pre>let abc;<br>console.log(abc); // Output: undefined, variable declared but not initialized<br><br>const objA = {};<br>console.log(objA.title); // Output: undefined, accessing a non-existing property<br><br>function getPrice(quantity) {<br>  let price = product.price * quantity;<br>}<br>console.log(getPrice()); // Output: undefined, unction without a return statement<br><br>const arr = [&#39;apple&#39;, &#39;banana&#39;];<br>console.log(arr[3]); // Output: undefined, array element not defined</pre><p><strong>null</strong> is an assignment value that represents no value or a non-existent object. Used as a placeholder for a value that is expected but not yet available.</p><pre>let abc = null;<br>console.log(abc); // Output: null<br><br>const objA = { name: &quot;Osman&quot; };<br>objA = null; // Intentionally removing the user object<br>console.log(objA); // Output: null<br><br>function getPrice(quantity) {<br>  return null; //explicitly returning null<br>}<br>console.log(getPrice()); // Output: null</pre><p><strong>null vs undefined</strong></p><pre>console.log(undefined == null);  // true<br>console.log(undefined === null); // false, type equality check<br><br>let x;<br>let y= null;<br>let z= undefined;<br><br>console.log(x); // undefined<br>console.log(y); // null<br>console.log(z); // undefined</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=181f40f27544" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #13 Css Gap Property]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-13-css-gap-property-9e4f40d8173b?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e4f40d8173b</guid>
            <category><![CDATA[gap]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 10:06:09 GMT</pubDate>
            <atom:updated>2025-01-05T10:10:18.823Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>gap</strong> property in CSS is used to create space between items in a flexbox, grid or multi-column layout. It is a shorthand for row-gap and column-gap and allow us to break gap between rows and columns;</p><pre>.gap-css{<br>  gap: 50px;<br>  gap: 10px 30px; //or<br>}</pre><p>For example;</p><pre>&lt;div id=&quot;gap-flex-container&quot;&gt;<br>    &lt;div&gt;#Div-1&lt;/div&gt;<br>    &lt;div&gt;#Div-2&lt;/div&gt;    <br>    &lt;div&gt;#Div-3&lt;/div&gt;    <br>    &lt;div&gt;#Div-4&lt;/div&gt;    <br>    &lt;div&gt;#Div-5&lt;/div&gt;    <br>    &lt;div&gt;#Div-6&lt;/div&gt;    <br>    &lt;div&gt;#Div-7&lt;/div&gt;    <br>    &lt;div&gt;#Div-8&lt;/div&gt;    <br>    &lt;div&gt;#Div-9&lt;/div&gt;    <br>&lt;/div&gt;</pre><p>Now, apply the css;</p><pre>#gap-flex-container {<br>  background-color: rgb(128, 219, 255);<br>  display: flex;<br>  flex-wrap: wrap;<br>  gap: 20px 30px;<br> }<br> <br>#gap-flex-container &gt; div { <br>  border: 1px solid rgb(255, 29, 29);<br>  width: 10%; <br>  aspect-ratio: 2;<br>  padding: 10px;<br>  background-color: rgb(228, 231, 19);<br>}</pre><p>Output;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*drhIw_h0UB4tDw_GgIIu0Q.png" /></figure><p>Without using gap property;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UU9gr1_LMeJu4oVdbcFVqw.png" /></figure><p>Another example of using gap property through multi-column layout;</p><pre>&lt;div id=&quot;gap-multi-column&quot;&gt;<br>  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br>&lt;/div&gt;</pre><pre>#gap-multi-column { <br>  border: solid black 1px;<br>  background-color: lightgoldenrodyellow;<br>  columns: 4;<br>  gap: 60px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNZKMZEGPGuZpHxhEYcKCQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e4f40d8173b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day #12 GIT Switch]]></title>
            <link>https://medium.com/@osman.sokuoglu/day-12-git-switch-bfde00df5990?source=rss-3d6997ec993a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfde00df5990</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[git-switch]]></category>
            <dc:creator><![CDATA[Osman Sokuoğlu]]></dc:creator>
            <pubDate>Mon, 16 Dec 2024 08:15:53 GMT</pubDate>
            <atom:updated>2024-12-16T08:15:53.801Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day #12 GIT Switch Command</h3><p>Starting with version 2.23, Git introduced the switch command. This command was developed to focus specifically on branch management and switching operations.</p><p>Previously, we used git checkout for these tasks, but git checkout was also used for other operations, which could sometimes be confusing and increased the likelihood of mistakes.</p><p>The switch command, however, is solely dedicated to branch management operations (such as switching branches or creating new ones).</p><pre># Switch to another branch<br>git switch target_branch<br>git switch feature/osokuoglu/TASK-9867<br><br># Create and switch to a new branch<br>git switch -c new-branch-name</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfde00df5990" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>