Why does privacy matter?

Privacy is not about whether you have something to hide. It’s about whether bad people can do bad things to you, because security is impossible without privacy. If others can look over your shoulder any time, they can see all your passwords. If you couldn’t hide the key to your home in a pocket or purse, others could copy the key. If the walls of your home were glass, anyone could see your home defenses, where you keep valuables, when you’re sleeping or away, and how to disarm or unlock any alarm systems, safes, etc....

January 13, 2024

Publishing Go packages

There are many ways you can share Go code and applications. Here are a few. publishing to the Go package index (pkg.go.dev) This allows anyone with Go installed to download your package with go get or go install. go get is for getting code, and go install is for installing executables. More details on those commands are in the Go docs and this Stack Overflow discussion. Here are the official docs on publishing to pkg....

January 12, 2024

Impressive programming languages

Here’s why some languages are impressive to me. The languages are sorted alphabetically. C C is the oldest widely used language, and almost all of today’s widely used languages were heavily influenced by C (at least indirectly). It tends to have the fastest execution speed of all high-level languages and has relatively few features which makes it quick to learn. C is used in spaceships and space exploration rovers, among many other cases....

December 9, 2023

Which language should you learn first?

Don’t spend too much time choosing your first programming language. It can be a difficult choice to make, so here are some notes on what several languages are good for. If you will soon start a course, bootcamp, etc. that might choose a language for you, figure out which one and start learning ahead. It can be good to focus on just one language for a while when you’re learning your first language....

October 27, 2023

Learning Go

Here are various resources that are good to know about while learning the Go programming language. I created a list of commonly used Go packages and other dev tools at Go dev tools. getting started if you’re new to programming, check out Golang Tutorial For Beginners - YouTube A Tour of Go is probably the best way for developers with experience in another language to start learning Go Go Playground is an online Go editor and runner Tutorial: Get started with Go Go by Example Organizing a Go module Go FAQs go....

November 22, 2022

How to control the terminal's cursor

Ever wanted to move the cursor up while printing output in a program? You can. Here’s how with C++, and the same string works with any language in many terminals: cout << "\x1b[A"; That moves the cursor up one line. You can move it up by as many lines as you want; here’s how to move it up by 3 lines: cout << "\x1b[3A"; A variable works there too: int lines = 3; cout << "\x1b[" << lines << "A"; You can also move the cursor down, right, and left....

May 9, 2022

Learning recursion with C++

Every programmer should be comfortable with recursion. Recursion is a type of loop created by making a function call itself. Here’s a recursive function that loops infinitely (until the computer runs out of memory) when called: void print_stars() { cout << "*"; print_stars(); } Just like for loops and while loops, recursion can be used to do something repeatedly. Some problems are easier to solve with one kind of loop than another....

May 2, 2022

How to print emoji with C++

Printing emoji can be tricky because C++ running in Windows doesn’t always support UTF-8. Emoji and other Unicode symbols can be printed with C++ by copying the symbol itself into your code or by using a Unicode code point. You can find emoji and other symbols at sites like unicode-table.com or with a keyboard shortcut (Windows+. on Windows, ctrl+cmd+space on Mac, and ctrl+. on some Linux distros). On Mac and Linux, working with emoji in C++ is straightforward and doesn’t require any tricks....

April 28, 2022

How to use colors in terminals

You don’t need another dependency to color text. With many programming languages, you can change the color and the style of your output to a terminal using ANSI codes. Here’s how: with C++: cout << "\x1b[31m This will be red! \x1b[0m This will be the default color."; with Python: print("\x1b[31m This will be red! \x1b[0m This will be the default color.") As you can see, the string did not need to change at all even with a different programming language....

March 24, 2022

Learning SQL

SQL (Structured Query Language) is a commonly used and reliable way for programs to store and retrieve data. In many cases, it’s much better in many ways than just using files directly. There’s a lot that can be learned about SQL. Here are some resources to get you started. Learn SQL with SQLBolt and/or The SQL Murder Mystery. Choose a database technology and tools. Databases by Full Stack Python is a guide (not entirely for Python) with various resources about databases....

October 15, 2021