Better HN
topnewbestaskshowjobs
Log inSign up

codedokode

9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions

PHP developer from Russia.
Submissions

comment 4y ago · link · parent

> Devices that allow tracking when no accident occurred, violate the current regulation. This is stressed multiple times. "not connected to the mobile phone networks until a serious accident happens" -- https://ec.europa.eu/newsroom/dae/redirection/document/5963

Note that the linked document applies only to eCall In Vehicle System. Nothing prevent manufacturer to install a second system, using the same or separate modem, and track user's location and actions continuously. If the law requires you to install a GPS receiver and a modem, it would be uncapitalistic not to try to gain some profits from the data.

comment 4y ago · link · parent

Then the message about someone else trying to get access to an account would be a lie. Also it is unclear how a phone number can prove that I am not a spammer. I think that just looking at a number of emails sent would be a better metric.

comment 4y ago · link · parent

> they detected a successful credential stuffing attack against the accounts and locked them

And how providing a phone number can help Microsoft to distinguish a real owner from an attacker?

comment 4y ago · link · parent

> Microsoft that the account was locked due to activity on the account that 'violated their terms of service'

What I dislike here most is that the explanation is probably a lie. If someone violated the rules then how providing a phone number can fix this? You are allowed to violate the rules if you leave a phone number?

I remember a similar case. I registered email at outlook.com and after I tried to log in from slightly different IP (because my ISP uses dynamic addresses) there was a message that there was a "suspicious" activity, someone might be trying to log into my account and I must provide and confirm a phone number to access my account. I don't understand though how this can help if someone indeed had stolen my password. They could just provide their number and get access to an account.

Also, Microsoft promised that they won't store my phone number. This is also strange. What's the point of asking for a phone number if you aren't going to store it? I think this also was a lie, and in fact they were storing something like a hash of a phone number and thought that this can be considered as "not storing a phone number".

So basically what I don't like is the deceiving language that they use instead of being frank: we want to know your identity. They behave just like those Indian scammers who persuade people to buy gift cards.

comment 4y ago · link · parent

Thank you for the link. I actually was wondering if there is a list of about:config properties and it seems that most of them are described in that YAML file.

Switched all settings to 1.

comment 4y ago · link · parent

That is easily changed via settings and I hope that browser developers will "freeze" it in future so that it always reports Windows 10 (which was promised to be the final version of Windows).

comment 4y ago · link · parent

That's the right solution. But it won't work for other browsers because unlike Safari, Chrome of Firefox might be used on tens of different OSes and there is no need for marketing companies to know what OS are you using.

comment 4y ago · link · parent

Good to know it, but this is not enough. Browsers should not provide access to local fonts by default because it allows to identify an OS. Therefore, the only sane solution seems to bundle necessary fonts with a browser.

Of course, browser should use its own font rendering library instead of using a system one.

Of course, for browsers that target a single platform (like Safari which is available only on MacOs) this is not an issue, but Chrome or Firefox might be used on many platforms, like Windows 8, Windows 10, Windows 11, Debian, Ubuntu, FreeBSD, Plan 9, Chrome OS and so on.

comment 4y ago · link · parent

OS should not be detectable. There is no need for a marketing agency to know what OS you are using.

comment 4y ago · link · parent

Using different fonts on different platforms will be a problem for design because those fonts have different metrics, different character height and different optimal line interval, for example.

Also, Arial is not ugly. It looks good on print.

comment 4y ago · link · parent

No, this is bad because it provides additional signal for fingerprinting. I don't like this.

comment 4y ago · link · parent

While using local fonts is generally a good idea, this provides a reliable signal for fingerprinting.

Therefore I would prefer that every major browser (Safari, Chrome and Firefox) ships its own reasonably chosen set of fonts and doesn't access system fonts (however the user may grant access to system fonts if they are fine with fingerprinting).

This could also simplify web design because now there will be a somewhat standartized set of fonts.

comment 4y ago · link · parent

Because the first is a function returning function, and you have to think how that works, and the second one is just a simple function that returns a sum.

Also, if you start a function with a word 'const' then it is less obvious that this is a function and not just a constant. In contrast, if you use a word 'function', then you understand what it is from the first word.

comment 4y ago · link · parent

It could be a bug in a third party service that didn't shut down properly or wasn't integrated with systemd properly. You should not put a blame on systemd without investagating first.

comment 4y ago · link · parent

I don't think the idea of systemd is wrong. Long time ago out of curiosity I decide to learn how the boot process works and examined the code. It turned out, the init system was written as a bunch of shell scripts.

