Memorizing Golang

@Josh how do you memories methods? I want to create a mind palace for GO programming language to memorize fundamentals and methods.

1 Like

I’ve read a little bit about golang but haven’t really used it for more than a quick experiement.

What kinds of methods are you trying to memorize? Could you post an example list?

So lets say net, os, syscall are fundamental packages that are used quite often.
https://golang.org/pkg/net/
https://golang.org/pkg/os/
https://golang.org/pkg/syscall/

But the amount of methods that it contains are humongous. Now I dont want to remember all of them but many. And same applies to few other packages. Overall you can see that as and when we add new stuff in our memory related to GO lang for new projects, things can get complicated very quickly.

What I am looking for an extensible method like mind palace to properly, easily and creatively organize information for long term.

1 Like

Without knowing exactly which parts you want to memorize, I’m just copying/pasting from the first link. Let me know if you’re looking to store another kind of information.

For a programming language, it might be enough to memorize the general categories of what you can do.

Here’s a list of top-level items, starting to group them into categories. I don’t know exactly what these things do in Go, and they could probably be organized in a better way, so this is just a quick brainstorm.

Item Category
func JoinHostPort(host, port string) string
func LookupAddr(addr string) (names []string, err error) Lookup
func LookupCNAME(host string) (cname string, err error) Lookup
func LookupHost(host string) (addrs []string, err error) Lookup
func LookupPort(network, service string) (port int, err error) Lookup
func LookupTXT(name string) ([]string, error) Lookup
func ParseCIDR(s string) (IP, *IPNet, error)
func Pipe() (Conn, Conn)
func SplitHostPort(hostport string) (host, port string, err error)
type Addr Addr
type AddrError Addr
type Buffers
type Conn
type DNSConfigError DNS
type DNSError DNS
type Dialer
type Error
type Flags
type HardwareAddr Addr
type IP IP
type IPAddr IP
type IPConn IP
type IPMask IP
type IPNet IP
type Interface
type InvalidAddrError
type ListenConfig Listen
type Listener Listen
type MX DNS
type NS DNS
type OpError
type PacketConn
type ParseError
type Resolver
type SRV
type TCPAddr TCP
type TCPConn TCP
type TCPListener TCP
type UDPAddr UDP
type UDPConn UDP
type UnixAddr Unix
type UnixConn Unix
type UnixListener Unix
type UnknownNetworkError

Once you have the general groups of types/functions, then you could start putting them in a memory palace or on a peg list.

Fact Image
JoinHostPort party host with glass of port
Lookup someone looking up and pointing
ParseCIDR pear cider
Pipe a pipe
Addr adder
Buffers Buffy
Conn Khan (Star Trek II)
DNS I think of Cloudflare, where is where I usually manage DNS
Dialer rotary phone
Error a red arrow (errors are red in my terminal)
Flags flags
IP Ip Man
Interface user interface
Listener cupping hand to ear
PacketConn packet of sauce
TCP I’d just make an image like “tea”
UDP I’m not thinking of a quick image other than “video” and that is comes after TCP so I’m using that
Unix I’d probably just think “Linux” here and remember that the image means Unix

I put those general groups into a quick memory palace at a cafe I know and reviewed it a few times. There are at least three feet between every location, and there are various objects at each location. If I wanted to add functions, there is plenty of space to create make locations within each location.

Example: my DNS image is in the part of the cafe where you get napkins, milk, and sugar. Extra locations could be created in that area for the DNS, MX, and NS types/functions if needed.

To make the category list longer, just add more locations to the main memory palace.

You could make a location for every function name, but for me it would probably be enough to get a general sense of what is available and then let my editor fuzzy-complete things. (I installed this plugin.)

I’ve done something like this with some languages and libraries, and it helps me but I usually don’t review the memory journey or peg list much after that. I get enough out of it just memorizing the general layout once.

