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

Honestly that makes no sense. Why should company management collect evidence against themselves? That sounds like something that only exists in dictatorship countries. Aren't you misunderstanding something?

And how are they supposed to record phone calls if they use "dumb" phones or personal smartphones?

At least if I received such an order I would stop using anything that can be saved (like email) and would discuss the problem only in person. Now go try to prove anything.

I understand that the court can order to preserve existing records. But this "reasonable anticipation" is clearly a gray area that can be interpreted any way and allows to make anyone guilty.

comment 8y ago · link · parent

Just stop spying on your users.

comment 9y ago · link · parent

I think that people who really care about Internet quality are the tiny minority and being a minority means you don't have enough votes to elect even one member of Congress. So the net neutrality is effectively the minority's rights.

comment 9y ago · link · parent

As far as I know, the "jailbreak" is performed by using closed-source software that often is heavily obfuscated to prevent analysis. You cannot be sure that it doesn't install a backdoor as a bonus.

comment 9y ago · link · parent

I think using a smartphone for banking is very dangerous:

- banks often use phone (for example, SMS) as a second factor for authentication, for example to confirm transactions. Compromising a phone thereforer provides full access to your account. Some banks even allow to perform payments by sending SMS without logging in.

- many phones do not receive security updates in time. And those updates close only public vulnerabilities.

- while Android has good permission system, many apps have a very wide set of permissions, including permission to read or send SMS messages, or permission to use accessibility functions, so compromising such an app can also be enough.

comment 9y ago · link · parent

The comment above didn't mention what type of card they are using nor in what country they live. Regarding Windows, in the times of Windows XP there were no "telemetry".

Using a smartphone for banking is really dangerous because banks often use a phone as a second factor and compromising the phone gives full access to your bank account. And many phones do not get security updates.

comment 9y ago · link · parent

I am surprised that this is legal in all countries where Google products are used. And by the way, I think Google won't be able to collect data from China.

comment 9y ago · link · parent

> In US law protects from and punishes for illegal cooperation

Then they can insist on legal cooperation. I remember how Pavel Durov (founder of Telegram) wrote that US secret service agents were stalking him in US and tried to bribe one of his developers.

comment 9y ago · link · parent

> Usually, in Moscow, there is a strong correlation between being a highly educated, well-paid IT professional and having a negative opinion about current Russian regime

Do you have sources for this? Well-paid professional might not care about politics at all or might be OK with current regime because it doesn't interfere with their life. Furthermore, some of them might be even proud for occupying Crimea.

But I can agree that there is relatively high percent of anti-Putin people in Moscow.

comment 9y ago · link · parent

If the charger has no transformer (and no galvanic isolation) then you can get electric shock by touching output contacts (or metal parts of a phone) and any grounded piece of metal, for example a water pipe.

By the way, would not it be better to have lower AC voltage? For example, 75V or 60V don't look as dangerous as 230V.

comment 9y ago · link · parent

As I understand they needed to download images from any external servers using an URL. I am not sure if that is possible even with CORS.

Also they don't save preview images and generate them when needed as I understood. So what you are suggesting requires a lot of disk space to keep thumbnails that might be never needed later.

And if you don't have millions of uploads per day then it makes no sense trying to save some seconds of CPU time by unnecessarily complicating the system. In most languages there already are libraries for resizing images.

comment 9y ago · link · parent

Maybe FSB has less technologies to leak or less people willing to do so.

comment 9y ago · link · parent

If anyone is interested, there is an article about this in russian (Google-translated): https://translate.google.com/translate?sl=ru&tl=en&js=y&prev...

The article doesn't have many details though.

comment 9y ago · link · parent

It is interesting that the case with Twitter looks similar to what happens in Russia: many russian companies like advertisement agencies don't want to make deals with opposition, major mass media don't cover anti-government protests.

Well, as a private company Twitter can decide for itself with whom they want or don't want to make a deal. But is it their own independent decision I wonder?

comment 9y ago · link · parent

In my experience the most important is file size: HTML + CSS + JS + images (web fonts are not counted) so you can get the most by optimizing these files or tricking the tool.

comment 9y ago · link · parent

You might serve an outdated file and lost a day worth of analytic records as a result.

comment 9y ago · link · parent

You will need to spend time to set up your site for Amazon or for cheap DO instance, I don't see what you can save here. You can have your own virtual server with root privileges and iptables and custom software and with Amazon you will have to pay for every new feature.

comment 9y ago · link · parent

You also need to hide JS controls before the scripts are loaded or you will get "dead" buttons that are visible but don't react to clicks.

comment 9y ago · link · parent

You might better be working on caching so that the resources are loaded only the first time. Otherwise you need some way to know whether the user has the resources cached or not (a cookie maybe?).

comment 9y ago · link · parent

