Very persuasive argument, definitely shows a strong grasp of the technical matters.
Very persuasive argument, definitely shows a strong grasp of the technical matters.
https://support.mozilla.org/en-US/kb/privacy-preserving-attribution
Hardly qualifies as “sending your data to advertisers”.
I’m pretty sure half the people in these comments are trolling, because no one is seriously that shit at security. Or at least that’s what I tell myself…
Why wouldn’t you just use the ruby functions for adding a month to a date?
https://ruby-doc.org/stdlib-2.5.1/libdoc/date/rdoc/Date.html#method-i-3C-3C
It seems really weird that there’s so much pushback against “date time math is tricky, read the manual to find out exactly which compromise your library chose”.
So, you’re talking about throwing exceptions if adding a month yields an invalid date if done without nuance, but then you’re showing an example of just trying to instantiate an invalid date in java.
I believe java has an addMonths
method, that in the situation we’re talking about doesn’t throw an exception, but rather limits the output to the 28th/
29th/30th.
Which illustrates my point: intuitive Datetime math involves choosing how you handle edge cases that are routine and not exceptional, like “a month from January 31st”.
The rest of your comment arguing about how people expect months to work just makes me feel like you’ve never actually talked to a business stakeholder about requirements.
If I say to add four days, will it throw an exception if it’s the 31st? No month has 35 days, so I should get an exception, right?
Yeah, it’s how months work.
That’s just insane. An API that doesn’t increment the month when you pass the end while adding days is just broken.
Have you never done Datetime math before?
You didn’t run new Date(2019, 02, 31)
, you asked it for one month from January 31st.
One month after any given day of the month is, by most people’s intuition, a valid thing to ask for.
Your solution of making the API throw an exception for every 31st of the year is vastly less intuitive to me than “a month is 31 days in January, and 28 or 29 in February, so adding a month does different things in different months”, because at least for those is can also query how many days are in the month.
If I say to add four days, will it throw an exception if it’s the 31st? No month has 35 days, so I should get an exception, right?
Or is it just this weird caveat around months? Does it apply to time?
So, the flip side to that is that sometimes you need to add one month to a date, because that sometimes how human systems are written.
By not providing a function that does that, you’re just pushing the confusion down to the developer, who is more likely to make terrible errors in the process, get frustrated, or use one of N different competing libraries, each of which chose a different answer.
Omitting functionality that can behave unintuitively in certain circumstances means leaving out a lot of functionality that people need.
Like, “decimal numbers” go pathological in certain cases. So do Unicode characters. Don’t even bother thinking about connecting to the network.
What behavior do you expect? Specifically.
I’m arguing that every answer is wrong, and will return bizarre results, be aggravating, useless or some combination therein for some conditions.
Therefore you have to know the API, because every language will fuck you, and JavaScript isn’t special in this specific case.
Adding the number of days in the month to the date as “add one month” is just as rational as any other choice.
Except it’s not nonsense. If you ask for 31 days after January 31st, you don’t get February 28th.
A month is a malformed concept to use in conjunction with arithmetic, except for the part where people do it all the time and just ignore the fact that it often gets weird.
Do you really think you’d be happier if the answer for "what’s a month from 01/31?” was “InvalidDateException”? That every other month the concept of “a month from today” is just undefined?
Saying “adding a month means adding the number of days in the starting month” is one choice of many, all of which have terrible downsides.
In this case though, it’s consistent, and is just one of the annoying ways the problem could be solved. Datetime math is just fucked up.
You can just not support that functionality, which gives you people making their own mistakes and forgetting leap years or hard coding all sorts of insanity.
You can clamp the value to the end of the month, but that gives you the odd case where date + month - month != date
in some days, which is also a weird pitfall.
If I see any code dealing with adding and subtracting months, I’m either checking the manual or I already know it’s behavior from doing so before.
I’m all about not liking how JS does stuff, but Datetime math is the one area where in willing to forgive most insanity of outcomes.
It’s because there’s no right answer, and this way gets you the intuitive answer most often.
A month isn’t a proper unit of time. Adding a month to a date can’t be done without specifying which month you’re adding.
You could argue that one month from January 31 is February 28, 29 (depending on the year), March 2, or 3.
Should one month from the last day be the last day of the next month? That would mean that the 30th and the 31st of march are both the same duration from April 30th, and a month before April 30th could logically map to either one.
So they chose the path that, for anything other than the 31st, and the 29th and 30th if it comes near February, works as you expect. "A month after 17 days from the first of January is 17 days after the first of february.”
The other alternatives involve not allowing the addition and subtraction of irregular time intervals, but then you get frustrated that you can only deal with seconds, since those don’t change in length.
Unix based systems tend to be able to be hardened to a higher level than windows devices. Apple provides a lot of apis for preventing unsigned code from running, which can go a long way beyond a locked down bootloader.
It’s less that they’re intrinsically more secure, it’s just that it’s a bit easier for a determined admin to lock it way further down while also not irritating the user.
I seem to recall Chromebooks are even better, but you sacrifice a lot more.
You’re not wrong, but it can be difficult to support more than the minimum without more buy-in from a financial perspective. Things beyond SMS tend to need an enrollment process that would impact the user sign-up flow.
You can create the user and store their phone number in one step, but totp sign-up usually needs something where you can create a provisional user, and then activate their MFA to activate the user.
It’s why a lot of passkey stuff has a lot of potential, since it can make it easier for the user to sign-up, which has an appeal to people who are making decisions that have to consider sales and IT concerns.
So, the real reason is because they’re usually not implementing it themselves, and the service they’re using has an array of options, and they went for the most “user friendly” approaches.
Registering an authenticator or typing numbers is viewed as hard by a lot of people, so SMS or an push notification are viewed as the easy route.
I mean, the county and local authorities are supposed to keep the official maps of where the roads are up to date. That’s actually one of the responsibilities of local government.
Google isn’t going out and mapping all these roads, they’re 99% just aggregating the data from all the different jurisdictions and making sure they play nice with each other.
Okay? What does that have to do with the new advertising API the added support for in 128?