News for hackers. Stuff that matters.
Re:Most used words in programming languages by Walkman on Friday January 20, 2017 @07:35AM (#13443337)
One can make very interesting conclusions based on purely this. Examples:

- Python developers does not follow Clean Code (ala Uncle Bob) as much as Ruby , because if statement is more frequent than def and return.

- Ruby makes it possible to write in a much more functional style than Python. OR Ruby developers like to develop more in a functional style than Python developers.

- People don't really care about good variable names ("a" is a terrible variable name in scripting languages like JS and Python, still top 11)

- PHP developers might practice "return early" in functions (more return than function keywords) OR their functions just do too much :)

Re:Most used words in programming languages by brak1 on Friday January 20, 2017 @07:40AM (#13443358)
'a', 'the' etc seem to be from comments, not 'actual' code

(click them and you can see examples of how each word is being used)

Re:Most used words in programming languages by dagw on Friday January 20, 2017 @07:42AM (#13443371)
- Ruby makes it possible to write in a much more functional style than Python. OR Ruby developers like to develop more in a functional style than Python developers.

I instinctively think you might be right (at least with your second statement), but what are you using as your metric here?

Re:Most used words in programming languages by smnplk on Friday January 20, 2017 @10:52AM (#13444639)
I am not sure if ruby devs like to do much functional style, the parent mentioned Uncle Bob and his influence on Ruby community with Clean coders. I think they are more into OO.
Re:Most used words in programming languages by drivebyops on Friday January 20, 2017 @07:41AM (#13443365)
Well Python also doesn't have a Match/switch flow. So that would bump ifs up
Re:Most used words in programming languages by giancarlostoro on Friday January 20, 2017 @07:45AM (#13443390)
This and the fact that the page doesn't filter out comments which may affect results as well.
Re:Most used words in programming languages by masklinn on Friday January 20, 2017 @07:56AM (#13443431)
> One can make very interesting conclusions based on purely this.

With a large grain of salt

1. generally, the thing seems to mix words from all context, for instance #6 in Ruby is "should", click on the word and it's mostly comments, same for Rust's #4 "the".

2. "if __name__ == '__main__'" (seriously, TFA counts >600k of those)

3. also unclear what codebases are parsed, lots of django-isms in the conditional examples (if context is None, if request.method == 'POST', if form.is_valid)

See also: Go, where most every function call requires an `if`

> - Ruby makes it possible to write in a much more functional style than Python. OR Ruby developers like to develop more in a functional style than Python developers.

Don't confuse writing more functions/methods and writing in a more functional style, they're very different things.

Re:Most used words in programming languages by pmontra on Friday January 20, 2017 @08:01AM (#13443462)
Yep, the tool should skip strings and comments.
Re:Most used words in programming languages by masklinn on Friday January 20, 2017 @08:10AM (#13443509)
Or provide for classification/filtering.

Comparing word clouds of comments would actually be interesting. But then you hit the issue of "what is a comment" e.g. many language use comments for item documentation, but python uses (doc)strings.