141 karma · joined Feb 27, 2013 (13y ago) · 54 submissions
comment 3w ago · link · parent
comment 3mo ago · link · parent
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.
comment 4mo ago · link · parent
What type would that method accept? Wouldn't it need to be Object? That seems worse than boilerplate
comment 1y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 3y ago · link · parent
> 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.
comment 3y ago · link · parent
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.
comment 3y ago · link · parent
comment 3y ago · link · parent
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.
comment 4y ago · link · parent
comment 4y ago · link · parent
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.
20.
Our Journey to Multi-Region: Routing API Traffic(product.hubspot.com ↗)
2 points · by HiJon89 · 4y ago · discuss
21.
Our Journey to Multi-Region: An Introduction(product.hubspot.com ↗)
1 points · by HiJon89 · 4y ago · discuss
22.
Healing HBase Locality at Scale(product.hubspot.com ↗)
1 points · by HiJon89 · 4y ago · discuss
comment 5y ago · link · parent
"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).
comment 5y ago · link · parent
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.
comment 5y ago · link · parent
We switched to GCS for our Maven artifacts and the problem went away.
29.
Java 11 Upgrade Tip: Don't Rely on Generated SerialVersionUID(product.hubspot.com ↗)
7 points · by HiJon89 · 6y ago · discuss