<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: suresh chandra sekar</title>
    <description>The latest articles on DEV Community by suresh chandra sekar (@sureshchandras3kar).</description>
    <link>https://dev.to/sureshchandras3kar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F576186%2F5fe858df-b078-4435-b316-3d5d30d1e029.jpg</url>
      <title>DEV Community: suresh chandra sekar</title>
      <link>https://dev.to/sureshchandras3kar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sureshchandras3kar"/>
    <language>en</language>
    <item>
      <title>Go Learning Journey: Part 1 - Setting Up and First Impressions</title>
      <dc:creator>suresh chandra sekar</dc:creator>
      <pubDate>Sat, 22 Mar 2025 16:24:48 +0000</pubDate>
      <link>https://dev.to/sureshchandras3kar/go-learning-journey-part-1-setting-up-and-first-impressions-3bkh</link>
      <guid>https://dev.to/sureshchandras3kar/go-learning-journey-part-1-setting-up-and-first-impressions-3bkh</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpujk0k5cwwvnxy4hbdw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpujk0k5cwwvnxy4hbdw0.png" alt="golang" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go's, like, everywhere—cloud computing, backend services... you name it! It's known for being simple, super fast, and handling lots of things at once. Tons of developers swear by it. But, is it really that easy for beginners? Well, instead of just following some boring tutorial, I'm getting my hands dirty—learning Go and sharing what I find, the good and the bad, as I go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Go (Easier Than I Thought!)
&lt;/h2&gt;

&lt;p&gt;Setting up Go is pretty straightforward, and here's how you can do it on different operating systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing on Linux&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download Go&lt;/strong&gt;: Grab the latest Go archive from the official downloads page. You can use &lt;code&gt;wget&lt;/code&gt;in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz # Replace with the actual version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Extract the archive&lt;/strong&gt;: Extract the downloaded archive to &lt;code&gt;/usr/local&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Set up environment variables&lt;/strong&gt;: Add Go's binary directory to your PATH by adding this line to your &lt;code&gt;~/.profile&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PATH=$PATH:/usr/local/go/bin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, apply the changes:&lt;br&gt;
source &lt;code&gt;~/.profile&lt;/code&gt; or &lt;code&gt;source ~/.bashrc&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Verify installation&lt;/strong&gt;: Check if Go is installed correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Installing on macOS&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Download Go&lt;/strong&gt;: Download the &lt;code&gt;.pkg&lt;/code&gt; installer from the official Go downloads page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Go&lt;/strong&gt;: Run the &lt;code&gt;.pkg&lt;/code&gt; file and follow the instructions. Go will be installed to &lt;code&gt;/usr/local/go&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set up environment variables&lt;/strong&gt;: Add Go to your PATH by adding this line to your &lt;code&gt;~/.bash_profile&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "export PATH=$PATH:/usr/local/go/bin" &amp;gt;&amp;gt; ~/.bash_profile source ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Verify Installation&lt;/strong&gt;: Run the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Installing on Windows&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download Go&lt;/strong&gt;: Download the &lt;code&gt;.msi&lt;/code&gt; installer from the official Go downloads page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Go&lt;/strong&gt;: Run the &lt;code&gt;.msi&lt;/code&gt; installer and follow the instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set up Environment Variables&lt;/strong&gt;: The installer usually sets the necessary environment variables. If not, add &lt;code&gt;C:\Program Files\Go\bin&lt;/code&gt; to the Path variable in your system environment settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify Installation&lt;/strong&gt;: Open a command prompt and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Writing My First Go Program
&lt;/h2&gt;

