Learning Golang, Day 14 – Removing Code Duplication
Today, on day 14, I created a custom method to remove code duplication creeping into the weather station codebase. Come read the fun story behind getting that done.
Here we are on day 12. I didn’t solve anything. I’m feeling that these exercises are becoming arbitrary and pointless.
:idseparator: - :idprefix: :experimental: :source-highlighter: rouge :rouge-style: pastie :imagesdir: /images
For the last couple of days, I’ve felt my enthusiasm for sitting down at the keyboard each day, for the 30-minute Learning Golang sessions, waning.
It’s not that I don’t enjoy learning Go. Far from it. It’s that I feel that reading about one concept after another and not diving in to any real degree of depth to be rather pointless.
Sure, I’m coming across new terms, features, and functionality, such as link:/learning-golang/day-9[Interfaces], link:/learning-golang/day-10[Type Switches], and link:/learning-golang/day-8[Pointer Receivers.] But I don’t feel that I’m learning them to any meaningful degree.
What’s more, it’s starting to remind me of my time in high school, which was quite a frustrating time. Back then, I learned about a lot of things. But since how I was taught the topics was, largely, devoid of any practical context, I forgot so many things soon afterwards. Without the required context, it was hard to appreciate why I was learning said topic, nor why I should commit it to memory. So, too, have these sessions started to become.
Given that, I’m going to take a bit of time out in the next 24 hours to figure out a new learning strategy. There’s nothing wrong with https://go.dev/tour/list[the Go Tour]. It’s a decent, well-structured resource with copious links to lots of excellent information. It’s what it says on the tin: a tour.
However, now that I’ve been learning Golang for almost 2 weeks, I need to change tack and do what’s always worked for me: I need to apply what I’m learning, and want to learn. I need to use the knowledge for something meaningful.
Gladly, I do have something meaningful, which is https://github.com/settermjd/go-weather-station[the weather station app] I’m porting from https://github.com/settermjd/php-python-weather-station[the PHP original]. Actually, maybe I don’t need a day to think about a better direction to take. Perhaps that’s the new direction.
Are you learning Go? What’s your approach? Please share your it in the comments.
One other thing that’s been increasingly getting to me is that I feel, despite having been a developer for years, there are so many things that I just don’t know and struggle to grasp in a meaningful period of time. What’s more, it’s hard to grasp the requirements of the Go exercises at times and to complete them within a 30-minute time window.
Some days, most of what I’m doing is searching the net for how other people implemented a solution, for further information about a given feature, function, or library, and to troll through the code of a given function, method, or library. Basically, anything to help me have a greater sense of understanding about what I’m being asked to do.
Hey, it’s rewarding to learn and to see how others approached a situation. It’s just frustrating not to grasp concepts as quickly as I’d like to.
Anyway, that’s me for today. See you, next time!
Today, on day 14, I created a custom method to remove code duplication creeping into the weather station codebase. Come read the fun story behind getting that done.
Here we are on day 13. Today, I continued learning Golang by working on the Golang version of my PHP/Python weather station, adding a function to render static pages. Let me share my learnings with you.
Here we are on day 11, where I solved the Stringers Exercise.
Here we are on day 10. Today I read about and played with Type Assertions, Type Switches, and Stringers in Go.
Please consider buying me a coffee. It really helps me to keep producing new tutorials.
Join the discussion
comments powered by Disqus