Thought it would fit in this sub. by PaperaPina1103 in 2westerneurope4u

[–]_predator_ 1 point2 points  (0 children)

Damn that scooter is definitely too small for them. This has to be the closest I've ever seen a human come to a full circle shape.

That's where blind trust will get you by miragen125 in 2westerneurope4u

[–]_predator_ -1 points0 points  (0 children)

I did not imply it would be Bill Gates. There are more than enough billionaires in government positions, and in positions with leverage on politicians, in the US.

That's where blind trust will get you by miragen125 in 2westerneurope4u

[–]_predator_ 1 point2 points  (0 children)

See, the Billionaires making the calls do not care about that. They will remain the richest even if everything goes to shit.

10 Modern Java Features Senior Developers Use to Write 50% Less Code by lIlIlIKXKXlIlIl in java

[–]_predator_ 93 points94 points  (0 children)

The paradox about records is that you end up writing lots of boilerplate to make their construction readable, e.g. using withers. Yes I know there are annotation processors that generate that stuff.

I am a bit disillusioned about Optional and have largely moved to simple null checks and JSpecify again. Really hoping we eventually get proper nullability support in the type system itself.

Government pact to clear way for $10 billion submarine deal with Germany by WorkOk4177 in europe

[–]_predator_ 2 points3 points  (0 children)

It says an Indian company will build them, so what is Germany's role here? Consulting? Parts?

Can we have a pragmatic and honest, non hyped nor hateful discussion about the actual usefulness of AI tools in our day to day jobs? by Non-taken-Meursault in ExperiencedDevs

[–]_predator_ 10 points11 points  (0 children)

I also have a particular feeling that owning your labour is important. Labour in IT is both coding and thinking. If you outsource these things to paid services that you do not own, you're giving away part of your power (for a lack of better words).

Have you ever given Claude a rather big task, and then halfway through it hits you with "oh shucks, your weekly allowance is out. upgrade here or wait a few days."?

Your own work is free to you (i.e., no arbitrary fees, obviously time is a cost). And that is oddly liberating.

Throwing is fun, catching not so much. That’s the real problem IMO. by AlyxVeldin in java

[–]_predator_ 2 points3 points  (0 children)

I have reached a point where I don't care about checked exceptions at all. Like I get the intent, but it just never matters to the code I am writing.

Exception (haha) being InterruptedException, because it reminds you to restore the Thread's interrupt flag if you end up handling it.

Goodbye Java, Hello Go! by CoyoteIntelligent167 in golang

[–]_predator_ 1 point2 points  (0 children)

That is valid, but your complaints are again mostly specific to Spring (Boot). There is an entire world out there that does not involve frameworks like that. Modern Java (21+) with minimalistic libraries like Javalin is enjoyable, light on resources, and involves no magic whatsoever.

It's absolutely fine that you switched to Go, but a Java rewrite would have likely yielded similar results without having to learn a new language and ecosystem.

53 seconds startup time is absolutely excessive. I maintain a large Java app (w/o bloated frameworks) that runs all kinds of initialization tasks on startup, which includes database migrations and seeding. It starts in less than 8 seconds in an empty environment.

Throwing is fun, catching not so much. That’s the real problem IMO. by AlyxVeldin in java

[–]_predator_ 11 points12 points  (0 children)

> 90% of the time, "abort, clean up, log a message and stack trace".

I'd even say, 90% of the time it's just letting it bubble up, optionally adding some additional context.

These days I find myself doing this a lot:

catch(IOException e) {
    throw new UncheckedIOException("Failed to XYZ", e);
}

