Scala vs Go: Comparing Everything You Need to Know

scala vs go

Scala and Golang are newer languages, only coming on to the scene after the turn of the century, but in that time they’ve managed to become two of the highest-paid languages for developers, with the industry benefiting from their fresh creation. But what makes these languages so special? What are Go and Scala? Developed at …

Read more

Golang vs Java: 6 Key Comparisons

golang vs java go

Golang (or Go) and Java offer an interesting comparison because despite their wide differences, there are also key similarities in how and where they’re used by programmers. But which one is best for you? We’ll start by breaking down the languages, how they work and how they’re used – like I did with Golang vs …

Read more

What is Go Good For? (And What Is Golang Used For?)

what is go good for and used for golang

In 2007, frustrated by some of C++’s inefficiencies and overcomplicated nature, and desiring a programming language designed specifically for multi-core processors and effectively managing large projects, three Google engineers, Robert Griesemer, Rob Pike, and Ken Thompson, designed the Go language. The goal was to build an improved C++ that was much easier to use — …

Read more

Golang vs C++: Which is Best For Your Next Project

go vs c++

Needing to be a math genius to learn code is a thing of the past, as more high-level programming languages offer an alternative to low-level machine code, making it more accessible than ever to get coding. But with dozens of languages available, which ones are worth learning? Regardless of whether you plan to work in …

Read more

Quick Sort in Golang


Quicksort is an efficient sorting algorithm commonly used in production sorting implementations. Like Merge Sort, Quicksort is a divide-and-conquer algorithm. As the name implies, Quicksort is one of the fastest sorting algorithms, but you have to pay attention to detail in your implementation because if you’re not careful, your speed can drop quickly. Divide Select …

Read more

How to Write Insertion Sort in Go


Insertion sort builds a final sorted list one item at a time. It’s much less efficient on large lists than more advanced algorithms like quicksort or merge sort. Insertion sort is a simple algorithm that works just like you would arrange playing cards in your hands. A slice is first split into sorted and unsorted …

Read more

Merge Sort in Golang with Examples


Merge sort is a recursive sorting algorithm and, luckily for us, it’s quite a bit faster than bubble sort. Merge sort is a divide and conquer algorithm. Divide Divide the input slice into two (equal) halves Recursively sort the two halves Conquer Merge the two halves to form a sorted array Full example of the merge sort algorithm Merge sort actually has two functions involved, the recursive mergeSort function, and the merge function. Let’s write the mergeSort() function first. It’s a recursive function, which means it calls itself, and in this case, it …

Read more

Writing Bubble Sort in Go from Scratch

bubbles in water

Bubble sort is named for the way elements “bubble up” to the top of the list. Bubble sort repeatedly steps through a slice and compares adjacent elements, swapping them if they are out of order. It continues to loop over the slice until the whole list is completely sorted. Full example of the bubble sort algorithm Using the algorithm in code Why use bubble sort? Bubble sort is famous for …

Read more

How to Properly Use Defer in Golang

hand signal

What is the “defer” keyword in Go? In the Go programming language, defer is a keyword that allows developers to delay the execution of a function until the current function returns. What throws some people off is that the deferred function’s arguments are evaluated immediately, but the function itself doesn’t fire until the wrapping function …

Read more

Comprehensive Guide to Dates and Times in Go


Keeping track of time in code has long been every developer’s nightmare. While no language or package manages time perfectly, I think Golang does a pretty good job out-of-the-box. This full tutorial should answer ~90% of the questions you’ll have about time management in Go. Table of Contents Overview – How dates and times are …

Read more