Settings

Theme

Language complexity, measured by how many rules GitHub's .gitignore has

gist.github.com

104 points by acidflask 10 years ago · 49 comments

Reader

dietrichepp 10 years ago

I love these metrics that are 99% meaningless but you still want to know how your language compares. Like average identifier length, source tree directory depth, etc.

  • sdesol 10 years ago

    If you are into novelty metrics, you might find the following interesting:

    http://imgur.com/a/xhxtm

    It shows how actively the gitignore files are modified.

    • cloverich 10 years ago

      "Novelty Metrics" -- I kind of want to put that on my resume just to see what happens with it. Or, I could imagine an entertaining blog existing solely based on that premise.

  • acidflaskOP 10 years ago

    Making people think is my favorite part of my job. :)

    • pvg 10 years ago

      Many of these categories are not 'languages' making it hard to make any conclusions beside 'people working with Joomla or VS seem to have some gigantic .gitignore template'.

      • k__ 10 years ago

        too much code generators?

        • emodendroket 10 years ago

          Typically you'd check in generated code; you'd exclude packages, compiled code, certain kinds of configuration and logs, etc.

          • hawaiianbrah 10 years ago

            Do you typically check in generated code? I think it depends on a lot of things. My understanding is the general rule of thumb is NOT to, except for certain cases (generation takes a long time, for instance)

            • emodendroket 10 years ago

              Well, in the VS world generated code is typically generated once and open to modification post-generation, so yes.

mpermar 10 years ago

A more accurate way imho to see this data is: "Tooling support, measured by how many rules GitHub's .gitignore has"

  • ChemicalWarfare 10 years ago

    exactly. tooling and framework config files. for 'pre-compiled' languages also build dirs but that doesn't necessarily mean the language is more complex.

czardoz 10 years ago

This measures the number of rules in .gitignore files, not language complexity.

  • deathanatos 10 years ago

    In Github's .gitignore template, too.

    For example, most of the entries in the Python one are utterly inane, and won't apply to your project. You can easily trim that file to 1/5 it's size. It includes the ignores for a bunch of directories I've never see any project ever have, two unit test frameworks, two web frameworks, pip's files that are already better covered by virtualenv ignores, four different ways of naming your virtualenvs…

    This isn't measuring language complexity; this is someone trying to pre-cover any potential case generated by any popular-today third party library.

    • danielbarla 10 years ago

      The visual studio one seems to cover just about every way you could use VS, and every plugin made for it. This measurement comments more on the neatness of the IDE(s) than any kind of language complexity.

      • paulirwin 10 years ago

        Agreed. VS supports dozens of languages across web, desktop, mobile, etc. C#, VB, F#, C, C++, JavaScript, T-SQL, Python... and that's just what I can list off the top of my head. Even with single languages in the list it's not apples-to-apples. "Language complexity" should be removed from the link title.

  • ludamad 10 years ago

    "Build tool complexity" seems less reaching

    • ygra 10 years ago

      It also probably depends on what development tools people use. If everyone on the project uses a different IDE that's different patterns for each of them, but they all have to be in the ignore file.

      • maze-le 10 years ago

        Well, that is what a global gitignore file [1] is all about. Entries specific for your working environment (IDE-files) should be defined in your global gitignore, while everything project-specific (object files, build-directory etc.) should be in the project-gitignore.

        [1] git config-option: --global core.excludesfile

      • majewsky 10 years ago

        Not really. That should be put in ~/.gitignore, e.g. I ignore Vim swap files there so I don't have to do it in every single repo.

  • kqr 10 years ago

    Elaboration: the number of rules in .gitignore files scale pretty linearly with the number of options you have for tooling. If there are lots of tools that work with your language, your .gitignore template will be big. If there is only one or a few tools, your .gitignore template will be small.

    Whether or not "language complexity" correlates with "number of options for tooling" is left as an exercise for the reader. Personally, I think there's an argument to be made for popular languages having more tooling options...