If you’re looking to memorize it differently, let me know. Other people here also might have other ideas.

Edit: I’m reading through a Go website to see if there’s a better way to do this.

2 Likes

This is great.
I was looking for the thought process you use, and it is distinctively clear in your answer. I will take your approach as a reference to start with package memory palace and lets see how it evolves.

1 Like

Here is what I have created from GO Tour Concurrency.

I enter a house. I am standing in the mail hall. In front of me is a frame of a portrait of Gofer (GO mascot). And below is what the room floor looks like.

  • Concurrency - floor
    • Now lets move on to the floor. If you look at the floor it has lots of blinking lights like threads. Its because this is GO runtime engine running. And the visible running lines like threads are routines that the runtime manages. For transport of data between this threads there are pipes that threads can connect to and send data and it is called channels. Channels are pipes, from one end you can send data and receive on the other side . And its a flexible pipe, which can change its size based on the type you are sending. There are different methods to use channels, either fix size buffers can be send, or with data at the beginning a range can be mentioned on how long is the train or mention at the end that we are not sending anymore a closing channel. Care should be taken that sender only closes the channel otherwise every gofer will panic if tried to push on a closed channel. Multiple running threads/routines can be clubbed together at any point before moving forward and that can be done by selecting all the routines you want to club using select . Selection process is random and there is no order if more than one are ready to be accessed. But, if data is available from a thread or routine, select will right away show it.
1 Like

How is your project going?

I didn’t know any Golang, so I gave it a try as an experiment to see how much of the language I could learn in a couple of days, part-time.

I went to Go by Example and read through the 75 pages. I picked that site because it’s short and can fit in a memory palace or peg list. I had followed a short Go tutorial once a couple of years ago, but it was just “paint by numbers” style, and I didn’t even know exactly what := vs. = did a couple of days ago.

I started typing out the code from each page of the site, but that was taking too long, so after about 20 pages, I switched to just reading the code, taking quick paper notes, and explaining how the feature works to an imaginary student. That was as least as useful as typing out the code, and much faster. I didn’t use a memory palace or peg list during the first pass.

The notes are quick and are mostly just to help me reword the ideas while extracting the most important information.

Example: it’s easy to remember “Sorting by Function” is on peg #240 (page 41 of the site, because my pegs are zero-indexed), but there is also other useful information to attach there: Len, Swap, and Less are the methods to implement for the type. I think that the exact syntax doesn’t matter at this stage in my learning, because my editor will provide hints, and it’s easy to search online for an example if I know what I’m looking for.

Then I stored the names of the 75 pages in a peg list using my 000-999 peg list. I used the images for numbers 200-274 as pegs. A peg list is similar to a memory palace, but instead of attaching facts to location pegs, you attach them to other kinds of pegs that you can keep in order. They basically do the same thing, so it was an arbitrary choice.

Here are some examples:

Peg Peg Image Fact
200 Nostradamus Hello World
201 Note Values
202 Noni juice Variables
240 Nozzle Sorting with Functions
241 Knot Panic
242 Naan Defer

I used the memo sets feature to review the facts a few times. Because it’s a peg list, I put both images in the memo set instead of making a journey.

Once I had the pegs memorized, I used active recall to try to pull the information out of memory just based on what I stored in my peg list. I didn’t remember all of the details of how to implement the features, so I would go back and check the Go by Example website to look up the missing information. I changed some of the mnemonic images when they weren’t memorable enough.

After that, I used what I learned to write a simple program to generate one file for each page of the Go by Example site:

package main

import (
	"fmt"
	"io/ioutil"
	"strconv"
)

func writeFile(filename string) {
	text := []byte(filename)
	fn := fmt.Sprintf("%s.md", filename)
	ioutil.WriteFile(fn, text, 0644)
}

func main() {
	fmt.Println("beginning")
	for i := 200; i <= 274; i++ {
		writeFile(strconv.Itoa(i))
	}
	fmt.Println("done")
}

I started writing notes in each file based on the memorized title, just to be sure that I could explain the topics. I use being able to explain something as a gauge of whether I really understand something or not.

Example: I knew that peg #224 was “Channel Synchronization” but wanted to be sure that I could code an example of it. So note 224.md looks like this:

Recalled notes from Go by Example

I didn’t write a note file for all the items yet, and I’m not sure if it’s worth the time (vs. just starting to build things with the language). I will keep recalling my peg list regularly and check the site again for any items that I don’t feel like I could explain well.

Before I crawled out of bed this morning, I tried recalling my peg list and started giving a mini-lecture on Golang to an imaginary student. I could still recall all the items and a lot of the information. I wouldn’t say that I “know Go” yet, but I feel like I wouldn’t hesitate to choose it for a CLI or server, because I know the basic concepts and what to search for in order to find the exact syntax for basic tasks. I’m in the middle of working on a new server for this site that is not user-facing, and I might write one of the tasks in Go.

I don’t think rote-memorization alone can really teach something like a programming language, but the peg list definitely helped me a lot with the basics.

4 Likes

Excellent.
I did gave an attempt to the idea of pegs but, it did not fit my style. So switched backed to memory palace. However, after looking your work, it seems I didn’t gave a better effort to pegs (very impatient) it seems.

My approach was to next to understand and remember packages. So, the idea was to create operational logics and its related code as a normal software engineer, where you understand normal working of OS and software. And remember the packages and its available methods so that we can mix and match right package/method at right time to get job done.

For OS package here is the palace walk through.

  • os - package
    • Lets explore the packages. We enter the main frame in front wall and call the OS gofer. Lets enter the OS package it is holding. Inside the box we see a folder, coming out of the folder is a file. The file move under the clouds , the ENViornment. Above all this is standing a user. And there are some activity going on around all of this. Lets see what that is. Starting back with folder/dir , below the dir magically a directory is created i.e Mkdir , also a small directory is created along with a long trail of many small directory behind it, i.e MkdirAll. Now look at the first folder/directory that was created, there is man on it now that is changed to a woman, the owner is changed, i.e Chown , also now a lock has appeared on the folder, ie Chmod. The father of the folder in white beard has changed to mother, i.e Chdir. Now the folder is in a house, i.e Getwd, and next to that house is a small cottage, i.e TempDir. Zoom out a bit and move to the cloudy weather next to the file. The clouds have a vertical stick before them which can slide over the clouds and clear the sky, i.e Clearenv . At the bottom of clouds is a big metal door which can flush out the entire environment, like a environment run, i.e Environ . The cloud are expandable, i.e ExpandEnv . Above the cloud is a pair of arms and eyes. The eyes can lookup for a particular particle, i.e LookupEnv , and the arms can get, set and unset the particles or blocks in clouds i.e Getenv, Setenv, Unsetenv . Moving up to the user standing above all of them is having a number on his forehead like a prisoner a user id, its Getuid . When he is working he get a new number which is an effective user id, Geteuid, and the job itself is a process and to identify his job a process id is assigned so Getpid. Job can be a sub task hence his boss have parent process id, Getppid . The process itself is a type. The Colonel (kernel) manages this processes using certain process methods. Like he can find a process FindProcess, start a new process StartProcess, Kill a process, give signals to process Signal, Release a process or Wait for a process to complete. All part of the efficient management of the entire system. The details of an on going process are stored in ProcessState . Its a book which shows its id Pid, name String , closing notes like Exit status done or not Exited or Success and its associated code Exitcode. What amount of system resources are used Sys, SysUsage, SystemTime and the amount of time user spend on it UserTime. There are many such users standing in groups under a halo, and this halo have a group id, Getgid, and when the entire group is working it has effective group id, Getegid . The list of all groups is available at Getgroups window. Looking close at the user you can notice it has cash coin UserCacheDir , a home UserHomeDir and wheels turning UserConfigDir . Now suddenly a teacher walks in the class of this users. He starts checking, do things exist or not , IsExist or IsNotExist. Do user have permission IsPermission or is someone late to class IsTimeout or had some one filled out system forms the wrong way, NewSyscallError . He holds a duster which can remove Remove , the user folders on the desk or all folders and files in his bag Removeall . The floor is filled with pages of fix size Getpagesize and the class have a name called Hostname . Lets move to the file below the user and next to folder. There are certain operations going on above the file. A small file is standing along and suddenly it created a new file which is light and blinking with symbols. It was created by symbolic link Symlink and now the blinking has stopped and the link became solid Link. These are 2 small same files SameFile and a pipe connecting them Pipe . They can be cut in half Truncate and name can be be changed Rename . Lets zoom out, now lets move below the main file. There is a big heading METHODS. What we see below are all methods of file itself. You see a small reading cum study table from a users perspective. The user with a wand creates a file Create, it appears like a book so he opens it Open . Just what we saw with the folder here also you can see man turn to woman on the cover Chown, father turns to mother Chdir, a lock appears Chmod , a small f with a number is at the bottom left corner , its the file descriptor in interger form Fd. There is a name at the top Name . The user starts reading the file Read, he now jumps to middle of the page ReadAt and starts searching for something Seek. The way he was reading he can write in same manner, simple writing from the top Write , writing from random location WriteAt and write entire lines at a time WriteString. There is syncing wheel rotating below the file and table which syncs the file with some other file Sync and at the back of the page metadata are writing with statistics Stat. The file can be changed in size Truncate. Now he see a long line of files and folder extending from his desk to the door Readdir.
    • Todo FileInfo , FileMode, LinkError, PathError.

