[TriLUG] Go Help

Steve Litt via TriLUG trilug at trilug.org
Sun Apr 9 02:33:43 EDT 2023


Brian McCullough via TriLUG said on Thu, 6 Apr 2023 19:14:59 -0400


>The project involves me learning to work with Go, adding to some
>existing Go code.

I did a feasibility study on Go a few months ago, and my findings were
that Go starts out as a very sane, straightforward language somewhat
like C, but then increasingly reveals its immensely broad instruction
set, to the point where I decided Go wasn't for me. My takeaway is that
Go isn't something you dabble in, it's something you either go full
force into, or leave it alone...

>
>So, the first ask is for someone ( or someones ) who can help me move
>forward with my education.

For obvious reasons I can't help you with the Go language, but I might
be able to help you as the inventor of the Universal Troubleshooting
Process and the Rapid Learning Process.

To implement my suggestions, you need to design your code modularly,
with each module having one or a few simple inputs and outputs and few
if any side effects. Bigger modules can be comprised of several such
modules, etc. Besides helping with the learning process, this leads to
more maintainable and scalable code.

When your code fails, make an MWE: Minimum Working Example, in this
case, "working" means "exhibiting the bug". At that point, the root
cause might stick out like a sore thumb, but even if it doesn't, the
MWE will be much easier to debug, and if worst comes to worst and you
need help, you'll be much more likely to get help with an MWE than the
original program. There's a special place in hell for these guys who
post 50 lines of code and ask "why does this turn my background green
instead of purple?"

Debugging and experimentation form a powerful language-learning method.
By learning how a language doesn't work, you learn how it does work.
Once again, use MWEs for such experimentation. No need for error
handling or any niceties. Just get to the point where it's tiny, and
troubleshoot from there.

There's a diagram of the Rapid Learning process at
http://troubleshooters.com/bookstore/rl21.htm . There's also some
background information in the Rapid Learning process at
http://troubleshooters.com/tpromag/9712.htm .

>
>The wrinkle is that it also involves Ansible, which doesn't seem to be
>playing nice for me.

I don't know Ansible, and it's not installed on my computers or any
computers I have access, but the fact that Ansible, but the fact that
Ansible is making things tougher for you indicates an even greater need
for the techniques I mention.


SteveT

Steve Litt 
Autumn 2022 featured book: Thriving in Tough Times
http://www.troubleshooters.com/bookstore/thrive.htm


More information about the TriLUG mailing list