I’ve made something! I’ve made something in Go! And while it is of no use to anyone, I’m so happy, because I didn’t know anything about Go, and now I do know some things
All it is is a little app that queries the Instagram API with a search term and displays some images. Big deal right? Who the hell wants that?
Answer: No one. But I learnt a hell of a lot building even this small thing.
You know when you read textbooks, or do tutorials, it feeeels productive and you feel like you’re learning something? But actually, I know I learn a lot better when I make something myself from scratch. It demands something of you more than cut and paste. It helps you figure out if you know something, or if you just read it and can parrot it back.
Now, I’m not saying I KNOW Go, even looking at my repo will show you a nightmare of inefficient, spaghetti code – but I know so much more than I did AND I have that good old confidence of thinking I can figure things out now. Before, Go was just an amorphous concept, something I thought I couldn’t do. Now it’s something I have played around with and it has given me some confidence.
Some things I learnt about Go by building my own little app
- Using structs, variables and functions
- Using html templates
- Passing objects through to the html templates
- Ranges, conditionals, string manipulation
- How to use libraries – for example, I used the Instagram API library.
I need to remember this in the future – when trying to learn something, go ahead and do tutorials, etc, but then hack something from scratch yourself. It’s the best way to learn!
Sidenote: I was talking to a male friend who is learning coding, and I gave him this above advice, with the note “Don’t worry if it’s crap, just build it”. And he said “Men (in general), don’t think like that”. Which I thought was such an interesting comment. Is it true? I know of exceptions, but maybe the generalisation is true. Side, sidenote: I’m trying hard to be more like that and to stop being so self deprecating, so I really shouldn’t have said what I made was crap at all.