Sorting in Go – Don’t Reinvent This Wheel

sorting hat

Sorting is a common task in programming, and for that reason most languages have a default sorting algorithm in their standard library. Go is one such language. Go has gone about providing sort functionality in one of the most elegant ways possible, via an interface. Any type that satisfies this interface can be sorted using … Read more Sorting in Go – Don’t Reinvent This Wheel

Using Concurrent Subscribers – RabbitMQ in Python (pika)

rabbit and python

It’s a fairly common scenario to subscribe to a Rabbit queue and process messages before acknowledging receipt. The pika package for dealing with RabbitMQ in Python however is only single-threaded out of the box. If we want to make a network or database call before each acknowledgment our subscribers can get really slow. Waiting on … Read more Using Concurrent Subscribers – RabbitMQ in Python (pika)

Don’t Go To Casting Hell; Use Default Native Types in Go

hell red sky

Go is strongly typed, and with that, we get many options for simple variable types like integers and floats. The problem arises when we have a uint16, and the function we are trying to pass it into takes an int. We find code riddled with int(myUint16) that can become slow and annoying to read. Go’s … Read more Don’t Go To Casting Hell; Use Default Native Types in Go

Leave Scrum to Rugby, I Like Getting Stuff Done

scrum rugby game

Scrum is a buzzword, the virtue signal of choice for middle-management in software organizations. If your goal as a manager is to implement a system by which you: Speed up the appearance of progress Pay for 2x the number of people you need Gather fine-grained data based on meaningless metrics Then Scrum is exactly what … Read more Leave Scrum to Rugby, I Like Getting Stuff Done

Loops in Rust; Breaking From Nested Loops

Looping in Rust isn’t the same as standard C-style languages. The syntax is different and there are some powerful options that make looping easier. First, let’s go over some looping basics, then we will cover how to handle breaking and continuing in nested loops. Standard For-Loop Which prints: 0..10 is an iterator where the lower-bound … Read more Loops in Rust; Breaking From Nested Loops

Variable Shadowing In Rust – “Let” Is Immutable But Not Constant

Let’s take a look at some of the common pitfalls with the keywords let and mut. Then, we will learn how immutable != constant by using variable shadowing. Getting started with Rust can be daunting. Rust is well-known for being a safe language. One of the ways in which Rust is safe is through type-safety. … Read more Variable Shadowing In Rust – “Let” Is Immutable But Not Constant

Quantum Programming 101: Backend Monitor

Introduction In a previous tutorial we showed how you can get basic information on all quantum devices using backend_overview(). While this function is great to get information on all quantum devices at a glance it is not detailed on specific information such as qubit and gate errors. To get more detailed information on a quantum … Read more Quantum Programming 101: Backend Monitor

Concurrency In Rust; Can It Stack Up Against Go’s Goroutines?

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. A Refresher On Goroutines In Go, concurrency is accomplished by spawning new goroutines: In the example above, we use the go … Read more Concurrency In Rust; Can It Stack Up Against Go’s Goroutines?

Rust vs Go – Which Is More Popular?

Go and Rust are two of the hottest compiled programming languages. I develop in Go full-time and love it, and I’m learning more about Rust recently – its an exciting language. Let’s explore some differences between the two and look at which is growing faster in the popularity polls. Popularity Stats According to the StackOverflow … Read more Rust vs Go – Which Is More Popular?

Range Over Ticker In Go With Immediate First Tick

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: As per the docs, a ticker is a struct that holds a receive-only channel of time.Time objects. In the example at the beginning of … Read more Range Over Ticker In Go With Immediate First Tick