3 ms·
For a first venture into programming, this was nicely done! One thing, I thought the definition of a "word" is something like 6 characters, so a really long wo
by steve8918 14y ago
For a first venture into programming, this was nicely done!
One thing, I thought the definition of a "word" is something like 6 characters, so a really long word could be considered 2+ "words". It seems like your definition of a word is a set of strings separated by a space. Is this intentional?
- joelrunyon 14y agoHey Steve, I'm not aware of that definition. Hmm...Would have to have a link to that definition? I guess tweak the script pretty simply if that's the case. But yes, to answer your question, this is a word count as defined by spaces between words.
- binarysolo 14y agoOff-the-cuff thoughts: is a number (say "12") a word? Is a hyphen -- used, say, like this -- a word? They count as 'em in your webapp, but I'd be curious what the official definition of word actually entails.
- joelrunyon 14y agoI think it depends on your definition, but broadly, yes, I would say most would count "12" as a word.
- anjc 14y agoI don't mean to be condescending, but you're not thinking of a 'word' as in, a 'word' in computer architecture are you? I'm pretty sure a word doesn't have to be six characters, but i could be wrong...
- GraffitiTim 14y agoYou're thinking of calculating touch typing speed in WPM, where the standard is to consider a "word" to be 5 characters.
- hnriot 14y agosince when did words of more than 6 characters become two words!!!!! That is so bizarre.
- steve8918 14y agoLOL it looks like we have a lot of pre-typewriter peeps in the house :) I'm old school, so when I learned to type, I learned it on an actual typewriter. When we had to fix mistakes, we needed to use good old fashioned liquid paper. So doing things like calculating your typing speed in words per minute was done where 5 characters was considered a "word". So when I was in school, when the teacher or prof said to hand in a 2000 word essay, it would be based on where a word was considered 5 or 6 characters, regardless of how many actual words there were. http://www.speedtypingonline.com/typing-equations http://www.speedtypingonline.com/typing-equations Interestingly, I just checked on MS Word, and they consider a word to be anything with a space inbetween, so I guess the definition has changed since the Mesozoic era!