HNHacker News
TopNewBestAskShowJobs

Bartkusa

102 karma · joined October 7, 2015

submissionscomments
Bartkusa··on MySafeSpace – Whitehouse.gov
Almost certainly a Hatch Act violation.
Bartkusa··on The Impact of Jungle Music in 90s Video Game Development
I totally thought about Tetrisphere on N64:

https://www.youtube.com/watch?v=dRMN7GzZ3ic&list=PLE0926B068...

Bartkusa··on How one ED mobilized his department during a mass casualty incident (2017)
> Dr. Greg Neyman, a resident a year ahead of me in residency, had done a study on the use of ventilators in a mass casualty situation. What he came up with was that if you have two people who are roughly the same size and tidal volume, you can just double the tidal volume and stick them on Y tubing on one ventilator.

This technique was later applied during the COVID-19 pandemic, when ventilators were in high demand and short supply.

https://www.vice.com/en/article/this-risky-hack-could-double...

Bartkusa··on Kawaii – A Keychain-Sized Nintendo Wii
I would’ve chosen “Key-wii”.
Bartkusa··on The Work-from-Home Era Is Bad for Burglars
On the flip side, this trend is great for home invaders
Bartkusa··on New York State Deploys National Guard to NYC Subways to Fight Crime (Bloomberg)
Possibly this:

https://www.nyclu.org/en/cases/macwade-v-kelly-challenging-n...

> This case involves the NYPD's practice of stopping and searching subway goers without just cause. On July 21, 2005, the NYPD announced that it would begin a new program of searching the belongings of those seeking to enter the subway system. Since the program was implemented, the NYPD has searched tens of thousands of people without any suspicion of wrongdoing. On Aug. 4, 2005, the NYCLU filed a complaint in the District Court on behalf of five individuals. The complaint alleges that the NYPD program violates the Fourth and Fourteenth Amendments...

> On Dec. 7, 2005, the District Court ruled in favor of the defendants and refused the plaintiffs’ request for a permanent injunction. The decision stated that the random subway search program was not “impermissibly intrusive” and was constitutional. The NYCLU appealed to the United States Court of Appeals, Second Circuit. On Aug. 11, 2006, the Second Circuit upheld the District Court decision, stating that the program constitutes the “special need” exception to the Fourth Amendment.

Bartkusa··on Changes we're making to Google Assistant
> Managing a stopwatch on Smart Displays and Speakers. You can still set timers and alarms.

How much does this cost to maintain? A stopwatch? They’re axing a STOPWATCH?!

This is embarrassing.

Bartkusa··on Thinking hard makes the brain tired
This is similar to Rich Hickey’s talk on “Hammock Driven Development”:

https://youtu.be/f84n5oFoZBc

Spend your conscious time loading your brain with data. Spend your unconscious time randomly making connections… until “Eureka!”

Bartkusa··on As U.S. schools shuttered, student mental health cratered, survey finds
https://www.cnn.com/world/live-news/coronavirus-pandemic-07-...

> Researchers in South Korea have found that children between the ages of 10 and 19 can transmit Covid-19 within a household just as much as adults, according to new research published in the US Centers for Disease Control and Prevention journal Emerging Infectious Diseases

Bartkusa··on Raspberry Pi for Kill Mosquitoes by Laser
This kind of firehose, right?

https://www.boringcompany.com/not-a-flamethrower

Bartkusa··on Pros and Cons of Coworking Spaces
Atlas Workbase https://www.atlasworkbase.com/
Bartkusa··on Everything about React events (with live exercises)
Are they really "custom events" if they don't bubble up?
Bartkusa··on Show HN: AcrossTabs – Easy communication between cross-origin browser tabs
Put it behind a setter with "doNotUseOrYouWillBeFired" in the function name.

https://github.com/facebook/react/blob/80bff5397bf854750dbe7...

Bartkusa··on Hotel Stays, Especially in Inclement Weather
>> call a shelter or the related police station and ask how many assaults they have had reported in the past year.

• If assaults happened in shelters, why would the shelters ever tell you?

• Why would anyone ever tell the police? I can't imagine the homeless victims would want the police MORE involved in their lives.

• Even if someone told the police about an assault at a shelter, would they bother to investigate, or keep records? Police have incentives to reduce crime stats, which isn't the same as reducing crime.

Bartkusa··on React Server
Good question. No, the data is downloaded only once.

The server tells the client what requests it's making on the client's behalf.

If the client's JS tries to make a request for a URL that's already in-progress, the client's React-Server code will skip the request and return a promise of the server's streamed response instead.

If the client's JS tries to make a request for something, and the server IS NOT already handling it, then the client will send out an HTTP request, and React-Server will step out of the way.

Bartkusa··on React Server
Hey, I'm a dev at Redfin, and I've done something like this (with Gigabo's help). It's possible, but it's not well-supported yet.

My team owns one special-snowflake API in React-Server. We want the API to be reachable from the client via HTTP, but also want to execute the code directly during server-side rendering, with no HTTP call. It's your exact use-case.

In order to do that, we

1. Detect if the API is invoked server-side.

2. Tell Superagent* to tell the client "hey, if you want data for $API_URL, don't make an HTTP request; the response will come inline in the page's HTML response.

3. Invoke the API code directly.

4. When the API response is ready, serialize it, and tell Superagent to pass it to the client.

We don't do this kind of thing frequently, so we haven't built any graceful tooling for it.

* I _think_ this is Superagent: https://visionmedia.github.io/superagent/https://visionmedia.... Somehow, we use it in a way that notifies the client of what HTTP requests the server is performing on its behalf; not sure if that's stock Superagent or if we added some magic to it.

Bartkusa··on React Server
This is true. However, if the checksums match, then React can skip tree-diffing and DOM mutations.
Bartkusa··on React Server
Each page is split into sections. Each section may wait for async data and API responses. When all the data arrives, the section is rendered as an HTML string.

The server streams each section's static HTML to the client as soon as it's ready, and after all prior sections are streamed.

The server also streams the async data to the browser. This avoids the latency of the client downloading some HTML, then downloading some JS, then making the requisite API calls for the page's data. (Think of it as a hacky version of HTTP Server Push.)

On the client-side, React and your JS are downloaded, React will recycle as much of the static DOM as possible (writing isomorphic JS isn't always easy), then take over and do its thing.

Bartkusa··on React Server
That statistic is out of date; Redfin has built dozens of pages on React-Server by this point.

(Also, just to be clear, we treat all home details pages as a single logical page.)

Bartkusa··on React Server
Redfin uses it in production. https://www.redfin.com/blog/2016/05/announcing-react-server....

"We’ve been using it here at Redfin in production for over a year and it serves the three highest traffic pages on the site. We’re serving 1 billion requests a month from our React Server instance; hundreds of requests per second during peak hours."

Bartkusa··on Hyper-Reality [video]
My Amazon Kindle and Fire Tablet already do this. I would need to pay $15 for the ability to skin my Fire's lockscreen.

(Although it's much easier to not look at my devices, than to not look at my apartment's walls.)

Bartkusa··on What Zillow doesn't want you to know about its listing gap
Most Americans currently live in areas served by Redfin.

Most of the US is very sparsely populated, so I don't think that's a good measure of coverage. Rural areas and smaller cities deserve service, too, but that'll come with time.

(I'm currently employed by Redfin.)