HNHacker News
TopNewBestAskShowJobs

CBLT

725 karma · joined May 11, 2018

submissionscomments
CBLT··on Ask HN: Something you’ve done your whole life that you realized is wrong?
I got through college on this, it actually wasn't that bad. I added little sauce (Most expensive part of the dish! I didn't buy cheap sauce.) and folded it into the boiling hot noodles immediately after draining. Brought the whole dish almost immediately to serving temperature, so I could eat right away instead of waiting for it to cool.
CBLT··on Ask HN: Something you’ve done your whole life that you realized is wrong?
+1 to the as little water as possible tip, that's worked well for me. The emulsifying properties transmit flavors really well, I like to infuse a tiny bit of oil to stir in.
CBLT··on The disappearance of the hit-driven business model
In a sense, yes. I read a good number of works that overlap with the "progression fantasy" genre, and I'd say they have 3 main characteristics:

1. Fantasy. They have interesting and engaging fantasy worlds. There's a lot of mixed results here, I personally don't think DBZ or Cradle are that interesting.

2. The main characters are empowered to actively participate in events that surround them. The trope here is that they fight back against the latest unfairness of the world, but more creative storytelling can make this very fresh and interesting.

3. The main characters aren't defined by their circumstances. They prove themselves by their work ethic or cleverness, not by being born to a powerful family.

Most works in this category are rehashes of CRPG or Xianxia tropes. I'd personally recommend Mother of Learning as the best progression fantasy I've read.

CBLT··on Tech execs who raise their kids tech-free or limit their screen time (2020)
Where I grew up, the working class paper was delivered later in the day, and was traditionally read at/after dinner. On the other hand the prim bourgeoisie newspaper was delivered early in the morning and was traditionally read at breakfast. I thought that's how the blue collar / white collar divide was everywhere.
CBLT··on NIST is announcing that SHA-1 should be phased out by Dec. 31, 2030
Sha-224 and Sha-384 are the truncated versions of Sha-256 and Sha-512 respectively.

My boring hash function of choice is Sha-384. The Sha-512 computation is faster on Intel hardware, and ASICS to crack it are far more expensive than Sha-256 because of bitcoin.

If you're hashing passwords or something, use a "harder" hash like Argon2 or Scrypt.

CBLT··on How to build software like an SRE
I had a tech lead who vehemently agreed with the parent commenter (retry from the top), but I ended up learning different lessons.

* Differentiate retryable and non-retryable errors. If the service can't return success because the DB it queries is borked, it should send a non-retryable error. Then it won't get overwhelmed by retries from upstream.

* Retry configuration should have sane defaults. Even "retry once" is too often; many services aren't overprovisioned for 100% increase in traffic. What ended up working here for us was having the retry module collect req/sec statistics, then only allowing 20% of that number in retries/second. Individual requests can be retried twice. That was small enough to not push over any services, but enough retries to compensate for garden-variety unavailability.

* Services shouldn't serve requests first-come-first-served under load. When SHTF, fairness means everyone has to suffer long delays, often much longer than rpc timeout. Instead, serve them in an unfair order - the most recent requests to come in are the most likely to have a caller still interested in them. Answer those!

* Use headless services in kubernetes. By exposing the replicaset to the client, the client can load balance itself more intelligently. Retries should go to different replicas than the failing request. Furthermore, you can perform request hedging to different replicas than the lagging request.

* Define a degraded form of your in-memory object-graph. If a feature is optional to the core business flow, it shouldn't take down your whole product. This one is a lot more involved. We needed custom monitoring for degraded responses, in-memory collection and storage of "guesses" to substitute for degraded portions of the object graph, as well as some other work I can't think of right now. This does enable an organization to compartmentalize better, having faster, less fearful deploys of newer initiatives.

CBLT··on Monorepos done right
I'm guessing the speculative approach is https://news.ycombinator.com/item?id=19692820
CBLT··on Pulumi and MinIO – Making Multi-Cloud Magic
I had to re-read the recent thread[0] of reasons to realize they were only interested in deploying it outside of the cloud. I'm curious to answer why you'd have it in the cloud as well.

[0] https://news.ycombinator.com/item?id=30012746

