9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 4y ago · link · parent
If you want an analogy, this is like a builder claiming that he is going to make all bricks and nails himself. You don't usually write your own standard library, why would you write your own framework?
comment 4y ago · link · parent
It may make sense if custom framework is a magintude order better, but if it is the same as a standard framework or worse then it is not worth to spend time on it.
comment 4y ago · link · parent
Regarding virtual keyboard, of course it would be better to use physical keys, but for reasons I don't understand they don't have a wide adoption that they deserve.
comment 4y ago · link · parent
Are vaguely worded patents legal? For example, if someone in the age of black-and-white TV would patent an idea that "colors can be transmitted wirelessly or by wire, decoded or not decoded by a TV or other electronic or non-electronic device and displayed or not displayed on a screen or other medium". Would this idea without any research count as a valid patent application? Please explain, knowledgable people.
comment 4y ago · link · parent
While nano supports some standard shortcuts (arrows, Ctrl + arrows, Home, End, PgUp, PgDn), others are non-standard and I don't understand why. For example, "save" is Ctrl + O instead of common Ctrl + S, exit is "Ctrl + X" instead of "Ctrl + Q", Esc doesn't work when you want to cancel search, and so on. What a nonsense. Why should someone use different shortcuts for the same function.
comment 4y ago · link · parent
comment 4y ago · link · parent
When I opened the page, I saw a cookie banner, untoggled all toggles that were togglable and clicked "Reject all cookies". The cookie dialog said that there will be only functional cookies and they won't contain any personal information. How nice, I thought, Internet is changing for the better. I also can enjoy the privileges of EU citizens.
But then - just out of curiosity - I decided to see what cookies are left in my browser. Imagine my surprise when I saw 6 (six) cookies. Those included:
- an UUID with name 'stripe_mid' expiring in a year
- OptanonConsent, which, I assume, represents chosen settings and contains UUID in 'consentId' field. This UUID is set when the page is loaded. I guess they store your preferences on the server and not in cookies as I thought. Obviously, you can be tracked with this cookie as the identifier seems to be unique.
- user_geoip_fallback and user_geoip, both of which contain an IP address
To check that the dialog indeed doesn't work, I deleted all cookies except for cookies related to the consent dialog, and reloaded the page. Stripe and geoip cookies have been set again.
It turns out that you shouldn't trust cookie dialogs from that third-party company which you often see on different sites. They are either broken or intentionally deceive a user.
comment 4y ago · link · parent
According to observations by ancient Greeks, the sounds whose frequency have simple ratios of small natural numbers like 2/3 or 4/3 or 5/4 sound harmonically and pleasing together. Except for number 7 (I don't know why). So, if we take several such sounds we expect to get a nice sounding chord.
For example, in a C major chord (C + E + G) the frequencies ratio of E to C is 5/4, ratio of G to C is 3/2 and ratio of G to E is 6/5. So, if we denote frequency of C as 4f, then the frequencies of C, E, G are 4f, 5f and 6f. Those are indeed ratios of small numbers and notes in C major chord are considered in harmony with each other.
By the way, if we invert the chord as G, C, E we get ratios of 3f, 4f and 5f. These are the smallest numbers that we can use to build a 3-note chord. Does it mean that inverted C chord is the most perfect and sounds most harmonical? As a person without an ear for music I don't understand.
Because of this ancient people made scales that consisted of notes with good ratios. For example, if we take first 6 notes of a major scale (C, D, E, F, G, A), the frequencies would be f, 9/8f, 5/4f, 4/3f, 3/2f, 5/3f. Except for D, all of these are small numbers and if ancient Greeks were right, the song made from them should sound harmonical. D also has good ratios with some notes like G (D/G ratio is 3/4).
But this scale has a disadvantage, that one cannot easily raise or lower the pitch. Different people have different voice ranges, but if you have an instrument with these notes, you cannot change the key and transpose the melody. For example, if you had a sequence of C, D, F then you cannot pick higher or lower notes with same ratios.
That's why people invented an equally tempered scale. It turned out that if you divide an octave into 12 equally spaced notes, then 7 of them are pretty close to a traditional major scale. That's why it is 2212221 and not something else. With equally tempered scale one can transpose a song up or down easily, keeping the same ratios between notes.
By the way, note B seems to use different pitches in different scales. There is a space between frequencies of A and C, so there is a place for a note, but there is no simple ratio one could use for B and different scales used different pitches for the note.
You can read more about pitch ratios here [1].
While major chord sounds "most" harmonical, but there are only 3 major chords in a major scale, and the music tends to be boring if it uses only perfect ratios. I guess that's why musicians started to use more and more "imperfect" chords over time. For example, in a minor chord like A, C, E ratios are 10f:12f:15f. And indeed a minor chord sounds like a wrong version of a major chord. If we take a chord with 7th, the ratios get even worse, and some musicians use chords with notes that do not belong to a normal chord, or even do not belong to the key.
By the way, non-harmonical notes are ones that differ only by a half tone - for example, E and F (ratio is 16:15) or three tones (ratio is 36:25).
[1] http://www.swarthmore.edu/NatSci/ceverba1/Class/e5_2006/Musi...
comment 4y ago · link · parent
Of course, there are cases when SPA-style application is better, for example: (graphic/circuit/text) editors, IDEs, mobile newsfeed-based apps - everything that resembles an app rather than a page with text, menus and images. But in these cases you usually don't need server-side rendering. And sometimes you cannot even use it - for example, if your code needs to know browser windows size to arrange objects on the page.
So I think that SSR (running JS on server) is rarely useful.
comment 4y ago · link · parent
While Putin might have high rating in the polls, his party United Russia could win only 50% of seats in Moscow Parliament in 2019 (after most popular independent candidates were not allowed to be in the ballot). Furthermore, members of United Russia nominated as independent candidates to hide their party affiliation. If you believe that only ten thousands people are against the government then how can you explain this?
Another example is that Navalny was denied to register a political party for many years. If he has only 1% or 2% of supporters, as propaganda claims, why deny registering a party? Let him take part in election and get his deserved 1% with a disgrace (by the way, in 2013 Moscow Mayor election he got 27% of votes and obviously that was the last election he was allowed to take part in).
So from the above facts I can conclude that Putin's support is not absolute. There are reasons why he doesn't allow to hold fair elections, why protests are not allowed, why all major mass media are controlled by the government and Internet is censored. You don't need this with true 80% voter support.
comment 4y ago · link · parent
In glorious Soviet times Russians ruled 16 countries (including Ukraine) that were parts of USSR, had puppet governments in Eastern Europe and friendly governments in Middle Asia and Africa (and by the way Russian Empire was even larger and included territories of modern Poland and Finland). Traitor Gorbachev surrended Eastern Germany and East European countries to America, and traitor Yeltsin (first President of Russia) helped to disintegrate USSR. Many ex-USSR countries were lured into NATO and turned against Russia. Due to Yeltsin following malignant American advices, Russian economy has collapsed, crime rate has raised, and oligarchs have stolen valuable assets, leaving people in poverty.
America also defeated many former Russian allies, like Yugoslavia. Then America refused to stop NATO expansion to the East.
So some people might want a revanche. They want Russia to be strong, victorous and glorious and not a third-world country surrounded by American bases preparing to make a final blow. And if that is not possible, at least they want to stop NATO from expanding to the East.
Also, in Ukraine there are Russian people and some believe that they are treated there unfairly. For example, they are not taught Russian language at school, there is no Russian television and so on. Obviously, Russia must protect them.
Also, propaganda doesn't call it a "war". It is actually illegal to call it a war. It is a "special military operation" for liberation of Ukranian people from Nazis and American influence. As Putin stated, Russia doesn't plan to occupy Ukranian territories.
Russia had no choice and no other means to prevent a big war planned by the West, propaganda says.
So there might be people who believe propaganda. If they have no other sources of information, what should they think?
Also, here are some quotes from a pro-government news agency TASS. Hope they give an idea how propaganda portrays the situation around Ukraine:
> the majority of Russian respondents - 88% - agreed that there are nazist organizations in Ukraine that are a threat to Russia ... 70% of respondents stated that Unkrainian government supports such nazist organizations ... According to the results of the poll, most respondents expect that special military operation will end with a trial of Ukranian nazis for commited crimes. [1]
> Medinsky (presidential aide) : The crimes commited by Ukranian government against Russian people in Ukraine became a challenge for Russia ... Russia has to protect peaceful civilians, its compatriots, who were assaulted, killed, threatened... [2]
> Russian senator Ekaterina Altabaeva: one cannot exclude Russia from world politics, and current special operation for denazification of thе country and protection of Russian-speaking citizens affirms a fateful role that Russia has always played in the world history ... at the end of 18th century not a single gun in Europe was allowed to fire without Russia's permission... [3]
And here is quote from other news agency:
> Military operation in Donbass is not a beginning of a war, but an attempt to prevent a global war, said spokeswoman of Ministry of Foreign Affairs ... also, it is an ending of the war that has been continuing for 8 years. [4]
So if someone wants to understand what an average Russian sees in the news or in social networks or on the Yandex frontpage, try reading sites like TASS or Interfax Russia, or 1tv.
[1] https://tass.ru/obschestvo/14412735
[2] https://tass.ru/politika/14414033
comment 4y ago · link · parent
Do they publish how many of respondents refused to talk? I saw information that majority of people refuse to answer questions about war. So it might be that the results are based mostly on opinions of people who agree to talk.
comment 4y ago · link · parent
Please don't portray Yandex as a victim of strict martial laws (although oficially there is no war, only a "special operation". Calling it a war is an offence).
comment 4y ago · link · parent
Also, GDPR is not only about cookies, it is about tracking in general. For example, collecting IP address and device fingerprint is also considered tracking, although it doens't use cookies.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Also Yandex removes sites that are banned in Russia, for example BBC in Russian or Navalny's site.
comment 4y ago · link · parent
So if you need a database field or a variable for such identifier, you should choose a string type, not numeric.