All my Italic formatting of methods is lost :disappointed_relieved:
IMHO, this palace needs an expert review and upgrade.

For the next attempt, I will try a mix of peg and palace, if I could. Where , palace will hold pegs for packages.

But, Kudos to your work and sorry for not responding quickly.

1 Like

I use a mix of pegs and locations. I sometimes use my pegs for programming information, since I have a lot of pre-made pegs from my 000-999 number system. Even if I let the facts fade from the pegs afterwards it still helps me.

I like your approach with the os package.

Are you using a specific Go book to learn from? I looked around and many of them seem to be from at least 4-5 years ago, so I’m not sure if they are current.

Sorry about that. Are you using underscores? If you surround text with underscores it will make the text italic. Example:

_italic_

There is more information here — the formatting system uses markdown: How to format text in the forum

My source is official GO docs. https://golang.org/doc/ .

1 Like

I wonder if you can really remember, in the long term, what you imagined in the passage above!!!

It is because your programming terms don’t have a ‘cue’ for you/your brain to create ‘hook/link’…Just imagining the way you did in the passage above may not create proper ‘hook/trigger’ for you to remember the main methods/functions in the long term memory!

For example,let’s take the method/function “Chown”. I would at first convert this abstract term into a concrete image. And then,use the ‘Kewword method’ to link its meaning to it…

So…

Chown>> Clown
Owner>> Shiner(Shoe)
Change>>Train

Then,I would create some kind of story with “Clown,Shiner,Train” to create hook/cue/trigger for the the method Chown…which seems to mean,“The owner is changed”.

It’s easier to remember the method “Chown” and its work in this way(keyword method),because brain now has a reference point(sound like words),concrete images to imagine,and also ‘strange images/story’ to imagine…

The story you have created above is plain,complex and dull. Such type of story is hard to remember(in the long term). Looks like,you are a beginner in the world of mnemonics. Usually,beginners create stories like you did that are difficult to store in the long term memory. I also did that when I was a beginner in mnemonic world. And it was hard for me to recall stuffs in the long run,even if I used spaced repetition!

