Just got a crazy question during a code review, to summarise: should the error message (as in
Example:
vs
Hopefully you get the difference. Yes, it's bike-shedding but I'm curious!
fmt.Errorf(...)) describe the failed expectation or the expected behaviour?Example:
fmt.Errorf("param must be a quoted string: %s", s)vs
fmt.Errorf("param is not a quoted string: %s", s)Hopefully you get the difference. Yes, it's bike-shedding but I'm curious!
Hey, let’s assume you’re designing office for your team or even a company.
What are you must haves or must not haves?
Yeah yeah I know probably most of you are remote but let’s be real, post-COVID era is here.
What are you must haves or must not haves?
Yeah yeah I know probably most of you are remote but let’s be real, post-COVID era is here.
Vercel’s breach is really something.
https://webmatrices.com/post/how-a-roblox-cheat-and-one-ai-tool-brought-down-vercel-s-entire-platform
https://webmatrices.com/post/how-a-roblox-cheat-and-one-ai-tool-brought-down-vercel-s-entire-platform
Here is an example code snippet:
In which cases you would like to extract callback to a separate function and unit tests it? What if it's not a math code inside?
What if
What if setup before calling
I hope you get the idea what I'm asking. Thanks in advance for extensive answers (DM is open btw).
res := foo(func(in Bar) Baz {
// some computations
// (let's say not a very complicated math)
return baz
})
In which cases you would like to extract callback to a separate function and unit tests it? What if it's not a math code inside?
What if
foo does complicated code inside (or not). What if callback is pure or has side effects?What if setup before calling
foo is pretty long, so testing whole foo scope is too much? etc.I hope you get the idea what I'm asking. Thanks in advance for extensive answers (DM is open btw).
instructions=$(mktemp /tmp/gpt-5.5-instructions.XXXXXX) && \
jq -r '.models[] | select(.slug=="gpt-5.5") | .base_instructions' \
~/.codex/models_cache.json | \
grep -vi 'goblins' > "$instructions" && \
codex -m gpt-5.5 -c "model_instructions_file=\"$instructions\""
Does nobody else laugh that a company supposedly worth more than almost anything else at the moment, is basically hacking around a load of text files telling their trillion dollar wonder machine it absolutely must stop talking to customers about goblins, gremlins and ogres? The number one discussion point, on the number one tech discussion site. This literally is, today, the state of the art.nice (Treap inside, at least now)
https://github.com/golang/go/issues/60630
https://github.com/jba/omap/blob/main/ordered/map.go
https://github.com/golang/go/issues/60630
https://github.com/jba/omap/blob/main/ordered/map.go