I've found that talking through projects is a weak indicator of competence. It's much easier to memorize talking points than to produce working code.
1,425 karma · joined December 2, 2015
Paratrooper to programmer.
http://github.com/jschaf
hn@schafer.dev
I've found that talking through projects is a weak indicator of competence. It's much easier to memorize talking points than to produce working code.
It's possible to migrate method calls incrementally (create a new method or add a parameter). In large codebases, it's necessary to migrate incrementally. The techniques overlap those of changing an RPC method.
package errs
// Capture runs errFunc and assigns the error, if any, to *errPtr. Preserves the
// original error by wrapping with errors.Join if the errFunc err is non-nil.
func Capture(errPtr *error, errFunc func() error, msg string) {
err := errFunc()
if err == nil {
return
}
*errPtr = errors.Join(*errPtr, fmt.Errorf("%s: %w", msg, err))
}
I conventionally use mErr to distinguish from err. func doThing() (_ string, mErr error) {
f, err := os.Open("foo")
if err != nil {
return "", fmt.Errorf("open file: %w", err)
}
// Use the file...
defer errs.Capture(&mErr, f.Close, "close file")
return "", nil
}[1]: https://google.aip.dev/121
[2]: https://google.aip.dev/160
> Your GETs support a filter query parameter, which works for every attribute of the resource being retrieved.
That's not easy in practice. You'd have to filter the entire collection on the server or database. For large tables, you'd need to index attributes and build the appropriate predicate, which can be challenging for normalized tables.
Good discussion at https://dba.stackexchange.com/questions/2342/what-is-atomic-...
SELECT * FROM order JOIN_ONE customer USING (customer_id)
Malloy has join_one: https://docs.malloydata.dev/documentation/language/joinThe DOD estimates 4.3-8.4 percent of women experience unwanted sexual contact, based on 8,500 reports, extrapolated to 29,000 estimated incidents. The author argues that the actual rate is 24% of women, using the median estimate from a range of independent studies.
DOD's most significant change was moving the prosecution authority for sexual assault to a separate tribunal in 2023.
[1]: https://watson.brown.edu/costsofwar/files/cow/imce/papers/20...
That'd be a neat integration: "Alexa, why is my baby crying?"
- we needed to upgrade all dev servers to serve both HTTPS and HTTP. - we downgraded server to server comms to HTTP (something about invalid cert chain)
I think the ideal solution is to use “local” domain names but that requires a DNS resolver (via Tailscale or similar).
- There's a fair bit of math to model drag, mass, and density using the specific gravity of ice and seawater (with tweaks to make it more realistic for 2d).
- Try adding a polygon that overlaps itself (self-intersects).
- You can paste images! The code traces the image and picks the most complex polygon.
In my experience, Bazel works best when:
- You have a monorepo.
- You have one engineer who knows it in and out and can stay current.
- You use several languages well-supported by Bazel (Protobuf, Go, Java, Kotlin).
The benefits are a single way to build and run all tests and binaries across all languages. Bazel CI providers (BuildBuddy, EngFlow) are much nicer than YAML engineering in other CI systems.
I have an old comment that's still representative of my experience: https://news.ycombinator.com/item?id=32831555
This technique hides about 80 ms of latency when triggered on mousedown and up to a few hundred milliseconds for hover.
https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastr...
Most of the comments down thread underestimate water consumption. Depending on the climate, you'll want the following daily quantities [1]:
- 2-3 gallons for drinking
- 1.5 gallons for hygiene (can skip for a while)
- 0.5 gallons for food prep
The planning factor for military operations was 8 gallons per person per day. Water is heavy—8 pounds per gallon—and acquiring, storing, and moving it is a large effort.
[1] https://cascom.army.mil/g_staff/g3/TTD/Products/QM-How-to-Ha...
- 404 might mean the URL was wrong
- 405 might mean swapping POST with PUT
1. Number all sets from 0.
2. Construct a new set by picking the i^th number from each set.
On iOS, there’s a text scale button in the URL bar which does the trick.