Better HN
topnewbestaskshowjobs
Log inSign up

frant-hartm

491 karma · joined Dec 30, 2016 (9y ago) · 195 submissions

Submissions

comment 2mo ago · link · parent

Ugh no. Even if the thing is right in front of me, I might not be able to draw the right proportions. It might be because I am no artist though, but my point is seeing with my own eyes is not strictly better. At some point the image in my head becomes better than what I see, e.g due to distance or lack of light.

comment 1y ago · link · parent

I wonder what people use/need apart from the usual stuff in Maven nowadays.

In the last 5 years, I didn't need anything more than:

- resource plugin - compiler plugin - jar plugin (jars, test jars, javadoc jars) - surefire/failsafe - shade plugin for repackaging to avoid classpath hell - assemble plugin - license plugin

Most of the issues I had were with the shade/assemble/license plugins.

I consider myself a Maven power-user and like the tool compared to others (Gradle is too ant-like, resulting in non-standard builds, sbt is just a torture tool).

With time, I concluded that the simpler it is, the better.

comment 2y ago · link · parent

Just a note: I am not claiming it is working correctly, only saying there is a clear and documented way how the client knows when to commit, and that it works as expected in a simple scenario.

comment 2y ago · link · parent

> how does Kafka know when you've processed the messages it gave you?

By calling `poll()` again. It doesn't commit the records returned from poll until auto commit interval expires AND you call poll again.

At least this is what the javadoc says quite clearly: https://kafka.apache.org/39/javadoc/org/apache/kafka/clients...

Note: Using automatic offset commits can also give you "at-least-once" delivery, but the requirement is that you must consume all data returned from each call to poll(Duration) before any subsequent calls, or before closing the consumer.

E.g. the following commits every 10s - on each call to `poll`, it doesn't automagically commit every 5 s.

        Properties props = new Properties();
        props.setProperty("bootstrap.servers", "localhost:9092");
        props.setProperty("group.id", "test");
        props.setProperty("enable.auto.commit", "true");
        props.setProperty("auto.commit.interval.ms", "5000");
        props.setProperty("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
        props.setProperty("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
        KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props);
        consumer.subscribe(Arrays.asList("my-topic"));
        while (true) {
            ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));
            for (ConsumerRecord<String, String> record : records) {
                System.out.printf("offset = %d, key = %s, value = %s%n", record.offset(), record.key(), record.value());
            }
            Thread.sleep(10_000);
        }

comment 2y ago · link · parent

Depending on where you are going in London, flying to Stansted / Gatwick might be faster than to Heathrow or City.

comment 2y ago · link · parent

You probably don't have many roundabouts where you live, right?

comment 2y ago · link · parent

That's why I hate sales people. Give me all the info on your product, ideally, make it easy to compare to others and I will decide myself.

The idea that one can ask me a few questions and give good advice when buying a phone, a car, a house etc.. is just bizarre.

Maybe it is not like that in the general population, but it certainly is within technically-minded people.

comment 2y ago · link · parent

And on top of that this _end-to-end exactly-once guarantees_ makes the result look like the message was processed in the pipeline only once, while in reality a message will be processed 2x (or more times) in the pipeline in case of a temporary failure but only one version will be committed to the external system.

comment 2y ago · link · parent

> Engineers look down on advertising and advertising people

I don't think this is entirely true. We certainly look down on marketing fluff and playing on emotions, but I certainly appreciate well-made marketing material full of facts and specs.

comment 2y ago · link · parent

Why would you do it for every tab switch? You do it once to fit your preferred width and all websites adjust. You would probably have a shortcut for that in your window manager.

There was a great time at some point in the past where everyone went all in on responsive design and most websites behaved well, what we have nowadays is a regression in usability (at least for power users).

comment 2y ago · link · parent

While I agree with the research, let me be the judge of what works (for me..), span the text across the full width, so I can resize the window as I see fit.

It's a shame that one needs to use scrips to modify websites used daily (e.g. I do that with Github to span the full width).

comment 2y ago · link · parent

I remember that Neo4j Enterprise used to be available under AGPL. They pulled it and now it's available only under a commercial license.

AGPL is not a problem for server-side software if you don't need to modify it. Your application (talking to the server) doesn't become infected by AGPL.

comment 2y ago · link · parent

This is called mounting/un-mounting and is much cheaper than a context switch.

