<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[SuhJae's Atheneum]]></title><description><![CDATA[Learning made fun]]></description><link>https://blog.suhjae.dev/</link><image><url>https://blog.suhjae.dev/favicon.png</url><title>SuhJae&apos;s Atheneum</title><link>https://blog.suhjae.dev/</link></image><generator>Ghost 5.84</generator><lastBuildDate>Mon, 06 Apr 2026 14:16:06 GMT</lastBuildDate><atom:link href="https://blog.suhjae.dev/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[12.c: Safeguarding Our Data with Encapsulation]]></title><description><![CDATA[<p>Welcome, coding educators and students! Today&apos;s lesson is akin to safeguarding the precious answers to the final exam, but in the world of coding. We&apos;re delving into the concept of Encapsulation in Object-Oriented Programming (OOP), a fundamental principle designed to protect the integrity of our data.</p>]]></description><link>https://blog.suhjae.dev/oop-encapsulation/</link><guid isPermaLink="false">65d1f857ed2904047be217da</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Fri, 26 Jan 2024 12:30:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1609770231080-e321deccc34c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEwfHxzZWN1cml0eXxlbnwwfHx8fDE3MDgxODc1Mjd8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1609770231080-e321deccc34c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEwfHxzZWN1cml0eXxlbnwwfHx8fDE3MDgxODc1Mjd8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="12.c: Safeguarding Our Data with Encapsulation"><p>Welcome, coding educators and students! Today&apos;s lesson is akin to safeguarding the precious answers to the final exam, but in the world of coding. We&apos;re delving into the concept of Encapsulation in Object-Oriented Programming (OOP), a fundamental principle designed to protect the integrity of our data. To bring this concept closer to home, let&apos;s design a critical piece of software that every student and teacher knows all too well: a grade book. &#x1F4DA;&#x2728;</p><h2 id="encapsulation-the-vault-of-your-grade-book"><strong>Encapsulation: The Vault of Your Grade Book</strong></h2><p>Encapsulation is like having a vault in your classroom that only the teacher has the key to. It allows us to control access to the data within our classes, ensuring that only valid, appropriate interactions occur. Just as you wouldn&apos;t want anyone tampering with exam scores, encapsulation helps prevent misuse of the class internals in your code.</p><h3 id="access-modifiers"><strong>Access Modifiers</strong></h3><p>Java offers four access modifiers to control the visibility of class members: <code>public</code>, <code>private</code>, <code>protected</code>, and default (no modifier). These are the keys to our vault, dictating who can access the grade book&apos;s data.</p><ul><li><strong><code>private</code></strong>: Only the class itself can access this data. It&apos;s the most restrictive and safe key, keeping the data secure from external tampering.</li><li><strong><code>public</code></strong>: Anyone can access this data. It&apos;s like leaving the vault open on the school&apos;s front lawn.</li><li><strong><code>protected</code></strong> and <strong>default</strong>: These offer levels of access between <code>private</code> and <code>public</code>, useful in specific scenarios, such as when working with subclasses or classes in the same package.</li></ul><h3 id="the-grade-book-example-encapsulation-in-action"><strong>The Grade Book Example: Encapsulation in Action</strong></h3><p>Let&apos;s design a simple <code>GradeBook</code> class that encapsulates student grades, ensuring that grades are only modified through controlled methods.</p><pre><code class="language-java">class GradeBook {
    private Map&lt;String, Integer&gt; grades; // Private: Accessible only within this class

    public GradeBook() {
        grades = new HashMap&lt;&gt;();
    }

    // Public method to add or update a grade: Controlled access
    public void setGrade(String student, Integer grade) {
        // Validation logic here (e.g., grade must be between 0 and 100)
        if (grade &gt;= 0 &amp;&amp; grade &lt;= 100) {
            grades.put(student, grade);
        } else {
            System.out.println(&quot;Invalid grade. Please enter a value between 0 and 100.&quot;);
        }
    }

    // Public method to get a grade: Controlled access
    public Integer getGrade(String student) {
        return grades.get(student);
    }
}
</code></pre><p>In this <code>GradeBook</code>, grades are stored in a <code>private</code> map, meaning they cannot be accessed or modified directly from outside the class. To interact with the grades, we provide <code>public</code> methods <code>setGrade</code> and <code>getGrade</code>, which act as the controlled gateways. This ensures that grades can only be modified in a valid, predefined way, protecting the integrity of our data.</p><h3 id="access-and-inheritance"><strong>Access and Inheritance</strong></h3><p>When it comes to inheritance, encapsulation still plays a crucial role. For instance, if we had a <code>SpecialGradeBook</code> class extending <code>GradeBook</code>, it could not directly access the <code>private</code> grades map of its parent. This reinforces the concept of controlled access, even within a family of classes.</p><h3 id="conclusion-the-power-of-encapsulation">Conclusion: The Power of Encapsulation</h3><p>Encapsulation in OOP, demonstrated through our <code>GradeBook</code> example, is akin to a teacher controlling access to the grade vault. It ensures that data remains valid, secure, and is manipulated only through well-defined pathways. By using access modifiers as keys, we can protect our data from misuse, much like how a teacher protects the integrity of grades.</p><p>As we wrap up today&apos;s lesson, remember that encapsulation isn&apos;t just about hiding data; it&apos;s about safeguarding the mechanisms by which our code&apos;s data interacts with the outside world. It&apos;s a fundamental principle that, when used wisely, can make our code more robust, secure, and trustworthy.</p><p>So, next time you&apos;re coding up a storm, consider encapsulation to be your personal vault, keeping your data safe and sound. Happy coding, and may your digital grade books always reflect the true, hard-earned achievements of your students!</p>]]></content:encoded></item><item><title><![CDATA[12.b: Mastering Inheritance with Doors and Desks]]></title><description><![CDATA[<p>Welcome back coders! Today, we&apos;re taking a closer look at how inheritance works in Object-Oriented Programming (OOP) and diving into the concept of overriding&#x2014;a vital skill that allows subclasses to express their uniqueness. Let&#x2019;s start our lesson in two familiar places within our school:</p>]]></description><link>https://blog.suhjae.dev/oop-inheritance/</link><guid isPermaLink="false">65d1e692ed2904047be21776</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Mon, 22 Jan 2024 11:14:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1533070691075-048acc138abb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fGRpdmVyZ2V8ZW58MHx8fHwxNzA4MjU3Mzk4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1533070691075-048acc138abb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fGRpdmVyZ2V8ZW58MHx8fHwxNzA4MjU3Mzk4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="12.b: Mastering Inheritance with Doors and Desks"><p>Welcome back coders! Today, we&apos;re taking a closer look at how inheritance works in Object-Oriented Programming (OOP) and diving into the concept of overriding&#x2014;a vital skill that allows subclasses to express their uniqueness. Let&#x2019;s start our lesson in two familiar places within our school: the Office and the Classroom. &#x1F3EB;&#x1F6AA;</p><h2 id="understanding-simple-inheritance-with-the-office"><strong>Understanding Simple Inheritance with the Office</strong></h2><p>In the vast, interconnected hallways of our school, every room inherits basic traits from the <code>SchoolRoom</code> class. Think of <code>SchoolRoom</code> it as the school building blueprint&#x2014;it defines the basic structure every room follows: walls, doors, and windows.</p><h3 id="the-office-a-subclass-example">The Office: A Subclass Example</h3><p>The Office is a simple yet perfect example to illustrate basic inheritance. It inherits the foundational features from <code>SchoolRoom</code>, but doesn&apos;t need to change or add much. Here&apos;s how it looks in code:</p><pre><code class="language-java">class SchoolRoom {
    int numberOfWalls = 4;
    int numberOfDoors = 1;
    int numberOfWindows;
    
    void roomDescription() {
        System.out.println(&quot;This room has &quot; + numberOfWalls + &quot; walls, &quot; 
                           + numberOfDoors + &quot; door, and &quot; 
                           + numberOfWindows + &quot; windows.&quot;);
    }
}

class Office extends SchoolRoom {
    // Inherits everything from SchoolRoom without any changes
}
</code></pre><p>The Office, by default, will have 1 door, as defined by its superclass, <code>SchoolRoom</code>. This straightforward inheritance shows how subclasses automatically acquire their superclass&apos;s characteristics without extra coding.</p><h2 id="overriding-in-action-with-the-classroom"><strong>Overriding in Action with the Classroom</strong></h2><p>Now, let&apos;s step into the Classroom, where the real magic of overriding comes to life. Unlike the Office, the Classroom has a unique feature: it has two doors instead of one. This is where it starts to differ from the <code>SchoolRoom</code> blueprint, demonstrating the power of overriding.</p><h3 id="the-classroom-overriding-the-superclass"><strong>The Classroom: Overriding the Superclass</strong></h3><p>To accommodate this difference, the Classroom subclass overrides the <code>numberOfDoors</code> attribute inherited from <code>SchoolRoom</code>. This is how we explicitly define what makes a Classroom unique:</p><pre><code class="language-java">class Classroom extends SchoolRoom {
    // Overriding the numberOfDoors attribute
    int numberOfDoors = 2;
    String subject;

    void subjectInfo() {
        System.out.println(&quot;This is a &quot; + subject + &quot; classroom.&quot;);
    }

    // Overriding the roomDescription() method to include subject information
    @Override
    void roomDescription() {
        super.roomDescription(); // Calls the superclass method
        System.out.println(&quot;This classroom is for &quot; + subject + &quot; and has &quot; + numberOfDoors + &quot; doors.&quot;);
    }
}
</code></pre><p>By setting <code>numberOfDoors</code> to 2, we override the original property from <code>SchoolRoom</code>, tailoring the Classroom to our specific needs. Furthermore, we override the <code>roomDescription()</code> method to include the basic description and add specific information about the subject and the unique number of doors.</p><p>This illustrates a crucial aspect of OOP: subclasses can modify inherited properties (attributes) and behaviors (methods) to reflect their specific characteristics, enhancing the versatility and reusability of code.</p><h3 id="bringing-it-all-together"><strong>Bringing It All Together</strong></h3><p>When we create a Classroom object and call its <code>roomDescription()</code> method, we&apos;ll see how it maintains the structure of <code>SchoolRoom</code> but adds its personalized touch, showcasing the concept of overriding in a simple, relatable manner.</p><pre><code class="language-java">public class School {
    public static void main(String[] args) {
        Classroom mathClass = new Classroom();
        mathClass.numberOfWindows = 3;
        mathClass.subject = &quot;Math&quot;;
        mathClass.roomDescription();
        // Output will illustrate the overridden number of doors and the added subject description
    }
}
</code></pre><hr><p>Our journey through the Office and Classroom within our code school has shed light on two pivotal concepts in OOP: inheritance and overriding. Through inheritance, subclasses gain the traits of their superclass, ensuring a consistent foundation across different types of rooms (classes). Overriding allows these subclasses to express their unique features and behaviors, tailoring the inherited blueprint to fit their specific needs.</p><p>Just as every room in a school serves a distinct purpose while adhering to the overall architecture, inheritance and overriding enable our code to be both uniform and uniquely specialized. So, next time you&apos;re coding, remember the lessons from our school of code. Let the principles of inheritance and overriding guide you to create flexible, reusable, and efficient code structures. Happy coding, and may your code be as organized and adaptable as the (best) planned school!</p>]]></content:encoded></item><item><title><![CDATA[12.a: Understanding Classes and Objects]]></title><description><![CDATA[<p>Hello, fellow coders! Today, we&apos;re diving into a topic that&apos;s as thrilling as sneaking a peek at your Instagram during a particularly snooze-worthy lecture. You know the drill: the art of swiping your MacBook screen from Instagram to IntelliJ with the stealth of a ninja as</p>]]></description><link>https://blog.suhjae.dev/oop-intro/</link><guid isPermaLink="false">65a9c78fed2904047be2170b</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Thu, 18 Jan 2024 09:07:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1557186955-7a3724eb310c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE1Nnx8b2JqZWN0cyUyMGNsdXR0ZXJlZHxlbnwwfHx8fDE3MDU2MjU2NDJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1557186955-7a3724eb310c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE1Nnx8b2JqZWN0cyUyMGNsdXR0ZXJlZHxlbnwwfHx8fDE3MDU2MjU2NDJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="12.a: Understanding Classes and Objects"><p>Hello, fellow coders! Today, we&apos;re diving into a topic that&apos;s as thrilling as sneaking a peek at your Instagram during a particularly snooze-worthy lecture. You know the drill: the art of swiping your MacBook screen from Instagram to IntelliJ with the stealth of a ninja as the teacher patrols the classroom. But, let&apos;s pivot from our expert-level social media evasion tactics to something equally engaging&#x2014;the world of Object-Oriented Programming (OOP), specifically classes and objects, through the lens of a simplified Instagram user profile. &#x1F4F1;&#x2728;</p><h2 id="oop-your-social-media-for-code"><strong>OOP: Your Social Media for Code</strong></h2><p>In the vast universe of programming, we&apos;ve been accustomed to sequential instructions&#x2014;the coding equivalent of a straight line from point A to B. However, OOP introduces us to a reality where programs are a bustling social network of objects. Imagine each object as an Instagram profile, encapsulating attributes (like your bio, followers count, and posts) and behaviors (like posting a new photo or sending a DM).</p><p>OOP gifts us a world where programs are more reliable, easier to understand, and reusable.</p><h2 id="classes-the-bio-template-of-your-insta-profile"><strong>Classes: The Bio Template of Your Insta Profile</strong></h2><p>A class in Java is like the template for your Instagram profile. It defines the structure&#x2014;your bio, posts, followers, and following count&#x2014;but doesn&apos;t hold the details. That&apos;s for the object, or the actual profile, to fill in. It&apos;s your blueprint, the DNA of your digital persona.</p><p>Here&apos;s how a class might look in our Instagram analogy:</p><pre><code class="language-java">class InstagramProfile {
    String username;
    int followers;
    int following;
    int posts;

    void postPhoto() {
        // code to post a new photo
    }
}
</code></pre><p>In this Instagram universe, our class doesn&apos;t need a main method. It&apos;s not the star of the show, but the behind-the-scenes director, setting the stage for the profiles (objects) to shine.</p><h2 id="objects-your-unique-insta-profile"><strong>Objects: Your Unique Insta Profile</strong></h2><p>Creating an object from our class is like setting up your Instagram profile. You fill in the details&#x2014;username, followers, and so on, making it uniquely yours.</p><pre><code class="language-java">InstagramProfile myProfile = new InstagramProfile();
</code></pre><p>Now, myProfile is an object, an instance of the InstagramProfile class. It&apos;s your corner of the Instagram universe, defined by the template but unique in its content.</p><h2 id="interacting-with-your-profile"><strong>Interacting with Your Profile</strong></h2><p>Once your profile (object) is set, you can start interacting with it. Want to increase your follower count or post a new photo? Your object&apos;s methods are at your disposal, ready to bring your digital social interactions to life.</p><pre><code class="language-java">myProfile.postPhoto();
</code></pre><p>This is the essence of using objects - they encapsulate data and behaviors, making your code more modular, understandable, and, dare we say, fun!</p><hr><p>So there you have it! Remember that understanding classes and objects is like mastering the art of the perfect Instagram profile. It&apos;s about creating a blueprint (class) and then filling it with your unique content (object) to share with the world (or, in our case, the program).</p><p>So, the next time you&apos;re about to switch tabs from Instagram to your Java homework, remember: you&apos;re not just moving from one task to another. You&apos;re transitioning from one world of objects to another, each with its own set of rules, interactions, and opportunities for creativity.</p>]]></content:encoded></item><item><title><![CDATA[11: 2D array == pow(fun, 2)]]></title><description><![CDATA[<h1 id="dive-into-the-wild-world-of-2d-arrays-the-kisj-edition">Dive into the Wild World of 2D Arrays: The KISJ Edition</h1><p>Hey there, KISJ coders! Are you ready to dive into the matrix? I mean, the world of 2D arrays in Java? Trust me, it&apos;s as thrilling as trying to sneak to the deli without a teacher, and</p>]]></description><link>https://blog.suhjae.dev/2d-array/</link><guid isPermaLink="false">65a9c2bced2904047be2169e</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Wed, 13 Dec 2023 00:33:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1544230067-510373762d24?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDMwfHxncmlkfGVufDB8fHx8MTcwNTYyNDUzOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<h1 id="dive-into-the-wild-world-of-2d-arrays-the-kisj-edition">Dive into the Wild World of 2D Arrays: The KISJ Edition</h1><img src="https://images.unsplash.com/photo-1544230067-510373762d24?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDMwfHxncmlkfGVufDB8fHx8MTcwNTYyNDUzOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="11: 2D array == pow(fun, 2)"><p>Hey there, KISJ coders! Are you ready to dive into the matrix? I mean, the world of 2D arrays in Java? Trust me, it&apos;s as thrilling as trying to sneak to the deli without a teacher, and this is the last concept to learn before the long good winter break.</p><h3 id="whats-a-2d-array-a-maze-of-numbers"><strong>What&apos;s a 2D Array? A Maze of Numbers!</strong></h3><p>Picture this: A 2D array is like having a stack of bento boxes, each box filled with delicious numbers instead of sushi! &#x1F371;</p><h3 id="declaring-a-2d-array-in-java"><strong>Declaring a 2D Array in Java</strong></h3><p>Declaring a 2D array in Java is easier than convincing STUCO members to smile during assembly. &#x1F605; Here&apos;s how you do it:</p><pre><code class="language-java">int[][] coolArray = new int[3][6];
</code></pre><p>This line is like saying, &quot;Hey Java, give me a 3&#xD7;6 grid of numbers!&quot; It is similar to how we declare a <a href="https://blog.suhjae.dev/array/">1D array</a>, but with extra &quot;[]&quot; to tell we are making a 2D array.</p><h3 id="initializing-a-2d-array">Initializing a 2D Array</h3><p>Now, let&apos;s fill this array like we&apos;re cramming knowledge before a pop quiz (or a &#x1F381;). It&apos;s like setting up your own little number buffet.</p><pre><code class="language-java">int[][] coolArray = {
	{1, 2, 3},
	{4, 5, 6}
};
</code></pre><h3 id="accessing-data-in-a-2d-array"><strong>Accessing Data in a 2D Array</strong></h3><p>Accessing data in a 2D array is like finding a teacher that you have never heard of in school. In that case, you will email them to know about what floor and what room they are in. Similarly, in a 2D array, we need to give two indexes&#x2014;the first one for selecting the array within the array we want to search, and the second one to find the element in the second array.</p><pre><code class="language-java">coolArray[0][2]
</code></pre><p>This is like saying, &quot;In the first row, give me the third number.&quot; Sneaky, right?</p><h3 id="looping-through-a-2d-array">Looping Through a 2D Array</h3><p>Looping through a 2D array is like the endless loop of reassessment requirements if you don&apos;t do your homework. (no assignments == no reassessment &#x1F632;) Here&apos;s how you loop:</p><pre><code class="language-java">int coolSum = 0;
for (int i = 0; i &lt; coolArray.length; i++) {
	for (int j = 0; j &lt; coolArray[i].length; j++) {
		coolSum += coolArray[i][j];
	}
}
</code></pre><p>Since we need two indexes, we need to use two for loops to loop through all the elements in the 2D array.</p><hr><p>So there you have it! 2D arrays in Java are not so different from 1D array. They might seem complicated at first, like figuring out the new grading policy, but once you get the hang of it, it&apos;s a piece of cake (or a piece of kimchi if you prefer).</p><p>Keep coding, and maybe one day you&apos;ll write an AI to automate STUCO presentations&#x2014;with genuine smiles! &#x1F604;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[The Mathematical Symbols Guiding Algorithmic Logic]]></title><description><![CDATA[<p>Hey KISJ coders! &#x1F680;As we continue to explore the vast landscape of computer science, it&apos;s important to appreciate the role of mathematics in developing our logical reasoning. Here, we&apos;re going to focus on a key aspect that often goes unnoticed but is vital for clear</p>]]></description><link>https://blog.suhjae.dev/math-logic/</link><guid isPermaLink="false">65486da591ff462ac6e352a6</guid><category><![CDATA[DevHacks101]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Mon, 06 Nov 2023 04:47:32 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1501876991173-f9c47cd28268?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGNoYWxrYm9hcmQlMjBtYXRofGVufDB8fHx8MTY5OTI0NTk5OXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1501876991173-f9c47cd28268?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGNoYWxrYm9hcmQlMjBtYXRofGVufDB8fHx8MTY5OTI0NTk5OXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="The Mathematical Symbols Guiding Algorithmic Logic"><p>Hey KISJ coders! &#x1F680;As we continue to explore the vast landscape of computer science, it&apos;s important to appreciate the role of mathematics in developing our logical reasoning. Here, we&apos;re going to focus on a key aspect that often goes unnoticed but is vital for clear communication in our field: mathematical symbols. These symbols are not just for mathematicians; they&apos;re essential tools for all of us in computer science&#x2014;and don&apos;t forget calculus&#x2014;to express complex ideas succinctly and precisely. Let&apos;s take a closer look at the notations that streamline our algorithms and proofs.</p><h3 id="basic-logical-connectives"><strong>Basic Logical Connectives</strong></h3><ul><li><strong>&#x2227;</strong> (AND): <code>(p &#x2227; q)</code> means both p and q must be true.</li><li><strong>&#x2228;</strong> (OR): <code>(p &#x2228; q)</code> means either p is true, q is true, or both are true.</li><li><strong>&#xAC;</strong> (NOT): <code>&#xAC;p</code> means p is not true.</li><li><strong>&#x2192;</strong> (Implication): <code>(p &#x2192; q)</code> means if p is true, then q must also be true.</li><li><strong>&#x2194;</strong> (Equivalence): <code>(p &#x2194; q)</code> means p is true if and only if q is true.</li></ul><h3 id="quantifiers"><strong>Quantifiers</strong></h3><ul><li><strong>&#x2200;</strong> (For all): <code>&#x2200;x &#x2208; &#x211D;, x&#xB2; &#x2265; 0</code> means for all real numbers x, the square of x is non-negative.</li><li><strong>&#x2203;</strong> (There exists): <code>&#x2203;x &#x2208; &#x211D;, x&#xB2; = 2</code> means there exists a real number x such that x squared equals 2.</li><li><strong>&#x2203;!</strong> (There exists exactly one): <code>&#x2203;!n &#x2208; &#x2115;, n + 5 = 10</code> means there exists exactly one natural number n such that n plus 5 equals 10.</li></ul><h3 id="set-theory"><strong>Set Theory</strong></h3><ul><li><strong>&#x2208;</strong> (Element of): <code>3 &#x2208; &#x2115;</code> means 3 is an element of the set of natural numbers.</li><li><strong>&#x2209;</strong> (Not an element of): <code>2/3 &#x2209; &#x2115;</code> means 2/3 is not an element of the set of natural numbers.</li><li><strong>&#x2282;</strong> (Subset of): <code>&#x2115; &#x2282; &#x2124;</code> means the set of natural numbers is a subset of the set of integers.</li><li><strong>&#x2286;</strong> (Subset or equal to): <code>&#x2124; &#x2286; &#x2124;</code> means the set of integers is a subset of or equal to itself.</li><li><strong>&#x2284;</strong> (Not a subset of): <code>{2, 3.5} &#x2284; &#x2115;</code> means the set containing 2 and 3.5 is not a subset of the natural numbers.</li><li><strong>&#x222A;</strong> (Union): <code>{1, 2} &#x222A; {2, 3} = {1, 2, 3}</code> means the union of the sets <code>{1, 2}</code> and <code>{2, 3}</code> is <code>{1, 2, 3}</code>.</li><li><strong>&#x2229;</strong> (Intersection): <code>{1, 2} &#x2229; {2, 3} = {2}</code> means the intersection of the sets <code>{1, 2}</code> and <code>{2, 3}</code> is <code>{2}</code>.</li><li><strong>&#x2205;</strong> (Empty set): <code>&#x2205;</code> is the set containing no elements.</li></ul><h3 id="relations"><strong>Relations</strong></h3><ul><li><strong>=</strong> (Equality): <code>sin&#xB2;(&#x3B8;) + cos&#xB2;(&#x3B8;) = 1</code> is the Pythagorean identity in trigonometry.</li><li><strong>&#x2260;</strong> (Inequality): <code>x&#xB2; &#x2260; -1</code> for any <code>x &#x2208; &#x211D;</code> since squares of real numbers are non-negative.</li><li><strong>&lt;</strong> (Less than): <code>e^x &lt; e^(x+1)</code> for all <code>x &#x2208; &#x211D;</code>.</li><li><strong>&gt;</strong> (Greater than): <code>n! &gt; n</code> for any <code>n &#x2208; &#x2115;</code> where <code>n &gt; 1</code>.</li><li><strong>&#x2264;</strong> (Less than or equal to): <code>x &#x2264; x&#xB2;</code> for all <code>x &#x2208; [1, &#x221E;)</code>.</li><li><strong>&#x2265;</strong> (Greater than or equal to): <code>x&#xB2; &#x2265; 0</code> for all <code>x &#x2208; &#x211D;</code>.</li><li><strong>&#x2248;</strong> (Approximately equal to): <code>&#x3C0; &#x2248; 3.14159</code>.</li><li><strong>&#x2261;</strong> (Identical to or congruent): <code>7 &#x2261; 3 (mod 4)</code> means 7 is congruent to 3 modulo 4.</li></ul><h3 id="proof-notation"><strong>Proof Notation</strong></h3><ul><li><strong>&#x2234;</strong> (Therefore): <code>&#x2200;x &#x2208; &#x211D;, x&#xB2; &#x2265; 0 &#x2234; x&#xB2; + 5 &#x2265; 5</code>.</li><li><strong>&#x2235;</strong> (Because): <code>x&#xB2; - 9 = 0 &#x2235; x = &#xB1;3</code>.</li><li><strong>&#x21D2;</strong> (Implies): <code>(x&#xB2; = 4) &#x21D2; (x = &#xB1;2)</code>.</li><li><strong>&#x21D0;</strong> (Implied by): <code>(x = &#xB1;2) &#x21D0; (x&#xB2; = 4)</code>.</li><li><strong>&#x21D4;</strong> (If and only if): <code>(n&#xB2; is even) &#x21D4; (n is even)</code> for any <code>n &#x2208; &#x2124;</code>.</li><li><strong>&#x220E;</strong> (End of proof): After demonstrating a proof, we conclude with <code>&#x220E;</code>.</li></ul><h3 id="miscellaneous"><strong>Miscellaneous</strong></h3><ul><li><strong>...</strong> (Ellipsis): Used in sequences, e.g., <code>1, 1/2, 1/4, 1/8, ...</code> converges to 0.</li><li><strong>:</strong> (Such that): <code>{x &#x2208; &#x211D; : x &gt; 0}</code> is the set of all x in &#x211D; such that x is greater than 0.</li><li><strong>&#x221E;</strong> (Infinity): <code>lim (1/n) as n &#x2192; &#x221E; = 0</code>.</li><li><strong>&#x223C;</strong> (Is similar to or has the property of): <code>f(x) &#x223C; g(x) as x &#x2192; &#x221E;</code> means f(x) is asymptotically similar to g(x).</li></ul>]]></content:encoded></item><item><title><![CDATA[10.b: The Secret Code of Algorithm Complexity and Big O]]></title><description><![CDATA[<p>Hey KISJ warriors! &#x1F575;&#xFE0F;&#x200D;&#x2640;&#xFE0F;&#x1F575;&#xFE0F;&#x200D;&#x2642;&#xFE0F; Remember that one time when you thought cramming the night before an exam was a good idea? It seemed simple until it wasn&apos;t. Well, in the digital world, algorithms sometimes face similar problems, and that&</p>]]></description><link>https://blog.suhjae.dev/complexity/</link><guid isPermaLink="false">653f684d91ff462ac6e3525f</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Tue, 24 Oct 2023 08:26:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1629135458283-0c69f7cead37?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDV8fGNvbXBsZXh8ZW58MHx8fHwxNjk4NjU0NDYwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1629135458283-0c69f7cead37?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDV8fGNvbXBsZXh8ZW58MHx8fHwxNjk4NjU0NDYwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="10.b: The Secret Code of Algorithm Complexity and Big O"><p>Hey KISJ warriors! &#x1F575;&#xFE0F;&#x200D;&#x2640;&#xFE0F;&#x1F575;&#xFE0F;&#x200D;&#x2642;&#xFE0F; Remember that one time when you thought cramming the night before an exam was a good idea? It seemed simple until it wasn&apos;t. Well, in the digital world, algorithms sometimes face similar problems, and that&apos;s where the enigmatic Big O comes into play.</p><h2 id="what-is-big-o-notation"><strong>What is Big O Notation</strong></h2><ul><li>Think of <strong>Big O Notation</strong> like a fortune-teller for algorithms, predicting their future behavior without getting bogged down in the nitty-gritty.</li></ul><h3 id="the-ladder-of-complexity"><strong>The Ladder of Complexity</strong></h3><figure class="kg-card kg-image-card"><img src="https://blog.suhjae.dev/content/images/2023/10/image.png" class="kg-image" alt="10.b: The Secret Code of Algorithm Complexity and Big O" loading="lazy" width="1463" height="1003" srcset="https://blog.suhjae.dev/content/images/size/w600/2023/10/image.png 600w, https://blog.suhjae.dev/content/images/size/w1000/2023/10/image.png 1000w, https://blog.suhjae.dev/content/images/2023/10/image.png 1463w" sizes="(min-width: 720px) 720px"></figure><ul><li><strong>Constant O(1)</strong>: This one&apos;s chill. No matter how much data, it&apos;s like, &quot;I got this.&quot;</li><li><strong>Linear O(n)</strong>: More data, more time. Like standing in line at your favorite boba place.</li><li><strong>Logarithmic O(log n)</strong>: The brainy one. It handles more data without breaking a sweat.</li><li><strong>Quadratic O(n^2)</strong>: Things start heating up. More data means much more time.</li><li><strong>Cubic O(n^3)</strong>: Like quadratic&apos;s big, intimidating cousin.</li><li><strong>Exponential O(2^n)</strong>: The drama queen. A little more data, and it throws a major fit.</li></ul><h3 id="a-glimpse-at-selection-sort"><strong>A Glimpse at Selection Sort</strong></h3><p>Picture sorting your playlist, dragging the best song to the start of the playlist and the second best to the second one and so on. That&apos;s kind of what Selection Sort does with data.</p><p><strong>Steps</strong>:</p><ol><li><strong>Scout the Smallest</strong>: Hunt down the tiniest number.</li><li><strong>Swap &amp; Slide</strong>: Move it to the start.</li><li><strong>Rinse &amp; Repeat</strong>: Do it again until everything&#x2019;s sorted.</li></ol><p>It&#x2019;s like organizing your shoes but without the extra boxes. Everything gets swapped right where it is.</p><p>In this case, the complexity of this algorithm is O(n^2), so not the fastest when the party gets big. We will learn more &quot;fancy&quot; ones later!</p><h2 id="wrapping-it-up"><strong>Wrapping It Up</strong></h2><p>Just like understanding why your Wi-Fi turns into a sloth sometimes, getting the hang of algorithm complexity and champs like Selection Sort is key in the computing world. It&apos;s about being smart, efficient, and ready to tackle the big (and small) data challenges. So gear up because your coding journey&apos;s about to get a whole lot more interesting! &#x1F680;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[10.a: When Life's Too Messy, Use Sorting Algorithms]]></title><description><![CDATA[<p>We&apos;re exploring five epic algorithms. It&apos;s like the Avengers, but for data! But do we need them for the AP exam? <strong>No</strong>. But do you need &apos;em to flex in university or even AP Computer Science Students? <strong>Absolutely</strong>! Oh, and yeah, they&apos;re in</p>]]></description><link>https://blog.suhjae.dev/sorting/</link><guid isPermaLink="false">653f645691ff462ac6e35211</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Thu, 19 Oct 2023 06:22:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1561117089-3fb7c944887f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fGFycmF5fGVufDB8fHx8MTY5ODY1MzQ1OXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1561117089-3fb7c944887f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fGFycmF5fGVufDB8fHx8MTY5ODY1MzQ1OXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="10.a: When Life&apos;s Too Messy, Use Sorting Algorithms"><p>We&apos;re exploring five epic algorithms. It&apos;s like the Avengers, but for data! But do we need them for the AP exam? <strong>No</strong>. But do you need &apos;em to flex in university or even AP Computer Science Students? <strong>Absolutely</strong>! Oh, and yeah, they&apos;re in the CSA curriculum, so there&#x2019;s that. &#x1F9D0;</p><h2 id="introduction-binary-search">Introduction: Binary Search</h2><p>Picture this: you&apos;re in a vast library, searching for that one book with the meme-worthy quote. How would you find it? By turning the place upside down, or strategizing?</p><p><strong>Binary search is that strategy:</strong></p><ul><li><strong>Data Structure</strong>: Think of a shelf with sorted books (or memes).</li><li><strong>Objective</strong>: Find &quot;The One&quot; (book or number, not Neo from the Matrix).</li></ul><p><strong>Plan</strong>:</p><ol><li>Split the shelf into two halves.</li><li>Use your detective skills to deduce which side your desired book is on.</li><li>Zero in on that half, and split it again!</li><li>Continue until you&apos;ve got your book or realized you maybe lent it to someone.</li></ol><h3 id="the-perk-of-being-organized"><strong>The Perk of Being Organized:</strong></h3><p>Being sorted isn&#x2019;t just a neat-freak&apos;s thing! With sorted data:</p><ul><li>Searching becomes super efficient! Imagine searching for your memes not by endlessly scrolling, but by smartly jumping from section to section.</li><li>And this, my friend, is the magic trick behind binary search!</li></ul><h2 id="up-next-sorting-algorithms-spotlight"><strong>Up Next: Sorting Algorithms&apos; Spotlight</strong></h2><p>So that was a simple introduction of why sorting algorithm is important, and from now, </p><ul><li>Get ready to unravel the mysteries of <strong><a href="https://blog.suhjae.dev/complexity/">Algorithm Complexity</a></strong> and the enigmatic <strong><a href="https://blog.suhjae.dev/complexity/">Big O</a></strong>.</li><li>Dance with algorithms like <strong>Selection, Insertion,</strong> and the bubbly <strong>Bubble Sort</strong>, and finally deep with the elite duo: <strong>Merge Sort &amp; Quick Sort</strong>, which you will actually use.</li></ul><p>So, prep your coding capes and get ready to sort your life out, one algorithm at a time! &#x1F680;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[9: Recursion, the Infinite Loop of Emails]]></title><description><![CDATA[<p>Hey KISJ Tech Wizards and Future Code Masters! &#x1F31F; Ready to take a break from the wild ride of navigating KISJ&apos;s email labyrinth, where emails about using a room after school seem to enter the Bermuda Triangle only to reappear weeks later from a teacher you didn&apos;</p>]]></description><link>https://blog.suhjae.dev/recursion/</link><guid isPermaLink="false">653f2cb691ff462ac6e3514c</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Tue, 17 Oct 2023 04:34:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1613981948475-6e2407d8b589?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDZ8fG1hdHJ5b3Noa2ElMjUyMGRvbGx8ZW58MHx8fHwxNjk4NjUzMDQyfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1613981948475-6e2407d8b589?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDZ8fG1hdHJ5b3Noa2ElMjUyMGRvbGx8ZW58MHx8fHwxNjk4NjUzMDQyfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="9: Recursion, the Infinite Loop of Emails"><p>Hey KISJ Tech Wizards and Future Code Masters! &#x1F31F; Ready to take a break from the wild ride of navigating KISJ&apos;s email labyrinth, where emails about using a room after school seem to enter the Bermuda Triangle only to reappear weeks later from a teacher you didn&apos;t even know existed? Well, buckle up because we&apos;re diving into something just as mysterious and awe-inspiring: Recursion in Computer Science!</p><h2 id="recursion-the-magic-mirror-of-code"><strong>Recursion: The Magic Mirror of Code</strong></h2><p>Picture this: You&#x2019;re trying to email a teacher about using a room for an after school party, and the email keeps getting forwarded...to itself. Sounds like a nightmare, right? Well, that&#x2019;s what recursion is like in computer science, but in a cool way! It&apos;s when a method in your code decides to be a bit self-loving and calls itself. Yes, it&#x2019;s the ultimate self-love story in the world of programming. &#x1F48C;</p><h2 id="example-factorial"><strong>Example: Factorial</strong></h2><p>Remember the time when your math teacher brought up factorials, and you felt like vanishing into an alternate universe? Well, recursion is about to turn that feeling on its head!</p><p>In mathematics, factorials are like the ultimate test of patience. Calculating 4! (which is 4x3x2x1) is fine, but imagine doing 10! Without dozing off. This is where recursion comes in! Here&apos;s why recursion and factorials are a match made in coding heaven:</p><h3 id="its-like-a-matryoshka-doll">It&apos;s Like a <a href="https://en.wikipedia.org/wiki/Matryoshka_doll?ref=blog.suhjae.dev">Matryoshka Doll</a>!</h3><p>Recursion in factorials is like opening those Russian nesting dolls (Click <a href="https://en.wikipedia.org/wiki/Matryoshka_doll?ref=blog.suhjae.dev">here</a> to fall into this rabbit hole). You start with the biggest doll (the original number), and inside it, there&apos;s a smaller doll (the number minus one), and it keeps going until you reach the smallest doll (the base case).</p><h3 id="recursive-factorial-in-java"><strong>Recursive Factorial in Java</strong></h3><p>Let&apos;s see how this magic works in code:</p><pre><code class="language-java">public static int factorial(int n) {
    if (n &gt; 1) {
        // Here&apos;s the recursion: the method calls itself!
        return n * factorial(n-1);
    } else {
        // Base case: No more smaller dolls.
        return 1;
    }
}
</code></pre><p>In this scenario, using recursion is great because:</p><ol><li><strong>Simplicity:</strong> Instead of writing loops and keeping track of all the multiplications, recursion elegantly simplifies it. Just like replacing a whole paragraph with a witty emoji. &#x1F31F;</li><li><strong>Clarity:</strong> It mirrors the mathematical definition of a factorial. It&apos;s like reading a novel in its original language, rather than struggling with a bad translation.</li><li><strong>Efficiency:</strong> With each recursive call, the problem becomes smaller, like chipping away at a giant block of cheese until you&#x2019;re left with a bite-sized piece.</li></ol><p>So, recursion transforms the tedious task of calculating factorials into a seamless and almost hypnotic process!</p><h2 id="essential-concepts-of-recursion"><strong>Essential Concepts of Recursion</strong></h2><ol><li><strong>Recursive Call:</strong> Like when you ask your friend a question, and they say, &#x201C;I don&#x2019;t know, ask her,&#x201D; and she says the same, until someone finally has the answer.</li><li><strong>Simplification:</strong> Breaking down a giant pizza into bite-sized pieces because let&#x2019;s face it, no one can eat a whole pizza in one bite (or can they?).</li><li><strong>Base Case:</strong> The superhero who stops the endless loop of &quot;Ask her.&quot; It&#x2019;s like that teacher who finally replies to your room booking email with a clear &quot;Yes&quot; or &quot;No.&quot;</li></ol><p><strong>Caution:</strong> Missing a base case in recursion is like forgetting to set an alarm for school. You&#x2019;re going to wake up in a world of &#x201C;stack overflow&#x201D; errors, where your code runs amok with no end in sight.</p><hr><p>So there you have it, KISJ folks! Recursion is like a magical, self-reflecting method that brings a touch of elegance and brain gymnastics to coding. It&apos;s the secret sauce that can turn a complex problem into a sleek, neat solution, much like how you somehow manage to get through those confusing email threads and end up booking the room for your club events. Now, go ahead and add some recursion magic to your coding spells and watch the wonders unfold! &#x1F9D9;&#x200D;&#x2642;&#xFE0F;&#x1F4BB;&#x1F52E;</p>]]></content:encoded></item><item><title><![CDATA[8: The Unsung Heroes of Code, Methods]]></title><description><![CDATA[<p>Hey there, KISJ 11th graders (or 12th)! &#x1F64C; So, we&apos;ve had our fair share of <em>spicy</em> topics. Remember how that last fire drill felt like a never-ending loop with no exit condition? Yeah, we all wished for a &apos;break&apos; statement there. Well, now let&#x2019;s</p>]]></description><link>https://blog.suhjae.dev/methods/</link><guid isPermaLink="false">652f77800d3b31047879a6b4</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Fri, 13 Oct 2023 06:13:00 GMT</pubDate><media:content url="https://images.unsplash.com/uploads/1413222992504f1b734a6/1928e537?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEyfHxjYWxsfGVufDB8fHx8MTY5NzYwOTc3NXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/uploads/1413222992504f1b734a6/1928e537?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEyfHxjYWxsfGVufDB8fHx8MTY5NzYwOTc3NXww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="8: The Unsung Heroes of Code, Methods"><p>Hey there, KISJ 11th graders (or 12th)! &#x1F64C; So, we&apos;ve had our fair share of <em>spicy</em> topics. Remember how that last fire drill felt like a never-ending loop with no exit condition? Yeah, we all wished for a &apos;break&apos; statement there. Well, now let&#x2019;s embark on a journey through the world of Java methods. They&#x2019;re like those legendary cram sessions we have the night before the big test. Efficient, (hopefully) organized, and crucial!</p><h2 id="why-java-methods-are-the-real-mvps"><strong>Why Java Methods are the Real MVPs</strong></h2><p><strong>1. Modularity:</strong> Methods are like breaking down your math homework problems. Sure, you <em>could</em> try to tackle that huge problem all at once, but why not break it down step-by-step? Trust me, it&apos;s easier, and your future self will thank you.</p><p><strong>2. Readability:</strong> Let&#x2019;s be real. We&#x2019;ve all tried reading someone&apos;s handwritten notes and wondered if it&#x2019;s some ancient language. Methods? They&apos;re like that one classmate&apos;s notes that are <em>so</em> clean, you&#x2019;d think they used a ruler for every line. It just makes sense!</p><p><strong>3. Organization:</strong> Think of methods like sorting your music playlist. You could put everything into one (and risk getting a ballad in the middle of your workout), or you could group them into pop, ballads, and rap breaks. The structure is just like that!</p><p><strong>4. Reduction of Redundancy:</strong> Ever felt like every day is a repetition of the last (looking at you, quarantine)? Methods are here to say, &#x201C;Let&apos;s NOT do that with our code.&#x201D; The DRY (Don&apos;t Repeat Yourself) principle is the golden rule, and methods are its loyal guardian.</p><h2 id="methods-because-who-likes-d%C3%A9j%C3%A0-vu"><strong>Methods: Because Who Likes D&#xE9;j&#xE0; vu?</strong></h2><p>Methods help us avoid the &#x201C;Didn&apos;t I just write this?&#x201D; feeling. Organizing your code with methods is like organizing your Google Drive&#x2014;you know exactly where your scary scary U.S. history documents are.</p><h2 id="documenting-methods-when-memory-fails-notes-prevail"><strong>Documenting Methods: When Memory Fails, Notes Prevail</strong></h2><p>Remember the time you thought you&#x2019;d remember what your friend whispered during advisory, but forgot by lunchtime? Documentation is the lifesaver here!</p><h3 id="the-javadoc-magic"><strong>The Javadoc Magic</strong></h3><p>Javadoc is like that genius friend who takes notes in every class and then turns them into beautiful, readable summaries (which is me &#x1F913;). And just like there are rules for passing notes without getting caught, there are rules for Javadoc:</p><p><strong>Class Header: A Quick Intro</strong></p><pre><code class="language-java">/**
 * Think of this as the &#x201C;Hi, my name is...&#x201D; sticker at a school event.
 *
 * @author Jay Suh (Because credits!)
 * @version 1.0 (The &apos;How many times have I tried to explain this&apos; counter)
 */
