Better HN
topnewbestaskshowjobs
Log inSign up

giaour

3,849 karma · joined Sep 12, 2013 (13y ago) · 1,555 submissions

Submissions

comment 4y ago · link · parent

So in this dystopian future, the OP had to deal with shitty customer service from a discount publisher for a while and then went with a competitor as a result? And the competitor was still able to distribute copies via Amazon?

I'm just not seeing anything remotely like censorship here.

comment 4y ago · link · parent

If you're worried about a criminal history, do a background check.

This heuristic would miss people who lie about "consulting" during the time they were in jail and would incorrectly catch someone who was falsely accused and then exonerated.

comment 4y ago · link · parent

> And if they are clean and they presumably have a greater chance of a relapse than other random candidates.

That's skirting uncomfortably close to discriminating based on medical history or a disability, which may be illegal depending on where the employer is located. Cancer survivors have a much higher chance of recurrence than others do of developing cancer for the first time, but most would probably balk at denying a job to someone whose cancer was in remission because there's a higher chance they'd need extended medical leave in the future.

comment 4y ago · link · parent

Obviously this depends on the job and what someone did that landed them in prison, but that shouldn't be an automatic dealbreaker. If they are applying for a job after being released from prison, then they're trying to reintegrate and should be given a fair shake.

If a criminal record is an insurmountable hurdle for a specific role, then it would come up in a background check (which would almost certainly be a requirement for such a job), and the job posting should be explicit about the required clean criminal history. A gap in someone's resume is a pretty worthless signal for whether they've ever been incarcerated.

comment 4y ago · link · parent

> A paged response needs to sync state across many machines. As you have said, you need a clientID, a cursor reference, or a sticky session. That's not nothing.

OK, I think this is what I was misunderstanding in your comments above. You can keep pagination state in a distributed store, but it's not necessary. The implementations I've seen and worked with have all embedded all the information needed to generate the next page of results in the cursor token itself. Kind of like with a JWT or TLS session ticket, there's no need to sync pagination state or use sticky sessions. That approach also provides some resilience in case the server that generated the previous page of results becomes unreachable (something that the client needs to handle by restarting pagination if pagination state is just held in memory by the server keeping the stream connection open).

comment 4y ago · link · parent

> I don't know the full implementation details themselves but generally there's no reason you can't safely ask for even more after having asked and consumed some

I think we're saying the same thing but using different formulations. If you send an HTTP request for a list with 20 items, then get back a response with 10 items and a link for the next page, that is essentially the same as cosuming 20 items over a stream with flow control. The point of returning a cursor in the response and having the client send a new request for the next page is to support a stateful stream over a stateless protocol. In neither case are you waiting for the response to be complete before processing items, since your message indicates that "complete" here means the full result set has been sent to the client.

> But fine, ignoring gRPC, you could possibly tune your stack such that normal http calls achieve back pressure from network stacks and packet loss. Http is built on top of TCP streams, after all. That doesn't make it inherently stateful does it?

That's pretty much how streaming responses are implemented in TCP-based protocols (like the SQL query APIs exposed by Postgres or MySQL). TCP connections can be terminated for unrelated reasons, which is why you don't see this pattern very often in recent protocols. When a TCP connection is dropped and restarted due to, say, network congestion, you have to restart the paginated operation from the head of the list. H2 (and, vicariously, gRPC) streams are built to be more resilient to network noise.

But to answer your question, yes, that pattern is inherently stateful. Pagination has to be, since the server has to know what the client has seen in order to prepare the next batch of results. You can manage this state at the protocol level (with streams), or you can push it to the application level (with cursor tokens embedded in the messages exchanged). The streaming approach requires a stateful server and client, whereas the application-level approach only requires a stateful client.

comment 4y ago · link · parent

The original article is talking about pagination over stateless (at the protocol level) HTTP requests. (Referring to APIs that are offered over stateless HTTP as "REST APIs" is technically incorrect but reflects common usage and is a convenient shorthand.)