&lt;p&gt;Now that Go is set up, let's write a simple program to make sure everything's working and to get a feel for the Go language. It's tradition to start with a "Hello, World" program, so that's what we'll do!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the Go file&lt;/strong&gt;: Now, we'll create a file to hold our Go code. We'll name it &lt;code&gt;main.go&lt;/code&gt;. You can use any text editor you like (VS Code, Notepad, Nano, Vim, etc.). Inside your text editor, type the following Go code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;package main: This line declares the package that this code belongs to. Every Go program must belong to a package. The main package is special; it tells the Go compiler that this code is the entry point of an executable program.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;import "fmt": This line imports the fmt package, which provides functions for formatted input and output. In this case, we're using the fmt.Println function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;func main() { ... }: This is the main function. It's the function that gets executed when you run the program. The code inside the curly braces {} is what the function does.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;fmt.Println("Hello, World!"): This line is the heart of the program. It calls the Println function from the fmt package to print the text "Hello, World!" to the console. Println adds a newline character to the end of the output.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save the file: Save the main.go file in your text editor. If you're using Nano, you can press Ctrl+O to save, and then Ctrl+X to exit.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the program: Now, let's run the program! In your terminal or command prompt type the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go run main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command does two things:&lt;/p&gt;

&lt;p&gt;go run: This is the Go command that compiles and runs the Go program.&lt;/p&gt;

&lt;p&gt;main.go: This specifies the Go file that you want to run.&lt;/p&gt;

&lt;p&gt;When you press Enter, you should see the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello, World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! You've just written and run your first Go program.&lt;/p&gt;

&lt;p&gt;🔥 If you enjoyed this post, show some love! 🔥&lt;br&gt;
 Your support keeps me motivated to share more insights on learning Go! 🚀&lt;/p&gt;

&lt;p&gt;Also, don’t forget to follow me on Medium &amp;amp; Substack for future updates. Let’s grow together!&lt;/p&gt;

&lt;p&gt;📖 &lt;strong&gt;&lt;a href="https://medium.com/@sureshchandrasekar" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/strong&gt; – Quick, bite-sized tech insights, perfect for your coffee break☕.&lt;br&gt;
📩 &lt;strong&gt;&lt;a href="https://sureshchandrasekar.substack.com/" rel="noopener noreferrer"&gt;Substack&lt;/a&gt;&lt;/strong&gt; – Long-form guides, industry trends, and expert interviews.  &lt;/p&gt;

</description>
      <category>go</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How Gaming Led Me to Programming</title>
      <dc:creator>suresh chandra sekar</dc:creator>
      <pubDate>Fri, 14 Mar 2025 17:48:11 +0000</pubDate>
      <link>https://dev.to/sureshchandras3kar/how-gaming-led-me-to-programming-my-journey-as-a-solo-developer-3ii2</link>
      <guid>https://dev.to/sureshchandras3kar/how-gaming-led-me-to-programming-my-journey-as-a-solo-developer-3ii2</guid>
      <description>&lt;p&gt;📢 Disclaimer: This is just my personal journey&lt;/p&gt;

&lt;h2&gt;
  
  
  A Gamer With No Direction 🎮
&lt;/h2&gt;

&lt;p&gt;If you had asked me in school what I wanted to become, I wouldn’t have had an answer. I had no idea about my future. The only thing that truly made me happy was gaming. Whether I was happy or sad, I would spend hours in front of my PC, grinding for 6 to 7 hours straight. That was my life.&lt;/p&gt;

&lt;p&gt;I took Computer Science in high school and later went to college for Software Engineering, but to be honest, I was still clueless. I wasn’t passionate about academics, and the education system didn’t really help. It wasn’t inspiring; it was just memorization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Curiosity Sparked: I Wanted to Build Something 🔥
&lt;/h2&gt;

&lt;p&gt;Did anyone hear about the guy who built RollerCoaster Tycoon all by himself? That blew my mind. Chris Sawyer, the legend, developed the game mostly in assembly language, making it one of the most optimized games of its time.&lt;/p&gt;

&lt;p&gt;Despite my confusion, I had a curiosity—I wanted to build something on my own, even if it was complete crap. The idea of creating something from nothing fascinated me. So, I decided to give programming a try.&lt;/p&gt;

