<?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 Şule Akça on Medium]]></title>
        <description><![CDATA[Stories by Şule Akça on Medium]]></description>
        <link>https://medium.com/@suleakca?source=rss-603d0966d459------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iwaEGsbTsuP2MQ5ZM1kGCA.png</url>
            <title>Stories by Şule Akça on Medium</title>
            <link>https://medium.com/@suleakca?source=rss-603d0966d459------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:18:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suleakca/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[Introduction to Machine Learning (Part 1): Fundamentals, Regression, and Classification]]></title>
            <link>https://medium.com/@suleakca/introduction-to-machine-learning-part-1-fundamentals-regression-and-classification-90d10197194f?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d10197194f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 13:34:31 GMT</pubDate>
            <atom:updated>2026-11-03T13:46:20.833Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*7iU4z9sp20X1a_Mx3MWPbg.png" /><figcaption>Image Generated by ChatGPT</figcaption></figure><p>From artificial intelligence to logistic regression, from decision trees to SVM: the fundamental concepts of machine learning.<br>I focused on machine learning for my master’s thesis, so I am well-acquainted with the concepts in this field — both in theory and in practice. This post is the first in a two-part series; it serves as a guide that I’ve compiled and refined based on my own comprehensive course notes. Here, we explore the fundamentals, regression, and classification algorithms (logistic regression, decision trees, k-NN, and SVM), while the second post will cover model quality, ensemble models, and unsupervised learning.</p><h4>The Big Picture: Artificial Intelligence and Machine Learning</h4><p>Artificial intelligence is a broad term for the concept of machines performing tasks that would typically require human intelligence. Falling under this umbrella is machine learning (ML), where algorithms learn rules from data rather than having them manually programmed. In classical machine learning, “feature engineering” is often required — meaning that the features to be fed into the model must first be prepared by a human.</p><h4>How Does Machine Learning Learn?</h4><p>First, a small but important term: <strong>labeled data</strong> refers to data that comes with the correct answer (the label). For example, an email labeled as “spam” or “not spam.”</p><p>Machine learning approaches can be grouped into four main types, depending on how models learn from data and feedback:</p><ol><li><strong><em>Supervised Learning:</em></strong> The model is trained on labeled data.</li><li><strong><em>Unsupervised Learning:</em></strong> The model works with unlabeled data to discover patterns on its own.</li><li><strong><em>Semi-Supervised Learning:</em></strong> The model learns from a combination of a small amount of labeled data and a larger amount of unlabeled data.</li><li><strong><em>Reinforcement Learning:</em> </strong>The agent learns by interacting with an environment, taking actions, and receiving feedback in the form of rewards.</li></ol><p><strong>Common Machine Learning Techniques</strong></p><p>Machine learning involves several techniques used to solve different types of problems. Each technique serves a specific purpose, from predicting values and classifying data to discovering patterns and identifying unusual behavior. Some of the most common techniques include:</p><ul><li><strong><em>Classification:</em></strong> Predicts the class or category of an instance. Example: Determining whether an email is spam or not.</li><li><strong><em>Regression:</em></strong> Predicts continuous values. Example: Estimating the price of a house based on its features, or the CO₂ emissions from a car’s engine.</li><li><strong><em>Clustering:</em></strong> Groups similar data points together. Example: Customer segmentation by a bank.</li><li><strong><em>Association:</em></strong> Identifies items or events that frequently occur together.</li><li><strong><em>Anomaly Detection:</em></strong> Uncovers abnormal or unusual occurrences.</li><li><strong><em>Sequence Mining:</em></strong> Discovers recurring patterns in sequential data, such as customer purchase sequences.</li><li><strong><em>Dimensionality Reduction:</em></strong> Reduces the number of features in a dataset while preserving as much relevant information as possible.</li><li><strong><em>Recommendation Systems:</em></strong> Suggests products, services, or content based on users’ preferences and behavior.</li></ul><h4>The Lifecycle of an ML Project</h4><p>Building a model is only one part of the process. The process consists of five steps.</p><p>These steps provide an overview of a typical ML workflow. The following sections focus on data collection, data preparation, and exploratory data analysis before moving on to model building.</p><ol><li><em>Problem Definition</em></li><li><em>Data Collection</em></li><li><em>Data Preparation</em></li><li><em>Model Development and Evaluation</em></li><li><em>Model Deployment</em></li></ol><p><strong>Data Collection and ETL</strong></p><p>Data is collected according to requirements. The process of collecting and preparing data is called ETL (Extract, Transform, Load): data is gathered from various sources, cleaned and transformed, and then stored in a single, new location.</p><p><strong>Data Preparation</strong></p><p>Collected data is often “dirty” or not immediately ready for use. The data preparation phase involves the following steps:</p><ol><li><strong><em>Remove irrelevant data:</em></strong><em> </em>Eliminate unnecessary or unrelated data that does not contribute to the analysis.</li><li><strong><em>Handle outliers:</em></strong> Identify and investigate extreme values. Depending on the context, they may be removed, transformed, or retained.</li><li><strong><em>Handle missing values:</em></strong> Remove records with missing values or impute (fill in) missing values using appropriate methods.</li><li><strong><em>Ensure correct data types and formats:</em></strong><em> </em>Make sure each feature has the appropriate data type and format.</li><li><strong><em>Create new features:</em> </strong>Apply feature engineering techniques to create meaningful features from existing data.</li><li><strong><em>Perform exploratory data analysis (EDA):</em></strong> Explore the dataset to understand its distributions, relationships, patterns, and potential issues</li><li><strong><em>Split the dataset:</em> </strong>Divide the data into training and test sets, ensuring that preprocessing steps do not introduce data leakage.</li></ol><p>Data preparation clears away the raw “noise” and messiness from the data; however, to truly hear what the data is trying to tell us, we need to dig a little deeper. This brings us to the stage of Exploratory Data Analysis (EDA). EDA is not merely a routine step — it is, in many ways, the very heart of any data science project. Before feeding a dataset into a machine learning algorithm, we must examine its distributions, uncover hidden patterns, and unravel the relationships between variables. Let’s take a look at the steps typically followed during the EDA process and the fundamental visualizations used.</p><p><strong>Exploratory Data Analysis (EDA): Typical Steps</strong></p><ol><li><em>Load data</em></li><li><em>Missing value analysis</em></li><li><em>Outlier check</em></li><li><em>Distributions (histogram, boxplot)</em></li><li><em>Correlation analysis (heatmap)</em></li><li><em>Category distributions (countplot)</em></li></ol><p>Each chart has its own specific purpose:</p><ul><li><strong><em>Histogram: </em></strong>Shows how a variable is distributed. It answers questions such as: Is the data normal or skewed? Is there a concentration of values ​​within a certain range? Are there an excessive number of very small or very large values? Is the data balanced, or is it shifted toward one side?</li><li><strong><em>Boxplot:</em></strong> Directly indicates whether the data is “clean.” If outliers are present, they could compromise the model, making it necessary to take corrective action.</li><li><strong><em>Correlation analysis (heatmap):</em></strong> Allows us to identify which columns are redundant — that is, whether there is a strong relationship between them.</li><li><strong><em>Countplot:</em></strong> Displays the frequency of each category within categorical variables (such as gender, city, or status). It helps in determining whether there is a class imbalance.</li></ul><h4>The Toolbox: The Python Ecosystem</h4><p>Machine learning tools provide the functionalities required for ML pipelines, encompassing modules for data preprocessing, model building, evaluation, optimization, and the deployment of ML models.</p><ul><li><strong><em>NumPy:</em></strong> Numerical computation on data arrays.</li><li><strong><em>Pandas:</em></strong> Data analysis, cleaning, and preparation (data wrangling). It utilizes a tabular data structure called a DataFrame for loading and transforming structured data.</li><li><strong><em>SciPy:</em></strong> Scientific computations, such as optimization, integration, and linear regression.</li><li><strong><em>scikit-learn:</em></strong> A library that brings together algorithms for classification, regression, clustering, and dimensionality reduction, covering both supervised and unsupervised learning.</li><li><strong><em>Deep learning libraries:</em></strong> For designing, training, and testing neural network-based models.</li></ul><h4>Supervised Learning: A Number or a Category?</h4><p>Our tools are ready, and we know how to prepare the data. Now, let’s move on to supervised models — models that learn from labeled data. In supervised learning, there are two fundamental questions, and the one you ask determines the algorithm you should use:</p><ul><li><strong><em>Regression:</em></strong> What we want to predict is a number. Examples: the price of a house, or the amount a customer might spend next month.</li><li><strong><em>Classification:</em></strong><em> </em>What we want to predict is a category. Examples: whether an email is spam or not, or whether a student will pass or fail an exam.</li></ul><p>The rest of this article covers these two topics in turn: first, regression (simple and multiple linear regression, followed by non-linear regression), and then classification (logistic regression, decision trees, k-NN, and SVM).<br>Before we begin: Overfitting and Underfitting<br>There are two concepts we will encounter frequently throughout this article:</p><ul><li><strong><em>Overfitting</em>: </strong>The model memorizes the training data — including its noise — and consequently performs poorly on new, unseen data.</li><li><strong><em>Underfitting</em>: </strong>The model is too simplistic; it fails to capture even the underlying patterns within the training data.<br>In the second article, we will take a detailed look at the underlying causes of these two issues (bias and variance).</li></ul><p>Let’s begin by looking at regression algorithms, the cornerstone of this approach.</p><h4>Regression Algorithms</h4><p><strong>Linear Regression</strong></p><p>Linear regression is used to solve problems where the target variable is a continuous number. It is a supervised learning model that characterizes the relationship between a continuous target variable and the variables that help explain it.</p><ul><li><strong><em>Target:</em></strong> The variable we are attempting to predict.</li><li><strong><em>Explanatory features:</em> </strong>The variables used by the model to make predictions, which help explain the target variable.</li></ul><p><strong>What Is a Continuous Target Variable?</strong></p><p>If the target we are trying to predict is a continuous number, this represents the typical objective of linear regression. The model’s output is a number, which can be any real number. Examples include: the price of a house, a salary, temperature, or the answer to the question, “How much money will this customer spend next month?”</p><p>Simple and multiple regression refer to the number of independent variables used in a model, whereas linear and non-linear regression describe the type (or form) of the relationship that the model represents. Simple regression employs a single independent variable, while multiple regression uses two or more. Depending on the method applied, both can be used to model either linear or non-linear relationships.</p><p><strong>Simple Linear Regression</strong></p><p>A single independent variable (feature) is used in simple linear regression to predict a continuous dependent variable (target). It uses a straight line to represent the link between these two variables.</p><p>The equation is:</p><blockquote>ŷ = b₀ + b₁x</blockquote><p>The target variable’s anticipated value.</p><ul><li><strong>ŷ:</strong> Predicted value of the target variable.</li><li><strong>b₀ (Intercept):</strong> The intersection of the regression line with the y-axis.</li><li><strong>b₁</strong> (Slope): How much a one-unit increase in the independent variable affects the projected value.</li><li><strong>x:</strong> The prediction’s independent variable.</li></ul><p>For instance, we can forecast a house’s price (y) based on its size (x). In this instance, the model’s prediction is based on a single feature.</p><p><strong>Multiple Linear Regression</strong></p><p>It is an extension of simple linear regression. It uses two or more independent variables to predict a dependent variable. Categorical independent variables are typically converted (encoded) into numerical values ​​so that the model can use them. Furthermore, it is important to pay attention to multicollinearity among the independent variables. High correlation between independent variables can cause model coefficients to become unstable and difficult to interpret.</p><p>The equation is:</p><blockquote>ŷ = b₀ + b₁x₁ + b₂x₂ + … + bₙxₙ</blockquote><ul><li><strong>ŷ (Predicted Value):</strong> Predicted value of the target variable.</li><li><strong>b₀ (Intercept):</strong> The predicted value of the target variable when all independent variables are zero.</li><li><strong>b₁, b₂, …, bₙ (Coefficients):</strong> Coefficients that represent the contribution of each independent variable to the prediction, while holding other variables constant.</li><li><strong>x₁, x₂, …, xₙ (</strong>Independent Variables<strong>):</strong> Features used for making predictions.</li></ul><p><strong>How do we measure error? MSE</strong></p><p>To measure how poorly a regression line fits the data, one examines the error (residual) — defined as the actual value minus the predicted value — at each data point. The mean of the squares of these errors is called the Mean Squared Error (MSE), which serves as the most fundamental metric for assessing the magnitude of error in a regression model.<br>For instance, if the actual value is 250 and the model’s prediction is 350, the error is 100, and its square is 10,000. These squared values ​​are summed across all data points and then divided by the total number of data points. The closer the result is to 0, the better the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KlOWWLryqUHixu7z0ulbOg.png" /></figure><p><strong>OLS: Finding the Best-fit Line</strong></p><p>OLS (Ordinary Least Squares) finds the coefficients that minimize the sum of squared errors. In other words, it is a popular method for estimating coefficients by minimizing the MSE (Mean Squared Error). It is important to note that outliers can disproportionately affect OLS calculations, potentially reducing the accuracy of the model.</p><p><strong>Nonlinear Regression</strong></p><p>Non-linear regression is used when the relationship between variables cannot be described by a straight line. When selecting a model, one must first examine the behavior of the dependent variable: is it increasing or decreasing in a mathematical sense?<br>There are three typical use cases:</p><ol><li><strong><em>Exponential or compound growth:</em></strong> Such as how investments grow through compound interest.</li><li><strong><em>Logarithmic:</em></strong> The law of diminishing returns in economics — for instance, how the gains in production or profit gradually slow down as more investment is poured into a factory.</li><li><strong><em>Periodicity:</em></strong> Sinusoidal or seasonal fluctuations in quantities, such as tidal patterns or temperature changes.</li></ol><p>A word of caution: a polynomial regression model can “memorize” everything, including noise and minor, insignificant fluctuations — a phenomenon known as overfitting.</p><p><strong>Regression Algorithms</strong></p><p>Key algorithms that can be used for regression problems:<br><em>1. Linear and polynomial regression<br>2. Random Forest (Regression)<br>3. Extreme Gradient Boosting (XGBoost) (Regression)<br>4. K-Nearest Neighbors (k-NN) (Regression)<br>5. SVM (Support Vector Machine) (Regression)<br>6. Neural networks (Regression)</em></p><h4>Classification Algorithms</h4><p><strong>Logistic Regression</strong></p><p>Despite having “regression” in its name, logistic regression is a classification method. It estimates the probability that an observation belongs to one of two classes — in other words, it determines whether something will occur or which class an item belongs to. The output is a category rather than a continuous numerical value. For instance, this method can be used to predict whether a student will pass an exam or to assess an individual’s risk of having a heart attack.</p><p><strong>Threshold and Decision Boundary</strong></p><p>In binary classification, the model first calculates the probability P(True). If this probability is equal to or greater than a specified threshold, the observation is assigned as True (Class 1); if it is smaller, it is assigned as False (Class 0). A threshold — typically 0.5 — is generally defined to separate the classes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RMXZ7izAzWzxlLUoDK24_w.png" /></figure><p>The dividing boundary created by this threshold is called a decision boundary. The decision boundary of logistic regression is always linear (a line, plane, or hyperplane), so it works best when the data is roughly linearly separable.</p><p>When is it a good choice?</p><ol><li><em>If the data is linearly separable.</em></li><li><em>If you want to understand the impact of an independent feature: you can perform feature selection by looking at the magnitude or weights of the model coefficients.</em></li></ol><p><strong>How is logistic regression trained?</strong></p><p>The goal is to find the parameters that map input features to target outcomes. The objective is to predict the classes with the least possible error — that is, to find the parameters (θ) that minimize the cost function. The process consists of five steps:</p><ol><li><em>Choose an initial set of parameters.</em></li><li><em>Estimate the probability that each observation belongs to class 1.</em></li><li><em>Calculate the error between the predicted classes and the actual classes (the cost function).</em></li><li><em>Determine a new set of parameters (θ) that reduces this prediction error.</em></li><li><em>Repeat these steps until a sufficiently low log-loss value or a target number of iterations is reached.</em></li></ol><p>In short, the primary objective of the training process is to minimize the cost function (log-loss) in order to improve class predictions.</p><p><strong>Gradient Descent and SGD</strong></p><ul><li><strong><em>Gradient Descent:</em></strong> An iterative approach used to find the minimum of a function; in this context, it is employed to minimize a cost function. The primary objective is to determine the optimal parameter values ​​that minimize the cost function by iteratively adjusting those parameters.</li><li><strong><em>Stochastic Gradient Descent (SGD): </em></strong>A variant of gradient descent that utilizes a random subset of the data. It scales effectively for large datasets and converges rapidly toward a minimum.</li></ul><p><strong>C parameter and hyperparameter tuning</strong></p><p>Hyperparameter tuning is the process of optimizing hyperparameters in machine learning models — essentially, finding the best values ​​to enhance a model’s performance. In logistic regression, the C parameter plays a central role:</p><ul><li><strong><em>A large C value:</em></strong> Less regularization. The model becomes more complex and can learn the data better, but the risk of overfitting increases.</li><li><strong>A small C value: </strong>More regularization. The weights are constrained, predictions become less certain — tending toward the class ratio (e.g., 0.5 for balanced data) — and the log-loss increases (meaning the performance worsens).</li></ul><p>So, how do we choose C? Instead of selecting it by eye, we test various values ​​on the data to identify the one that yields the best results. This process is known as hyperparameter tuning, with cross-validation and Grid Search being the most common methods.</p><p>Classification can also be performed using algorithms such as Naive Bayes, Decision Trees, k-Nearest Neighbors (k-NN), Support Vector Machines (SVM), and Neural Networks. I will give general information about some of them.</p><h4>Other Classification Algorithms</h4><p>Let’s explore some of these algorithms, starting with Decision Trees.</p><h4>Decision Trees</h4><p>The structure of a decision tree consists of three parts:</p><ul><li>Each internal node represents a test.</li><li>Each branch represents the outcome of a test.</li><li>Each terminal (or leaf) node assigns the data to a specific class.</li></ul><p>In other words, each node performs a split based on an attribute, while the final prediction is made at a leaf node.</p><p><strong>When does the tree stop growing?</strong></p><ol><li>When the maximum tree depth is reached.</li><li>When the number of data points at a node reaches a specified minimum limit.</li><li>When the minimum required number of samples per leaf is reached.</li><li>When the tree reaches the maximum allowed number of leaves.</li></ol><p><strong>Entropy and information gain</strong></p><p><em>Entropy</em> measures the disorder (uncertainty) within a dataset. In decision trees, we prefer splits that result in the lowest entropy at the nodes:</p><ul><li>If a node is perfectly homogeneous, its entropy is 0.</li><li>In a two-class problem, if the classes are distributed equally, the entropy is 1.</li></ul><p>Information Gain is the difference between the entropy before a split and the weighted entropy after the split. In other words, Information Gain represents the reduction in entropy achieved by a split; it measures the extent to which a split decreases uncertainty within the data. A split that results in classes being as homogeneous as possible yields high Information Gain.<br>How is the optimal split threshold determined for a node? In an exhaustive search, every possible threshold value for a numerical feature is tested, and the threshold that maximizes Information Gain (or minimizes error, in the case of regression trees) is selected.</p><p><strong>Regression trees</strong></p><ul><li>The target is a continuous value; the tree predicts continuous values.</li><li>The dataset is recursively partitioned into subsets in a way that reduces the variance or the Mean Squared Error (MSE) of the target values.</li><li>MSE is a criterion used to measure the quality of a split.</li><li>Features can be binary or multiclass.</li></ul><p><strong>Pruning and multi-class problems</strong></p><ul><li><strong><em>Pruning: </em></strong>Pruning a tree helps prevent overfitting to the training data.</li><li><strong><em>One-versus-all strategy:</em></strong> A method for adapting binary classifiers to multi-class problems. Each classifier is trained to distinguish one specific class from all other classes. Its purpose is to enable the handling of multiple classes using binary classifiers.</li></ul><h4>k-NN and SVM</h4><p><strong>k-NN (k-Nearest Neighbors)</strong></p><p>k-NN uses labeled points to learn how to label other points. It is used for both classification and regression:</p><ul><li><strong><em>Classification:</em></strong> The most popular (majority) class among the neighbors is selected.</li><li><strong><em>Regression:</em></strong> The average (or median) of the target values ​​of the neighbors is taken.</li></ul><p><strong>How do we find k?</strong></p><ol><li><em>Test a range of k values.</em></li><li><em>Start with k = 1 and calculate the accuracy.</em></li><li><em>Repeat this for each k value you wish to test.</em></li><li><em>Determine which k yields the best results.</em></li></ol><p>The size of k defines the nature of the model:</p><ul><li>If k is too small, the model will overfit.</li><li>If k is too large, the prediction process considers too many neighbors, resulting in “smoother” (less granular) predictions and a simplified model; this leads to underfitting.</li></ul><p>There is also an interesting detail: k-NN is a “lazy learner.” This means it does not perform learning in the same sense that other machine learning models do.</p><h4>SVM (Support Vector Machine)</h4><p>SVM is likewise used for both classification and regression; it is particularly powerful for classification. Its primary objective is to establish a hyperplane that separates the dataset — in other words, it finds the line (in 2D), the plane (in 3D), or, more generally, the hyperplane that best separates the data. Basic logic:</p><ul><li>SVM seeks to find a line that creates the widest margin separating two classes.</li><li>The points closest to this line are called “support vectors.” These points define the boundary.</li><li>Margin: The distance between the hyperplane (decision boundary) that separates the two classes and the nearest data points belonging to those classes. The decision boundary is the hyperplane that maximizes this margin.</li></ul><p>In short: It draws a boundary that keeps the classes as far apart as possible. Thanks to the “kernel trick,” it can effectively separate even non-linear data.</p><p><strong>Where is it used?</strong></p><ul><li>Image classification and handwritten digit recognition</li><li>Text parsing, spam detection, and sentiment analysis</li><li>Speech recognition, anomaly detection, and noise filtering</li></ul><p><strong>When might it not be suitable?</strong></p><ol><li>If the dataset is very large (millions of samples), training becomes slow.</li><li>If the data is highly noisy, the margin may be compromised.</li><li>If the classes are not clearly separable, tuning the C and gamma parameters becomes difficult.</li></ol><h4>What’s Next?</h4><p>In this article, we examined models that learn to make predictions. In the second part of the series, we cover why a model might perform well or poorly (bias and variance), ensemble methods that combine multiple models (Random Forest, boosting), working with unlabeled data (clustering, dimensionality reduction), and the metrics used to measure success.</p><h4>References</h4><ul><li><a href="https://www.coursera.org/professional-certificates/ai-engineer">https://www.coursera.org/professional-certificates/ai-engineer</a></li></ul><p>Have I missed something, or is there a concept you think deserves a spot here? Let me know in the comments! I’d love to hear your thoughts and keep the learning conversation going. 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d10197194f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Algorithms with CLRS: From Loops to Big-O]]></title>
            <link>https://medium.com/@suleakca/understanding-algorithms-with-clrs-from-loops-to-big-o-e322c2544c51?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/e322c2544c51</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 12:42:43 GMT</pubDate>
            <atom:updated>2026-10-13T12:42:43.968Z</atom:updated>
            <content:encoded><![CDATA[<p>Lately, so much of our work revolves around AI-assisted coding, complex bug fixes, and keeping up with new technologies. Sometimes, we get so caught up in solving the next problem that we forget to revisit the basics. That’s one of the reasons I started revisiting algorithms through Introduction to Algorithms (CLRS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*odW8PLfw5FNs4H12nnspkg.png" /><figcaption>Image Generated by Gemini</figcaption></figure><blockquote>Some books are read once; others are opened again and again. CLRS definitely belongs to the second group.</blockquote><p>Introduction to Algorithms (CLRS) was more than just an algorithms book for me; it changed the way I approach problems. This post is a sort of journal — a collection of notes I took while reading, solving problems, and occasionally struggling.</p><p>Here is the roadmap: first, we will see how to prove why a loop works correctly. Then, we will move on to how we measure algorithms — specifically, Big-O, Ω, and Θ notations. Next, we will discuss the “divide and conquer” concept using Merge Sort, as well as recurrences and the Master Theorem; finally, we will cover dynamic programming and sorting algorithms.</p><h4>1. Loop Invariant: Proving the Correctness of the Loop</h4><p>At first, this concept seemed too theoretical to me. Later, I realized how logical the idea actually is: a loop invariant is a statement that remains true during every iteration of the loop. Thanks to this statement, we can prove why the loop works correctly.</p><p>CLRS presents the proof in three stages:</p><p><strong><em>Initialization</em>:</strong> Is the invariant true before the loop begins?<br><strong><em>Maintenance</em>: </strong>If it is true at the start of an iteration, does it remain true at the end of the iteration?<br><strong><em>Termination:</em></strong> When the loop finishes, does the invariant yield the desired result?</p><p>Let’s take Insertion Sort as an example:</p><pre>for (int i = 1; i &lt; A.length; i++) {<br>   int key = A[i];<br>   int j = i - 1;<br>   while (j &gt;= 0 &amp;&amp; A[j] &gt; key) {<br>      A[j + 1] = A[j];<br>      j--;<br>   }<br>   A[j + 1] = key;<br>}</pre><p>The loop invariant for the outer loop is that A[0..i-1] contains the original first “i” elements in sorted order. Simply saying “sorted” is not enough. One must also state that the elements have not been lost — that is, that the same elements have been rearranged. Otherwise, code that completely clears the array would also qualify as “sorted.”</p><ul><li><strong><em>Initialization</em></strong>: The loop starts with i = 1. A[0..0] consists of a single element and is sorted.</li><li><strong><em>Maintenance</em></strong>: The inner while loop shifts elements greater than key = A[i] one position to the right and places the key in the correct position. Thus, A[0..i] becomes sorted. A formal proof of this step relies on the inner loop’s own invariant.</li><li><strong><em>Termination</em></strong>: The loop terminates when i = n. The invariant tells us that the range A[0..n-1] is sorted. The correctness of the algorithm follows from this.</li></ul><blockquote><strong>Note:</strong> CLRS uses 1-based indexing (A[1..n]) in its pseudocode. I use 0-based indexing to align with Java.</blockquote><h4>2. Measuring the Algorithm by Growth, Not Seconds</h4><p>We do not measure the speed of an algorithm in seconds. Execution time depends on the computer, the compiler, and the current load. Instead, we look at how the number of operations increases as the input grows. This is called the rate of growth.</p><p><strong>Example: Binary Search</strong></p><p>Binary Search halves the search range at each step: n, n/2, n/4, n/8… It continues until the range is reduced to a single element. In other words, it requires k steps, where 2^k = n:</p><pre>2^k = n  =&gt;  k = log₂ n</pre><p>The result is O(log n). There is one condition: the array must be sorted. We can only decide which half to proceed to by looking at the middle element if the array is sorted.</p><p><strong>Ranking of growth rates</strong></p><p>From smallest to largest:</p><pre>O(1) &lt; O(log n) &lt; O(n) &lt; O(n log n) &lt; O(n²) &lt; O(n³) &lt; O(2ⁿ) &lt; O(n!)</pre><p>The &lt; sign here means “grows more slowly.” Examples: Binary Search O(log n), Linear Search O(n), Merge Sort O(n log n), Insertion Sort and Bubble Sort O(n²).</p><p><strong>Discarding large, small, and constant terms</strong></p><p>Let us consider the expression T(n) = n³/1000 + 100n² − 100n + 3. When n is sufficiently large, the n³ term dominates the others. The constant factor 1/1000 is also asymptotically insignificant. The result is Θ(n³). (O(n³) is also correct, but Θ is more informative. We will see why shortly.)</p><p><strong>Time analysis in loops</strong></p><p>This is the most useful skill when reading code. Four common patterns are a good starting point for analyzing loops:</p><pre>// 1) n × n  →  Θ(n²)<br>for (int i = 0; i &lt; n; i++)<br>   for (int j = 0; j &lt; n; j++) { /* O(1) */ }<br><br>// 2) i her seferinde ikiyle çarpılıyor  →  Θ(log n)<br>for (int i = 1; i &lt; n; i *= 2) { /* O(1) */ }<br><br>// 3) iç döngü dışa bağlı: 0 + 1 + ... + (n-1) = n(n-1)/2  →  Θ(n²)<br>for (int i = 0; i &lt; n; i++)<br>   for (int j = 0; j &lt; i; j++) { /* O(1) */ }<br><br>// 4) dış döngü log n kez, iç döngü n kez  →  Θ(n log n)<br>for (int i = 1; i &lt; n; i *= 2)<br>   for (int j = 0; j &lt; n; j++) { /* O(1) */ }</pre><p>In the second example, i takes the following values: 1, 2, 4, 8, 16… How many times must we multiply by 2 to reach n? log₂ n times. The logic lies in the relationship between logarithms and exponents: ²³ = 8 ↔ log₂ 8 = 3. A variable that grows exponentially or is halved implies a logarithmic number of steps.</p><p>The third and fourth examples demonstrate that the “nested loop = n²” rule does not always apply. It is always necessary to consider how many times the inner loop iterates.</p><p>O, Ω, and Θ: Three Asymptotic Bounds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*cGBUBFfaa8GVyYRie6TChw.png" /></figure><p>In short: O means “grows at most this fast,” Ω means “grows at least this fast,” and Θ means “grows at the same asymptotic rate.” There are also lowercase cousins: o and ω represent strict upper and lower bounds.</p><p>My biggest misconception was thinking that O means worst case, Ω means best case, and Θ means average case. In reality, best, worst, and average cases describe which case of an algorithm’s behavior we analyze, while O, Ω, and Θ describe the type of asymptotic bound we use. These are two independent concepts.</p><p>We can clearly see this in Insertion Sort. Its worst-case complexity is Θ(n²), and its best-case complexity is Θ(n). The statement “Insertion Sort’s running time is O(n²)” holds true for any input. However, the statement “it is Ω(n²)” is incorrect, because for sorted input, the running time is on the order of n. You can use O, Ω, and Θ for both the worst case and the best case; each provides a distinct bound for that specific scenario.</p><p><strong>Best, worst, and average case</strong></p><p>An algorithm’s behavior varies depending on the input. In Linear Search, the best case occurs when the target element is at the beginning, while the worst case occurs when it is absent or at the end. The average case represents the expected time, assuming inputs follow a specific distribution (such as random). Worst-case analysis is generally preferred because knowing the worst-case scenario provides a guarantee.</p><h4>3. Divide, Conquer, and Combine</h4><p>Divide and conquer is one of the most impressive ideas from CLRS. It involves breaking down a seemingly complex problem into smaller parts and solving them:</p><ul><li><strong><em>Divide</em></strong>: Divide the problem into subproblems.</li><li><strong><em>Conquer</em></strong>: Solve each subproblem (usually recursively).</li><li><strong><em>Combine</em></strong>: Combine the results.</li></ul><p>Merge Sort</p><pre>mergeSort(arr) {<br>   if (arr.length &lt;= 1) return arr;<br>   mid   = arr.length / 2;<br>   left  = mergeSort(arr[0..mid-1]);<br>   right = mergeSort(arr[mid..end]);<br>   return merge(left, right);<br>}</pre><p>The actual work is done within the `merge` operation. It combines two sorted arrays in a single pass: at each step, it takes the smaller element from the beginning of the two arrays.</p><pre>merge(left, right) {<br>   result = yeni dizi (left.length + right.length)<br>   i = 0; j = 0; k = 0<br>   while (i &lt; left.length &amp;&amp; j &lt; right.length) {<br>      if (left[i] &lt;= right[j]) result[k++] = left[i++];<br>      else                      result[k++] = right[j++];<br>   }<br>   while (i &lt; left.length)  result[k++] = left[i++];<br>   while (j &lt; right.length) result[k++] = right[j++];<br>   return result;<br>}</pre><p>Since each element is processed once, the merge operation takes O(n) time. Using `&lt;=` preserves the relative order of equal elements; this property is known as a stable sort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*12eXOWpMAWYncXaj5cWk5g.png" /><figcaption>Division tree for a 4-element array: log₂ 4 = 2 levels, followed by merging at each level.</figcaption></figure><p>The time complexity analysis is derived from this tree structure. Since the array is split in two at each step, there are approximately log₂ n levels. The splitting step itself is inexpensive (O(1)). At each level, a total of n elements are merged. Thus, log n levels × n operations per level results in Θ(n log n) complexity for the best, worst, and average cases. The cost is additional memory: because the merge operation uses a new array, Merge Sort is not an in-place algorithm and requires O(n) extra memory.</p><h4>4. Recursion and Recurrence</h4><p>Recursion is a function calling itself. The simplest example is the factorial:</p><pre>int factorial(int n) {<br>   if (n &lt;= 1) return 1;          // base case<br>   return n * factorial(n - 1);<br>}</pre><p>Without a base case, recursion never terminates. That is why I wrote `n &lt;= 1`; if I had written `n == 1`, `factorial(0)` would have entered an infinite recursion. Every `return` statement does two things: it terminates the function and sends the value back to the caller.</p><p>A recurrence relation is a way of expressing the running time of such algorithms as an equation. For Merge Sort:</p><pre>T(n) = 2T(n/2) + Θ(n),   T(1) = Θ(1)</pre><p>We solve two subproblems (2T(n/2)) and combine the results (Θ(n)). Writing the recurrence is half the battle. The main goal is to convert it into a closed form. CLRS describes three methods:</p><ul><li><strong><em>Substitution:</em></strong> Guess the solution and prove it by induction.</li><li><strong><em>Recursion tree:</em></strong> Draw the recursion as a tree and sum the costs at each level. The Merge Sort tree above is an example of this.</li><li><strong><em>Master Theorem:</em></strong> A ready-made formula for recurrences of the form T(n) = aT(n/b) + f(n).</li></ul><p><strong>Master Theorem</strong></p><p>f(n) is compared with n^(log_b a):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*aJpS24UnRrAq7_qvkvcMgg.png" /></figure><p><strong><em>Merge Sort:</em> </strong>a = 2, b = 2, so n^(log₂ 2) = n. f(n) = Θ(n) is of the same order; Case 2 (k = 0), result Θ(n log n).</p><p><strong><em>Binary Search:</em></strong> T(n) = T(n/2) + Θ(1), a = 1, b = 2, so n⁰ = 1. f(n) = Θ(1), Case 2, result Θ(log n). This is the same result as the log₂ n we derived earlier.</p><h4>5. Memoization and Dynamic Programming</h4><p>Both are used to avoid repeatedly solving the same subproblems. I initially thought they were two separate techniques. In CLRS, the fundamental technique is dynamic programming. Memoization is the top-down implementation of DP, while bottom-up tabulation is the other form.</p><p>There are two indicators to look for when considering DP:</p><p><strong><em>Optimal substructure:</em></strong> The optimal solution to the problem can be constructed from the optimal solutions to its subproblems.<br><strong><em>Overlapping subproblems:</em> </strong>The same subproblems are encountered repeatedly. (In divide and conquer, subproblems are generally independent of each other.)</p><p>The classic example is Fibonacci. Pure recursion takes exponential time (approximately O(2ⁿ)) because it repeatedly calculates the same values. With memoization or a table, it drops to O(n):</p><pre>// Naive recursion: Exponential time<br>int fib(int n) {<br>   if (n &lt;= 1) return n;<br>   return fib(n - 1) + fib(n - 2);<br>}<br><br>// Top-down + memoization: O(n)<br>int fib(int n, int[] memo) {<br>   if (n &lt;= 1) return n;<br>   if (memo[n] != 0) return memo[n];<br>   memo[n] = fib(n - 1, memo) + fib(n - 2, memo);<br>   return memo[n];<br>}<br><br>// Bottom-up: O(n)<br>int fib(int n) {<br>   if (n &lt;= 1) return n;<br>   int[] dp = new int[n + 1];<br>   dp[1] = 1;<br>   for (int i = 2; i &lt;= n; i++) dp[i] = dp[i - 1] + dp[i - 2];<br>   return dp[n];<br>}</pre><p>My summary: memoization is lazy but smart, while bottom-up DP is planned and systematic. Both are two sides of the same coin. You see this concept applied to problems like rod cutting, matrix-chain multiplication, and longest common subsequence in the DP chapter of CLRS.</p><h4>6. Overview of Sorting Algorithms</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*fCopBMJOcc5o0xVNMqnzug.png" /></figure><p><strong>Insertion Sort</strong><br>Ideal for small arrays. Inserts each element into the correct position. Θ(n) if the array is already sorted, Θ(n²) if reverse-sorted. In-place and stable.</p><p><strong>Bubble Sort and a common mistake</strong></p><p>It compares adjacent elements and swaps them if necessary. It is instructive but inefficient in practice. Most sources state the best-case complexity as O(n), but this applies only to the version with an early exit. The basic version performs all comparisons even on an already sorted array:</p><pre>// Basic version: Θ(n²) in all cases<br>for (int i = 0; i &lt; n - 1; i++) {<br>   for (int j = 0; j &lt; n - i - 1; j++) {<br>      if (arr[j] &gt; arr[j + 1]) {<br>         int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp;<br>      }<br>   }<br>}<br><br>// Early-exit version: best case Θ(n)<br>for (int i = 0; i &lt; n - 1; i++) {<br>   boolean swapped = false;<br>   for (int j = 0; j &lt; n - i - 1; j++) {<br>      if (arr[j] &gt; arr[j + 1]) {<br>         int temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp;<br>         swapped = true;<br>      }<br>   }<br>   if (!swapped) break;   // No swaps occurred; the array is already sorted.<br>}</pre><p><strong>Quicksort</strong><br>Divide and conquer: choose a pivot, partition the array into elements smaller and larger than the pivot, and recursively sort both sides. There is no merge step. The expected time complexity is Θ(n log n), but it becomes Θ(n²) if the pivot consistently turns out to be the smallest or largest element. It operates in-place, is not stable, and is very fast in practice. Choosing the pivot randomly reduces the risk of encountering a worst-case input.</p><p><strong>Heapsort</strong><br>Converts the array into a max-heap, repeatedly moves the largest element at the root to the end, and restores the heap property. Worst-case and average-case complexity is Θ(n log n); it is an in-place algorithm but is not stable.</p><p><strong>Lower bound: Ω(n log n)</strong><br>Any algorithm that sorts elements solely by comparing them must perform Ω(n log n) comparisons in the worst case. Therefore, Merge Sort and Heapsort are asymptotically optimal. To surpass this bound, one must move beyond comparison-based sorting. Counting Sort takes Θ(n + k) time (where inputs must be integers in the range 0 to k). Radix Sort takes Θ(d·(n + k)) time, where d is the number of digits.</p><p>A very simple idea lies behind the formulas, notations, and definitions that initially seem complex.</p><blockquote>Don’t memorize an algorithm, understand why it works.</blockquote><p>CLRS didn’t just teach me algorithms; it equipped me with the ability to think, devise solutions, and simplify complexity. If you are following the same path, take it slow — don’t move past anything without truly understanding it. Every line has meaning.</p><p>I hope this article proves useful. You might encounter one of these questions in an interview, but the most important thing isn’t memorizing the answer — it’s understanding how the code works. If you can look at a loop and identify a recursive function’s base case, or look at a recursive function and determine its base case and runtime, you’ll be able to figure it out regardless of the specific question.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e322c2544c51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot Without the Magic: Key Concepts and Practical Notes]]></title>
            <link>https://medium.com/@suleakca/spring-boot-without-the-magic-key-concepts-and-practical-notes-294c0dbe91e3?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/294c0dbe91e3</guid>
            <category><![CDATA[spring-framework]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 10:16:36 GMT</pubDate>
            <atom:updated>2026-10-05T10:16:36.848Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bMhfkF7P9mbf-qx3WtM1zw.png" /><figcaption>Image generated with ChatGPT</figcaption></figure><p>While working with Spring Boot, I took notes on many of the concepts I came across — from Maven and Spring Boot starters to REST APIs, JPA, and Actuator. Over time, these notes grew into a collection of ideas that I wanted to put together in a more structured way. So, I organized my notes and turned them into this article, bringing together the key concepts and explaining how they relate to one another.</p><p>This is not intended to be a step-by-step tutorial or an exhaustive guide to Spring Boot. It is simply a practical collection of my own notes and observations, which I hope can be useful for anyone who wants to get a clearer picture of the framework and how its different pieces fit together.</p><blockquote>Note: The examples in this article have been prepared to be compatible with Spring Boot 3.x. Spring Boot 4.x versions have also been released; starter names, packages, and certain settings may have changed in those versions. Be sure to check the release notes for the specific version you intend to use in your project.</blockquote><h4>What is Spring Boot?</h4><p>Spring Boot is a tool that simplifies the development of Spring-based applications. In the past, setting up a Spring project required dealing with lengthy XML configurations. Spring Boot reduces this configuration burden: it provides sensible default settings and automatically configures many components based on what is present on the classpath. For instance, if you add an embedded database like H2 to your project, you can connect to it without even specifying a connection URL. However, if you intend to use a real database (such as MySQL or PostgreSQL), you provide the connection details yourself.</p><p>One of the fundamental concepts of Spring is Dependency Injection(DI): A class should not create the objects it needs itself; instead, they should be provided from the outside. For example, if the Controller needs the PersonRepository, Spring thinks: “I have already created the bean for this repository; let me inject it into the Controller.” You simply specify the dependency, and Spring takes on the task of creating the object.</p><h4>Maven: The Heart of Dependency Management</h4><p>An application may need dozens of libraries to run. Instead of downloading and adding them to your project one by one, you let Maven handle them for you. In Maven, all dependencies are defined in a single file called pom.xml. Maven looks at this file and says, “Okay, these are all the libraries required to run this application.” The pom.xml file does not contain the libraries themselves. Instead, you declare which dependencies your project needs, and Maven resolves and downloads them from a repository. So, you don’t have to download libraries manually. You simply declare them as dependencies in pom.xml, and Maven handles the rest.</p><p>When creating a new Maven project in Eclipse, you encounter two fields:</p><p><strong>Group Id: </strong>You can think of this as the package name (e.g., com.example).<br><strong>Artifact Id:</strong> This is the name of the project.</p><p>Once you complete this step, you have a simple Maven project. The next task is to convert it into a Spring Boot project.</p><p>Defining a Parent: <em>spring-boot-starter-parent</em></p><p>Defining a parent in pom.xml means specifying “what base configuration this project inherits from and which versions it should use.” It is not mandatory for Spring Boot, but most people use the recommended spring-boot-starter-parent because it makes things significantly easier:</p><ul><li>It automatically imports the default settings and dependency versions recommended by Spring Boot.</li><li>It reduces version conflicts when adding dependencies.</li><li>It manages Maven build and plugin settings for you.</li></ul><pre>&lt;parent&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;<br>    &lt;version&gt;3.3.2&lt;/version&gt;<br>&lt;/parent&gt;</pre><p>And the Starter:</p><p>spring-boot-starter-web is one of Spring Boot’s ready-made “starter” packages. It bundles the essential libraries required for developing web applications. When you add this dependency, you don’t need to worry about which JARs are required; they are all included. Since you have defined the parent, there is no need to specify a version either:</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><h4>Maven Plugins</h4><p>The ‘&lt;plugin&gt;’ element in ‘pom.xml’ defines the extra tools Maven uses when compiling, packaging, or performing other operations on the project. Plugins add new capabilities to Maven and handle tasks such as compilation, test execution, and packaging. The ‘spring-boot-maven-plugin’ is the one you will encounter most frequently in Spring Boot projects; it packages the application as an executable JAR:</p><pre>&lt;build&gt;<br>    &lt;plugins&gt;<br>        &lt;plugin&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;<br>        &lt;/plugin&gt;<br>    &lt;/plugins&gt;<br>&lt;/build&gt;</pre><h4>Starting the Application</h4><p>The pom.xml is ready. So, what do we do now? We create a standard class containing a main method under ‘src/main/java’. Then, we add the ‘@SpringBootApplication’ annotation to this class to declare, “You are a Spring Boot application.”</p><pre>@SpringBootApplication<br>public class CourseApiApp {<br><br>    public static void main(String[] args) {<br>        SpringApplication.run(CourseApiApp.class, args);<br>    }<br>}</pre><p>SpringApplication.run() starts the application; it initializes the Spring context and the embedded Tomcat server. You can run this class from your IDE or start it using the ‘./mvnw spring-boot:run’ command if you are using the Maven wrapper. By default, the application runs on port 8080.</p><h4>Controller ve Spring MVC</h4><p>A controller is the class in web applications that handles HTTP requests and returns responses. The flow is as follows:</p><ul><li>A user sends a request (GET, POST, PUT, DELETE) from a browser or another client.</li><li>The controller intercepts this request.</li><li>It executes the business logic (usually by delegating to a Service class).</li><li>It returns the response.</li></ul><p>This structure is part of Spring MVC. MVC stands for Model-View-Controller architecture:</p><ul><li>Model: Represents the data and business logic.</li><li>View: The interface displayed to the user (HTML, Thymeleaf, etc.).</li><li>Controller: Receives requests, prepares the model, and sends it to the view.</li></ul><h4>@Controller or @RestController?</h4><p>This was the topic that confused me the most at first.</p><ul><li><em>@Controller: </em>This is a standard controller used to return a view (HTML). If a method returns a String, Spring interprets it as a view name. For instance, if the method returns “Hello World!”, Spring attempts to locate a template file (such as .jsp, .html, etc.) with that name.</li><li><em>@RestController: </em>This tells Spring that the class is a REST API controller and writes the value returned by the method directly to the HTTP response body (e.g., as JSON, plain text, etc.). Essentially, it is a combination of @Controller and @ResponseBody.</li></ul><p>If you ever return &quot;Hello World!&quot; from a plain @Controller and get an error or a 404 instead of your text, now you know why: Spring went looking for a view called &quot;Hello World!&quot;.</p><h4>Mapping a URL to a method</h4><p>@RequestMapping is used to specify, “When this URL is received, return this”:</p><pre>@RestController<br>public class HelloController {<br><br>    @RequestMapping(&quot;/hello&quot;)<br>    public String sayHi() {<br>        return &quot;Hello World!&quot;;<br>    }<br>}</pre><blockquote>Note: If you do not specify a ‘method’ within ‘@RequestMapping’, the mapping you create is not restricted to a specific HTTP method; it can match requests from various HTTP methods such as GET, POST, PUT, and DELETE. To bind the mapping to a specific HTTP method, you could use syntax like ‘method = RequestMethod.GET’. However, it is now more common to use more readable, purpose-specific shortcut annotations instead: @GetMapping’, ‘@PostMapping’, ‘@PutMapping’, and ‘@DeleteMapping’.</blockquote><h4>What is a REST API?</h4><p>REST (Representational State Transfer) is an architectural style that facilitates communication between a client and a server over the web by leveraging web standards such as HTTP. REST itself is not a protocol, whereas HTTP is a communication protocol. A REST API is an interface that enables applications to communicate with one another using REST principles.</p><p>The “applications” here refer to various types of software:</p><ul><li>A mobile application (Android / iOS)</li><li>A web application (React, Angular)</li><li>Another server-side application</li></ul><p>These applications send HTTP requests to the REST API and typically exchange data in JSON format. JSON (JavaScript Object Notation) is a widely used data format for representing and transmitting data in a structured text format.</p><p>Resource and Endpoint Logic</p><p>Let’s assume “Topic” is our resource. We design the endpoints as follows: the root is the plural form of the resource name.</p><ul><li>Get all topics → GET /topics</li><li>Get one topic → GET /topics/1</li><li>Create a topic → POST /topics</li><li>Update a topic → PUT /topics/1</li><li>Delete a topic → DELETE /topics/1</li></ul><p>Each of these is called an <strong>API endpoint</strong>. Writing an API simply means coding these endpoints, and Spring Boot makes that surprisingly pleasant.</p><h4>Dynamic URL: @PathVariable</h4><p>To handle dynamic addresses like /topics/1 or /topics/abc, we place a variable in the form of {id} in the URL:</p><pre>@GetMapping(&quot;/topics/{id}&quot;)<br>public Topic getTopic(@PathVariable String id) {<br>    return topicService.getTopic(id);<br>}</pre><ul><li>The {id} part is a dynamic path parameter.</li><li>The @PathVariable annotation instructs the system to “take the {id} value from the URL and pass it to the method as a parameter.”</li><li>When GET /topics/1 is called, the string “1” is automatically assigned to the id variable.</li></ul><h4>Request Body: @RequestBody and Content-Type</h4><p>When adding a new topic, we send the data as JSON in the request body rather than in the URL:</p><pre>@PostMapping(&quot;/topics&quot;)<br>public void addTopic(@RequestBody Topic topic) {<br>    topicService.addTopic(topic);<br>}</pre><p>The critical point here is ‘@RequestBody’. This annotation takes the JSON from the incoming HTTP request body and automatically converts it into a `Topic` object. Spring Boot performs this conversion in the background using the Jackson library.</p><p>Imagine you are sending the following JSON from Postman:</p><pre>{<br>  &quot;id&quot;: &quot;4&quot;,<br>  &quot;name&quot;: &quot;Docker&quot;,<br>  &quot;description&quot;: &quot;Container technology&quot;<br>}</pre><p>Jackson takes this JSON, creates an object of the ‘Topic’ class, populates the object with the fields from the JSON, and passes it to the method as the ‘topic’ parameter. For this to work, the ‘Topic’ class must have a no-argument (default) constructor as well as getters and setters; Jackson typically creates the object using the no-argument constructor first and then assigns the values ​​using the setters.</p><h4>Why Do We Select Content-Type in Postman?</h4><p>You need to inform the recipient of the format of the data sent in an HTTP request. This information is specified via the ‘Content-Type’ header:</p><ul><li>‘application/json’ → “I am sending you JSON data.”</li><li>‘application/xml’ → “I am sending XML.”</li><li>‘text/plain’ → “This is plain text.”</li><li>‘multipart/form-data’ → “I am uploading form data or a file.”</li></ul><p>When you use ‘@RequestBody’ and send ‘Content-Type: application/json’, Spring converts the JSON data into a Java object using the appropriate ‘HttpMessageConverter’. In Spring Boot, Jackson is typically used for this purpose; for instance, it can convert JSON data into a ‘Topic’ object.</p><p>If the ‘Content-Type’ is not specified at all, or if a media type not supported by Spring is sent, an error may occur depending on how the request is processed. Sending an unsupported media type to an endpoint expecting JSON can result in a “415 Unsupported Media Type” error.</p><h4>Controller, Service, Repository: who does what?</h4><p>Once your app grows, you’ll want to split responsibilities:</p><ol><li><strong>Controller</strong> talks to the client. It receives /topics requests.</li><li><strong>Service</strong> holds the business logic. The controller asks, “get me all topics,” and the service prepares the answer.</li><li><strong>Repository</strong> talks to the database. The service says, “load all topics,” and the repository fetches them.</li></ol><p>Similarly, the <strong>model</strong> class (like Topic) only has fields, getters and setters. No business logic.</p><h4>Beans, @Service, and @Autowired</h4><p>A <strong>bean</strong> is simply an object that’s managed by the Spring container. Spring creates it, manages it, and hands it to you when you need it. Business services are typically singletons, meaning one shared instance.</p><p>Marking a class with @Service tells Spring, &quot;this class holds business logic, manage it for me.&quot; Spring registers it as a bean. Then, in your controller:</p><pre>@Autowired<br>private TopicService topicService;</pre><p>@Autowired means &quot;Spring, give me the bean for this class.&quot; You never write new TopicService() yourself. That&#39;s Dependency Injection in action, the same idea from the beginning of this post, now with real code behind it.</p><p>(A small note: field injection like this is everywhere in tutorials and works fine, but constructor injection is generally preferred in real projects. It makes dependencies explicit and your classes easier to test.)</p><h4>Spring Initializr: the shortcut I wish I’d known earlier</h4><p>Setting up a Maven project by hand and adding dependencies one by one is a good way to learn. But for real projects, there’s Spring Initializr.</p><p>You choose your build tool (Maven or Gradle), Java version, Spring Boot version, and dependencies (Web, JPA, H2, Lombok, Security, Test…). It generates a ready-to-run project as a zip file, with pom.xml configured and the @SpringBootApplication class already in place.</p><p>A quick word on versions, because tutorials age fast. As of mid-2026 the latest Spring Boot line was 4.0.x, so generate a fresh project and check what’s current at start.spring.io instead of copying an old pom.xml. One change that trips people up with older tutorials: since Spring Boot 3, JPA imports use jakarta.persistence.* instead of javax.persistence.*.</p><p>A couple of related things worth knowing:</p><ul><li><strong>Maven vs Gradle:</strong> both are build tools that compile, manage dependencies, run tests and package your app. Maven uses XML (pom.xml) and is classic and rule-based. Gradle uses Groovy or Kotlin DSL and is more flexible and often faster thanks to incremental builds and caching.</li><li><strong>Spring Boot CLI:</strong> a command-line tool for quick prototypes and Groovy scripts. Handy for experiments, rarely used in production.</li><li><strong>Spring Boot Starter Test:</strong> adds JUnit and Mockito so you can test your logic and catch regressions when you change something.</li><li><strong>Lombok:</strong> generates getters, setters and builders at compile time through annotation processing. Less code to write, but the generated methods still exist in the compiled .class files.</li></ul><h4>Talking to a database with JPA</h4><p>JPA (Java Persistence API) is a specification now officially known as Jakarta Persistence. It enables interaction with database tables using Java objects. JPA employs the ORM (Object-Relational Mapping) approach, where a Java class corresponds to a database table, and a field within that class corresponds to a column.</p><p>With JPA, you can perform basic CRUD operations without writing raw SQL. However, there is a key point to note: JPA is merely a specification; it defines how these operations should be performed but does not execute them itself. In Spring Boot applications, Hibernate is the most widely used implementation that adheres to the JPA specification and handles the actual underlying operations.</p><p>The annotations that matter most:</p><ul><li>@Entity: &quot;this class corresponds to a database table.&quot;</li><li>@Table: lets you name the table explicitly (optional).</li><li>@Id: marks the primary key. Every entity needs one.</li><li>@GeneratedValue: lets the database auto-generate the ID. Optional, but common. Skip it if you want to assign IDs yourself. Keep in mind that auto-generation needs a numeric ID (like Long) or a UUID, so it doesn&#39;t fit the “String” IDs like “4” we sent from Postman earlier. In that setup we assign the IDs ourselves and leave @GeneratedValue out.</li><li>@ManyToOne: many records point to one parent (many orders belong to one customer). It&#39;s usually paired with @JoinColumn to define the foreign key.</li></ul><h4>Why the repository is an interface</h4><p>This one bugged me. Why is TopicRepository an <em>interface</em> and not a class?</p><pre>public interface TopicRepository extends CrudRepository&lt;Topic, String&gt; {<br>}</pre><p>Because <strong>Spring Data JPA writes the implementation for you.</strong> You only declare what you need. Spring figures out <em>how</em>. If it were a class, you’d have to write every CRUD method yourself, over and over, for every repository.</p><p>The two generics tell Spring everything it needs: Topic is the entity, and String is the type of its ID. (It&#39;s not an enum either, since enums are for fixed constants like ADMIN, USER, GUEST and have nothing to do with data access.)</p><h4>Which database?</h4><p>Using an in-memory database is highly beneficial during the learning phase. H2 is a relational database written entirely in Java that can run in-memory alongside your application. You might also encounter Apache Derby in older tutorials; however, the Apache Derby project was retired on October 10, 2025, meaning development and bug-fixing efforts have ceased. Therefore, I recommend using H2 for learning purposes and a production-ready database like PostgreSQL for real-world applications.</p><p>In the ‘pom.xml’ file, each dependency is defined by its ‘groupId’ (usually specifying the organization publishing the library or project), ‘artifactId’ (the name of the library or component), and — optionally — its ‘scope’. For instance, the ‘runtime’ scope indicates that the dependency is required while the application is running but is not directly needed during the compilation phase.</p><p>If you are wondering what to include in the ‘application.properties’ file, you can consult Spring Boot’s official Common Application Properties reference. This file can be used to centrally manage various configuration options, such as the ports, database connection, log levels, and more.</p><h4>Bonus: Spring Boot Actuator</h4><p>Actuator gives you production-ready insight into your app: health, metrics, thread dumps, log levels. Add the spring-boot-starter-actuator dependency, call GET /actuator/health, and you get:</p><pre>{ &quot;status&quot;: &quot;UP&quot; }</pre><p>Spring Boot Actuator is used for liveness and readiness checks in Kubernetes, metric monitoring via tools like Prometheus and Grafana, and alerting mechanisms.</p><p>One important point to note is that: by default, only the health endpoint is exposed via HTTP. To make other endpoints (such as metrics, thread dumps, etc.) accessible via HTTP, you must explicitly expose them in ‘application.properties’. Additionally, you must secure these endpoints before deploying to production, as they can reveal sensitive and detailed information about your application.</p><p>At first glance, Spring Boot might seem like a lot of “magic,” but in reality, it simply boils down to well-chosen default settings and a handful of annotations. Once you realize this, the intimidating aspect largely disappears.</p><p>These are my own notes and observations, so the order of the topics — or some of the details covered — may differ from other Spring Boot resources, and there may certainly be things I’ve missed. If you found this article helpful — or if you spotted any errors — please let me know in the comments.I’m always happy to learn and improve!</p><h4>References</h4><ul><li><a href="https://docs.spring.io/spring-boot/reference/actuator/endpoints.html">https://docs.spring.io/spring-boot/reference/actuator/endpoints.html</a></li><li><a href="https://docs.spring.io/spring-boot/reference/data/sql.html">https://docs.spring.io/spring-boot/reference/data/sql.html</a></li><li><a href="https://docs.spring.io/spring-boot/cli/using-the-cli.html">https://docs.spring.io/spring-boot/cli/using-the-cli.html</a></li><li><a href="https://docs.spring.io/spring-boot/system-requirements.html">https://docs.spring.io/spring-boot/system-requirements.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=294c0dbe91e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Learning]]></title>
            <link>https://medium.com/@suleakca/deep-learning-7ae4159a94e7?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ae4159a94e7</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 11:46:52 GMT</pubDate>
            <atom:updated>2026-04-20T11:59:38.297Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Hello! This article is a structured and simplified version of my personal notes taken while studying the </em><a href="https://www.coursera.org/professional-certificates/ai-engineer"><em>IBM AI Engineering course on Coursera</em></a><em>, written to reinforce my understanding of deep learning concepts.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bs4p5VyqY0t0lXyORphFBQ.png" /><figcaption>Image generated by the ChatGPT</figcaption></figure><h4>Short Summary of Deep Learning</h4><p>Deep learning is a subfield of machine learning based on artificial neural networks that can automatically learn complex patterns within large datasets.</p><p>In traditional machine learning approaches, features are typically designed manually by humans, whereas deep learning models learn these features from the data themselves.</p><p>This approach yields highly successful results, particularly with large-scale and complex data types (such as images, audio, and text). So where is it used?</p><ol><li>Image processing</li><li>Speech recognition and processing</li><li>Natural language processing (NLP)</li><li>Time series forecasting</li><li>Chatbots and generative AI systems</li></ol><p>Let’s briefly discuss what the popular deep learning libraries are.</p><ol><li>Tensorflow: Developed by Google in 2015, it is a popular framework widely used in both research and production environments.</li><li>PyTorch: It is a framework developed by Meta that supports GPUs and, thanks to its dynamic computation graph structure, is particularly popular in the field of research.</li><li>Keras: It is a high-level API that simplifies the creation of deep learning models and is currently used as part of TensorFlow.</li><li>Theano: It’s actually older than the others, but it’s no longer supported.</li></ol><blockquote>While TensorFlow is preferred for large-scale projects, PyTorch is preferred when more flexible model design is required.</blockquote><h4>Deep Learning Models</h4><p><strong><em>Convolutional Neural Networks (CNN)</em></strong></p><p>CNNs are one of the most important architectures in AI and have revolutionized image processing in particular. So, what tasks do CNNs generally excel at?</p><ul><li>Image classification</li><li>Object detection</li><li>Medical image analysis</li><li>Autonomous vehicles</li><li>Image segmentation</li><li>Video analysis</li></ul><p>So why was CNN invented? Why wasn’t the Dense layer enough? If we feed an image into a Dense layer, for example, a 28×28 image becomes 784 inputs, while a 256×256 image becomes 65,536 inputs. This results in an excessively large number of weights and makes it difficult for the model to learn. Additionally, the Dense layer does not understand the image’s neighborhood relationships (spatial structure). This is exactly where CNN comes into play.</p><p>CNN has three main sections.</p><ol><li>Convolution Layer: This layer passes a small filter (kernel) over the image. The goal is to identify features in the image. For example, a kernel can detect edges, corners, and textures. In this way, the model learns meaningful patterns in the image on its own.</li><li>Pooling Layer: This layer downsamples the image and simplifies the data. The goal is to reduce computational costs, preserve important information, and reduce noise.</li><li>Flatten + Dense Layers: Toward the end, the output of the “image-understanding” CNN layers is flattened. At this point, classification is performed based on the features generated by the CNN.</li></ol><p><strong><em>Recurrent Neural Networks (RNN)</em></strong></p><p>An RNN is a type of neural network used for problems involving sequential data. In short, past information influences the future. For example, if the input is “What word is currently present?”, the memory asks, “What was the previous word? And the one before that?” It takes a new word, combines it with the previous memory, and creates a new memory. This allows it to learn context.</p><p>RNNs don’t just take new input but also take the output from the previous data point as input. RNNs are good at modeling patterns and sequences of data, such as texts, genomes, handwriting and stack markets.</p><p>Populer type of RNN is the long short-term memory model (LSTM). LSTM is a specialized type of RNN designed to address the “forgetting” problem in long sequential data. RNNs struggle to retain past information in long sequences or time series (vanishing gradient). LSTM, however, incorporates a memory management mechanism that makes decisions on its own regarding what to retain, what to forget, and what to update. As a result, LSTM remembers long sequences and long-term dependencies much more effectively.</p><p>LSTMSs are used for applications such as image generation, handwriting generation, automatic image captioning, and automatic video descriptions.</p><p><strong><em>Transformers</em></strong></p><p>Transformers are a neural network architecture designed to process sequential data (sentences, words, audio, image segments, etc.). Ideal for, machine translation, text summarization, question answering, text to image generation etc. Some types of transformers are, GPT, BERT and Image Transformers.</p><p>Transformers do not process data step by step in sequence, like RNNs or LSTMs. Instead, they process the entire input simultaneously. The mechanism that makes this possible is the attention mechanism. Transformers use the self-attention mechanism to process text data. The way it works is simply as follows.</p><p>Three vectors are calculated for each word;</p><ul><li>Query: The word is the question “Who am I looking for?”</li><li>Key: It is the knowledge of “Who am I?”</li><li>Value: It is the information contained in the word.</li></ul><p>Self-attention works by comparing a word’s query with the keys of other words. This determines the connection strength. This connection strength is then multiplied by the value. In this way, the word “generates context information” from the other words.</p><p>In addition to self-attention, Transformer architectures also utilize a cross-attention mechanism. While self-attention learns the relationships between words within the same sequence, cross-attention allows the model to incorporate information from a different source. In tasks such as machine translation, the decoder produces more accurate predictions by taking into account the output from the encoder.</p><p><strong><em>Autoencoders</em></strong></p><p>It is an unsupervised deep learning model. It is a data compression algorithm, and these algorithms are data-specific. In short, it is an artificial neural network that can compress (encode) input data and then reconstruct it (decode) in a way that closely resembles the original. The encoder transforms the data into a low-dimensional representation (latent space), while the decoder reconstructs the data from this representation. The goal is to minimize the difference between the input and output (typically using MSE). Applications include dimensionality reduction, image restoration, etc.</p><blockquote><em>This is just a small step in my deep learning journey, and I’ll continue building on it as I learn and grow. Thanks for reading!</em></blockquote><p>If you enjoyed this post, feel free to give it a clap 👏 (up to 50 times).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ae4159a94e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Software Systems: Library Automation System]]></title>
            <link>https://medium.com/@suleakca/designing-software-systems-library-automation-system-f5ca14280653?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5ca14280653</guid>
            <category><![CDATA[activity-diagram]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[use-case-diagram]]></category>
            <category><![CDATA[uml-diagrams]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Sun, 12 Jan 2025 17:09:14 GMT</pubDate>
            <atom:updated>2025-01-12T17:54:00.084Z</atom:updated>
            <content:encoded><![CDATA[<p>In software development, understanding and visualizing the architecture of a system is a fundamental step towards building a successful solution. Architectural diagrams provide a clear blueprint of how different components interact and help identify potential challenges early on. Similarly, an accurate definition of system requirements is essential to ensure that the final product meets user expectations and functional needs. In this article, I will share my experience in architectural design and requirements definition for a small Library Automation System (LAS). I hope this can help you understand the basics of designing software systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rx1FMF2BnRgwNugMP5oHzw.png" /></figure><blockquote>Use Case Diagrams</blockquote><p>A Use Case Diagram in Unified Modeling Language (UML) serves as a graphical tool to depict the interactions between a system and its users (actors). It outlines the system’s functional requirements by illustrating how different users interact with specific use cases, representing distinct functionalities of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EHzInHn8hlu0KI5T07uJ3Q.png" /><figcaption>Sample use case diagram for LAS</figcaption></figure><blockquote>Sequence Diagrams</blockquote><p>A sequence diagram is a type of UML (Unified Modeling Language) diagram used in software engineering to model the interaction between objects or components in a system over time. It shows how processes operate and interact with each other through the exchange of messages in a sequential order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hj3K3lSfA4m4nAh2opyOdw.png" /><figcaption>Sample sequence diagram for LAS</figcaption></figure><blockquote>Activity Diagrams</blockquote><p>An activity diagram is a behavioral diagram in software engineering that represents the workflow or activities of a system. It is a type of UML (Unified Modeling Language) diagram that illustrates the flow of control or data from one activity to another. Activity diagrams are often used to model the dynamic aspects of a system, such as business processes, software processes, or system behavior. I am adding sample diagram for one process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*Ez7h7BVCN_1oDycLUGGxjQ.png" /><figcaption>Sample activity diagram for search process of LAS</figcaption></figure><h3><strong>Solution Design Document</strong></h3><p>A Solution Design Document<strong> </strong>is a detailed technical document that outlines how a software solution will be implemented to meet the requirements of a project. It serves as a bridge between the requirements phase and the implementation phase, ensuring that the development team has a clear understanding of the architecture, components, and functionality they need to build.</p><p>I will try to show an example of how to create a basic Solution Design Document.</p><h4><strong>1.</strong> Introduction</h4><p>This Library Automation System is designed for the university to make effectively management and to automate various library services; book lending, book reservation, and book and periodical search services. The system’s goal is to guarantee a user-friendly experience for staff, faculty members, graduates and students while offering effortless access to library resources.</p><h4><strong>2.</strong> Requirements</h4><blockquote>2.1. Functional Requirements</blockquote><ul><li>System should be recognized for users’ smart cards.</li><li>It should be differentiated between librarian and regular user roles.</li><li>Librarians should be able to add, edit, and delete books from the catalog.</li><li>System should be recognized for PIN codes.</li><li>Users should be able to search for books by title, author.</li><li>Users should be able to borrow book via Kiosk.</li><li>Users should be able to borrow book via personnel.</li><li>Users should be able to reserve book via Kiosk.</li><li>Users should be able to reserve book via personnel.</li><li>Librarian should check book availability.</li><li>User should be able to extend due date for books.</li><li>User should be able to bill if due date passed.</li><li>Graduates type user should be pay annual fee.</li><li>User should be notified by e-mail system after reservation.</li><li>System should cancel reservation after book is not picked up within 2 days</li></ul><blockquote>2.2. Nonfunctional Requirements</blockquote><ul><li>The system should respond to user actions within 2 seconds.</li><li>The database should handle a minimum of 10,000 concurrent transactions.</li><li>The system should be scalable.</li><li>The user interface should have a user-friendly interface for easy to use.</li><li>The user interface should be intuitive.</li><li>System (web side) should be compatible with different web browsers.</li><li>The system should support ability to handle multiple users.</li><li>The system should comply data security.</li><li>User information’s should be securely stored.</li><li>Regular backups should be performed to prevent data loss.</li></ul><h4><strong>3.</strong> Architecture</h4><p>This system is a web-based so it is built on a three-tier architecture.</p><ul><li>Presentation Layer</li><li>Business Logic Layer</li><li>Data Layer</li></ul><h4><strong>4.</strong> Technologies</h4><ul><li>Programming Languages: Java, .Net, JavaScript</li><li>Databases: PostgreSQL</li><li>Front-End Technologies: HTML, CSS, JavaScript libraries (Bootstrap)</li></ul><h3>REFERENCES</h3><ul><li><a href="https://www.geeksforgeeks.org/use-case-diagram/">https://www.geeksforgeeks.org/use-case-diagram/</a></li></ul><p>Thanks for reading! If you enjoyed my post, please give it a clap 👏 (up to 50 times) for more contents.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5ca14280653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Recommender Systems]]></title>
            <link>https://medium.com/@suleakca/recommender-system-684b80c9f0eb?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/684b80c9f0eb</guid>
            <category><![CDATA[online-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[recommender-systems]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 17:05:14 GMT</pubDate>
            <atom:updated>2026-10-04T11:35:43.405Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital age, personalization is key. Whether we’re shopping online, streaming our favorite shows, or scrolling through social media, the recommendations we receive play a crucial role in shaping our experiences. Recommender systems, also known recommendation systems, are the engines behind these personalized suggestions, helping companies enhance user engagement and satisfaction.</p><p>I did a survey study paper about recommender systems in e-learning and I reviewed many articles about this topic. Now, here I want to share literature review part of that study because I think it can help you to understand the basics of Recommender Systems. I’m also sharing all articles in references part. You can also check that articles. Hope, you enjoy and it helps you!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zq7NOg-zFZBpi1FojL9wzg.png" /></figure><h4>Definition of Recommender Systems</h4><p>In order to address the increasing issue of online information overload and improve customer relationship management, recommender systems are designed to offer customers tailored recommendations for online goods and services (Lu, et al., 2015). Recommendation systems are becoming more and more common in a wide range of application areas, including financial markets, social networks, e-commerce, news, movie and music recommendations, and tourism (Kulkarni &amp; Rodd, 2020).</p><p>It attempts to lessen users’ efforts in searching the typically vast and unknown item space by suggesting appropriate products to them based on their interests, and, in order to understand user preferences for the performance of recommendations, today’s recommendation systems are using certain techniques and models (Kulkarni &amp; Rodd, 2020). Since the mid-1990s, different recommendations systems techniques have been suggested and in recent years more recommended system software has been developed for a number of applications (Lu, et al., 2015).</p><h4>Types of Recommender Systems</h4><p>There are broadly 3 main recommender systems technique: collaborative filtering, content-based filtering and hybrid filtering technique as seen in Figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*1UAUHHl0odS1DxRgFbDipw.png" /><figcaption>Figure 1. Types of Recommendation Systems (Roy &amp; Dutta, 2022)</figcaption></figure><p><strong><em>Content-based filtering;</em> </strong>content-based filtering CBF, also known as “cognitive filtering”, recommends items by considering both the user profile and user’s item profile. When a user creates an account, and starts to use the system, these types of profiles will be set up as early as possible. Stronger user profiles are created as a result of increased user interaction with the system. Here, the user’s information alone — rather than that of other, comparable users — is sufficient, so very little information is required for a recommendation (Shah, Gaudani &amp; Balani, 2016).</p><p><strong><em>Collaborative filtering;</em></strong> a domain-independent prediction method for media like music and movies that is difficult or impossible for metadata to adequately describe is called collaborative filtering. The process of creating a database (user-item matrix) of user preferences for items is how the collaborative filtering technique operates (Isınkaye, Folajimi &amp; Ojokoh, 2015). Recommendations are made to users in collaborative filtering techniques based on their own behavior as well as the behavior of other users who exhibit similar characteristics (Patel, Desai &amp; Panchal, 2017). Collaborative filtering can be subclassified as a model-based and memory-based filtering. Memory-based approaches ponder neighborhood preferences when recommending new items, and this approach, the first step of which is to create a model, make use of the utility matrix directly for prediction (Roy &amp; Dutta, 2022). Additionally, Memory-based collaborative filtering again divided as user-based (Figure 2) and item-based approach (Figure 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*oRLfg_LpKVCxSQYtmVBN8Q.png" /><figcaption>Figure 2. User-based collaborative filtering (Roy &amp; Dutta, 2022)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*b974BBuDSTJEkqbaqXXOXA.png" /><figcaption>Figure 3. Item-based collaborative filtering (Roy &amp; Dutta, 2022)</figcaption></figure><p>Model-based systems employ various machine learning and data mining techniques to establish a model for predicting a user’s rating for an unrated item, and also when generating recommendations, the process does not depend on the whole dataset; instead, it extracts features from the dataset to create a model (Roy &amp; Dutta, 2022).,</p><p><strong><em>Hybrid filtering; </em></strong>Hybrid-based approach that combines various techniques such as content-based methods and collaborative filtering, is often driven by the desire to enhance the quality of recommendations and mitigate limitations of individual methods (del Carmen Rodríguez-Hernández &amp; Ilarri, 2021).</p><p>Besides these mainly approaches, also there is knowledge-based approache in RS. Knowledge-based recommender methods help overcome challenges by incorporating explicit user preferences and deep domain knowledge in recommendation process, utilizing sources of knowledge not exploited by content-based filtering and collaborative filtering approaches (Felfernig et al., 2015).</p><p>Let’s give an example area for recommender systems.</p><h4>Recommender Systems in E-learning</h4><p>With the development of the e-learning field, there are many platforms and course content where users can receive training. Since there are many users of e-learning platforms and their backgrounds, abilities, and personalities vary, personalization is becoming a crucial component of these systems (Ivanovic et al., 2015). So, in the realm of e-learning, recommender systems are crucial in helping to solve the issue of information overload (Tarus et al., 2017). Overall structure of an e-learning content recommender system is demonstrated in Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*JxXK_mISqshTx70Dp3Tf8Q.png" /><figcaption>Figure 4. Framework of e-learning content recommender system (Joy et al., 2021)</figcaption></figure><h3>REFERENCES</h3><p>Lu, J., Wu, D., Mao, M., Wang, W., &amp; Zhang, G. (2015). Recommender system application developments: a survey. <em>Decision support systems</em>, <em>74</em>, 12–32.</p><p>Kulkarni, S., &amp; Rodd, S. F. (2020). Context Aware Recommendation Systems: A review of the state of the art techniques. <em>Computer Science Review</em>, <em>37</em>, 100255.</p><p>Roy, D., &amp; Dutta, M. (2022). A systematic review and research perspective on recommender systems. <em>Journal of Big Data</em>, <em>9</em>(1), 59.</p><p>Shah, L., Gaudani, H., &amp; Balani, P. (2016). Survey on recommendation system. <em>International Journal of Computer Applications</em>, <em>137</em>(7), 43–49.</p><p>Isinkaye, F. O., Folajimi, Y. O., &amp; Ojokoh, B. A. (2015). Recommendation systems: Principles, methods and evaluation. <em>Egyptian informatics journal</em>, <em>16</em>(3), 261–273.</p><p>Patel, B., Desai, P., &amp; Panchal, U. (2017, March). Methods of recommender system: A review. In <em>2017 international conference on innovations in information, embedded and communication systems (ICIIECS)</em> (pp. 1–4). IEEE.</p><p>del Carmen Rodríguez-Hernández, M., &amp; Ilarri, S. (2021). AI-based mobile context-aware recommender systems from an information management perspective: Progress and directions. <em>Knowledge-Based Systems</em>, <em>215</em>, 106740.</p><p>Felfernig, A., Friedrich, G., Jannach, D., &amp; Zanker, M. (2015). Constraint-based recommender systems. <em>Recommender systems handbook</em>, 161–190.</p><p>Tarus, J. K., Niu, Z., &amp; Kalui, D. (2018). A hybrid recommender system for e-learning based on context awareness and sequential pattern mining. <em>Soft Computing</em>, <em>22</em>, 2449–2461.</p><p>Joy, J., Raj, N. S., &amp; VG, R. (2021). Ontology-based E-learning content recommender system for addressing the pure cold-start problem. <em>ACM Journal of Data and Information Quality</em>, <em>13</em>(3), 1–27.</p><p>Klašnja-Milićević, A., Ivanović, M., &amp; Nanopoulos, A. (2015). Recommender systems in e-learning environments: a survey of the state-of-the-art and possible extensions. <em>Artificial Intelligence Review</em>, <em>44</em>, 571–604.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=684b80c9f0eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Security]]></title>
            <link>https://medium.com/@suleakca/cloud-security-8e3bc59a6c80?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e3bc59a6c80</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Sat, 05 Oct 2024 11:23:18 GMT</pubDate>
            <atom:updated>2024-10-05T11:23:18.568Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everybody! In my last post, I tried to tell cloud basics and now here is my new post! In this blog, I am going to try to explain what is cloud security, its threats and attacks using some research papers/articles. Hope, it helps you. Let’s start!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*RpFSkZQl797erzpLHtMtmQ.png" /></figure><h4>What is Cloud Security?</h4><p>Cloud security is a collection of procedures and technology designed to address external and internal threats to business security. Organizations need cloud security as they move toward their digital transformation strategy and incorporate cloud-based tools and services as part of their infrastructure.</p><h4><strong>Importance of Cloud Security</strong></h4><p>I prepared it as a table and pasted as a picture here. I think, in this way, it seems that it’s a little bit more clear :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fdleifMW6CX3wt952AXc9g.png" /></figure><h4><strong>Security Challenges for Cloud Computing</strong></h4><blockquote>1. <strong>Data security</strong></blockquote><p>The cloud service providers are primary targets of attackers and become victims for data breaches. Here, sensitive information can be exposed to any unauthorized entity.</p><blockquote>2. <strong>Non-compliance with regulatory mandates</strong></blockquote><p>The non-compliance with regulatory mandate can result into major financial loss, criminal penalties, lawsuit and also loss of business.</p><blockquote>3. <strong>Loss of control</strong></blockquote><p>The data is present into different administrative domain hence the organizations face fear of loss of control over their data. The complete responsibility of managing the data is handed over to the service provider. The organizations have to trust and rely on the service provider.</p><blockquote>4. <strong>Expertise of IT and business managers</strong></blockquote><p>The IT and business professional of any organizations must possess necessary technical skillsets while moving towards cloud computing.</p><blockquote>5. <strong>Compromised accounts or insider threats</strong></blockquote><p>According to survey 92% of companies face problem of compromised account credentials over darknet.</p><blockquote>6. <strong>Disaster management</strong></blockquote><p>The company should have a proper disaster recovery planning so that it will not lose entire data and can find alternative storage for the data.</p><h4><strong>Cloud Security Threats</strong></h4><blockquote><strong>Data Breach/Loss</strong></blockquote><p>An improperly designed cloud computing environment with multiple clients is at higher risk to a data breach as a fault in one user’s application cloud allow attackers to access other user’s data.</p><blockquote><strong>Malicious Insiders</strong></blockquote><p>Malicious insiders are disgruntled current/former employees, contractors or other business partners who have/had authorized access to cloud resources and could intentionally exploit that access to compromise the integrity, availability or confidentiality of the organization’s data.</p><blockquote><strong>Illegal Access to the Cloud</strong></blockquote><p>Weak authentication and authorization controls could lead to unlawful access thereby compromising confidential and critical data stored in the cloud.</p><blockquote><strong>Abuse and Nefarious Use of Cloud services</strong></blockquote><p>Presence of fragile authentication systems in the cloud-computing gives rise to this threat.</p><blockquote><strong>Insecure Interfaces and APIs</strong></blockquote><p>APIs or Interfaces enable users to interact and manage with cloud applications or services. Cloud models must be security integrated and customers should be familiar with security risks in the use, application, and monitoring of it.</p><p>And here is the table that shows the details of some threats. I added here as a picture because I think, in this way, it’s more clear!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*fBbYjEH20uXF-XQ4pqb-nw.png" /><figcaption>Singh, A., &amp; Chatterjee, K. (2017). Cloud security issues and challenges: A survey. <em>Journal of Network and Computer Applications</em>, <em>79</em>, 88–115.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fuKnW6fNAmskMxFEmd8QAQ.png" /><figcaption>Singh, A., &amp; Chatterjee, K. (2017). Cloud security issues and challenges: A survey. <em>Journal of Network and Computer Applications</em>, <em>79</em>, 88–115.</figcaption></figure><h4><strong>Cloud Security Attacks</strong></h4><p>Besides threats, there are also attacks types for cloud.</p><blockquote><strong>Service Hijacking using Network Sniffing</strong></blockquote><p>Network sniffing involves interruption and surveilling of network traffic between two cloud nodes. Unencrypted sensitive data (such as login credentials) during transmission across a network is at higher risk.</p><blockquote><strong>Domain Name System Attacks</strong></blockquote><p>The attacker performs DNS attacks to obtain authentication credentials from Internet users.</p><blockquote><strong>Backdoor channel attack</strong></blockquote><p>This attack allows the attackers to access remote system programs in the victim resource systems.</p><blockquote><strong>Man-in-the-Cloud (MITC) Attack</strong></blockquote><p>In the MITM attacks, an attacker uses an exploit that intercepts and manipulates the communication between two parties while the MITC attacks are carried out by abusing cloud files synchronization services such as One Drive for Data compromise, command and control (C&amp;C), remote access.</p><blockquote><strong>Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks</strong></blockquote><p>On cloud service providers, conducting Denial of Service (DoS) attacks may leave users without access to their accounts.</p><p>And here is the table that shows the details of some attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEJF5b2Y2Rc2DjffwrKUtQ.png" /><figcaption>Singh, A., &amp; Chatterjee, K. (2017). Cloud security issues and challenges: A survey. <em>Journal of Network and Computer Applications</em>, <em>79</em>, 88–115.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiQMmobfOSh4tkatHQemIQ.png" /><figcaption>Singh, A., &amp; Chatterjee, K. (2017). Cloud security issues and challenges: A survey. <em>Journal of Network and Computer Applications</em>, <em>79</em>, 88–115.</figcaption></figure><h4><strong>Cloud Security Tools and Technologies</strong></h4><p>Using the appropriate security tools and technologies is essential to guard against cyber threats and preserve sensitive data as more businesses shift their data and applications to the cloud. There are some tools and techs for it. I just put three sample in here.</p><blockquote><strong>Firewalls</strong></blockquote><p>Utilize firewalls to monitor and control inbound and outbound network traffic to prevent unauthorized access.</p><blockquote><strong>Identity &amp; Access Management (IAM)</strong></blockquote><p>Implement IAM solutions to manage user identities, access permissions, and authentication in the cloud ecosystem.</p><blockquote><strong>Intrusion Detection Systems (IDS)</strong></blockquote><p>Deploy IDS to detect and respond to potential security threats and breaches within cloud environments.</p><h4>References</h4><ol><li>Bhajantri, L. B., &amp; Mujawar, T. (2019, December). A survey of cloud computing security challenges, issues and their countermeasures. In <em>2019 Third International conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud)(I-SMAC)</em> (pp. 376–380). IEEE.</li><li>Patel, A., Shah, N., Ramoliya, D., &amp; Nayak, A. (2020, November). A detailed review of cloud security: issues, threats &amp; attacks. In <em>2020 4th International conference on electronics, communication and aerospace technology (ICECA)</em> (pp. 758–764). IEEE.</li><li>https://www.ibm.com/topics/cloud-security</li></ol><p>Thanks for reading! If you enjoyed my post, please give it a clap 👏 (up to 50 times) for more contents.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e3bc59a6c80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Computing]]></title>
            <link>https://medium.com/@suleakca/cloud-computing-23eb96c5422d?source=rss-603d0966d459------2</link>
            <guid isPermaLink="false">https://medium.com/p/23eb96c5422d</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Şule Akça]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 13:39:37 GMT</pubDate>
            <atom:updated>2024-10-05T11:09:22.756Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everybody! In this blog, I’m going to try to tell general main information about “Cloud Computing”. Hope, it helps you! Let’s start!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pglSUsEThY4G_AAHdUddRA.png" /></figure><h3><strong><em>What is Cloud?</em></strong></h3><p>Basically, the “<em>cloud</em>” or, more specifically, “<em>cloud computing</em>” refers to the process of accessing resources, software, and databases over the Internet and outside the confines of local hardware restrictions.</p><p>Most cloud solutions are built on virtualization technology, which abstracts physical hardware as a layer of virtualized resources for processing, memory, storage, and networking. Many cloud solutions add further layers of abstraction to define specific services that you can provision and use.</p><p>The National Institute of Standards and Technology has identified that they exhibit the following five characteristics: <em>On-demand self-service, Broad Network Access, Resource pooling, Rapid elasticity, Measured service</em>.</p><h3><strong>Deployment Models of Cloud</strong></h3><p>Cloud computing uses three main deployment models:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B5_ceoUtHkQWVhEbLExM_A.png" /><figcaption><a href="https://www.isquarebs.com/blog/different-types-of-cloud-computing-services-an-explanatory/">https://www.isquarebs.com/blog/different-types-of-cloud-computing-services-an-explanatory/</a></figcaption></figure><p>Let’s explain these models one by one.</p><p><strong>Public Cloud:</strong> <em>Public clouds </em>are infrastructure, platform, or application services that a cloud service provider delivers for access and consumption by multiple organizations. With public cloud services, the organization that signs up for the service does not have the management overhead that the private cloud model requires.</p><p><strong>Private Cloud: </strong>Individual organizations privately own and manage <em>private clouds</em>. The organization manages and maintains the infrastructure for the private cloud in its datacenter.</p><p><strong>Hybrid Cloud: </strong>In a <em>hybrid cloud</em>, a technology binds two separate clouds (public and private) together for the specific purpose of obtaining resources from both. You decide which elements of your services and infrastructure to host privately and which to host in the public cloud.</p><h3><strong>Types of Cloud Computing</strong></h3><p>Now, let’s go deep into to cloud services and explain the types of Cloud Services. There are mainly 3 types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*ftGk4okYUnwl22-yGdx4Zg.png" /></figure><p><strong><em>SaaS: </em></strong>SaaS offerings consist of fully formed software apps that are delivered as cloud-based services. Users can subscribe to the service and use the app, normally through a web browser or by installing a client-side app. The primary advantage of SaaS services is that they enable users to easily access apps without the need to install and maintain them. Examples: Google Apps, Dropbox, Salesforce, Cisco WebEx, Concur, GoToMeeting.</p><p><strong><em>PaaS:</em></strong> PaaS offerings consist of cloud-based services that provide resources on which developers can build their own solutions. Typically, PaaS encapsulates fundamental operating system capabilities, including storage and compute, in addition to functional services for custom apps. Usually, PaaS offerings provide application programming interfaces (APIs), in addition to configuration and management user interfaces. Examples: AWS Elastic Beanstalk, Windows Azure, Heroku, Force.com, Google App Engine, Apache Stratos, OpenShift.</p><p><strong><em>IaaS:</em></strong> IaaS offerings provide virtualized server and network infrastructure components that can be easily provisioned and decommissioned as required. Typically, IaaS facilities are managed in a similar way to on-premises infrastructures and provide an easy migration path for moving existing apps to the cloud. Examples: DigitalOcean, Linode, Rackspace, Amazon Web Services (AWS), Cisco Metapod, Microsoft Azure, Google Compute Engine (GCE)</p><h3><strong>Advantages of Cloud Computing</strong></h3><p>1. <em>A managed datacenter:</em> With cloud computing, your service provider can manage your datacenter.</p><p>2. <em>Cost-efficiency</em>: With cloud computing, you pay for only the services that you use.</p><p>3. <em>Server consolidation:</em> You can consolidate servers across the datacenter by using the cloud computing model, because it can host multiple virtual machines on a virtualization host.</p><p>4. <em>Better flexibility and speed:</em> Cloud computing enables users to access their applications and data from anywhere with an internet connection.</p><p>5. <em>Enhanced Security:</em> Cloud providers invest heavily in security measures to protect their infrastructure and data centers.</p><h3>References</h3><ul><li>Pfleeger, C. P., Pfleeger, S. L., Margulies, J.(2015). <em>Security in Computing (5th Edition)</em>, United States: Person</li><li>https://www.ibm.com/topics/cloud-security</li></ul><p>Thanks for reading! If you enjoyed my post, please give it a clap 👏 (up to 50 times) for more contents.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23eb96c5422d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>