Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Error handling idioms across languages card 5 of 6

Go: the err that became _

Before the change, a failed `Load` returned early, with its error wrapped as `load: …`. Now the `_` drops that error. On failure, `Load` returns a nil `*Config`, so `cfg.DSN` panics with a nil pointer dereference, and the crash says nothing about the missing file. **Tell:** an `err` replaced by `_`. **Better:** keep the removed lines. Because `%w` wraps the error, callers can still check `errors.Is(err, fs.ErrNotExist)`.
// Go
--- a/server.go
+++ b/server.go
@@ -12,8 +12,5 @@
-  cfg, err := Load(path)
-  if err != nil {
-    return nil, fmt.Errorf("load: %w", err)
-  }
+  cfg, _ := Load(path)
   db, err := Open(cfg.DSN)
   if err != nil {
     return nil, err
   }
Terms on this card
%w
Go fmt.Errorf verb that wraps an error inside a new one, so errors.Is and errors.As can still find the original.
errors.Is
Go function that checks whether an error, or any error it wraps, matches a given target error.
fs.ErrNotExist
Go's standard error value meaning a file or directory does not exist.
nil pointer dereference
Go runtime panic raised when you access a field or method through a pointer that is nil.
panics
In Rust, an unrecoverable runtime error that by default stops the current thread with a message.
Learn this step by step on Bytewise
Lesson goal: Compare exceptions (Python, Java checked and unchecked, JS/TS), Result/Option with ? (Rust) and error values (Go). For each, say where an error should be handled versus propagated and what 'ignoring' an error looks like. · the whole lesson