Hacker News new | ask | show | jobs
by verroq 3980 days ago
Here's my unscientific LOC count results (that I did in 5 minutes).

I've removed node_modules and bower_components from the items in: https://github.com/tastejs/todomvc/examples

I've also deleted "polymer" and "emberjs_require" since they didn't have any files in them and messes up the `wc -l`

    $ for x in *; do echo $x; wc -l `find $x/ -name '*js*' -type f | egrep -v 'test|lib|public|vendor|.bundle.js|.cache.js'`; echo; done
Results: http://pastebin.com/GqF0g3qF

Obviously one can improve the filtering to get more accurate results but you get the point. To make a TODO mvc you need at least 5+ different files and totalling a lot of lines. The fact that jQuery solution (which is very nice code, not the typical spaghetti) beats the majority of them in line count is pretty ironic.

1 comments

You included all the spec / unit test files, and in some instances you included the framework.
I've updated with `test|` in the filter now, but the point stands.
Sure, if your only metric is LOC. (Even then the majority is below 500 lines -- code style is an important factor)

Will jQuery suffice if you're creating Asana rather than todoMVC?