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

If they cannot determine which site is legal then they should not be playing with sites' ranks.

comment 8y ago · link · parent

I would prefer that Google would add labels like "pirate site" or "legitimate copy". How can a normal user understand what kind of site they are visiting and whether the site has a legal copy of a movie? The copyright agreements are not public.

For example, there is a website that allows to watch Japanese TV from abroad (quite expensive by the way). How one can be sure that they are not paying to scammers?

comment 8y ago · link · parent

> poverty ... defined as the share of the population living on less than half the national median income

This is not necessarily poverty, it is just a measure of income inequality. If we read Wikipedia [1]:

> In Japan, relative poverty is defined as a state at which the income of a household is at or below half of the median household income ... According to Organization for Economic Co-operation and Development (OECD), the mean household net-adjusted disposable income for Japan is US$23,458.

Half of that is $11,700 and while living on that can be tough, I am not sure if that can be called poverty. Also, there is a minimal wage of 736 yen/hour (in the poorest regions) which is 117760 yen/month or $1063. So if a household has an income of $1000/month it means that one of two people is slacking off instead of working.

For comparison, in Estonia minimum monthly wage is 500 Euro (585 USD), in Russia it is $286 in Moscow and Saint-Petersburg and about $150 in other regions. Earning $1000 a month looks like a luxury for most people outside of two largest cities.

It is also important to remember that the climate is much warmer in Japan than in Russia so the the life should be cheaper, you don't have to pay for warm clothes and central heating.

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

comment 8y ago · link · parent

The problem is how they get those data and not how securely they are kept.

comment 8y ago · link · parent

It is obvious that selling customers' data gives more profit than not selling. No wonder that in countries with little regulation personal data are collected and sold in mass. It is the most profitable strategy for companies that have those data.

comment 8y ago · link · parent

This is a little bit outdated. Nowadays you pay with both your money and your data. For example, see Windows telemetry. It even collects the full command line for applications elevated through UAC.

comment 8y ago · link · parent

So basically we need one more distribution, this time targeted at developers?

comment 8y ago · link · parent

> implementations for OS X and Windows

But they use virutal machines. For me, the disk access speed is very slow for a virtual machine. For example, elasticsearch daemon starts in 8s in Debian on real hardware and takes more than 30s in a VirtualBox. Everything that touches disk works slower.

comment 8y ago · link · parent

I think that Docker became popular because of very limited functionality of distributions' package managers that doesn't match developers' expectations.

Traditionally in Linux there is no concept of "system" and "applications". There is only one large "system" and you can add parts to it. In old times, you downloaded C source code, make'd and installed it. Now you use a package manager to extend your system with new features, like playing music or editing images.

There are no "applications". If you download Firefox package from Debian repository, it is not the Firefox application; it is a version of Firefox, tuned, patched and customized for integrating into Debian. You probably won't be able to run it even in Ubuntu, let alone other distributions.

