Earlier quoted context omitted.
How so?
I'm guessing they're referring to linguistic features that English doesn't have, such as inflected nouns to unambiguously indicate the subject, direct object and indirect objects. `bite(dog, man)` is ambiguous. You need to look up the function documentation, make a guess, or ask the library developer to come up with a less ambiguous name. If you could decline your variables, however, you could write (in terrible fake…
Codem Ipsum: Lorem Ipsum but for Code
31–35 of 35 posts
Re: Codem Ipsum: Lorem Ipsum but for Code
#32Re: Codem Ipsum: Lorem Ipsum but for Code
#33Earlier quoted context omitted.
I'm guessing they're referring to linguistic features that English doesn't have, such as inflected nouns to unambiguously indicate the subject, direct object and indirect objects. `bite(dog, man)` is ambiguous. You need to look up the function documentation, make a guess, or ask the library developer to come up with a less ambiguous name. If you could decline your variables, however, you could write (in terrible fake…
It might just be me, but isn't that just how you name your attributes within the function definition? I don't see how that would help disambiguate without have to look at the function definition at the very least.
So if you wrote a library with the verb "bite", you wouldn't specify that the first bites the second, or the first was bitten by the second. Those are ambiguous, because they're you're choice as a developer. Rather, you'd specify that the noun in the subject case bites the noun in the object case. That's unambigious in all declined languages.
So, as a reader of someone else's code, I can see immediately that `bite(boy-um, dog)` -- in my fake Latin where "um" denotes the object (cf. "Puer - Puerum") -- that the boy was bitten by the dog. I don't need to look up any documentation or look at how the variables are named in a third-party library.
Again, of course this case is a toy example. The article is more in-depth.
Re: Codem Ipsum: Lorem Ipsum but for Code
#34Earlier quoted context omitted.
How so?
I'm guessing they're referring to linguistic features that English doesn't have, such as inflected nouns to unambiguously indicate the subject, direct object and indirect objects. `bite(dog, man)` is ambiguous. You need to look up the function documentation, make a guess, or ask the library developer to come up with a less ambiguous name. If you could decline your variables, however, you could write (in terrible fake…
Re: Codem Ipsum: Lorem Ipsum but for Code
#35The name is kind of misleading. I expected it to generate random lines of code, instead of just replacing identifiers with lorem ipsum.
Same thought here. I thought something along the lines of hackertyper. Something that looks like real code, but isn't.
Hackertyper is absolutely using real code.
Specifically, it's using groups.c from the Linux kernel:
https://github.com/torvalds/linux/blob/master/kernel/groups....
Compare that to the code used by Hackertyper: