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

If you allow anyone to declare independence then Europe might split back apart into hundreds of small provinces. For example, there were times when major Greek and Italian cities were independent states, what if they will want to return back to that time? In this case an external enemy will conquer those small states one by one like Pacman eats dots.

comment 9y ago · link · parent

This is not so simple. Most european countries were formed by conquering neighbour countries by the strongest one. So this is the Constitution written by conquerors. Not everyone might be happy with it.

comment 9y ago · link · parent

> Catalonia didn't voluntarily join Spain, they got annexed.

This is how most countries were formed in the Middle Ages. You either are big enough to defend yourself or become a part of big enough country.

comment 9y ago · link · parent

If you allow any region to declare independence then there will be thousands or maybe even more states. Different provinces and regions are united into a country because this way they have more military power to defend themselves. When there is a lot of small states it will be easy to conquer them one by one - either by external enemy or by one of those small states. At least this is what happened in the Middle Age.

comment 9y ago · link · parent

You will need to disable inline scripts which is inconvenient. CSP looks more like as hack for broken sites.

comment 9y ago · link · parent

It is better to write EDITOR=nano sudo crontab ... otherwise instead of edititng the crontab you will be solving the problem of exiting vi.

comment 9y ago · link · parent

Maybe those iOS apps have a browser inside?

comment 9y ago · link · parent

Ideally browsers should block cross-domain requests by default (so no XSRF is possible), but sadly this would break compatibility with older sites. Maybe we should make new HTTP methods (like SAFEPOST) with builtin XSRF protection and switch new apps to them?

comment 9y ago · link · parent

Screening apps by a large company is not bad. Users don't want to guess whether the app contains malware or not. They would prefer someone do it for them.

comment 9y ago · link · parent

Flux is not equivalent to Windows Events. The analogy is DOM Events. Also, Flux is not required for building web apps.

After this I thought that it makes no sense to read the article further.

For me the problem with web apps is low performance, slow load time. Another problem is people who try to push programming patterns from functional languages (like immutable values) into mainstream JS libraries. Please use Haskell instead if you love immutable values that much.

comment 9y ago · link · parent

Asking to buy is totally ok, but it also annoys the user by constant reminders that there is a newer version. And you cannot disable that.

comment 9y ago · link · parent

From description of vulnerability in Linux Kernel bluetooth code:

> This function receives a configuration response buffer in the rsp argument, and its length in the len argument

> Each element it unpacks from the configuration response is validated and then packed back onto a response buffer, which is pointed to by the data argument.

> However, the size of this response buffer is not passed into the function

C developers are repeating the same mistake for years. Why don't they invent some type or class for safe work with memory buffers?

comment 9y ago · link · parent

In CSS if several components have similar styles it is often better to copy-paste because in future you might need to change those components independently.

comment 9y ago · link · parent

The problem that you have described (relation between pieces of HTML, JS and CSS code) is solved by using components/widgets (for example: using BEM).

I think the problem is that developers do not understand that CSS should be treated like other languages, and developers should organize it rather than let anyone write it as they wish. You don't write your server code in a single file without functions, using global variables and introducing side effects, you don't let a trainee edit important code without reviews, why do you do it with CSS?

I remember reading that Github had something around 9000 CSS rules on a single page. Github developers are talented, but somehow they didn't pay proper attention to CSS code too.

CSS code should be split into components, should be easy to analyze, and should be written so that minor edit of one widget won't break something else on another page.

> In fact the seperation causes so much mental overhead, that we need interactive browser dev tools just to be able to find what styles are applied to what element.

That means CSS is not well organized.

comment 9y ago · link · parent

I don't think the problem is in architecture. API might be sometimes easier to analyze because it usually has a detailed description, often even in machine-readable form.

> It's also easy to use marshalling tools/framework features that serialize entire domain objects, which contain sensitive IDs/data that is then inadvertently leaked.

This is just poor code quality. Sensitive data can be hidden in HTML attributes and inline scripts too.

comment 9y ago · link · parent

Then user could just disable Javascript.

comment 9y ago · link · parent

Or maybe you won't be able to get a job or take a loan if you don't have social network accounts: "are you hiding something?".

comment 9y ago · link · parent

Modern technology is so advanced that you cannot connect a phone to a pillow without using a server thousands miles away.

comment 9y ago · link · parent

You can collect even more information: measure weight of a customer (so advertisers know who is more likely to buy food), learn how often he uses a couch.

comment 9y ago · link · parent

This is the problem not only with Lenovo. Many mobile apps try to collect as many information as possible (for example, GPS location or WiFi station ids) and save to their servers. There should be a law explicitly forbidding secret collection of information especially if it is not required for app functioning.

I also remember similar case when chinese smartphone manufacturers preinstalled adware on the devices. It was showing ads above browser window to make it look as if it was a part of a webpage (and used Google ads by the way).

comment 9y ago · link · parent

Calling publishing some ads in Facebook an "assault on Democratic Institutions" is a bit exaggerated.

comment 9y ago · link · parent

In Russia the word "democracy" has some negative meaning. After Soviet Union collapse there was a period (1990-2000) of "freedom" with economic downturn, poverty, hyperinflation, corruption, raise of criminal activity and a war in Chechnya. By the way, Wikipedia says [1] that ecomomic problems might be a result of reforms suggested by American economists. Russia began recovering only when Putin became a President.

Putin likes to remind about this saying things like "Do you remember what the country was before I became the President? You don't want to return to that time, don't you?"

People in Russia want higher salary (median salary is $500/month) and reasonable mortgage interest rates (now it can be as high as 12%), not more democracy.

[1] https://en.wikipedia.org/wiki/Economy_of_Russia#Transition_t...

comment 9y ago · link · parent

I didn't read the book but it is worth noting that those ideas are Dugin's personal opinion (of course there might be people who support it, for example there are people that dream of reviving Soviet Union). It is not official Moscow's policy.

Also ethnic Russian domination might be a bit difficult because in Russia itself there are many different ethnic groups [1] that wouldn't approve this idea.

[1] https://en.wikipedia.org/wiki/Ethnic_groups_in_Russia

comment 9y ago · link · parent

> in the age of i5's and i7's on every desktop with 8+gb of ram

Is that really so? Large corporations probably don't want to overspend money for excess hardware power. Intel Celeron or Atom + 1-2Gb of RAM should be enough for office work.

comment 9y ago · link · parent

And that is the problem of using OSes with outdated security model from mainframe era.

comment 9y ago · link · parent

> Telemetry is, by now, a fundamental part of the engineering process. Products that don't incorporate it are going to be clobbered by products that do.

I am not sure this is correct. Telemetry can show what users do but it won't show why they do it. Users don't click the button: maybe they don't need it but maybe they don't understand what it does. Or maybe there are too many buttons and users get lost.

Also making a decision based on telemetry is making a desicion based on opinion of non-experts. There is a quote by Ford “If I had asked people what they wanted, they would have said faster horses.”. Can you make something innovative this way?

For example if we take a code editor like Sublime Text which in my opinion has very good UI, and it has no toolbar - can you use telemetry as an argument for removing a toolbar? No, because if there is a toolbar, there will be users who would use it without realising that they could do better without it. You need an expert to make better UI, not telemetry.

comment 9y ago · link · parent

I agree, it is an example showing why you should not try to convert every website into a SPA. A in SPA means "application", not a "website".

comment 9y ago · link · parent

Blogspot's UI is awful. They probably tried to follow trends and make an app out of website. While loading the page it first shows you the preloader with gears, then loads the top post and only later loads the post you were going to read. It probably gives good score in automated load speed test but in fact you can start reading the text much later than if it were plain HTML page.

And when I clicked the search box, the post I was reading has scrolled itself away (no kidding!). I tried to remove focus from the search box but the post didn't come back.

And that is Google's product. It might have some advanced code inside but the UI is awful.

comment 9y ago · link · parent

> Take any Linux app

They are made for desktop, they have tiny text and buttons and I doubt anyone has finger small enough to click them. The commenters below have written that Android apps might be supported too which is nice. But I still don't like the idea of having a desktop launcher or console on a mobile phone.

comment 9y ago · link · parent

While I like the idea of making old devices usable for a longer time, I don't like the approach they have choosen. Android has Java application framework developed by Google that is well tested and stable. It works great and there are many applications written using this framework. There is F-Droid. Why replace it with some linux desktop environment like KDE? It probably is buggy, unstable, not optimized for mobile devices, there are no apps and nobody is going to write them. They are just making another always-broken linux distribution. I am afraid they will also make some awful desktop environment with excess 3D effects and gigantic icons like Gnome 3.
1
164165166
185