Skip to main content
14 votes
Accepted

A wounded Zombie finder, or: how to find the almost dead undead?

Not utterly wrong, but q.PostTypeId = 1 and AND a.PostTypeId = 2 are superfluous. The only post types with a non-null ...
Glorfindel's user avatar
  • 1,113
13 votes
Accepted

CodeReview question markdown downloader

PyCharm complains on this line: m = json.loads(data) If the above call to fetch_compressed_data fails, and the resulting ...
Carcigenicate's user avatar
13 votes

Stack Exchange rev​iew queue notifications

I don't see much benefit to the enum. The Notification.permission string (or the return value of requestPermission()) is already ...
CertainPerformance's user avatar
11 votes

CodeReview question markdown downloader

Just a couple stylistic points Function/Variable Naming Functions and variables should be in snake_case (PEP 8). ...
Ben A's user avatar
  • 10.8k
9 votes

CodeReview question markdown downloader

Improving HTTP communication scheme Instead of urllib.request/urllib.error use requests lib as well-known, elegant and simple ...
RomanPerekhrest's user avatar
7 votes
Accepted

Zombie killers ranking

As a heads up - we have very different formatting styles for our code. Feel free to ignore that difference and don't consider it a comment on your style (unless you prefer mine, in which case please ...
Dan Oberlam's user avatar
  • 8,049
7 votes
Accepted

Python tool to assemble CodeReview posts from source files

PEP 8 I would review PEP 8. Some of your style choices are not considered best practice by the Python community. Some quick observations: Constants are given ...
Dair's user avatar
  • 6,220
6 votes
Accepted

Show how close a user is to being unsung

I tried it on myself, elapsed time of 136 msec for userid 145459: https://data.stackexchange.com/codereview/query/1822723/how-close-am-i-to-being-unsung?opt.withExecutionPlan=true#executionPlan The ...
J_H's user avatar
  • 42.3k
5 votes

Get a notification when questions get posted

Why would you use stackexchange.com and only take ones with the title of stackoverflow.com? That's a huge waste. You could ...
dustytrash's user avatar
  • 2,446
5 votes
Accepted

The sniper: a Zombie searcher for specific tags

When using "simple" Aliases for table names in a query you should alias all the tables, not just some of them. This makes the query appear more consistent. In your query, you have ...
rolfl's user avatar
  • 98.2k
5 votes

State the word count for a given Stack Exchange user

Reviewing your T-SQL script I see that you have a cursor to iterate over Posts from a specific owner. For each body you use a neat trick to determine the word count of the body and use an extra ...
rene's user avatar
  • 295
5 votes

Stack Exchange rev​iew queue notifications

Usability I ran the script on the SO review dashboard to see how it would perform with various numbers. The biggest thing I noticed was that it didn't properly handle numbers greater than 999 since ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
5 votes

Finding solutions on GitHub and Stack Overflow

Selenium Selenium imposes a lot of overhead and complexity that you don't need to deal with. If you needed to scrape, use requests + ...
Reinderien's user avatar
  • 71.1k
5 votes

Finding solutions on GitHub and Stack Overflow

For simply content scraping without JavaScript and ajax content try scrapy for best practices. Scrapy uses Python classes by default as it is a Python framework. Easy tutorial to learn Scrapy: Scrapy ...
Vishesh Mangla's user avatar
4 votes

Find how much reputation a user had on a given date

This is a partial answer as these were the bits I could verify easily. In your column query for ReputationFromSuggestedEdits you can move all of the projection to ...
rene's user avatar
  • 295
4 votes

"How can I make this SEDE query better?" (bad title finder)

Let me address a possible DRY issue in the query in exchange for possible poorer performance. I'm in particular talking about this bit: ...
rene's user avatar
  • 295
4 votes

Data Explorer query that makes bar graphs

I'll answer your main questions: Can I refactor it so that the list of when like then statements occurs only once? (Preferably without complicating the code too much.) Yes, but not at the expense of ...
rene's user avatar
  • 295
4 votes
Accepted

SE main site tag ratings based on Wilson score confidence interval

So it seems that dynamic SQL in general and EXECUTE() in particular, as pointed out by Phrancis, is slow. As I also don't want to be dealing with the composition of ...
Gao's user avatar
  • 1,230
4 votes
Accepted

Bookmarklet that helps Stack Exchange users farm reputation

First, a few general pointers. Commented out code is bad. It tells readers that you don't really know why this code was there, but removing it seems to have fixed something, or maybe adding it broke ...
Gerrit0's user avatar
  • 3,501
4 votes

Stack Exchange graph data - helper modules

You're storing the magnitudes like this: _MAGNITUDE = 'f p n μ m| k M G T P E Z Y' This is a serialized format that requires parsing. This is inconvenient and ...
Reinderien's user avatar
  • 71.1k
4 votes
Accepted

iOS Swift 3 app that requests data from the Stack Exchange API

Property accessors Defining accessor methods for stored properties such as ...
Martin R's user avatar
  • 24.2k
4 votes

CodeReview question markdown downloader

Personally I use Prospector and Flake8 with a lot of plugins. The problem with linter runners is that they don't support many of the lint tools available in the Python ecosystem. But, for the most ...
Peilonrayz's user avatar
  • 44.6k
4 votes
Accepted

SE Data Explorer: Users by City

LOWER(Location) LIKE 'sulaimani, iraq' or LOWER(Location) LIKE 'erbil, iraq' It is not necessary to use LIKE if you want an ...
mdfst13's user avatar
  • 22.4k
3 votes

Scraper to grab a Stack Overflow profile name

IMO the answer highly depends on how you are planning to extend the functionality of your class. If its only function is fetching the username, it's probably better to transform it into a function. ...
WofWca's user avatar
  • 166
3 votes
Accepted

Get a notification when questions get posted

Apart from using the SE API (for example via some module like py-stackexchange), there are some other optimizations possible. In your notify function you could use ...
Graipher's user avatar
  • 41.7k
3 votes

Bookmarklet that helps Stack Exchange users farm reputation

Skimming from top to bottom, just dumping what comes to mind here: You should be using 'use strict'; when you can, to make your code conform to modern standards. ...
Vogel612's user avatar
  • 25.5k
3 votes

We'll be counting stars

There are also some possible BeautifulSoup related improvements: It is highly recommended to specify an underlying parser that ...
alecxe's user avatar
  • 17.5k
2 votes
Accepted

Condensing a Table

Algorithm The algorithm to build the collapse-specs is inefficient: It makes a pass over all headers to find the percentage headers Then for each percentage header: It finds the index using ...
janos's user avatar
  • 113k

Only top scored, non community-wiki answers of a minimum length are eligible