News for hackers. Stuff that matters.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @10:56AM (#26568015)
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 of each chapter, you can find a small Q/A and a bullet point list of key notions.

I would love to hear your feedback about it!

Re:Show HN: I wrote a book about Go by primitivesuave on Wednesday March 24, 2021 @05:07PM (#26572935)
Thank you for this fantastic resource. I've been meaning to learn Go for a while, but have a lot of difficulty staying focused on tutorials with big blocks of text. Your concise bullet format is really easy to follow, and would be especially useful for anyone who doesn't speak English as their first language.

Also really respect that you clearly did this out of passion, so I'll say this to everyone on your behalf: support the author by purchasing a digital copy!

https://www.practical-go-lessons.com/buy-digital-or-hard-cop...

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @06:24PM (#26573785)
oh thank you! I appreciate your kind words:) It's very rewarding to read all the comments on this thread... You made my day !
Re:Show HN: I wrote a book about Go by jackosdev on Wednesday March 24, 2021 @07:12PM (#26574266)
Man I been looking at diving into Go for a while now, time to go in headfirst. Really appreciate your contribution and I feel the exact same way about wanting to give back to the community, one day I'll have something of value to offer!
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:28PM (#26574441)
Thank you jackosdev !

Maybe you can begin by blog posts ? It is a good exercice to dive deep into a subject and make sure you understand it. Do not hesitate to contact me if you want support in the process

Re:Show HN: I wrote a book about Go by lamida on Wednesday March 24, 2021 @09:49PM (#26575674)
Hi, Maximilien. I really like the structure of the books. It starts with "what we will learn" and ends with "test yourself" and key takeaways. The structure can help the reader to really conscious in understanding the learning goals and validating the understanding.

I also always want to write a programming language book or some other technical topic book in general, which the writing process will I use as learning process for myself. But I always wonder in deciding the topic to cover. How do you decide the topics to cover? Do you start from following existing books or online documentation topic sequences? Or just write whatever topic you are interested first and structure the content afterward?

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @10:36PM (#26575936)
Thanks for your comment ! If you want to do it, just pick a language and start to write.

Writing is not easy but it becomes easier if you transform it into a habit.

In my experience I forced myself to write regularly like every day of the week. I usually worked one hour approximately by session.

By doing so you will see that you will achieve a lot.

Do not force youtself to write for one entire day then do nothing for a week.

Concerning the topics to cover I will recommand using a mind map to build the table of content. This is interesting because you can drag and drop sections easilly.

I would suggest first to define your targeted audience. Having this audience you can begin building the plan.

My approach was to teach notions progressively. Sometime I needed to rework the sections order. Use an editor that allow you to do that easilly like Lyx (love it).

Students generally love rituals and adding some introduction ritual/section and conclusion section is a plus.

Hope those recommendations will help you :)

Writing something is really a great way to make sure you understand something !

Good luck

Re:Show HN: I wrote a book about Go by movedx on Wednesday March 24, 2021 @05:37PM (#26573276)
This looks amazing. Thank you.

I've found an error.

In Chapter 6, Section 3 (Introduction) you say, "In a previous chapter, we covered decimal and binary notation." but those topics aren't covered until Chapter 7 :)

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @06:13PM (#26573694)
Thanks for spotting this, I will add it to my todo.
Re:Show HN: I wrote a book about Go by jjice on Wednesday March 24, 2021 @02:34PM (#26571224)
I really like that you go in detail of common and important standard library functions and hit come important things like database drivers and JSON. 700 pages is a nice big programming book and it looks like you're not skimping on details. Great job and good work!
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:12PM (#26571695)
Hello jjice,

Thanks for those kind words, I tried to cover a lot of topics. Consequently it makes a lot of pages!

I hope that the content will help you ! Do not hesitate to contact me if you spotted an error or if you want to suggest an improvement.

Re:Show HN: I wrote a book about Go by rustyboy on Wednesday March 24, 2021 @08:17PM (#26574873)
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 by maximilienandi on Wednesday March 24, 2021 @08:29PM (#26574997)
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 by rustyboy on Wednesday March 24, 2021 @09:15PM (#26575400)
Let me just clarify, sorry i'm from python, so not very familiar but this feels like a "circular reference". You're implementing a struct CartStore which has methods GetById, and Put. Because interfaces (or contracts) are implicit then it's automatically considered a Cart.

What I don't understand is the return types of these functions, a pointer to a cart's cart member? or an error.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:36PM (#26575561)
Interfaces in Go are implicitely implemented. It means that if a type has the methods defined in the interface, then it implements the interface.

I will update the example because it's confusing !

If you have some time come to the speak with me in the chatbox on the website I can help you understand this.

Re:Show HN: I wrote a book about Go by Jtsummers on Wednesday March 24, 2021 @09:37PM (#26575569)

  cart.Cart
  package.NameInPackage
So the name Cart is an interface, the function/method signatures are indicating that a Cart is being returned but being explicit about the package the interface belongs to with cart.Cart. It's made more confusing since the name cart (lower-c) is being used for both a member variable and the package name in the signature of Put, and it looks like the package name doesn't show up on an explicit line in that chapter to help clarify it.
Re:Show HN: I wrote a book about Go by fishywang on Thursday March 25, 2021 @10:25PM (#26588181)
One feedback: I skimmed through the Context chapter and noticed that you made the common mistake.

In the code snippet provided at https://www.practical-go-lessons.com/chap-37-context#the-ser..., you made the channel unbuffered. The doWork goroutine would write to the channel and the "main" goroutine would read from it. But since the "main" goroutine could exit early because of context cancellation, they could get into the case of no one on the reading end any more, causing the doWork goroutine to be blocked forever (the writing to the channel is blocked when there's no one to read it).

Someone even published a paper about fixing this common mistake in open source projects a few days ago: https://www.reddit.com/r/golang/comments/m66djp/automaticall...

Re:Show HN: I wrote a book about Go by noisy_boy on Thursday March 25, 2021 @01:59AM (#26576982)
I think this is very well structured. I really like the "Test yourself" section. As a person who finds small post-reading assignments enjoyable and motivating, my only suggestion would be to add a small assignment that employs the learnings. Actually coding what one just learned is arguably a good way to reinforce the learnings and raising further questions/doubts. E.g. for your Application Configuration chapter, an example assignment could be:

    Create a command line application that accepts users inputs as below:

        a. Mandatory "-firstName" flag to accept first name
        b. Mandatory "-lastName" flag to accept last name
        c. Optional "-middleName" flag to accept middle name
        d. Mandatory "-age" flag to accept age - only integers between 0 and 200 should be accepted
        e. Optional "-party" flag to accept political party following - only valid values are "D", "R" and "I"
        d. Optional "-userId" flag to specify user id - if HOME environment variable is set, extract user id from home directory path
Re:Show HN: I wrote a book about Go by signal11 on Wednesday March 24, 2021 @09:05PM (#26575316)
A very minor point (sorry): please could you search-and-replace all “advices” to “advice” in the text? Advice is its own plural form.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:09PM (#26575349)
Thanks for your feedback added to my todo list !
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:43PM (#26575626)
I just pushed a new release with that fix
Re:Show HN: I wrote a book about Go by codegeek on Wednesday March 24, 2021 @12:33PM (#26569446)
I love it. Hats off to you for your hard work on this. Who builds your illustrations/graphics ? Looks cool.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @12:40PM (#26569567)
My spouse :)

Thank you for your feedback !

Re:Show HN: I wrote a book about Go by bigdict on Wednesday March 24, 2021 @03:58PM (#26572167)
At this point any Go-related work must come with illustrations done by the spouse.
Re:Show HN: I wrote a book about Go by preommr on Wednesday March 24, 2021 @03:02PM (#26571556)
Should probably credit them in the foreward.
Re:Show HN: I wrote a book about Go by Zababa on Thursday March 25, 2021 @12:04PM (#26581950)
Love the book! I think there's a small typo on https://www.practical-go-lessons.com/chap-41-cheatsheet, 2 Slices: "A good resource for playing with maps is https://github.com/golang/go/wiki/SliceTricks". I think you meant slices instead of maps?
Re:Show HN: I wrote a book about Go by cosmodisk on Wednesday March 24, 2021 @03:13PM (#26571701)
This is great,well done! I was thinking of picking Go at some point this year, need not to forget to buy the book. May I ask what did you for the website,looks pretty neat?
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:23PM (#26571807)
Thank you for your feedback and support!

Go is easy to learn, and you need a limited amount of time to produce code!

I built the website with VueJS, and I use bootstrap for the CSS part (with https://bootstrap-vue.org/).

Re:Show HN: I wrote a book about Go by BrandoElFollito on Wednesday March 24, 2021 @04:41PM (#26572601)
Great book! (and this from someone who does not like Go :)). After reading a bit I was almost ready to jump in again and then I remembered errors and the associate repeating code and I got back to Python.

I have a friend who is constantly trying to drag me though the fence so maybe one day.

You may want to try quasar (https://quasar.dev/) for your VueJS sites - it is excellent.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @05:16PM (#26573038)
Thank you ! I hope this day is close !

I will try quasar on another project maybe, I did not know this framework. I also need to improve my competences with React :)

Re:Show HN: I wrote a book about Go by alexeyshurygin on Friday March 26, 2021 @07:53PM (#26598404)
Thank you for your work. I absolutely love the book. You might add links to buy digital copy at the very top of the page. Currently, I've found the link on 3rd attempt) Also, why not sell on Gumroad (https://gumroad.com)? It is convenient. Good luck!
Re:Show HN: I wrote a book about Go by msmagh on Wednesday March 24, 2021 @09:07PM (#26575332)
Not a Go programmer and usually don't post here. Just wanted to appreciate the effort, also saving it for future reference. Thanks
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:08PM (#26575342)
great ! see you soon
Re:Show HN: I wrote a book about Go by movedx on Wednesday March 24, 2021 @05:47PM (#26573394)
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?

Re:Show HN: I wrote a book about Go by evnix on Thursday March 25, 2021 @06:59AM (#26578652)
I like the current design, it is really clean and pleasant to read. I don't like Material Design, kind of makes everything look massive taking up too much space as if my desktop is a phone screen. for ex: http://angular-material.fusetheme.com/ui/forms

Could be that it's just me though

Re:Show HN: I wrote a book about Go by movedx on Thursday March 25, 2021 @05:01PM (#26585327)
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @06:13PM (#26573688)
I will take a look at it, thanks for your suggestion. I will check if Lyx has an option to export to this format.
Re:Show HN: I wrote a book about Go by movedx on Wednesday March 24, 2021 @08:58PM (#26575259)
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 by maximilienandi on Wednesday March 24, 2021 @09:45PM (#26575642)
Thanks for this clarification I will check this.
Re:Show HN: I wrote a book about Go by twalla on Thursday March 25, 2021 @02:35AM (#26577128)
We’ve been moving some docs meant for other teams to mkdocs from Confluence at work and I’ve been happy with it - GitBook is also popular.
Re:Show HN: I wrote a book about Go by bogomipz on Wednesday March 24, 2021 @08:54PM (#26575218)
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 by maximilienandi on Wednesday March 24, 2021 @09:03PM (#26575303)
Thank you bogomipz !
Re:Show HN: I wrote a book about Go by 120bits on Wednesday March 24, 2021 @02:41PM (#26571318)
I can't thank you enough! I wanted to learn Go and wanted something like this. I really like the chapter structure, it really easy to follow and progress.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:00PM (#26571529)
Thank you very much, I really appreciate :) I hope that it will help you in your Go journey.

Do not hesitate to send me feedback in order for me to improve the content.

Re:Show HN: I wrote a book about Go by rijoja on Thursday March 25, 2021 @03:27AM (#26577340)
Would you consider open sourcing the book? What systems are you using to create and maintain it?
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:36AM (#26578486)
Hello rijoja, I'm currently thinking about it.

I'm writing the book with Lyx. Lyx documents are converted to LaTeX docs, then converted to HTML with pandoc. Then I have a homemade Go script that generates the VueJs components (one per chapter).

This question is asked a lot so I will write something about the system because it can help other writers.

Re:Show HN: I wrote a book about Go by OhHiMarkos on Thursday March 25, 2021 @04:03PM (#26584715)
Surprised you didn't use Hugo for your website instead. Since Hugo is written in Go, and it's blazing fast.

Thanks for your work anyhow :)

Re:Show HN: I wrote a book about Go by pietroppeter on Wednesday March 24, 2021 @04:14PM (#26572321)
I just love the positive vibes of this post, feedback received, and OP’s replies. It just makes HN a happier place!
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:59PM (#26572838)
I also loved the experience of posting!I'm so happy to read messages of the community ! Thank you all !
Re:Show HN: I wrote a book about Go by adeptima on Wednesday March 24, 2021 @01:49PM (#26570624)
Hi maximilienandi, great work! Easy to read for non-native!

Always nice to see more alternative to the Blue Book too ;)

When I open Golang books or any kind of tutorials, I usually jump into Concurrency sections to see its depth and quality ...

If ever start thinking of selling v2 of your book, please go through Katherine Cox-Buday book "Concurrency in Go" content.

I like Katherine but your writing style is much much easy to read and process. Wish half of Katherine content will migrate into your future works.

Adding reference on Katherine book might help others too.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:07PM (#26570873)
Hi adeptima, thank you for your feedback!

I am really happy that you like the writing style.

I will order the book written by Katherine.

Concurrency is a really difficult topic; maybe I will add more content about it later. Real-world use-cases are hard to find also.

Re:Show HN: I wrote a book about Go by arendtio on Wednesday March 24, 2021 @03:29PM (#26571866)
I just scrolled through the chapter that looked most promising to me in the table of contents (Chapter 36: Profiling) and I have to say I love it!

On that one hand the basic steps are there like how to download a specific zip file, but at the same time it goes deep into the different types of profiling and how to use the mandatory tools.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:45PM (#26572025)
Thanks for your support arendtio ! I am happy that you liked this chapter, it took me a lot to write, because I never used pprof before. But it's a great tool.
Re:Show HN: I wrote a book about Go by ChrisMarshallNY on Wednesday March 24, 2021 @02:23PM (#26571094)
Excellent!

I am not a Go programmer, so I am not your target audience, but I have written a book, so I understand the work.

Thanks so much!

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:28PM (#26571161)
Thank you ChrisMarshallNY, for your kind message. I hope you will start using Go in the future!
Re:Show HN: I wrote a book about Go by ChrisMarshallNY on Wednesday March 24, 2021 @02:31PM (#26571202)
I sent a link to a friend, who is very much a Go programmer (I am a Swift programmer).
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:52PM (#26572096)
Thanks! I hope that he will find it interesting
Re:Show HN: I wrote a book about Go by zealsham on Wednesday March 24, 2021 @05:21PM (#26573094)
Whenever I encounter any book on go , the first thing I do is to read the installation page . This is the best I’ve seen of any book . You made the whole “PATH” thing that drives new go users mad and gave a thorough reason of why it’s needed .
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @06:53PM (#26574066)
The first time I installed Go I also ran into installation problems. At this time I was on Ubuntu.

I'm happy that you appreciated my explanations.

Hope it will help somebody in the future

Re:Show HN: I wrote a book about Go by Dentrax on Wednesday March 24, 2021 @03:58PM (#26572162)
Excellent job! Maybe you are already thinking about it, but... You can add a Search Bar and Go version & language selection for the documentation. (i.e. see (bottom left): https://docs.godotengine.org/en/stable/)

Also I just published this on /r/golang if you do not mind. :)

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:09PM (#26572271)
Thank you for those suggestions. Adding a search bar is already in my todo list. I will probably use Algolia.

Thank you for posting this on reddit ! I tried to do it but I made a mistake in the title, so I deleted the post and posted again (I never posted on reddit before). Now it seems that my second post is not really visible.

Thank you for your support Dentrax !

Re:Show HN: I wrote a book about Go by tomca32 on Wednesday March 24, 2021 @02:11PM (#26570924)
This looks great! I absolutely love that it assumes no knowledge of anything, including how the computer works. This is how all educational material should be written.

I think that most knowledge gaps we all have are caused by a teacher/book making assumptions about what we already know.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:23PM (#26571088)
Hi tomca32,

Thank you for the feedback. I tried to make it accessible to new programmers. I hope it will be used by people how wants to start their programmer's journey.

Being a self-taught programmer, I always suffered from not knowing some very basic notions. I learned a lot in the process of writing those chapters.

Re:Show HN: I wrote a book about Go by hodder on Wednesday March 24, 2021 @04:12PM (#26572300)
"This site is blocked due to a security threat that was discovered by the Cisco Umbrella security researchers."

Category: Malware

That is the warning I'm getting on this link at work. Of course I don't think you are trying to malware people, but might want to look into that on why people might not be able to access your site.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:22PM (#26572394)
Hello hodder, thanks for reporting this. I have no idea what is the cause of this...
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:55PM (#26572780)
I ran a scan with Norton antivirus on the website artifacts downloaded on AWS the result is OK.

I also checked the website with Google safe browsing (https://transparencyreport.google.com/safe-browsing/search?u...) and the result is also OK. I also run the test with virus total website and no threats have been detected. (https://www.virustotal.com/en/#url).

If you have more information about this do not hesitate to share!

Re:Show HN: I wrote a book about Go by rhd on Wednesday March 24, 2021 @05:59PM (#26573528)
Hi,

It's probably a combination of young domain, and associated IPs blocked from mail.

Check on Cisco Talos https://talosintelligence.com/ Submit ticket: https://talosintelligence.com/reputation_center/support#repu...

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:38PM (#26574532)
Thanks for sharing the link I will submit a ticket !
Re:Show HN: I wrote a book about Go by victoro on Wednesday March 24, 2021 @05:46PM (#26573392)
My browser (when behind work VPN) is showing an untrusted SSL cert error so probably the issuer is not whitelisted in some employer's systems.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @05:52PM (#26573449)
I'm using AWS amplify to deploy the website, they provide a free SSL certificate.

That's probably the reason !

Re:Show HN: I wrote a book about Go by joelthelion on Thursday March 25, 2021 @11:41AM (#26581636)
Cisco is pretty terrible and has tons of false positives. I wouldn't worry too much.
Re:Show HN: I wrote a book about Go by binaryorganic on Wednesday March 24, 2021 @02:02PM (#26570810)
Always assume Go references are about the board game, always disappointed. Congrats on the book!
Re:Show HN: I wrote a book about Go by RobKohr on Thursday April 01, 2021 @02:21PM (#26664190)
I was tricked too; maybe doubly so.

I thought this was a book on writing programs to play Go.

I feel at this point I should use this book to write a program to play Go using Go, and then in a way I wouldn't be so wrong.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:23PM (#26571091)
Thank you very much !
Re:Show HN: I wrote a book about Go by syndacks on Wednesday March 24, 2021 @08:09PM (#26574803)
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 by maximilienandi on Wednesday March 24, 2021 @08:21PM (#26574921)
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 by satysin on Wednesday March 24, 2021 @07:48PM (#26574617)
Obviously I haven't read much yet but skimming through it for 5 minutes I am impressed with what I see. Great work!

One thing I feel is missing, a PDF preview of a few pages so I can see how it looks in the digital edition. Not a huge deal so don't stress about it but I always like to preview ebooks for some reason. I may be alone here tho :)

Really though great work. I am especially impressed at the effort you put into getting a dev environment "up and running" on Windows, Linux and macOS.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:53PM (#26574664)
Thanks for your kind feedback satysin. You are not the only one to request a preview ! I will add it when I have some time.

I will include maybe the Table of Contents and a couple of chapters.

Re:Show HN: I wrote a book about Go by satysin on Wednesday March 24, 2021 @08:02PM (#26574748)
Sounds great to me! Can't go wrong with a nice looking preview ;)

Also I forgot to say I really appreciate you giving this away for free online. It is clear you put a tremendous amount of time and effort into making this.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:20PM (#26575444)
I hope it will help others :)
Re:Show HN: I wrote a book about Go by wmu on Wednesday March 24, 2021 @01:00PM (#26569927)
Looks great! Seems there were some issues in conversion into HTML chapter titles. For example https://www.practical-go-lessons.com/chap-31-logging#log.fat...
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @01:12PM (#26570087)
Thanks for your feedback I will fix this :)
Re:Show HN: I wrote a book about Go by wanghq on Wednesday March 24, 2021 @08:12PM (#26574833)
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.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @08:19PM (#26574901)
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 by RSHEPP on Wednesday March 24, 2021 @05:19PM (#26573072)
Learned something useful right away in the cheatsheet. Use table tests all the time, but never thought of the param struct for multiple function params.

Awesome work!

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:02PM (#26574183)
The table test model provided in this chapter is an adaptation of the one automatically generated by Goland, i find it really cool to use ! If you have the IDE right click > Genenerate > Table test !

I plan to add more content to the cheatsheet in the future , so stay tuned :)

Re:Show HN: I wrote a book about Go by snow_mac on Thursday March 25, 2021 @12:53AM (#26576722)
Love it-- How can I buy the book? I might not ever read the whole thing, but I love the sentiment and the fact you're giving this away.
Re:Show HN: I wrote a book about Go by kayge on Thursday March 25, 2021 @01:44AM (#26576916)
Re:Show HN: I wrote a book about Go by dctoedt on Wednesday March 24, 2021 @02:29PM (#26571176)
Looks great.

How'd you build the Web site — a package of some sort, or did you roll your own CSS? I've been working on a law-related book that I plan to post; I like the look of your site.

(I suppose it's too much to hope for that you created this with Emacs and org-mode — which is what I'm writing my book in — together with a nifty CSS package ....)

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:56PM (#26571484)
Thanks !

I wrote it using Lyx which is WYSIWYG for LaTeX. Then I convert the LaTeX document into HTML.

The HTML is then injected (with some modifications) into a Vue component (the website is built with Vue).

I use only Bootstrap for the CSS (with bootstrap-vue). When I have some time I will publish the sources of my script.

I hope it can help you !

Re:Show HN: I wrote a book about Go by jedberg on Wednesday March 24, 2021 @07:41PM (#26574560)
> which is WYSIWYG for LaTeX

Oh the delicious irony. Don't tell Donald Knuth! :)

Re:Show HN: I wrote a book about Go by AnimalMuppet on Wednesday March 24, 2021 @03:26PM (#26571829)
> I wrote it using Lyx which is WYSIWYG for LaTeX. Then I convert the LaTeX document into HTML.

What did you use to do the conversion? Will Lyx export HTML, or did you use something else?

Re:Show HN: I wrote a book about Go by dctoedt on Wednesday March 24, 2021 @03:31PM (#26571889)
Pandoc will convert from LaTex to HTML (I've not tried that specific conversion). [0]

[0] https://pandoc.org/

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:40PM (#26571965)
I used Pandoc to make the conversion. Lyx has also an option to export to HTML but I was not satisfied with the result.
Re:Show HN: I wrote a book about Go by AnimalMuppet on Wednesday March 24, 2021 @04:17PM (#26572349)
Thanks!
Re:Show HN: I wrote a book about Go by jhunter1016 on Wednesday March 24, 2021 @09:43PM (#26575624)
This is fantastic. I just learned the basics of Go by building an SDK for a friend’s REST API. I’ll tell you what, you want to learn a language, build a client SDK. You’ll hit so many crazy issues, you’ll be forced to learn how things work.

That said, I’ve got a long ways to go, and I’ve already plowed through six chapters of the book. Nice work!

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:48PM (#26575667)
Thanks jhunter1016 ! This is so true, My first Go program (for work) was to build a web server and it was so intense :)

I'm happy that you like the book

Re:Show HN: I wrote a book about Go by pknerd on Thursday March 25, 2021 @11:00AM (#26581107)
Awesome. I have done a bit of Go and released a few toy libs but this book makes me to do Go again.

I also plan to write a book about scraping in python and your way of release is more logical for ppl like me.

Like the other guy I also got stuck at TOC. I will use your mind map technique.

Could you open source book releasing tools?

Re:Show HN: I wrote a book about Go by redisman on Wednesday March 24, 2021 @02:46PM (#26571374)
Looks great. I’m getting to learn go in my new role so this will help me get up to speed before I start
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @02:52PM (#26571445)
Hello redisman, I hope it will help you.

Do not hesitate to share your feedback with me, especially if something is difficult to understand or if you spotted a mistake :)

Re:Show HN: I wrote a book about Go by herpderperator on Wednesday March 24, 2021 @07:19PM (#26574350)
Hello, this is a great resource! I noticed a typo on Chapter 8, 7.1, and thought I would report it: "If you are used to programming the first two develop the first two actions are common."

I think "the first two develop" was meant to be deleted here.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:24PM (#26574396)
Thanks for reporting that, added to my todo !
Re:Show HN: I wrote a book about Go by perceptron001 on Wednesday March 24, 2021 @02:35PM (#26571243)
Great work. I am learning golang right now. The art/pics look amazing and the samples and the explanations are on point. Thank you for your work! I'm sure it will go a long way I'll made sure I tweet about it.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:51PM (#26572087)
Thank you for your support, I really appreciate, I hope many newcomers will find it interesting.
Re:Show HN: I wrote a book about Go by itwy on Wednesday March 24, 2021 @04:26PM (#26572453)
I love your writing style. Specially the way of not assuming previous knowledge.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @05:08PM (#26572950)
I tried to define every notions used. Thank you very much for liking my style. I hope that this book will help others to start programming with Go !
Re:Show HN: I wrote a book about Go by kaladin_1 on Thursday March 25, 2021 @04:50AM (#26577794)
Great! Nice gift you've given to the community.

Please, consider reviewing this line, from chapter 5, "I use Goland, which IntelliJ develops". GoLand is developed by JetBrains. IntelliJ IDEA is their Java IDE : )

Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:37AM (#26578496)
Hello ! Thank you for your feedback ! I added this to my TODO
Re:Show HN: I wrote a book about Go by boundingpoodle on Wednesday March 24, 2021 @02:54PM (#26571476)
Thank you for building this!

I appreciate chapter 40 being included, a quick summary of go/programming recommendations. Also the illustration on the landing page caught my eye, good choice.

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:05PM (#26572242)
Many thanks! When I began writing Go code I found a lot of "Go idioms" on blog posts, it was hard to remember all of them. By the way, "Effective Go" (https://golang.org/doc/effective_go) is also a great summary of good practices.
Re:Show HN: I wrote a book about Go by kroolik on Wednesday March 24, 2021 @01:30PM (#26570332)
The book looks very interesting! In the section about logging, Logrus is unfortunately in maintenance mode now. We've used it at my place, now we have switched to Zap.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @01:54PM (#26570696)
Thanks for your feedback ! I will add a warning in the book concerning Logrus.

I will also check Zap to add an example :)

Re:Show HN: I wrote a book about Go by throwaway77384 on Wednesday March 24, 2021 @01:26PM (#26570278)
I applaud the effort. Very impressive work. I appreciate the free access to this, but will be buying, if / when I have time to work through some of the lessons :)
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @01:55PM (#26570712)
Thanks for your feedback ! It makes me happy if it can help you !
Re:Show HN: I wrote a book about Go by ok_coo on Wednesday March 24, 2021 @12:51PM (#26569770)
Thank you for this! We just started using Go for all of our new and/or updated backend stuff and I love it.

I'll definitely be checking this out. :)

Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @12:56PM (#26569845)
Thanks I appreciate :)
Re:Show HN: I wrote a book about Go by ossusermivami on Thursday March 25, 2021 @01:48AM (#26576931)
Pretty spectacular, my niece wants to learn GO having already some basic programming knowledge and this seems a perfect fit for her.
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:51AM (#26578587)
Hi ossusermivami, thanks for finding this book interesting.

I hope that it will help your niece!

Re:Show HN: I wrote a book about Go by oolonthegreat on Wednesday March 24, 2021 @07:57PM (#26574700)
looking good! I liked the fact that you took a holistic approach where you don't ONLY teach go but also things like anatomy of a computer, json/xml, http etc. My only concern is that the name "Practical Go Lessons" doesn't seem to capture this, but I don't know what else would you name it.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @08:03PM (#26574754)
Thanks for liking my approach !

Finding the title was a really hard task. I asked myself existential questions for a couple of days about it. I agree with you it's not perfect.

Re:Show HN: I wrote a book about Go by damip on Wednesday March 24, 2021 @11:06AM (#26568148)
Wow thank you for your work and providing it for free. Is there a way to submit correction PRs ? maybe a github ?
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @11:07AM (#26568162)
I'm currently working on it :)

For the moment you can post your corrections on that URL : https://www.practical-go-lessons.com/feedback

Re:Show HN: I wrote a book about Go by replwoacause on Wednesday March 24, 2021 @11:41PM (#26576367)
How very generous of you. I know what I’ll be doing for the next few weekends at least... Thank you!
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @12:51PM (#26582539)
Thanks ! Don't hesitate to send me a message with the chatbox if you have any questions
Re:Show HN: I wrote a book about Go by mprovost on Wednesday March 24, 2021 @01:42PM (#26570522)
Nice! What were the tools you used to write it and convert it to the ebook and paper versions?
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @01:53PM (#26570674)
Thanks,

I worte the book using Lyx (https://www.lyx.org/) Each chapter is a Lyx document.

Then I converted : Lyx to LaTeX, then LaTeX doc are converted to HTML with pandoc (https://pandoc.org/).

Then I have an homemade script to generate Vue Components.

Lyx and Pandoc are great tools !

Re:Show HN: I wrote a book about Go by Kosirich on Thursday March 25, 2021 @03:09AM (#26577256)
I really like the structure of the book, the layout, the format, everything! Thank you!
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:40AM (#26578515)
Thanks I appreciate your feedback !
Re:Show HN: I wrote a book about Go by exdsq on Wednesday March 24, 2021 @03:09PM (#26571643)
This is excellent! Hope you get some sales to make up for the effort :)
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @03:59PM (#26572172)
Thanks, I hope too !
Re:Show HN: I wrote a book about Go by _kst_ on Wednesday March 24, 2021 @06:13PM (#26573687)
I haven't taken a look at it yet. Can you summarize what it offers that Donovan & Kernighan's "The Go Programming Language" doesn't? (Sincere question, not being snarky.)
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @06:44PM (#26573975)
Thanks for your question. "The Go Programming Language" is a well-written book. I have not read every line of it, so my answer might not be precise.

I will highlight some key aspects of my project:

I teach computer science in my free time in a small non-profit organization. Most of the students have no knowledge at all in the field. I wanted to write a book that anybody could use, not only to learn Go but also to learn how to code from the beginning.

I tried to explain every notion by imagining a student with no prior knowledge. I also added content about some key notions like encoding, some basic knowledge about what a computer is made of, what a pointer is ...

I also tried to keep a practical approach, with many examples. I also added a lot of drawings and screenshots. Images are sometimes more efficient than long explanations (this what I learned when I began to teach children).

Keep me updated if you have some time. I would love to hear your feedback ;)

Re:Show HN: I wrote a book about Go by zelphirkalt on Wednesday March 24, 2021 @07:37PM (#26574515)
Can you share the non-profit organization name?
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:49PM (#26574632)
It's Libraries Without Border (https://www.librarieswithoutborders.org/) This ONG has launched a program to teach computer science in public libraries.
Re:Show HN: I wrote a book about Go by _kst_ on Wednesday March 24, 2021 @07:24PM (#26574397)
Thanks for replying. It doesn't sound like I'm your target audience. Best of luck.
Re:Show HN: I wrote a book about Go by _kst_ on Wednesday March 24, 2021 @08:17PM (#26574875)
I'm curious why my question is getting downvotes.
Re:Show HN: I wrote a book about Go by fl0tingh0st on Thursday March 25, 2021 @05:23AM (#26577993)
Awesome. Just loved it. Thank you !! Namasakara :)
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:37AM (#26578500)
I'm happy that you find it interesting, do not hesitate to speak to me on the website chatbox :)
Re:Show HN: I wrote a book about Go by insdel on Wednesday March 24, 2021 @02:27PM (#26571144)
Looks very good! Thanks for providing it free.
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @04:12PM (#26572306)
I hope it can help others in the process of learning how to build programs !
Re:Show HN: I wrote a book about Go by rollulus on Thursday March 25, 2021 @03:27AM (#26577338)
Really impressive. I'm a full time Go coder now, and lately I feel that a lot mediocre tutorials are appearing. In the sense that they compare as fast food to a quality dinner. I skimmed through your book and found the things I wanted to see: how to test, error wrapping, proper use of interfaces, etc. Your book is quality food. Excellent job!
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:57AM (#26578640)
Hi rollulus, I’m so grateful you liked the book :) Do not hesitate to share with me if you found an error or an improvement suggestion.
Re:Show HN: I wrote a book about Go by PaulAnunda on Wednesday March 24, 2021 @09:39PM (#26575590)
This is awesome. Thank you!
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @09:45PM (#26575644)
A big thank you PaulAnunda !
Re:Show HN: I wrote a book about Go by andreagrandi on Thursday March 25, 2021 @06:55AM (#26578626)
The website is unreachable
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @12:56PM (#26582595)
Hello andreagrandi, sorry to hear that, can you access the website now ? It's hosted on AWS with Amplify, I did not received any alerts regarding that.

The only warning I got was a Free-Tier limit alert.

Re:Show HN: I wrote a book about Go by andreagrandi on Friday March 26, 2021 @03:28AM (#26589602)
Hi! Thanks for your reply, I found the problem. I'm using NextDNS and it blocks the domain because it's been registered only a few days ago. I've added it to the allow list and now it works, thanks!
Re:Show HN: I wrote a book about Go by lovetocode on Wednesday March 24, 2021 @12:57PM (#26569858)
I love this -- thank you!
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @01:14PM (#26570110)
Thanks for your support!
Re:Show HN: I wrote a book about Go by andrewnc on Wednesday March 24, 2021 @07:27PM (#26574438)
Very cool! Great work :)
Re:Show HN: I wrote a book about Go by maximilienandi on Wednesday March 24, 2021 @07:32PM (#26574477)
Thanks andrewnc !
Re:Show HN: I wrote a book about Go by hankchinaski on Wednesday March 24, 2021 @07:52PM (#26574648)
impressive amount of content
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @12:56PM (#26582603)
Thanks ! I still have some chapters not published, I will add them later :)
Re:Show HN: I wrote a book about Go by Jahak on Thursday March 25, 2021 @03:18AM (#26577301)
Good job.
Re:Show HN: I wrote a book about Go by maximilienandi on Thursday March 25, 2021 @06:57AM (#26578642)
Many thanks Jahak !
Re:Show HN: I wrote a book about Go by dave_sid on Wednesday March 24, 2021 @02:11PM (#26570929)
Moby wrote a song about it in the 90s
Re:Show HN: I wrote a book about Go by dave_sid on Wednesday March 24, 2021 @02:12PM (#26570949)