gRPC is able to offer powerful streaming abstractions because it utilizes HTTP/2 streams, which are cursor based rather than strictly connection oriented. The state is still there; it's just a protocol-level abstraction rather than an application-level abstraction.

> Perhaps, but the requests can be pipelined. You don't need to wait for the response to complete before asking for more.

That sort of defeats the purpose of grpc flow control, doesn't it?

comment 4y ago · link · parent

It's still multiple requests on a streaming API if you're asking the client to notify you when it's ready for the next page. Most DB engines use TCP connection affinity to identify which cursor is in play, but the client still needs to send a packet asking for the next page. Both client and server need to keep the TCP connection open, which is state for both parties.

I see you mentioned gRPC streams in a sibling comment, which are a great alternative to REST-based pagination, but they are highly stateful! Streams are built into the protocol, so a generic gRPC client will handle most of the state juggling that would have been your responsibility with a REST client.

comment 4y ago · link · parent

Users do fuzzy searches across data all the time. They may remember approximately when they last saw a record but not its exact name, or their recollection may be close but imperfect.

comment 4y ago · link · parent

One advantage of opaque cursors is that they can include information that's not part of your public API. For instance, if you allow soft deletes and do not return deleted items in the list, you can end up with a massive stretch of deleted items separating two live results. You can leave a note in the cursor indicating what record was last scanned, and that's not possible in keyset pagination.

comment 4y ago · link · parent

When I worked for a news site, we moved all listing endpoints from offset to timestamp based pagination because offset based pagination assumes the data being queried will remain stable between requests. This was, of course, very rarely true during business hours.

Duplicates or missed entries in the result set are the most likely outcome of offset-based pagination.

comment 4y ago · link · parent

> a lazy sequence that does sensible prefetching and asks the server for more data as it’s iterated through

Isn't this an accurate description of cursor-based pagination? You can have the server hold the cursor and associate a request for the next page based on the client ID (like in the PostgreSQL wire protocol), or you can make the flow stateless (at the network level) by handing the client a ticket for the next page.

comment 4y ago · link · parent

Azure has some pretty strict internal requirements around resource creation that make this possible. Every service must provide a "Resource Provider"[0] API that supports idempotent creation operations and standardized query patterns for read operations. Whether you create a resource through an ARM template, in the portal, or via the CLI, it's going through the same unified API surface.

So, there is definitely still state, it's just stored centrally.

[0]: https://docs.microsoft.com/en-us/azure/azure-resource-manage...

comment 4y ago · link · parent

Bicep and Azure Resource Manager (ARM) are able to dispense with state only because every Azure resource is required to be individually addressable and to report its state in a consistent way, and each resource is expected to support fully idempotent creation operations. The state information is still there, but it's stored on the resource itself.

Bicep/ARM still has issues with resource deletion, though. The default deployment behavior is to ignore resources that aren't described in a deployment template, so if you remove a VM from your template and redeploy, the VM will keep running until you manually delete it. There are a couple ways around this issue, but they all rely on having state external to the resource itself.

Disclaimer: I work on Bicep/ARM and think it's pretty great, but it's not perfect.

comment 4y ago · link · parent

You could try looking at civic technology organizations. I felt that the work I did at USDS had a huge positive impact, and you can find private firms like Nava or Truss that work on the same / similar projects if you don't want to work directly for the government. There are similar agencies and organizations in Canada, the UK, EU countries, and some Latin American countries, too.