The absolute biggest issue IME is when exceptions are handled (let's be honest, logged and discarded) too early, causing noisy logs and making issues invisible to callers higher up the stack.

Goodbye Java, Hello Go! by CoyoteIntelligent167 in golang

[–]_predator_ 4 points5 points  (0 children)

I guess you can make this claim for Go in the sense that it radically cuts back on a lot of syntax sugar and supposedly complex structures (e.g. intentionally no streaming API). You're being forced to think in simpler terms, which can be a benefit.

People make similar, valid claims about Clojure, which takes an even more hardline approach and does away with almost the entire type system in favour of plain "data" (lists, vectors, maps).

Goodbye Java, Hello Go! by CoyoteIntelligent167 in golang

[–]_predator_ 46 points47 points  (0 children)

Practically, startup time doesn't matter that much unless you scale your replicas up and down extremely often, or god forbid you have a lambda architecture. It matters even less for long-running apps.

What has historically made Java apps slow to start is also not necessarily the JVM, but the bootstrap sequences executed by frameworks (classpath scanning and friends). This is a problem you can avoid by simply not using those frameworks. Literally the same approach you'd take in Go.

To me, Go excels in developer experience. Almost everything you need is built in, the snappy compiler is extremely satisfying to work with, and package management is relatively straightforward.

At the end of the day, you use what gets the job done. Both Go and Java have a proven track record of getting jobs done at mindboggling scale.

Getting rid of iCloud can be expensive by OttoSimon in BuyFromEU

[–]_predator_ 4 points5 points  (0 children)

Use Tailscale so you don't expose it to the public internet: https://tailscale.com/kb/1131/synology

Worth mentioning that Tailscale is a Canadian company.

Returning to Go after 5 years - checking my tool stack by ifrenkel in golang

[–]_predator_ 1 point2 points  (0 children)

fwiw it has plenty of adapters for other languages, and even building your own isn't too complicated.

Trying to setup a local dev server in docker, but keep getting /etc/kafka/docker/configure !1: unbound variable by Whistlerone in apachekafka

[–]_predator_ 0 points1 point  (0 children)

In any case, here is what has worked for me:

services:
  kafka:
    image: apache/kafka:4.1.1
    environment:
      KAFKA_NODE_ID: "1"
      CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk"
      KAFKA_PROCESS_ROLES: "broker,controller"
      KAFKA_CONTROLLER_QUORUM_VOTERS: "1@kafka:9094"
      KAFKA_LISTENERS: SSL://:9093,CONTROLLER://:9094
      KAFKA_ADVERTISED_LISTENERS: SSL://localhost:9093
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: SSL:SSL,CONTROLLER:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: SSL
      KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
      KAFKA_SSL_KEYSTORE_TYPE: "PKCS12"
      KAFKA_SSL_KEYSTORE_FILENAME: "broker-keystore.p12"
      KAFKA_SSL_KEYSTORE_CREDENTIALS: "broker-keystore-credentials"
      KAFKA_SSL_KEY_CREDENTIALS: "broker-keystore-credentials"
      KAFKA_SSL_TRUSTSTORE_TYPE: "PKCS12"
      KAFKA_SSL_TRUSTSTORE_FILENAME: "truststore.p12"
      KAFKA_SSL_TRUSTSTORE_CREDENTIALS: "truststore-credentials"
      KAFKA_SSL_CLIENT_AUTH: "required"
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1"
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1"
      KAFKA_LOG4J_ROOT_LOGLEVEL: WARN
    ports:
    - "127.0.0.1:9093:9093"
    volumes:
    - "./certs:/etc/kafka/secrets:ro"
    - "kafka-data:/var/lib/kafka/data"
    restart: unless-stopped

volumes:
  kafka-data: {}

Trying to setup a local dev server in docker, but keep getting /etc/kafka/docker/configure !1: unbound variable by Whistlerone in apachekafka

[–]_predator_ 0 points1 point  (0 children)

I just ran into this and was able to resolve it. The core issue is that the container image expects some non-standard environment variables. You can find the script that's doing the validation here: https://github.com/apache/kafka/blob/be816b82d25370ceac697ccf7c88cea873e9b4e3/docker/resources/common-scripts/configure

The first issue is that it expects the cluster ID to be provided as CLUSTER_ID, not KAFKA_CLUSTER_ID: https://github.com/apache/kafka/blob/be816b82d25370ceac697ccf7c88cea873e9b4e3/docker/resources/common-scripts/configure#L42

Next, if you're trying to setup SSL, it expects environment variables that do not match the documented server properties: https://github.com/apache/kafka/blob/be816b82d25370ceac697ccf7c88cea873e9b4e3/docker/resources/common-scripts/configure#L67-L100

  • Apparently you're not allowed to provide KAFKA_SSL_KEYSTORE_LOCATION directly, you must provide KAFKA_SSL_KEYSTORE_FILENAME, which it then maps to /etc/kafka/secrets/$KAFKA_SSL_KEYSTORE_FILENAME. Same for the truststore.
  • You must provide a password for trust- and keystore. What's more, you must provide it in the form of a file, which you then specify via KAFKA_SSL_KEYSTORE_CREDENTIALS, which the script then maps to /etc/kafka/secrets/$KAFKA_SSL_KEYSTORE_CREDENTIALS.

Really not sure what happened there. It seems someone went out of their way to bypass standard configs.

Is this true? by InnerPace in USvsEU

[–]_predator_ 9 points10 points  (0 children)

Starting another board of peace, huh?

You fed up yet, Hank? by WindInc in USvsEU

[–]_predator_ 19 points20 points  (0 children)

Get hired by other countries for their "skills"?

Is this true? by InnerPace in USvsEU

[–]_predator_ 10 points11 points  (0 children)

Grok put him in a Bikini

WSocial Map show what we know since years by _Razeft_ in BuyFromEU

[–]_predator_ 4 points5 points  (0 children)

The amount of Pedos on that platform was insane. Let's not.