Advanced Go Tips And Tricks
We covered a few useful tricks in the previous installment of this blog series, and now I’m going to show you a few more which might make your life even simpler.
We covered a few useful tricks in the previous installment of this blog series, and now I’m going to show you a few more which might make your life even simpler.
It’s been a while since I’ve started programming with Go, and I managed to pick up certain tricks along the way, which I’ll present you with. Use them wisely and you’ll be on your way to creating that beautiful product or service you’ve been itching to start.
Coding competitions are a good way to test and improve your skills. Some of the skills you might already have just by the nature of the engineering job itself - you have to set up your development environments, trouble-shoot connectivity issues, and solve problems when they occur. I don’t need to tell you that it’s better to learn these skills in a controlled environment, and perhaps not while watching your production systems fail. And in case that does happen - you don’t want to be the one who’s just looking at whatever metrics you have and pray for some kind of miracle. But, putting a time limit on a competition - it keeps some pressure on you, just like the real thing.
As I wrote some weeks ago in “How to live inside a docker container?”, when you pass a docker socket to your container, you’re essentially enabling the container full access to your Docker host OS. This means that you can create containers, pull images, or more destructively - stop and delete containers and images.
When you have a blog like this one, or are trying to promote some kind of content like a book on API development with Go, you might be thinking of how to expose your content to a wider audience. Sure, writing about what people actually need is always good, but how can you make sure that you stand out?
When dealing with a new language, if it’s migrating from PHP to Node, or if it’s your first time trying out Go, you eventually get to the point when you have to think about how you will use your new application in production. How you will deploy it, how you will run it, and how you will make sure that it’s running well. I’m a big advocate od Docker, let me show you why.