Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MrJohz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
211.
▲
by
MrJohz
1y ago
I find if you figure out the right unit boundaries, and find a good way of testing the code, you can often keep the tests around long-term, and they'll be very stable. Even when you update the code you're testing, if the tests are
212.
▲
by
MrJohz
1y ago
Yeah, that's similar to how I'd look for the correct place to put my tests. But at that point, a unit test is just the innermost layer of tests, which doesn't feel like a useful distinction. In your example, I might have a se
213.
▲
by
MrJohz
1y ago
In general, fast tests are a must-have, but I find that means figuring out how to write fast integration tests as well so that they can also be run as part of a TDD-like cycle. In my experience, integration tests can generally be written to
214.
▲
by
MrJohz
1y ago
I've never really found this to be the case in practice. When I look at well-written unit tests and well-written integration tests, they're usually doing exactly the same sort of thing and have very similar concerns in terms of co
215.
▲
by
MrJohz
1y ago
It does split off part of Russia, I believe. The Florence meridian works slightly better for avoiding splitting any landmasses. As I understand it, it's not the best location, it's just good enough and was very popular for histori
216.
▲
by
MrJohz
1y ago
That sounds like it wasn't superfluous, because it convinced s major holdout to change, no?
217.
▲
by
MrJohz
1y ago
I think the big difference there is that browsers are only responsible for Javascript, which is a big general purpose solution that solves a lot of problems and not just templating/styling XML. Everything else either happens server-sid
218.
▲
by
MrJohz
1y ago
> We need to show dozens of things at once and this won't fit on a phone. Switch to desktop. Scrollbars can help! I really like the idea, although the designs are a bit limited and I don't know that I'd use this tool if I
219.
▲
by
MrJohz
1y ago
Wasn't this whole discussion sparked by a fairly significant bug in the libxslt implementation? There's also a comment from a Chrome developer somewhere in this thread talking about regularly trying to fix things in libxslt, and h
220.
▲
by
MrJohz
1y ago
Sure, but this requires someone sitting down and writing the JS polyfill, and then maintaining it indefinitely. And for something as complicated as XSLT, that will surely be indefinite maintenance, because complicated specs beget complicate
221.
▲
by
MrJohz
1y ago
It's harder when the source or the destination isn't all indented in quite the same way, which happens often if you start a block, press enter and end up on an indented line, and then paste the code. I don't really get the re
222.
▲
by
MrJohz
1y ago
I actually use Helix so I don't use that either, but I figured ctrl-S would be the more well-known shortcut for communicative purposes.
223.
▲
by
MrJohz
1y ago
For Go, they have a statistic from a few years back that suggests about 98% of a cross section of real-world Go projects are formatted according to gofmt. ( https://jmoiron.net/blog/fmty-dmpty ) I can believe Rustfmt and
224.
▲
by
MrJohz
1y ago
The biggest advantage if you can avoid significant whitespace is that it's usually a lot easier to manipulate text if you don't have to worry about the whitespace being correct. For example, when I'm copying and pasting Javas
225.
▲
by
MrJohz
1y ago
ESLint these days doesn't have any styling related lints (unless you opt into them) which means that it works out-of-the-box with Prettier (or Biome's formatter, presumably). My fear with Biome is missing out on type-aware lints,
226.
▲
by
MrJohz
1y ago
This is not my experience at all. In my experience, it's often quite useful being able to run code that doesn't fully type-check, as long as I do make sure everything's correct by the time I commit it. For example, I might be
227.
▲
by
MrJohz
1y ago
Async/await was implemented according to the ECMAScript spec - for a while it existed in typescript but not yet in browser runtimes, but it was fully specced out as a javascript feature rather than a typescript one. And when configured
228.
▲
by
MrJohz
1y ago
It's useful as a tool for communication and simplification. Ignoring those features, typescript is just javascript with type annotations, which makes understanding how something works easier. I've worked with a number of developer
229.
▲
by
MrJohz
1y ago
This is true but these are also old features, and the TS team have stated that they will not add any more features like those, and to a certain extent regret adding them initially (particularly decorators, which iirc were added because the
230.
▲
by
MrJohz
1y ago
I think it's not fair to say that Typescript isn't about improving safety, just that the mechanism isn't the same as with other languages. Typescript had always allowed you to ignore the type checker (in fact, the default con
231.
▲
by
MrJohz
1y ago
In fairness, I've not used GL in a couple of years, but before that I used it a lot, and it all worked, but it never worked very well. Issue organisation was painful, and there was always some new trick that made it slightly easier but
232.
▲
by
MrJohz
1y ago
As I understand it, the issue currently is that there's not really a framework for justifying or balancing those costs. Right now, the bat conservation people point out that the route will potentially eradicate a particular subspecies
233.
▲
by
MrJohz
1y ago
Look into hybrid smart watches. Withings are fairly good, but there are a handful of alternatives. They're watches that use mechanical hands like a normal watch, but also include smart components like health tracking and notifications
234.
▲
by
MrJohz
1y ago
That'll depend a lot on the context and the client, I imagine. Comptime and the minifier can be distributed in a fairly standard way as part of an NPM package's dependencies, so if you're shipping to a system that can handle
235.
▲
by
MrJohz
1y ago
This can be used as part of that step (i.e. converting `foo()` into `true` or `false`), but I think the expectation is that you'll have another step in the build process that automatically strips away `if(false)...` statements and inli
236.
▲
by
MrJohz
1y ago
Maybe twenty years ago, but these days it's pretty common to have hour-long delays, or to have trains be cancelled at short notice, or rearranged such that you won't get a connection. When traveling East/West, I'd pretty
237.
▲
by
MrJohz
1y ago
It also can transparently run tests directly in a browser rather than mocking the DOM, which is a very cool feature that I haven't used enough yet.
238.
▲
by
MrJohz
1y ago
Isn't that exactly the syntax being recommended? Could you explain what exactly in the article is a solution in search of a problem?
239.
▲
by
MrJohz
1y ago
Part of the design of the feature is that the website doesn't have to specify "on hover" or "on focus", but instead they can just write "eagerness: moderate" (or "conservative", or "eager&qu
240.
▲
by
MrJohz
1y ago
The point of this proposal is to bring this feature under the control of the browser, which is probably better placed to decide when preloading/prerendering should happen. It's already possible to do something very similar using J
More ›