Better HN
topnewbestaskshowjobs
Log inSign up

avita1

176 karma · joined Nov 27, 2014 (12y ago) · 76 submissions

Submissions

comment 7mo ago · link · parent

IMO this tool is basically allowing you to do that, it just takes care of the bookkeeping to associate the series of smaller PRs with eachother which is possible today but requires a lot of clicking.

comment 3y ago · link · parent

Is this practically true? Yes, anyone can clone any repo from Github, but surely scraping all of Github would run into rate limits?

The terms and conditions say as much https://docs.github.com/en/site-policy/github-terms/github-t...

3.

How State's Consumers Lost with Electricity Deregulation (2000)(latimes.com ↗)

3 points · by avita1 · 3y ago · discuss

comment 3y ago · link · parent

How do you solve the context propagation issue with eBPF based instrumentation?

E.g. if you get a RPC request coming in, and make an RPC request in order to serve the incoming RPC request. The traced program needs to track some ID for that request from the time it comes in, through to the place where the the HTTP request comes out. And then that ID has to get injected into a header on the wire so the next program sees the same request ID.

IME that's where most of the overhead (and value) from a manual tracing library comes from.

comment 3y ago · link · parent

> So you have endless "Fix a" "Typo" "fixup" "revert redo" "add y missed in z" commits and then the squash pushes all that crap into the commit message for whatever the final mess will be?

In Github at least you can set the behavior to take the PR description by default as the squashed commit message. In fairness this is not the default. The default behavior for squash merges is to ask for a new commit message right as you hit the merge button, and the default is all of the messages from the commits being squashed together.

> make no effort to produce high-quality independent commits

I'm partial to sqaush merges when using github. I don't put much effort into the individual commit messages, instead I put lots of effort into the PR description (the thing reviewers will read, and what will eventually become the commit message in revision history). That said, one of my favorite features from gerrit at a past job was that the commit message itself could be reviewed.

comment 3y ago · link · parent

Did Google interviews change dramatically around 2012?

7.

Pykrete(en.wikipedia.org ↗)

16 points · by avita1 · 3y ago · discuss

comment 3y ago · link · parent

This isn't catching the panic though, this is propagating the panic through the parent goroutine. The whole program will still shut down, but the stacktrace that shows up in the panic contains not only information information about the goroutine that panicked, but also the launching goroutine. That can help you figure out why the panic happened to begin with.

comment 4y ago · link · parent

Something I've increasingly wondered is if the model of CI where a totally pristine container (or VM) gets spun on each change for each test set imposes an floor on how fast CI can run.

Each job will always have to run a clone, always pay the cost of either bootstrapping a toolchain or download a giant container with the toolchain, and always have to download a big remote cache.

If I had infinity time, I'd build a CI system that found a runner that maintained some state (gasp!) about the build and went to a test runner that had most of its local build cache downloaded, source code cloned, and toolchain bootstrapped.

comment 4y ago · link · parent

Understanding amendments would be a very good use case. Often changes to the law are not new laws, but changes in other laws. Any time I've tried to actually parse the law, I've found getting a good picture of the current state of the law, and a snapshot of the law in the past is tricky.

To take this example I found off the NYS assembly website legalizing adultery (it was the first one I found, I swear)

https://nyassembly.gov/leg/?default_fld=&leg_video=&bn=A0010...

It's phrased as "Section 255.17 of the penal law is REPEALED", but if you try to find "the penal law", but if you look up a a copy of the penal code do you see 255.17 in it? If so, how can you find out what was actually repealed. If not, do you need to hunt through every possible amendment to figure out the state of the law is at the time of reading?

comment 5y ago · link · parent

Cool article, I'm not sure I agree with the headline.

I used to write low-scale Java apps, and now I write memory intensive Go apps. I've often wondered what would happen if Go did have a JVM style GC.

It's relatively common in Go to resort to idioms that let you avoid hitting the GC. Some things that come to mind:

* all the tricks you can do with a slice that have two slice headers pointing to the same block of memory [1]

* object pooling, something so common in Go it's part of the standard library [2]

Both are technically possible in Java, but I've never seen them used commonly (though in fairness I've never written performance critical Java.) If Go had a more sophisticated GC, would these techniques be necessary?

Also Java is supposed to be getting value types soon (tm) [3]

[1] https://ueokande.github.io/go-slice-tricks/

[2] https://pkg.go.dev/sync#Pool

[3] https://openjdk.java.net/jeps/169

comment 5y ago · link · parent

Other comments have linked newer language features that make it easy. But for years, the Java Way of handling discriminated unions was to use the visitor pattern [1]. It's very verbose, and is an insane amount of typing unless your IDE is doing the typing for you, but it has the compile time guarantees that forces each caller to handle every type without instanceof/Object.

[1] https://dzone.com/articles/design-patterns-visitor

comment 5y ago · link · parent

Mesospehere was renamed and has shifted to supporting Kubernetes.

https://d2iq.com/blog/mesosphere-is-now-d2iq

14.

Vegetable Oils Replaced Animal Fats in the American Diet(theatlantic.com ↗)

2 points · by avita1 · 5y ago · discuss

comment 6y ago · link · parent

The cynic in me

> noted that the city rule has a provision that drivers’ pay can’t be reduced because of the fee caps