&lt;p&gt;But there was a problem—I knew nothing about coding. In school, I had studied C/C++, but writing code on your own without guidance was a whole different challenge. I didn’t even know where to start.&lt;/p&gt;

&lt;p&gt;With no guidance, I turned to YouTube, and that’s where I found these channel who introduced me to programming:&lt;/p&gt;

&lt;p&gt;🔥 Clever Programmer&lt;br&gt;
🔥 Corey Schafer&lt;br&gt;
🔥 thenewboston&lt;br&gt;
🔥 Caleb Curry&lt;/p&gt;

&lt;p&gt;These guys changed my life. Thanks to them, programming no longer felt like a boring subject; it became something fun and creative.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Struggles of Choosing a Language 🤯
&lt;/h2&gt;

&lt;p&gt;At first, I was overwhelmed. There were so many languages—C++, Java, JavaScript, and more. I had no idea which one to focus on.&lt;/p&gt;

&lt;p&gt;Then, in my second year of college, I discovered Python 🐍. People called it the best programming language for beginners, and for the first time, programming actually made sense to me.&lt;/p&gt;

&lt;p&gt;Python’s simplicity and versatility made learning fun, and it helped me understand Object-Oriented Programming (OOP). I started experimenting with small scripts, automating tasks, and building basic web applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Small Tools &amp;amp; Gaining Confidence 💡
&lt;/h2&gt;

&lt;p&gt;Once I started learning Python, I got addicted to building things. Here are some of my early projects:&lt;/p&gt;

&lt;p&gt;✅ Scraping movie data using BeautifulSoup and Requests&lt;br&gt;
✅ YouTube video downloader&lt;br&gt;
✅ Screen recorder in Python&lt;br&gt;
✅ Fun with Termux – Automating tasks on Android using terminal commands&lt;/p&gt;

&lt;p&gt;These weren’t groundbreaking projects, but they gave me confidence. Each time I completed something, I felt like I was leveling up in a game.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Third Year: Java &amp;amp; The Realization 😩
&lt;/h2&gt;

&lt;p&gt;In my third year, I had to learn Java. I won’t lie—I didn’t like it. Something about Java just didn’t click with me. Maybe it was personal preference, maybe it was the way I learned it. Don’t judge me. 😆&lt;/p&gt;

&lt;p&gt;That’s when I realized: It’s okay not to love every language. You don’t have to force yourself to like something just because it’s popular.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Harsh Reality: Job Rejections 🚪❌
&lt;/h2&gt;

&lt;p&gt;After college, I faced rejection after rejection. More than 40 companies turned me down. I kept applying, improving my skills, and trying again.&lt;/p&gt;

&lt;p&gt;It was frustrating, but I didn’t give up. I kept building projects and learning every day. Looking back, those rejections were just stepping stones to where I am now&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Into the Cloud Product Space ☁️
&lt;/h2&gt;

&lt;p&gt;After two years of dedication, I finally landed a job at a cloud product-based company. I played a crucial role in developing several key features for their product. It was an amazing experience—getting paid to do what I loved and working on real-world projects&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Truth: Learn Low-Level Programming ⚠️:
&lt;/h2&gt;

&lt;p&gt;One mistake I made was not learning low-level programming early on. Python is great for beginners, but you can’t stay there forever. It took me five years to realize that understanding low-level concepts like memory management, operating systems, and algorithms is crucial if you want to become a solid developer.&lt;/p&gt;

&lt;p&gt;So, if you’re just starting out, don’t skip C, C++, or even Java. It might seem intimidating, but trust me—it will make you a better programmer in the long run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts: Keep Grinding! 💪
&lt;/h2&gt;

&lt;p&gt;Looking back, my journey wasn’t smooth. I started clueless, struggled, failed, and faced rejection. But I kept grinding.&lt;/p&gt;

&lt;p&gt;If you’re just starting out, don’t stress about knowing everything right away. Keep learning, keep building, and trust the process. One day, you’ll look back and realize how far you’ve come. 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Why You Should Follow My Tech Journey 🚀
&lt;/h2&gt;

