
jimschubert
Distributed Services With Go - Ch 3 index errors on Config
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until page 36. This causes compilation errors for anyone coding as they follow along.
Marked As Solved

travisjeffery
Yeah this is subjective. I’ve had people saying they wanted the way it is currently so they can see how the type is used to see where it fits in before it’s defined.
Also Liked

disknoir
For me, one of the worst experiences when coding along with books is when structures are left undefined like this. I feel it should at least be mentioned in the text that it will be defined later, and even then not left until after the tests. When this happens, there’s always the feeling in the back of my mind that the author has made a mistake (ever tried to read a packt book? 90% of the ones I’ve seen are unreadable. There are a few gems though
) Personally I would have defined it up front along with index, and explained it’s properties. That’s just my preference though.

fatroom
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /django
- /spring
- /diversity
- /lua
- /nodejs
- /slackware
- /julia
- /c
- /neovim