Better HN
topnewbestaskshowjobs
Log inSign up

thinkharderdev

1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions

https://www.thinkharder.dev

[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]

Submissions

comment 5y ago · link · parent

My experience with ElasticSearch is that it is amazing for log aggregation until you reach a certain volume and then the operational cost (both $ and time/complexity) of running a large ES cluster starts to really bite hard.

To take one recent(ish) example from my last job. We built a bunch of streaming pipelines to enrich log data during ingest so we could use the ES ML jobs to do some proactive alerting on our application logs. It was all really nice but then we had to set up a regular patching cycle for our ES cluster. Generally everything is ES is stored in an index so doing a blue/green deployment works pretty well. Except that the ML jobs have some sort of in-memory state that can't be migrated, so the ML jobs would get migrated but in a weird, half-working state. So we ended up having to manually delete and recreate the "half-working" ML jobs whenever we rolled out the new patched cluster.

Having an "all in one" solution like ES is great until you hit a certain scale and the inherent complexity of such a system starts to really make itself apparent.

comment 5y ago · link · parent

Wouldn't this law make productivity surveillance more pervasive? Based on the description in the article it seems to require that "Going forward, warehouse workers who think their quotas lead to unsafe behavior will be able to ask for 90 days' worth of documentation of how their work meets or fails the quota"?

comment 5y ago · link · parent

Regardless of how often you ship, things still break sometimes though right? And you still need to find out why when they do. Often the issue is some interaction between application and infrastructure which requires knowledge of both to understand. Long before k8s was a thing and I worked in an environment like you describe above I still knew how the infrastructure worked even if I personally wasn't allowed to touch it.

comment 5y ago · link · parent

I don't understand how you would do your job as a developer without understanding the infrastructure it runs on. I agree that it can make sense to have dedicated people do all the infrastructure setup/management/etc, but when you have an application running in production there are a lot of considerations which can't be cleanly separated from underlying infrastructure. Not to mention troubleshooting production issues. When something is not working in prod, the first thing I do is check basic operational stuff with the underlying deployment. Are all the pods still running? Have there been any restarts? If there is some DNS/network error how can I spin up a pod in the cluster to check on various things?

comment 5y ago · link · parent

I think this actually gets at an important distinction. Are Data Scientists more like designers or developers? UX designers shouldn't need to know anything about k8s (or any other infrastructure) but developers should. Ultimately if you are not only responsible for building something but also running it in production and maintaining availability then you need to understand the infrastructure it runs on to some degree.

comment 5y ago · link · parent

Was going to say the same. In any decision where the outcome affects a human being, "because the algorithm said so" is usually not a satisfactory answer either to the human being affected or to any regulators who have an interest.

comment 5y ago · link · parent

There is a flip side to that as well I think. One 10x developer can be more productive than 10 developers, but often 10 10x developers cannot be as productive as 100 developers. Certain things just don't "scale out" with the sort of creative advantages that highly productive engineers use.

comment 5y ago · link · parent

Yeah, this is an important point when thinking about it from an organization perspective. I've been at places where they "only wanted to hire rockstars" which was beyond stupid. By definition 10x developers are rare and are going to have a lot of options when it comes to where they work. So if you depend on some member of the team carrying a hugely disproportionate amount of the work, then you are in for a rude awakening when they jump ship.

comment 5y ago · link · parent

Yeah, they are microbenchmarks so should definitely be taken with a grain of salt but the top performing one (on 3 CPUs) was akka-grpc which is definitely not built by Google and uses akka's native HTTP/2 stack. It's not even written in Java for the most part but mostly Scala.

comment 5y ago · link · parent

I was very much on the Java/JVM side of the Java v .NET wars of the early 2000s (mostly because of an instinctive distrust of MS and the imo better OSS ecosystem around the JVM) but still always though that C# was the better-designed language.

comment 5y ago · link · parent