Its creators probably tried their best to write it, gave functions good names, left comments sometimes, but still it was bad. Running several subprocesses to split a string into parts. Parsing text output of subprocesses. Creating unnecessary temporary files.

This style of programming leads to extremely fragile systems. If the command slightly changes its output, scripts will break. If the command output depends on locale, scripts will break.

Futhermore, there is no sane options for error handling in shell scripts. There is only a relatively sane option - crash on any error and an insane option - ignore any erros and continue. For example, we failed to backup a file, but ignore this error and delete the original. No way one can write something reliable using such tools.

So if you want to write an init system, I think there are better languages that a shell script. It is difficult to build a graph of services and find an optimal sequence to start them using shell scripts. Or implement lazy startup of non-critical services.

Init system is not only a program to boot the system, but it should provide some runtime services, like management of background processes, logins and other things. Again, a properly written daemon with an API is better than a bunch of shell scripts.

Regarding languages, I am not sure if C is good for this purpose, it's pretty awful too. To illustrate this, consider a C function declaration:

int set_working_directory(char *new_directory, char **error);

You cannot figure out how to call this function properly without documentation or examining the code.

Instead of C I would choose something like Swift, D, Go (but it has pointers), maybe Rust (but writing in Rust for me is mostly struggling against borrow checker). I would choose something that's easy to read, test and verify and has a package manager.

So if you don't like systemd, consider writing your init system using one of the languages above. But please don't use shell scripts anymore.

comment 4y ago · link · parent

Haskell hides this complexity and allows you to write just:

add x y = x + y

There is no functions returning functions here, just a normal addition. It is perfectly readable.

comment 4y ago · link · parent

Python just gives you a choice, use named arguments or refactor your API and use objects for options. It is up to you how you are going to use it.

What I don't like though is when all those options are hidden behind two-stars keyword argument and it is difficult to understand what options are allowed, what they mean, what type they have and so on:

def example(**options): ...

comment 4y ago · link · parent

Using currying by itself is fine and easy to understand. But if you write a function that returns a function that returns a function — that's not easy.

For example, compare these two functions:

function (a, b) { return a + b; }

function create_adder(a) { return function(b) { return a + b;}}

The purpose of first function is easier to understand. And if you rewrite last function according to modern trends, it can become even less readable:

const create_adder = (a) => (b) => a + b;

comment 4y ago · link · parent

By the way, why did clock frequency stop around 3-4 GHz? I assume that as transistors become smaller, their propagation delay decreases, as their power consumption, and it allows to use higher clock frequencies. Is there something else that I am missing?

comment 4y ago · link · parent

My impression of C++ is that you have to write multiple constructors before you can implement any logic.

comment 4y ago · link · parent

One of the reasons why CPUs are getting faster is because the more transistors you have, the faster is the chip and vice versa (this is not a proven statement but rather my intuition). We might not be able to use higher clock frequency, but we still can fit more transistors on the same area.

comment 4y ago · link · parent

Even with modern technology (I guess) we have to use lots of tricks to get desired performance. So (I guess) the level of skills that was necessary to create the Pong, would help designing modern chips as well.

comment 4y ago · link · parent

What logic family did you use? Standard 74-series TTL chips that existed in 1975 are unlikely to work at 166Mhz, their propagation delay was around 20 ns.

comment 4y ago · link · parent

I think that there is no benefits, it is just a workaround for lack of named arguments and default values for struct fields.

comment 4y ago · link · parent

Don't understand why Go developers choose the most complicated solutions. Function returning function returning function is an awful style of coding that is hard to read. I see at least two simple ways to pass options:

1) named arguments:

createFoo(barness: "bar", bazness: True)

2) struct with default values:

createFoo(FooConfig{barness = "bar"})

Go might not have these features, but I guess it is easier to add them than to invent weird "function returns function" tricks.

With functional options the code needs to be duplicated: first, you need to define a field in a struct and then a functional option that sets that field to a given value. With ideas above no duplication is necessary.

comment 4y ago · link · parent

> a justice system that can stop the government.

There might be a law that allows government to obtain the data if it is a matter of national security. And what is considered such a matter is up to government to decide.

comment 4y ago · link · parent

This allows to run fingerprinting script on hundred of domains and filter out the noise though.

comment 4y ago · link · parent

This bug presense can be tested without knowing the GPU model.

comment 4y ago · link · parent

Regarding timezones, this seems to be a fault of ISO standard. Why do they allow several representations of the same thing?
1
110111112
185