</code></pre><p><strong>Method Header: The Blueprint</strong></p><pre><code class="language-java">/**
 * Because how else would you know that the method doesn&apos;t divide by zero?
 *
 * @param dividend The numerator of our fraction.
 * @param divisor The denominator. Don&apos;t make this zero. Just don&apos;t.
 * @return The answer, if we didn&apos;t break math.
 * @throws ArithmeticException if you dared to make divisor 0.
 */
</code></pre><h3 id="preand-post-conditions-like-class-expectations-but-for-code"><strong>Pre- and Post-Conditions: Like Class Expectations, but for Code</strong></h3><ul><li><strong>Preconditions:</strong> The rules before you begin. Like how we must be awake (or at least look awake) during Mr. Mangat&#x2019;s class.</li><li><strong>Postconditions:</strong> What you should expect after. Like, knowledge . . . &#xA0;hopefully.</li></ul><p>And a quick PSA from Mr. Mangat: for the AP CSA exam, understanding these conditions is like remembering to bring your calculator to the math exam. Essential!</p><hr><p>In conclusion, methods are the unsung heroes of our code world, ensuring everything runs as smoothly as the school Wi-Fi on a good day (hey, we can dream). May your methods always be efficient and your coffee strong! &#x1F680;&#x1F4DD;</p>]]></content:encoded></item><item><title><![CDATA[7: Array, but in KISJ Edition]]></title><description><![CDATA[<p>Hey KISJ warriors! &#x1F680; Remember that spicy topic about the grading policy and how students suddenly became allergic to doing assignments unless there&apos;s an apparent threat of reassessment? Let&#x2019;s dive into a new topic which is just as spicy (if not more)&#x2014;Arrays in Java!</p>]]></description><link>https://blog.suhjae.dev/array/</link><guid isPermaLink="false">652f74100d3b31047879a682</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Tue, 10 Oct 2023 05:58:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1482991529358-e0480566d724?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEwfHxsaW5lJTIwcGVvcGxlfGVufDB8fHx8MTY5NzYwOTUzMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1482991529358-e0480566d724?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEwfHxsaW5lJTIwcGVvcGxlfGVufDB8fHx8MTY5NzYwOTUzMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="7: Array, but in KISJ Edition"><p>Hey KISJ warriors! &#x1F680; Remember that spicy topic about the grading policy and how students suddenly became allergic to doing assignments unless there&apos;s an apparent threat of reassessment? Let&#x2019;s dive into a new topic which is just as spicy (if not more)&#x2014;Arrays in Java! You know, those things that are a bit like when STUCO gathers everyone for assembly, and tries to fit everyone&apos;s attention into a tight space? Yep, those!</p><h2 id="whats-an-array"><strong>What&apos;s an Array?</strong></h2><p>Arrays are basically like those school assemblies. A bunch of similar things (like us students) crammed into one space. But just like the school rule about trips to the deli, where you apparently need a chaperone (seriously, we&apos;re not 1st graders), arrays in Java come with their own rule: They ain&#x2019;t flexible in size. Once you decide how big it&#x2019;s going to be, it stays that way!</p><h2 id="starting-off-with-arrays"><strong>Starting Off with Arrays</strong></h2><p>Let&#x2019;s consider our school. If we wanted to store everyone&apos;s student numbers, it&apos;d go something like this:</p><pre><code class="language-java">int[] studentNumbers; // Declaring an array. This is like saying, &quot;Hey, we need a space for student numbers!&quot;
studentNumbers = new int[10]; // Allocating space for 10 student numbers. Imagine cramming 10 STUCO members on stage.
</code></pre><p>You know how some of us multitask during advisory? (Texting, cramming, or the classic &#x2018;strategic eye-closing&#x2019;). In Java, you can multitask in initializing arrays:</p><p><em>The Efficient One-Liner (because who has the time?)</em></p><pre><code class="language-java">dataType[] arrayRefVar = new dataType[arraySize];
</code></pre><p><em>The &#x201C;I know who&#x2019;s in my squad&#x201D; Declaration:</em></p><pre><code class="language-java">dataType[] arrayRefVar = {value0, value1, &#x2026;, valuek};
</code></pre><h2 id="array-techniques"><strong>Array Techniques</strong></h2><p>Accessing and modifying elements in an array is like checking who sent you that latest meme during advisory:</p><pre><code class="language-java">studentNumbers[0] = 380; // Assigning a number to the first student.
System.out.println(studentNumbers[0]); // Revealing the number (or the meme source).
</code></pre><p>Got a list of memes and want to find the spiciest one? Arrays got you:</p><pre><code class="language-java">if (myList[i] &gt; max) max = myList[i]; // Finding the dankest meme.
</code></pre><h2 id="arrays-methods-like-texting-during-advisory"><strong>Arrays &amp; Methods: Like Texting during Advisory</strong></h2><p>We&apos;ve all shared memes in a group chat and realized that what&apos;s seen cannot be unseen. Similarly:</p><pre><code class="language-java">public static void printArray(int[] array) {
    for (int i = 0; i &lt; array.length; i++) {
        System.out.print(array[i] + &quot; &quot;);
    }
}
</code></pre><p>Passing an array to a method in Java is like sending a meme in a group chat. Once it&#x2019;s there, everyone has access to it, and you can&apos;t really take it back without consequences. So, pro-tip: Think before you share (or modify arrays within methods)!</p><hr><p>In summary, arrays in Java are like those classic KISJ moments. They&#x2019;re a mix of rules, quirks, and trying to find the best way to fit everything in. And just like the &#x201C;spicy&#x201D; debate on assignments, they come with their set of challenges and fun. So, dive into Java, make some arrays, and maybe sneak in a meme or two. &#x1F609; Happy coding! &#x1F389;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[6: When Loops are More Predictable than Lunch Menus]]></title><description><![CDATA[<p>Hey KISJ warriors! &#x1F680; Before we dive in, a big shoutout to everyone for the recent formative! Whether you aced it or faced some challenges, remember it covered a lot from Day 1 to 5. So, kudos for navigating through it! Now, remember those days when you&apos;d loop</p>]]></description><link>https://blog.suhjae.dev/counted-loops/</link><guid isPermaLink="false">64f172f723fb687573d94d5a</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Fri, 01 Sep 2023 05:30:09 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1618610595611-14743cb65564?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDQ3fHxsb29wfGVufDB8fHx8MTY5MzU0NTUyOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1618610595611-14743cb65564?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDQ3fHxsb29wfGVufDB8fHx8MTY5MzU0NTUyOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="6: When Loops are More Predictable than Lunch Menus"><p>Hey KISJ warriors! &#x1F680; Before we dive in, a big shoutout to everyone for the recent formative! Whether you aced it or faced some challenges, remember it covered a lot from Day 1 to 5. So, kudos for navigating through it! Now, remember those days when you&apos;d loop around the cafeteria trying to decide if today&apos;s lunch was edible or if you&apos;d be better off with a snack from the deli? Well, Java&apos;s loops are kinda like that, but without the disappointment. Let&apos;s dive deeper!</p><h2 id="counted-loops-the-cafeteria-rounds"><strong>Counted Loops: The Cafeteria Rounds</strong></h2><p>Just like how you might circle the cafeteria a few times before choosing a meal, counted loops in Java let your program run a set of instructions multiple times.</p><p>Back in the day, with only the do-while loop, our code looked like someone lost in the cafeteria:</p><pre><code class="language-java">int x = 0;
do {
    // Pondering lunch choices here
    x += 1;
} while (x &lt; 10);
</code></pre><p>But thanks to the counted loop, we&apos;ve got a more efficient way to make our rounds:</p><h2 id="the-for-loop-the-lunch-line-strategy"><strong>The &apos;For&apos; Loop: The Lunch Line Strategy</strong></h2><pre><code class="language-java">for (int count = 0; count &lt; 10; count++) {
    // Picking food items here
}
</code></pre><p>With the <code>for</code> loop, the variable <code>count</code> is like that friend who only joins you for lunch and disappears afterward. It exists only within the loop&apos;s scope.</p><ul><li>The <code>for</code> statement has a counter, kind of like counting how many times you&apos;ve been disappointed by the lunch menu.</li><li>You can use the counter value inside the loop, like tallying up the number of decent meals.</li><li>The counter variable doesn&apos;t linger around after the <code>for</code> statement, just like that mystery meat from last week.</li></ul><h3 id="for-loop-examples-the-lunch-menu"><strong>&apos;For&apos; Loop Examples: The Lunch Menu</strong></h3><p><strong>Counting to 10</strong> (like counting the number of veggies on your plate):</p><pre><code class="language-java">for (int i = 0; i &lt; 10; i++) {}
</code></pre><p><strong>Counting to 10 with 2 added</strong> (like adding two extra fries because why not):</p><pre><code class="language-java">for (int c = 0; c &lt; 10; c = c + 2) {}
</code></pre><p><strong>Looping &apos;num&apos; times</strong> (like checking the dessert corner <code>num</code> times):</p><pre><code class="language-java">for (int i = 0; i &lt; num; i++) {}
</code></pre><p><strong>Decreasing counter</strong> (like counting down the minutes until lunch is over):</p><pre><code class="language-java">for (int i = 100; i &gt;= 10; i--) {}
</code></pre><h2 id="break-continue-and-systemexit-the-lunchtime-escape-tactics"><strong>Break, Continue, and System.exit(): The Lunchtime Escape Tactics</strong></h2><p>Sometimes, you just want to leave school on lunch. Here&apos;s how you can do it in Java:</p><ul><li>Use <strong><code>break;</code></strong> when you spot that unidentifiable dish and want to exit the loop.</li><li>Use <strong><code>continue;</code></strong> when you want to skip over the salad and see what&apos;s next.</li><li>And <strong><code>System.exit()</code></strong>? That&apos;s like seeing the lunch line and deciding to just go home.</li></ul><p>But remember, just like ditching lunch isn&apos;t always the healthiest choice, using these commands can make your code less efficient. Java likes to plan ahead, and using break or continue can mess up its game plan.</p><hr><p>That&apos;s it for today&apos;s lesson on Java loops! If you&apos;ve missed our previous lessons, don&apos;t worry. They&apos;re more accessible than the deli during lunchtime rush. Dive in, and remember: Java loops might be more predictable than tomorrow&apos;s lunch menu. &#x1F609; Happy coding! &#x1F389;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[When 'Undo' Isn't Enough and Google Docs Betrays You: git]]></title><description><![CDATA[<p>Hey KISJ coders! &#x1F680; Ever worked on a group project itin Google Slides and someone just <em>accidentally</em> deleted your masterpiece? Or maybe you&apos;ve been the one to <em>accidentally</em> revert the whole doc, wiping out everyone&apos;s work? If you&apos;ve been there, done that, then Git</p>]]></description><link>https://blog.suhjae.dev/git-basics/</link><guid isPermaLink="false">64f164c723fb687573d94d0f</guid><category><![CDATA[DevHacks101]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Sun, 27 Aug 2023 07:27:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1647166545674-ce28ce93bdca?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEzfHxnaXR8ZW58MHx8fHwxNjkzNTQxNTgyfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1647166545674-ce28ce93bdca?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDEzfHxnaXR8ZW58MHx8fHwxNjkzNTQxNTgyfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="When &apos;Undo&apos; Isn&apos;t Enough and Google Docs Betrays You: git"><p>Hey KISJ coders! &#x1F680; Ever worked on a group project itin Google Slides and someone just <em>accidentally</em> deleted your masterpiece? Or maybe you&apos;ve been the one to <em>accidentally</em> revert the whole doc, wiping out everyone&apos;s work? If you&apos;ve been there, done that, then Git is about to become your new BFF. Let&apos;s dive in!</p><h3 id="git-init-the-group-chat-creation"><strong>Git Init: The Group Chat Creation</strong></h3><p>Starting a new Git repository is like creating a new group chat for a project. It&apos;s where all the action happens.</p><pre><code class="language-bash">git init
</code></pre><p>This command initializes a new Git repository and begins tracking an existing directory. It&apos;s like saying, &quot;Hey, let&apos;s start a group chat for our project!&quot;</p><h3 id="git-commit-the-project-milestone"><strong>Git Commit: The Project Milestone</strong></h3><p>Imagine you&apos;ve just finished a slide in your group presentation. You&apos;re proud of it. It&apos;s got bullet points, images, and even a meme. You want to save this moment forever. In Git, this is a commit.</p><pre><code class="language-bash">git add .
git commit -m &quot;Added the best slide ever&quot;</code></pre><ul><li><code>git add .</code> : The <code>.</code> means you&apos;re adding all the changed files in the current directory to the staging area. If you want to add only specific files, replace the <code>.</code> with the file name like <code>git add myAwesomeSlide.txt</code>.</li><li><code>git commit -m &quot;message&quot;</code> : The <code>-m</code> allows you to add a message describing the commit. Replace <code>&quot;message&quot;</code> with something descriptive like <code>&quot;Fixed all the typos&quot;</code> or <code>&quot;Added memes for comic relief&quot;</code>.</li></ul><h3 id="git-pull-catching-up-on-the-group-chat"><strong>Git Pull: Catching Up on the Group Chat</strong></h3><p>You know when you leave the group chat for an hour and come back to 100 messages? That&apos;s what <strong><code>git pull</code></strong> is for. It updates your local repository with any changes made in the group project while you were gone.</p><pre><code class="language-bash">git pull origin master</code></pre><p>This is like scrolling up in the group chat to see what you missed. Now you&apos;re all caught up!</p><ul><li><code>origin</code> is the default name of the remote repository.</li><li><code>master</code> is the branch name you&apos;re pulling from. Replace <code>master</code> with the branch you want to update from if it&apos;s different.</li></ul><h3 id="git-push-sharing-your-genius"><strong>Git Push: Sharing Your Genius</strong></h3><p>You&apos;ve just created the most amazing slide ever. It&apos;s so good, you need to share it with your group ASAP. In Git, you&apos;d use <strong><code>git push</code></strong>.</p><pre><code class="language-bash">git push origin master</code></pre><p>This pushes your changes to the repository. It&apos;s like sending your slide into the group chat and saying, &quot;Feast your eyes on this, mortals!&quot;</p><ul><li><code>origin</code> is, again, the default name of the remote repository.</li><li><code>master</code> is the branch you&apos;re pushing to. If you&apos;re working on a different branch, replace <code>master</code> with your branch name.</li></ul><h3 id="git-remote-the-cloud-storage"><strong>Git Remote: The Cloud Storage</strong></h3><p>Just like how your Google Docs are stored in the cloud, Git repositories are often stored on a remote server.</p><pre><code class="language-bash">git remote add origin &lt;repository_url&gt;</code></pre><p>This is like choosing where to save your Google Doc. Except, with Git, multiple people can work on the project without accidentally deleting each other&apos;s work.</p><ul><li><code>add</code> is the command to add a new remote.</li><li><code>origin</code> is the default name you&apos;re giving to this remote.</li><li><code>&lt;repository_url&gt;</code> is the URL where your remote repository is stored. Replace it with your actual repository URL.</li></ul><h3 id="git-branch-the-slide-design-sub-committee"><strong>Git Branch: The Slide Design Sub-Committee</strong></h3><p>We all know that one person who doesn&apos;t follow the agreed slide design. In Git, you can create a branch to experiment without messing up the main project.</p><pre><code class="language-bash">git checkout -b new-slide-design
</code></pre><p>This creates a new branch where you can mess around with slide designs all you want without affecting the main presentation.</p><ul><li><strong><code>checkout -b</code></strong> creates a new branch and switches you to it.</li><li><strong><code>new-slide-design</code></strong> is the name of the new branch. Feel free to replace it with something like <strong><code>experimental-design</code></strong> or <strong><code>why-are-we-still-here</code></strong>.</li></ul><h3 id="basic-conflict-solving-the-group-chat-argument"><strong>Basic Conflict Solving: The Group Chat Argument</strong></h3><p>When a conflict occurs, Git will mark the areas of the conflict in the file. You&apos;ll see something like this:</p><pre><code class="language-txt">&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
Slide with memes
=======
Slide without memes
&gt;&gt;&gt;&gt;&gt;&gt;&gt; branch-name
</code></pre><p>You&apos;ll have to manually edit the file to resolve the conflict. Delete the lines you don&apos;t want, along with the conflict markers (<code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code>, <code>=======</code>, <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code>).</p><p>After resolving, run:</p><pre><code class="language-bash">git add .
git commit -m &quot;Resolved conflict&quot;</code></pre><hr><p>And there you have it! Now you&apos;re not just pushing buttons; you&apos;re making informed decisions. It&apos;s like choosing your seat in class based on maximum visibility for web surfing and minimum visibility to the teacher. &#x1F389;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[5: Looping 'til the LLB Limit: Java's While & Do-While Loops]]></title><description><![CDATA[<p>Hello again, KISJ masterminds! &#x1F680; Remember how we connected the sneaky seating arrangements to the Java &#x2018;if&#x2019; statements? Today, we&#x2019;ll associate a few more hilarious school antics with Java&apos;s while and do-while loops. Fasten your seatbelts because coding just got funnier!</p><h2 id="the-while-loop-dancing-on-the-edge-of-10-llbs"><strong>The &quot;While&</strong></h2>]]></description><link>https://blog.suhjae.dev/loops/</link><guid isPermaLink="false">64f021a323fb687573d94caa</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Thu, 24 Aug 2023 05:50:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1465779171454-aa85ccf23be6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGxvb3B8ZW58MHx8fHwxNjkzNDU5MTI5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1465779171454-aa85ccf23be6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGxvb3B8ZW58MHx8fHwxNjkzNDU5MTI5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="5: Looping &apos;til the LLB Limit: Java&apos;s While &amp; Do-While Loops"><p>Hello again, KISJ masterminds! &#x1F680; Remember how we connected the sneaky seating arrangements to the Java &#x2018;if&#x2019; statements? Today, we&#x2019;ll associate a few more hilarious school antics with Java&apos;s while and do-while loops. Fasten your seatbelts because coding just got funnier!</p><h2 id="the-while-loop-dancing-on-the-edge-of-10-llbs"><strong>The &quot;While&quot; Loop: Dancing on the Edge of 10 LLBs</strong></h2><p>Java&apos;s &apos;while&apos; loop echoes that heart-thumping moment as the LLBs pile up. Remember those daredevils teetering on 9 LLBs? This loop keeps on trucking as long as its condition is met.</p><p>For instance, tracking your LLBs might look a bit like:</p><pre><code class="language-Java">int LLBCount = 0;
while (LLBCount &lt; 10) {
    // some &quot;accidental&quot; Korean chatter or a sneaky meme share
    LLBCount++;
    System.out.println(&quot;LLBs so far: &quot; + LLBCount);
}</code></pre><p>That&apos;s the thrill of living on the edge!</p><h2 id="do-while-loop-the-teachers-growing-impatience"><strong>Do-While Loop: The Teacher&apos;s Growing Impatience</strong></h2><p>You know when you&apos;re deep in a Korean convo, and the teacher keeps warning you before they <em>randomly</em> snap? Here&apos;s how it&apos;d go down in Java:</p><pre><code class="language-python">do {
    System.out.println(&quot;Continuing the Korean chat...&quot;);
    teacherAnger = my Random.nextint(20) + 1;
} while (teacherAnger &lt; 15);

System.out.println(&quot;That&apos;s it! You&#x2019;ve earned an LLB!&quot;);</code></pre><p>This snippet keeps chatting in Korean until teacher randomly got angry and gives a student a LLB.</p><h2 id="break-and-continue-javas-interpretation-of-llb-clutch"><strong>Break and Continue: Java&apos;s Interpretation of LLB Clutch</strong></h2><p><strong>Break </strong>is Like getting your 9th LLB and hitting the brakes hard.</p><pre><code class="language-java">int LLBCount = 0;
while (LLBCount &lt; 10) {
    if (LLBCount == 9) {
        System.out.println(&quot;Code red! Abandon mischief!&quot;);
        break;
    }
    LLBCount++;
}
</code></pre><p>By using break, you can break out of look like some students focusing in class after reciving 9th LLB and breaking out of their &quot;loop of mischief.&quot;</p><p><strong>Continue</strong> is like Momentarily goofing off (maybe a sneaky doodle?) but resuming focus quickly when teacher is around.</p><pre><code class="language-java">int funTimes = 0;
while (funTimes &lt; 10) {
    if (funTimes == 5) { // Oops, teacher&apos;s radar pinged!
        System.out.println(&quot;I am working!&quot;);
        continue;
    }
    funTimes++;
}</code></pre><p>By using continue, it will return to the start of the code without breaking out of the loop: like jumping web surfing routine when the teacher is watching you on the back.</p><p>However, the use of <code>break</code> and <code>continue</code> statements can make your code harder to read and debug if not used judiciously.</p><hr><p>In conclusion, today&apos;s Java looping lessons might&apos;ve felt like the thrill of accumulating LLBs at KISJ. Here&apos;s hoping both your loops and LLBs stay manageable! Keep coding, and see you next time! &#x1F680;<br></p>]]></content:encoded></item><item><title><![CDATA[4: When Java's 'If' Statements are More Reliable than Finding a Good Seat in Class]]></title><description><![CDATA[<p>Hey KISJ champs! &#x1F680; Remember those times when you&apos;d strategically pick a seat so your laptop screen wouldn&apos;t face the teacher? And then swiftly &quot;swipe your MacBook&quot; when the teacher approached? Well, Java&apos;s &apos;if&apos; statements are kinda like that, but</p>]]></description><link>https://blog.suhjae.dev/if-and-variable-scope/</link><guid isPermaLink="false">64f01f3523fb687573d94c79</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Tue, 22 Aug 2023 04:59:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1532028358058-44741b59154a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGNob2ljZXxlbnwwfHx8fDE2OTM0NTgyNDV8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1532028358058-44741b59154a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDl8fGNob2ljZXxlbnwwfHx8fDE2OTM0NTgyNDV8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="4: When Java&apos;s &apos;If&apos; Statements are More Reliable than Finding a Good Seat in Class"><p>Hey KISJ champs! &#x1F680; Remember those times when you&apos;d strategically pick a seat so your laptop screen wouldn&apos;t face the teacher? And then swiftly &quot;swipe your MacBook&quot; when the teacher approached? Well, Java&apos;s &apos;if&apos; statements are kinda like that, but without the sneaky part. Let&apos;s dive in!</p><h2 id="javas-if-statement-the-digital-seat-picker"><strong>Java&apos;s &apos;If&apos; Statement: The Digital Seat Picker</strong></h2><p>Just like how you decide where to sit based on the teacher&apos;s location, Java&apos;s &apos;if&apos; statement lets your program make decisions:</p><pre><code class="language-java">int distanceFromTeacher = 7;
if (distanceFromTeacher &gt; 5) {
    System.out.println(&quot;Safe zone! Perfect for a quick game.&quot;);
} else {
    System.out.println(&quot;Danger zone! Better pay attention.&quot;);
}</code></pre><p>In the above code, Java will decide if the seat we choose is great for quick web surfing sessions depending on the distance from the teacher. &#x1F468;&#x200D;&#x1F3EB;</p><h2 id="else-if-the-seating-upgrade"><strong>&apos;Else If&apos;: The Seating Upgrade</strong></h2><p>Sometimes, the first seat you pick isn&apos;t the best. That&apos;s where &apos;else if&apos; comes in:</p><pre><code class="language-java">int distanceFromExit = 3;
if (distanceFromExit &lt; 2) {
    System.out.println(&quot;Quick escape for those bathroom breaks!&quot;);
} else if (distanceFromExit &lt; 5) {
    System.out.println(&quot;Not too shabby, a few steps and you&apos;re out!&quot;);
} else {
    System.out.println(&quot;You&apos;re in for the long haul.&quot;);
}</code></pre><h2 id="the-true-or-false-seat-checker"><strong>The True or False Seat Checker</strong></h2><p>Remember those moments when you had to quickly decide if a seat was prime real estate or not? Booleans in Java work the same way:</p><pre><code class="language-java">boolean seatFacingAwayFromTeacher = true;
if (seatFacingAwayFromTeacher) {
    System.out.println(&quot;Perfect! Time for some discreet multitasking.&quot;);
} else {
    System.out.println(&quot;Uh-oh! Better stay on task today.&quot;);
}
</code></pre><p>In this code, Java will decide if the seat you&apos;ve chosen is ideal for those sneaky off-task moments or if you&apos;re in the direct line of sight of the teacher. Choose wisely! &#x1F440;&#x1FA91;</p><h3 id="boolean-operations-the-advanced-seating-strategy"><strong>Boolean Operations: The Advanced Seating Strategy</strong></h3><p>For those times when you need a super advanced strategy to pick the perfect seat. For complex decision-making, use Boolean operations like <code>AND (&amp;&amp;)</code>, <code>OR (||)</code>, and <code>NOT (!)</code>.</p><pre><code class="language-java">int seatDistanceFromTeacher = 7;
boolean isLaptopFacingTeacher = false;  // Assuming the laptop isn&apos;t facing the teacher for this value
boolean isCloseToPowerOutlet = true;    // Assuming the seat is close to a power outlet for this value

if (!isLaptopFacingTeacher &amp;&amp; isCloseToPowerOutlet &amp;&amp; seatDistanceFromTeacher &gt; 5) {
    System.out.println(&quot;Hidden from the teacher&apos;s view, near a power outlet, AND at a safe distance? Ultimate Jackpot!&quot;);
} else if (!isLaptopFacingTeacher || isCloseToPowerOutlet || seatDistanceFromTeacher &gt; 5) {
    System.out.println(&quot;You&apos;ve got at least one advantage going for you. Not bad!&quot;);
} else {
    System.out.println(&quot;Better luck next time.&quot;);
}</code></pre><p>Now, the code checks &#x1F4BB;:</p><ol><li>If your laptop isn&apos;t facing the teacher, you&apos;re close to a power outlet, and you&apos;re seated at a distance greater than 5 units from the teacher, you&apos;re in the ultimate spot.</li><li>If at least one of those conditions is true, you&apos;re still in a decent position.</li><li>If none of the conditions are true, well, maybe try to get to class a bit earlier next time!</li></ol><h2 id="variable-scope-the-classroom-whisper-network"><strong>Variable Scope: The Classroom Whisper Network</strong></h2><p>Just like how some whispers only travel within a certain group in class, in Java, some variables only exist within certain blocks:</p><pre><code class="language-java">public static void main(String[] args) {
    int x = 5;
    if (x == 5) {
        int y = 10;
        System.out.println(&quot;Inside the whisper network: x is &quot; + x + &quot; and y is &quot; + y);
    }
    // y doesn&apos;t exist here, it&apos;s like a secret only the inner circle knows
    System.out.println(&quot;Outside the network: x is &quot; + x);
}</code></pre><p>Here, just like how outsiders can&apos;t hear the whispers that go around within a certain group, the value y within the variable scope cannot be accessed outside. But, like the lecture that our teachers almost shout at us&#x2014;in this case, certain group who are whispering can also hear what teacher is talking.</p><hr><p>That&apos;s it for today&apos;s lesson on Java&apos;s decision-making prowess! If you&apos;ve missed our previous lessons, don&apos;t worry. They&apos;re more accessible than finding that perfect seat in class where you can both see the board and hide your screen. Dive in, and remember: Java might be easier to master than the art of classroom seating strategy. &#x1F609; Happy coding! &#x1F389;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item><item><title><![CDATA[3: When Java's Scanner Class is More Reliable than the School's Weather Evaluation]]></title><description><![CDATA[<p>Hello again, KISJ legends! &#x1F680; Remember when the school got flooded and we had to use sandbags and towels? Well, in Java, we have something called the Scanner class that&apos;s way more reliable than our school&apos;s &quot;can we walk outside&quot; weather evaluation. Let&apos;</p>]]></description><link>https://blog.suhjae.dev/scanner-and-string/</link><guid isPermaLink="false">64f0133323fb687573d94bff</guid><category><![CDATA[AP Computer Science A]]></category><dc:creator><![CDATA[JaeWoong Suh]]></dc:creator><pubDate>Fri, 18 Aug 2023 04:40:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1612815154858-60aa4c59eaa6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHNjYW5uZXJ8ZW58MHx8fHwxNjkzNDU2MjA2fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1612815154858-60aa4c59eaa6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHNjYW5uZXJ8ZW58MHx8fHwxNjkzNDU2MjA2fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="3: When Java&apos;s Scanner Class is More Reliable than the School&apos;s Weather Evaluation"><p>Hello again, KISJ legends! &#x1F680; Remember when the school got flooded and we had to use sandbags and towels? Well, in Java, we have something called the Scanner class that&apos;s way more reliable than our school&apos;s &quot;can we walk outside&quot; weather evaluation. Let&apos;s dive in!</p><h3 id="javas-scanner-class-the-digital-deli"><strong>Java&apos;s Scanner Class: The Digital Deli</strong></h3><p>Just like how the deli is our only hope for decent snacks (despite the overpriced monopoly), the Scanner class is Java&apos;s way of getting some tasty user input.</p><h4 id="importing-the-scanner-class"><strong><strong>Importing the Scanner Class</strong></strong></h4><p>Before you can use the Scanner, you&apos;ve got to invite it in. Think of it as giving the deli VIP access to your program:</p><pre><code class="language-java">import java.util.Scanner;</code></pre><h4 id="crafting-a-scanner"><strong><strong>Crafting a Scanner</strong></strong></h4><p>Creating a Scanner object is like setting up a booth in the school hallway where students can spill the beans about those advisory &quot;activities&quot; we all love (or not):</p><pre><code class="language-java">Scanner input = new Scanner(System.in)
</code></pre><h4 id="engaging-with-users"><strong><strong>Engaging with Users</strong></strong></h4><p>The Scanner has a bunch of methods that let you ask users all sorts of questions.</p><!--kg-card-begin: html--><table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>nextBoolean()</td>
<td>Reads a boolean value from the user</td>
</tr>
<tr>
<td>nextByte()</td>
<td>Reads a byte value from the user</td>
</tr>
<tr>
<td>nextDouble()</td>
<td>Reads a double value from the user</td>
</tr>
<tr>
<td>nextFloat()</td>
<td>Reads a float value from the user</td>
</tr>
<tr>
<td>nextInt()</td>
<td>Reads an integer value from the user</td>
</tr>
<tr>
<td>nextLine()</td>
<td>Reads a String value from the user</td>
</tr>
<tr>
<td>nextShort()</td>
<td>Reads a short value from the user</td>
</tr>
</tbody>
</table><!--kg-card-end: html--><p>For instance:</p><pre><code class="language-java">System.out.println(&quot;How many advisory videos have you actually watched?&quot;);
int advisoryCount = input.nextInt();
System.out.println(&quot;Really? You&apos;ve watched &quot; + advisoryCount + &quot; videos?&quot;);
</code></pre><p>And just like we wait for the school to end, you should close the scanner when you&apos;re done:</p><pre><code class="language-java">input.close();
</code></pre><h3 id="strings-more-than-just-yarn"><strong>Strings: More Than Just Yarn</strong></h3><p>Strings in Java are like the rumors in school: they can be long, short, combined, and even sliced up.</p><h4 id="seeking-users-name"><strong><strong>Seeking User&apos;s Name:</strong></strong></h4><p>Here&apos;s how you can get the latest scoop, or just someone&apos;s name:</p><pre><code class="language-java">System.out.println(&quot;What is your name?&quot;)
String name = input.nextLine();
System.out.println(&quot;Hello, &quot; + name + &quot;!&quot;);
</code></pre><h4 id="manipulating-strings"><strong><strong>Manipulating Strings:</strong></strong></h4><ul><li><strong>Length</strong>: </li><li><strong>Concatenation</strong>: </li><li><strong>Substring</strong>: </li><li><strong>Character Fetch</strong>: Find out the first letter of someone&apos;s name, or maybe the first letter of a secret code?</li></ul><p><strong>Length</strong>: Find out how long a rumor... I mean, a string is.</p><pre><code class="language-java">int length = name.length();</code></pre><p><strong>Concatenation</strong>: Combine two pieces of gossip into one mega rumor.</p><pre><code class="language-java">String megaRumor = &quot;Lasy sunday, &quot; + gossip1 + &quot;and&quot; + gossip2;
System.out.println(megaRumor);</code></pre><p><strong>Substring</strong>: Extract the juiciest part of a story. Like we live to do it with rumor, <strong>AP exams love this</strong>! Mastering it is crucial.</p><figure class="kg-card kg-code-card"><pre><code class="language-java">String phrase = &quot;Java rocks!&quot;;
String extract = phrase.substring(5, 10); 
System.out.println(extract);</code></pre><figcaption>This will get &quot;rocks&quot;</figcaption></figure><p><strong>Character Fetch</strong>: Find out the first letter of someone&apos;s name, or maybe the first letter of a secret code?</p><pre><code class="language-java">char firstLetter = name.charAt(0);</code></pre><hr><p>That&apos;s a wrap for today&apos;s lesson on Java&apos;s Scanner and Strings! If you&apos;ve missed our previous lessons, don&apos;t worry. They&apos;re more accessible than the deli during lunchtime rush. Dive in, and remember: Java might be easier to understand than our school&apos;s weather policy. &#x1F609; Happy coding! &#x1F389;&#x1F469;&#x200D;&#x1F4BB;&#x1F468;&#x200D;&#x1F4BB;</p>]]></content:encoded></item></channel></rss>