Live data from Hacker News

Show HN: I wrote a book about Go

practical-go-lessons.com

101–110 of 160 posts

Re: Show HN: I wrote a book about Go

#101
Hey there, this is really inspiring. I did something similar to what you described (writing on weekends while working) except I wrote a novel, not a tech book.

I have some feedback, 5.1 Garbage collection, you write "By chance, Go has a garbage collector." Was this really by chance? I don't know think so, it was by design! You even suggest this with your paragraph before explaining what GC is. Consider changing the word "chance" to something like "design" or another word that reflects the concerted choice by the Go authors.

If you find this helpful, let me know and I'd be happy to continue giving you any similar feedback.

Re: Show HN: I wrote a book about Go

#103

Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…

Can you help me understand this code on interfaces? If you were calling (CartStore.GetById()) where does (*cart.Cart) come from? I don't see any logical connection between these two.

  type Cart interface {
      GetById(ID string) (*cart.Cart, error)
      Put(cart *cart.Cart) (*cart.Cart, error)
  }

  // A type that implements the interface :

  type CartStore struct{}

  func (c *CartStore) GetById(ID string) (*cart.Cart, error) {
      // implement me
  }

  func (c *CartStore) Put(cart *cart.Cart) (\*cart.Cart, error){
      // implement me
  }

Re: Show HN: I wrote a book about Go

#105
post #102

Great work! I headed to the context chapter and learned something I was not certain. But regarding the linked list ( https://www.practical-go-lessons.com/chap-37-context#linked-... ), since a context can be parent of multiple contexts, I feel it's more like a tree structure.

Hello wanghq, thanks for your feedback. I will take a look at this. It's added to my todo

Re: Show HN: I wrote a book about Go

#106

Hey there, this is really inspiring. I did something similar to what you described (writing on weekends while working) except I wrote a novel, not a tech book. I have some feedback, 5.1 Garbage collection, you write "By chance, Go has a garbage collector." Was this really by chance? I don't know think so, it was by design! You even suggest this with your paragraph before explaining what GC is. Consider changing the w…

Hello syndacks, thanks for your feedback ! Do not hesitate to chat with me directly on the website ! I added a chatbox (on the bottom right corner).

Re: Show HN: I wrote a book about Go

#107

Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…

Can you help me understand this code on interfaces? If you were calling (CartStore.GetById()) where does (*cart.Cart) come from? I don't see any logical connection between these two. type Cart interface { GetById(ID string) (*cart.Cart, error) Put(cart *cart.Cart) (*cart.Cart, error) } // A type that implements the interface : type CartStore struct{} func (c *CartStore) GetById(ID string) (*cart.Cart, error) { // imp…

Hello rustyboy, first thanks for your feedback.

I think that there is a mistake in the name of the interface type. It should not be `Cart` but something else. Like `CartStorage`.

A type that implement this CartStorage interface can be named `MySQLCartStorage` or `DynamoDBCartStorage`. Each database engine responsible for the storage will have a different implementation.

The interface is here to define a contract, a set of behaviors that you should implement.

I will definitely change that

Re: Show HN: I wrote a book about Go

#108

Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…

This looks great! It looks really well thought out and practical. Congrats on the release. Kudos and thanks for making it freely available as well. Cheers.

Re: Show HN: I wrote a book about Go

#109
post #74

Earlier quoted context omitted.

On another note, you might want to consider converting the online copy of the book to MkDocs (using the Material theme), so that it's easier to read, navigate and search. I'd gladly lend a hand with this, if you like?

I will take a look at it, thanks for your suggestion. I will check if Lyx has an option to export to this format.

MkDocs isn't a "format" as such. It requires you to write Markdown and then configure the mkdocs.yml file to define the website's properties, such as the navigational structure.

Re: Show HN: I wrote a book about Go

#110

Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…

This looks great! It looks really well thought out and practical. Congrats on the release. Kudos and thanks for making it freely available as well. Cheers.

Thank you bogomipz !
Post reply on HN