&lt;p&gt;Hi, I’m a developer passionate about making complex tech topics accessible to everyone. If you're eager to stay ahead in tech, here’s what you’ll get by following me:&lt;/p&gt;

&lt;p&gt;🔗 Follow me for in-depth tech content:&lt;br&gt;
📖 &lt;strong&gt;&lt;a href="https://medium.com/@yourprofile" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/strong&gt; – Quick, bite-sized tech insights, perfect for your coffee break☕.&lt;br&gt;
📩 &lt;strong&gt;&lt;a href="https://substack.com/@yourprofile" rel="noopener noreferrer"&gt;Substack&lt;/a&gt;&lt;/strong&gt; – Long-form guides, industry trends, and expert interviews.&lt;/p&gt;

</description>
      <category>devjournal</category>
      <category>programming</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>Why Rust is the Future of Programming</title>
      <dc:creator>suresh chandra sekar</dc:creator>
      <pubDate>Sun, 09 Mar 2025 16:42:50 +0000</pubDate>
      <link>https://dev.to/sureshchandras3kar/why-rust-is-the-future-of-programming-19jb</link>
      <guid>https://dev.to/sureshchandras3kar/why-rust-is-the-future-of-programming-19jb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxzc488uag8t41lug96m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxzc488uag8t41lug96m.png" alt="rust meme" width="640" height="761"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine writing code that’s as fast as C++, never crashes due to memory leaks, and makes concurrency a breeze. No, this isn’t a developer’s fantasy—it’s Rust. And if you’re not learning it yet, you’re missing out on a revolution reshaping tech giants like Microsoft, Google, and AWS. Ready to join the movement? &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Rust? The Language That’s Changing Everything 🌍
&lt;/h2&gt;

&lt;p&gt;The tech world is buzzing about Rust—and for good reason. It’s not just another programming language; Rust is a paradigm shift, blending raw performance with ironclad safety. Here’s why developers are ditching their old tools and embracing Rust&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero-Cost Abstractions – Write high-level code without sacrificing performance.&lt;/li&gt;
&lt;li&gt;Memory Safety Guaranteed – Say goodbye to segfaults, buffer overflows, and dangling pointers.&lt;/li&gt;
&lt;li&gt;Fearless Concurrency – Build parallel systems without data races.&lt;/li&gt;
&lt;li&gt;A Community That Cares – Rustaceans (yes, that’s what we call ourselves) are famously welcoming.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But here’s the catch: Rust has a learning curve. Concepts like ownership, borrowing, and lifetimes can feel alien at first. Don’t worry—I’ve got your back. Follow me on Medium and Substack for weekly deep dives, pro tips, and exclusive tutorials to turn you from Rust newbie to ninja.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your First Rust Project: Building a CLI Tool in 10 Minutes ⏱️
&lt;/h2&gt;

&lt;p&gt;Let’s cut through the theory and write real code. You’ll build a simple CLI tool that greets users—and learn core Rust concepts along the way.&lt;/p&gt;

&lt;p&gt;Step 1: Set Up Rust&lt;/p&gt;

&lt;p&gt;Install Rust in seconds with rustup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Create Your Project&lt;/p&gt;

&lt;p&gt;Use cargo, Rust’s built-in package manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cargo new hello_rust  
cd hello_rust  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Write the Code&lt;/p&gt;

&lt;p&gt;Open src/main.rs and add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use std::env;  

