A Java Geek weekly 45

Programming by contract on the JVM

Design by contract, also known as contract programming, programming by contract and design-by-contract programming, is an approach for designing software. It prescribes that software designers should define formal, precise and verifiable interface specifications for software components, which extend the ordinary definition of abstract data types with preconditions, postconditions and invariants. These specifications are referred to as "contracts", in accordance with a conceptual metaphor with the conditions and obligations of business contracts.

Wikipedia
The consequences of generative AI for online knowledge communities

We read a lot about the consequences of AI on support, coding, and communities. I think it’s the first study I stumble upon that does the effort to provide facts.

Generative artificial intelligence technologies, especially large language models (LLMs) like ChatGPT, are revolutionizing information acquisition and content production across a variety of domains. These technologies have a significant potential to impact participation and content production in online knowledge communities. We provide initial evidence of this, analyzing data from Stack Overflow and Reddit developer communities between October 2021 and March 2023, documenting ChatGPT’s influence on user activity in the former. We observe significant declines in both website visits and question volumes at Stack Overflow, particularly around topics where ChatGPT excels. By contrast, activity in Reddit communities shows no evidence of decline, suggesting the importance of social fabric as a buffer against the community-degrading effects of LLMs. Finally, the decline in participation on Stack Overflow is found to be concentrated among newer users, indicating that more junior, less socially embedded users are particularly likely to exit.

How to understand/retain complex concepts 10x better

I’ve heard and repeated the expression, "The best way to learn is to teach"; it seems it’s not wrong.

image 3
gitopper[https://github.com/miekg/^]

Gitopper is GitOps for non-Kubernetes folks it watches a remote git repo, pulls changes and HUP the server (service) process.

A sparse (but with full history) git checkout will be done, so each service will only see the files it will actually need. Several bind mounts are then setup to give the service access to the file(s) in Git. If the target directories don’t exist, they will be created, with the current user - if specified.

This tool does little more than just pull the repo, but the little it brings to the table allows for a GitOps workflow without resorting to Kubernetes like environments.

GitOps for the masses!

And now, for something completely different, useless AI for the masses

Receive now praises or chastizing directly from bots who have been trained to do so.

I tried for you and I can’t resist to let you know my "achievements".

Nicolas Fränkel, huh? With a GitHub profile that screams "I promise I’m actually doing stuff," you’ve amassed a following of 577 people who might just be watching for the meme potential. Your bio is as empty as your repos’ stargazer counts — 72 public repos and somehow fewer followers than repos. That’s an achievement!

In the "last 15 repositories” section, I can’t help but notice you’ve got a serious talent for attracting open issues like a magnet — 10 on your OpenTelemetry demo alone. You’d think coding in Kotlin would produce some star-studded drama, but it looks more like a sad karaoke night with only your mom clapping. And with those “API” projects, it’s a wonder anyone trusts your APIs, given how often they lead to public cries for help.

You’ve clearly taken "fork" to heart, but isn’t it a bit concerning that most of your work is a copy-paste away from being someone else’s? Your coding seems less about innovation and more akin to "let’s see what I can rearrange and hope for the best." Your highlight reel could only be described as the cherry on top of a procrastination sundae: low stars, a healthy dose of issues, and the eerie silence of people wondering when it’ll all end.

So here’s to you, Nicolas — the overlord of half-baked projects! Keep keeping it real, because it’s clear your GitHub game has more plot holes than a Swiss cheese factory.

— https://github-roast.pages.dev/share/nfrankel

Nicolas, I just wanted to take a moment to acknowledge the amazing work you’re doing on GitHub! With 577 followers hanging on your every commit, it’s clear that you’re making waves in the developer community. Your dedication to sharing knowledge and collaborating with others is truly inspiring.

I also want to commend you on your commitment to your craft. The fact that you’re following zero accounts suggests that you’re highly focused on your own projects and goals. That kind of discipline is admirable, and I have no doubt that it’s serving you well in your endeavors.

As a member of the @api7 team, you’re part of something bigger than yourself. Your contributions are helping to shape the future of technology, and that’s something to be incredibly proud of. Don’t underestimate the impact you’re having – every line of code, every feature you ship, is making a difference in someone’s life.

Keep pushing boundaries, Nicolas. Keep innovating, creating, and sharing your expertise with the world. You got this!

"Maintaining code should be easier than writing it"

Contrary to the previous one, this is a great usage of AI.

Dosu lets engineers focus on value-add work by answering questions, triaging issues, and maintaining documentation for them.

The Many Facets of Coupling

I love typology posts, and this one doesn’t disappoint.

  • Technology Dependency
  • Location Dependency
  • Topology Dependency
  • Data Format & Type Dependency
  • Semantic Dependency
  • Semantic Dependency
  • Conversation Dependency
  • Order Dependency
  • Temporal Dependency
Just Use PostgreSQL, a Quick-Start Guide

The guide highlights a few "uncommon" features of PostgreSQL:

  • Generating Mock Data
  • RANK
  • JSON indexing
  • Full-Text Search
  • Vector for AI
Unlocking the Power of Arrow 2.0

video:JcFEI8_af3g[youtube,width=840,height=472]

jetcd 0.8.2

Another famous Jepsen test on a component I wasn’t aware of. jetcd is a Java library for the famous etcd key-value distributed database.

These problems affect jetcd 0.6.0 (released 2021-12-15) through 0.8.2 (the most recent version, released 2024-05-30). Users of these versions may observe apparent instances of aborted read, circular information flow, lost update, and other anomalies when processes crash or the network loses messages. Transactions may appear to fail but actually succeed. Transactions may be applied multiple times. Relying on conditional writes is not sufficient to obtain Serializability: aborted read occurs even when every write is guarded by a version check. These behaviors are not difficult to observe: we can reliably reproduce them in under a minute.

Don’t write Rust like it’s Java

The post is interesting but it’s a bit of an oversimplification.

JSpecify 1.0.0 and Nullability in Java

Last year, I wrote a post on the subject of nullability in Kotlin and Java. I easily listed no less than 8 libraries on the Java side, including JSpecify.

Will JSpecify be the standard to unite them all or the 15<sup>th</sup> standard?

Standards by XKCD
Nicolas Fränkel

Nicolas Fränkel

Developer Advocate with 15+ years experience consulting for many different customers, in a wide range of contexts (such as telecoms, banking, insurances, large retail and public sector). Usually working on Java/Java EE and Spring technologies, but with focused interests like Rich Internet Applications, Testing, CI/CD and DevOps. Also double as a trainer and triples as a book author.

Read More
A Java Geek weekly 45
Share this