<?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 Kevin Sheeran on Medium]]></title>
        <description><![CDATA[Stories by Kevin Sheeran on Medium]]></description>
        <link>https://medium.com/@kevinsheeranxyj?source=rss-4aedbe46ef2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GIF8hLkCwznvesSBiDREjA.jpeg</url>
            <title>Stories by Kevin Sheeran on Medium</title>
            <link>https://medium.com/@kevinsheeranxyj?source=rss-4aedbe46ef2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 20:58:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kevinsheeranxyj/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[Getting Started with Rust: A Beginner’s Journey into Systems Programming]]></title>
            <link>https://medium.com/@kevinsheeranxyj/getting-started-with-rust-a-beginners-journey-into-systems-programming-6920101de6e4?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6920101de6e4</guid>
            <category><![CDATA[rust-development]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[rustlang]]></category>
            <category><![CDATA[rust-programming-language]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Fri, 29 Nov 2024 06:50:29 GMT</pubDate>
            <atom:updated>2024-11-29T06:50:29.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*T18Xi1IaS-Iz1jLmjQdS_A.jpeg" /></figure><h3>Introduction</h3><p>Hello, devs! It’s been a long time since I last posted here, recently I decided to share my knowledge about Rust, and I found it to be a fascinating and powerful language for systems programming. So let’s dive into it.</p><h3>Why Rust?</h3><p>Rust stands out for several reasons:</p><p>1. <strong>Memory Safety without a Garbage Collector</strong></p><p>Rust’s ownership model ensures that memory safety is checked at compile time, preventing issues like null pointer dereferencing or data races in concurrent code.</p><p>2. <strong>Performance Comparable to C/C++</strong></p><p>Rust’s zero-cost abstractions allow you to write high-level code without sacrificing low-level control.</p><p>3. <strong>A Thriving Ecosystem</strong></p><p>With tools like cargo for dependency management and a strong community, Rust is both powerful and developer-friendly.</p><p>4. <strong>Great Tooling</strong></p><p>Tools like rustfmt (for formatting) and clippy (for linting) make writing clean, idiomatic Rust code easier.</p><p><strong>Setting Up Your Rust Environment</strong></p><p>1. <strong>Install Rust</strong></p><p>Rust provides an excellent installation tool called rustup. You can install it using this command:</p><pre>curl --proto &#39;=https&#39; --tlsv1.2 -sSf https://sh.rustup.rs | sh</pre><p>After installation, verify it using:</p><pre>rustc --version</pre><p>2. <strong>Set Up VS Code</strong></p><p>While Rust works with many editors, VS Code offers a great developer experience with the <strong>Rust Analyzer</strong> extension for autocompletion and in-line error detection.</p><p>3. <strong>Understand Cargo</strong></p><p>Cargo is Rust’s build system and package manager. Run the following to create your first Rust project:</p><pre>cargo new hello_rust<br>cd hello_rust</pre><p><strong>Writing Your First Rust Program</strong></p><p>Open the main.rs file in the src directory and replace the content with:</p><pre>fn main() {<br>    println!(&quot;Hello, Rust world!&quot;);<br>}</pre><p>To run your program, simply execute:</p><pre>cargo run</pre><p>Congratulations! You’ve written your first Rust program.</p><p><strong>Exploring Rust’s Unique Features</strong></p><p>1. <strong>Ownership and Borrowing</strong></p><p>Rust’s ownership model ensures memory safety. Here’s a simple example:</p><pre>fn main() {<br>    let s1 = String::from(&quot;hello&quot;);<br>    let s2 = s1; // Ownership is moved here<br>    // println!(&quot;{}&quot;, s1); // This will cause a compile-time error<br>    println!(&quot;{}&quot;, s2);<br>}</pre><p>If you want to use the same variable across multiple scopes, you can borrow it:</p><pre>fn main() {<br>    let s1 = String::from(&quot;hello&quot;);<br>    let len = calculate_length(&amp;s1);<br>    println!(&quot;The length of &#39;{}&#39; is {}.&quot;, s1, len);<br>}<br><br>fn calculate_length(s: &amp;String) -&gt; usize {<br>    s.len()<br>}</pre><p>2. <strong>Pattern Matching</strong></p><p>Rust’s match statement is incredibly powerful:</p><pre>fn main() {<br>    let number = 3;<br>    match number {<br>        1 =&gt; println!(&quot;One&quot;),<br>        2 =&gt; println!(&quot;Two&quot;),<br>        3 =&gt; println!(&quot;Three&quot;),<br>        _ =&gt; println!(&quot;Something else&quot;),<br>    }<br>}</pre><p>3. <strong>Error Handling</strong></p><p>Rust uses Result and Option types for error and null value handling:</p><pre>fn divide(a: i32, b: i32) -&gt; Result&lt;i32, String&gt; {<br>    if b == 0 {<br>        Err(String::from(&quot;Division by zero&quot;))<br>    } else {<br>        Ok(a / b)<br>    }<br>}<br><br>fn main() {<br>    match divide(10, 2) {<br>        Ok(result) =&gt; println!(&quot;Result: {}&quot;, result),<br>        Err(e) =&gt; println!(&quot;Error: {}&quot;, e),<br>    }<br>}</pre><p><strong>Building a Simple CLI Tool</strong></p><p>Let’s create a simple CLI tool to count words in a text file.</p><p>1. <strong>Create a New Project</strong></p><p>Run:</p><pre>cargo new word_count<br>cd word_count</pre><p>2. <strong>Add Dependencies</strong></p><p>Update Cargo.toml with:</p><pre>[dependencies]<br>clap = &quot;4.0&quot; # For CLI argument parsing</pre><p>3. <strong>Write the Code</strong></p><p>Update main.rs:</p><pre>use std::fs;<br>use clap::Parser;<br><br>#[derive(Parser)]<br>struct Args {<br>    #[clap(short, long)]<br>    file: String,<br>}<br><br>fn main() {<br>    let args = Args::parse();<br><br>    let content = fs::read_to_string(&amp;args.file)<br>        .expect(&quot;Could not read the file&quot;);<br>    let word_count = content.split_whitespace().count();<br><br>    println!(&quot;The file &#39;{}&#39; contains {} words.&quot;, args.file, word_count);<br>}</pre><p>4. <strong>Run the Tool</strong></p><p>Build and run the tool with:</p><pre>cargo run -- --file sample.txt</pre><h3><strong>Conclusion</strong></h3><p>Rust is an exceptional language for developers interested in building robust, performant, and secure systems. With its steep learning curve but rewarding outcomes, diving into Rust can significantly boost your programming skills.</p><p>If you’re a beginner, start with small projects like this CLI tool. As you grow, explore asynchronous programming, web frameworks like <strong>Actix</strong> or <strong>Rocket</strong>, and dive into systems programming with Rust.</p><p>Happy coding, and welcome to the Rustacean community! 🦀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6920101de6e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep understanding the Binary Tree（Data structure & Algorithms)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/deep-understanding-the-binary-tree-data-structure-algorithms-ca00c919c8dd?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/669/1*lW9nXkuw8MwTjxyTByTBbw.jpeg" width="669"></a></p><p class="medium-feed-snippet">Hi fellows! It&#x2019;s been a long time haven&#x2019;t updated my blogs here.</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/deep-understanding-the-binary-tree-data-structure-algorithms-ca00c919c8dd?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/deep-understanding-the-binary-tree-data-structure-algorithms-ca00c919c8dd?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca00c919c8dd</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 06:02:35 GMT</pubDate>
            <atom:updated>2024-06-24T06:02:35.311Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SpringBoot | 13 hottest practical open-source projects recommended]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/springboot-13-hottest-practical-open-source-projects-recommended-8b5a903417fc?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*JGvrVsp3nYmj4Uu92Oxpng.jpeg" width="6000"></a></p><p class="medium-feed-snippet">Hi, Fellows! Recently I want to share some open-source SpringBoot projects for you, if you are fresher on SpringBoot or not familiar with&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/springboot-13-hottest-practical-open-source-projects-recommended-8b5a903417fc?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/springboot-13-hottest-practical-open-source-projects-recommended-8b5a903417fc?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b5a903417fc</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 05:37:16 GMT</pubDate>
            <atom:updated>2023-12-19T05:37:16.034Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java | Multithreaded Concurrent Programming CountDownLatch Practice]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/java-multithreaded-concurrent-programming-countdownlatch-practice-83bdb618bf65?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*inHK4N1QAmf4DGlAdIv63w.jpeg" width="6000"></a></p><p class="medium-feed-snippet">Introduction</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/java-multithreaded-concurrent-programming-countdownlatch-practice-83bdb618bf65?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/java-multithreaded-concurrent-programming-countdownlatch-practice-83bdb618bf65?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/83bdb618bf65</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[multitasking]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[multithreading]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Sun, 17 Dec 2023 12:44:34 GMT</pubDate>
            <atom:updated>2023-12-17T12:44:34.350Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java | In-depth Analysis of AtomicInteger Atomic Type]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/in-depth-analysis-of-java-atomicinteger-atomic-type-41fe9b840e83?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*WZuAMTkOxQ3v8nse3OG3hQ.jpeg" width="3543"></a></p><p class="medium-feed-snippet">When doing concurrent programming, we need to ensure that the program can get the correct result when being accessed concurrently by&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/in-depth-analysis-of-java-atomicinteger-atomic-type-41fe9b840e83?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/in-depth-analysis-of-java-atomicinteger-atomic-type-41fe9b840e83?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/41fe9b840e83</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-functional-interface]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Fri, 15 Dec 2023 07:06:53 GMT</pubDate>
            <atom:updated>2023-12-17T12:51:13.225Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Supercharge Your Java Skills: Avoid These 5 Common Mistakes Made by 90% of Developers]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/supercharge-your-java-skills-avoid-these-5-common-mistakes-made-by-90-of-developers-d1424f00fc5a?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*Lcdk_grT51lL8DGq8MkEHA.jpeg" width="5184"></a></p><p class="medium-feed-snippet">As a Java developer, I wonder if any of you have encountered some bewildering bugs. These errors often require hours of your time to&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/supercharge-your-java-skills-avoid-these-5-common-mistakes-made-by-90-of-developers-d1424f00fc5a?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/supercharge-your-java-skills-avoid-these-5-common-mistakes-made-by-90-of-developers-d1424f00fc5a?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1424f00fc5a</guid>
            <category><![CDATA[technical-skills]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Thu, 14 Dec 2023 02:44:00 GMT</pubDate>
            <atom:updated>2023-12-14T02:44:00.581Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java8 Optional: the ultimate guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/java8-optional-the-ultimate-guide-736627b1cce2?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*RrgjbzMhL7mOTh24xud1Vg.jpeg" width="6000"></a></p><p class="medium-feed-snippet">I&#x2019;m sure any Java developer would have encountered a NullPointerException (NPE) at some point. To avoid NPE, it is common to perform null&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/java8-optional-the-ultimate-guide-736627b1cce2?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/java8-optional-the-ultimate-guide-736627b1cce2?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/736627b1cce2</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[stream-api]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 06:40:23 GMT</pubDate>
            <atom:updated>2023-12-06T06:40:23.018Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Let’s Talk About the Factors that Lead to the Failure of @Transactional Annotation in Spring]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/lets-talk-about-the-factors-that-lead-to-the-failure-of-transactional-annotation-in-spring-f2584442b563?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*QwAHQqPqY0-9npm_pCefzg.jpeg" width="6000"></a></p><p class="medium-feed-snippet">Hi folks! Before we get started, I want you guys to think about this issue below:</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/lets-talk-about-the-factors-that-lead-to-the-failure-of-transactional-annotation-in-spring-f2584442b563?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/lets-talk-about-the-factors-that-lead-to-the-failure-of-transactional-annotation-in-spring-f2584442b563?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2584442b563</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[spring-framework]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Mon, 04 Dec 2023 10:01:33 GMT</pubDate>
            <atom:updated>2023-12-04T10:01:33.415Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[5 communication methods between threads you must know in Java multi-thread]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/5-communication-methods-between-threads-you-should-know-in-java-multi-thread-facce8984109?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/2600/1*1SDPQ85cQj89Lm66ig7yzw.jpeg" width="5760"></a></p><p class="medium-feed-snippet">Hi, everyone! Have you ever encountered this issue before:</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/5-communication-methods-between-threads-you-should-know-in-java-multi-thread-facce8984109?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/5-communication-methods-between-threads-you-should-know-in-java-multi-thread-facce8984109?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/facce8984109</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 02:32:50 GMT</pubDate>
            <atom:updated>2023-11-28T05:41:11.817Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[HashMap: Let’s talk about the Infinite loop Issue]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kevinsheeranxyj/hashmap-lets-talk-about-the-infinite-loop-issue-d2680a5e8bd9?source=rss-4aedbe46ef2b------2"><img src="https://cdn-images-1.medium.com/max/852/1*5cLGPMdBzNQDYBp27-Hs3Q@2x.png" width="852"></a></p><p class="medium-feed-snippet">Hello everyone, in JDK1.7, when HashMap performs concurrent put operations, it can cause an infinite loop, leading to CPU utilization&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@kevinsheeranxyj/hashmap-lets-talk-about-the-infinite-loop-issue-d2680a5e8bd9?source=rss-4aedbe46ef2b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kevinsheeranxyj/hashmap-lets-talk-about-the-infinite-loop-issue-d2680a5e8bd9?source=rss-4aedbe46ef2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2680a5e8bd9</guid>
            <category><![CDATA[collections-in-java]]></category>
            <category><![CDATA[interview-tips]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[concurrent-programming]]></category>
            <dc:creator><![CDATA[Kevin Sheeran]]></dc:creator>
            <pubDate>Sun, 26 Nov 2023 13:39:46 GMT</pubDate>
            <atom:updated>2023-11-26T13:39:46.965Z</atom:updated>
        </item>
    </channel>
</rss>