Black Friday Sale!
Save 50% on Web Development with Go and Test with Go until Dec 3.
Both courses have lifetime access, a 30-day money back guarantee, and free updates. This is also the biggest discount I offer on the courses, and I only do it once a year around Black Friday.
Thank you for your continued support and happy coding!
Jon Calhoun
One of the most common change requests I get with my Web Development course is to stop using GORM, and instead use the database/sql package that is part of Go’s standard library. When I receive feedback like this I often respond asking, “Why?” Why do they feel the database/sql package would be better suited for their education? Why do they feel ORMs will be problematic long term? I don’t ask these questions to be snarky or because I don’t care; I ask because I truly want to understand a problem before I look for solutions, and oftentimes people will tell you their problem is X, when in reality X is only a symptom of a deeper problem.
There has been a lot of talk about generics lately in the Go community which as lead to me thinking about them a lot lately. In thinking about generics, my mind instinctively wandered to code generation because that has been my go-to tool when I do need something resembling a generic. In fact, I have written about using code generation to get by without generics in Go in the past.
SQL injection is a method used by hackers to attempt to trick your code into running arbitrary (read - REALLY BAD) queries on your database.
Learn how to use code generation to create type-safe code (like a Queue or LinkedList) without having to rewrite the same thing over and over again.
In this video we cover the stack data structure. Specifically, we talk about how they relate to the real world and then we discuss how to implement a stack using Go.
In this video we cover what a queue is, how it relates to lines (like at the grocery store) in the real world, and how to implement a Queue in Go.
Learn how to perform common operations with strings in Go. This article discusses how to write multiline strings, concatenate strings efficiently, convert various data types into strings, checking for prefixes, and converting strings to byte slices.
Go's template package provides many useful built-in functions. Learn to use a few of the more common ones, as well as how to add custom fucntions to your templates so that you can add any functionality you need.
This tutorial explains how to connect to a Postgres DB using the database/sql and lib/pq packages. It also covers potential errors and solutions.
A tutorial explaining how to create a custom rand package with functions for creating random strings of varying length with custom of preset character sets.
Learn to insert new records into a Postgres database using Go's database/sql package, along with how to get the resulting ID of newly created records.
Learn about the difference between capacity and length and how to properly utilize them to make your Go code faster, cleaner, and memory efficient.
In this progress update we explore why it takes me so long to complete a project when using it to come up with course notes. I'll also give you an inside look at my notes that I use for courses.
View past progress updates
↓ Or check out some of my longer series. ↓
Each series covers a broader topic and is composed of several articles
PostgreSQL is an open source relational database system that has been around for well over a decade and has proven to be a great all around storage choice when developing a web application.
In this series we are going to walk through everything from first installing PostgreSQL 9.5 all the way to using it with a Go application. While this post will cover all of the basics required to get started using SQL with Golang, it is not a full course on SQL. It is instead intended to guide you by giving you enough information to be productive, while not overloading you with details that can be learned as you progress.
In this series we will cover topics like:
database/sql
package provided by Go's standard library. Again, this includes querying, inserting, updating, and deleting records.This series is no longer being updated. Instead, check out the course I created based on it - Algorithms with Go
Algorithms are a core component in a computer science education, and when taught properly they can help a developer improve his or her skills massively. In this series we will work to both understand how common computer algorithms work, as well as how to properly code each of them in Go.
By coding each algorithm as we learn it, you will develop the skills necessary to translate a conceptual idea into correct and efficient code. While many developers will know how to solve a problem set before them, oftentimes bugs and issues can stem from minor mistakes that algorithm practice can help remedy.
In addition to coding each algorithm we will also discuss how it works as well as the efficiency of each algorithm. That is, we will discuss how fast or slow the code will be based on the size of the input. This is important because in many real world situations you can opt for simpler - but slower - code if you know your inputs won't be too large. Alternatively, you could determine that the simpler solution won't work for your inputs and know that you will need to spend some extra time on a more efficient algorithm.
If you are relatively new to programmer, or simply don't have a formal computer science education, I invite you to check out these articles. You won't be disappointed!
Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.
Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.
©2018 Jonathan Calhoun. All rights reserved.