Show HN: WordCount.is
wordcount.is
wordcount.is
I use evernote or textedit to write a lot posts or guest post and there's not always a quick way to check word count before I send them off. In addition, a lot of wordcount sites out there were ugly, hard to use or filled with ads.
I know it fills a really, really small niche need, but I was pretty happy I could put it together in a few hours, solve a small problem and learn something about programming at the same time.
Now, to move on to bigger projects!
Personally I feel as though the gray box explaining what the page is, is taking up most of the page. Any way to make it smaller? This way I feel as though it would remove any scroll bars on the page and prominently show your "WordCount.is is a useful web utility by Joel Runyon"
Other then that, page looks clean and is simple to use.
Went back through and cleaned things up. Thanks for the suggestion!
- Would definitely recommend rethinking the header/banner area. Takes up a lot of vertical space and seems unnecessary for such a simple tool.
- You're loading jQuery twice. Recommend removing that second version (line 14).
- http://wordcount.is/js/jquery.center.js is returning 404 and doesn't seem needed (line 12).
- It's best practice to cache your selectors for re-use in jQuery. Here's a slight rewrite that does that and cleans up your event binding: https://gist.github.com/3764620
Happy hacking!
I went ahead and implemented all of your suggestions (I think). Seems to be a little bit faster! Thanks.
I've gone ahead and implemented several of the suggestions. You can check it out here --> http://wordcount.is
Thanks again for the support and programming help!
Sales shot up 30%.
It turns out that a number of people who write for a living need to hit hard word count limits, and were willing to pay for a product that had that feature.
The dev I know who added the feature said he spent all of 15 minutes on it.
var wordCount = value.trim().split(/\s+/).length
Additionally, JavaScript's regex dialect has a special character of "\W", which matches any non-word character. So if you split on "\W+" instead, you ought to get a more reliable list of words, eliminating cases like "foo -- bar" counting as 3 words.Thanks for the tips.
Different word counting programs may give varying results,
depending on the definition of "word", on the text segmentation
algorithms, and on whether words outside the main text such as
footnotes or hidden text are counted. [1]
Anyway it seems a consensus to say that "foo -- bar" is 3 words long, so wordcount.is does give a not so wrong answer after all.However, when I tried to implement the \W, it gave me a very different count. When I checked it against Microsoft's Word's count for block of lorem ipsum text, the original function matched it exactly. Any thoughts as to what happened?
Evernote is one of the rare programs that's very much inferior on the Mac, as the Windows version DOES have a word count feature. I'm really not sure why the team can't include it on the Mac version.
I love Evernote, but this is one of the minor details that could be improved.
This seems useful for people who 1) are not programmers, and 2) either are running a browser where there is no such extension, aren't interested in installing extensions, or have a one-off need.
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?
But yes, to answer your question, this is a word count as defined by spaces between words.
That is so bizarre.
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
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!
It took me a few hours and taught me a little about programming. I view it much more as a stepping stone to understanding development and programming than as a full-time business project.
Plus, while I know about GitHub, I haven't really spent too much time on it to really know how it works.
I'm truly not trying to discourage and probably sound like a grumpy old man but I just don't think the OP needed to post something so simple here.
In the meantime, it was fun to be able to solve a problem I had by learning something I didn't know before.
*Thanks for the downvotes too...