"spir" <denis.s...@gmail.com> wrote in message news:mailman.1709.1297810216.4748.digitalmar...@puremagic.com... > On 02/15/2011 10:45 PM, Nick Sabalausky wrote: >> "Adam Ruppe"<destructiona...@gmail.com> wrote in message >> news:ije0gi$18vo$1...@digitalmars.com... >>> Sometimes I think we should troll the users a little and make >>> a release with names like so: >>> >>> alias size_t >>> TypeUsedForArraySizes_Indexes_AndOtherRelatedTasksThatNeedAnUnsignedMachineSizeWord; >>> >>> alias ptrdiff_t >>> TypeUsedForDifferencesBetweenPointers_ThatIs_ASignedMachineSizeWordAlsoUsableForOffsets; >>> >>> alias iota lazyRangeThatGoesFromStartToFinishByTheGivenStepAmount; >>> >>> >>> Cash money says everyone would be demanding an emergency release with >>> shorter names. We'd argue for months about it... and probably settle >>> back where we started. >> >> A small software company I once worked for, Main Sequence Technologies, >> had >> their heads so far up their asses it was trivial for me to get posted on >> TheDailyWTF's Code Snippet of the Day (This company had a >> rather...interesting...way of creating their "else" clauses). >> >> One of the many "Programming 101, Chapter 1" things they had a habit of >> screwing up was "Use meaningful variable names!". Throughout the codebase >> (VB6 - yea, that tells you a lot about their level of competence), there >> were variables like "aaa", "staaa", "bbb", "stbbb", "ccc", etc. Those are >> actual names they used. (I even found a file-loading function named >> "save".) >> >> Needless to say, trying to understand the twisted codebase enough to >> actually do anything with it was...well, you can imagine. So I would try >> to >> clean things up when I could, in large part just so I could actually keep >> it >> all straight in my own mind. >> >> Anyway, to bring this all back around to what you said above, there were >> times when I understood enough about a variable to know it wasn't >> relevant >> to whatever my main task was, and therefore didn't strictly need to go >> wasting even *more* time trying to figure out what the hell the variable >> actually did. So I ended up in the habit of just renaming those variables >> to >> things like: >> >> bbb >> -> >> thisVariableNeedsAMuchMoreMeaningfulNameThan_bbb > > Did you actually type this yourself, Nick, or do you have a secret > prototype of camel-case automaton, based on an English language lexing > DFA? >
With all the coding I do, holding 'shift' between words is almost as natural to me as hitting 'space' between words. An automated english -> camel-case tool wouldn't need anything fancy though. Just toUpper() the first character after each space and then remove the spaces. I may be missing what you meant, though.