kogasa

joined 1 year ago
[–] kogasa@programming.dev 2 points 4 weeks ago* (last edited 4 weeks ago)

No other country even makes the first page

If every state in America were only 1% worse than every other country, then again the first 50 entries would be the American states. This is barely saying more than "America has the highest incarceration rate," so it shouldn't be a surprise.

[–] kogasa@programming.dev 4 points 4 weeks ago (1 children)

There may be a need for additional information, there just isn't any in these responses. Using a basic JSON schema like the Problem Details RFC provides a standard way to add that information if necessary. Error codes are also often too general to have an application specific meaning. For example, is a "400 bad request" response caused by a malformed payload, a syntactically valid but semantically invalid payload, or what? Hence you put some data in the response body.

[–] kogasa@programming.dev 4 points 1 month ago

It's a reach, but the Fourier transformation of a Schwarz (rapidly decaying) function is also a Schwarz function. Compact support is a strictly stronger condition than Schwarz (the function must eventually decay to 0) but doesn't have this nice property with respect to Fourier transforms, i.e. the FT of a compactly supported function is Schwarz but not necessarily compactly supported

[–] kogasa@programming.dev 1 points 1 month ago

No, it isn't

[–] kogasa@programming.dev 1 points 1 month ago

You're making assumptions about the control flow in a hypothetical piece of code...

[–] kogasa@programming.dev 1 points 1 month ago (2 children)

What you're saying is "descriptive method names aren't a substitute for knowing how the code works." That's once again just a basic fact. It's not "hiding," it's "organization." Organization makes it easier to take a high level view of the code, it doesn't preclude you from digging in at a lower level.

[–] kogasa@programming.dev 2 points 1 month ago

You can't disagree with the fact that Nullable works a lot like an Option. Returning an error is not idiomatic C# code (which would be to throw an exception usually) but if you wanted that, you'd use a Result type or similar.

[–] kogasa@programming.dev 3 points 1 month ago (1 children)

Null pointers are one thing, C# nulls (with nullable reference types enabled) are another. They behave a lot like an Option monad with the caveat that the static analysis can technically be tricked by incorrect hints.

[–] kogasa@programming.dev 3 points 1 month ago (4 children)

No, your argument is equally applicable to all methods. The idea that a method hides implementation details is not a real criticism, it's just a basic fact.

[–] kogasa@programming.dev 5 points 1 month ago (6 children)

You realize this is just an argument against methods?

[–] kogasa@programming.dev 3 points 1 month ago (1 children)

Java is a fine choice. Much prefer it over pseudocode.

[–] kogasa@programming.dev 3 points 1 month ago

It's possible to have an equiangular quadrilateral, i.e. whose sides are geodesics (the analogue of "straight line" on a sphere). The Gauss-Bonnet theorem implies their total interior angle is greater than 2pi, so four right angles can't work.

Here's an interactive demo of quadrilaterals on the sphere: https://geogebra.org/m/q83rUj8r

Notice that each side is a segment of a great circle, i.e. a circle that divides the sphere in half. That's what it means for a path to be a geodesic on the sphere.

view more: next ›