However,if your technique works for you,then go for it. I am just proposing that there are time tested,proven to work and simpler techniques out there in the mnemonic world. You may be interested to try them out(linking,converting abstract images,etc).

1 Like

@elitely , thanks for the feedback. The techniques that you are referring to , can you provide sources for that? And in what order those technique should be tried out?

Can you post some of your examples related to programming languages or software engineering , so that I can relate it to GO lang’s case?

:innocent:

I think,you should at first practice the basics of mnemonics and then,try to apply them in your programming language endeavor!! When you get the basics ingrained in your brain,the rest will be pretty easy!!!

You need to develop the ‘touchstone habits’ regarding ‘mnemonics’. Once you get used to the mnemonics techniques,you will be able to apply in everything in your life including programming languages(math or whatever)…

I personally just ‘convert the methods/functions/syntax’ of programming language(s) to concrete images,create stories with them,and put them in the Loci of my Memory Palaces,and review them time to time with ‘spaced repetition technique’.

I personally believe that ‘mnemonic’ techniques are very very helpful to learn ‘methods,functions,syntax’ of programming language!!

The way I apply or create a story with different images may not help you much,as images are basically individual thing! How you imagine something is gonna be very different than how I imagine…BUT the basics of Mnemonic techniques are always the same for all…

I suggest you to only choose the ways that are tested and proven to be effective…and as the saying in the world of programming goes, “Don’t reinvent the wheel”.

I mean,for example,Memory Palace is a technique that human being seems to be using since the dawn of time. So,this is a time tested technique. And you should use it…Another technique time tested is ‘linking method’…and so on!

The forum has a huge source>>> Links to Art of Memory Resources

Sorry,if I sound like I’m giving too many lectures :stuck_out_tongue: Being a programmer myself, I thought,I should share my experiences so you don’t waste your precious time like I did, and you can apply the best and the most effective techniques in your memory journey…

1 Like

@Josh , I have created a 3 digit peg system. The number-key list for consonant - vowel - consonant is there , but I haven’t assigned exact images to each number yet.

In your GO example I was still not able to relate, how to assigned your Peg system with the GO examples? The logic flow is not clear form your assigned image to the related GO example.

Also, did you created a new set of peg list for particularly GO lang? Or used an existing one?
If I follow your Channel example, how did you keep a map of channel properties, methods and syntax? what was your approach there?

@elitely your description was helpful but you did not provide samples of your work like @Josh . Can you share something of your your so I can see your approach as well, if you don’t mind. :grinning:

Josh is the my guru. He will be able to show you the best way… Follow his advice… I have already showed you my approach, but you didn’t get it. My failure…@kanMatsu :slight_smile:

This is just an explanation of the way I attempted it. Other people here might have alternate ideas about it. :slight_smile:

I’ll use a few items from my table above as examples.

Peg Peg Image Fact
239 Napkin Sorting
240 Nozzle Sorting with Functions
241 Knot Panic
242 Naan Defer

239 — Sorting

239 is pronounced “NAAP” in my system, so I use an image of a napkin. The first thing that comes to mind when I think about “sorting” + “napkin” is a video on sorting algorithms performed as Hungarian folk dances.

When I think about European folk dances in general, it’s easy to picture someone dancing with a cloth in their hand, like this. (Different country, but the association works for me.)

So 239 leads me to NAAP which is an image of a napkin which I see waving in the hands of a folk dancer, which leads me to Hungarian folk dancers who are demonstrating sorting algorithms.

It might seem like a long chain of associations, but it’s how my brain works, and I can quickly go from “napkin” to “sorting”. I just follow the natural associations that my brain makes while free associating. I don’t worry about whether the images make sense but only about whether my brain will be able to follow the path the next time it sees the trigger image. If you follow the natural associations in your own brain you’ll probably come up with unique associations for most of your images.

240 — Sorting with Functions