comment 2y ago · link · parent

Ok. This JVM-level switching is called mounting/un-mounting of the virtual thread and is supposed to be several orders of magnitude cheaper compared to normal context switch. You should be fine with millions of virtual threads.

comment 2y ago · link · parent

What do you mean by context switching?

My understanding is that virtual threads mostly eliminate context switching - for N CPUs JVM creates N platform threads and they run virtual threads as needed. There is no real context switching apart from GC and other JVM internal threads.

A platform thread picking another virtual thread to run after its current virtual thread is blocked on IO is not a context switch, that is an expensive OS-level operation.

comment 2y ago · link · parent

Complain to the author of your direct dependencies (or better send a PR if open source). There is absolutely no reason why lombok should get pulled in as transitive dependency apart from ignorance on library author side.

comment 2y ago · link · parent

There are multiple attack vectors via the supply chain that this new settings prevents.

Sure, if the compromised library is one of your core libraries that runs during build, test and runtime, then this does not help. But there are

  test libraries only
  compile time only libraries (hello lombok?)
  transitive dependencies that may not be used during runtime (or run only in rare code paths)

Sometimes compromising the build environment is more valuable than the app's runtime environment - e.g. it may allow the attacker to compromise all apps.

Explicitly enabling a particular annotation processor I want to run is small price to pay for the increased security.

comment 2y ago · link · parent

> legal department works for you, not the other way around.

Not sure what planet you live on. Unless you are one of the execs, Legal (and other compliance departments like HR) work pretty much against you. They exist to protect the company and the exec team.

comment 2y ago · link · parent

You can, but one has to be careful with the transfers. If not you could incur ridiculous costs.

And some architectures are still prohibited - any replicated database across cloud vendors - imagine Cassandra hosted across AWS and Azure to protect against one cloud vendor outage.

comment 2y ago · link · parent

Same here. I am so used to

  /**
   *
   */
that I find this visually off-putting. Almost as much the string interpolation in string templates.

  /***
would be much better.

Also /// will be read as a comment with a line starting with a slash until the tooling is updated.

comment 2y ago · link · parent

> still don't have a legal requirement to blur people in the background

What countries require to "blur people in the background"?

comment 2y ago · link · parent

No, it is not. The file is smaller than the available RAM, so will be cached in subsequent runs.

comment 3y ago · link · parent

AFAIK 64GB SO-DIMM DDR4 modules are not available, so you need a laptop with 4 ram slots, that's just a few laptops in the workstation / gaming series of a few vendors.

comment 3y ago · link · parent

Isn't this typical tick-tock move? Don't change too many things at once - they are moving to the new process so probably not too many changes in the architecture, only increase in frequency for same power consumption allowed by the better process.

comment 3y ago · link · parent

Workstation laptops from Lenovo and Dell have upgradeable RAM and have been offering 128 GB RAM for something like 6 years.

comment 3y ago · link · parent

Lenovo has been offering 128 GB since P52, that is for around 6 years. The current model with 128 GB RAM is P16 Gen 2.

https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/th...

comment 3y ago · link · parent

Can you provide some examples where LM creates something novel, which is not just a rehash or combination of existing things?

Especially considering how hard it is for humans to create something new, e.g in literature - basically all stories have been written and new ones just copy the existing ones in one way or another.

comment 3y ago · link · parent

Maven is always more or less the same - you have properties, dependencies, build (plugins), profiles, maybe modules and dependencyManagement if you have multi-module build. That's it, every project is the same.

In Gradle there is are infinite number of ways how to configure it. I haven't seen 2 projects done in the same way, when I want to understand a new gradle build, I need to learn few new Greadle (or Groovy) features.

Sure, in very complex Maven builds there might be some quirks and some plugins have bugs, but it works so much better than anything else out there.

comment 3y ago · link · parent

This is definitely true. The more complex the library is, the more chance for a vulnerability to happen. And combining 2 independent low level vulnerabilities may end up being a critical vulnerability.

The same may happen in your project, but if you use simple(r) dependencies, it's less likely.

comment 3y ago · link · parent

I would have very much preferred it. It would be a lot more readable and accessible. Nowadays there is tooling, but imagine having schemas and autocomplete for all the K8s files from day 1.

So pretty much all enterprises use it. Not bad for tech not in fashion.

1234567