141 karma · joined February 27, 2013
It feels like there's a lot of assumptions baked in here. For example, do humans get in accidents because eyes are insufficient driving sensors? Or because human drivers get tired, distracted, make mistakes, etc.
Also, you can put 10 cameras on a car looking in all directions at the same time, which feels materially different from a human that only has 2 eyes which can only look in a single direction at a time.
It's possible that massively superhuman driving performance can't be achieved with just cameras, but I'm not seeing a strong case for that being made here.
What type would that method accept? Wouldn't it need to be Object? That seems worse than boilerplate
> This doesn't seem to be supported and could cause many issues e.g. if a base interface adds an overloaded method with a similar signature. Suddenly we will have a conflict and compilation issues.
I think this is already a risk when modifying interfaces or superclasses. For example, if you add a method to a superclass, a subclass might already have a method with the same name/arguments but different return type, which would break compilation.
try (Timer ignored = Metrics.newTimer("getOrders")) {
return db.getOrders();
}
Another common example is when you are implementing an interface method or overriding a superclass method, and your implementation doesn't need all the arguments. Would be great for the programmer to have a way to express this intent (to the compiler and to the reader)This JEP would allow stronger static analysis rules like "every declared parameter and variable MUST be used", and _ would serve as the canonical escape hatch for edge cases.
One datapoint: searching our codebase for variables named "ignored" produces >1,000 hits. And probably an order of magnitude more unused variables that aren't named ignored.
If your processing doesn’t have any external side effects (make external API calls, send emails, charge credit cards, etc) then one option is to put your message queue in a relational DB alongside all your other data. Then you can pull a message, process it, write the results to the DB, and mark the message as processed all inside one big transaction. But not many use-cases can fit these constraints and it also has low throughout.
The fact that half the comments here are dismissive or condescending is such a sad indictment of HN culture :(
Quote:
Now it seems an update was available and has been rolled out end of 2021. But many H5000 did not get that update and now, as the certificate has expired, this update cannot be installed in the usual way.
We don’t need to write a test that tests this function as a whole, we can test the parts we care about independently.
What could possibly go wrong :)"jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.
If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency."
If you're shipping a big application and need to use a large number of these utilities, by all means use jQuery. But if you're shipping a small library and only need one or two of these functions, you might want to forgo the dependency. Using jQuery in your library forces it as a dependency onto everyone who uses your library, potentially making them deal with version conflicts if your version of jQuery doesn't align with their version of jQuery (or the version that another dependency wants).
PUT new-key 200
GET new-key 200
However, this access pattern would be unreliable: GET new-key 404
PUT new-key 200
GET new-key 200/404
This last GET could return a 200, or it could return a cached 404. Unfortunately, Maven uses this access pattern when publishing maven-metadata.xml files, because it needs to know whether it should update an existing maven-metadata.xml file or create one if it doesn't exist yet. So when publishing a new version, it does something like this: GET com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 404
PUT com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 200
And then downstream builds would try to resolve version 1.0-SNAPSHOT, and the first thing Maven does is fetch the maven-metadata.xml: GET com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 404
So when publishing a new version, you could get a cached 404 and fail loudly. However, when updating an existing maven-metadata.xml file you could silently read an old maven-metadata.xml, and end up using an out-of-date artifact (which is even more concerning). Here's what one of the maven-metadata.xml files looks like:
https://oss.sonatype.org/content/repositories/snapshots/org/...Because updating an existing object in S3 didn't have read-after-write consistency, we could have a publishing flow that looked like:
GET com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 200 (v1)
PUT com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 200 (v2)
And then downstream builds would fetch the maven-metadata.xml: GET com.example/example-artifact/1.0-SNAPSHOT/maven-metadata.xml 200 (v1)
So downstream builds could read a stale maven-metadata.xml file, which results in silently using an out-of-date artifact.We ended up just switching to GCS because it was relatively straight-forward and gave us the consistency guarantees we want.
We switched to GCS for our Maven artifacts and the problem went away.
Managed && !"@Singleton"
(I'm omitting the fully-qualified class name for brevity)
If I also wanted to look for HealthCheck classes I could update the query to:
(Managed || HealthCheck) && !"@Singleton"
I think it also helps that OpenGrok has a separate input for filtering file paths (completely splitting the "where" and the "what" parts of the query). And this file path search supports the same boolean operators. So if I want to narrow my search to two particular repositories I could put CrmSearch || AutomationPlatform into the File Path input. And because this input only handles file paths, I don't need to remember any special syntax. Whereas if you clump the entire query into a single input, then users need a way to tell you whether a search term applies to file paths or file contents.
> Anyone can write malicious code into the chatbox and PayPal’s system would execute it. Using the right payload, a scammer can capture customer support agent session cookies and access their account.
...how about we give you a project that more closely reflects problems we solve here day-to-day that you can solve in the comfort of your home on your own hardware in whatever IDE makes you comfortable?
Engineers: That's absurd! I've drawn a line in the sand!