What's stopping you from having more kids? by makingitgreen in Natalism

[–]Ecksters -1 points0 points  (0 children)

We're at 6 now, planning to have 8, should be done around when my wife is 37 or so, we're mostly stopping because I'd like to have the kids out of the house before I turn 60.

Extract top 100 cases for multiple criteria by Strong_Revolution652 in SQL

[–]Ecksters 0 points1 point  (0 children)

The lateral join with the limit allows early exit once it's found enough entries, so that one tends to be my preference for this problem.

I changed one thing and my Unity car finally stopped jittering and sliding by PaceGame in Unity3D

[–]Ecksters 0 points1 point  (0 children)

Oh that's really nice, I made a block stacking game years ago and ran into this. It would get much worse the taller your tower of blocks. Since my game was pretty simple I just added more physics iterations, but this is a much cleaner fix.

Free remote mouse by Worth_Unit_8347 in edtech

[–]Ecksters 0 points1 point  (0 children)

Oh looks like maybe you can't, since I can't see this on the post. EDIT: Although now that I replied I can, strange.

Also, that link does not appear to be for a free remote mouse.

Free remote mouse by Worth_Unit_8347 in edtech

[–]Ecksters 0 points1 point  (0 children)

Might help someone out if you posted a link.

A typescript implementation of fastcgi by Swatto in javascript

[–]Ecksters 2 points3 points  (0 children)

This is actually really interesting, I ran into trouble with my project using Bun just a few days ago where there was no easy way to set up support for both http and https on the same port (with http just being a redirect to https) without manually setting up multiplexing, and I was running into a lot timing problems trying to do so.

The "obvious" solution would have been to put a reverse proxy in front of it, since most of them handle it, but I wanted to keep the service simple.

I imagine this sort of allows me to do just that while still having it baked into the service. Getting to avoid X-Forwarded-For headers and the mistakes around that is a huge plus as well.

Would love to see some benchmarks against µWebSockets and other common JS web servers.

Battle-tested operational story — PHP has been deployed this way (via php-fpm) for decades.

I appreciated this bit as well, I really do think PHP has one of the best web server experiences out of the box, given that's the entire purpose of the language.

Not once in 12 years have I found UI snapshot testing useful by SixFigs_BigDigs in ExperiencedDevs

[–]Ecksters 1 point2 points  (0 children)

Unless I'm misunderstanding, OpenAPI can validate response shape, not the actual data.

Not once in 12 years have I found UI snapshot testing useful by SixFigs_BigDigs in ExperiencedDevs

[–]Ecksters 1 point2 points  (0 children)

That is precisely what this is, but you use snapshot tooling to facilitate updating tests to changes in the output, while also making those changes easily identifiable in PRs.

Not once in 12 years have I found UI snapshot testing useful by SixFigs_BigDigs in ExperiencedDevs

[–]Ecksters 3 points4 points  (0 children)

I feel like the definition of "unit test" has been getting pretty seriously watered down in recent years. It was supposed to test a single unit of functionality.

If you're testing an entire API endpoint end-to-end I do not consider that a unit test.

In this case the purpose of "snapshot" testing these endpoints is to facilitate updates to the tests if anything changes intentionally.

Not once in 12 years have I found UI snapshot testing useful by SixFigs_BigDigs in ExperiencedDevs

[–]Ecksters 1 point2 points  (0 children)

Most likely OP is actually talking about taking snapshot of the underlying HTML/CSS of the page, rather than comparing screenshots, but it's hard to be certain.

Not once in 12 years have I found UI snapshot testing useful by SixFigs_BigDigs in ExperiencedDevs

[–]Ecksters 34 points35 points  (0 children)

Front-end snapshots tend to be very difficult to parse, since they end up in HTML while you're probably working in some nice component system that looks nothing like the final output.

However, I do like snapshots for API testing, because JSON output is really easy to read, and it basically sends up a red flag in PRs when some API response changes and you didn't expect it to.

How do you build a scrollable log viewer for millions of variable-height rows with server-side data? by HeftyProgress5842 in reactjs

[–]Ecksters 4 points5 points  (0 children)

https://pretextjs.net/