CBLT··on Typed Config Languages
I agree that the problem is one of quicker feedback - the dev cycle should involve a program checking the yaml correctness (using types or otherwise) straight away and giving a useful error message. Too often I've seen incorrect yaml checked into git that fails with a cryptic error when deploying the application.

The strength of types, in my opinion, is composability. Most config files I've seen have ultimately pulled in input from another source and used that to create their output. Types would allow the configuration to be checked for correctness even in the face of unknowns.

CBLT··on Tricking PostgreSQL into using an insane, but faster, query plan
Wasn't this solved in Postgres 12?[0]

[0] https://www.depesz.com/2019/02/19/waiting-for-postgresql-12-...

CBLT··on Association of e-cigarette use with quitting smoking
I personally cannot stand eating food if I'm about to engage in physical exercise, unless I'm legitimately seriously hungry. So if I have a random midday idea-of-food, I picture myself about to sprint to the nearest park, or about to swim a few km. Then I check my stomach again - how hungry is it now? I generally don't want anything at that point, but sometimes it does (begrudgingly) need fuel for the imagined activity - only then do I eat.
CBLT··on Dell and HPE switches come with 'American Megatrands' stickers
https://en.wikipedia.org/wiki/List_of_%22-gate%22_scandals_a...
CBLT··on Does having prime neighbors make you more composite?
1 and -1 are units, which behave differently that primes. Gaussian Primes[0] make this more obvious, if you like reading math on wikipedia (I don't). In your positive & negative number multiplicative space (we get to ignore addition/subtraction when considering primality), negatives are just a reflection of the positives. Multiplying by -a is exactly the same as multiplying by positive a and multiplying by -1, and the -1 multiplication only reflects onto an otherwise identically-shaped number line. You can reflect any number of times, or do the identity transformation (multiply by 1) any number of times, and it's not changing the absolute value of the number you get. The number's magnitude is unchanging here, and the number's magnitude is also the only interesting part of the number with respect to being prime. So mathematicians just call 1 and -1 units, and ignore them for primes.

Many people think of Complex Numbers as vectors, and I think of negative numbers as vectors too. They have both magnitude and orientation, even if the orientation is only 1-dimensional. When you multiply complex numbers, the resulting "vector" has magnitude equal to the product of the magnitudes, and angle (from the positive x-axis) equal to the sum of the angles. So you can actually calculate these products without actually multiplying the numbers themselves, but instead only considering magnitude and angle (this only really matters with complex numbers). But the definition of a vector, that is has magnitude and direction, doesn't apply to 0. It doesn't have any direction, so it's technically not a vector. Adding angles doesn't make sense to something that just doesn't have angles. Zero is actually a mess when considering multiplication, and is generally excluded from the set of numbers you get to play with under multiplication. Another number you don't get to use for the same reason is infinity. A professor once told me an interesting insight, that zero is messed up in the same way that complex infinity is messed up. Neither has orientation, both have magnitudes that consume the other number when multiplying. And if you think about it, you could `s/0/infinity/g` in integer multiplication tables and they'd still work exactly the same.

[0] https://en.wikipedia.org/wiki/Gaussian_integer#Gaussian_prim...

CBLT··on Classes often aren't the simplest tool for the job
The interview[0] with Barbara Liskov about the principle is also really interesting.

> Although it may seem a little strange these days, in those days it was a long way from the east coast to the west coast, and of course we had no conference calls in those days too. That whole business about object-oriented programming was developing on the west coast and on the east coast we were mostly working on data abstraction, and the two worlds were kind of separated. So I knew the name, but we didn’t run into each other at conferences and there wasn’t much crosstalk going on.

> In the 1980s, I was asked to give a keynote at OOPSLA, which I think it was maybe the second OOPSLA. It hadn’t been in existence very long. So I decided that this was a good opportunity to learn about what was going on in object- oriented languages. So I started reading all the papers and I discovered that hierarchy was being used for two different purposes. One was simply inheritance. So I have a class, it implements something, I can build a subclass, I can borrow all that implementation, change it however I want, add a few extra methods, change the representation. Whatever I want to do, I just sort of borrow the code and keep working on it.

> The other way it was being used was for type hierarchy. So the idea was that the superclass would define a supertype, and then a subclass would extend this to become a subtype. I thought this idea of type hierarchy was very interesting, but I also felt that they didn’t understand it very well. I remember reading papers in which it was clear they were very confused about it, because one in particular that I remember said that a stack and a queue were both subtypes of one another. This is clearly not true because if you wrote a program that expected a stack and you got a queue instead, you would be very surprised by its behavior. The difference between LIFO and FIFO is a big deal.

> This led me to start thinking about “What does it really mean to have a supertype and subtype?” And I came up with a rule, an informal rule which I presented in my keynote at OOPSLA which simply said that a subtype should behave like a supertype as far as you can tell by using the supertype methods. So it wasn’t that it couldn’t behave differently. It’s just that as long as you limited your interaction with its objects to the supertype methods, you would get the behavior you expected.

[...]

> Meanwhile I was working on distributed computing, I was particularly interested in viewstamped replication and some of the other work that was going on in my group at the time, and I wasn’t really thinking about this until sometime in the ’90s when I got an email from someone who said, “Can you tell me if this is the correct meaning of the Liskov substitution principle?” So that was the first time I had any idea [laughs] that there was such a thing, that this name had developed.

[0] https://amturing.acm.org/pdf/LiskovTuringTranscript.pdf page 29

CBLT··on TSMC looks to double down on U.S. chip factories as talks in Europe falter
Taiwanese people respond in polls that they see themselves as Taiwanese, not Chinese.
CBLT··on Let's stop building APIs around a network hack (2017)
With application servers acting as the authoritative state of a user's current phonecall status, the api client wants a websocket connection to the shard with that user's state. It connects to one and is 302'd to the appropriate shard. It how has a websocket connection directly to the authoritative source to get notified of any state changes.

I forget exactly what the scenario was but the request was not being sent with credentials so a 401 was returned, which immediately prompted a retry with the credentials. I'd probably agree that this is covering up an issue that should be fixed.

CBLT··on Let's stop building APIs around a network hack (2017)
I've gotten value from HTTP responses in the 300s, 400s, and 500s being handled appropriately by various tools without having to write special RPC logic for those cases. What am I missing?
CBLT··on You Are Not ‘Behind’ (2016)
Yeah, they should use median instead of average.
CBLT··on What's in the Box?
Check out the context from TFA: this is a help message prescribing a change you could make (inserting a &). The signature is different because it's prescribing a different signature to fix the issue.
CBLT··on Twitch will ban users for 'severe misconduct' that occurs away from its site
Pretend Harvey Weinstein is talking to you. And that he's reading the top-most comment (by newbie789) on this story: that he owns the company, so he can ban you at his discretion. Or gaslight you. Or show you shock porn. That this is fine, because it's how its always worked here.

I'll tentatively assume you got some of the same visceral recoil I got from that mental image. And that we agree that following everything Hollywood does is probably not for the best. So I'll ask you: if you could solve this however you'd like (by passing laws, let's say), how would you do it?