Paths are often hardcoded; you cannot install a program into your home directory or an USB drive (apt-get might let you do that but it won't fix the embedded file paths for you).

It might be good enough for a user (as we see with Google Play Store on Android), but it is very inconvenient for a developer. You often need to have several versions of a program, for example, PHP interpreter or Go compiler; no way a package manager lets you do that, compile them yourself. You might want to use an application with project-specific config rather than the one in /etc and start it on demand rather than install as a system daemon. That is not easy too. Apt-get and dpkg has literally hundreds of configuration knobs in the manual but you cannot choose installation directory.

If you want to run an old application, like Firefox 2.0, get prepared for troubles. While newer versions of libraries like gtk are supposed to be backwards compatible, it won't run with them (I tried). You will have to obtain and build old versions of gtk manually; good luck with that. On the good side, I can add that Debian maintains an archive of old packages and you need only to write a custom package manager to install them along with their dependencies.

Often official repositories have outdated versions of software; you have to add third-party repositories while giving them full root access to your machine. Want to install Sublime Text in Debian? You have to trust its authors because they can replace your sshd and you won't even notice. Also, third-party repos sometimes break or conflict with system ones.

Package managers are a pain for developers too. They have to maintain packages for all popular distributions, and even for different versions of those distribution. Because there is no "apps", you have to integrate your program into every distibution manually. Of course, you will have to do it again and again when anything changes in the distro. Distro maintainers often have to do the same thing, maintaining private patches. And on top of that, different distributions use different package format.

Maybe one of the reasons for this is a lack of a standard package manager and build system for C programs. You cannot download from Github and build a C program with dependencies with a single command. It is disappointing if you got used to languages like PHP where it has been possible for a long time.

Docker seems to solve many of these problems (and some other, like hardcoded server port numbers) by using a lightweigt virtual machine with full-blown distribution in it. Of course it looks more like a quick hack rather than reliable and well-thought solution. Also, Docker requires many resources: space on disk to store multiple images, memory and CPU time to run unnsesessary daemons inside virtual machines. I don't like it.

By the way Linux kernel has similar problem with drivers that are a part of a kernel rather than separate entities.

comment 8y ago · link · parent

I noticed that when you listen to compressed audio first you hear the unnaturality of voice and clicks (probably when one frame's ending doesn't match next frame start). But in a few seconds you adapt to it and now voice sounds pretty clear.

It is impressive how far one can compress speech.

comment 8y ago · link · parent

I think the long term solution would be to forbid deceiving users by software vendors. Users should know exactly what they are paying with.

Now the vendors who sell software that doesn't have hidden functionality lose competition to such "free" products monetized with adware, data collection or other shady behaviours. It is easy to see in mobile game market.

comment 8y ago · link · parent

I don't really see the problem. If the developers want to get paid for they work they can just sell their software. The problem is when someone tries to monetize their product by deceiving users. This is the case: they prevent user from knowing what is happening on their computer, download and run suspicious binaries and use EULA as an excuse. And I suspect, they themselves don't even know for sure what is bundled into the installer.

User should know exactly what they are offered. Hiding a clause like "you allow us to do anything we want" in EULA should not work.

comment 8y ago · link · parent

Microsoft itself is collecting a lot of telemetry even in Basic configuration [1], for example, if you use UAC (privileges elevation popup) they collect "the full command line arguments being used to elevate.". Also they collect a lot of hardware identifiers (including IMEI - unique phone identifier that allows to track it) so later they can reliably prove that some user was using this computer at this time. What a nice feature.

They also collect information on files that are " part of an app and either have a block in the compatibility database or are part of an anti-virus program.".

How can we trust Microsoft after this?

[1] https://docs.microsoft.com/en-us/windows/privacy/basic-level...

comment 8y ago · link · parent

I don't know whether it is really malware, or they just collect information from PC like browser history and cookies or just avoid being blocked by AV, anyway the real purpose is that developers don't want users to be able to control what is happening on their PC and to know what is really happening. I don't see any other explanation.

comment 8y ago · link · parent

Usually you need to do some cleanup first. Abort_ip being outside critical section prevents kernel from restarting this cleanup code.

comment 8y ago · link · parent

> Benchmarks showed a positive gain

But this gain of 1-2% is balanced with author's 50% performance loss. I guess it means that the benchmark results here depend on choice of tested applications. If they had used more multithread .NET applications, the tests could show a performance degradation as well.

comment 8y ago · link · parent

This is a kind of bug that can be difficult to reproduce. Imagine if someone reports this bug to you but your own tests show that nothing has changed (because you use an older CPU).

comment 8y ago · link · parent

> Yet Harvard’s admissions officials assign Asian Americans the lowest score of any racial group on the personal rating—a “subjective” assessment of such traits as ... “attractive person to be with,” is “widely respected,”...

Why is such an evaluation is even necessary? What is its purpose? To give higher scores to one's relatives and friends? And how do you measure the wideness of respect?

Well, if it is completely private institution then it might be fine but if they use government money such subjective ratings are a good opportunity for corruption.

comment 8y ago · link · parent

It looks very ineffective. For example, in fbg_draw() they have this code:

https://github.com/grz0zrg/fbg/blob/master/src/fbgraphics.c#...

> memcpy(fbg->buffer, fbg->disp_buffer, fbg->size);

So they don't flip buffers, and don't even use video memory for them, they just copy data from buffer in main memory into a memory-mapped framebuffer. This must be slow. Also it doesn't check for vblank and therefore doesn't protect from tearing, but the description says they have "double buffering".

As a side note, I remember that framebuffer was very slow on a computer I had. Without proprietary video card driver both Windows and Linux had troubles even scrolling a window, it was very laggy. Why was unaccelerated VGA (or VESA?) mode so slow, I wonder?

comment 8y ago · link · parent

In case you want to convert your MySQL database tables from utf8 to utf8mb4 please remember that each character will now take 4, not 3 bytes. This means you can easily run out of limit for a row length (65536 bytes) if you have many string columns and your indexes will grow. Also, if a column is a part of a foreign key reference you might have to remove the foreign key first, upgrade columns on both sides and add the foreign key back.

So converting an existing database might be not as easy as it seems before.

comment 8y ago · link · parent

As I remember, `login` program (that asks for your login and password on terminal) does a "virtual hangup" to prevent such things.

comment 8y ago · link · parent

Audio might be used to locate users that are nearby (and hear the same sound). Or to detect what TV program/radio/music is the user listening to. Both of these of course are invasion into user's privacy.

comment 8y ago · link · parent

Using mouse movements to detect that tab is inactive is an old trick. Compared to other facts, I think that tracking mouse movements is absolutely not a problem. Collecting things like IMEI or IP addresses needs more attention. For example, I think it is not necessary to keep IP addresses longer than week or two if you respect your users' privacy.

comment 8y ago · link · parent

DOM methods are less convenient compared to jQuery. Also I think it makes sense to support browsers at least 5-7 years back so it is too early to deprecate jQuery.

But I don't like that it is huge and not modular. And that it is not strict in argument checking and accepts anything without throwing any errors.

comment 8y ago · link · parent

I think it is better to stop using this "~~ in 2018" style of writing. It is not like everything in CS gets obsolete every year. For example, Berkeley sockets are still used today as well as many other libraries. So you don't have to switch to some other libraries only because it was written several years ago and you don't have to use arrow functions instead of `function` keyword only because it is 2018.

comment 8y ago · link · parent

I think it is a result of Docker-style thinking where you can do anything because you are just preparing an image for a single application. So removing shell won't break anything.

comment 8y ago · link · parent

They don't have to delete anything for this. They can put the shell they need into a separate directory and prepend it to the PATH so their shell would be found first.

comment 8y ago · link · parent

But laptops often have useless keys like Caps Lock or even Scroll Lock (who uses that?) or Pause that doesn't pause anything. Replacing them with language switch keys makes more sense.

You have to switch to Latin to type things like emails, URLs, foreign band names etc. And if you are writing a code then you have to switch constantly to type comments and messages in your naive language. So inconvenient.

Bilingual users are not that rare, at least at school most people in my country study some foreign language. Of course it doesn't mean they are going to use it after graduation, but anyway.

comment 8y ago · link · parent

Isn't it too small?

comment 8y ago · link · parent

A screen in a touchpad can be useful because it can help users to understand how to use different features like side scrolling or drag-and-drop. Also it can be used to display some useless information, like time, current keyboard layout or CPU load.

Putting buttons on a touchpad is not the best idea because they would interfere with its normal usage.

And by the way, why nobody makes separate keys for layout switching? It is very inconvenient to have a single key to switch layouts (like Win + Space that is the default for Gnome). It would be much better to have separate physical keys for each language so I can start typing with one of them and never type in the wrong layout.

Seriously, why didn't anyone invented it yet?

1
150151152
185