14 ms·
Amount of profanity in git commit messages per programming language
- deleted 16y ago[deleted]
- jerguismi 16y agoNot statistically signifant, but interesting idea.
- tomwans 16y agoSeems that python devs are practicing the Zen of Python :-)
- deleted 16y ago[deleted]
- jasonlotito 16y agoPHP is a fine language once you understand the warts and accept the few that exist. While it's not everyone's cup of tea, what it does, it does well. Far too many people program PHP for a couple years (or not even) and proclaim it's a horrid language. Ruby is the it language, and Python is close behind. These are the Pop languages of the day. But PHP developers who are still using the language know it. They know it really well. And just consider how long PHP has been around and been popular? I think a lot of people that would whine and complain about PHP aren't doing so on gh. Instead, they are using python, rails, or other languages. The ones using PHP, however, know it, and probably aren't swearing because they are probably just writing good software.
- deleted 16y ago[deleted]
- tomwans 16y agogithub.
- rflrob 16y agoA neat idea, although I think the pie chart isn't really the right format. I'd prefer to see a bar graph, with the y-axis as (swears/million messages) or similar.
- m0hit 16y agoand please the colors. Why the two greens and two blues? Use either two colors (to differentiate alternative elements) - you would not need this if this were a bar chart (which it should be) or use 8 markedly different colors.
- snprbob86 16y agoPie chart? I have no idea how to interpret this... http://www.flickr.com/photos/amit-agarwal/3196386402/sizes/l/ http://www.flickr.com/photos/amit-agarwal/3196386402/sizes/l...
- kd0amg 16y agoNote that I ripped an equal amount of commit messages per language so the results aren't based on how many projects there are per language. I like how he had to tweak the data collection process to make the visualization method fit.
- jamn 16y agoI wouldn't call it to 'tweak' the data collection. He is simply normalizing the results to ignore the differences in language distribution. This is normal and has nothing to do with how you choose to represent it. It would have been meaningless to show any graph or table saying 'Python has the most messages with profanity" if the amount of Python projects is 80% of all the projects out there.
- waqf 16y agoHe is right to normalize the results, but parent's point is that he is wrong to do that by modifying his data collection. He should just collect as many commit messages as possible, then divide the profanity count for each language by the commit message count. Because that has lower standard error [and no more bias] than what he did.
- masklinn 16y agoThat's not the case, that's just his personal choice. He could just as well have gone with %age of swear words per commit which would have made the number of commits per language irrelevant (as long as that number was kept above statistical nonsense) and would have yield the same result.
- scott_s 16y agoThat is not the case. He wanted to compare curse words across languages independent of language popularity. If he did not collect the same amount of data per language, then he would have two variables: number of curse words and number of commits. Then there would be the danger that a more popular language would have far more curse words simply because it has far more commits.
- m0hit 16y agoInteresting. Of course I am thinking of the many ways that the results might not be representative, but that doesn't make it any less of a cool weekend project. Would be great to see some context around where the most _profanities_ occur by language, and the kind used.
- jhamburger 16y agoOne that came to mind is certain languages being more popular in english vs. non-english speaking countries.
- phamilton 16y agoMost swear words are international. Especially the F bomb.
- stcredzero 16y agoHow to offend members of 3 different programmer communities in 9 different ways with just one sentence: "It somehow makes sense that C++, Ruby, and JavaScript are all equally profane."
- deleted 16y ago[deleted]
- bad_user 16y agoOr that they are so relevant in 2011 :-)
- stcredzero 16y agoIf you think that's clever, then perhaps you're lacking a few bits of programming language history. If you think it's only partly clever, you're perhaps lacking fewer pieces. If the parent comment just makes you roll your eyes and think it's probably not worth explaining, you probably understand what I'm getting at.
- nostrademons 16y agoI'd kinda like to see which swear words appear most often in commit messages. I'm guessing that "shit" and "fuck" are much more common than "cocksucker" and "motherfucker", and if that's not true, I want to know which language has the most cocksuckers and motherfuckers.
- AndrewVos 16y agoFrom what I remember there was only one or two "motherfuckers". I will post up some more data if anyone is interested.
- catshirt 16y agoi'd say alter the list of swear words in general to a list possibly more tuned to programming. agreeing with above, word breakdown would be nice as well. actually, maybe just a github swear browser.
- taylorbuley 16y agoIf it's legal, it would be awesome of you to make this commit message dataset available on Infochimps or something.
- WalterGR 16y agoI run a slang dictionary website which lets users assign an offensiveness score to each term. That would be an interesting bit of data to add: not only the raw word count, but how offensive the swearing is for each language. (For sample data, the 100 most vulgar words on the site are in a table here: http://onlineslangdictionary.com/lists/most-vulgar-words/ http://onlineslangdictionary.com/lists/most-vulgar-words/ )
- danielsoneg 16y agoYeah, the pie chart doesn't quite cover it - I'd like to see both swear words per commit per language (if, say, Java has 10% of the swear words but 3% of the commits) and complexity of the swear words - a simple "Fuck" implies far less frustration than a "Motherfucking Cocksucker!" Could develop quite a nice Programming Language Pain Index…
- deleted 16y ago[deleted]
- twymer 16y agoGiven that there were only 210 total swear words, the accuracy of this seems pretty questionable. It's possible that one guy could be responsible for a large percentage of swearing for a given language.
- pyrhho 16y ago> It's possible that one guy could be responsible for a large percentage of swearing for a given language. Sorry, Ruby!
- deleted 16y ago[deleted]
- rosser 16y agoIt's code comments vs. commit messages, but the prevalence of profanity in the Linux kernel tree suggests developers' use of blue speech is pretty widespread.
- cfontes 16y agoIs it ok statistically to get for example all Ruby commits and 25% of C++ ones and compare them ? Another kind of chart would be nice... also some other params.
- jhamburger 16y agoWhy not? As long as the sample is random and equal in size.
- mrcharles 16y agoThis would be more interesting if it scanned comments from source files for profanity.
- cookiecaper 16y agoThis is per commit message, which is mandatory in git, not occurrences inside the source of the project. Perhaps PHP and Python has fewer occurrences because the employers of people that use Python or PHP are less likely to tolerate inappropriate language in the code.
- chrismetcalf 16y agoRelevant: https://gist.github.com/198320 https://gist.github.com/198320 A one-liner I wrote that uses git blame to seek out who swears the most in a given codebase. Pretty fun.
- antihero 16y agoWhen I ran it just said "5" :S
- jxcole 16y agoThis is an example of bad poor graphical representation. The proper way to do this would be to take the swear words per word for each language and then map this to a bar graph, then you could easily see which has the highest vs the lowest. A pie chart is good for things that add to 100%. The number of swear words that occur in something is not appropriate for this type of graphic.
- daeken 16y agoConsidering that there were an equal number of commit messages for each language, this is a perfectly adequate representation. In this case, the pie chart's total is the number of swears, with each slice representing a language's share of that.
- alanh 16y agoYou’re entirely correct, except for this: The pie chart applies here because the author made no attempt to correlate number of profane commits with number of commits, total, per language. This post means literally nothing, so he could use whatever graph he damn well felt like. This is not HN worthy.
- deleted 16y ago[deleted]
- jefe78 16y agoWell played! I wonder if this has anything to do with: http://news.ycombinator.com/item?id=2247962 http://news.ycombinator.com/item?id=2247962 I know I plan to comment my python code a little differently now! Maybe that will help balance the numbers? I know I'd be pretty vulgar if I programmed in C++/Javascript all day!
- michaelschade 16y agoEven ignoring that which other commenters have pointed out, I simply don't buy it for one reason: that PHP slice is way too small.
- AndrewVos 16y agoYeah it's oddly disturbing. My thoughts are that they just don't care that much about life anymore to swear in their commits?
- jasonlotito 16y ago> Yeah it's oddly disturbing. My thoughts are that they just don't care that much about life anymore to swear in their commits? Or maybe we're all just mature enough to realise swearing in comments is stupid, and trying to read anything from it is equally stupid?
- soneil 16y agoIt'd be interesting to see the original dataset. At the risk of stereotyping, what's the chances php programmers simply don't leave useful commits? (and perl programmers don't leave anything parsable ..)
- tudorizer 16y agoHmm, what's the % of PHP code on github?
- code_duck 16y agoThis goes along with my observations, having read a lot of PHP code. There's a certain level of professionalism in PHP projects, believe it or not, that is different from what you see in Ruby, Python, C++, etc. The difference? Many PHP programmers are not really hackers, they're just trying to get something done. They're not programming for the joy of it, for the most part, they're just trying to get some plug-in done for a CMS for some client. The code and comments often end up structured and informational, in a Java kind of way.
- deleted 16y ago[deleted]
- JCB_K 16y agoNext time they do a test they should include "git". Let's see what happens.
- r00k 16y agoI wrote a post on my blog 4 years ago (!) with lots of examples of profanity in code comments. It took a half-hour to write and has consistently gotten more traffic than the rest of my blog. Ah well, give the people what they want: http://codeulate.com/2007/12/fcking-programming/ http://codeulate.com/2007/12/fcking-programming/
- JonnieCache 16y agoTo be fair, some of those are hysterical. In particular: # no, no, no, no, no, no, no, no # no. fuck no. I am a fucking # moron. I think it's the punctuation. It's like angry japanese poetry.
- yxhuvud 16y agoMy favourite that I have seen in a codebase is # This is hideous # I want to poke my eyes out with a fork!
- PonyGumbo 16y agoI'm completely stunned that PHP is on the bottom here.
- deleted 16y ago[deleted]
- jasonlotito 16y agoOr maybe they don't curse as much?
- deleted 16y ago[deleted]
- jasonlotito 16y agoTrue. Though, I wonder why Ruby programmers are immature and careless? Stereotyping is fun!
- joblessjunkie 16y agoThere is not much PHP on Github. It's the same reason there is no profanity it FORTRAN or COBOL in this graph. The author makes a terrible mistake: he does not normalize the graph relative to the total amount of code in each language. There's a lot of Ruby on Github, which is why you can find plenty of Ruby profanity. The graph is just about useless without this normalization.
- csphy 16y agoI want to know the proximity of the curse to 'IE' in the Javascript commits
- kunley 16y agoGo Ruby go!! ;D
- boctor 16y agoNo Objective-C love for the iPhone/iPad crowd?
- tudorizer 16y ago"Shit, I missed a ]"
- davidw 16y agoHah, maybe I should add that to http://langpop.com http://langpop.com - are you interested, Andrew?
- khingebjerg 16y agoThe commit messages. https://github.com/AndrewVos/github-statistics/blob/master/profanity.yml https://github.com/AndrewVos/github-statistics/blob/master/p...
- edw519 16y agoOut of 929857 commit messages, I found 210 swear words (using George Carlin's Seven dirty words). That set only includes [shit, piss, fuck, cunt, cocksucker, motherfucker, tits], so these are probably not meaningful results. I have personality commented "asshole forgot to increment the counter" 527 times in 4 different languages. [EDIT: 528 times in 5 different languages. Sorry, bitches.]
- ZachPruckowski 16y agoYeah, any viable list of swear words has to include "damn" (and derivatives), "hell", and "ass" (and derivatives). I'd even go so far as to say that "crap" and "retard" (and derivatives) are sufficiently unprofessional that they belong on the list.
- reinhardt 16y agoAdd "wtf" to this list and you match more than 50% of all commit messages ;-)
- cema 16y agoOh no, wtf is professional terminology, cannot remove.
- JonnieCache 16y agoAlso was fuck searched as a word on its own? Because if you include compound words with fuck you are going to catch a long tail of interesting profanity, especially amongst programmers. You'd want to whitelist against the Scunthorpe Problem though.
- rayval 16y agoAnd if one goes that far, one would have to include variant spellings, because in the heat of the moment of cursing an opaque or broken piece of code, a programmer is likely to froth at the keyboard.
- 16y ago
- jrockway 16y agoNo Perl? I fucking swear all the time...
- JustinSeriously 16y agoI ran it for Javascript, Ruby, and Perl, and I got this: {"JavaScript"=>48, "Ruby"=>46, "Perl"=>28}
- sisk 16y ago"... ripped an equal amount of commit messages per language ..." 929857 commit messages. 8 languages. 929857/8 = 116,232.125 o_O
- dcdan 16y agoNumbers of committers sampled per language might be helpful in identifying potential bias.
- damoncali 16y agoMy favorite: - fuck it. let's release
- mgrouchy 16y agoI'm surprised there are so few commit messages with curse words in them. 210 out of 929857, thats like 0.02%, I would have thought that developers were more vulgar then that(I know I am). Maybe if we looks at comments in source code we would get a better representation of the vulgarness of developers.
- edge17 16y agoi'd like to see this same comparison, except comparing different version control systems
- mcarlin 16y agoSample size is too fucking small. Also, as others have pointed out, you've allowed far too few swearwords. Good job though :-)
- dustingetz 16y agohow about 'chainsaw'?
- jakevoytko 16y agoI never curse in my commit messages. That doesn't mean I don't want to! Cursing is a vice of mine, acquired through summers of cleaning bathrooms and picking up trash at a state park in high school. I use euphamisms when coding professionally, but it's easy to map my commit messages at old companies back to my original swear. "Blameless" bug: Original: Now recalculates the height of the container element after repopulating the content. Translation: Did Bob test this fucking thing ONCE before he committed this? Fixing my own mistake: Original: Tweaks the NUM_PATHS config value. Translation: Wow, I apparently have shit-for-brains. I hope nobody ran a build in the past 20 minutes. Overdesigning: Original: Updates the object creation code per Bob's feedback. Translation: Another Goddamn FactoryFactoryBuilder?! I officially don't understand this codebase. Major cleanup needed: Original: Style tweaks needed for GCC compilation. Translation: OMFG. This isn't even valid C++. It doesn't even compile. OK, I'm not perfect: Original: Fuck IE7. Translation: No seriously, fuck IE7.
- jcw 16y agoYeah, this is funny, there is novelty here, etc. A story counting profanities in source code/commits/etc. pops up every now and then. I've found that the only real profanity in a source code comment is "HACK". My swear jar overflows with quarters.
- mleonhard 16y agoPerl might beat C++ if it was included.
- billybob 16y agoOne might assume that more profanity in a langage = more frustration with that language. But I'd bet that proportion of business use has something to do with it, too. If you're hacking on a personal project, you might feel freer to swear in your commits. And my guess is that you're more likely to code Ruby for personal projects than C#. But I could be wrong.