Justin Garrison
March 15, 2022

Just go - 123dev #63

Posted on March 15, 2022  •  3 minutes  • 490 words
Representing what different level of latency are like with a swimming pool

Comments

Taking space

I’m taking up this comment to dedicate it to my friends and strangers in Ukraine fighting for their freedoms and in some cases fleeing for their safety.

This newsletter is focused on developers but beyond that it’s focused on humans. Seeing pictures of my developer friends who have had to put down their keyboards and take up guns breaks my heart.

Always focus on being human first. If we’re not good humans we can’t be good developers.

Go

I remember when I first was learning go. I struggled a lot. At the time I was writing python, ruby, perl, and bash but didn’t consider myself a developer. I tried to read everything I could to learn go. It wasn’t until I put down the books and started coding that I began to understand it.

I thought I was dumb because I couldn’t write a simple go app from a blank IDE without looking anything up. Maybe programming wasn’t for me.

I kept trying. Year over year I would pick go to write something instead of other languages and I got better. It’s not my favorite language to write, but I understand some of it’s strengths and use it more often.

I still can’t write a simple go app without looking things up, but I’ve learned that that doesn’t mean anything beyond the fact that it’s not something I have to do.

Practice is what helps you learn. You could read lots of books about how to play a piano, but until I sit down and play, it’s all just theory.

This could be helpful when making web requests in code. Use your browser’s inspector to generate a curl command and then translate that directly into code in various languages.

GitHub - curlconverter/curlconverter: convert curl commands to Python, JavaScript, Go, PHP, R, Dart, Java, MATLAB, Rust, Elixir and more convert curl commands to Python, JavaScript, Go, PHP, R, Dart, Java, MATLAB, Rust, Elixir and more - GitHub - curlconverter/curlconverter: convert curl commands to Python, JavaScript, Go, PHP, R, Dart, Java, MATLAB, Rust, Elixir and more

The Go playground has been useful to help troubleshoot code snippets and get support. I always found it a bit lacking and minimal (just like go). This playground adds a few nice features and even has a self-hosted option.

Better Go Playground Better Go Playground with syntax highlight support

This site can convert JSON output from an API directly into a go struct. I wish I had this years ago. I spent too much time manually writing structs from JSON output. I also heard the goland IDE can do this for you which makes me wonder why other IDEs don’t have this feature too.

JSON-to-Go: Convert JSON to Go instantly

Do you have an API that gives you JSON data that you want to turn into a go struct? This app has you covered. I’ve done this by hand too many times.

Follow me

Here's where I hang out in social media