665 karma · joined September 26, 2018
maintaing express, lodash, cors, body-parser, etc etc
https://s2.dev/playground?token=Oq4AAAAAAABodAPA46wzu2bBlbU7...
https://t2tmud.org/history/30th_anniversary_reboot_script.ph...
https://developer.mozilla.org/en-US/docs/Web/API/Window/setT...
I think it has clear requirements and opportunities for nudges from the interviewer without invalidating the assessment (when someone inevitably gets tunnel vision on one particular requirement). It has plenty of ways for an interviewee to demonstrate their knowledge and solve the problem in different ways.
Ive run debounce interview questions that attempt to exercise similar competency from candidates, with layering on of requirements time allowing (leading/trailing edge, cancel, etc) and this queue form honestly feels closer to what Id expect devs to actually have built in their day to day.
“… it doesn't ever have to handle more than one request at once (at least from the same client, so we can assume this is a single-server per-client type of architecture).“
For sure a multithreaded async queue would be a very interesting interview, but if you started with the send system the interview is constructed around youd run out of time quickly.
I didnt mean it to come across that way. The spec does what the spec does, we should all be aware of it so we can make informed decisions.
What framework allows you to setup a misconfigured parser out of the box?
I dont mean that as a challenge, but as a server framework maintainer Im genuinely curious. In express we would definitely allow people to opt into this, but you have to explicitly make the choice to go and configure body-parser.json to accept all content types via a noop function for type checking.
Meaning, its hard to get into this state!
Edit to add: there are myriad ways to misconfigure a webserver to make it insecure without realizing. But IMO that is the point of using a server framework! To make it less likely devs will footgun via sane defaults that prevent these scenarios unless someone really wants to make a different choice.
It may send an OPTIONS request, or not.
It may block a request being sent (in response to OPTIONS) or block a response from being read.
It may restrict which headers can be set, or read.
It may downgrade the request you were sending silently, or consider your request valid but the response off limits.
It is a matrix of independent gates essentially.
Even the language we use is imprecise, CORS itself is not really doing any of this or blocking things. As others pointed out it’s the Single Origin Policy that is the strict one, and CORS is really an exception engine to allow us to punch through that security layer.
The browser will restrict the headers and methods of requests that can be sent in no-cors mode. (silent censoring in the case of headers, more specifically)
Anything besides GET, HEAD, POST will result in an error in browser, and not be sent.
All headers will be dropped besides the CORS safelisted headers [0]
And Content-Type must be one of urlencoded, form-data, or text-plain. Attempting to use anything else will see the header replaced by text-plain.
[0] https://developer.mozilla.org/en-US/docs/Glossary/CORS-safel...
It’s understood that this level of output isnt sustainable without significant individualized support. Without it even elite athletes plateau, regress, or get injured.
A real athlete isnt left to figure it out alone, theyre backed by an entire system designed to _help them thrive long term_.
This article exists because it is a spectacle, and that alone should tell us something.
Edit: The athlete metaphor is used here because it is an “appeal to heroism” (greatness demands this of you) which is the root of all hustle culture inspo.
Im sure that Chong believes this framing himself. In the search for purpose, it is common (very human) to attempt to transmute pain into purpose. And sometimes it does help people find clarity or endure hard situations. An individual can choose that path, it is their right.
But it is a dangerous alchemy when applied at scale and by leaders.
CGP Grey has a lot of opinions[1] about this.
Tolkien himself didnt “write” the Silmarillion the way people might assume. He spent decades writing and iterating on mythology, world building, creating languages. He had multiple versions of many stories and ideas, many drafts in various states, but he never pulled it all together into a single book or officially canon narrative.
After his death his son Christopher took on that monumental task, with great care and understanding of his father’s work. Combing through who knows how many mountains of notes, unfinished stories, and contradictions to create what we know as the Silmarillion. Tolkien himself often said of things in the LOTR canon “I don’t know” or something loke “I havent translated/uncovered that yet”. He looked at it all as if he was a literary archaeologist, translating passed down texts. So with that came lots of uncertainty and hearsay. The fact that his son tackled that, maintained that mystique, and created the Silmarillion is really exciting and lucky in my opinion. Good kid, I guess!
It is considered invalid syntax to lead with a dot by the rules. But it also must be ignored if present. Its lacking a “MUST NOT” because the spec is defining valid syntax, while also defining behavior for back compat.
It would break too many things to throw here or serialize while ignoring the leading dot. Leading dots are discouraged, but shouldnt break anyone following the spec. Maybe a warn log in dev mode if serializing a domain with dot, to try and educate users. Dunno its worth it though.
The point of jshttp IMO is to smooth over these kinds of nuances from spec updates. So devs can get output which is valid in as many browsers as possible without sacrificing functionality or time studying the tomes.
https://openai.com/careers/full-stack-software-engineer-leve...
Corporate Decision Maker #2, sure, theyll get hoodwinked. They and their company may have only 50 years of experience and institutional memory to draw on. But State Militaries? What excuse do they have? War changes, but the armed forces have a long memory, and their poor decisions cost lives. Maybe Im off base, but I would expect each mistake to be an opportunity to learn for that industry. The industry has had plenty of lessons learned over the past 100 years. Why is the latest hype cycle to blame, and not those whose job it is to ensure they maintain capabilities and extensively game out scenarios and responses?
Bad bets on tech happen even in institutions with lifetimes of history to draw on, but I see that as a failure of the institution, not on the completely mundane hype cycles which occur naturally.
Obviously mistakes happen, and maybe thats what the article is getting at. But if we’re going to point fingers (not saying you are) then lets not let decision makers off the hook whose job is to prevent that hot new thing getting their people killed.
not out to defend reddit here, it also feels to be going donwhill to me, but this is not something I've personally experienced on the site yet
This piece is interesting in how peculiar it is, but I'd say not newsworthy.
I did learn at least that there is some NFT history behind the company rabbit, which I was unaware of.
But to be charitable bc that is basically a nit, he would have advised a calculated approach to wielding political influence or instilling fear. He was partial to creating alliances with the adversaries, circumventing them, or otherwise coercing them into agreeing with your priorities.
He was the “Its better to be feared not loved, if you can’t do both” guy so GP is right when they say his advice here would not be kind. Its because his methods are not really what you want to use to make a better environment at work. Ironically, I think all the problems Machiavelli was concerned with were “people problems”, but he wasn’t concerned with fixing them, just doing whatever it takes to maintain stability for a given ruler.
So, buyer beware, but posting this link in case it does help someone.
That is interesting! Especially considering the true number of signups would be higher based on users who signed up but have never posted anything. Although we dont know how many are spam accounts that signed up, posted, and got banned.
It’s a fair price to get someone’s content, and I know the revenue from that is much higher than what they’ll get from the platform’s ad share. Yet still it is irritating. The majority of content I consume idly I would never pay for. So again, a fair bargain I suppose.
There are content creators whom I’d happily support directly for the sake of the value I ascribe to their content, not just to remove their ads, but they don’t offer the option. I understand there are many reasons for any given creator why an ad supported business model may be preferable/simpler/earn more. And maybe this is just a shift in the creator economy which is more slowly dispersing than I personally would expect.
But truly from a superfan or consumer point of view, I end up valuing the paid podcasts I subscribe to on Spotify which are ad free over many pieces of content that I arguably enjoy more but are forced to skip through their ads.
I’ve paid for Ben Thompson’s content for almost 10 years now, and listen to his podcast via Spotify. I remember when he said he’d never put his podcast on Spotify, but their private/paid feed feature got him to jump and Im so glad I got to delete an extra app because of it. I’ve been listening to the McElroy brothers’ stable of podcasts for just as long, but am irritated every time I have to skip through the ad reads. I do support them through the podcast network they are a part of, Maximum Fun, but I honestly pay less than I could because I know that it doesn’t directly support them (it supports the network which in turn supports them). That’s ironic because really I should give _more_ because of that fact, but the indirection makes me uninterested in paying much above the minimum.
I love both these podcasts, and their ability to monetize are clearly different based on the product each are producing. At the end of the day though there is (in my experience) a value add provided through Ben Thompson’s business model of directly charging me for the good.
Please don’t read this as a typical HN “why doesn’t the industry cater specifically to me and the very narrow niche I inhabit”, I’m aware of many of the incentives and challenges inherent in these different business models. But as of late, with so many content creators giving the option to pay them directly in exchange for ad free experiences, paying for an ad free service like Spotify but being unable to skip ads from the creators themselves has started to really stick out to me.
I don’t know what a solution would be, nor do I look forward to paying for the majority of content I consume. In fact Im fairly confident that there is no good solution exactly because nobody wants to pay for most content and people’s time is not free. In a world where increasingly folks are putting up paywalls for content consumers see as differentiated, it starts to look more and more bleak on the ad supported side of that wall.
I won't pretend to know what Twitch knows, but watching for free is definitely integral to how Twitch acquires users.
He’s saying this works bc scrapers might not match a left hand side of an @ that contains no alphanumerics
At least on my US qwerty keyboard, I notice this class of typo myself often enough.
We all have our quirks when it comes to common typos based on keystrokes. Not gonna speculate on spelling mistakes. Glass houses, stones, and all that.
But I'd encourage you to think about the experience you're trying to create, in terms of how to handle the sensitivity of blinking for ending a session. With a single blink being the end, then it becomes very easy to accidentally end a session (either via a bug in false positives, or of course just doing the human thing of blinking).
If you want to maximize time spent staring into a human's eyes without looking away, then the session could end after say 1-2 seconds of eyes being closed, or looking off screen. Then the choice to leave is a bit more intentional, and so sessions can last longer for folks who really want to see how long they can stare at a stranger without tapping out.