CBLT··on Twitch will ban users for 'severe misconduct' that occurs away from its site
I'm okay with that. I think sports approaches this with the appropriate level of maturity. Has any sports exec said something to the effect of

> I can also ban you if I don’t like you. Or if I think it’s funny, or really any other reason.

CBLT··on Twitch will ban users for 'severe misconduct' that occurs away from its site
To add a little extra context to what other people are giving you: large, million-dollar digital tournaments stream on Twitch because they have no other choice if they want to reach viewers. ESL signed a deal with Facebook streaming that destroyed their viewership numbers because people go to Twitch to watch, not the website for the tournament. Organizers have clearly seen this and will not move their stream to another provider unless a large amount of money changes hands (like Facebook sponsoring ESL).

Additionally, Twitch will not allow banned users to appear on other streams including tournament streams. There was a kerfluffle recently where a Twitch-banned player was also banned from a tournament they tried to compete in, solely because the tournament organizer didn't want to jeopardize their streamability.

I hope I've impressed upon you that a Twitch ban is effectively a ban on all opportunities that involve money in the esports scene. There are incredibly few esports careers that could survive a Twitch ban, and not a single one would be unaffected.

CBLT··on China boycotts Western clothes brands over Xinjiang cotton
> On March 24th the Communist Youth League, a party affiliate, whipped up a nationalist online boycott of H&M, digging up a months-old statement on the Swedish garment-maker’s corporate website expressing concerns about reports of forced labour in Xinjiang. Government officials and state media joined in. An online mob besieged H&M and other brands, including Nike, Uniqlo and Adidas, demanding they retract past statements about Xinjiang if they expect to make money in China.