This seems impossible to enforce right? The city can't reasonably have any insight into why driver fees change.

comment 6y ago · link · parent

I agree with most of this, but was surprised by your comment:

> Oh, also, the implementation of Kubernetes cron jobs is also complete garbage (spawning a new pod every job is insanely wasteful).

How often/how many cron jobs are you running that spawning a new pod per job is a problem ?

comment 6y ago · link · parent

Specifically about the stock market, Flash Boys by Michael Lewis is a fun read and taught me a lot about what the stock market is. It's not the densest book. It's more of a narrative than a teaching tool, but for what it is I found it very informative.

comment 7y ago · link · parent

While Apache is certainly not zero configuration, it is pretty easy to forget about the Apache part of the LAMP stack. When I got started making websites, I downloaded "WAMP" (windows-apache-mysql-php). It took care of all the configuration and I could, as the author said, drop my code in a www folder and be off to the races.

Similarly, lots of hosting providers wouldn't expose the guts of Apache to developers. They would give you some sftp credentials, and let you upload whatever PHP files you wanted. No need to think about Apache configurations (except maybe a few htaccess files).

comment 7y ago · link · parent

Tobacco taxes have been found to discourage smoking among certain populations [1].

Perhaps that's not a fair comparison because the way legalization has been going, at least in the U.S. looks like a cross between tobacco and gambling. Taxing tobacco feels like the more correct metaphor, but I'm not sure why.

[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3228562/

20.

Trunk Based Development(trunkbaseddevelopment.com ↗)

2 points · by avita1 · 7y ago · discuss

comment 7y ago · link · parent

I find the comparison to java a bit unfair, because this pattern is totally possible but has been largely deemed a bad pattern. The analog to the pattern in java is to extend from a non-final class. So in this case "class HTTPClient" and "class CachedHTTPClient".

There are lots of drawbacks to doing it that way, the worst of which is that you need to remember to override the method in CachedHTTPClient everytime you add a method to HTTPClient, and the compiler gives you no hints about it.

comment 7y ago · link · parent

If you're in the position to be buying a house, voting is basically free. Ignoring a credit score when applying for a mortgage can be considerably more expensive.

comment 7y ago · link · parent

Do you have a source for that last point?

Even if that number is right, I would think that Uber/Ola cars have higher after-production emissions due to them being driven all day and being driven in city settings (as opposed to on a highway where cars are more efficient.)

24.

Show HN: Esq – Elasticsearch utility that isn't installed on remote hosts(github.com ↗)

1 points · by avita1 · 7y ago · discuss

comment 7y ago · link · parent

I'm genuinely not trying to be snarky, but how can you say that with any certainty?

The only way to know this for sure would be to ask half your applicant pool to do the test, and the other half to go through the exact same battery of interviews sans take home test and then see how many of the offers you extend are accepted.

Obviously this requires that you're a big enough company to split your applicants into two pools and still have a big enough sample size.

Whenever I talk to people involved in hiring about this, they balk at the idea (for okay reasons -- in theory doing that would mean less people filtered out by homework and more applicants rejected during in person interviews that take up engineer time.)

comment 7y ago · link · parent

Well you're not necessarily dealing with a single pod IP. Two versions of skipping cluster IPs are either having smart client libraries that are capable of multiplexing between different IPs, or using something like consul DNS to resolve a URL into multiple pod IPs and rely on client DNS to do the right thing.

comment 7y ago · link · parent

Is the Kubernetes native (for lack of a better word) service discovery used in many real world use cases? The sense I've gotten talking to people who use kubernetes is that they fall into one of two camps:

- they're moving "legacy" infrastructure off EC2 or similar onto Kubernetes and their service discovery stack is already in place. They end up bypassing cluster IPs and dealing directly with pod IPs. - they're starting with Istio or something similar from the get go because the native service discovery is hard to grok and leaves out a lot of the nice things that Istio gets you for free (once you've set it up)

There's lots of overlap, but I've not heard of anyone making a strong argument for the native service discovery.

comment 8y ago · link · parent

It's impossible for Joe ads buyer to price in fraud, because he doesn't actually know how much fraud is happening. Only Google/the other big exchanges have information to get even close to knowing how much fraud is happening and they have a vested interest in letting fraud slip through and not detecting.

And yes, Google cooperated in this specific case, but only after the problem got really bad. It's really hard to take a charitable view when Google, a large player in the ads space, and a company known for technical excellence, allows stuff like this to happen:

> An agency or advertiser looking to place an ad would only see the name of TBS.com in the ad exchange and not know they were buying ad space on a counterfeit site. Then the bots would visit the fake site and view the ad to generate revenue. (This technique of masquerading as a legitimate publisher is called domain spoofing. It’s a long-running issue, though a new standard called ads.txt [1] is helping curb it.)

This article (https://digiday.com/media/ft-warns-advertisers-discovering-h...) is a year and a half old. Google obviously had the resources to discover this years ago and failed to do so.

[1] https://digiday.com/marketing/wtf-ads-txt/

comment 8y ago · link · parent

There is much more to logging than print statements. I have yet to run into production code which uses vanilla stdout print statements for logging.

30.

Transatomic to Shutter Its Nuclear Reactor Plans, Open-Source Its Technology(greentechmedia.com ↗)

4 points · by avita1 · 8y ago · discuss

123