Better HN
topnewbestaskshowjobs
Log inSign up

zeroimpl

621 karma · joined Jan 11, 2018 (8y ago) · 450 submissions

Submissions

comment 6y ago · link · parent

One security concern is that the filenames for recursive transfers are determined by the untrusted machine. Thus if you fail to validate those, they could send things like ../.bashrc and a naive tool would write that to your home directory, leading to remote code execution.

Presumably by now scp is sufficiently tested not to have this bug. But this is precisely a defense against an evil server sending bad bytes.

comment 6y ago · link · parent

It turns out that rsync is slower than scp, unless the files are already present. It adds a lot of overhead that’s not needed most of the time.

I often need to transfer very large binary files. When stuck with standard Linux tools, the fastest process is first transfer via scp. If the scp gets interrupted, resume it using rsync with the —-append-verify option.

comment 6y ago · link · parent

Taxes are paid by the consumer. Ideally developers should price things based on how much revenue they want per transaction, and have the 30% fee shown to the user.

If that were the case, there would be nothing unethical about a 30% tax nor a 90% tax.

Therefore, it’s not the size that’s the problem, but the fact that the tax isn’t communicated to the consumer, and also that Apple wants you to charge the same price in-app as elsewhere (though I’m not sure if that part is enforced)

comment 6y ago · link · parent

[flagged]

comment 6y ago · link · parent

Thanks, I got the part about the spec being ambiguous, am more interested in the "why" aspect, since the current behaviour seems intuitive to the name "repeatable read". But on closer inspection, I see PostgreSQL's repeatable read blocks phantom reads even though the ANSI spec permits that! I don't get why phantom reads would be acceptable under "repeatable read"... I probably should give those papers a read some time. But in the meantime, given the choice of phantom reads or G2-item, I think I'd pick blocking phantom reads. (It might be nice to have the option to choose though!)

In PostgreSQL's case, if they somehow made repeatable read to prevent G2-item without sacrificing the phantom reads, would that mean repeatable read is then "serializable" according to the ANSI definition?

comment 6y ago · link · parent

For the repeatable read issue, I don't intuitively understand why the violation mentioned would be a problem. In particular, even though the transaction sequence listed wouldn't make sense for a serializable level, it seems consistent with what I'd expect from repeatable read (though I have not read the ANSI SQL standard's definition of repeatable read).

Any insights into why we should want repeatable read to block that? It feels like blocking that is specifically the purpose of serializable isolation.

comment 6y ago · link · parent

I don’t mean like shared hosting servers in the cloud. I mean application servers, build servers, and databases, hosted in-house. You don’t always want to give the junior dev root access.

comment 6y ago · link · parent

It seems to me that if they had used those replacements names in the first place, nobody would have ever submitted a PR to change them to master/slave or blacklist/whitelist. Thus most people complaining are just making a fuss over nothing.

comment 6y ago · link · parent

The stack exchange post is asking specifically for Desktop users.

But for shared linux servers, sudo is very useful. It allows controlling which users are allowed to administer the system. (Generally, people who aren't sudoers can only view log files or do other readonly things). It's much better than letting people login as root directly since it keeps an audit trail of who is actually administering the device (they will show up using the `users` command, for example).

I rarely use sudo to do any fine-grained access control - it's almost always an all-or-nothing configuration - specific users are granted full access (with passwords), and everybody else gets none. I suppose this means that I use only 5% of it's functionality, but this 5% is quite useful.

comment 6y ago · link · parent

It also turns out “arg” is a macro which calls scanf. Would be better if they described it more realistically.

comment 6y ago · link · parent

FWIW, if I wrote this patch and worked at AWS, I might not want to go to work the next day.

While it’s not as bad as other criticisms, there is still plenty of room for improvement to establish a more professional work environment.

comment 6y ago · link · parent

Out of curiosity, why do you assume they are innocent? Do Canadians abroad never commit crimes?

comment 6y ago · link · parent

I’ve seen character offsets for JavaScript (which requires it due to minimization), but never Java. I’m pretty sure that data is not available in Java bytecode, nor most compiled languages.

comment 6y ago · link · parent

Wouldn’t that make the code less readable?

I think the point is that if 98% of your code fit under 110 chars when you weren’t using a linter, then maybe you don’t need a linter checking line length.

comment 6y ago · link · parent

This would make debugging hard, as debuggers are very much line number based. Step commands move one line at a time, breakpoints are for specific lines, and stack traces from exceptions include line numbers but not character offsets.

That’s why for function calls passing multiple arguments where each argument may be non trivial, it’s a good idea to put each argument on its own line.

comment 6y ago · link · parent

Why is it “iif” instead of “if”? I don’t recall “if” being a keyword in SQL

comment 6y ago · link · parent

I recall windows 95/98 being pretty slow to boot. I also recall being warned by teachers not to move the mouse while things were booting as that would allegedly slow things down further. These days the only real time I wonder "wtf is this thing doing" is when I'm waiting about 5-10 seconds for my mac to wake up from sleep.

comment 6y ago · link · parent

I’ve had issues pasting phone numbers into text fields, where the last digits get cut off because the form doesn’t want hyphens. I’d rather it paste in the full thing and then let me manually remove the hyphens/spaces.

comment 6y ago · link · parent

Let’s make phase 1 be the unification of American and British spelling. That should be easy enough right?

comment 6y ago · link · parent

It also prevents the dictionary lookup gesture of macOS from working in Firefox, since it selects the whole sentence and looks that up (which fails).

comment 6y ago · link · parent

Apologizing and feeling sorry are two different things. If you say sorry for every bug, the word will lose meaning.

comment 6y ago · link · parent

I wouldn’t refer to the first stage as an apology, it is simply an acknowledgement.

I very rarely apologize for a bug at work. I don’t expect others to apologize to me either. Apologies should be reserved for personal/relationship things, like forgetting to invite somebody to a meeting.

comment 6y ago · link · parent

It would only serve as defense if governments used zoom. Aren’t most banning it?

comment 6y ago · link · parent

The flaw here is the assumption that colors have a single, well-defined name.

comment 6y ago · link · parent

If you specify both a width and height, it's not going to be very responsive.

comment 6y ago · link · parent

Yeah, they need to make it possible for users to clean up/label things after the fact (including changing things posted by others - like stack overflow’s edits), and perhaps they can have some AI reminders to encourage this behavior (“hey, looks like this conversation is over, would you like to summarize and archive it?”)

Recently, in the middle of an important team discussion where we had a brief lull waiting for senior people to respond, one coworker decided to ask me some off-topic questions. It would have made 10x more sense to send them as DM, or at least start a single thread. But converting messages to a thread or moving to another channel is hard so there was nothing I could do (aside from asking them to delete all the messages)

comment 6y ago · link · parent

Tip: run your own mail server and configure it to hide your source IP

comment 6y ago · link · parent

Eventually acceleration would go to 0, but it needs to go negative first. Right now acceleration is positive and velocity is positive, hopefully soon acceleration will become negative, then eventually velocity will approach 0 from above and acceleration will approach 0 from below.

comment 6y ago · link · parent

A constant 2nd-derivative means quadratic growth, not exponential.

I'm bit confused by the graphs, because they show the 2nd-derivative going to 0. But to stop this thing, we actually need to decelerate, eg going negative on the 2nd-derivative.

comment 6y ago · link · parent

kinda. You can use aggregates as window functions, but cannot use window functions as aggregates.

So it would be:

    select a, last_value(b) over(partition by a), last_value(c) over(partition by a) from table
Note the lack of a "GROUP BY" so this will result in duplicates unless you add a DISTINCT.
1
1112131415