Tips and guidance for writing

Reading Note1 General Advice on Technical Writing One of the most crucial aspects of writing a good technical paper is what I call maintaining user state. Like a good operating system, the writer should ensure that the (mental) state of the user (i.e. reader) is kept coherent. it means that the paper systematically builds up the reader’s understanding and knowledge of the work, starting from a reasonable initial state. This means you need to put yourself into the reader’s shoes (or, rather, brain) and ensure that they can follow at each instance: ...

March 31, 2025 · 12 min · KKKZOZ

100 Mistakes in Golang: Chapter 8 & 9

55: Mixing up concurrency and parallelism Concurrency enables parallelism. Concurrency provides a structure to solve a problem with parts that may be parallelized. Quote “Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once.” ...

March 19, 2025 · 4 min · KKKZOZ

100 Mistakes in Golang: Chapter 7

48: Panicking Panicking in Go should be used sparingly. We have seen two prominent cases, one to signal a programmer error and another where our application fails to create a mandatory dependency. 49: Ignoring when to wrap an error In general, the two main use cases for error wrapping are the following: Adding additional context to an error Marking an error as a specific error if err != nil { return fmt.Errorf("bar failed: %w", err) } This code wraps the source error to add additional context without having to create another error type. ...

March 7, 2025 · 2 min · KKKZOZ

100 Mistakes in Golang: Chapter 6

42: Not knowing which type of receiver to use In Go, we can attach either a value or a pointer receiver to a method. With a value receiver, Go makes a copy of the value and passes it to the method. Any changes to the object remain local to the method. The original object remains unchanged. On the other hand, with a pointer receiver, Go passes the address of an object to the method. Intrinsically, it remains a copy, but we only copy a pointer, not the object itself (passing by reference doesn’t exist in Go). Any modifications to the receiver are done on the original object. ...

March 4, 2025 · 5 min · KKKZOZ

100 Mistakes in Golang: Chapter 5

36: Not understanding the concept of a rune The len built-in function applied on a string doesn’t return the number of characters; it returns the number of bytes. What if we want to get the number of runes in a string, not the number of bytes? How we can do this depends on the encoding. In the previous example, because we assigned a string literal to s, we can use the unicode/utf8 package: ...

March 3, 2025 · 3 min · KKKZOZ