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

The code examples are overengineered. For example, the code generator for stack uses rem units and CSS variables, while it could be written without them and have better cross browser support (and the code would be easier to read and maintain in long-term perspective). The author just wants to use modern CSS features without clear rationale for this.

Rem units can cause issues in long term. For example, imagine if a sidebar widget is coded using rems. When later the main font size is changed, margins within widget will change its size, although the font size in it is fixed and didn't change. There are cases when rem is useful and there are cases when it is not, but the author doesn't give a choice and doesn't explain it. He just uses his authority to push his personal preferences to frontend developers who tend to copy the code from tutorials without much thinking.

I recommend using pixels for projects that are going to be maintained and developed in the long term.

comment 7y ago · link · parent

Caniuse says that IE11 has a lot of bugs regarding flexbox. Firefox supports flexbox only since 2013-2014. So it would make sense to add a simple non-responsive fallback for older browsers.

Also, if I remember correctly, the default browser in Windows 7 is IE9. It makes sense to support default browser in the most popular desktop OS.

Some of older browsers, released in 2012-2014 support flexbox only with vendor prefixes, but the article doesn't has rules with prefix. As frontend devs tend to copy the code without much thinking, we cannot expect that they will add the prefixes or fallback code themselves. So it will be author's responsibility for web sites being less accessible in different browsers.

comment 7y ago · link · parent

I think the problem is with the attitude. It would be better to quote a law or give a neutral comment, instead of this looking down style. Furthermore, it is not nice that they show this ads in one country and ads to attract tourists in other countries.

comment 7y ago · link · parent

I think the problem is with the wording and attitude. It would be totally OK to quote an immigration law instead.

comment 7y ago · link · parent

At Youtube you can at least upload your video. Try uploading your video on TV. TV is much more easier to control and censor.

comment 7y ago · link · parent

Poor quality articles. They use flexbox and provide no fallback for older browsers. They could use at least non-responsive layout for desktop resolution for older browsers. Probably the reason why they didn't do it is lack of knowledge of CSS.

comment 7y ago · link · parent

As I remember, rare earth elements are not that rare. And China is not the only place having them. But extracting them is not very profitable in Western countries because they have too strict ecological requirements.

comment 7y ago · link · parent

They were threated worse than the prisoners of war are exepected to be treated. This is a weak excuse. An army is a violent group too, do the soldiers deserve such treatment when captured?

comment 7y ago · link · parent

There are international treaties about handling prisoners of war. The thing is that US found a loophole not to admit that they are prisoners of war. What US did is similar to what their enemies like Taliban do.

comment 7y ago · link · parent

What do you mean? If America is abusing its power for evil purposes then its fine if China does the same?

comment 7y ago · link · parent

Well, China of course can make Hong Kong "a city among dozens" if it tries hard, but today a citizen of Hong Kong has an average income of $46 000, while a Chinese citizen only $8 960 [1]. For comparison, in Korea an average income is $28 000 and in Japan it is $38 000. But I agree that Chinese government definitely is able to lower the income of the citizens to Chinese average within 20 years.

> The idea that rights and liberties are absolutely essential

First, they are absolutely essential for higher quality of life. You cannot measure it with just GDP per capita or income per capita. For example, Middle Asian oil-selling countries might have high income, but life is not very pleasant there, especially if you are a woman, a gay, a journalist or part of any other minority.

Also, it is more difficult to make business in authoritarian countries because of excess control over any activities which creates opportunities for corruption. For example, in China to release a mere smartphone game, the developer first has to approve the scenario and characters in the government (yes, they really have such requirements). Of course, officials have no motivation to hurry because it is you who is losing profits, not them. And you have to repeat the procedure when releasing an update.

Also, in authoritarian countries the government typically tries to gain control over any large enterprise, and after that the profits are going to nobody knows where (but the friends and relatives of officials supervising the enterpsie suddenly become successful eneterpreneurs) and the losses are compensated from the budget.

[1] https://en.wikipedia.org/wiki/List_of_countries_by_GNI_(nomi...

comment 7y ago · link · parent

I think the main reason is military cooperation. West supports dictator regimes and in exchange they allow to have military bases there. If USA doesn't support such regimes then they will turn to other countries who are not so picky like China or Russia.

comment 7y ago · link · parent

The culture was different in 90s. I remember that Windows used to ask a permission to connect to Internet to search for drivers. Today they just collect whatever telemetry they want without giving an option to disable it. I guess the reason for change is that their customers were mostly power corporate users then and now it is mostly ordinary people.

comment 7y ago · link · parent

Furthermore, in many OS those unique numbers are not protected from applications. For example, in Linux any application can read any hardware identifiers without any specific permissions. For comparison, in Android an application needs to have a permission to read phone or IMEI number.

