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 1y ago · link · parent

Actually data-binding UIs (UIs that automatically update themselves when model variable changes) allow to do more in less time. So you just spend more time to reach the same result.

For example, I don't want to use non-reactive UIs (like vanilla JS or GTK) anymore. And it's sad to see that many (or maybe even most of) open-source projects still manually write code to update the UI and lose time on this. It's like trying to build a house using ancient tools.

comment 1y ago · link · parent

Why not Vue? Unlike React it doesn't recalculate everything on every mouse move event.

Also I would like something that doesn't require to install Node.JS and unly packer like Webpack which invents its proprietary syntax instead of using standard EcmaScript. I like to make small apps that I run by clicking on HTML file and I don't have time to go to console and install things or type commands just to open a webpage.

comment 1y ago · link · parent

In Russia one can change their name, although it is a lot of pain as you need to change it in all agreements (like bank agreement) and documents. So a better idea is simply not store customer names.

comment 1y ago · link · parent

Paper currency can be devalued by the government by printing lot of paper (this has happened many times in our history). Cryptocurrency cannot.

comment 1y ago · link · parent

As I understand, the root of the problem is that Coinbase kept lot of sensitive information, including photos of IDs. If Coinbase was fully anonymous, and didn't require any KYC, the impact of the leak would be insignificant because it would be difficult to link user number 12345 with some real-world person.

So if we want to constrain impact of such attacks, we must make companies keep less data and delete them faster. For example, instead of storing a photo of ID, store just a checkbox that the person showed their ID and it was valid.

This applies not only to cryptocurrency, but to any company like Google, Uber, Amazon etc - if they didn't keep extra data, there would be little value in the leaks.

So the blame is not at cryptocurrency, but on companies not wishing to delete the data and governments demanding them to collect the data not necessary for operation. It's the government and capitalists who create problems out of nowhere.

comment 1y ago · link · parent

In my opinion, a democratic way to make such changes would be:

1) make a dedicated lane for public transport on every street so that traffic jams do not affect it

2) let car owners vote if they want to pay for entering the city or would rather spend some more time in traffic jams but save the money

comment 1y ago · link · parent

I saw still working after many years Soviet refrigerators, motorcycles and TV sets, so maybe they were built not that poorly after all. Of course there could be some survivorship bias, but generally modern (inexpensive) things seem to break earlier.

comment 1y ago · link · parent

It is not surprising that it remained intact for 53 years. In USSR, unlike modern times, all products were made to last, like refrigerators, motorcycles, TV sets or clothes, because there was not enough supply to replace them every year.

comment 1y ago · link · parent

Nobody, surprisingly, our regime doesn't require us to provide fingerprints yet (although that might change; our government loves to say "we just do the same thing all Western democratic governments do, so don't complain"). The punishment for not having valid "papers" is usually a fine (the fines for not having valid documentation related to military service were significantly increased recently for obvious reasons). Unless they close the border, I think we don't need to worry.

Also I always thought that it is weird, having to take driving exams to get an ID and calling an ID a "driver's license".

comment 1y ago · link · parent

> Claiming that those sites (ie. live soccer streams) is "learning" is a stretch.

Maybe I want to be better at soccer and learn by observation.

comment 1y ago · link · parent

I read that using pirated sites is ok if you do it for learning. Why do courts block them if they have legal uses?

comment 1y ago · link · parent

That's just the first step to let people get used to giving away their biometric information and then change the laws.

comment 1y ago · link · parent

Yes the government wants to treat everyone as a possible criminal and collects fingerprints for this reason. There is absolutely no logical reason for collection of fingerprints for a driver's license. Collecting fingerprints doesn't make driving safer in any way. Making driving exam more difficult and having to take it more often would make driving safer, limiting the speed would make driving safer, but fingerprints wouldn't.

comment 1y ago · link · parent

Fingerprints are collected only from criminals or people who visit US. Why did Europeans agree to being treated like criminals or tourists I don't understand.

comment 1y ago · link · parent

> there is unfortunately no way to opt out of sending anonymized statistics

There is a way - simply use an open source alternative to JetBrains.

comment 1y ago · link · parent

Programmer has other things to do. Computer or CPU should do the checks.

comment 1y ago · link · parent

Why should there be a performance tradeoff? Because Intel CPU doesn't have add-with-overflow-check instruction, we make our languages less safe?

comment 1y ago · link · parent

Why should checked addition have any overhead? You should just use checked addition instruction (on architectures that support it) instead of wrapping addition.

Or just because on Intel CPUs it has overhead, we must forget about writing safer code?

comment 1y ago · link · parent

The stores have food on the shelves and nobody is dying from hunger. As for GDP, Russian GDP year-to-year growth is 4.6% and USA GDP growth was 2.8%.

comment 1y ago · link · parent

As a result, Rust developers themselves use wrapping addition where a checked addition should be used: https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#2010

comment 1y ago · link · parent

The choice doesn't make sense because you want the program to always behave correctly and not only during development.

comment 1y ago · link · parent

This is bad because the program behaves different depending on build flags. What's the point of having "use unsafe addition" flag, and having it enabled by default?

Rust developers made a poor choice. They should have made a special function for unchecked addition and have "+" operator always panic on overflow.

comment 1y ago · link · parent

The functions are so verbose and inconvenient that even Rust developers themselves do not use them. For example, in this code [1] they used a wrapping addition instead of "checked_add" because it is faster to write.

For comparison, Swift uses "+" for checked addition and as a result, majority of developers use checked addition by default. And in Rust due to its poor design choices most developers use wrapping addition even where a checked addition should be used.

[1] https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#2010

comment 1y ago · link · parent

I meant panic if during any addition (including in runtime) an overflow occurs.

comment 1y ago · link · parent

Wrapping on overflow is wrong because this is not the math we expect. As a result, errors and vulnerabilities occur (look at Linux kernel for example).

comment 1y ago · link · parent

When there are 3-4 parameters it is too much trouble to write the names.

comment 1y ago · link · parent

It's pretty difficult to have no panics, because many functions allocate memory and what are they supposed to do when there is no memory left? Also many functions use addition and what is one supposed to do in case of overflow?

comment 1y ago · link · parent

What about catching integer overflow? Free open-source languages still cannot do it unlike they commercial competitors like Swift?
1
515253
185