SeriousM 10 years ago

Oh my dear... That's so pointless... It's like judging your intelect depending on the amount you dump every day.

MAGZine 10 years ago

Interesting, though especially for the entries in the list that are frameworks, you could conceivably just bury all of the ugly stuff in a `framework` folder, and have only one ignore.

  • zamalek 10 years ago

    Visual Studio seems to be moving in this direction: I've noticed a .vs folder and the .suo seems to live in it for now. I guess more and more will be moved into it as time goes on, but considering the .gitignore contains VS6 ignores we'll probably be stuck with the large file forever.

  • codeflo 10 years ago

    And in a lot of ways, that would be an improvement to randomly dumping files all over the source tree.

KingMob 10 years ago

I'm not at all surprised Magento is number 3. I've never seen anything so simultaneously overly- and poorly-engineered.

It's like someone combined the worst parts of 10-year-old Java (XML configurations over conventions, AbstractEntityBeanFactory-style classes) and PHP (no namespace, autoloading override plugins) into one awful mess. Throw in the use of EAV everywhere, and the "schema" is a nightmare to decipher.

Maybe version 2 fixes some of these issues, but Magento 1.x is awful.

  • DCoder 10 years ago

    Magento 2 fixes the "no namespace" issue. Everything else is still there, and some parts are taken to eleven.

    A while ago, I ran PHPStorm's code inspections against Magento 1.x core code, and the result wasn't very encouraging: https://imgur.com/RMxWEgR

ramenmeal 10 years ago

TIL visual studio is a language.

  • jsight 10 years ago

    Also, Java is an incredibly simple language.

  • Luyt 10 years ago

    Yeah... Qt and Rails are in the list too. And is Symfony a language, too?

  • koder2016 10 years ago

    Most developers don't know the difference between IDE, language, library, framework, platform and technology.

    • Luyt 10 years ago

      You got downvoted for your sarcasm, but you have a point. Some people think that Ruby classes are instantiated using the create method.

pmontra 10 years ago

Ruby 25 and Rails 23, really? I'd expected the opposite. Looking at them, half of the files makes sense, the other half is really project and dev env dependent and they don't seem to be made for the same environment. Hardly comparable.

https://github.com/github/gitignore/blob/master/Ruby.gitigno...

https://github.com/github/gitignore/blob/master/Rails.gitign...

  • krzrak 10 years ago

    > Ruby 25 and Rails 23, really? I'd expected the opposite. Is there really a difference between 25 and 23?

HugoDaniel 10 years ago

Why no JavaScript ?

  • bad_user 10 years ago

    Here you go:

         *.js
  • petetnt 10 years ago

    There's really no common patterns of just plain JavaScript files being ignored (to some extend, other cases are mostly covered by the `node` file).

    • vorg 10 years ago

      Looks like a similar situation with Apache Groovy. Only "grails" and "gradle" are in there.

oneloop 10 years ago

What a useless exercise. It seems to me that we're seeming more and more of these irrelevant posts hitting the front page.

  • GFK_of_xmaspast 10 years ago

    Be the change you want to see in this forum.

    • emodendroket 10 years ago

      How do you propose he prevents inane content from being upvoted by others?

      • GFK_of_xmaspast 10 years ago

        If oneloop doesn't like the submissions that have been made, oneloop (who appears to have submitted a total of "2" links in their posting history) should submit more of the kind of things they feel is appropriate.

        • oneloop 10 years ago

          Sure, if everyone submitted lots of good stuff it would be less likely that we'd see this garbage on the front page. But for me individually to make a difference I would have to come up with insane amounts of stuff myself. I don't have time for that. If I find good stuff sure, I'll share it. But if you're suggesting that I should spend more of my time looking for good stuff around the web for the sole purpose of helping out the quality of an aggregator website, you got another thing coming.

leecarraher 10 years ago

at least it has a nice power-law distribution. otherwise pretty useless...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection