Github stars are no more a valid metric for picking a Go library

xuanbao · · 226 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I just saw <a href="https://github.com/gernest/utron">this non-idomatic mvc web framework</a> on <a href="https://github.com/avelino/awesome-go">awesome-go</a>, the initial commit: 1 <del>month</del> year ago, github stars: 1.7k.</p> <p>Most of much much older idiomatic web libraries in the same list are below 1k stars.</p> <p>Why should you care about this? Because Go has no central package system. How is that linked to this? Consider Ruby, when I see a Ruby project with many stars, I have a suspicion that the guy behind the project is an excellent marketer, with a crappy product. He goes to conferences, gives talks, collects github stars, you get the idea. The same strategy has worked for some Go projects, like Martini.</p> <p>But in the Ruby case, I can go to rubygems.org, see how many times the gem has been downloaded, how many other gems depend on it, and make a decision about how many people <em>actually</em> use the gem, instead of github-starring it at the cheap expense of a click.</p> <p>With github stars being so noisy recently (there was another &#39;web framework&#39; project having a similar story), I&#39;m not sure anymore how to evaluate Go dependencies.</p> <h2><strong>EDIT</strong></h2> <p>Just to clarify that this post is not about witch hunting a specific project. The point I&#39;m trying to make is that, there is a noticeable number of popular web library/framework Go projects which do not follow idiomatic Go. This could arguably be an anomaly specific to Go.</p> <p>While Go ticks many boxes for building web apps, it intentionally lacks features that unintentionally make building web apps difficult. But then again the good parts of Go are tempting enough for many developers to not mind abusing the language.</p> <p>I think this need in the web app community resembles the need for a package manager (which is officially unanswered, but finally some steps are being taken), and it deserves to be addressed. I&#39;m not saying Go needs generics, I do not have the solution for this, I&#39;m just trying to state a problem here.</p> <hr/>**评论:**<br/><br/>mgutz: <pre><p>A lot of folks use github stars as bookmarks of interest.</p></pre>Fatal510: <pre><p>Isn&#39;t that exactly what the stars are for?</p></pre>thewhitetulip: <pre><p>yes, stars means bookmarks according to Github&#39;s docs (link was there on the iris thread)</p></pre>bonekeeper: <pre><p>I do that, if I see something interesting that I might use in the future I star it, so I can come back in the future and look at my starred projects to find that component.</p></pre>Yojihito: <pre><p>Afaik thats what the stars are made for.</p></pre>PaluMacil: <pre><p>Yeah, I don&#39;t usually notice much how many stars something has. Most things I star are because I&#39;m researching something fairly specific and think I&#39;ll want to find it again more easily.</p></pre>supertopher: <pre><p>I&#39;m guilty of this as well. Does GitHub have a book mark system I&#39;m unaware of? Maybe I&#39;ll start trying to put all repositories I&#39;m interested in checking out later when I have time in Org.</p></pre>jeremiahs_bullfrog: <pre><p>Well, your browser has a bookmark feature, and if I&#39;m actually interested in a project, I watch it. When I get annoyed about seeing issues and PRs, I know I don&#39;t care about the project anymore so I stop watching.</p> <p>This system has the benefit of periodically reminding me about projects that actually have activity from outside the project.</p></pre>thewhitetulip: <pre><p>It is a pain to have bookmarks in the browser, do you have a nice browser extension for managing bookmarks?</p></pre>jeremiahs_bullfrog: <pre><p>Uh, my browser does a Perry good job. To save a bookmark, I click the star. To find a bookmark, I hit ctrl-b and start typing. It&#39;s really not complicated.</p> <p>I like using my &#34;watch&#34; method better because it reminds me occasionally about a project. I don&#39;t read my feed that often on github, so it works for me.</p> <p>I really wish stars were used for marking worthwhile repositories, because then seeing that number would actually mean something. Right now, it only means that some number of people found it relevant to a problem they were having, which isn&#39;t nearly as useful.</p></pre>ivosaurus: <pre><p>The stars <em>are</em> the bookmark system</p></pre>gernest_: <pre><p>Author of utron here.</p> <p>I would like to say a few things. </p> <p>Using utron as an example of un idiomatic Go is breaking my heart. I have been writing Go since I created the github account. And for any Go coder who will read the utron source code will see how hard I tried to make it idiomatic to the best of my knowledge. I have a long list of Go projects <a href="https://github.com/gernest"> on my github</a> that will at least say I know what idiomatic Go look like.</p> <p>I have a feeling, the OP didn&#39;t even take some time to read the source code.</p> <p>It makes sense that there are no package importing utron. This is because anyone using utron is building application and not packages. Adding a commandline application to godoc? </p> <p>Did he even take some time to see the quality of the projects used by utron? </p> <p>I will be more than happy to answer anything that made the OP feel like the good people who stared the project didn&#39;t know what they were doing.</p></pre>rabinito: <pre><p>It&#39;s easier to come and bitch on reddit with a self found sense of superiority than to read your code. Or god forbid, create something of value and share it with the world for free.</p> <p>Don&#39;t sweat it. You&#39;re doing alright.</p></pre>tscs37: <pre><p>Github Stars only tell you how many devs told themselves &#34;this looks interesting, I might come back to it&#34;.</p> <p>Maybe some do it otherwise and genuinely select good quality projects for their stars.</p> <p>But I doubt the majority does.</p> <p>I suggest to measure the metric of a project as following:</p> <p>A) How is the issue turnaround? If I have a problem, how long does it take to solve?</p> <p>B) When was the last commit? How active is the project? How does this relate to the scope of the project?</p> <p>(This relates mostly to projects which don&#39;t need a huge turnaround or don&#39;t require much maintance or on the otherhand do require maintenance; ie IMAP library vs Gogs)</p> <p>C) Is it bus-proof? Ie, if the main contributor is killed by a bus, is that dev the single point of failure in the project?</p> <p>D) How fun is it? This can easily be measured by how many other projects use it and depend on it.</p></pre>Hexodam: <pre><p>The issue count is in my opinion the best indicator of project activity.</p></pre>tscs37: <pre><p>It depends. A low quality and activity project won&#39;t have many issues and a high activity high quality project won&#39;t have many issues either.</p></pre>Lord_NShYH: <pre><p>You can browse through the closed issues. Great software usually has a rich development history.</p></pre>tscs37: <pre><p>well yes, but there might not be many issues to begin with.</p> <p>IMO the issue count alone is not a definite indicator. You need to factor in other variables too to get a clearer picture.</p></pre>TheOnlyMrYeah: <pre><p>But a low quality project will have some very old open issues.</p></pre>tscs37: <pre><p>I&#39;ve seen very old open issues on good quality projects, sometimes resolved, sometimes dropped because outdated, it happens.</p> <p>It&#39;s not a good and failfree indicator either.</p> <p>Looking only at issues is a bad way to value a project, look at issues <strong>and</strong> other things that give you an idea of the projects nature and ecosystem.</p></pre>Sphax: <pre><p>First, utron is way older than 1 month, first commit is september 2015.</p> <p>Second, to evaluate Go projects you do it like any sane person, you look at the API exposed and maybe the code, then you test it. </p> <p>Relying on download counters is just as stupid as relying on stars, it gives you no indication whatsoever on the quality of a project.</p></pre>m3wm3wm3wm: <pre><p>Thanks, corrected.</p> <p>Download counts in central package managers are proportional to the number of other packages using this package. Not ideal, but you cannot find many quantitative metrics.</p></pre>placeybordeaux: <pre><p>It&#39;s pretty far from ideal...</p></pre>fatcatthebrat: <pre><p>it&#39;s probably only me, but I tend to avoid all these awesome-* curated list of great unicorn github repos, even if a project has lots of stars doesn&#39;t mean it&#39;s good code</p></pre>aaaqqq: <pre><p>Godoc can give you a rough-ish idea: <a href="https://godoc.org/github.com/gernest/utron?importers">https://godoc.org/github.com/gernest/utron?importers</a></p> <p><a href="https://godoc.org/github.com/pkg/errors?importers">https://godoc.org/github.com/pkg/errors?importers</a></p></pre>cezarsa: <pre><p>Didn&#39;t know that, thanks for sharing.</p> <p>Edit: After further thought, I think a browser extension/userscript showing the number of importers on the github page would be really nice. Maybe I&#39;ll give it a try later.</p></pre>HectorJ: <pre><p>Paging the Sourcegraph guys. Could be a nice addition to an already awesome extension.</p> <p><a href="/u/sqs" rel="nofollow">/u/sqs</a></p></pre>SolFlorus: <pre><p>Some metrics I use when comparing similar libraries:</p> <p>How good is the documentation?</p> <p>How many closed issues are there?</p> <p>How many contributors?</p> <p>Does there appear to be a good amount of tests?</p> <p>What is the tone that contributors use in issues that they deem to be poorly thought out?</p></pre>go255: <pre><p>Good points. I would also like to add:</p> <p>How long ago was the last commit made (is it unmaintained)?</p></pre>ratatask: <pre><p>Why are you just claiming it is non-idiomatic, and not explaining what/why ? Are you sure you are correct ? Or that it even matters ?</p></pre>kortemy: <pre><p>In my honest opinion, people like to open source what they are working on, and 90% of the time, it&#39;s just means to learning. If some package/library gets some traction, so be it.</p> <p>And you, and everybody else, who notices non-idiomatic code that could be improved, make a pull request. That&#39;s what open source is for. For everyone to contribute. That would in fact make the popular project better, and then the start count would make sense.</p> <p>Witch hunting and claiming &#34;stars aren&#39;t valid metric&#34; is not helping.</p> <p>Just my two cents.</p></pre>ab_coder: <pre><p>I&#39;ll admit I&#39;m a bit dense about this and I&#39;d appreciate if someone can someone explain to me why &#34;unidiomatic&#34; code is bad? Is there a performance or security risk in it being &#34;unidiomatic&#34; or is it purely a style thing? From what I&#39;ve seen online it suggests to me it&#39;s more the latter, but if that&#39;s the case I don&#39;t understand what the big deal is..</p></pre>sboyette2: <pre><p>It&#39;s a shibboleth. All human social groups have them, and they serve largely the same purpose in all cases. In computing, this particular shibboleth is less about exclusion and security, and more about a general sense of trustworthiness and/or giving-a-damn.</p> <p>All coding communities have idiomatic styles, whether they are explicitly stated (like Python&#39;s PEP 8), or entirely implicit, or somewhere in between.</p> <p>Everyone has little idiosyncracies, and no one agrees with every little thing about a community&#39;s idiomatic style, but if you care about being part of the community then you get over yourself and follow along.</p> <p>When someone <em>doesn&#39;t</em> do that, and writes something in a wildly different style, it shows that they are either <em>unaware of</em> the de facto/de jure community standards, or that they <em>don&#39;t care</em> about those standards. So when you&#39;re looking at unidiomatic code, you&#39;re looking at code written by someone who either:</p> <ul> <li>Hasn&#39;t yet learned enough about the language to realize they&#39;re not writing code the way the community expects, or</li> <li>Believes that writing code &#34;their way&#34; is more important than writing code which other people will find easy to read, evaluate, modify, and maintain.</li> </ul> <p>In either case, do you really want to put that code into production?</p></pre>hobbified: <pre><p>Never have been. Did anybody think they were?</p></pre>dirkraft: <pre><p>Use number of closed issues instead of stars.</p> <p>I&#39;ve used many 2000+ star js libraries that were completely unusable. Number of total issues: &lt; 20. Nobody actually uses a lot of the high star projects I&#39;ve come across. </p></pre>PacNinja: <pre><blockquote> <p>I have a suspicion that the guy behind the project is an excellent marketer, with a crappy product. He goes to conferences, gives talks, collects github stars, you get the idea.</p> </blockquote> <p>Nope, he&#39;s just an young Tanzanian developer. :) Have a look at <a href="https://www.reddit.com/r/golang/comments/3yxx34/helping_out_a_fellow_gopher_ugernest/" rel="nofollow">this thread</a>.</p></pre>YEPHENAS: <pre><p>no more? never have been</p></pre>tucnak: <pre><p>Happy birthday, <a href="/u/m3wm3wm3wm" rel="nofollow">/u/m3wm3wm3wm</a>!</p></pre>tuxlinuxien: <pre><p>&lt;troll&gt; I was thinking this post would have talked about Iris web framework &lt;/troll&gt;</p> <p>I do agree that a central package manager would be really awesome with mirrors around the world. Working with Go from china is a huge pain in the ass if you don&#39;t have vpn.</p></pre>ultra_brite: <pre><blockquote> <p>I have a suspicion that the guy behind the project is an excellent marketer, with a crappy product.</p> </blockquote> <p>So you&#39;re basically insulting the guy and trying to discredit him publicly and that&#39;s a fine thing to do on <a href="/r/golang" rel="nofollow">r/golang</a> ? moderators don&#39;t give a fuck or what? I can pick on a package, say that the author is a scammer and ruin his reputation just like that ? nice. What the fuck are the &#34;moderators&#34; doing here ? nothing ...</p> <p>EDIT: reported, let&#39;s see if the moderators put the their money where their mouth is. That&#39;s not the first time this sub engages into publicly slandering individuals because they wrote something some gophers don&#39;t like. Frankly , what the hell is this community ? each week people pick a new individual, say his work is &#34;shit&#34; and try to start a bullying campaign against that individual. There is 0 technical criticism of the library on this thread. Only someone being called out as &#34;a marketer with a crappy product&#34;. That&#39;s not a constructive criticism of a library, that&#39;s straight out slandering.</p></pre>goomba_gibbon: <pre><p>I must admit, I don&#39;t think it&#39;s appropriate to make such a big claim about a project without any technical justification.</p> <p>Having said that, the tone of this comment, and most of your other recent comments in this sub, are wholly inappropriate and completely unnecessary.</p> <p>What other examples of this have you seen?</p></pre>ultra_brite: <pre><blockquote> <p>Having said that, the tone of this comment, and most of your other recent comments in this sub, are wholly inappropriate and completely unnecessary.</p> </blockquote> <p>Sure, I just don&#39;t call persons with a public profile &#34;marketers with a crappy product&#34;. </p> <blockquote> <p>What other examples of this have you seen?</p> </blockquote> <p>You&#39;re smart enough to go through my comment history, it&#39;s quite easy to spot instances of character assassinations on <a href="/r/golang" rel="nofollow">/r/golang</a> thanks to reddit search bar.</p></pre>goomba_gibbon: <pre><p>I just happened to remember your username. You responded to a question on this sub with a google link.</p></pre>SportingSnow21: <pre><blockquote> <p>Consider Ruby, when I see a Ruby project with many stars, </p> </blockquote> <p>OP created a hypothetical Ruby Gem with a hypothetical number of github stars and a hypothetical author, then gave his/her first impression from a Ruby dev&#39;s standpoint. Somehow you&#39;re now trying to come to the defense of this non-existant author:</p> <blockquote> <p>So you&#39;re basically insulting the guy and trying to discredit him publicly and that&#39;s a fine thing to do on <a href="/r/golang">r/golang</a> ? </p> </blockquote> <p>I&#39;m sure you could find a more logical way to be internet-offended, since that seems to be your goal.</p></pre>PHPDevloper: <pre><blockquote> <p>That&#39;s not the first time this sub engages into publicly slandering individuals because they wrote something some gophers don&#39;t like. Frankly , what the hell is this community ? each week people pick a new individual, say his work is &#34;shit&#34; and try to start a bullying campaign against that individual. There is 0 technical criticism of the library on this thread. Only someone being called out as &#34;a marketer with a crappy product&#34;. That&#39;s not a constructive criticism of a library, that&#39;s straight out slandering.</p> </blockquote> <p>I absolutely agree with you. Something is wrong with the community. I enjoy using Go and have been doing it professionally for a few years. But this kind of threads sometimes make me think about switching to a language with a more welcoming community where users are more respectful to each other.</p></pre>Sphax: <pre><p>Telling someone his project is non-idiomatic is not disrespectful. I don&#39;t agree with the author of this thread at all but there&#39;s nothing disrespectful here.</p></pre>Fatal510: <pre><blockquote> <p>excellent marketer</p> </blockquote> <p>Didn&#39;t know that was an insult. I wish more people would insult me.</p></pre>fakir72: <pre><p>Idioms are linguistic conventions for doing specific things. Like how to do logging, or in go&#39;s case, I/O with *ers (readers/writers, etc). As such, they are guardrails, not rules of the road. You can and should break the rules when necessary. Go is intentionally opinionated. And as such, it&#39;s developers have a stronger opinion of how to do specific things in the langauge than other languages. That&#39;s not a bad thing, most of the suggestions lead to more readable, more comprehensible code. But on those occasions where it&#39;s not possible, it&#39;s perfectly OK to get your work done. Shaming people over &#39;non-ideomatic&#39; code is just mean and hurts the community. Helping people by making concrete suggestions for how to be more idiomatic in situations where idiomatic solutions apply strengthens the community, and makes code more reliable and easier to maintain. </p></pre>thesilentwitness: <pre><p>SQLBoiler &gt; utron. Actually, SQLBoiler &gt; *. And that other package you&#39;re talking about is &#34;Iris&#34; I presume. Yeah, there are star bots around, that is for certain.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

226 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传