> but that action alone would be enough to fire you on the spot.
They are not as strong as you think then.
In countries where there are strong work protections law striking is a right, you don't get paid for the time you don't show up at work but you can obviously convince an entire department or an entire company workforce to go on strike, without consequences.
Without it the protection is not strong, it means an entire company against the individual worker, which is obviously unfair (regardless of what you think about work protections law, Google against a single human being it's an unfair battle, that's why "strong protection" means that the worker deson't have to fight alone and can call other workers to join the fight).
As I said in another sibling post, you cannot strike that way. You have to follow procedures to organize a legit strike.
If I wrote an email like that not only my union would not protect me, they would most probably tell me the employer took the right decision because I put at risk other employees positions (if they followed my reccomandations to stop working just because I said it)
SELECT *, stockdata
FROM orders
WHERE stockdata IN (SELECT warehouse, instock
FROM warehouses
WHERE stock_item= orders.item
AND instock >= orders.ordered );
Another huge win for SQL is that it's easy to construct from parts. You can very easily run and debug your subquery or common table expression on its own before combining it into a larger, more-complex query. If you (as I usually do) create plenty of views while analysing a dataset, the approach can be extremely powerful.
Doing the same in JavaScript is possible, but it's slow and cumbersome by comparison.
The original article addresses the deficiency in construction from parts, in its "Lack of Orthogonality" section.
MongoDB queries, while being interpretable by javascript, aren't really javascript. You can't interact with the data using javascript (well, you can, using eval, but you shouldn't). You interact with the data via the query language, which is, again, expressed in JS, just like SQL is expressed in English.
It's more accurate to consider the Aggregation Pipeline as being the "composable" system to get at data in MongoDB. And its exceedingly composable; far more than SQL. It's literally a pipeline; a series of steps which fetch, mutate, filter, map, limit, calculate, correlate, relate, and otherwise interact with the data in a database. Each step operates on the output of the previous step, in series. You can programmatically swap steps in-and-out, in production, with no string manipulation or ORM, debug each step in series, remove steps, see the output, get performance characteristics on each step. There's no complex black-boxed query execution planner or compiler, because the query plan is the pipeline.
If you try to directly translate SQL to MongoDB, without changing your schemas or query, then yes, it's gonna look bad. That doesn't make for a good comparison, and I think you know that.
Lookups are very common in MongoDB; Starting with SQL, lifting the data as-is into Mongo, and translating the queries 1:1 will just result in garbage queries, like that one.
An "idealized" NoSQL schema is far, far more complex than anything anyone used to SQL would arrive at ([1]), but most of that is because in a "pure" NoSQL/Document-oriented database, the query engine simply isn't that powerful (think Dynamo). MongoDB has an inordinately powerful array of tools to get at data in a performant way, and $lookup is available as one of those tools. Can it be misused? Yeah; just look at the parent comment to see clear misuse. But generally, it's very common to see.
Modern thinking around MongoDB schema design is closer to SQL than NoSQL/Dynamo. Arrays are bad, denormalization can be valuable but use sparingly, that kind of stuff.
I wouldn't say arrays are bad, and the entire paradigm of data modeling in mongodb is to store your data based on your application usage patterns. if you have to query across multiple collections via a $lookup, then maybe you'd benefit from embedding the smaller of those collections into the former.
Maybe. But, as a general rule, I advise against arrays of unbounded size on documents (arrays of a known bounded size, say, containing enums to act as a multi-value flag, or email addresses on a user's account, or something like that, are fine).
One example: We used mongodb to track the state of a general CSV import system. So, we'd have a document for each csv file a user imported, and on that document, we were storing errors which occurred during the import to later display to the user. Of course, in an array. Worked great for years, until one day, a user uploaded a very bad CSV, non-maliciously, with hundreds of thousands of lines, with dozens of errors on each line, generating an array millions of items large. The failure condition here was wild: the import just got slower, and slower, and slower, until eventually the (modestly provisioned) db cluster started failing. We immediately normalized that array into its own collection, re-ran the import, still generated millions of errors, but with no problem.
As always, a general rule doesn't apply in every situation, but in my experience, unless you have a really strong grasp on how a system's use will scale, years into the future, unbounded arrays are icky. Lookups across two collections are only a modest performance loss over a direct query, and if the arrays get up there in size, they can actually be faster.
Interesting, we ran into a very similar thing at my current place where we have a CSV importer storing results in mongo. Importantly it also stores the errors that occurred during the import.
In our case someone uploaded a _huge_ CSV with some misalignment in the columns so every row had an error.
The resulting the mongo document was larger the max document size (16MB?), so it couldn't even save to the database.
Mongo is painful to work with and I feel like I keep finding more reasons to hate it.
For example stop shadow banning people without warnings, make dead posts always visible but with disabled comments, unless vouched for, make moderation visible, I would like to know why something disappeared, create public spaces to resolve disputes between moderators and users: it's easy to misunderstand something when you are from 1% SV and the other person is from a developing country, for example, moderators are wrong too, hiding mistakes is not de-escalation.
Last but not least, changing the rules around "you're posting too fast" I share my public network connection (and public IP) with tens of other people and usually can't comment because it says I'm posting too fast.
Someone could be very frustrated by this behavior and become increasingly angry, this is not good de-escalation either.
I've never seen an "I've made a mistake" here on HN for example
Or US own creations: Videla, Pinochet, Saddam Hussein, which perspective make US one of the major threat to World's safety.
or Franco and the regime of the colonels in Greece, because dictatorship is not a communist's only trait, as US like to think.
But I think Putin is different
He s not crushing only his own people, like those dictators did, he acts like the leader of an international terrorist organization with full power over an entire nation resources (from energy to army, from media to industry) and when he's not directly in charge, he puts one of his puppets there, changing the constitution or bending the law if he needs it, and that's why I think he's more dangerous.
> One sleepy little town basically shut down between 12:30 and 14:30 every day
That's not been true since the 80s.
You're probably confused by the fact that some services shut down at lunch time (service facing offices like banks) for historical reason, we in Italy have a very rigid system of contracts that regulate each category of work in a very precis way, including work hours.
If banks want to stay open at lunch time, they'll have to change the national contract.
But if you go to an hospital or a bar or a restaurant or an IKEA branch, you'll find people working hard even at lunch time.
Source: born, raised and still living in Italy since 43 years ago.
> How do you get anything done??
I don't know, maybe We are smarter than the rest of the World... :)
Getting things done is not about the time you put in them, it's about the effort.
As a very adult Italian, I prefer to eat a sandwich (usually 'panino con affettati') and go home early, than waste 2 hours eating with other people, in expensive places, not so great food that barely resemble real Italian food.
They are not as strong as you think then.
In countries where there are strong work protections law striking is a right, you don't get paid for the time you don't show up at work but you can obviously convince an entire department or an entire company workforce to go on strike, without consequences.
Without it the protection is not strong, it means an entire company against the individual worker, which is obviously unfair (regardless of what you think about work protections law, Google against a single human being it's an unfair battle, that's why "strong protection" means that the worker deson't have to fight alone and can call other workers to join the fight).