Arc Forumnew | comments | leaders | submitlogin
2 points by waterhouse 4755 days ago | link | parent

Also, to comment on my naming practices (the function I called "ass"): I have to give it a name, 'cause I intend to type it repeatedly into the REPL. However, I don't want to spend time coming up with a good descriptive name, especially since I changed my mind at least once about what the function was supposed to do while writing it. (Originally I was going to make it return the ratio [number of powers of 2 with a 0 mod 10^k] / [number of powers of 2 mod 10^k]. But then I decided to make it return the list of those two quantities, instead. Had I given it a descriptive name, I would then have had to change it.)

Therefore, the thing to do is to give it a name I can remember in the immediate future. Also it should be short, so I can type it easily. So swearwords are an obvious choice, and I use them frequently. Sometimes I also use nonsense syllables or one- or two-character abbreviations; incidentally, I favor "u" as a local variable because it's the left index finger's home key on the Dvorak keyboard (which I use).

By the time I'm actually ready to save the definition to a file for future use, usually I've settled on the final form of the function, and I give it a better name. So my source code is usually more sensical and less obscene.