240 is pronounced “NAZ” (“A” as in “father”) in my system. The image for that number is the “nozzle” of a hose. So I picture a hose spraying water on the folk dancers.

For this one I didn’t create any extra images, because my natural memory can recall that there is an item in the list called “sorting with functions”, and I didn’t need to spend time on it.

I think that if you can recall something without an mnemonic image, then it’s okay to leave it out. I don’t spend time creating mnemonic images if I can recall facts without them

For this one, I can also naturally remember that there are three functions/methods in the interface that need to be implemented on a type. I remembered them with natural memory, but don’t feel like I need to spend time remembering their names because I can look them up. I have a visual image of them in my mind that is based on my notes that I posted above.

Sorting by function in Golang

As long as I know that I can sort a collection of data however I want by implementing those three functions, and that the main sorting logic will go in a function called Less, then I know exactly where to look when I encounter that situation. (Len and Swap are generally self-explanatory if you look at the example implementation.)

I think it’s more important to memorize concepts than syntax, because the main use I have for that kind of knowledge is to know what tools are in the toolbox and where to find them. Then, when I see a problem, I can pick up that tool and quickly “skim the instruction manual” with a quick Google search.

Concepts vs. Syntax

I don’t have a CS background and am not an expert on programming, but I can explain how I choose what to memorize.

As an example, I was recently helping someone figure out how to get past a problem they were having while coding a webpage. I was trying to help them with active recall by getting them to name the function that they needed. I knew that they had used the function many times before, but I wanted to be sure that they understood the concept of when to use that tool so that they could find it in their head without help next time.

General problem scenario: you have a collection of items and you want a new collection of items of the same length but with a function applied to each item in order to transform each piece of data.

(I use the word “collection” there, because this concept applies to many programming languages, whether the abstract collection is called an array or a list or something else.)

JavaScript Example:

If you have this collection:

[1, 2, 3]

what function can you reach for to get this?

// transform each item, returning a collection of same length
[2, 3, 4]

It’s the same function that you could use to go from this:

[
    { name: "Bilbo", age: 110 },
    { name: "Frodo", age: 32 },
]

to this:

// transform each item, returning a collection of same length
[
    { name: "Bilbo", age: 111 },
    { name: "Frodo", age: 33 },
]

and the same function you would use to go from this:

[
    { name: "Bilbo", age: 111 },
    { name: "Frodo", age: 33 },
]

to this (plucking out one piece of information from each item in the collection):

// transform each item, returning a collection of same length
[
    111,
    33,
]

I kept trying to provide examples, but the person was having difficulty going from the general scenario at hand to the function name. But once I showed examples of solving the problems, they knew the function that I meant. They understood the syntax but not the concept of when to reach for that tool in the toolbox.

Here’s the function (Array.prototype.map):

[1, 2, 3].map(n => n + 1);
//=> [2, 3, 4]

[
    { name: "Bilbo", age: 110 },
    { name: "Frodo", age: 32 },
].map(hobbit => ({ ...hobbit, age: hobbit.age + 1 }));
//=> [{ name: "Bilbo", age: 111 }, { name: "Frodo", age: 33 }]

[
    { name: "Bilbo", age: 111 },
    { name: "Frodo", age: 33 },
].map(hobbit => hobbit.age);
//=> [111, 33]

I watch a lot of people learn how to code from scratch, and I think it’s a common problem that they try to learn syntax rather than concepts. So whenever I’m memorizing programming information myself, I don’t memorize every detail of the syntax, because all I really need to know is a somewhat abstracted idea of what tools are in the toolbox and when to reach for them.

If I couldn’t remember the syntax of map, or if I were learning a new language and didn’t know any of the syntax yet, as long as I know that I have a collection and need to return a transformed collection of the same length, I know a simple path to the solution: search for “<language_name> map over collection” to quickly find the syntax to solve the problem.

(Strangely, Golang does not provide a map function, but another tool in the abstract toolbox is knowing that map can be implemented with a loop.)

