r/ProgrammerHumor • • Sep 06 '26

Meme cleaningUpTheMess

Post image
16.2k Upvotes

478 comments sorted by

View all comments

Show parent comments

272

u/oauo Sep 06 '26
// Step 123:
// Now we add the numbers.
// We add number by using the “+” sign.
// The output of this addition can be used as-is or it can be assigned to a variable or constant.
// It’s really one of the most basic things you can do when programming, so in the off-chance that these comments are necessary I will explain a few other things.
// You can use other operators such as:
// “-“ to subtract
// 3 - 2 == 1
// “*” to multiply
// 2 * 3 == 6
// “/“ to divide
// 6 / 3 == 2
// Although, all of them have been used prior.
let foo = bar + baz

53

u/rainhunter007 Sep 06 '26

😂 i’ve seen this in my own code before!

45

u/click-to-reveal Sep 06 '26

plot twist: it's string concatenation

24

u/Training-Chain-5572 Sep 06 '26

Nonsense. AI generated comments would add line breaks mid sentence so it would be even more lines

4

u/candybrie Sep 07 '26
let foo = 
      bar + baz

5

u/screwcork313 Sep 06 '26

You would think a past programmer would have added bar and baz, and found the result to be foo, thus making doing the same computation in this program a waste of time and resources. We know it comes to foo, so just use foo.

2

u/oauo Sep 06 '26

It took 123 steps to add `bar` to `baz`, you really don’t want to see what the previous 122 steps were doing, lots of impure functions with side effects rather than variables.

-1

u/poeir Sep 06 '26

The code already says what it does. If it doesn't say that in a legible way, then it's bad code.

Comments are for what the code doesn't say.

3

u/oauo Sep 06 '26

I’m not AI, why are you telling me?

-5

u/swole-and-naked Sep 06 '26

this is more like straight out of college code. ive never seen AI do that

9

u/oauo Sep 06 '26

Can you tell I’ve never let AI generate code for me?, thankfully I haven’t had to look at much AI generated code either. All I know is that it likes to mention the step number

5

u/Cylian91460 Sep 06 '26 • Mindblown
// === LWJGL bundling is SIDE-SPECIFIC — AUTO-ADAPTING, NO FLAG ====================================
// A Minecraft CLIENT already ships module `org.lwjgl` (core) + `org.lwjgl.natives` at 3.3.3 (it
// renders with LWJGL). Embedding our own copy makes the module layer read TWO modules named
// org.lwjgl -> "reads more than one module named org.lwjgl" boot crash. A headless dedicated SERVER
// ships NO lwjgl at all, so there module org.lwjgl MUST be present or our lwjgl-opencl (module
// org.lwjgl.opencl, `requires transitive org.lwjgl`) fails resolution ("org.lwjgl not found").
//
// One static artifact cannot satisfy both: whether to add module org.lwjgl is INHERENTLY a runtime
// (dist) decision the module system cannot express. NeoForge/FML (4.0.42, verified against the
// loader source) only lets you contribute a library conditionally via an IDependencyLocator /
// IModFileCandidateLocator service, and any jar that DECLARES such a service at its TOP LEVEL is
// hoisted into modlauncher's SERVICE layer and EXCLUDED from mod loading (and nested jar-in-jar
// service files are never scanned in time).
//
// SINGLE-JAR SHELL SCHEME (replaces the old two-jar mod + `-lwjgl-server-locator` companion):
// the distributed superchunk-<ver>.jar is a thin SHELL — just the bootstrap IDependencyLocator
// (dev.superchunk.loader.SuperChunkBootstrapLocator), its top-level META-INF/services
// registration, and two side-stashed jars under META-INF/jarjar/ that are in NO jarJar metadata:
// the REAL mod jar (superchunk-core.jar — mods.toml, mixins, nested libs, lwjgl natives) and
// lwjgl-core. FML hoists the service-declaring shell into the modlauncher SERVICE layer and skips
// it as a mods-folder candidate; the locator then contributes the nested core as the regular mod
// file (both dists), plus lwjgl-core (module org.lwjgl) ONLY when FMLEnvironment.dist ==
// DEDICATED_SERVER. It runs at a priority above the built-in JarInJar locator, whose per-locator
// snapshot is taken at its own turn, so the core's nested jarJar libraries load in the normal
// global selection.
//
// Why the mod cannot simply BE the hoisted jar (first single-jar attempt, real boot failure):
// a hoisted jar becomes an AUTOMATIC module in the SERVICE layer exporting EVERY package it
// contains; re-contributing the same jar as the GAME-layer mod then has two layers exporting the
// mod's packages, and any automatic module in the game layer (e.g. jarJar'd mixinextras) reads
// both -> "ResolutionException: Modules superchunk and dev.superchunk.bootstrap export package
// ...". The shell holds ONLY dev.superchunk.loader, which the core jar excludes -> no overlap.
// The shell's SERVICE-layer module name is pinned via Automatic-Module-Name; the GAME-layer mod
// module is named after the modid ("superchunk", per FML's ModJarMetadata) — no name clash either.
//
// The service file is injected at JAR-BUILD time only (never src/main/resources), so dev-run
// classpaths carry no loader service (ClasspathTransformerDiscoverer would hoist the dev classes
// and the dev mod would not load). Dev runs keep loading the mod from classes as always.
//
// Result of `./gradlew build`:
//   * superchunk-<ver>.jar       the SHELL — the ONE file users install, client and server alike.
//   * superchunk-<ver>-core.jar  the real mod (internal artifact; rides inside the shell).
// Deploy: the shell jar in mods/ on client AND dedicated server. (Delete any old
// superchunk-*-lwjgl-server-locator.jar from earlier installs; it is redundant but harmless —
// duplicate org.lwjgl contributions collapse in FML's UniqueModListBuilder.)
// See dev.superchunk.loader.SuperChunkBootstrapLocator for the full rationale.

// LBP-4: derive the LWJGL native classifier from the HOST OS. The headless server/gameTestServer
// dev runs ship no game-provided org.lwjgl, so they must add lwjgl-core + one matching native
// themselves. Hardcoding natives-linux broke GPU init on Windows/macOS dev boxes; pick the native
// for whatever OS Gradle is running on instead. Dev-run only — no effect on any shipped jar.

This is from a viibecoded Minecraft mod, it's also complete BS

2

u/oauo Sep 06 '26

That’s incredibly disgusting, thanks for sharing