There are also some orgs at tech giants that work on socially impactful products (e.g., sustainable hardware teams at AWS or Azure, like the folks who work on https://natick.research.microsoft.com/), so I wouldn't rule those out entirely.

comment 4y ago · link · parent

Cryptocurrency is unique in that it allows pseudonymous, irreversible transactions of unbounded value. https://www.lawfareblog.com/ransomware-problem-bitcoin-probl... is a good long-form write up of the argument if you're interested, or https://www.investopedia.com/articles/bonds/08/bearer-bond.a... if you want to read about why we've prohibited financial instruments for similar reasons in the past.

Wire transfers are also hard to reverse, but banks have security ceremonies around them to prevent misuse, and good luck to you if you want to pay a $20MM ransom with an international wire transfer. Even if you were able to find a banker who wouldn't call the FBI on you, the recipients of the transfer are exposing themselves to significant risk of capture by interacting with their local banking system and by providing you with the details of their account.

Cash being convenient for small transactions and difficult to use for large ones is a deliberate feature. The point is to strike a balance between usability and vulnerability to misuse. E.g., you have to declare when you're moving more than $10K across an international border, and it's actually hard to smuggle that much cash due to the weight and bulk. Gold is also heavy and bulky, which is an important security feature of Fort Knox (even if you break in, how are you going to abscond with tons of gold bars?).

comment 4y ago · link · parent

For software engineers, the numbers start at 59 (as in, a new grad hire is an L59 on their first day): https://www.levels.fyi/?compare=Google,Amazon,Microsoft&trac...

comment 4y ago · link · parent

I don't know about your experience, but 2008 was devastating to people just starting out in their careers. So far, the current economic situation feels mild in comparison.

comment 4y ago · link · parent

You only need to worry if you have a series of very short stints, especially if there's any gap between them.

But one six month stint is fine, especially if you can explain it away with something pithy about how the economy tanked and the company shed a significant percentage of its workforce.

comment 4y ago · link · parent

There is a central HR department that creates job postings, employs recruiters and sourcers, and handles standardized onboarding processes, but conducting interview loops and making hiring decisions is handled by each team individually. As opposed to companies like Google, where as I understand it, you get hired and then find a specific position.

comment 4y ago · link · parent

Every team at MSFT does their own hiring, so experiences there won't be uniform.

comment 4y ago · link · parent

I know that's the case for doctoral degrees, but are terminal masters degrees usually fully funded in those fields?

comment 4y ago · link · parent

> but everyone cashing out their USDT is not a scenario going to happen

Didn't bankers say something similar in 1928?

comment 4y ago · link · parent

You can't buy a $1MM Amazon gift card. That would be incredibly useful for illegal activity but more or less useless as a gift card.

When financial instruments are primarily used for licit activity, we tend to add features that make illicit activity more difficult but accept that some illicit use will occur. That's why we still have $100 (but with serial numbers) and don't have bearer bonds any more.

comment 4y ago · link · parent

Large amounts of fiat currency are heavy, bulky, and difficult to smuggle. The US got rid of $500 and $1K notes because they proved more useful for doing crimes than for doing business, and the same happened with bearer bonds.

Criminals will do bad things at scale with cryptocurrency. Ransomware existed before bitcoin, but the amounts demanded were pittances compared to what can be demanded today because the difficulty of using cash or the banking system for a transaction increases exponentially as the amounts involved increase.

comment 4y ago · link · parent

> Unless you mean they convert dollars... in which case they were just using the dollars already.

It's actually pretty hard to spend dollars when you represent a sanctioned entity. A DPRK official may have a suitcase full of USD, but no western bank will accept their deposit or accept a transfer from a bank or account associated with the North Korean regime. But if they can find someone who will take their USD in exchange for no-questions-asked crypto, then they get to evade sanctions (at least for a little while).

comment 4y ago · link · parent

I guess, but there's no proof the sender has deleted their copies of the keys. You would need to immediately transfer the assets to another wallet, and until you did, the sender could rescind the transfer by moving the coins themselves.

Although meeting in person to physically transfer gold requires a similar amount of trust, so ¯\_(ツ)_/¯

comment 4y ago · link · parent

Your original comment was just an assertion without analysis or argument. Was this exchange meant to be performance art?

comment 4y ago · link · parent

I just did, and the first result was https://finance.yahoo.com/news/economist-bitcoin-is-a-pyrami...
1
212223
52