> Multiple Chinese celebrities publicly renounced brands they had endorsed but which have stuck by earlier statements about Xinjiang (or not indicated any change). These include H&M, as well as Adidas, Nike, Puma and Uniqlo. Zhou Dongyu, an actress, dropped her deal with Burberry because she said the British maker of posh trench-coats, a member of the Better Cotton Initiative (BCI), a due-diligence consortium, had not “clearly and publicly stated its stance on cotton from Xinjiang”

> Several apparel firms, including Muji, Fila China and the Chinese operation of Hugo Boss, gave testimonials on Chinese social media that they support Xinjiang cotton (all three of those companies have also issued statements from corporate headquarters acknowledging concerns about allegations of forced labour in Xinjiang).

> Other firms have apparently taken down earlier statements about Xinjiang. They include PVH, which owns Calvin Klein, and Inditex, which owns Zara, among other brands.

CBLT··on All my career rejections
> How fast are you going to come up with sorting one or two lists if you don’t already know this is an option?

Why would I not know this is an option? The word "sorting" appears in every single study guide I've seen. It's used as part of a solution in a large number of practice problems. I'm legitimately curious about what study materials you've used that leaves you uncomfortable with sorting.

EDIT: I might've misunderstood your question. When Amazon asked me this interview question, I'd never seen it before and didn't know beforehand what to do to solve it. I thought to try sorting a list within the first minute of working on it, because that's what you do with Leetcode style problems. I had prepared before the interview, so "let's try sorting" was not a stroke of brilliance it was a basic attempt to use a common tool.

CBLT··on All my career rejections
> The problem is that they still want that optimal solution in the 30 minutes given to you.

This is only half true in my opinion. A lot of the interview questions I've gotten are pretty straightforward, for example given two lists of length M and N, brute force searching their product space is O(M*N), but if you sort one list the complexity reduces to O(NlogN + MlogN). I get the impression that the interviewer did expect me to sort, and writing code to do that was good enough.

On the other hand everyone shares stories about the really hard "gotcha" problems with clever optimal solutions. I've only been given one of those[0], and I did not come up with the optimal solution but I still passed the interview. I wrote a halfway solution that was better than bruteforce and I explained why any attempt I'd make to remove terms from the big O expression wouldn't work (obviously I could remove more if I was clever enough or given unlimited time).

So I would sum up my experience with they expect you to do better than brute force within 30 minutes, and to give them an intelligent conversation. I don't think this is easy, but it's not as impossible as you make it out to be.

[0] https://techdevguide.withgoogle.com/resources/former-intervi...

CBLT··on Stuff Your Logs
I'm assuming you're talking about https://www.notthewizard.com/2014/06/17/are-files-appends-re...

It seems they have a max size of 512 bytes[0] which they reject[1] if the encoded length exceeds.

[0] https://github.com/backtrace-labs/stuffed-record-stream/blob...

[1] https://github.com/backtrace-labs/stuffed-record-stream/blob...

CBLT··on Oracle Cloud is unreachable
I'm not worried about hitting the same error they did, I'm worried about getting the same customer support they did.
CBLT··on Oracle Cloud is unreachable
> What's worse about Google Cloud SQL?

https://issuetracker.google.com/issues/35904358

CBLT··on Bluetooth Attack Can Steal a Tesla Model X in Minutes
https://news.ycombinator.com/item?id=25187170
CBLT··on Chemistry of Cast-Iron Seasoning (2010)
Have you tried carbon steel? In my opinion it is superior to cast iron in every way, especially durability.
← PreviousPage 6 of 9Next →