<?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 Furkan Torçuk on Medium]]></title>
        <description><![CDATA[Stories by Furkan Torçuk on Medium]]></description>
        <link>https://medium.com/@furkantorcuk1?source=rss-9ee9864236dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4RvDbKKwX_wBN61c</url>
            <title>Stories by Furkan Torçuk on Medium</title>
            <link>https://medium.com/@furkantorcuk1?source=rss-9ee9864236dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:57:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@furkantorcuk1/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[ Build Your Own Command-Line Movie Tracker App with Python and SQLite]]></title>
            <link>https://medium.com/@furkantorcuk1/build-your-own-command-line-movie-tracker-app-with-python-and-sqlite-a7cedb0ef217?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7cedb0ef217</guid>
            <category><![CDATA[movıe]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Fri, 23 May 2025 20:57:21 GMT</pubDate>
            <atom:updated>2025-05-23T20:57:21.747Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you a movie lover who wishes they had a personal archive of everything they’ve watched? What if you could take it one step further — and build your own movie tracking app from scratch?</p><p>In this tutorial, we’ll create a <strong>simple command-line application</strong> in Python that stores your favorite films in an SQLite database. Along the way, you’ll gain hands-on experience with database operations like adding, listing, updating, and deleting records.</p><h3>🎯 What We’ll Build</h3><ul><li>✅ Add a new film</li><li>✅ View all films</li><li>✅ Update film details</li><li>✅ Delete a film</li><li>✅ Data stored in a local films.db file using SQLite</li></ul><p>Ready? Let’s dive in!</p><h3>🏗️ Step 1: Set Up the Database</h3><pre>import sqlite3<br><br>conn = sqlite3.connect(&#39;films.db&#39;)<br>cursor = conn.cursor()<br><br>cursor.execute(&#39;&#39;&#39;<br>CREATE TABLE IF NOT EXISTS films (<br>    id INTEGER PRIMARY KEY AUTOINCREMENT,<br>    name TEXT NOT NULL,<br>    genre TEXT,<br>    release_year INTEGER<br>)<br>&#39;&#39;&#39;)<br>conn.commit()</pre><p>We create a table named films with columns for ID, name, genre, and release year.</p><h3>➕ Step 2: Add a New Film</h3><pre>def add_film(name, genre, release_year):<br>    cursor.execute(&#39;INSERT INTO films (name, genre, release_year) VALUES (?, ?, ?)&#39;, (name, genre, release_year))<br>    conn.commit()<br>    print(f&#39;&quot;{name}&quot; has been added successfully.&#39;)</pre><p>This function inserts a new film into the database.</p><h3>📋 Step 3: List All Films</h3><pre>def list_films():<br>    cursor.execute(&#39;SELECT * FROM films&#39;)<br>    films = cursor.fetchall()<br>    if not films:<br>        print(&quot;No films found.&quot;)<br>    for film in films:<br>        print(f&#39;ID: {film[0]}, Name: {film[1]}, Genre: {film[2]}, Year: {film[3]}&#39;)</pre><p>Retrieve and display all films stored in the database.</p><h3>✏️ Step 4: Update Film Details</h3><pre>def update_film(film_id, name=None, genre=None, release_year=None):<br>    if name:<br>        cursor.execute(&#39;UPDATE films SET name = ? WHERE id = ?&#39;, (name, film_id))<br>    if genre:<br>        cursor.execute(&#39;UPDATE films SET genre = ? WHERE id = ?&#39;, (genre, film_id))<br>    if release_year:<br>        cursor.execute(&#39;UPDATE films SET release_year = ? WHERE id = ?&#39;, (release_year, film_id))<br>    conn.commit()<br>    print(f&#39;Film with ID {film_id} has been updated.&#39;)</pre><p>This allows partial updates to any field of a selected film record.</p><h3>🗑️ Step 5: Delete a Film</h3><pre>def delete_film(film_id):<br>    cursor.execute(&#39;DELETE FROM films WHERE id = ?&#39;, (film_id,))<br>    conn.commit()<br>    print(f&#39;Film with ID {film_id} has been deleted.&#39;)</pre><p>Remove a film entry using its ID.</p><h3>🖥️ Step 6: Command-Line Interface</h3><pre>def main():<br>    while True:<br>        print(&quot;\n1. Add Film&quot;)<br>        print(&quot;2. List Films&quot;)<br>        print(&quot;3. Update Film&quot;)<br>        print(&quot;4. Delete Film&quot;)<br>        print(&quot;5. Exit&quot;)<br>        choice = input(&quot;Choose an option: &quot;)<br>        <br>        if choice == &#39;1&#39;:<br>            name = input(&quot;Film name: &quot;)<br>            genre = input(&quot;Genre: &quot;)<br>            year = int(input(&quot;Release year: &quot;))<br>            add_film(name, genre, year)<br>        elif choice == &#39;2&#39;:<br>            list_films()<br>        elif choice == &#39;3&#39;:<br>            film_id = int(input(&quot;Film ID to update: &quot;))<br>            name = input(&quot;New name (leave blank to skip): &quot;)<br>            genre = input(&quot;New genre (leave blank to skip): &quot;)<br>            year_input = input(&quot;New release year (leave blank to skip): &quot;)<br>            year = int(year_input) if year_input else None<br>            update_film(film_id, name or None, genre or None, year)<br>        elif choice == &#39;4&#39;:<br>            film_id = int(input(&quot;Film ID to delete: &quot;))<br>            delete_film(film_id)<br>        elif choice == &#39;5&#39;:<br>            print(&quot;Exiting application...&quot;)<br>            break<br>        else:<br>            print(&quot;Invalid choice. Please try again.&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h3>✅ Final Thoughts</h3><p>With just a few lines of Python and SQLite, you’ve built a working, personal movie tracker app. Along the way, you’ve learned:</p><ul><li>How to set up and connect to an SQLite database</li><li>CRUD operations: Create, Read, Update, and Delete</li><li>Building a user-friendly command-line interface</li></ul><p>This project is a great stepping stone into database-driven applications. Want to take it further? Try converting this into a web app using Flask or Django, or create a desktop version with Tkinter or PyQt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7cedb0ef217" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing and Querying a University Database in SQLite: A Case Study on Turkish Higher Education]]></title>
            <link>https://medium.com/@furkantorcuk1/designing-and-querying-a-university-database-in-sqlite-a-case-study-on-turkish-higher-education-f73aeb907499?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f73aeb907499</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[university]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Fri, 16 May 2025 18:47:21 GMT</pubDate>
            <atom:updated>2025-05-16T18:47:21.830Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>In this post, we will design a relational database using SQLite based on real-world data from Turkish universities and perform meaningful SQL queries to extract insights.</em></blockquote><h3>1. Objective and Scope</h3><p>Our goal is to build a database that models universities, faculties, and departments in Turkey. Using this structure, we aim to perform various analytical queries such as:</p><ul><li>Finding universities with the highest number of departments,</li><li>Listing universities that only offer engineering programs,</li><li>Exploring how many unique undergraduate departments exist at private universities,</li><li>Analyzing the distribution of department types.</li></ul><h3>2. Tools and Technologies</h3><ul><li><strong>SQLite3</strong> — A lightweight and easy-to-use database engine.</li><li><strong>(Optional) Python</strong> — For automated data loading and further analysis.</li><li><strong>Data Source</strong> — Public data from YÖK Atlas and university websites.</li></ul><h3>3. Database Design</h3><p>We’ll define three main tables:</p><p><strong>universities</strong></p><ul><li>id: INTEGER, Primary Key</li><li>name: TEXT, Not Null</li><li>type: TEXT — must be either &#39;Public&#39; or &#39;Private&#39;</li><li>city: TEXT</li></ul><p><strong>faculties</strong></p><ul><li>id: INTEGER, Primary Key</li><li>university_id: INTEGER, Foreign Key → universities(id)</li><li>name: TEXT</li></ul><p><strong>departments</strong></p><ul><li>id: INTEGER, Primary Key</li><li>faculty_id: INTEGER, Foreign Key → faculties(id)</li><li>name: TEXT</li><li>language: TEXT (e.g., &#39;Turkish&#39;, &#39;English&#39;)</li></ul><p>This structure allows us to model the hierarchy:<br> <strong>University → Faculty → Department</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzpSSznRtfeuf5gekcMabA.png" /></figure><h3>4. Implementation in SQLite</h3><h4>a) Creating the Tables</h4><pre>CREATE TABLE universities (<br>    id INTEGER PRIMARY KEY,<br>    name TEXT NOT NULL,<br>    type TEXT CHECK(type IN (&#39;Public&#39;, &#39;Private&#39;)),<br>    city TEXT<br>);<br><br>CREATE TABLE faculties (<br>    id INTEGER PRIMARY KEY,<br>    university_id INTEGER,<br>    name TEXT,<br>    FOREIGN KEY(university_id) REFERENCES universities(id)<br>);<br><br>CREATE TABLE departments (<br>    id INTEGER PRIMARY KEY,<br>    faculty_id INTEGER,<br>    name TEXT,<br>    language TEXT,<br>    FOREIGN KEY(faculty_id) REFERENCES faculties(id)<br>);</pre><h4>b) Sample Data Insertion</h4><pre>INSERT INTO universities (id, name, type, city) VALUES<br>(1, &#39;Bogazici University&#39;, &#39;Public&#39;, &#39;Istanbul&#39;),<br>(2, &#39;Sabanci University&#39;, &#39;Private&#39;, &#39;Istanbul&#39;);<br><br>INSERT INTO faculties (id, university_id, name) VALUES<br>(1, 1, &#39;Faculty of Engineering&#39;),<br>(2, 1, &#39;Faculty of Arts and Sciences&#39;),<br>(3, 2, &#39;Faculty of Engineering and Natural Sciences&#39;);<br><br>INSERT INTO departments (id, faculty_id, name, language) VALUES<br>(1, 1, &#39;Computer Engineering&#39;, &#39;English&#39;),<br>(2, 2, &#39;Physics&#39;, &#39;Turkish&#39;),<br>(3, 3, &#39;Industrial Engineering&#39;, &#39;English&#39;);</pre><h3>5. Querying the Data</h3><h4>a) List all universities located in Istanbul</h4><pre>SELECT name FROM universities WHERE city = &#39;Istanbul&#39;;</pre><h4>b) University with the most departments</h4><pre>SELECT u.name, COUNT(d.id) AS department_count<br>FROM universities u<br>JOIN faculties f ON u.id = f.university_id<br>JOIN departments d ON f.id = d.faculty_id<br>GROUP BY u.name<br>ORDER BY department_count DESC<br>LIMIT 1;</pre><h4>c) All departments under faculties that include “Engineering” in their name</h4><pre>SELECT d.name, u.name AS university<br>FROM departments d<br>JOIN faculties f ON d.faculty_id = f.id<br>JOIN universities u ON f.university_id = u.id<br>WHERE f.name LIKE &#39;%Engineering%&#39;;</pre><h3>6. Future Improvements</h3><p>This project can be extended in many ways:</p><ul><li>Add student quotas, entrance exam score types, or tuition fees.</li><li>Use Python for data visualization (matplotlib, seaborn).</li><li>Integrate YÖK API or scrape university websites for dynamic updates.</li></ul><h3>7. Conclusion</h3><p>In this project, we demonstrated how to design and query a structured SQLite database representing the Turkish higher education system. With only three tables, we were able to run insightful queries that reflect real-world scenarios in education policy, university management, or student decision-making.</p><p>This same structure can be adapted to other countries or institutions and expanded for broader educational analytics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f73aeb907499" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ A Comparative Guide to Search Algorithms with Python Examples]]></title>
            <link>https://medium.com/@furkantorcuk1/a-comparative-guide-to-search-algorithms-with-python-examples-2e9ceb3197a7?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e9ceb3197a7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Mon, 12 May 2025 20:56:27 GMT</pubDate>
            <atom:updated>2025-05-12T20:56:27.616Z</atom:updated>
            <content:encoded><![CDATA[<p>Search algorithms are everywhere — from data structures to artificial intelligence. In this article, we’ll explore the most popular search algorithms, compare them with Python code examples, and analyze their outputs to understand where and why each one shines. 💻🚀</p><h3>📌 Algorithms We’ll Explore</h3><ul><li>Linear Search</li><li>Binary Search</li><li>Depth-First Search (DFS)</li><li>Breadth-First Search (BFS)</li><li>A* Search Algorithm</li></ul><h3>1️⃣ Linear Search</h3><p>Linear search checks each element in a list one by one until it finds the target. It’s one of the simplest but least efficient methods.</p><h4>📦 Code:</h4><pre>def linear_search(arr, target):<br>    for i in range(len(arr)):<br>        if arr[i] == target:<br>            return i<br>    return -1<br><br>arr = [5, 3, 7, 1, 9, 4]<br>target = 9<br>result = linear_search(arr, target)<br>print(&quot;Result:&quot;, result)</pre><p>🖨️ Output:</p><pre>Result: 4</pre><p>✅ <strong>Pros:</strong></p><ul><li>Easy to implement<br> ❌ <strong>Cons:</strong></li><li>Inefficient for large datasets</li></ul><h3>2️⃣ Binary Search</h3><p>Binary search works on sorted lists. It checks the middle element and narrows the search area by half each time.</p><h4>📦 Code:</h4><pre>def binary_search(arr, target):<br>    low, high = 0, len(arr) - 1<br>    while low &lt;= high:<br>        mid = (low + high) // 2<br>        if arr[mid] == target:<br>            return mid<br>        elif arr[mid] &lt; target:<br>            low = mid + 1<br>        else:<br>            high = mid - 1<br>    return -1<br><br>arr = [1, 3, 4, 5, 7, 9]<br>target = 7<br>result = binary_search(arr, target)<br>print(&quot;Result:&quot;, result)</pre><p>🖨️ Output:</p><pre>Result: 4</pre><p>✅ <strong>Pros:</strong></p><ul><li>Fast, with O(log n) time complexity<br> ❌ <strong>Cons:</strong></li><li>Only works on sorted lists</li></ul><h3>3️⃣ Depth-First Search (DFS)</h3><p>DFS explores as far as possible along each branch before backtracking — ideal for tree or graph traversal.</p><h4>📦 Code:</h4><pre>def dfs(graph, start, visited=None):<br>    if visited is None:<br>        visited = set()<br>    visited.add(start)<br>    print(start, end=&#39; &#39;)<br>    for neighbor in graph[start]:<br>        if neighbor not in visited:<br>            dfs(graph, neighbor, visited)<br><br>graph = {<br>    &#39;A&#39;: [&#39;B&#39;, &#39;C&#39;],<br>    &#39;B&#39;: [&#39;D&#39;, &#39;E&#39;],<br>    &#39;C&#39;: [&#39;F&#39;],<br>    &#39;D&#39;: [],<br>    &#39;E&#39;: [&#39;F&#39;],<br>    &#39;F&#39;: []<br>}<br><br>dfs(graph, &#39;A&#39;)</pre><p>🖨️ Output:</p><pre>A B D E F C</pre><p>✅ <strong>Pros:</strong></p><ul><li>Memory-efficient in many cases</li><li>Good for deep solutions<br> ❌ <strong>Cons:</strong></li><li>Risk of infinite loops in cyclic graphs</li></ul><h3>4️⃣ Breadth-First Search (BFS)</h3><p>BFS starts from the root and explores all neighbors level by level. It’s often used to find the shortest path.</p><h4>📦 Code:</h4><pre>from collections import deque<br><br>def bfs(graph, start):<br>    visited = set()<br>    queue = deque([start])<br>    <br>    while queue:<br>        vertex = queue.popleft()<br>        if vertex not in visited:<br>            print(vertex, end=&#39; &#39;)<br>            visited.add(vertex)<br>            queue.extend([node for node in graph[vertex] if node not in visited])<br><br>graph = {<br>    &#39;A&#39;: [&#39;B&#39;, &#39;C&#39;],<br>    &#39;B&#39;: [&#39;D&#39;, &#39;E&#39;],<br>    &#39;C&#39;: [&#39;F&#39;],<br>    &#39;D&#39;: [],<br>    &#39;E&#39;: [&#39;F&#39;],<br>    &#39;F&#39;: []<br>}<br><br>bfs(graph, &#39;A&#39;)</pre><p>🖨️ Output:</p><pre>A B C D E F</pre><p>✅ <strong>Pros:</strong></p><ul><li>Finds the shortest path (if all edge costs are equal)</li><li>Safe for cyclic graphs<br> ❌ <strong>Cons:</strong></li><li>High memory usage for large graphs</li></ul><h3>5️⃣ A* Search Algorithm</h3><p>A* is one of the most powerful and intelligent search algorithms. It uses heuristics to efficiently guide the search toward the goal.</p><h4>📦 Code:</h4><pre>from queue import PriorityQueue<br><br>def a_star_search(graph, start, goal, h):<br>    open_set = PriorityQueue()<br>    open_set.put((0, start))<br>    came_from = {}<br>    g_score = {node: float(&#39;inf&#39;) for node in graph}<br>    g_score[start] = 0<br><br>    while not open_set.empty():<br>        _, current = open_set.get()<br><br>        if current == goal:<br>            path = []<br>            while current in came_from:<br>                path.append(current)<br>                current = came_from[current]<br>            path.append(start)<br>            return path[::-1]<br><br>        for neighbor, cost in graph[current]:<br>            tentative_g = g_score[current] + cost<br>            if tentative_g &lt; g_score[neighbor]:<br>                came_from[neighbor] = current<br>                g_score[neighbor] = tentative_g<br>                f_score = tentative_g + h[neighbor]<br>                open_set.put((f_score, neighbor))<br><br>    return None<br><br>graph = {<br>    &#39;A&#39;: [(&#39;B&#39;, 1), (&#39;C&#39;, 4)],<br>    &#39;B&#39;: [(&#39;D&#39;, 2), (&#39;E&#39;, 5)],<br>    &#39;C&#39;: [(&#39;F&#39;, 3)],<br>    &#39;D&#39;: [],<br>    &#39;E&#39;: [(&#39;F&#39;, 1)],<br>    &#39;F&#39;: []<br>}<br><br>heuristic = {<br>    &#39;A&#39;: 7,<br>    &#39;B&#39;: 6,<br>    &#39;C&#39;: 2,<br>    &#39;D&#39;: 1,<br>    &#39;E&#39;: 1,<br>    &#39;F&#39;: 0<br>}<br><br>result = a_star_search(graph, &#39;A&#39;, &#39;F&#39;, heuristic)<br>print(&quot;Best path:&quot;, result)</pre><p>🖨️ Output:</p><pre>Best path: [&#39;A&#39;, &#39;B&#39;, &#39;E&#39;, &#39;F&#39;]</pre><p>✅ <strong>Pros:</strong></p><ul><li>Efficient and finds optimal paths</li><li>Fast with a good heuristic<br> ❌ <strong>Cons:</strong></li><li>Requires well-defined heuristics</li><li>Can be memory-intensive</li></ul><h3>🧠 Final Thoughts</h3><p>Each algorithm has its own strengths depending on the context. For small datasets, linear search may suffice. For complex AI-driven systems like games or pathfinding in maps, A* is often the best choice. Choosing the right algorithm starts with understanding the nature of your problem. 🎯</p><p>I hope this article helped clarify the logic and differences behind popular search algorithms!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e9ceb3197a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Space Station Code-9: Data Logs]]></title>
            <link>https://medium.com/@furkantorcuk1/space-station-code-9-data-logs-b485665b0158?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b485665b0158</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[storyline]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Fri, 09 May 2025 19:48:34 GMT</pubDate>
            <atom:updated>2025-05-09T19:48:34.714Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p><strong>Year 3025.</strong> The galaxy is overflowing with data. Planets are governed by information. But this data is messy, scattered, and often incomprehensible. Amid the chaos, one officer rises to the challenge: <strong>Lieutenant Kodir</strong>, the data analyst of Space Station Code-9.<br> His mission? To analyze the incoming data streams and report insights to the Galactic Command.</p><p><strong>His weapon</strong>: SQL<br> <strong>His companion</strong>: Python<br> <strong>His quest</strong>: To make sense of the data.</p><h4>🌌 Mission 1: Entering the Data Universe with SELECT</h4><p>Kodir begins his first mission. Before diving into any analysis, he must first explore the raw data. Here’s a roster of pilots who have registered for interstellar missions.</p><pre>import sqlite3<br>import pandas as pd<br><br># Create the data vault<br>conn = sqlite3.connect(&quot;:memory:&quot;)<br>cursor = conn.cursor()<br><br># Create the users table<br>cursor.execute(&quot;&quot;&quot;<br>CREATE TABLE users (<br>    id INTEGER PRIMARY KEY,<br>    name TEXT,<br>    age INTEGER,<br>    city TEXT<br>)<br>&quot;&quot;&quot;)<br><br># Insert pilot data<br>users = [<br>    (1, &quot;Ali&quot;, 28, &quot;Istanbul&quot;),<br>    (2, &quot;Ayşe&quot;, 34, &quot;Ankara&quot;),<br>    (3, &quot;Mehmet&quot;, 22, &quot;Izmir&quot;),<br>    (4, &quot;Zeynep&quot;, 41, &quot;Bursa&quot;)<br>]<br>cursor.executemany(&quot;INSERT INTO users VALUES (?, ?, ?, ?)&quot;, users)<br><br># Use SELECT to retrieve all data<br>df = pd.read_sql_query(&quot;SELECT * FROM users&quot;, conn)<br>print(df)</pre><p>🛰️ <strong>Mission Accomplished</strong>: All pilots retrieved.</p><pre>   id    name  age     city<br>0   1     Ali   28  Istanbul<br>1   2    Ayşe   34    Ankara<br>2   3  Mehmet   22     Izmir<br>3   4  Zeynep   41     Bursa</pre><h4>🧭 Mission 2: Target Identification with WHERE</h4><p>Not all pilots are ready for space. We need only the experienced ones — those over 30.</p><pre>df_filtered = pd.read_sql_query(&quot;SELECT * FROM users WHERE age &gt; 30&quot;, conn)<br>print(df_filtered)</pre><p>🚨 <strong>Target Acquired</strong>: Experienced pilots filtered.</p><pre>   id   name  age    city<br>0   2   Ayşe   34  Ankara<br>1   4  Zeynep   41   Bursa</pre><h4>🛰️ Mission 3: Tactical Ranking with ORDER BY</h4><p>Lieutenant Kodir must determine the chain of command. Pilots will be ranked by age, the oldest first.</p><pre>df_ordered = pd.read_sql_query(&quot;SELECT * FROM users ORDER BY age DESC&quot;, conn)<br>print(df_ordered)</pre><p>📊 <strong>Command structure established:</strong></p><pre>   id   name  age     city<br>0   4  Zeynep   41    Bursa<br>1   2    Ayşe   34   Ankara<br>2   1     Ali   28  Istanbul<br>3   3  Mehmet   22     Izmir</pre><h4>🧠 Mission 4: Gaining Insight with AVG</h4><p>Galactic HQ requires an age analysis for better mission planning. Time for an average age calculation.</p><pre>df_avg = pd.read_sql_query(&quot;SELECT AVG(age) as avg_age FROM users&quot;, conn)<br>print(df_avg)</pre><p>🧪 <strong>Strategic insight acquired:</strong></p><pre>   avg_age<br>0     31.25</pre><h3>🏆 Mission Report: Kodir’s Victory</h3><p>Lieutenant Kodir has completed his data mission successfully. He extracted the pilot list, filtered experienced ones, determined the chain of command, and calculated strategic insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZ25VqT0eSVHgsxwhD63hw.png" /></figure><p>He’s one step closer to earning the title of <strong>Galactic Data Officer</strong>!</p><blockquote><strong><em>“Dat is the light that guides us through the darkness of space. But only those who understand it can truly see it.”</em></strong><em><br> — Manifesto of Code-9 Space Station</em></blockquote><p>Learning SQL isn’t just about writing queries — it’s about telling a story. And Python is the best co-pilot you can have. Each query brings you closer to the stars. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b485665b0158" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[☎️ Searching in a Phonebook: Which Algorithm is Faster?]]></title>
            <link>https://medium.com/@furkantorcuk1/%EF%B8%8F-searching-in-a-phonebook-which-algorithm-is-faster-2a64a96a3329?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a64a96a3329</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[linear]]></category>
            <category><![CDATA[linear-search]]></category>
            <category><![CDATA[binary-search]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Mon, 05 May 2025 20:59:07 GMT</pubDate>
            <atom:updated>2025-05-05T20:59:07.143Z</atom:updated>
            <content:encoded><![CDATA[<p>In our digital lives, we are constantly searching for something — contacts, files, messages. One common scenario: searching for a person in your phonebook. But have you ever thought about <em>how</em> this search happens under the hood?</p><p>In this post, we’ll demonstrate how to search for a contact in a phonebook using:</p><ul><li>🔍 <strong>Linear Search</strong></li><li>⚡ <strong>Binary Search</strong></li></ul><p>We’ll also compare their performance by counting how many comparisons each method makes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjs23d_P3o3S3msCbQsfWA.jpeg" /></figure><h3>📋 Sample Phonebook Data</h3><p>First, let’s define a simple phonebook. It consists of tuples in the form of (name, phone_number).</p><pre>phonebook = [<br>    (&quot;Ayşe&quot;, &quot;05551234567&quot;),<br>    (&quot;Mehmet&quot;, &quot;05331239876&quot;),<br>    (&quot;Zeynep&quot;, &quot;05441234567&quot;),<br>    (&quot;Ali&quot;, &quot;05321234567&quot;),<br>    (&quot;Elif&quot;, &quot;05531231231&quot;),<br>    (&quot;Berk&quot;, &quot;05071234567&quot;),<br>    (&quot;Can&quot;, &quot;05451234567&quot;),<br>    (&quot;Deniz&quot;, &quot;05511234567&quot;),<br>    (&quot;Emre&quot;, &quot;05361234567&quot;),<br>    (&quot;Fatma&quot;, &quot;05621234567&quot;)<br>]</pre><h3>📥 Input from the User</h3><p>The user is asked to enter a phone number to search:</p><pre>target_number = input(&quot;📞 Enter the phone number you&#39;re looking for: &quot;)</pre><h3>🔎 Linear Search</h3><p>This method checks each element one by one. It works well for small datasets but can be slow for larger ones. Time complexity: <strong>O(n)</strong>.</p><pre>def linear_search(phonebook, number):<br>    counter = 0<br>    found = False<br>    for i, (name, phone) in enumerate(phonebook):<br>        counter += 1<br>        if phone == number:<br>            print(f&quot;✅ Linear: {name}, {phone} (Position: {i+1})&quot;)<br>            found = True<br>            break<br>    if not found:<br>        print(&quot;❌ Linear: Number not found.&quot;)<br>    return counter</pre><h3>⚡ Binary Search</h3><p>This method is much faster, but the list must be <strong>sorted</strong> first. It repeatedly splits the list in half. Time complexity: <strong>O(log n)</strong>.</p><pre>def binary_search(phonebook, number):<br>    sorted_list = sorted(phonebook, key=lambda x: x[1])<br>    counter = 0<br>    left = 0<br>    right = len(sorted_list) - 1<br>    found = False<br><br>    while left &lt;= right:<br>        counter += 1<br>        mid = (left + right) // 2<br>        mid_number = sorted_list[mid][1]<br><br>        if mid_number == number:<br>            print(f&quot;✅ Binary: {sorted_list[mid][0]}, {mid_number} (Position in sorted list: {mid+1})&quot;)<br>            found = True<br>            break<br>        elif number &lt; mid_number:<br>            right = mid - 1<br>        else:<br>            left = mid + 1<br><br>    if not found:<br>        print(&quot;❌ Binary: Number not found.&quot;)<br>    return counter</pre><h3>🧪 Performing the Search and Comparing Results</h3><p>Now we’ll run both searches and count how many comparisons each one makes.</p><pre>print(&quot;\n--- 🔍 Linear Search ---&quot;)<br>l_count = linear_search(phonebook, target_number)<br><br>print(&quot;\n--- ⚡ Binary Search ---&quot;)<br>b_count = binary_search(phonebook, target_number)<br><br>print(&quot;\n📊 Comparison:&quot;)<br>print(f&quot;🔹 Linear Search: {l_count} comparisons&quot;)<br>print(f&quot;🔹 Binary Search: {b_count} comparisons&quot;)</pre><h3>🎬 Example Output</h3><p>If the user enters 05441234567, here&#39;s a sample output:</p><pre>--- 🔍 Linear Search ---<br>✅ Linear: Zeynep, 05441234567 (Position: 3)<br><br>--- ⚡ Binary Search ---<br>✅ Binary: Zeynep, 05441234567 (Position in sorted list: 8)<br><br>📊 Comparison:<br>🔹 Linear Search: 3 comparisons<br>🔹 Binary Search: 4 comparisons</pre><h3>🎓 Summary</h3><ul><li><strong>Linear Search</strong> is simple and doesn’t require sorting.</li><li><strong>Binary Search</strong> is much faster but only works on <strong>sorted data</strong>.</li><li>In real-world systems (e.g. phonebooks, databases, search engines), <strong>binary search or its variations</strong> are often used due to performance needs.</li></ul><h3>💡 Further Ideas</h3><ul><li>Allow searching by <strong>name</strong> instead of number.</li><li>Offer a menu to choose search type or search field.</li><li>Create a <strong>graphical interface</strong> for the search.</li><li>Visualize comparison counts using a chart.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*AZf6fHrLT97-v3boXi8ypQ.jpeg" /></figure><h3>🧾 Conclusion</h3><p>In this post, we explored two fundamental search algorithms — <strong>Linear Search</strong> and <strong>Binary Search</strong> — by applying them to a realistic scenario: finding a phone number in a contact list.</p><h3>✅ Key Takeaways:</h3><ul><li><strong>Linear Search</strong> is easy to implement but becomes inefficient as the list grows. It checks every entry one by one.</li><li><strong>Binary Search</strong> is significantly faster on large datasets, but it <strong>requires the list to be sorted</strong>.</li><li>In our example, both methods found the target, but Binary Search did it with fewer comparisons — proving its efficiency.</li></ul><blockquote><em>In real-world applications such as phonebooks, search engines, or navigation apps, using optimized search algorithms is crucial for speed and user experience.</em></blockquote><p>By understanding the strengths and limitations of each method, developers can make better decisions when working with different data structures and problem types.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a64a96a3329" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Northwind Database Analysis with 10 SQL Queries: An Introduction to Business Intelligence]]></title>
            <link>https://medium.com/@furkantorcuk1/northwind-database-analysis-with-10-sql-queries-an-introduction-to-business-intelligence-238a1201f0d8?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/238a1201f0d8</guid>
            <category><![CDATA[sql-database]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[northwind]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Fri, 02 May 2025 17:49:01 GMT</pubDate>
            <atom:updated>2025-05-02T17:49:01.715Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The Northwind database is a simulated commercial database designed for SQL learners. In this article, we’ll enhance our data analysis skills by solving 10 SQL queries tailored to real-world business scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*wiiBUMuPgVU424UdkCrdMA.jpeg" /></figure><h3>1. Annual Net Profit Calculation</h3><pre>SELECT <br>    YEAR(OrderDate) AS Year,<br>    ROUND(SUM((UnitPrice * Quantity) - (UnitPrice * Quantity * Discount)), 2) AS NetProfit<br>FROM Orders O<br>JOIN [Order Details] OD ON O.OrderID = OD.OrderID<br>GROUP BY YEAR(OrderDate)<br>ORDER BY Year;</pre><p><strong>Insight:</strong> We observe the highest profit in 1997 between 1996–1998. This data can be used to calculate annual growth rates.</p><h3>2. Category-Based Sales Distribution</h3><pre>SELECT <br>    C.CategoryName,<br>    SUM(OD.Quantity) AS TotalUnitsSold<br>FROM Categories C<br>JOIN Products P ON C.CategoryID = P.CategoryID<br>JOIN [Order Details] OD ON P.ProductID = OD.ProductID<br>GROUP BY C.CategoryName<br>ORDER BY TotalUnitsSold DESC;</pre><p><strong>Result:</strong> The Beverages category leads with 7,131 units sold, followed by Confections in second place.</p><h3>3. Customer Loyalty Analysis</h3><pre>SELECT<br>    CustomerID,<br>    COUNT(DISTINCT OrderID) AS OrderCount,<br>    DATEDIFF(DAY, MIN(OrderDate), MAX(OrderDate)) AS CustomerLifetime<br>FROM Orders<br>GROUP BY CustomerID<br>HAVING COUNT(OrderID) &gt; 5<br>ORDER BY OrderCount DESC;</pre><p><strong>Key Takeaway:</strong> Five customers have placed over 20 orders. Targeted loyalty programs could be designed for these high-value customers.</p><h3>4. Shipping Performance Analysis</h3><pre>SELECT <br>    ShipCountry,<br>    AVG(DATEDIFF(DAY, OrderDate, ShippedDate)) AS AvgDeliveryTime,<br>    COUNT(*) AS TotalOrders<br>FROM Orders<br>GROUP BY ShipCountry<br>HAVING COUNT(*) &gt; 10<br>ORDER BY AvgDeliveryTime ASC;</pre><p><strong>Finding:</strong> Switzerland shows the fastest average delivery time (10.3 days), while Brazil has the slowest (20.1 days).</p><h3>5. Employee Sales Trends</h3><pre>SELECT <br>    E.FirstName + &#39; &#39; + E.LastName AS Employee,<br>    DATEPART(QUARTER, O.OrderDate) AS Quarter,<br>    SUM(OD.UnitPrice * OD.Quantity) AS Revenue<br>FROM Employees E<br>JOIN Orders O ON E.EmployeeID = O.EmployeeID<br>JOIN [Order Details] OD ON O.OrderID = OD.OrderID<br>GROUP BY E.FirstName, E.LastName, DATEPART(QUARTER, O.OrderDate)<br>ORDER BY Employee, Quarter;</pre><p><strong>Performance:</strong> Q3 consistently emerges as the highest sales period across all employees.</p><h3>6. Stock Optimization</h3><pre>SELECT <br>    ProductName,<br>    UnitsInStock,<br>    ReorderLevel,<br>    CASE <br>        WHEN UnitsInStock &lt; ReorderLevel THEN &#39;Urgent Reorder&#39;<br>        WHEN UnitsInStock BETWEEN ReorderLevel AND ReorderLevel*1.5 THEN &#39;Monitor&#39;<br>        ELSE &#39;Safe&#39; <br>    END AS StockStatus<br>FROM Products;</pre><p><strong>Action Required:</strong> 15 products require urgent reordering. Inventory management policies need review.</p><h3>7. Geographic Customer Distribution</h3><pre>SELECT<br>    Country,<br>    COUNT(DISTINCT CustomerID) AS CustomerCount,<br>    SUM(OD.UnitPrice * OD.Quantity) AS TotalRevenue<br>FROM Customers C<br>JOIN Orders O ON C.CustomerID = O.CustomerID<br>JOIN [Order Details] OD ON O.OrderID = OD.OrderID<br>GROUP BY Country<br>ORDER BY TotalRevenue DESC;</pre><p><strong>Revenue Leaders:</strong> Germany contributes $63,570 in revenue, while Scandinavian countries show untapped growth potential.</p><h3>8. Product Lifecycle Analysis</h3><pre>SELECT <br>    P.ProductName,<br>    DATEDIFF(MONTH, MIN(O.OrderDate), MAX(O.OrderDate)) AS MarketLongevity<br>FROM Products P<br>JOIN [Order Details] OD ON P.ProductID = OD.ProductID<br>JOIN Orders O ON OD.OrderID = O.OrderID<br>GROUP BY P.ProductName<br>HAVING COUNT(OD.OrderID) &gt; 20<br>ORDER BY MarketLongevity DESC;</pre><p><strong>Notable Finding:</strong> ‘Chartreuse verte’ leads with 34 months of market longevity.</p><h3>9. Discount Impact Analysis</h3><pre>SELECT <br>    ProductID,<br>    AVG(Discount) AS AvgDiscount,<br>    SUM(Quantity) AS TotalSold,<br>    SUM(Quantity * Discount) AS DiscountCost<br>FROM [Order Details]<br>WHERE Discount &gt; 0<br>GROUP BY ProductID<br>ORDER BY DiscountCost DESC;</pre><p><strong>Strategic Insight:</strong> Product #60 with 25% discount incurred $3,450 in discount costs. Discount strategies require reevaluation.</p><h3>10. Supplier Performance Comparison</h3><pre>SELECT <br>    S.CompanyName,<br>    COUNT(DISTINCT O.OrderID) AS OrderCount,<br>    AVG(DATEDIFF(DAY, O.OrderDate, O.ShippedDate)) AS AvgProcessingTime<br>FROM Suppliers S<br>JOIN Products P ON S.SupplierID = P.SupplierID<br>JOIN [Order Details] OD ON P.ProductID = OD.ProductID<br>JOIN Orders O ON OD.OrderID = O.OrderID<br>GROUP BY S.CompanyName<br>HAVING COUNT(DISTINCT O.OrderID) &gt; 15<br>ORDER BY AvgProcessingTime ASC;</pre><p><strong>Top Performer:</strong> ‘Tokyo Traders’ leads with 4.2-day average processing time.</p><h3>Conclusion</h3><p>These analyses demonstrate SQL’s power in business intelligence applications. Each query provides critical insights for decision-making, from sales strategies to supply chain optimization. Adapt these examples to your own databases to enable data-driven process improvements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=238a1201f0d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Computer Repair Service: Analyzing Processing Time]]></title>
            <link>https://medium.com/@furkantorcuk1/%EF%B8%8F-computer-repair-service-analyzing-processing-time-29efe8304a82?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/29efe8304a82</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[algorithms-and-data]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Mon, 28 Apr 2025 18:33:26 GMT</pubDate>
            <atom:updated>2025-04-28T18:33:26.554Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>A computer repair service follows a specific process for each repair task. In this process, each computer requires a fixed repair time, plus occasional extra checks after a batch of repairs.<br>Scenario:</p><ul><li><strong>n</strong>: Number of computers repaired.</li><li><strong>f(n)</strong>: Total repair time.</li><li>Each computer needs a <strong>fixed 30 minutes</strong> for standard repair operations (hardware inspection, software fixes, etc.) ⏱️.</li><li>After <strong>every 5 computers</strong>, an additional <strong>15-minute</strong> system-wide diagnostic is performed 🖥️.</li></ul><p>Thus, the total repair time can be modeled as:</p><blockquote><strong><em>f(n) = 30n + 15 × (n // 5)</em></strong></blockquote><p>Where:</p><ul><li><strong>30n</strong>: Time spent on individual computer repairs,</li><li><strong>15 × (n // 5)</strong>: Time spent on batch diagnostics (using integer division).</li></ul><h3>Θ Notation Meaning 📈</h3><p>This function belongs to the <strong>Θ(n)</strong> complexity class.<br> In other words, the total repair time <strong>grows linearly</strong> with the number of computers.<br> The periodic extra diagnostic checks add small overheads but do <strong>not change the overall growth rate</strong>.</p><h3>Example Calculations:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*04eo7rsp922B7iYsgrVr4A.png" /></figure><p>Example math:</p><ul><li><strong>n=5</strong> ➔ 30×5 + 15×(5//5) = 150 + 15 = 165 minutes.</li><li><strong>n=10</strong> ➔ 30×10 + 15×(10//5) = 300 + 30 = 330 minutes.</li></ul><pre>def repair_time(n):<br>    return 30 * n + 15 * (n // 5)<br><br>print(&quot;Number of Computers | Total Repair Time (Minutes)&quot;)<br>for n in range(1, 13):<br>    total_time = repair_time(n)<br>    print(f&quot;{n}                     | {total_time} minutes&quot;)</pre><h3>Real-World Insights 🌎</h3><ul><li><strong>Efficiency Planning</strong>: 🔧 The repair shop can estimate workloads easily. For example, repairing 20 computers would take approximately 660 minutes (11 hours).</li><li><strong>Workforce Management</strong>: 👨‍🔧 If repair volumes spike, they can plan for additional technicians to keep up with demand.</li></ul><p><strong>Optimization Opportunities</strong>: 🛠️ Maybe the diagnostic check could be optimized — for instance, performed after every 10 computers instead of 5 — reducing overall repair times.</p><pre>Number of Computers | Total Repair Time (Minutes)<br>1                     | 30 minutes<br>2                     | 60 minutes<br>3                     | 90 minutes<br>4                     | 120 minutes<br>5                     | 165 minutes<br>6                     | 195 minutes<br>7                     | 225 minutes<br>8                     | 255 minutes<br>9                     | 285 minutes<br>10                    | 330 minutes<br>11                    | 360 minutes<br>12                    | 390 minutes</pre><h3>Final Thoughts 🎯</h3><p>In this example, the repair time grows <strong>linearly</strong> with the number of computers repaired.<br> Minor fixed costs (like extra diagnostics) don’t impact the overall growth rate, so the process remains <strong>Θ(n)</strong> in complexity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29efe8304a82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Academic Perspective on Sorting Algorithms: Foundations, Comparisons, and Implementations]]></title>
            <link>https://medium.com/@furkantorcuk1/an-academic-perspective-on-sorting-algorithms-foundations-comparisons-and-implementations-0e597eefd3a0?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e597eefd3a0</guid>
            <category><![CDATA[quicksort]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[bubble-sort]]></category>
            <category><![CDATA[merge-sort]]></category>
            <category><![CDATA[insertion-sort]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 18:45:28 GMT</pubDate>
            <atom:updated>2025-04-21T18:45:28.022Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>When it comes to data structures and algorithms, <strong>sorting algorithms</strong> are undeniably one of the cornerstones of computer science. These algorithms, essential both in theory and in practice, organize datasets to enable faster searching, analysis, and decision-making processes. In this article, we’ll explore the most commonly used sorting algorithms from an academic perspective, discuss their complexity analyses, and provide Python implementations for each.</p><h3>The Primary Goal of Sorting Algorithms</h3><p>Sorting algorithms aim to arrange a sequence of elements in a specific order — usually ascending or descending. Working with sorted data enhances algorithmic efficiency. For instance, binary search can only be applied to sorted arrays.</p><h3>Comparison-Based Sorting Algorithms</h3><p>Sorting algorithms are generally classified into two categories:</p><ul><li><strong>Comparison-based algorithms</strong></li><li><strong>Non-comparison-based (distribution-based) algorithms</strong></li></ul><p>Below, we examine the most widely known comparison-based sorting algorithms.</p><h3>1. Bubble Sort</h3><p>Bubble Sort is one of the simplest sorting algorithms. The main idea is to repeatedly compare adjacent elements and swap them if they are in the wrong order.</p><p><strong>Time Complexity:</strong></p><ul><li>Worst case: O(n²)</li><li>Best case (already sorted): O(n)</li></ul><pre>def bubble_sort(arr):<br>    n = len(arr)<br>    for i in range(n):<br>        swapped = False<br>        for j in range(0, n - i - 1):<br>            if arr[j] &gt; arr[j + 1]:<br>                arr[j], arr[j + 1] = arr[j + 1], arr[j]<br>                swapped = True<br>        if not swapped:<br>            break<br>    return arr</pre><h3>2. Insertion Sort</h3><p>Insertion Sort divides the list into a sorted and an unsorted part. At each iteration, the next element from the unsorted part is inserted into its correct position in the sorted part.</p><p><strong>Time Complexity:</strong></p><ul><li>Worst case: O(n²)</li><li>Best case: O(n)</li></ul><pre>def insertion_sort(arr):<br>    for i in range(1, len(arr)):<br>        key = arr[i]<br>        j = i - 1<br>        while j &gt;= 0 and arr[j] &gt; key:<br>            arr[j + 1] = arr[j]<br>            j -= 1<br>        arr[j + 1] = key<br>    return arr</pre><h3>3. Merge Sort</h3><p>Merge Sort follows the <strong>divide and conquer</strong> paradigm. The array is divided into halves, each half is sorted recursively, and then the results are merged.</p><p><strong>Time Complexity:</strong></p><ul><li>All cases: O(n log n)</li></ul><pre>def merge_sort(arr):<br>    if len(arr) &lt;= 1:<br>        return arr<br><br>    mid = len(arr) // 2<br>    left = merge_sort(arr[:mid])<br>    right = merge_sort(arr[mid:])<br><br>    return merge(left, right)<br><br>def merge(left, right):<br>    result = []<br>    i = j = 0<br><br>    while i &lt; len(left) and j &lt; len(right):<br>        if left[i] &lt;= right[j]:<br>            result.append(left[i])<br>            i += 1<br>        else:<br>            result.append(right[j])<br>            j += 1<br>    result.extend(left[i:])<br>    result.extend(right[j:])<br>    return result</pre><h3>4. Quick Sort</h3><p>Quick Sort also uses the divide and conquer approach. It selects a pivot, partitions the array around it, and recursively sorts the partitions. It is among the fastest comparison-based algorithms on average.</p><p><strong>Time Complexity:</strong></p><ul><li>Average case: O(n log n)</li><li>Worst case: O(n²) <em>(due to poor pivot selection)</em></li></ul><pre>def quick_sort(arr):<br>    if len(arr) &lt;= 1:<br>        return arr<br>    pivot = arr[len(arr) // 2]<br>    left = [x for x in arr if x &lt; pivot]<br>    middle = [x for x in arr if x == pivot]<br>    right = [x for x in arr if x &gt; pivot]<br>    return quick_sort(left) + middle + quick_sort(right)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*DvreqADQyGU6EGG5Fsl4oQ.png" /></figure><h3>Conclusion</h3><p>Sorting algorithms are fundamental structures that every developer and computer scientist must thoroughly understand. Performance analysis is not only crucial for choosing the right algorithm but also for developing optimized solutions tailored to the nature of the data. In this article, we aimed to present a holistic view of sorting algorithms, combining theoretical foundations with practical examples.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e597eefd3a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Developer’sTechnical Leadership and Management Skills: The Path to Success in the Software World]]></title>
            <link>https://medium.com/@furkantorcuk1/a-developerstechnical-leadership-and-management-skills-the-path-to-success-in-the-software-world-f69222a17546?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69222a17546</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 17:55:16 GMT</pubDate>
            <atom:updated>2025-03-28T17:55:16.670Z</atom:updated>
            <content:encoded><![CDATA[<h3>introduction</h3><p>Technical leadership is a multifaceted role that goes beyond technical knowledge to include team management, communication, and strategic thinking. A good technical leader enhances both code quality and team efficiency, ensuring the successful completion of projects. In this article, we will explore the concept of technical leadership, the essential skills it requires, and the steps to becoming a successful technical leader. 🚀</p><h3>What is Technical Leadership? 🤔</h3><p>Technical leadership involves managing the technical aspects of a software development team, guiding team members, and supporting their growth. A technical leader does more than just write code — they steer technical decisions, define architectural frameworks, and foster collaboration within the team. A great technical leader ensures team cohesion while minimizing technical debt in complex projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZpSPlb7Z1jOY-qxWnBm_w.jpeg" /></figure><h3>Essential Skills for a Technical Leader 🎯</h3><h3>1. Technical Competence 💻</h3><p>A technical leader must have in-depth knowledge of software development processes, system architecture, security, and performance. They should serve as a guide for their team by following best practices and implementing modern development methodologies such as Agile, DevOps, and CI/CD to enhance efficiency.</p><h3>2. Communication Skills 🗣️</h3><p>An effective leader must be able to convey technical information to people at different levels. Clear and transparent communication is crucial for maintaining team cohesion and fostering collaboration. Technical leaders should hold regular meetings with their teams to track progress and ensure everyone is engaged in the process.</p><h3>3. Team Management and Mentorship 👥</h3><p>A technical leader must support the growth of their team, mentor junior developers, and cultivate a positive learning culture. Keeping team motivation high is essential for increasing productivity. Additionally, fostering psychological safety within the team ensures that everyone feels comfortable sharing their ideas.</p><h3>4. Problem-Solving and Decision-Making 🛠️</h3><p>Technical leaders must quickly and effectively address technical and operational challenges. Making the right decisions at critical moments directly impacts project success. A calm and composed leader earns the trust of their team and resolves issues efficiently.</p><h3>5. Strategic and Visionary Thinking 🔮</h3><p>A technical leader must not only keep up with current technologies but also anticipate future trends and develop a long-term roadmap for the team. Evaluating technological shifts and fostering innovation enables companies to maintain a competitive edge.</p><h3>Tips for Becoming a Successful Technical Leader 🏆</h3><p>✅ <strong>Embrace Continuous Learning:</strong> Stay up to date with new technologies and share knowledge with your team.<br>✅ <strong>Understand Your Team:</strong> Identify team members’ strengths and weaknesses to guide them effectively.<br>✅ <strong>Learn to Delegate:</strong> Avoid micromanagement and trust your team by distributing responsibilities.<br>✅ <strong>Foster a Feedback Culture:</strong> Provide constructive feedback to help your team grow.<br>✅ <strong>Balance Business and Technology:</strong> Manage both business goals and technical requirements effectively.<br>✅ <strong>Build Team Spirit:</strong> Encourage collaboration and create a people-centered leadership approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6yVDOl_501Ihov7fJiu5YQ.jpeg" /></figure><h3>Challenges Faced by Technical Leaders and Solutions ⚡</h3><p>🔹 <strong>Maintaining Team Motivation:</strong> Team members have different expectations and levels of motivation. Regular one-on-one meetings and recognizing achievements can help keep morale high.</p><p>🔹 <strong>Managing Technical Debt:</strong> Minimize technical debt by continuously reviewing code quality and adopting sustainable development principles.</p><p>🔹 <strong>Overcoming Communication Barriers:</strong> Act as a bridge between technical and non-technical teams to ensure everyone is aligned with the same goals.</p><h3>Conclusion 🎯</h3><p>Technical leadership requires not only technical expertise but also a strong vision for leadership. To succeed in the software world, technical leaders must develop skills in technology, communication, team management, and strategic thinking. By adopting a continuous learning and growth-oriented mindset, you can elevate both yourself and your team. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69222a17546" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AVL Tree: The Power of Balanced Search Trees]]></title>
            <link>https://medium.com/@furkantorcuk1/avl-tree-the-power-of-balanced-search-trees-13f9ac908adb?source=rss-9ee9864236dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/13f9ac908adb</guid>
            <category><![CDATA[binary-search]]></category>
            <category><![CDATA[avl-tree]]></category>
            <category><![CDATA[search]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Furkan Torçuk]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 18:40:57 GMT</pubDate>
            <atom:updated>2025-03-24T18:40:57.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Today, data structures and algorithms have become an integral part of software development processes. Especially for efficiently processing and managing large datasets, data structures play a crucial role in software engineering and computer science. In this context, AVL trees hold a critical place among balanced search trees.</p><h3>What is an AVL Tree?</h3><p>An AVL tree is a balanced binary search tree developed in 1962 by Adelson-Velsky and Landis, named after them. Its fundamental property is that the height difference between the left and right subtrees of any node is at most 1. This feature makes AVL trees more efficient compared to other binary search trees.</p><h3>Importance of AVL Trees</h3><p>AVL trees are used especially in applications that require fast data access. When imbalance occurs in binary search trees (BST), the time complexity of search, insertion, and deletion operations can increase to O(n). However, since AVL trees restore balance after each operation, they guarantee a worst-case time complexity of O(log n). This provides a significant advantage when working with large datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqIpgNR7sm1Sco3Ynpt5KQ.jpeg" /></figure><h3>Fundamental Operations of AVL Trees</h3><h3>1. Insertion</h3><p>When a new node is inserted into an AVL tree, some rotation operations are applied to maintain balance. There are four fundamental types of rotations:</p><ul><li><strong>Right Rotation (RR):</strong> Applied when the left subtree becomes too long. If the newly added node is on the left of the left subtree, a right rotation restores balance.</li><li><strong>Left Rotation (LL):</strong> Applied when the right subtree becomes too large. If the new node is on the right of the right subtree, a left rotation is performed.</li><li><strong>Double Rotation (Left-Right — LR and Right-Left — RL):</strong> To maintain balance, a minor rotation is performed first, followed by a main rotation. For LR rotation, a left rotation is followed by a right rotation, whereas for RL rotation, a right rotation is followed by a left rotation.</li></ul><p>These rotations keep the AVL tree’s height under control and maintain balance. If rotations are not applied during insertion, the tree may become unbalanced, increasing time complexity.</p><h3>2. Deletion</h3><p>When a node is deleted from an AVL tree, the tree’s balance must be maintained. The deletion process occurs in three main cases:</p><ul><li><strong>Leaf node deletion:</strong> If the node has no children, it is directly removed.</li><li><strong>Single-child node deletion:</strong> If the node has only one child, the child node is connected to the parent node to maintain balance.</li><li><strong>Two-child node deletion:</strong> In this case, the deleted node is replaced with the smallest node from the right subtree (or the largest node from the left subtree). Afterward, appropriate rotation operations are performed to restore AVL balance.</li></ul><p>After deletion, the tree’s height may change. If the height difference rule is violated, the necessary rotation operations are applied to restore balance.</p><h3>3. Search</h3><p>The search operation in AVL trees is based on the fundamental principles of binary search trees. The search process is carried out as follows:</p><ol><li>The target node is compared with the root node.</li><li>If the searched value is at the root, the process is complete.</li><li>If the searched value is smaller than the root node, the left subtree is traversed; if larger, the right subtree is traversed.</li><li>This process continues until the node is found or a leaf node is reached.</li></ol><p>Thanks to its balanced structure, the search operation in AVL trees always maintains a time complexity of O(log n). This makes AVL trees highly efficient for systems dealing with large datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-Rxg4daXYwBFTG0h2pbbQ.jpeg" /></figure><h3>Applications of AVL Trees</h3><p>AVL trees are widely used in the following areas:</p><ul><li><strong>Database management systems:</strong> AVL trees are preferred for fast data access and updates.</li><li><strong>File systems:</strong> B-tree or AVL-based structures are used to organize file directories.</li><li><strong>Network routing tables:</strong> Balanced tree structures are crucial for low-latency routing.</li><li><strong>Text processing applications:</strong> AVL trees are an effective method for dictionaries and indexing systems.</li></ul><h3>Conclusion</h3><p>AVL trees hold a critical position in computer science by offering high-performance data processing through their balanced structure. Their ability to maintain O(log n) time complexity for search, insertion, and deletion operations provides a significant advantage for systems handling large datasets. For researchers and software developers working with data structures and algorithms, AVL trees are one of the essential concepts to learn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13f9ac908adb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>