Golang Project Structure

Tips and tricks for writing and structuring Go code

go programming

Tag

Replacing 12 Powerful Linux Bash Commands With Go

The command line on a Ubuntu Linux computer. This is where you would enter Bash commands.

Every serious software developer or system administrator must have at least a basic grasp of Bash commands, because they can often help you to manage computer systems much more efficiently and effectively than if you were only to use a point-and-click GUI. In this post we’re going to write Go code that will aim to […]

256 Shades of Grey: Converting Colour Images to Greyscale

A beautiful rainbow in a rural landscape.

In this post, I am going to show you how to transform a full-colour image into one made up entirely of different shades of grey. The sort of image that we will create is called greyscale, because every colour that makes up the image is stored as a position on a predetermined scale of greys […]

Scraping Stock Market Prices With Impressive Ease

Global stock markets increasingly affect everyone’s lives, whether we like it or not. Investors seek financial returns from profitable companies, and workers may find it easier to bargain for new jobs or pay rises when the markets are riding high, at least if they possess the sorts of skills that are in demand. Economists and […]

Playing With the Fibonacci Sequence in Go

You may have studied the Fibonacci sequence in school, but it’s also useful to know how to work with Fibonacci numbers as a professional software engineer or web developer, because it’s the kind of thing that job interviewers may ask us questions about when they want to test our knowledge or gauge our ability to […]

How to Generate Safe and Secure Passwords

There are many services online that will claim to create unique, reliable and secure passwords for you, but can you trust other people’s code? It’s hard to know. Often you can trust the largest and most popular websites, but sometimes there are bugs or even intentional backdoors that will expose your generated passwords to the […]

Drawing an Awesome Chessboard in Go

Since chess is one of the oldest games in the world, the black-and-white chessboard is an instantly recognizable design. It originated in Asia around 1,500 years ago. In this post, we’ll create an image of a chessboard in the Go programming language. But we’ll gradually think through the problems involved before we actually draw it. […]

Bitmasks and Binary: What Does That Weird Pipe Character Do?

We all know what piping looks like in the real world, but when we talk about pipes in computing, we’re not necessarily all talking about the same thing. I’ve Seen Pipes in Linux and Mac OS In UNIX-based operating systems, the pipe character, also known as the vertical bar, is used to send the output […]

Writing Secret Messages With a Caesar Cipher

A statue of the Roman general Julius Caesar.

I’m going to show you one of the simplest methods available to secure a message, making it harder for unwitting observers to read. A cipher is a word used for a method that allows text to be encrypted or decrypted — in other words, made harder to read and then restored to an original form. […]