Rust string manipulations

Strings are the building blocks of text data, and it is crucial to know how to manipulate them to suit your needs efficiently.  In this article, we’ll explore the different ways to manipulate strings in Rust with examples. There are two types of strings in Rust: string slice and String Let’s start with concatenation… Concatenation Try running this code in Rust Playground: You’ll get an error like this one: While…

Implementing a secure password reset in Node.js

Note: This article first appeared on the LogRocket blog Creating a strong password that you can actually remember isn’t easy. Users who use unique passwords for different websites (which is ideal) are more likely to forget their passwords. So, it’s crucial to add a feature that allows users to securely reset their password when they forget it. This article is about building a secure reset password feature with Node.js and Express.js. Now, let’s…

The guide to signal handling in Rust

A signal is a software interrupt sent to a process by the operating system or another process to notify it of an event. For example, when you try pressing Control+C while your program runs on a terminal, it terminates the process, correct? That’s one of the most common signals and signal handling you can see in action. We’ll explore how to handle that signal and others in Rust. A signal can be…

Top Companies Using Rust and their career page

Since the release of Rust first version on the 15th of May, 2015, there has been increasing adoption of Rust by major tech companies. This is a curated list of companies leveraging Rust and their career page, so, you can easily find them and apply if you need to. Amazon Amazon is one of the 5 big tech companies in the US and the largest retailer of e-commerce. They use…

Understanding Closures in Rust

Like several other languages, Rust programming language supports closures also known as anonymous functions or lambda functions which is a powerful feature used for varying reasons depending on who you ask. We’ll break down closures in Rust in this article, so you can start using it in your Rust code immediately and properly. A closure in Rust is a function without a name that can be used as a variable.…

Higher-Order Functions in Javascript

Functions are a fundamental building block of JavaScript. They can be used to perform calculations, manipulate data, and control the flow of execution. In JavaScript, functions are also first-class citizens, which means that they can be treated like any other value. First-class citizen in a programming language means that an entity (such as a function) has the same properties and abilities as other entities. This means that functions can be:…

Promises In Javascript

Promises In Javascript In this guide, we’ll learn the basics of what a Promise is in Javascript, the why, and how you can use them. Table of content What is a Promise in Javascript First of all, do not overthink the meaning of the term Promise it’s exactly the same promise you know. You know how your mom promises to get you a new cartoon series if you come out with the…

Rust’s Newtype Pattern: Adding Type Safety and Clarity

The newtype pattern is a Rust idiom that can be used to add type safety and clarity to code. At its core, the newtype pattern involves wrapping an existing Rust type (like a number or a string) inside a new struct. This might seem unnecessary at first, but the magic is that this new struct becomes a distinct type and ensures that you are using the correct type where necessary.…

Building a simple Rust webserver

What comes to mind when you think of building a web server with Rust? I bet you think of using Axum, Rocket, Actix, etc., right? These are mature frameworks for building web applications with Rust. By the end of this article, we’ll learn how to build a web server of our own that will receive a get or post request and respond to it without any of those shiny frameworks.…

Making Your Python Code Faster Using Rust

Python is an interpreted and dynamically typed programming language, that has become increasingly popular for many reasons, a few of which include its simplicity compared to other programming languages such as C, C++, and Java. It allows you to accomplish more with less code due to its wide range of libraries. Additionally, it has a very large and supportive community, making it a preferred choice for academic and research work.…