作为一个热爱编程的大学生,怎么能不知道面向stackoverflow编程呢。
打开stackoverflow主页,在questions页面下选择按vote排序,爬取前20000页,每页将问题数量设置为50,共100W条,(实际上本来是想爬完1300W条的,但100W条后面问题基本上都只有1个或0个回答,那就选取前100W就好吧)
2k后的问题的votes数基本上就已经在400以下了,接着后面的就基本上是贴地飞行了
votes数最多 : Why is it faster to process a sorted array than an unsorted array?
很明显2k之后的answers数基本上就小于20条了
answers数最多: What is the best comment in source code you have ever encountered? [closed]
最高达到了4.5m,10000以后的基本上就不足3000了
views数最多: How to undo last commit(s) in Git?
总的来说,这三者对应关系类似于一个金字塔。三个图基本上都是左下角靠近原点的区域被填满,也就是说绝对大部分的问题的votes,answers和views都是属于最下层的。高质量活跃的问题是处于金字塔顶端的。三者的最高数好像也没特别明显的对应关系,且三者的最高数都不是同一个问题。
根据所有问题的tags提取出总量前200的关键词(前50条如下),第1名是c#,python排在第5
('c#', 94614),
('java', 93244),
('javascript', 76722),
('android', 69321),
('python', 62502),
('c++', 58173),
('php', 42596),
('ios', 37773),
('jquery', 37405),
('.net', 36180),
('html', 28536),
('css', 26174),
('c', 24699),
('objective-c', 23253),
('iphone', 22171),
('ruby-on-rails', 20143),
('sql', 19171),
('asp.net', 18060),
('mysql', 17559),
('ruby', 16397),
('r', 15670),
('git', 13139),
('linux', 13080),
('asp.net-mvc', 12857),
('angularjs', 12606),
('sql-server', 12473),
('node.js', 12212),
('django', 11576),
('arrays', 11006),
('algorithm', 10959),
('wpf', 10631),
('performance', 10619),
('xcode', 10613),
('string', 10426),
('windows', 10132),
('eclipse', 10117),
('scala', 9942),
('regex', 9685),
('multithreading', 9601),
('json', 9266),
('swift', 8950),
('c++11', 8939),
('haskell', 8823),
('osx', 8159),
('visual-studio', 8140),
('html5', 7627),
('database', 7567),
('xml', 7478),
('spring', 7464),
('unit-testing', 7253),
('bash', 6825)
- votes数
- 6162 : What does the “yield” keyword do in Python?
- 3529 : What is a metaclass in Python?
- 3098 : How do I check whether a file exists using Python?
- 3035 : Does Python have a ternary conditional operator?
- 2620 : Calling an external command in Python
- 2605 : What does if name == “main”: do?
- 2194 : How to merge two Python dictionaries in a single expression?
- 2123 : Sort a Python dictionary by value
- 2058 : How to make a chain of function decorators?
- 1984 : How to check if a directory exists and create it if necessary?
- answers数
- 191 : Hidden features of Python [closed]
- 87 : Best ways to teach a beginner to program? [closed]
- 55 : Favorite Django Tips & Features?
- 50 : How do you split a list into evenly sized chunks?
- 44 : Calling an external command in Python
- 43 : How can I represent an 'Enum' in Python?
- 38 : How to merge two Python dictionaries in a single expressions
- 38 : Finding local IP addresses using Python's stdlib
- 37 : Reverse a string in python without using reversed or [::-1]
- 37 : How do I check whether a file exists using Python?
- views数
- 2121621 : Parse String to Float or Int
- 1905938 : Using global variables in a function other than the one that created them
- 1888666 : How do I check whether a file exists using Python?
- 1827126 : Calling an external command in Python
- 1699574 : Converting integer to string in Python?
- 1686230 : How do I read a file line-by-line into a list?
- 1682307 : Iterating over dictionaries using 'for' loops in Python
- 1569205 : How to get the size of a list
- 1554755 : How do I install pip on Windows?
- 1515505 : Finding the index of an item given a list containing it in Python