fn main() {  
    let args: Vec&amp;lt;String&amp;gt; = env::args().collect();  
    let name = args.get(1).unwrap_or(&amp;amp;"World".to_string());  
    println!("Hello, {}! 🢀", name);  
}  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4: Run It! &lt;code&gt;cargo run -- Alice&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Boom!&lt;/strong&gt; You’ve just built a Rust CLI tool. Let’s unpack the magic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use std::env – Import modules like a pro.&lt;/li&gt;
&lt;li&gt;let args: Vec – Rust’s type system keeps you safe.&lt;/li&gt;
&lt;li&gt;unwrap_or – Handle errors gracefully—no crashes!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Understand Rust Basics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Variables and Mutability&lt;/strong&gt;&lt;br&gt;
In Rust, variables are immutable by default. This means once a value is assigned, it cannot be changed. To make a variable mutable, use the &lt;code&gt;mut&lt;/code&gt; keyword. use&lt;code&gt;let&lt;/code&gt; for variable declaration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    let x = 5; // immutable
    let mut y = 10; // mutable
    y = 15; // this is allowed
    println!("x = {}, y = {}", x, y);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;br&gt;
Rust is statically typed (you must specify types or let Rust infer them).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primitive Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ciiwurw1y7cicctwvxr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ciiwurw1y7cicctwvxr.png" alt="data types" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Control Flow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;if / else&lt;/strong&gt;&lt;br&gt;
In Rust, an if statement is similar to Python’s, but with some differences:&lt;/p&gt;

&lt;p&gt;Conditions must be explicitly boolean.&lt;br&gt;
if is an expression. That means it can return a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    let number = 7;

    if number &amp;lt; 5 {
        println!("Less than 5");
    } else if number == 5 {
        println!("Equal to 5");
    } else {
        println!("Greater than 5");
    }

    // Using if as an expression
    let result = if number % 2 == 0 { "even" } else { "odd" };
    println!("The number is {}", result);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Loops: for, while, and loop&lt;/strong&gt;&lt;br&gt;
