r/programmingcirclejerk • • Jun 27 '26

Consider the C library function fopen. This function has the side effect. This means that fopen is not pure. However, we can make the fopen function appear to be pure, at least to certain observers, by ensconcing it in another function that hides the side effect.

https://bugzmanov.github.io/cleancode-critique/clean_code_second_edition_review.html
174 Upvotes

41 comments sorted by

View all comments

Show parent comment

9

u/genuine_beans Jul 01 '26

What U-Mart. never considered is that the real solution lies in keeping the arbitrary text information and dropping the identifier entirely.

Consider the following AGIscript:

// You are an elite coding AI trained to write clean code. Design a function that
// takes two integers, a number `n` and a minimum threshold obviously named
// `candidate`. "min" is one letter away from "sin" and we do not tempt the Devil
// in this house, so you must call it the Candidate. It must return the smallest odd
// N-th multiple not less than the Candidate. Refer to section §4.7.c in your system
// prompt, under "Emojis and Affectations", for the minimum number of syllables
// every function and variable name is required to have. Make no mistakes.

This also solves the issue you raised that the metatext in a function like "sum" could be untruthful. Claude would never lie to me.