comment 7y ago · link · parent

But Firebase is not a "kernel", "window system", it is just third-party proprietary library (not essential part of Android as I understand).

comment 7y ago · link · parent

Probably you are right. I use tracker and 3rd party cookies blocking in FF and I often spend 30-60 seconds solving captchas. Often Google says that I solved it wrong (although I try to be careful) so I have to solve it 3-4 times, sometimes with those slowly appearing images. Upgraded my skills of recognising bridges, buses and fire hydrants but still struggle with searching storefronts.

comment 7y ago · link · parent

Why doesn't Microsoft allow to disable it then? It is not like I asked for a teacher.

comment 7y ago · link · parent

Also I wanted to note that the image you linked to compares an iPhone's ads with Xiaomi's (if I am correct) and the image doesn't mention Huawei.

comment 7y ago · link · parent

I just wanted to note that it is not limited to Chinese culture as the comment above states. And I have remembered another example: Apple has copied Xerox's Alto GUI for its own computer. Here is a quote from Jobs from the article [1]:

> I was so blinded by the first thing they showed me, which was the graphical user interface. I thought it was the best thing I’d ever seen in my life.

So Jobs just copied the idea of GUI just because he "liked" it instead of developing his own computer-human interface. Is not it similar to what Huawei does: taking the ideas they "like" and innovating on top of that.

[1] https://www.mac-history.net/computer-history/2012-03-22/appl...

comment 7y ago · link · parent

Interesting comparison. But Apple doesn't have clean hands too. Did they invent graphical UI of first Macintosh themselves or were "inspired" by what they have seen at Xerox PARC? Yesterday you copied the GUI, and today you claim that someone has stolen the idea of using rounded edges.

comment 7y ago · link · parent

What's wrong with Matebook? It has the same color, a similar shape, and a similar keyboard as a Macbook? If Apple feels that it violates their patents, why don't they sue? US patent laws are pretty strict and this is the normal way to resolve such cases.

Also if you Google a bit, you can see that there are similar lawsuits against US companies. For example, a Korean company believes (and had win in courts in some countries) that Apple has stolen their intellectual property: [1]

Also it is noteworthy how some countries' courts agree that Apple has infringed the patents while other countries' courts disagree.

[1] https://en.wikipedia.org/wiki/Apple_Inc._v._Samsung_Electron....

comment 7y ago · link · parent

Is it really limited to chinese culture? US had Echelon to spy on other countries' communications, Israel had destroyed Iranian program to have atomic energy. Europeans have stolen the secret of manufacturing a porcelain. West and Russia have stolen German secrets of making rockets after the war. Nobody wants to play fair.

And if you look at mobile game market, there everyone is stealing ideas from each other.

comment 7y ago · link · parent

But Huawei is not different from other vendors here. For example: Windows has telemetry that cannot be disabled and sends data into American data centers, Apple has control over its phones around the world, can remotely block them and know their location, and who knows what else, Google tries to convince users from around the world to store all their data in an American cloud (not their own cloud, or a cloud in their country they can trust, but the cloud in US), and almost every Intel CPU has an additional CPU (ME engine) that has full control over the system, with encrypted firmware, and is not documented.

Yet I don't see any accusations against Microsoft, Apple, Android or Intel.

comment 7y ago · link · parent

If it was patented, why didn't the company sue Huawei and ban import of the product?

comment 7y ago · link · parent

> Released a nearly identical product a few years later, and sold it at a ridiculously low price,

If it violates the patents, then why did the company not sue Huawei and get a compensation? If it doesn't violate the patents then what's the problem?

comment 7y ago · link · parent

Yes, cash can be stolen, but cards are much more dangerous to your privacy: bank knows where you go and what you buy, it can sell this information to anyone (of course, with hashing your phone number with military-grade algorithm to protect your personal data), shops know who you are and can exchange information about your purchases along with model of your face taken by the camera at the register, MAC address of your phone's WiFi module and car plate number (of course hashed with military-grade algorithm to protect your privacy).

Also, in some countries it is very easy to lock person's bank account even without a trial, for example if person is suspected in financing terrorist or extremist organisation.

Also new cards have RFID chip in it and it can be used for example to get information about people going through the doors.

comment 7y ago · link · parent

What if the app works without location, but gives some benefits only if you enable it? E.g. a shop app gives a discount if you allow tracking you.

comment 7y ago · link · parent

Fake location is necessary because apps may annoy users with popups until you grant the permission or give some benefits in exchange for location.

comment 7y ago · link · parent

Android has a list of apps that requested permission for location.

comment 7y ago · link · parent

They don't have options like "Never allow" or "Provide fake location". Why is that so?
1
131132133
185