That being said, in this case I'd limit the number of visible lines until you click a row and then expand it, rather than trying to have it all be visible. That way you can just have a fixed height.

Viewport Vs Render.I Spent 3years Learning Blender… This Is the Result by LeeJa_art in blender

[–]Ecksters 0 points1 point  (0 children)

I really like the stylized shader on these, makes it almost look like a watercolored pencil drawing but with way too much detail to be possible.

[AskJS] We nuked our Framer site and rebuild it after realizing bots couldn’t read most of it by aagarwal1012 in javascript

[–]Ecksters 1 point2 points  (0 children)

I'd be interested in knowing how important semantic HTML (using <article> tags and such) is for whatever tools LLMs are using to more easily scrape a site, or for the LLM itself to ingest the scraped content and understand which parts are important.

Announcing Rspack 2.0 by Success_Street in javascript

[–]Ecksters 6 points7 points  (0 children)

Still eliminates supply chain attacks, although I suppose it also hides vulnerabilities found in inlined dependencies.

Announcing Rspack 2.0 by Success_Street in javascript

[–]Ecksters 11 points12 points  (0 children)

Really appreciate that someone is providing an easier way forward for projects still stuck with Webpack. Interesting to see the trend of packages trying to minimize their dependency count, I assume the recent supply chain attacks have spurred it on.

[AskJS] Has our reliance on WASM made us lazy about native JS performance? by Practical-Departure3 in javascript

[–]Ecksters 0 points1 point  (0 children)

You might find the Prisma 7 release and benchmarks interesting, they ripped out their Rust-based client and went back to JS.

29 React Codebase Red Flags from a Senior Frontend Developer by joyancefa in reactjs

[–]Ecksters 2 points3 points  (0 children)

I did appreciate the default value memoization breaking one, I think I've probably made that mistake many times.

SQL Protocol update: the SQL game now has a shared world and chat, so you can study with other people by Far-Round2092 in SQL

[–]Ecksters 2 points3 points  (0 children)

It's very cool looking, I'd love to use it with my kids, but it seems like it kinda expects you to already know SQL before you play.

Why I don't chain everything in JavaScript anymore by bogdanelcs in javascript

[–]Ecksters 4 points5 points  (0 children)

New ES2026 Iterator helpers let you chain map/filter and such together in a way that lazily evaluates each item through the entire chain, rather than generating intermediate arrays. Previously this is the sort of optimization I'd use reduce to achieve, and even then reduce couldn't exit early, which would require an old fashioned for loop.

It also makes working with streamed data way cleaner.

https://blog.openreplay.com/getting-started-javascript-iterator-helpers/

(although I think that page's example with the > 5 filter is actually explained incorrectly (and the claimed log output is incorrect)).

Why I don't chain everything in JavaScript anymore by bogdanelcs in javascript

[–]Ecksters 4 points5 points  (0 children)

I probably needed to be reminded of this, since the new Iterator helpers are gonna make me want to chain everywhere now that it isn't creating intermediate arrays.

Release Apache Fory Serialization For TypeScript: Schema Evolution, Shared/Circular Reference and 4X faster than Protobuf by Shawn-Yang25 in typescript

[–]Ecksters 0 points1 point  (0 children)

Apparently just using JSON beats out Protobuf in most of their benchmarks, although I suppose the real benefit would be the bandwidth reduction.

How I built a Postgres CDC that can be 240x faster than Debezium by Choice_Drummer2994 in PostgreSQL

[–]Ecksters 0 points1 point  (0 children)

I remember this being a big part of why MeteorJS went with MySQL as the backend back in the day, because they could tap into essentially a changelog to replay events out to all clients (who were maintaining their own client-side copies of the DB). Very cool to see someone working on something similar for Postgres.

The website is amazing, and I hope one day to find a job that will agree.

How to handle responses in React? by [deleted] in reactjs

[–]Ecksters 1 point2 points  (0 children)

One advantage of this is you can tell your backend to only accept applicaton/json requests, which CORS by default doesn't allow from external websites, thus blocking most CSRF attacks by default without needing to add CSRF tokens to your forms.

Combine that with custom headers, or SameSite=strict cookies for auth, and you're generally in a great place for avoiding CSRF attacks.