DEV Community: MORDECAI ETUKUDO The latest articles on DEV Community by MORDECAI ETUKUDO (@martcpp). https://dev.to/martcpp 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%2F1155804%2F7d706d26-c0ff-4f90-83d6-ca7fb89d7761.jpeg DEV Community: MORDECAI ETUKUDO https://dev.to/martcpp en Monomorphization The Rust Way MORDECAI ETUKUDO Fri, 04 Apr 2025 00:19:07 +0000 https://dev.to/martcpp/monomorphization-the-rust-way-26e8 https://dev.to/martcpp/monomorphization-the-rust-way-26e8 <h3> What is <strong>Monomorphization</strong>? </h3> <p>It’s like making <strong>copies</strong> of a tool so each copy fits a specific job.</p> <h3> Imagine This: </h3> <p>You have a <strong>magic hammer</strong> 🛠️ that can fix anything — bikes, cars, phones, even shoes! That’s cool, but every time you use it, you have to wait while it changes shape to fit the job. That takes time ⏳.</p> <p>Now, instead of one magic hammer, what if you made <strong>special hammers</strong> for each job:</p> <ul> <li>A bike hammer 🚲</li> <li>A car hammer 🚗</li> <li>A phone hammer 📱</li> </ul> <p>Now, fixing is faster — just grab the hammer made for the job.</p> <h3> In Code: </h3> <p>You write <strong>one function</strong> that works for any type (like the magic hammer). </p> <p>But before your program runs, the computer <strong>creates a version of the function for each type</strong> (like making the special hammers).</p> <p><a href="proxy.php?url=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%2Fo11nr942x760ydzfx7a7.png" class="article-body-image-wrapper"><img src="proxy.php?url=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%2Fo11nr942x760ydzfx7a7.png" alt="Image description" width="800" height="388"></a></p> <h3> Why It’s Cool: </h3> <p>✅ Your program runs faster.<br><br> ❌ It might take a little more space (because of the copies). </p> rust programming systems lowcode Rust Beginner Learning Timetable MORDECAI ETUKUDO Sun, 09 Mar 2025 23:24:45 +0000 https://dev.to/martcpp/rust-beginner-learning-timetable-4d2 https://dev.to/martcpp/rust-beginner-learning-timetable-4d2 <h2> Rust Beginner Learning Timetable </h2> <h2> Overview </h2> <p>This timetable is designed to help beginners learn Rust effectively by dedicating <strong>4 hours daily</strong>—<strong>2 hours for studying concepts</strong> and <strong>2 hours for hands-on coding</strong>. </p> <h3> Notes: </h3> <ul> <li>If you have prior programming experience, follow the <strong>weekly and daily</strong> schedule.</li> <li>If you are a total beginner, use the <strong>monthly and weekly</strong> version for a smoother learning curve.</li> </ul> <h2> Learning Schedule </h2> <div class="table-wrapper-paragraph"><table> <thead> <tr> <th>Month/Week</th> <th>Day(s)/weeks</th> <th>Topic</th> <th>Activity/Project</th> </tr> </thead> <tbody> <tr> <td><strong>Month/Week 1: Rust Basics</strong></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>1-2</td> <td>Install Rust (<code>rustup</code>, <code>Cargo</code>), Basic syntax</td> <td>Write "Hello, World!" program</td> </tr> <tr> <td></td> <td>3-4</td> <td>Ownership, Borrowing, Lifetimes</td> <td>Practice with variables, structs, and enums</td> </tr> <tr> <td></td> <td></td> <td> <strong>Special Focus:</strong> Study memory management from a computer science perspective</td> <td></td> </tr> <tr> <td></td> <td>5-6</td> <td>Control Flow (if, match, loops), Error Handling (<code>Result</code>, <code>Option</code>)</td> <td>Solve small coding challenges</td> </tr> <tr> <td></td> <td>7</td> <td> <strong>Mini-project:</strong> CLI Calculator</td> <td>Implement a simple arithmetic calculator</td> </tr> <tr> <td><strong>Month/Week 2: Intermediate Rust</strong></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>8-9</td> <td>Structs, Enums, Pattern Matching</td> <td>Hands-on exercises</td> </tr> <tr> <td></td> <td>10-11</td> <td>Vectors, HashMaps, Strings, Slices</td> <td>Build a basic data processor</td> </tr> <tr> <td></td> <td>12-13</td> <td>Modules, Crates, File I/O</td> <td>Work with external libraries (<code>serde</code>, <code>rand</code>)</td> </tr> <tr> <td></td> <td>14</td> <td> <strong>Mini-project:</strong> CLI To-Do List</td> <td>Create a simple CRUD CLI app</td> </tr> <tr> <td><strong>Month/Week 3: Advanced Rust</strong></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>15-16</td> <td>Traits, Generics, Lifetimes</td> <td>Implement custom traits</td> </tr> <tr> <td></td> <td>17-18</td> <td>Smart Pointers (<code>Box</code>, <code>Rc</code>, <code>Arc</code>), Interior Mutability</td> <td>Manage heap memory efficiently</td> </tr> <tr> <td></td> <td>19-20</td> <td>Concurrency (Threads, <code>tokio</code>)</td> <td>Write a concurrent counter or build a TCP-based project</td> </tr> <tr> <td></td> <td>21</td> <td> <strong>Mini-project:</strong> Web Scraper</td> <td>Fetch and parse data from websites</td> </tr> <tr> <td><strong>Month/Week 4: Real-World Applications</strong></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>22-23</td> <td>Web Development with <code>actix-web</code> or <code>axum</code> </td> <td>Build a basic CRUD API</td> </tr> <tr> <td></td> <td>24-25</td> <td>Blockchain (Substrate, Bitcoin Rust libraries)</td> <td>Explore Rust’s role in blockchain development</td> </tr> <tr> <td></td> <td>26-27</td> <td>Testing (<code>cargo test</code>, <code>clippy</code>), Debugging</td> <td>Optimize and refactor previous projects</td> </tr> <tr> <td></td> <td>28</td> <td><strong>Final Project</strong></td> <td>Build a <strong>REST API</strong> or <strong>CLI Tool</strong> as a capstone project</td> </tr> </tbody> </table></div> <p>Following this structured plan ensures a smooth transition from Rust fundamentals to real-world applications. By the end of this journey, you will have a solid foundation in Rust and be ready to build production-grade projects.</p> <p>Happy Coding! 🚀</p> rust programming beginners development Understanding .map() vs .flat_map() in Rust with a Simple Analogy MORDECAI ETUKUDO Sun, 23 Feb 2025 15:23:17 +0000 https://dev.to/martcpp/understanding-map-vs-flatmap-in-rust-with-a-simple-analogy-408g https://dev.to/martcpp/understanding-map-vs-flatmap-in-rust-with-a-simple-analogy-408g <h2> Understanding .map() vs .flat_map() in Rust with a Simple Analogy </h2> <p>Different between .map() and .flat_map() in RUST<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let numbers = vec![1, 2, 3]; // Using `map()` let mapped: Vec&lt;Vec&lt;i32&gt;&gt; = numbers.iter().map(|&amp;n| vec![n, n * 10]).collect(); println!("{:?}", mapped); // [[1, 10], [2, 20], [3, 30]] // Using `flat_map()` let flat_mapped: Vec&lt;i32&gt; = numbers.iter().flat_map(|&amp;n| vec![n, n * 10]).collect(); println!("{:?}", flat_mapped); // [1, 10, 2, 20, 3, 30] } </code></pre> </div> <p>.map(): Each item stays in its own package (nested boxes)<br> Imagine you order 3 items, and the delivery guy wraps each item separately inside its own package.</p> <p><a href="proxy.php?url=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%2Ftnwt4ll3drk27txgg76m.png" class="article-body-image-wrapper"><img src="proxy.php?url=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%2Ftnwt4ll3drk27txgg76m.png" alt="Image description" width="800" height="480"></a></p> <p>.flat_map(): The delivery guy removes extra boxes (flattens them)<br> Instead of putting each item in a separate box, he puts everything in one big box—no extra packaging!</p> <p><a href="proxy.php?url=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%2F2460qbsuitke9uodvu0g.png" class="article-body-image-wrapper"><img src="proxy.php?url=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%2F2460qbsuitke9uodvu0g.png" alt="Image description" width="800" height="429"></a></p> <p>Use .map() when you still want to keep items separate (nested lists).</p> <p>Use .flat_map() when you want to merge everything into one (remove nesting).</p> <p>PICTUTRE FOR MORE DETAILS</p> rust programming functionalreactiveprogramming beginners Shift-left programming (rust as a case study) MORDECAI ETUKUDO Fri, 20 Dec 2024 04:21:36 +0000 https://dev.to/martcpp/shift-left-programming-rust-as-a-case-study-544g https://dev.to/martcpp/shift-left-programming-rust-as-a-case-study-544g <p>Shift-left programming is all about catching potential issues as early as possible in the software development lifecycle. If "shift-left testing" means moving testing closer to the start of development, "shift-left programming" means choosing tools and languages that catch bugs <strong>while you're writing the code</strong>—not hours, days, or months later when it’s too late and your code is already in production, making everyone panic at 2 a.m.</p> <p>Dynamic languages like 🐍 <strong>Python</strong>, 🐪 <strong>Perl</strong>, and ☕ <strong>JavaScript</strong> are wonderfully flexible. But with great flexibility comes...great runtime errors. These languages are like that friend who says, "Sure, I’ll handle it!" but only admits they have no clue what’s going on when you’re already halfway to disaster. </p> <p>On the other hand, compiled languages like 🇨 <strong>C</strong>, <strong>C++</strong>, ☕ <strong>Java</strong>, and <strong>Rust</strong> are stricter and way less forgiving. They're the helicopter parent of programming languages—they won't even let you out the door until your room (code) is clean. For instance:</p> <ul> <li>In <strong>Perl</strong>, you could add <code>"42"</code> (a string) to <code>42</code> (a number), and it’ll shrug and say, "Whatever, math is math." </li> <li>In <strong>Python</strong>, it’ll throw a tantrum, but <em>only</em> at runtime when it realizes you’re trying to add apples and oranges. </li> <li>In <strong>C</strong> or <strong>Java</strong>, the compiler won’t even <em>let</em> you run the code if you try to mix types like that. </li> <li>And <strong>Rust</strong>? Rust is on a whole different level. It’s the ultra-strict professor who hands your code back with a red pen before you can even turn it in.</li> </ul> <p>Rust doesn’t just catch type mismatches—it practically babysits your entire memory management process. Forget dangling pointers or race conditions; Rust won’t even let you <em>compile</em> code that has potential memory safety issues. While <strong>C++</strong> might throw you into the deep end of the pool with a "good luck!" wave, Rust is there, saying, "Wait! You forgot your floaties."</p> <p>Here’s the thing, though: <strong>Rust won’t save you from <em>all</em> mistakes.</strong> It’s not going to stop you from adding when you meant to subtract or from writing an algorithm that solves completely the <em>wrong problem</em>. But it will protect you from the most notorious culprits of catastrophic failures—like null pointer dereferences, buffer overflows, or memory leaks. </p> <p>So, what makes Rust the ultimate shift-left programming language? It lets you write fast, efficient, low-level code (like 🇨 and <strong>C++</strong>) while providing guardrails that prevent the kinds of errors that would otherwise cost you weeks of debugging—or worse, a production outage during a holiday sale. With Rust, you spend less time firefighting bugs 🐛 and more time shipping features.</p> <p>And the best part? Rust isn’t just about safety. It’s about confidence. You ship code that you <em>know</em> won’t betray you. It’s like having a guard dog for your memory management—friendly, protective, and ready to bark at any bug trying to sneak in.</p> <p>In short: <strong>Rust doesn’t just move programming to the left—it puts it on the autobahn.</strong></p> rust assembly java programming Top 50 Most-Used Linux & Windows Commands MORDECAI ETUKUDO Sat, 17 Aug 2024 14:44:02 +0000 https://dev.to/martcpp/top-50-most-used-linux-windows-commands-3adf https://dev.to/martcpp/top-50-most-used-linux-windows-commands-3adf <h2> Top 50 Most-Used Linux &amp; Windows Commands </h2> <h2> Linux Commands </h2> <div class="table-wrapper-paragraph"><table> <thead> <tr> <th>Command</th> <th>Description</th> <th>Syntax</th> </tr> </thead> <tbody> <tr> <td><code>ls</code></td> <td>Lists files and directories.</td> <td><code>ls [options] [directory]</code></td> </tr> <tr> <td><code>cd</code></td> <td>Changes the current directory.</td> <td><code>cd [directory]</code></td> </tr> <tr> <td><code>pwd</code></td> <td>Displays the current directory path.</td> <td><code>pwd</code></td> </tr> <tr> <td><code>mkdir</code></td> <td>Creates a new directory.</td> <td><code>mkdir [directory]</code></td> </tr> <tr> <td><code>rmdir</code></td> <td>Removes an empty directory.</td> <td><code>rmdir [directory]</code></td> </tr> <tr> <td><code>rm</code></td> <td>Removes files or directories.</td> <td><code>rm [options] [file/directory]</code></td> </tr> <tr> <td><code>cp</code></td> <td>Copies files or directories.</td> <td><code>cp [options] source destination</code></td> </tr> <tr> <td><code>mv</code></td> <td>Moves or renames files or directories.</td> <td><code>mv [source] [destination]</code></td> </tr> <tr> <td><code>touch</code></td> <td>Creates an empty file or updates the timestamp.</td> <td><code>touch [file]</code></td> </tr> <tr> <td><code>cat</code></td> <td>Displays the contents of a file.</td> <td><code>cat [file]</code></td> </tr> <tr> <td><code>less</code></td> <td>Views the contents of a file one screen at a time.</td> <td><code>less [file]</code></td> </tr> <tr> <td><code>head</code></td> <td>Displays the first few lines of a file.</td> <td><code>head [file]</code></td> </tr> <tr> <td><code>tail</code></td> <td>Displays the last few lines of a file.</td> <td><code>tail [file]</code></td> </tr> <tr> <td><code>echo</code></td> <td>Outputs text to the terminal.</td> <td><code>echo [text]</code></td> </tr> <tr> <td><code>chmod</code></td> <td>Changes file permissions.</td> <td><code>chmod [permissions] [file]</code></td> </tr> <tr> <td><code>chown</code></td> <td>Changes file owner and group.</td> <td><code>chown [owner]:[group] [file]</code></td> </tr> <tr> <td><code>find</code></td> <td>Searches for files and directories.</td> <td><code>find [path] [options]</code></td> </tr> <tr> <td><code>grep</code></td> <td>Searches text within files.</td> <td><code>grep [options] [pattern] [file]</code></td> </tr> <tr> <td><code>man</code></td> <td>Displays the manual for a command.</td> <td><code>man [command]</code></td> </tr> <tr> <td><code>df</code></td> <td>Displays disk space usage.</td> <td><code>df [options]</code></td> </tr> <tr> <td><code>du</code></td> <td>Displays directory space usage.</td> <td><code>du [options] [directory]</code></td> </tr> <tr> <td><code>top</code></td> <td>Displays running processes.</td> <td><code>top</code></td> </tr> <tr> <td><code>ps</code></td> <td>Displays current processes.</td> <td><code>ps [options]</code></td> </tr> <tr> <td><code>kill</code></td> <td>Terminates a process by PID.</td> <td><code>kill [PID]</code></td> </tr> <tr> <td><code>pkill</code></td> <td>Terminates processes by name.</td> <td><code>pkill [process_name]</code></td> </tr> <tr> <td><code>wget</code></td> <td>Downloads files from the web.</td> <td><code>wget [URL]</code></td> </tr> <tr> <td><code>curl</code></td> <td>Transfers data from or to a server.</td> <td><code>curl [options] [URL]</code></td> </tr> <tr> <td><code>ssh</code></td> <td>Connects to a remote server via SSH.</td> <td><code>ssh [user]@[host]</code></td> </tr> <tr> <td><code>scp</code></td> <td>Securely copies files between hosts.</td> <td><code>scp [source] [destination]</code></td> </tr> <tr> <td><code>nano</code></td> <td>Opens a text editor.</td> <td><code>nano [file]</code></td> </tr> <tr> <td><code>vim</code></td> <td>Opens a powerful text editor.</td> <td><code>vim [file]</code></td> </tr> <tr> <td><code>tar</code></td> <td>Archives files.</td> <td><code>tar [options] [archive_file] [file/directory]</code></td> </tr> <tr> <td><code>zip</code></td> <td>Compresses files into a zip archive.</td> <td><code>zip [options] [archive_file] [file/directory]</code></td> </tr> <tr> <td><code>unzip</code></td> <td>Extracts files from a zip archive.</td> <td><code>unzip [archive_file]</code></td> </tr> <tr> <td><code>alias</code></td> <td>Creates an alias for a command.</td> <td><code>alias [name]='[command]'</code></td> </tr> <tr> <td><code>unalias</code></td> <td>Removes an alias.</td> <td><code>unalias [name]</code></td> </tr> <tr> <td><code>history</code></td> <td>Shows command history.</td> <td><code>history</code></td> </tr> <tr> <td><code>clear</code></td> <td>Clears the terminal screen.</td> <td><code>clear</code></td> </tr> <tr> <td><code>reboot</code></td> <td>Reboots the system.</td> <td><code>reboot</code></td> </tr> <tr> <td><code>shutdown</code></td> <td>Shuts down the system.</td> <td><code>shutdown [options]</code></td> </tr> <tr> <td><code>ping</code></td> <td>Checks connectivity to a host.</td> <td><code>ping [host]</code></td> </tr> <tr> <td><code>hostname</code></td> <td>Displays or sets the system's hostname.</td> <td><code>hostname [name]</code></td> </tr> <tr> <td><code>ifconfig</code></td> <td>Configures network interfaces.</td> <td><code>ifconfig [interface]</code></td> </tr> <tr> <td><code>netstat</code></td> <td>Displays network connections.</td> <td><code>netstat [options]</code></td> </tr> <tr> <td><code>iptables</code></td> <td>Manages firewall rules.</td> <td><code>iptables [options]</code></td> </tr> <tr> <td><code>service</code></td> <td>Manages system services.</td> <td><code>service [service_name] [command]</code></td> </tr> <tr> <td><code>systemctl</code></td> <td>Controls the systemd system and service manager.</td> <td><code>systemctl [command] [service_name]</code></td> </tr> <tr> <td><code>df</code></td> <td>Displays disk space usage.</td> <td><code>df [options]</code></td> </tr> <tr> <td><code>mount</code></td> <td>Mounts file systems.</td> <td><code>mount [options] [device] [directory]</code></td> </tr> <tr> <td><code>umount</code></td> <td>Unmounts file systems.</td> <td><code>umount [device]</code></td> </tr> </tbody> </table></div> <h2> Windows Commands </h2> <div class="table-wrapper-paragraph"><table> <thead> <tr> <th>Command</th> <th>Description</th> <th>Syntax</th> </tr> </thead> <tbody> <tr> <td><code>dir</code></td> <td>Lists files and directories in the current directory.</td> <td><code>dir [options] [directory]</code></td> </tr> <tr> <td><code>cd</code></td> <td>Changes the current directory.</td> <td><code>cd [directory]</code></td> </tr> <tr> <td> <code>md</code>/<code>mkdir</code> </td> <td>Creates a new directory.</td> <td><code>md [directory]</code></td> </tr> <tr> <td> <code>rd</code>/<code>rmdir</code> </td> <td>Removes an empty directory.</td> <td><code>rd [directory]</code></td> </tr> <tr> <td><code>del</code></td> <td>Deletes files.</td> <td><code>del [file]</code></td> </tr> <tr> <td><code>copy</code></td> <td>Copies files from one location to another.</td> <td><code>copy [source] [destination]</code></td> </tr> <tr> <td><code>move</code></td> <td>Moves files from one location to another.</td> <td><code>move [source] [destination]</code></td> </tr> <tr> <td> <code>ren</code>/<code>rename</code> </td> <td>Renames a file or directory.</td> <td><code>ren [old_name] [new_name]</code></td> </tr> <tr> <td><code>type</code></td> <td>Displays the contents of a file.</td> <td><code>type [file]</code></td> </tr> <tr> <td><code>cls</code></td> <td>Clears the Command Prompt screen.</td> <td><code>cls</code></td> </tr> <tr> <td><code>echo</code></td> <td>Displays a message or turns command echoing on or off.</td> <td><code>echo [message]</code></td> </tr> <tr> <td><code>attrib</code></td> <td>Displays or changes file attributes.</td> <td><code>attrib [options] [file]</code></td> </tr> <tr> <td><code>chkdsk</code></td> <td>Checks a disk and displays a status report.</td> <td><code>chkdsk [options] [drive:]</code></td> </tr> <tr> <td><code>tasklist</code></td> <td>Displays a list of currently running processes.</td> <td><code>tasklist</code></td> </tr> <tr> <td><code>taskkill</code></td> <td>Terminates a running process.</td> <td><code>taskkill [options]</code></td> </tr> <tr> <td><code>ipconfig</code></td> <td>Displays network configuration information.</td> <td><code>ipconfig [options]</code></td> </tr> <tr> <td><code>ping</code></td> <td>Tests network connectivity.</td> <td><code>ping [host]</code></td> </tr> <tr> <td><code>hostname</code></td> <td>Displays the computer's hostname.</td> <td><code>hostname</code></td> </tr> <tr> <td><code>netstat</code></td> <td>Displays network connections, routing tables, and interface statistics.</td> <td><code>netstat [options]</code></td> </tr> <tr> <td><code>nslookup</code></td> <td>Queries the DNS to obtain domain name or IP address mapping.</td> <td><code>nslookup [hostname]</code></td> </tr> <tr> <td><code>tracert</code></td> <td>Traces the route to a network host.</td> <td><code>tracert [host]</code></td> </tr> <tr> <td><code>netsh</code></td> <td>Configures network interfaces, firewall settings, and more.</td> <td><code>netsh [command]</code></td> </tr> <tr> <td><code>format</code></td> <td>Formats a disk for use with Windows.</td> <td><code>format [options] [drive:]</code></td> </tr> <tr> <td><code>shutdown</code></td> <td>Shuts down or restarts the computer.</td> <td><code>shutdown [options]</code></td> </tr> <tr> <td><code>regedit</code></td> <td>Opens the Windows Registry Editor.</td> <td><code>regedit</code></td> </tr> <tr> <td><code>msconfig</code></td> <td>Opens the System Configuration utility.</td> <td><code>msconfig</code></td> </tr> <tr> <td><code>sfc</code></td> <td>Scans and repairs system files.</td> <td><code>sfc [options]</code></td> </tr> <tr> <td><code>diskpart</code></td> <td>Manages disk partitions.</td> <td><code>diskpart</code></td> </tr> <tr> <td><code>wmic</code></td> <td>Displays WMI information inside an interactive command shell.</td> <td><code>wmic [alias] [command]</code></td> </tr> <tr> <td><code>systeminfo</code></td> <td>Displays detailed system information.</td> <td><code>systeminfo</code></td> </tr> <tr> <td><code>gpupdate</code></td> <td>Updates Group Policy settings.</td> <td><code>gpupdate [options]</code></td> </tr> <tr> <td><code>gpresult</code></td> <td>Displays Group Policy settings and resultant set of policy (RSoP) for a user or computer.</td> <td><code>gpresult [options]</code></td> </tr> <tr> <td><code>bcdedit</code></td> <td>Manages Boot Configuration Data.</td> <td><code>bcdedit [options]</code></td> </tr> <tr> <td><code>cipher</code></td> <td>Displays or alters the encryption of directories [files] on NTFS partitions.</td> <td><code>cipher [options] [directory]</code></td> </tr> <tr> <td><code>powercfg</code></td> <td>Manages power settings.</td> <td><code>powercfg [options]</code></td> </tr> <tr> <td><code>driverquery</code></td> <td>Displays a list of all installed device drivers and their properties.</td> <td><code>driverquery [options]</code></td> </tr> <tr> <td><code>schtasks</code></td> <td>Manages scheduled tasks.</td> <td><code>schtasks [options]</code></td> </tr> <tr> <td><code>net</code></td> <td>Manages network resources.</td> <td><code>net [command]</code></td> </tr> <tr> <td><code>assoc</code></td> <td>Displays or modifies file extension associations.</td> <td><code>assoc [file_extension]=[file_type]</code></td> </tr> <tr> <td><code>ftype</code></td> <td>Displays or modifies file types used in file extension associations.</td> <td><code>ftype [file_type]=[command_string]</code></td> </tr> <tr> <td><code>path</code></td> <td>Displays or sets a search path for executable files.</td> <td><code>path [options]</code></td> </tr> <tr> <td><code>where</code></td> <td>Locates and displays files in directories in a command prompt.</td> <td><code>where [options] [file_name]</code></td> </tr> <tr> <td><code>doskey</code></td> <td>Edits command lines, recalls Windows commands, and creates macros.</td> <td><code>doskey [options]</code></td> </tr> <tr> <td><code>prompt</code></td> <td>Changes the Windows Command Prompt.</td> <td><code>prompt [text]</code></td> </tr> <tr> <td><code>title</code></td> <td>Sets the window title for the Command Prompt.</td> <td><code>title [text]</code></td> </tr> <tr> <td><code>cls</code></td> <td>Clears the Command Prompt screen.</td> <td><code>cls</code></td> </tr> <tr> <td><code>pause</code></td> <td>Pauses the execution of a batch file and shows a message.</td> <td><code>pause</code></td> </tr> <tr> <td><code>set</code></td> <td>Displays, sets, or removes environment variables.</td> <td><code>set [variable]=[value]</code></td> </tr> <tr> <td><code>ver</code></td> <td>Displays the Windows version number.</td> <td><code>ver</code></td> </tr> <tr> <td><code>exit</code></td> <td>Closes the Command Prompt.</td> <td><code>exit</code></td> </tr> </tbody> </table></div> linux microsoft beginners osdc What happened at Crowdstrike MORDECAI ETUKUDO Mon, 22 Jul 2024 14:50:40 +0000 https://dev.to/martcpp/what-happened-at-crowdstrike-297i https://dev.to/martcpp/what-happened-at-crowdstrike-297i rust cpp computerscience CrowdStrike -- how the null pointer cloud have be prevent with Rust MORDECAI ETUKUDO Sat, 20 Jul 2024 13:30:07 +0000 https://dev.to/martcpp/crowdstrike-how-the-null-pointer-cloud-have-be-prevent-with-rust-3ea https://dev.to/martcpp/crowdstrike-how-the-null-pointer-cloud-have-be-prevent-with-rust-3ea <h2> What Happened? </h2> <h2> The Error: </h2> <ul> <li>The program tried to access a piece of memory it shouldn't have.</li> <li>Specifically, it tried to read from an address that doesn't exist or is not allowed, which was "0x000000000000009c".</li> <li>This mistake is known as an "access violation" and it caused the program to crash, leading to a "blue screen of death" (BSOD), which is a serious error in the computer.</li> </ul> <h2> <strong>Why It Happened</strong>: </h2> <ul> <li>The software didn't properly check if a pointer (a variable that holds a memory address) was <code>null</code> (meaning it points to nothing) before trying to use it.</li> <li>In simpler terms, it's like trying to read a book that isn't there and causing a big mess because of it.</li> </ul> <h2> How Rust Could Have Prevented It </h2> <h2> <strong>Type System</strong>: </h2> <ul> <li>Rust has a powerful type system that helps ensure safety and correctness of the code.</li> <li>For instance, Rust uses an <code>Option&lt;T&gt;</code> enum (a type that can be either <code>Some(value)</code> or <code>None</code>).</li> <li>If a variable can be <code>None</code>, Rust forces you to handle that case explicitly, ensuring you don't try to use something that isn't there.</li> </ul> <h2> <strong>Pattern Matching</strong>: </h2> <ul> <li>Rust uses pattern matching to handle different cases.</li> <li>When dealing with an <code>Option&lt;T&gt;</code>, Rust programmers must specify what to do if the value is <code>Some</code> or <code>None</code>, thus preventing null pointer errors.</li> </ul> <h2> <strong>Compile-Time Checks</strong>: </h2> <ul> <li>Rust performs many checks at compile time (before the program runs) to catch potential errors.</li> <li>This means many mistakes that could cause crashes are caught early, making the program safer.</li> </ul> <h2> Real-World Impact </h2> <ul> <li>If the software engineer had written the program in Rust instead of C++, Rust's design would have forced them to handle the case where a pointer could be null.</li> <li>This would have prevented the program from trying to access invalid memory and avoided the crash.</li> </ul> <h2> diagrammatic details </h2> <p><strong>WITH OTHER LANGUAGE</strong><br> <a href="proxy.php?url=https://media.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%2Fmbf1lverbnve92bi2776.png" class="article-body-image-wrapper"><img src="proxy.php?url=https://media.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%2Fmbf1lverbnve92bi2776.png" alt="c++"></a></p> <p><strong>WITH RUST</strong></p> <p><a href="proxy.php?url=https://media.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%2Fkxpn3q1po0urj8l8mks2.png" class="article-body-image-wrapper"><img src="proxy.php?url=https://media.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%2Fkxpn3q1po0urj8l8mks2.png" alt="Rust"></a></p> rust security crowdstrike cpp Symmetric and Asymmetric Cryptography MORDECAI ETUKUDO Tue, 16 Jul 2024 17:46:56 +0000 https://dev.to/martcpp/symmetric-and-asymmetric-cryptography-40b8 https://dev.to/martcpp/symmetric-and-asymmetric-cryptography-40b8 <h2> Symmetric and Asymmetric Cryptography </h2> <p><strong><em>'Cryptography'</em></strong> is literally the study of hiding information. There are two main types of cryptography you'll encounter day to day:</p> <p><strong>Symmetric Cryptography</strong> is where the same key is used to encrypt and decrypt. It's hundreds of years old and has been used by everyone from the ancient Egyptians to Queen Elizabeth I.</p> <p>There's a variety of <em>symmetric cryptography</em> algorithms, but the most common you'll see today are AES and Chacha20.</p> <p>*<em>Asymmetric Cryptography<br> *</em><br> Asymmetric cryptography - also called 'public key cryptography' was developed in the 1970s. In asymmetric cryptography, participants have pairs of keys (or keypairs). Each keypair consists of a secret key and a public key. Asymmetric encryption works differently from symmetric encryption, and can do different things:</p> <p>Encryption: if it's encrypted with a public key, only the secret key from the same keypair can be used to read it</p> <p>Signatures: if it's encrypted with a secret key, the public key from the same keypair can be used to prove the secret key holder signed it.</p> <p>You can even use asymmetric cryptography to work out a good key for symmetric cryptography! This is called key exchange, where you use your public keys and the recipient's public key to come up with a 'session' key.</p> <p>There's a variety of asymmetric cryptography algorithms, but the most common you'll see today are variants of ECC or RSA.</p> <p><strong>Asymmetric encryption is very popular:</strong></p> <p>Your bank card has a secret key inside it that's used to sign transactions.</p> <p>Your bank can confirm you made the transaction by checking them with the matching public key.</p> <p>Websites include a public key in their certificate. Your browser will use this public key to encrypt the data (like personal information, login details, and credit card numbers) it sends to the web page.</p> <p>The website has the matching private key so that the website can read the data.</p> <p>Your electronic passport was signed by the country that issued it to ensure the passport isn't forged.</p> <p>The electronic passport gates can confirm this using the public key of your issuing country.</p> <p>The messaging apps on your phone use key exchange to make a _</p> <p><a href="proxy.php?url=https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtge66v0itg6fmvybpe9.png" class="article-body-image-wrapper"><img src="proxy.php?url=https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtge66v0itg6fmvybpe9.png" alt="Image description" width="800" height="462"></a>_</p> solana rust web3 cryptography BASIC OF RUST WITH EXECRISE - LEARN RUST WITH EXAMPLE (PART 1) MORDECAI ETUKUDO Sun, 05 May 2024 10:00:58 +0000 https://dev.to/martcpp/basic-of-rust-with-execrise-learn-rust-with-example-3kdo https://dev.to/martcpp/basic-of-rust-with-execrise-learn-rust-with-example-3kdo <h2> Topic: Functions </h2> <p><strong>Program requirements:</strong><br> Displays your first and last name</p> <p><strong>Notes:</strong><br> Use a function to display your first name<br> Use a function to display your last name<br> Use the println macro to display messages to the terminal<br> function to display your first name<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn first_name() -&gt; String { "mart".to_string() } // function to display your last name fn last_name() -&gt; String { "ola".to_string() } fn main() { println!("my name is {} {}", first_name(), last_name()); } </code></pre> </div> <h2> Topic: Basic arithmetic </h2> <p><strong>Program requirements:</strong><br> Displays the result of the sum of two numbers<br> <strong>Notes:</strong><br> Use a function to add two numbers together<br> Use a function to display the result<br> Use the "{:?}" token in the println macro to display the result<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn add(a: f64, b: f64) -&gt; f64 { a + b } fn main() { let result = add(1.0, 2.0); println!("The result is: {:?}", result); } </code></pre> </div> <h2> Topic: Flow control using if..else </h2> <p><strong>Program requirements:</strong><br> Displays a message based on the value of a boolean variable<br> When the variable is set to true, display "hello"<br> When the variable is set to false, display "goodbye"<br> <strong>Notes:</strong><br> Use a variable set to either true or false<br> Use an if..else block to determine which message to display<br> Use the println macro to display messages to the terminal<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let fact = true; // * Use a variable set to either true or false // * Use an if..else block to determine which message to display // * Use the println macro to display messages to the terminal if fact { println!("hello"); } else { println!("goodbye"); } } </code></pre> </div> <h2> Topic: Flow control using if..else if..else </h2> <p><strong>Program requirements:</strong><br> Display "&gt;5", "&lt;5", or "=5" based on the value of a variable<br> is &gt; 5, &lt; 5, or == 5, respectively<br> <strong>Notes:</strong><br> Use a variable set to any integer value<br> Use an if..else if..else block to determine which message to display<br> Use the println macro to display messages to the terminal<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let compare = 5; if compare &gt; 5 { println!("{} is &gt; 5", compare); } else if compare &lt; 5 { println!("{} is &lt; 5", compare); } else { println!("{} is = 5", compare); } } </code></pre> </div> <h2> Topic: Decision making with match </h2> <p><strong>Program requirements:</strong><br> Display "it's true" or "it's false" based on the value of a variable<br> <strong>Notes:</strong><br> Use a variable set to either true or false<br> Use a match expression to determine which message to display<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let set = true; match set { true =&gt; println!("it's true"), false =&gt; println!("it's false"), } } </code></pre> </div> <h2> Topic: Decision making with match </h2> <p><strong>Program requirements:</strong><br> Display "one", "two", "three", or "other" based on whether<br> the value of a variable is 1, 2, 3, or some other number,<br> respectively<br> <strong>Notes:</strong><br> Use a variable set to any integer<br> Use a match expression to determine which message to display<br> Use an underscore (_) to match on any value<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let number = 100; match number { 1 =&gt; println!("one"), 2 =&gt; println!("two"), 3 =&gt; println!("three"), _ =&gt; println!("other"), } } </code></pre> </div> <h2> Topic: Looping using the loop statement </h2> <p><strong>Program requirements:</strong><br> Display "1" through "4" in the terminal<br> <strong>Notes:</strong><br> Use a mutable integer variable<br> Use a loop statement<br> Print the variable within the loop statement<br> Use break to exit the loop<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let mut iter = 1; loop { println!("{}", iter + 1); iter += 1; if iter == 4 { break; } } } </code></pre> </div> <h2> Topic: Looping using the while statement </h2> <p><strong>Program requirements:</strong><br> Counts down from 5 to 1, displays the countdown<br> in the terminal, then prints "done!" when complete.<br> <strong>Notes:</strong><br> Use a mutable integer variable<br> Use a while statement<br> Print the variable within the while loop<br> Do not use break to exit the loop<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>fn main() { let mut countdown = 5; while countdown &gt; 0 { println!("{}", countdown); countdown -= 1; } } </code></pre> </div> <h2> Topic: Working with an enum </h2> <p><strong>Program requirements:</strong><br> Prints the name of a color to the terminal<br> <strong>Notes:</strong><br> Use an enum with color names as variants<br> Use a function to print the color name<br> The function must use the enum as a parameter<br> Use a match expression to determine which color<br> name to print<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>enum Color { Red, Pink, White, } fn pintcolor(color: Color) { match color { Color::Red =&gt; println!("Red"), Color::Pink =&gt; println!("pink"), Color::White =&gt; println!("white"), } } fn main() { pintcolor(Color::White) } </code></pre> </div> <h2> Topic: Organizing similar data using structs </h2> <p><strong>Requirements:</strong><br> Print the flavor of a drink and it's fluid ounces<br> <strong>Notes:</strong><br> Use an enum to create different flavors of drinks<br> Use a struct to store drink flavor and fluid ounce information<br> Use a function to print out the drink flavor and ounces<br> Use a match expression to print the drink flavor<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>enum Drinks { Orange, Coke, Fanta, Lime, } // * Use a struct to store drink flavor and fluid ounce information struct DrinksFlavor { flavor: Drinks, fluid: f64, } // * Use a function to print out the drink flavor and ounces fn print_drinks(flavor: DrinksFlavor) { // * Use a match expression to print the drink flavor match flavor.flavor { Drinks::Orange =&gt; println!("orange"), Drinks::Coke =&gt; println!("coke"), Drinks::Fanta =&gt; println!("fanta"), Drinks::Lime =&gt; println!("lime"), } println!("{} ounces", flavor.fluid); } fn main() { let lime = DrinksFlavor { flavor: Drinks::Lime, fluid: 1.0, }; print_drinks(lime); let orange = DrinksFlavor { flavor: Drinks::Orange, fluid: 1.0, }; print_drinks(orange); let coke = DrinksFlavor { flavor: Drinks::Coke, fluid: 1.0, }; print_drinks(coke); let fanta = DrinksFlavor { flavor: Drinks::Fanta, fluid: 1.0, }; print_drinks(fanta); } </code></pre> </div> <h2> Topic: Data management using tuples </h2> <p><strong>Requirements:</strong><br> Print whether the y-value of a cartesian coordinate is<br> greater than 5, less than 5, or equal to 5<br> <strong>Notes:</strong><br> Use a function that returns a tuple<br> Destructure the return value into two variables<br> Use an if..else if..else block to determine what to print<br> Use a function that returns a tuple<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>#[derive(Debug)] struct Quantity { grocery: Box&lt;str&gt;, quantity: i32, id: i32, } fn display_quantity(grocery: &amp;Quantity) { println!( "{:#?} {:?} {:?}", grocery.grocery, grocery.quantity, grocery.id ); } fn main() { let grocery = Quantity { grocery: "garri".to_string().into(), quantity: 1, id: 4, }; display_quantity(&amp;grocery); display_quantity(&amp;grocery); display_quantity(&amp;grocery); } ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggy1mvdfo9q9bkex8aij.png) </code></pre> </div> rust learning rusty Exploring Rust: From Building Operating Systems to Web Development (rust resource) MORDECAI ETUKUDO Mon, 19 Feb 2024 11:46:32 +0000 https://dev.to/martcpp/exploring-rust-from-building-operating-systems-to-web-development-rust-resource-32ia https://dev.to/martcpp/exploring-rust-from-building-operating-systems-to-web-development-rust-resource-32ia <p>Rust, the systems programming language with a focus on safety, speed, and concurrency, has been making waves in the tech world. Its versatility and robustness make it an attractive choice for a wide range of projects, from small utilities to large-scale systems. In this article, we'll delve into the journey of learning Rust, exploring resources, tutorials, and projects that showcase its power and potential.</p> <h3> Building an Operating System with Rust </h3> <p>One of the most intriguing projects for Rust enthusiasts is the opportunity to create a small operating system from scratch using the <a href="proxy.php?url=https://os.phil-opp.com/" rel="noopener noreferrer">"Writing an OS in Rust"</a> series by Philipp Oppermann. This comprehensive guide takes you through the intricacies of operating system development, leveraging Rust's safety features and low-level capabilities. By following along with the series, developers gain a deep understanding of system-level programming while honing their Rust skills.</p> <h3> Learning Rust: Resources and Tutorials </h3> <p>For those embarking on their Rust journey, a solid foundation is essential. The Rust programming language has excellent documentation, including <a href="proxy.php?url=https://doc.rust-lang.org/book/" rel="noopener noreferrer">"The Rust Programming Language"</a>, often referred to as the Rust book. This resource covers everything from basic syntax to advanced topics like ownership and lifetimes. Additionally, <a href="proxy.php?url=https://doc.rust-lang.org/rust-by-example/" rel="noopener noreferrer">"Rust By Example"</a> provides hands-on learning with code snippets and exercises, making it an invaluable companion for mastering Rust concepts.</p> <p>To further solidify Rust proficiency, interactive tutorials like <a href="proxy.php?url=https://github.com/rust-lang/rustlings" rel="noopener noreferrer">"Rustlings"</a> offer a guided learning experience, focusing on practical exercises to reinforce key concepts. For developers transitioning from other languages, <a href="proxy.php?url=https://corrode.dev/idiomatic-rust/" rel="noopener noreferrer">"idiomatic rust"</a> provides insights into writing idiomatic Rust code, ensuring code quality and adherence to best practices.</p> <h3> Deep Dives and Advanced Topics </h3> <p>As developers progress in their Rust journey, exploring advanced topics becomes paramount. <a href="proxy.php?url=https://google.github.io/comprehensive-rust/" rel="noopener noreferrer">"The Comprehensive Rust Guide"</a> by Google offers a comprehensive overview of Rust's features and capabilities, making it an indispensable resource for diving deeper into the language. Additionally, Microsoft's training module <a href="proxy.php?url=https://learn.microsoft.com/en-us/training/modules/rust-create-program/" rel="noopener noreferrer">"Create a Program with Rust"</a> provides hands-on experience in building real-world applications, from CLI tools to web services.</p> <p>For those seeking a more immersive learning experience, video tutorials like the <a href="proxy.php?url=https://www.youtube.com/playlist?list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa" rel="noopener noreferrer">"Rust Programming"</a> playlist on YouTube offer visual explanations and demonstrations of Rust concepts, catering to diverse learning styles. Furthermore, ebooks such as <a href="proxy.php?url=https://nostarch.com/rust-rustaceans" rel="noopener noreferrer">"Rust for Rustaceans"</a> and <a href="proxy.php?url=https://dokumen.pub/zero-to-production-in-rust-an-introduction-to-backend-development-9798847211437.html" rel="noopener noreferrer">"Zero to Production in Rust"</a> provide in-depth insights into Rust development, covering topics ranging from language fundamentals to building production-ready applications.</p> <h3> Exploring Web Development in Rust </h3> <p>While Rust is renowned for its system-level capabilities, its prowess extends to web development as well. The <a href="proxy.php?url=https://www.youtube.com/watch?v=XZtlD_m59sM&amp;t=7s" rel="noopener noreferrer">"Web Development in Rust"</a> series on YouTube demonstrates how to leverage Rust's performance and safety features in building web applications. From backend frameworks like Rocket to frontend libraries like Yew, Rust offers a compelling ecosystem for full-stack development, combining speed, safety, and reliability.</p> <p>Rust's rise in popularity is a testament to its versatility and power as a programming language. Whether you're building an operating system from scratch, diving into advanced topics, or exploring web development, Rust offers a rich and vibrant ecosystem supported by a thriving community. With an array of resources, tutorials, and projects at your disposal, the journey of learning Rust is as rewarding as it is transformative. So, why wait? Dive into Rust today and unlock a world of possibilities in systems programming and beyond.</p> tutorial programming rust resources The Age of Oxidation: How Rust is Revolutionizing JavaScript Tooling MORDECAI ETUKUDO Wed, 14 Feb 2024 09:16:05 +0000 https://dev.to/martcpp/the-age-of-oxidation-how-rust-is-revolutionizing-javascript-tooling-3bem https://dev.to/martcpp/the-age-of-oxidation-how-rust-is-revolutionizing-javascript-tooling-3bem <p>JavaScript recently celebrated its <strong>28th birthday</strong>, reaffirming its enduring significance in the realm of programming languages. However, amidst this celebration, a paradigm shift is underway within the JavaScript ecosystem—one that involves replacing traditional JavaScript tooling and infrastructure with Rust. This transition is not merely a trend; it represents a seismic change that promises to redefine the landscape of web development.</p> <p>In this article, we delve into the rationale behind this shift and its profound implications for developers and businesses alike. At its core, the movement to adopt Rust stems from the need to address longstanding challenges inherent in JavaScript-based tooling, particularly concerning performance, security, and scalability.</p> <p>A notable example of this transition is exemplified by industry giants like Shopify, who witnessed a remarkable transformation in their build processes. By embracing Rust-based tooling, their build times plummeted from over an hour to mere seconds—an astonishing feat that underscores the potency of this new approach.</p> <p>To contextualize this shift, it's essential to understand the evolutionary trajectory of JavaScript. Initially conceived as a means to imbue web pages with interactivity, JavaScript faced stiff competition from technologies like Adobe Flash and Java applets. Yet, through relentless innovation and widespread adoption, JavaScript emerged victorious, cementing its status as the de facto front-end language.</p> <p><em>The Golden Age of JavaScript</em>, spanning from 2009 to 2019, witnessed unprecedented advancements in language features and front-end frameworks. However, as web applications burgeoned in complexity, the limitations of JavaScript-based tooling became increasingly apparent. This ushered in the era of oxidization—the third age of JavaScript—wherein the imperative to rewrite existing infrastructure in Rust became manifest.</p> <p>Rust, with its emphasis on performance, safety, and concurrency, presents an ideal alternative to traditional JavaScript tooling. Node.js, once heralded as a groundbreaking JavaScript runtime, has been surpassed by its Rust-based successor, offering enhanced type safety and security features. Similarly, tools like _TurboPack and OxLint h_ave emerged as stalwarts of this new era, boasting unparalleled speed and reliability compared to their JavaScript counterparts.</p> <p>For developers, this transition opens up a wealth of opportunities. By leveraging Rust-based tooling, they can streamline their development workflows, enhance code quality, and fortify their applications against security vulnerabilities. Moreover, mastering Rust—a language lauded for its elegance and expressiveness—positions developers at the vanguard of innovation, equipping them with the skills to contribute meaningfully to this burgeoning ecosystem.</p> <p>In conclusion, the age of oxidization represents a paradigm shift of monumental proportions within the JavaScript community. As Rust-based tools continue to proliferate and mature, developers stand poised to reap the benefits of enhanced productivity, reliability, and security. Whether embracing these tools or embarking on a journey to master Rust, developers hold the keys to unlocking the full potential of this transformative transition.</p> <p>So, as we navigate this brave new world of JavaScript development, let us embrace the spirit of innovation and evolution—let us stay Rusty.</p> webdev rust javascript oxidation Five Things I Wish I Knew Before Learning Rust: Navigating Prerequisites and Resources MORDECAI ETUKUDO Tue, 13 Feb 2024 15:48:24 +0000 https://dev.to/martcpp/five-things-i-wish-i-knew-before-learning-rust-navigating-prerequisites-and-resources-2b36 https://dev.to/martcpp/five-things-i-wish-i-knew-before-learning-rust-navigating-prerequisites-and-resources-2b36 <p>Before diving into learning Rust, there are several important things I wish I knew. Starting with prerequisite knowledge, Rust being a low-level language with memory management at its core means having a fundamental understanding of certain computer science concepts and practical experience with other low-level languages is extremely helpful.</p> <p><strong>Firstly</strong>, understanding memory regions like the <em>stack</em>,_ heap_, and <em>static memory</em>, along with their respective uses, is crucial. Familiarity with memory allocation, deallocation, and the difference between manual memory management and garbage collection is also essential.</p> <p>Additionally, <em>comprehending concurrency and parallelism</em>, including <em>multi-threading, synchronization</em>, and parallel processing, is vital when working with Rust's concurrency features. A basic understanding of compiled versus interpreted languages, as well as object-oriented and functional programming, is beneficial as well. These computer science basics enable a better grasp of Rust's features and trade-offs, aiding in understanding Rust's feature set and compile-time error messages.</p> <p>**Secondly, **having practical experience with other low-level languages, especially C and C++, is invaluable. Understanding references, raw pointers, smart pointers, and concepts like zero-cost abstractions and dynamic versus static dispatch from C++ can significantly ease the learning curve in Rust. Rust builds upon these features while solving some of the problems present in C and C++, such as eliminating null pointers and providing explicit error handling with result types.</p> <p><strong>Thirdly</strong>, knowing where to find the best Rust learning resources is crucial. There are various resources available, including the <strong><em>Rust Book, Rust by Example, the Rustlings GitHub repository for exercises, and curated lists like the Idiomatic Rust GitHub repository</em></strong>. Additionally, there are video series and books covering advanced topics and specific use cases like operating systems development and web assembly.</p> <p><strong>Fourthly,</strong> understanding that productivity in Rust may initially be slower due to its strict compiler and low-level nature is essential. Unlike languages like JavaScript or Python, Rust requires more upfront thinking about types and memory management, which can slow down initial development. However, Rust's focus on safety and performance ultimately leads to improved code quality and developer skills over time.</p> <p><strong>Lastly,</strong> recognizing that Rust is not just hype but a language with staying power is important. Despite initial uncertainties, Rust has seen significant community growth and industry adoption, indicating its longevity and relevance in the software development landscape.</p> <p>In conclusion, while learning Rust may require effort and patience, the rewards in terms of improved understanding of low-level concepts, code quality, and long-term career prospects are substantial.</p> rust computerscience learning github