Boot.dev Blog
Concurrency In Rust; Can It Stack Up Against Go's Goroutines?
by Lane Wagner - Boot.dev co-founder and backend engineer
One of the primary goals of the Go programming language is to make concurrency simpler, faster, and more efficient. With Rust growing in popularity let's see how its concurrency mechanisms stack up against Go's.
Rust vs Go - Which Is More Popular?
by Lane Wagner - Boot.dev co-founder and backend engineer
Go and Rust are two of the hottest compiled programming languages, but which is more popular, Go or Rust?. I develop in Go full-time and love it, and I'm learning more about Rust recently - it's an exciting language. Let's explore some differences between the two and look at which is growing faster in the popularity polls.
Achieving Data Integrity Using Cryptography
by Lane Wagner - Boot.dev co-founder and backend engineer
Data integrity refers to the accuracy, legitimacy, and consistency of information in a system. When a message is sent, particularly using an untrusted medium, data integrity provides us with confidence that the message wasn't tampered with. For example, the SSL signature of Boot.dev provides confidence that the webpage and data coming from our servers are coming from us and not the NSA.
Range Over Ticker In Go With Immediate First Tick
by Lane Wagner - Boot.dev co-founder and backend engineer
The Go standard library has a really cool type - Ticker. Tickers are used when you want to do something at a regular interval, similar to JavaScript's setInterval. Here's an example:
(Very) Basic Intro To White-Box Cryptography
by Lane Wagner - Boot.dev co-founder and backend engineer
White-box cryptography combines methods of encryption and obfuscation to embed secret keys within application code. The goal is to combine code and keys in such a way that the two are indistinguishable to an attacker, and the new "white-box" program can be safely run in an insecure environment.
Using 'Go Generate' To Deploy Multi-Process Apps
by Lane Wagner - Boot.dev co-founder and backend engineer
In microservice architectures, it's fairly common to have a project that includes different worker types. A Makefile can be used to manage the creation of multiple programs, but the Go toolchain has a tool that can be used as well, go generate. Here are some examples of how it can be used:
What Are Golang's Anonymous Structs?
by Lane Wagner - Boot.dev co-founder and backend engineer
An anonymous struct is just like a normal struct, but it is defined without a name and therefore cannot be referenced elsewhere in the code.
Quantum Programming 101: Superdense Coding Tutorial
by Macauley Coggins - Researcher and Founder of Quantum Computing UK
Superdense coding is a quantum communications protocol that allows a user to send 2 classical bits by sending only 1 qubit.
Announcing Go-TinyTime, Go-TinyDate's Sister Package
by Lane Wagner - Boot.dev co-founder and backend engineer
time.Time is the perfect choice for handling times in Go in most cases, it even comes in the standard library! The problem is that the time.Time{} struct uses more than 24 bytes of memory under most conditions. Go-TinyTime solves this problem by restricting the available dates to the range between 1970 - 2106, and only supporting UTC timezones. This brings data usage down to just 4 bytes of memory.
Golang Conversions - Ints To Strings And Strong Typing
by Lane Wagner - Boot.dev co-founder and backend engineer
Go is a strongly typed language, which means at any point a developer should know exactly what type of value they are dealing with. For example, if we have a function that prints a string, we can't just give it an integer and expect it to work. We have to cast it to a string explicitly:
How To Separate Library Packages in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
I've often seen, and have been responsible for, throwing code into packages without much thought. I've quickly drawn a line in the sand and started putting code into different folders (which in Go are different packages by definition) just for the sake of findability. Learning to properly build small and reusable packages can take your Go career to the next level.
I Wrote Go-TinyDate, The Missing Golang Date Package
by Lane Wagner - Boot.dev co-founder and backend engineer
time.Time makes dealing with dates and times in Go a breeze, and it even comes bundled in the standard library! However, a time.Time{} struct uses more than 24 bytes of memory under most conditions, and I've run into situations where I need to store millions of them in memory, but all I really needed was a UTC date! Go-TinyDate solves this with just 4 bytes of memory.
Mutexes in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
Golang is King when it comes to concurrency. No other language has so many tools right out of the box, and one of those tools is the standard library's sync.Mutex{}. Mutexes let us safely control access to data across multiple goroutines.
Interfaces in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
Interfaces in Go allow us to treat different types as the same data type temporarily because both types implement the same kind of behavior. They're central to a Go programmer's toolbelt and are often used improperly by new Go developers, which leads to unreadable and often buggy code.
Wrapping Errors in Go - How to Handle Nested Errors
by Lane Wagner - Boot.dev co-founder and backend engineer
Errors in Go are a hot topic. Many newcomers to the language immediately level their first criticism, "errors in go are clunky! Let me just use try/catch!" This criticism is well-meaning but misguided.
JWT Authentication in Golang
by Lane Wagner - Boot.dev co-founder and backend engineer
Go is becoming very popular for backend web development, and JWT's are one of the most popular ways to handle authentication on API requests. In this article, we'll go over the basics of JWT's and how to implement a secure authentication strategy in Go!
How Do Brute-Force Attackers Know They Found The Key?
by Lane Wagner - Boot.dev co-founder and backend engineer
To "Brute Force" something (when talking about computers) means to systematically try every possible combination until you find the right answer.
AES-256 Cipher – Python Cryptography Examples
by Lane Wagner - Boot.dev co-founder and backend engineer
Want to encrypt text with a password or private key in Python? AES-256 is a solid symmetric cipher that is commonly used to encrypt data for oneself. In other words, the same person who encrypts the data also decrypts it, the way personal password managers work.
Will Banning Cryptography Keep the Country Safe?
by Lane Wagner - Boot.dev co-founder and backend engineer
Politicians in the United States have been claiming recently that end-to-end encryption is certainly too dangerous to permit. This movement is serious. Congress even introduced a bill that would remove the protections that we currently have that allow us to legally encrypt information. Lindsey Graham is one such proponent of this restrictive legislation:
How To Cache Images - React Native Expo (Managed)
by Lane Wagner - Boot.dev co-founder and backend engineer
Caching images in React Native can be easy, even if you are using Expo's managed workflow. The problem many devs run into is that React Native only supports caching images on IOS out of the box.
Is Open-Source Cryptography Really Secure?
by Lane Wagner - Boot.dev co-founder and backend engineer
The purpose of cryptography is to keep information private, and the purpose of open-source is to make code public... So we shouldn't open-source our cryptography algorithms right?
Hashing Passwords - Python Cryptography Examples
by Lane Wagner - Boot.dev co-founder and backend engineer
Building a from-scratch server or using a lightweight framework is empowering. With that power comes responsibility, specifically the responsibility to securely store user's passwords.
Why is Exclusive Or (XOR) Important in Cryptography?
by Lane Wagner - Boot.dev co-founder and backend engineer
If you are getting into cryptography, or just trying to understand the fundamentals, you may have noticed that the exclusive or (XOR) operation is used quite often, especially in ciphers. XOR is a simple bitwise operation that allows cryptographers to create strong encryption systems, and consequently is a fundamental building block of practically all modern ciphers. Let's dive into the details and see what makes XOR so important.
JavaScript With Statement Explained – A Deep Dive
by Lane Wagner - Boot.dev co-founder and backend engineer
JavaScript's built-in with statement specifies the default object for the given property and gives us a shorthand for writing long object references. More precisely, it adds the given object to the head of the scope chain.
JavaScript Map Function Explained - A Deep Dive
by Lane Wagner - Boot.dev co-founder and backend engineer
The built-in JavaScript map function returns a new array, where each element in the new array is the result of the corresponding element in the old array after being passed through a callback function. Later in the article, we'll do a deep dive into some more advanced concepts regarding the map function and its uses.
