9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 8y ago · link · parent
I don't think city itself is a personal data. You could use user's IP address to get the city and then discard it and this way you know user's city but don't have to keep their IP address.
Google Analytics can be a problem; Google or someone else should make the analytics that doesn't store IP addresses.
And I think ISPs should randomly rotate IP addresses of their customers so they cannot be used for identification.
comment 8y ago · link · parent
- if you own a bike, you need a space in your apartment to keep it. Of course, if you have your own house, it is not a problem (but you have lot of other problems like no public transportation around), but in cities like Moscow or Beijing most people live in relatively small apartments and some of them rent only a single room. And usually you cannot park your bicycle outside.
- in many cities you can ride a bicycle only 7-8 months a year because it is cold in winter.
- you don't care if it gets stolen.
- you cannot get on a bus or a subway train with a bicycle. With a shared bicycle you can leave it near the station and take a new one on another station.
- a new bicycle can cost about $100-200, and a shared one can cost around $10-20 per month.
comment 8y ago · link · parent
The russian article on Wikipedia says that there was a research including examining the surface with a microscope and it shows that the statue is made from a freshly chopped tree with stone tools.
The difference is dates is because the research in 2015 was done using another method [1] . The age of the tree is estimated to be around 160 years old.
[1] https://phys.org/news/2018-04-wooden-shigir-idol-egyptian-py...
comment 8y ago · link · parent
Then you can write your own Deferred implementation. I didn't even know it was implemented in browsers.
const run = async () => { ... }
How to read this? run is a constant that equals the result of calling function async() thas maps to something in curly brackets? This is confusing.> If you want to write async code, use async / await.
That is a good idea, but it has nothing to do with arrow functions.
> It also allows you to do scope binding in a different manor
`this` binding in JS in classic functions is broken by design, so yes, that is the advantage of arrow functions.
comment 8y ago · link · parent
comment 8y ago · link · parent
var numbers = [1, 2, 3, 4].map(x => x * x);
var bestUsers = users.filter(u => u.getRating() > 100);
But for a case when you have a large non-anonymous function, `function` keyword suits better. You don't need to use `const` keyword just becase it is something trendy now.In your example, the code with arrow functions is smaller, but it is not more readable. Because there is no indentation, it is difficult to understand how code is nested. I cannot read that.
It can be rewritten using `deferred` pattern:
var deferred = new Deferred;
methodOne(data, function (error, response) {
if (erorr) {
deferred.reject(error);
} else {
deferred.resolve(response);
}
});
return deferred.getPromise();
This way we can get rid of a callback in the Promise constructor. Please note that our code now looks sequential and we clearly see what happens after what. Asynchronous code is difficult to write and read; therefore we must put an extra effort to make it easier.In my opinion it is generally bad idea to nest more that 1-2 levels of functions inside each other.
comment 8y ago · link · parent
function getDate(date) { .. }
to this: const getDate = (date) => { ... }
The first version is more readable. We instantly see that it is a function and in a second case it looks like a constant at first. Also without the equal and arrow sign it looks simpler.comment 8y ago · link · parent
Is that really so? I've read that the mortgage interest rates are around 2-3% in Europe (by the way, in Russia they start from 9%-11% and can be as high as 15%).
> A house in 1897 cost the same as a house in 1997, adjusted for inflation.
It is hard to believe, given new technologies that are supposed to make it cheaper.
Also what the author didn't take into account - she assumes that she will be able to work forever. But what if you get too old and won't be able to do your job well? What if you get sick? What if you get fired? What if there is a financial crisis? What if the company you work at shuts down?
In all of these cases, a renter will be kicked out on the street (I know in some countries like Finland the government provides free apartment for people who don't have money, but I assume in US you'll have to live in the street). But if you own a house then you can live there even if your income drops. You can live without renovations, you can consume less electricity, you can ask for a tax deduction, you can rent out a room.
Also, an owner can leave a house or an apartment to his children.
The author writes about opportunity cost, that you can invest your money. But it is very high risk. If you invest into a private fund, it can become a bankrupt any time, if you invest into something government-related, tough luck if the national currency crashes. Investing into a house looks like a more safe option.
Of course, there are downsides to the mortgage. If you buy a house or an apartment, it will be probably not in the best location, far away from the center of the city in an undeveloped area, no good transportation around. Because the good ones are too expensive.
comment 8y ago · link · parent
As I understand there is no law or court decision banning Kaspersky from advertising.
comment 8y ago · link · parent
> That should bother Google and Amazon, who should guarantee the connectivity of their law-abiding customers by kicking out Telegram so the IP range bans are lifted.
This might increase an influx of complaints from other governments. If they kicked out Telegram, why not kick out someone else?
comment 8y ago · link · parent
comment 8y ago · link · parent
Telegram should be blocked under the Russian court order for not providing decryption keys, but that order doesn't contain ruling to block entire Amazon or Google network - only IP addresses used by Telegram. Whole networks are being blocked under the order by Prosecutor General from 2015 (yes, from 2015, and recently they started to use new order from 2018). But the problem is that Prosecutor's Office doesn't have authority to block messengers, so the order is about discovering illegal content (extremist content or appeals for organizing unapproved rally - not sure if I translated correctly) located on all of those IP addresses which obviously is a lie.
So this is dubious even under russian laws.
Why are they blocking entire networks? Well, the problem is that there are limits in ACL size so if Telegram starts using thousands of IP addresses the tables can become too big. So they chose to block entire networks instead. Also, finding out which IP addresses they are using takes time, distributing and updating blocking rules by ISP takes time (on order of hours, up to a day), so without this Telegram could change IPs faster than they are blocked.
There already are russian businesses that were using IP addresses from those networks, that are suffering damages because of blocking. They are moving to other datacenters in a rush. It is unlikely that they will try to recover damages from the government.
comment 8y ago · link · parent
I think growing housing costs are much more scarier for a worker than an idea that some engineer gets 200-300k less.