Going back to the “Sorting by Function” example, I feel like, for my own purposes, I don’t need to memorize the exact names of the three functions to implement but just need to know a general idea that: “there is a way to sort a collection however I want by implementing three functions in an interface.” That information is transferable to other languages too, because there’s an idea of a Less function that tells the program how to determine what makes one thing “less” than another thing when it’s arranged in order.

Back to descriptions from the peg list:

241 — Panic

241 is pronounced “NAT” (“knot”) in my system. I picture a Gordian Knot. Someone is panicking because they can’t untie the knot. I don’t use any other images there but remember with natural memory that panic is a way to avoid handling an error and just stop your program when something goes wrong. You’re panicking and getting out of there.

Golang code that I’ve seen tends to be full of these three lines, so it’s something that shouldn’t take much effort to remember:

if err != nil {
    panic(err)
}

242 — Defer

242 is pronounced “NAN” in my system so I use an image of naan. The word “defer” sounds like de-fur (remove fur from something), so I picture fur on my naan and I’m removing the fur because I want to eat the bread without fur on it.

I use natural memory to remember that defer is a way to tell the program to do something at the end of a function, like close a file. I find that just looking at a few examples is enough to remember it.

I don’t know how Go works under the hood, but I’m guessing that there is a pointer to a resource (like a file) and that defer is just a way to tell the program in advance that it should remember to remove/close the pointer when the resource is no longer needed. Even if my conception of how it works under the hood is incorrect, I think it’s enough for me to have some idea in my head of how it might be working that I can correct later when I learn more.

I can relate it to something I already know from other languages:

# Python
with open(fname, "r") as f:
    raw_content = f.read()
# file is automatically closed here outside the `with` block

In Golang:

// The various exact syntax for opening/creating a file doesn't matter 
// so much to me, because it's a 5-second Google search away. I would
// remember the exact syntax after using it a few times in a program. I
// haven't reviewed it in a few days and this fact has faded already.
f := // some function that I can look up

// all I need to remember here is that closing requires a `defer` 
// right next to where the resource is opened
defer closeFile(f);

// and Golang will apparently run that `closeFile` task for me 
// at the end of the function.

I used my existing system of images for numbers 000-999.

I don’t memorize all the syntax, but mostly just the concepts (like with my map example above). From my pegs I know things like:

  • channels send and receive messages
  • sending and receiving are blocking
  • an arrow (<-) sends and receives if you point it at the destination
  • there are several pegs next to each other that give me a general idea of what to do: channels, channel buffering (avoid needing a waiting receiver), channel synchronization (async control), channel direction (restrict direction in functions), select (wait for various types of messages), timeouts (avoid blocking permanently, because sending/receiving are blocking), non-blocking channel operations (unblock select without a timeout), closing channels, range over channels, etc.

I still wouldn’t say that “I know Golang”, only that I have an idea about what tools are in the toolbox and when I might want to reach for each one. To actually learn to use the language, I think I would have to write and read more Golang code.

For example, I know that Go methods can have value receivers and pointer receivers, and that a pointer receiver is for when you’re going to mutate, but I would need to read some idiomatic Go code and experience some error messages in my own code to feel confident about when to choose each.

I definitely wouldn’t hesitate to use Go on a CLI or server already though, since I think it would be pretty easy to build something that works at this point. I’d expect a lot of the syntax to sink in over the first 2 weeks of writing code. The peg list would work as a kind of scaffolding for that information.

I’m a complete beginner with Go, so I don’t know if any of that is relevant, but it’s how I attempted it.

2 Likes

@Josh , that was a great help. Thanks.
I am happy to learn that almost 70% of my approach was right. However, considering your ordering of thoughts, I have a long way to go. This also signifies that the learning pace will increase almost 10x if reasonable mastered the memory skills.

Thanks again for considerable amount effort that you spent on answering this. :clap:

1 Like