Rust offers several ways to loop through code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;for Loop: Iterates over a collection or a range—similar to Python’s for loop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example (iterating over an array):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    let a = [10, 20, 30, 40, 50];

    for element in a.iter() {
        println!("Value is: {}", element);
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example (using ranges):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    // Iterates from 1 to 5 inclusive
    for number in 1..=5 {
        println!("Number: {}", number);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;while Loop: Works like Python’s while loop.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    let mut count = 0;
    while count &amp;lt; 5 {
        println!("Count: {}", count);
        count += 1;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;loop: An infinite loop that runs until you explicitly break out of it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {
    let mut counter = 0;
    loop {
        println!("Counter: {}", counter);
        counter += 1;

        if counter == 5 {
            break;  // Exit the loop when counter reaches 5
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;br&gt;
Functions in Rust are defined using the fn keyword.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn greet(name: &amp;amp;str) {
    println!("Hello, {}!", name);
}

fn main() {
    greet("Alice");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Structs&lt;/strong&gt;&lt;br&gt;
Structs are used to create custom data types&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Person {
    name: String,
    age: u8,
}

fn main() {
    let alice = Person {
        name: String::from("Alice"),
        age: 25,
    };
    println!("{} is {} years old.", alice.name, alice.age);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rust Concepts That Will Change How You Code 🔥
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ownership: The Secret to Memory Safety&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rust’s ownership model ensures memory is managed automatically without a garbage collector. Every value has a single "owner," and the compiler tracks its lifecycle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {  
    let s1 = String::from("Rust");  
    let s2 = s1; // s1 is "moved" to s2 and invalidated  
    // println!("{}", s1); ← Compiler ERROR!  
    println!("{}", s2); // Works!  
}  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Borrowing: Share Resources Safely&lt;/strong&gt;&lt;br&gt;
Need to pass data around without moving ownership? Borrow it with &amp;amp;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn calculate_length(s: &amp;amp;String) -&amp;gt; usize {  
    s.len()  
}  

fn main() {  
    let s = String::from("Hello");  
    let len = calculate_length(&amp;amp;s);  
    println!("Length: {}", len);  
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Match: Pattern Matching on Steroids&lt;/strong&gt;&lt;br&gt;
Replace clunky if-else chains with Rust’s match:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn main() {  
    let number = 3;  
    match number {  
        1 =&amp;gt; println!("One"),  
        2 | 3 =&amp;gt; println!("Two or Three"),  
        _ =&amp;gt; println!("Other"),  
    }  
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Explore Rust’s Ecosystem
&lt;/h2&gt;

&lt;p&gt;Rust has a rich ecosystem of tools and libraries. Here are a few to get you started:&lt;/p&gt;

&lt;p&gt;Cargo: Rust’s package manager and build system. Use it to create new projects, manage dependencies, and run tests.&lt;/p&gt;

&lt;p&gt;Crates.io: The official Rust package registry. You can find thousands of libraries (called "crates") to use in your projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for Learning Rust 🧠
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Take Your Time&lt;/strong&gt;: Rust has a steep learning curve, especially around concepts like ownership and borrowing. Don’t rush—take time to understand these concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practice&lt;/strong&gt;: Write small programs to reinforce your understanding. The more you code, the more comfortable you’ll become.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join the Community&lt;/strong&gt;: The Rust community is incredibly supportive. Join forums like the Rust Users Forum or the Rust subreddit to ask questions and share your progress.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why You Should Follow My Tech Journey 🚀&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hi, I’m a developer passionate about making complex tech topics accessible to everyone. If you're eager to stay ahead in tech, here’s what you’ll get by following me:  &lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Exclusive Tutorials&lt;/strong&gt; – Deep dives into async Rust, FFI, WebAssembly, and more.&lt;br&gt;&lt;br&gt;
💡 &lt;strong&gt;Behind-the-Scenes Insights&lt;/strong&gt; – Learn how top companies use Rust to power billion-dollar systems.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Follow me for in-depth tech content:&lt;/strong&gt; &lt;br&gt;
📖 &lt;strong&gt;&lt;a href="https://medium.com/@sureshchandrasekar" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/strong&gt; – Quick, bite-sized tech insights, perfect for your coffee break☕.&lt;br&gt;
📩 &lt;strong&gt;&lt;a href="https://sureshchandrasekar.substack.com/" rel="noopener noreferrer"&gt;Substack&lt;/a&gt;&lt;/strong&gt; – Long-form guides, industry trends, and expert interviews.  &lt;/p&gt;

&lt;p&gt;🚀 Ready to become a Rustacean? Hit follow and let’s code the future, together.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Python is Slow? Not Anymore! How I Made My Code 100x Faster with Cython (And Why You Should Too)</title>
      <dc:creator>suresh chandra sekar</dc:creator>
      <pubDate>Thu, 06 Mar 2025 16:00:16 +0000</pubDate>
      <link>https://dev.to/sureshchandras3kar/python-is-slow-not-anymore-how-i-made-my-code-100x-faster-with-cython-and-why-you-should-too-2b5j</link>
      <guid>https://dev.to/sureshchandras3kar/python-is-slow-not-anymore-how-i-made-my-code-100x-faster-with-cython-and-why-you-should-too-2b5j</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wjkkazd4xo491oybk8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wjkkazd4xo491oybk8e.png" alt="python" width="700" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Picture this: you’ve written a Python script to process a massive dataset. You hit ‘Run,’ grab a coffee, and settle in for what you think will be a quick wait. But minutes turn into hours, and your code is still chugging along. Sound familiar? That was me just a few weeks ago. Frustrated and racing against a deadline, I discovered something that changed everything: Cython.&lt;/p&gt;

&lt;p&gt;Skeptical? I was too. After all, Python is known for being slow, right? But what if I told you that with a few tweaks, you can make your Python code run as fast as C—without rewriting everything from scratch? In this post, I’ll show you how I transformed my sluggish Python script into a speed demon, and why you might want to ditch pure Python for CPU-heavy tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Python Slow?
&lt;/h2&gt;

&lt;p&gt;Python is one of the most popular programming languages, but when it comes to execution speed, it has some well-known drawbacks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interpreted Language: Python code runs line by line instead of being compiled into machine code ahead of time.&lt;/li&gt;
&lt;li&gt;Global Interpreter Lock (GIL): Python's GIL prevents true multi-threading, limiting CPU-bound performance.&lt;/li&gt;
&lt;li&gt;Dynamic Typing: While dynamic typing makes Python flexible, it adds runtime overhead for type checking.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Despite these limitations, Python’s ease of use makes it the go-to language for many developers. But what if you could keep Python’s simplicity and get C-like performance? That’s exactly where Cython comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cython?
&lt;/h2&gt;

&lt;p&gt;Cython is a superset of Python that allows you to write Python code that compiles into highly optimized C code. By adding C data types and removing the GIL (Global Interpreter Lock) where possible, you can achieve speeds close to pure C performance.&lt;/p&gt;

&lt;p&gt;With Cython, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed up CPU-bound Python code.&lt;/li&gt;
&lt;li&gt;Use C data types for faster numerical computations.&lt;/li&gt;
&lt;li&gt;Remove the GIL to enable true multi-threading and maximize CPU performance.&lt;/li&gt;
&lt;li&gt;Interface with existing C/C++ libraries easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benchmarking Python vs. Cython Performance
&lt;/h2&gt;

&lt;p&gt;using Google Colab, you may need to install it each session:&lt;br&gt;
&lt;code&gt;!pip install cython&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Cython code can be compiled using %%cython magic command in Jupyter/Colab:&lt;br&gt;
&lt;code&gt;%load_ext Cython&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let’s start with a simple example: summing numbers from 0 to n.&lt;/p&gt;

&lt;p&gt;🔹 Python Version (Slowest)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import time

def python_sum(n):
    total = 0
    for i in range(n):
        total += i
    return total

start = time.time()
python_sum(10**7)  # 10 million iterations
print("Python Execution Time:", time.time() - start)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bo84ov4tv70vgfuhvhr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bo84ov4tv70vgfuhvhr.png" alt="google collab" width="795" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Cython Optimized Version&lt;br&gt;
Run this in a separate cell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%%cython
def cython_sum(int n):
    cdef int total = 0
    cdef int i
    for i in range(n):
        total += i
    return total
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start = time.time()
cython_sum(n)
print("Cython Execution Time:", time.time() - start)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45xgag83x3z3745t42c3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F45xgag83x3z3745t42c3.png" alt="google collab" width="666" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Removing GIL for Faster Execution&lt;/p&gt;

&lt;p&gt;The GIL (Global Interpreter Lock) limits Python to single-threaded execution. Removing it in Cython allows truly parallel execution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%%cython
def cython_sum_nogil(int n):
    cdef int total = 0
    cdef int i
    with nogil:
        for i in range(n):
            total += i
    return total
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start = time.time()
cython_sum_nogil(n)
print("Cython (No GIL) Execution Time:", time.time() - start)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqe1309ctlxlnhde38j7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqe1309ctlxlnhde38j7z.png" alt="google collab" width="781" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔥 Parallelizing with prange (Fastest!)
&lt;/h2&gt;

&lt;p&gt;For multi-core execution, we use prange from cython.parallel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%%cython
from cython.parallel import prange
cimport cython

@cython.boundscheck(False)
@cython.wraparound(False)
def cython_sum_parallel(int n):
    cdef int total = 0
    cdef int i
    with nogil:
        for i in prange(n, schedule='dynamic', num_threads=4):
            total += i
    return total
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start = time.time()
cython_sum_parallel(n)
print("Cython (Parallel No GIL) Execution Time:", time.time() - start)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfuk5t7meki6u5pfstxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfuk5t7meki6u5pfstxh.png" alt="google collab" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conclusion: When to Use Cython?&lt;/p&gt;

&lt;p&gt;✅ Use Cython when performance matters, especially for CPU-heavy loops.&lt;br&gt;
✅ Remove GIL for multi-threading without Python’s limitations.&lt;br&gt;
✅ Use prange when working with multi-core processors.&lt;/p&gt;

&lt;p&gt;If you need faster numerical computations, also check out Numba (JIT compilation), but for low-level control, Cython is the best! 🔥&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
