DEV Community


Posted on

Go - A moment of clarity.

Salutations all,

I have been digging in to a book called Introducing Go by Caleb Doxsey (published by O`Reilly) which had an exercise to create a small program which put 5 values in to a 5 value array. The trick was then to find the average by adding the five values then divide it by five.

It was here I had a moment of clarity, whilst i was copying the text from the book, I thought to myself: "What if there is more or less than five items in the array? I would need to change a few lines to reflect this in the program. Is there a way to make this simpler?"

Now I am not a developer, I'm a Sysadmin who dabbles in occasional Python with the help of Google and StackOverflow with dreams of developing really useful software to automate my job so I can sit back and sip cocktails and let my automations manage themselves. So there are two things about me questioning the script that I'd like to highlight.

1, My question was then echoed in the next paragraph of the book. It then talked me through making it simpler.

2, I am actually learning about programming theory as well as how to wield some code in Go.

My question to the Dev community is - have you ever had such moments of clarity about your develop maturity?
Using Google & Stack Overflow is great for the dirty jobs but actually reading a book that explains things with some depth of theory are pretty priceless.

Top comments (0)