Asynchronous JS scripts are a great choice. But you better makes this choice on early stage, because changing scripts from sync to async on a large legacy website can require a lot of time, there will be many bugs etc. You cannot just add "async" attribute.

comment 9y ago · link · parent

Not all types of static files will slow down the loading of a site. JS scripts will block loading of the page. Web fonts will block text rendering (and they are usually heavy). CSS files sometimes can block rendering and sometimes will not. But images do not affect loading time. Even without images the page is readable and usable.

comment 9y ago · link · parent

Client have heard that load time affects SEO ranking. This is official Google's tool so client believes that the score here affects the rankings so they need to get 100 by any means.

comment 9y ago · link · parent

Also Google Page Speed tool has no controls to switch the language. For example I see a version in Russian and cannot switch it to English.

comment 9y ago · link · parent

Also it recommends to "leverage browser caching". I.e. set unconditional caching of every static resource for a week. Please remember that it means you will have to implement a solution to reset the cache when you deploy new versions of static files. It might be quilte costly to implement correctly on a legacy site. By the way you can trick Google by enabling caching for a week and then appending current time to every link (http://example.com/file.css?t=12:00:00). In this case you will get a good score AND your users will always get the latest versions of the files.

The article says "Then, inline your CSS and JS instead of making external resource calls to them." and this is actually what makes your page heavier.

> Finally, I was having a lot of trouble getting the Google Analytics script on my site to not be render-blocking

It is easy. Don't understand what was the trouble.

comment 9y ago · link · parent

Google Page Speed is an awful tool. For example, it often advices to compress images and even suggests to download "optimally" compressed versions. Those images have awful quality, and have visible compression artifacts. The person who chose this level quality is probably blind.

Also it often gives crazy advices, for example something like "embed CSS code necessary to display the top of the page, right into the page". Not only it is difficult to implement, (what exactly is "the top of the page"? how to understand what part of the code is necessary? what if the user scrolls the page down while loading?), it will make the pages larger and doesn't allow browser to cache embedded CSS. So you have to invest a lot of time and your page will probably load slower as a result.

But at the same time this script doesn't notice obvious things. For example, it never advices to remove or replace web fonts although web fonts are heavy, can cause problems with rendering text (they can lack glyphs, for example cyrillic or CJK characters) and web fonts block text rendering. And they are really unnecessary in most cases because builtin system fonts usually look better at small sizes (at least on Windows).

Also it never advices to remove ads althogh ads often cause high CPU and memory consumption. Why is that I wonder.

The tool always requires to move JS scripts to the bottom of the page. But is it always the best idea? I think in most cases it is not. For example, if you have a button with an onclick handler, it will give a JS error if the button is clicked before the scripts in the bottom of the page have loaded (the problem of dead JS controls). And if you put a small JS script at the top of the page, there will be no error. And what if you have a SPA? In this case the earlier you start to load the scripts the sooner the user will be able to see the data.

Also it always recommends to use a CDN which is not always good idea. For example, if you have a site in Russia or China and move your static files to CDN then it might be farther from the user than your server and even worse, it can get blocked so your site won't even be loading. Adding a CDN often doesn't make performance any better but reduces the reliability and increases your hosting bill.

So Google's script might help you in identifying problems with your site but you should not ever blindly trust any of the recommendations. Please leave client side optimization to people who have expertise in this area.

By the way I had to lessen the image quality to get a better score (and foolow other useless or even harmful recommendations) because our management believes that the score given by this tool (it is Google's official tool after all) affects SEO rankings and obviously they are more important than image quality.

comment 9y ago · link · parent

I don't like that caniuse by default shows only several recent browser versions, deceiving developers and making it look like some new technology is supported everywhere. It is clearly a "dark" UI pattern that motivates developers to make sites viewable only on latest Macbook.

Instead, it should show the year since which some feature is supported.

For example, for flexbox it could write:

IE - never

Edge - since 2015

Firefox - since Mar 2014

Safari - since Oct 2013

Opera - since Nov 2012

etc.

This gives a better picture.

comment 9y ago · link · parent

Why don't those companies (stackoverflow, Google and others) close the vulnerability?

comment 9y ago · link · parent

I think the article is overexaggerating. Nuclear weapon and nuclear threats are real. One nuclear bomb can kill hundred thousand civilians (because nuclear weapon is a weapon effective only against civilians). "Cyberweapon" is a joke.

I don't know whether South Korean cities have bomb shelters but they better have.

comment 9y ago · link · parent

Cannot IP address be leaked via WebRTC or similar technology?

comment 9y ago · link · parent

I used to set up my own VPN server. As I don't trust the firmware (that was trying to send the data to the manufacturer) I have implemented a whitelist-based proxy that would allow connecting only to approved sites. Pretty inconvenient to be honest because sites often pull content from many domains including numerous CDNs with long meaningless host names. A web version of Skype uses some 20 domains if I remember correctly.
1
162163164
185