Skip to content

Answer what first-time users got stuck on - #9

Merged
pscheid92 merged 2 commits into
mainfrom
docs-from-user-simulation
Nov 9, 2026
Merged

pscheid92 merged 2 commits into
mainfrom
docs-from-user-simulation

Conversation

@pscheid92

Copy link
Copy Markdown
Owner

Fixes from a simulation: 15 Haiku agents each played a first-time user with one goal, read only the README and
go doc, and wrote notes on where they got stuck.

Undoing too much trimming in #8 (the most common complaints)

  • Usage is a complete program with its imports again (7 of 15 had to guess encoding/json/v2). I ran it as written.
  • "Pass one option per call" is replaced; 5 quoted it as confusing.

Gaps

  • A named type such as type TTL time.Duration, and a struct that keeps time.Duration fields when others encode it:
    two new tested examples (ExampleWith_namedType, ExampleWith_structWithoutOptions), the first also in the README.
  • Joining with existing marshalers as code, a format from an environment variable with Valid() and Formats().
  • Error texts people search for: no default representation, calendar units have no fixed length. Malformed JSON
    is a jsontext.SyntacticError.
  • Rollout order when several services share data; Milli writes 1.5ms as 1.5; no GOEXPERIMENT needed.
  • ISO8601 reads lower case and a decimal comma, now said in public docs; the Java example is the common PT-30S.
    This changes only the example, not whether Java's form is accepted.
  • doc.go listed the causes without ErrWrongType.

Not done: putting AcceptDays into the error message itself. Error messages can reach API clients, which should not
read an option name, so the README quotes the message next to the fix instead.

The README grows from 197 to 256 lines, mostly the complete Usage program. pkg.go.dev shows it only after a release.

Fifteen simulated first-time users worked through the README and go
doc. Most missed the imports and misread "one option per call", both
lost in the last trim. Usage is a complete program again, with a plainer
sentence about what With covers.

The README and docs now also show a named duration type with a format,
a struct that keeps time.Duration fields when others encode it, joining
with existing marshalers, a format from an environment variable, the
error texts people search for, rollout order when migrating, and that
ISO8601 reads lower case and a decimal comma. The Java example is the
common "PT-30S", and the package doc lists ErrWrongType among the
causes.
@pscheid92
pscheid92 merged commit df5c858 into main Nov 9, 2026
19 checks passed
@pscheid92
pscheid92 deleted the docs-from-user-simulation branch November 9, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant