The DB is rarely our bottleneck.
Our reads are very simple, mostly paged sets from a table with a 1 level join.
When we need complex abstractions or transformations, instead of using function or views, we listen to table changes, and with a TS transformation layer we save a new row in a specific table for the abstraction. That way the BL is handled in TS, and performed in writes asynchronously instead of in-line in reads. The only downside is that the transformed data is not real time.
That mechanism allowed us to scale our data very easily without any performance hits.
These days? It doesn't really matter. For most purposes, you can just hold the entire important dataset in RAM.
For example, a humongous company with 500000 employees (Amazon) can trivially hold on a fairly low-end server the database of all the personnel, and all their salary payments, and all their employment history, badge photos, and office access logs.
Interesting. I graduated from the _other_ UW (University of Warsaw) and our uni has course-swapping capability built into the University Study Service System (USOS)[1].
FYI public university education is fully government-funded in Poland (i.e. it is free for students).
Isn't USOS like nightmare of a system? I've heard of stories that people had to graduate after time, because they failed a subject at first year (!) and they had no chance to sign up for the course in the following years at USOS because someone was always faster.
USOS is just a tool and it's mostly a matter of how it's configured (for example MIMUW, my faculty, doesn't use first-come, first-serve registration at all) and how various policies are enforced.
Stories about students failing to sign up for a previously failed course are mostly urban legends, I believe. The dean's office has the power to override anything that's going on in USOS and they can manually register you for a subject if it's needed for you to graduate.
I'm from New Zealand, and this kind of stuff isn't a thing where I went (as far as I'm aware). Course enrolments open at some point (everything all at once), and you just log in and fill it out at some point over the multiple months between it opening and the due date for completing it. Some programs have limited admission (with their associated papers being restricted to those enrolled in that program), but limited space at the paper level (as opposed to the course level) and rushing to submit your paper selection just isn't a thing (as far as I'm aware).
In this shovel rush, even the shovel factory makers (OpenAI) are not sustainable, and the shovel factory factory makers (NVidia) are doing well. Ironically the "gold" is with all the boring companies on the consumer side of the AI.
I'd claim that this is way better than what we've got after years of UX/UI "research" and "improvements".
And it's not that I'm some old boomer. In '98 I was one year old. I just hate buttons which don't look like buttons, tabs which don't look like tabs, text fields that you have to click to discover they're editable etc.
Have much UX/UI research been put into operation systems UIs since Windows 95?
I suppose Apple must have done some research for MacOSX, but in the past two decades it feels like features are just be thrown in, especially on mobile, with no concept of discoverability or consistency. More than anything I think companies desire to have "consistent branding" or "unique look" is to blame for much of this.
Yes, Apple at one time had a phenomenal Human Interface Guide for native OS X applications which was based on actual UX testing and research. Things like, "make your application features discoverable," "clearly delineate functional areas and controls," and "use verb+noun on action buttons." It was Good Stuff and it heavily informed a lot of UX decisions for the prominent Linux desktops at the time.
It's still around but I flipped through it recently and it seems to be a mix of the absurdly general ("don't build an app for a specific screen size") to the very specific (MacOS and iOS APIs). Maybe there's some gold buried in there still, but I'm not sure where to find it.
Could someone explain to me what problem exactly Zod solves?
Why do you need to do `type User = z.infer<typeof User>;` instead of declaring a class with typed fields and, idk, deriving a parser for it somehow? (like you would with Serde in Rust for example). I don't understand why Zod creates something which looks like an orthogonal type hierarchy.
For context: I come from the backend land, I enjoy strong, static typing, but I have very little experience with JS/TS and structural typing
Serde in Rust does this with the Rust macro system, but TypeScript doesn't have a macro system. That's why people have to go the other way, the programmer defines the parser, then TypeScript can infer the type from the parser.
I have seen a library that invented their own macro system (a script that you configure to run before build, and it writes code into your node_modules directory), though I can't recall the name.
There’s no macro system in TS that could analyze the type to build the parser. So, you work the other way and build the parser and then produce the type from that.
Zod offers runtime type validation where typescript only does this at build time. You can also use it for data normalization, safely parsing date strings to Date objects for example.
The “type User =“ statement creates a TypeScript type from the zod schema, which can be useful when passing that definition around to functions
The schema object is useful for runtime validation, e.g. User.parse(). this is handy when validating payloads that come over the wire that might be untrusted. the output of the “parse()” function is an object of type User
you can kind of think of it like marshaling Json into a struct in Go :)
The User object in your example is used to parse the data. Its the “somehow” part of your question. There is no way to go from a type to data in typescript (there is no runtime awareness of types whatsoever) so zod solves this by you writing the zod object and then deriving the type from it. Basically you only have to weite one thing to get the parser and the type.
I used it to validate data from config files matched the schema. I imagine it could be useful for other sources of suppose-to-be-structured data like an http body.
Who said anything about consumers? I think viewing "the best YOUTUBE videos possible" in line with "the best CIGARETTES possible" is probably the right framing here.
His competition and giveaway videos are just the modern version of reality TV and game shows, where the draw is the horse race and human drama. You might call that "toxic, useless brainrot," but personally, I feel like such fare is about on the same level as any number of classic novels (including pretty much anything authored by a Bronte sister). Your enjoyment likely hinges on your level of empathy for the people involved, as they're thrown into complex social situations with their livelihood at stake, or whatever.
I assumed that's what all his videos were for years and hadn't ever watched any (given I am not a child, among other reasons), but I gave one a chance out of curiosity and found myself surprisingly enjoying some of the competition videos. The competitions are often well-designed and adeptly narratively structured.
Notably, many of them are similar formats that you'd find in regular TV, except the MrBeast version puts 10 minutes of content into a 12 minute video, while the TV show would put 5 minutes of content into a 45 minute episode.
What's wrong with making things for others' entertainment? The moralization of this is bizarre. Don't like it, don't consume it. This man has figured out how to create a ridiculous amount of value, whichever way you slice it.
What's wrong with asking a homeless person to do an embarrassing dance for a $20 bill? That used to be popular content on YouTube. Don't like that, don't watch it.
If your most potent defense of Mr. Beast is that he's made a lot of money, then he stands due the same scrutiny Rockefeller and Carnegie got. I've watched his videos, it's not an incorrect conclusion to say that his popularity hinges on the "savior complex" present in most of his videos. His content revolves around exploiting charity as a social phenomenon. He's a wannabe altruist that pockets more money than he donates. His business relies on the emotional manipulation of a destitute audience.
1. I don't think that's an accurate characterization of Mr. Beasts' content
2. > He's a wannabe altruist that pockets more money than he donates.
That's such a weak case. So he doesn't donate everything therefore he's evil or something?
3. > His content revolves around exploiting charity as a social phenomenon.
What are you even saying? I'm much more utilitarian about it. Is he doing more good than harm? The answer is a clear and resounding yes. Especially as the 'harm' is labeled: Entertaining kids, helping others and filming it, and making money?
I guess this politically correct posturing bothers me because most of the people issuing this criticism have not had as much impact in people's lives as he has. Classic case of armchair thinkers, criticizing people doing stuff, and doing so excellently.
At any rate the outrage seems like it would be better directed at Pfizer or other corporatocratic corruption machines, you know, people doing actual harm. Not a kid that figured out how to make money in a new media landscape and is using a huge portion of that to uplift his community.
> I guess this politically correct posturing bothers me because most of the people issuing this criticism have not had as much impact in people's lives as he has.
Cram it. You can say the same thing about Pfizer, anyone criticizing a dictator, or terrible philosophers trying to publish self help books for profit. By that logic, you're not qualified to defend Mr. Beast either because you don't actually understand the causal relationship between success and charity. It's nonsense criticism, a thought-terminating argument intended to obviate good-faith discussion.
Mr. Beast's problem is obvious, if you're willing to look past his marketing. Because at the end of the day, he's a business. He uses the same playbook as the most abusive monopolies like Apple and Google, laundering his reputation as a healthy net positive on society. Scratching beneath the surface, people know that he lied about how much money he makes, he lied about the cars he drives and the house he lives in, and probably lies to his employees to prevent them from presenting serious competition. Assuming Mr. Beast is, well, smart, assigning him as a happy-go-lucky charity cause is exactly the sort of outcome he wants. If he was serious about charity or altruism, he'd have some grander plan than sponsoring game shows and leeching off his popularity for profit.
By sincerely believing the image he presents, you yourself have been manipulated into thinking he's inert. Give him... I dunno, 3 more months? I've forgotten the average half-life of lifestyle influencers being ousted as racketeers or groomers on YouTube.
Not disclosing that the beneficiaries are friends and family under the guise of charity to get more views seems pretty scummy to me. In general I'm sick of the fake charity we see with influencers, including the classic "show up to a volunteer event, take pictures, and promptly leave" bit that influencers occasionally get caught doing.
reply