Yeah, I have my complaints about Java the language (and mostly use Scala myself) but the tooling for Java development is really compelling. Everything just works (IDE, debuggers, etc) and idiomatic Java code tends to be very high performance without a ton of special effort required for performance tuning. And if you do need to do performance tuning, the tooling for metrics and performance tuning is also amazing. One of the most underrated aspects of building on the JVM is that the runtime itself provides a lot of visibility into runtime performance "out of the box". If I do have to debug performance issues, I can just fire up JFR and get a ton of useful metrics about performance bottlenecks with no changes to the actual source code. I can even run JFR on my production workloads and get great visibility into the were the "real world" performance bottlenecks are happening.

comment 5y ago · link · parent

Yeah, to me that's the most amazing thing about it. That the JVM has become an actual platform on which many languages are able run and get the amazing performance of the runtime. In the gRPC benchmarks the top spot is actually akka-grpc which is mostly written in Scala!

comment 5y ago · link · parent

Great article. The JVM is one of the most astonishing pieces of software ever created.

I was looking at gRPC benchmarks the other day (https://github.com/LesnyRumcajs/grpc_bench/wiki/2021-08-30-b...) and 6 of the top 7 performing gRPC implementations on 3 core CPUS were on the JVM.

comment 5y ago · link · parent

That seems like a really counter-productive position to take if you are trying to hire software engineers. The market is currently very hot so if you are limiting yourself to only candidates who are in "desperate need of a new job" then you are probably going to have a lot of trouble finding people.

comment 5y ago · link · parent

The 40h paid project also seems kind of crazy to me. It is nice that is is paid but almost every software engineer I have ever interviewed already had a full-time job and was looking to switch. Where are they supposed to find 40h to work on a side-project even if it is paid? Is the idea that you are supposed to quit your current job first before interviewing?

comment 5y ago · link · parent

So I think it's actually evolved into a weird sort of test of conscientiousness. Originally the idea was probably that we will test people's abstract problem solving skills. Can they come up with a solution on the fly? Ok, now can they figure out any clever optimizations?

But at this point it is sort of expected that if you are interviewing with a FAANG you will be getting these sorts of questions (and they tell you that up front), so it becomes a sort of test of "is this person willing to spend 10 hours preparing for an interview"?

comment 5y ago · link · parent

> I rarely had candidates that had significant portfolios

I think that is the thing. The vast majority of software engineers have only worked on closed-source codebases so reviewing their previous work is impossible. That said, what I have generally done is to just use interviews to talk about previous work. It is usually pretty clear in the course of a 30 minute interview who has actually done the amazing things they claim on their resume and understands how to build software systems and who doesn't.

comment 5y ago · link · parent

I don't think that is an accurate representation of the findings. Half of all patients at a VA hospital where they have a policy of testing everyone admitted for COVID regardless of why they are there.

"Among the limitations of the study is that patients in the VA system are not representative of the U.S. population as a whole, as they include few women and no children. (Still, the new findings echo those from the two pediatric-admissions studies.) Also, like many medical centers, the VA has a policy to test every inpatient for COVID, but this is not a universal practice."

So basically the population studied skews towards groups who tend to have better COVID outcomes and is subject to universal testing. It is interesting but I don't think it should really change the picture much.

comment 5y ago · link · parent

I think it is certainly possible. In Scala you enable "explicit nulls" and it will not compile if you try to set a value to null (https://dotty.epfl.ch/docs/reference/other-new-features/expl...) without making the type a union with Null.

comment 5y ago · link · parent

The new FFM API looks really cool. Still incubating but having better native interop I think could really be a big win. Most developers will never touch that stuff but having the ability to manage native, off-heap memory and safely(ish) make native calls will be great.

comment 5y ago · link · parent

PDF is basically a programming language, so instead of sending image data you send a program which is interpreted by the PDF reader to render an image on the client. That makes it really hard to secure completely.

comment 5y ago · link · parent

Wasn't Bezos phone hacked by the Saudis?

comment 5y ago · link · parent

Just finished reading https://www.amazon.com/This-They-Tell-World-Ends/dp/16355760... which is a great book about the zero-day market and how it evolved over the years.

The basic issue is that every nation is actively buying and using zero-days and doesn't want to stop. And companies like NSO aren't really (so they say at least) hacking anybody. They just develop and license hacking tools to governments to use for "lawful" law enforcement purposes. So nobody wants to ban the zero-day market because every country is a huge buyer of zero-days themselves and it is hard to ban selling zero-days to sovereign governments who are using them in accordance with their own laws (even if the regimes in question are terrible and using them to violate their citizens basic human rights). After all, it would be a bit awkward for the US to demand that the NSO Group stop selling it's hacking tools to Saudi Arabia while we have a multi-billion dollar defense industry selling the Saudis all sorts of advanced weaponry.

comment 5y ago · link · parent

The hard part is not necessarily finding the programming mistake so much as figuring out a way to reliably exploit them. Back in the day before ASLR and other mitigations it was really straightforward, but modern OSs have much more sophisticated countermeasures to prevent buffer overflows and user-after free bugs to enable RCE.

comment 5y ago · link · parent

Just read that book after listening to the DND episode with the author and it is really great.

comment 5y ago · link · parent

Probably so, but I think as long as you ensure the error gets handled somewhere (rather than crashing the program) it is good tradeoff to make. That was the problem (IMHO) with unchecked exceptions in Java. You make everything an unchecked exception because constantly adding code to handle checked exceptions is annoying and verbose, but then if you don't handle the unchecked exceptions somewhere then they crash the JVM. This is where I think the Scala/Rust approach is best. The compiler can force you to handle the error somewhere but there is very little syntactic overhead if you want to ignore an error in any particular function.

comment 5y ago · link · parent

Yeah, if you need to explicitly do something with the error then you fall back to a matcher. But the idea is that you only need to deal with errors at error boundaries which you can define. So if you just want to pass an error up the stack to be handled somewhere else then you can with almost no syntactic overhead.

With something like a functional effect system you can even do better than that. For instance with Scala ZIO you can do something like:

``` val result = for { fooResult <- foo().tapError(e => console.putStrLn(s"Error in foo!: $e") barResult <- bar(fooResult).tapError(e => console.putStrLn(s"Error in bar!: $e") bazResult <- baz(barResult) } yield bazResult ```

Then when you run the bazResult effect you get either an error or the result type which you can handle however you like.

comment 5y ago · link · parent

I think the point is that while error handling is part of the program logic it is not necessarily part of every functions logic. Sometimes you just want to pass an error up the stack to be handled at some other error boundary. This is what Rust (with the ? operator and Result type) and functional effect libraries (Scala ZIO or cats-effect) provide. You can ensure at compile time that errors are handled somewhere but each individual function in the call stack can decide whether it wants to explicitly handle an error or just pass it up the stack. And if you just want to pass it up the stack then there is no syntactic overhead associated with it.

comment 5y ago · link · parent

Or, maybe developers who choose other languages are also competent professionals who make language/framework choices for good reasons. I have no considered opinion about PHP but one reason I have never used it for a web application backend is because I do a lot of coding that PHP is not well-suited for (high-performance, data intensive) and it is easier to write the web server in the same language I use for everything else.

Also, in general passing untrusted input to shell commands is probably a bad idea. FFmpeg has had many CVEs over the years and taking an upload from a user and piping it to a CLI command is asking for trouble. There are considerations beyond just doing the easiest thing that could possibly work.

comment 5y ago · link · parent

I recently started working in C++ again and my experience with C++ package managers were pretty dismal (I tried vcpkg and Conan). Just trying to setup a PoC project with only two dependencies took me multiple days and neither Conan nor vcpkg worked. And this was on an Intel MBP so not exactly some exotic platform.
1
121314
24