Questions tagged [canonical]

is for questions about canonical questions or answers, i.e. those often used or referred to.

Filter by
Sorted by
Tagged with
26 votes
1 answer
2k views

Canonical Q/A for 'Module 'x' has no attribute 'y' in Python

This seems to come up quite a lot. In Python, someone writes a script which has the same name as a module they want to import from it. The import succeeds, but when they try to access an attribute of ...
SiHa's user avatar
  • 8,097
5 votes
0 answers
394 views

Proposed canonical question regarding database subclasses

There is a question asked today that, I think, would make a good canonical question for a question that has been asked, with different specifics, hundreds of times here in Stack Overflow. The ...
Walter Mitty's user avatar
  • 18.7k
9 votes
1 answer
447 views

How best to canonicalize all the "Python write list(/variable/data structure) to file"-type questions?

There are 22 questions and growing on [python] file TypeError: expected a string or other character buffer object, which you get whenever you try file.write() for anything other than a string: a list, ...
smci's user avatar
  • 33.4k
3 votes
0 answers
31 views

Edit canonical question to ask about new related feature?

The question here asks and answers "What do the u and r prefixes to strings mean in Python" and is a valuable and oft-used dupe target. In a recent version of Python, an extra prefix was added: f ...
Adam Smith's user avatar
  • 53.3k
32 votes
2 answers
1k views

What to do with all the questions about scanf?

You've probably seen it. The thousands of different questions where the solution is changing scanf("%c to scanf(" %c, that is, put a space before %c. At first it was funny, but I do get tired of it ...
klutt's user avatar
  • 30.8k
3 votes
0 answers
226 views

How to close unsolvable "crashes in main.m" for iOS/macOS?

A while ago I added a tutorial link to the iOS tag wiki about how to fix application crashes in iOS. (It applies to macOS equally BTW, but that's not the point.) Obviously, many question askers don't ...
Michael's user avatar
  • 6,481
19 votes
1 answer
298 views

Should "Why not upload images of code on SO when asking a question?" be a FAQ?

It seems like Why not upload images of code on SO when asking a question? is now the de facto standard reference post on the topic. This hasn't actually been proposed as a FAQ, but can it be promoted ...
EJoshuaS - Stand with Ukraine's user avatar
16 votes
1 answer
365 views

Canonical question for using PHP SimpleXML with namespaces

Over and over again, people ask questions about SimpleXML (the PHP built-in XML library which is, well, simple), because either: They don't know that : in a tag name denotes a namespace (e.g. most of ...
IMSoP's user avatar
  • 93.7k
5 votes
2 answers
146 views

Create a similar question for a different framework (Unity)

There is a well known C# question about what a NullReferenceException is and how to fix it. Unity which has the Unity3d tag on Stack Overflow uses C#, but I noticed a-lot of Unity questions with the ...
Programmer's user avatar
  • 124k
4 votes
1 answer
512 views

Do we need a reference post for Kotlin vs. Java for Android development?

Ever since Kotlin was announced as an official Android language, I've seen numerous questions about the difference (is it replacing Java? Which should I use? Etc.) Would it be worthwhile to just ...
EJoshuaS - Stand with Ukraine's user avatar
11 votes
0 answers
539 views

What is the proper way to write proposed FAQ questions and answers?

A few months back I posted a question about whether or not questions about the Linux kernel are on topic here. It seems like it's something that a reasonable number of people are confused about, and ...
EJoshuaS - Stand with Ukraine's user avatar
3 votes
0 answers
57 views

Summary self-answer - close as multiple dup or links?

Should question created solely as navigation guide (somewhat canonical) to be closed as duplicate of many or provide answer with links to specific topics(as CW) or have real answer (and possibly ...
Alexei Levenkov's user avatar
30 votes
4 answers
969 views

How can I title a question about a problem that doesn't have a common description?

Recently I wrote a self-answered question, addressing one certain problem, that causes a lot of questions on Stack Overflow that usually get wrongly closed with incorrect dupe target. But got a ...
Your Common Sense's user avatar
8 votes
0 answers
159 views

Java "ClassNotFoundException" canonical question

I meet each day dozens of similar questions where people claim about java.lang.ClassNotFoundException in java. Just recent examples: java.lang.ClassNotFoundException:org.apache.tika.sax....
Andremoniy's user avatar
  • 34.5k
15 votes
3 answers
518 views

Should we have a canonical virtualenv question?

I realize, of course, that virtualenv is a whole tag, and having a single question summarizing the whole topic is beyond the scope of the site. I want an introductory question that goes over enough ...
Kevin's user avatar
  • 29.6k
-1 votes
2 answers
115 views

Using a canonical duplicate to close a syntax error question [duplicate]

Recently I stumbled upon a question about a basic PHP syntax error. The problem was not too hard to understand, but before any answer was posted, the question was marked as a duplicate of a wiki ...
Loïc's user avatar
  • 11.9k
22 votes
3 answers
435 views

Does Documentation deprecate canonical dupe target lists? [closed]

There are various old "What does this symbol mean" lists of community wiki canonical dupe targets which seem to have a great acceptance by the community, like Reference - What does this symbol mean ...
Oriol's user avatar
  • 281k
12 votes
1 answer
573 views

Canonical question for R gotcha: colon operator takes higher precedence than arithmetic

It is a frequent R gotcha that 1:10+5 does not do what you expect it do. All of us R programmers have been bitten by it, usually several times. Surprisingly, although it comes up a lot, we don't seem ...
smci's user avatar
  • 33.4k
-7 votes
1 answer
523 views

Canonical question explaining differences between "var", "let" and "const" in JavaScript

This is a follow-up to my question User refusing to correct misinformation in their popular answer. Please take a look at it before reading this question. I'm posting this question because after 5 ...
Michał Perłakowski's user avatar
15 votes
3 answers
374 views

The "What does this symbol mean in PHP" reference is a mess

This reference question has been frustrating me for a while: Reference - What does this symbol mean in PHP? I'm not opposed, in general, to creating reference Q&As that are just link collections, ...
Mark Amery's user avatar
  • 148k
5 votes
0 answers
132 views

Is there a canonical question regarding Java DateFormat Unparseable date?

I see lots of questions like this: DateFormate gives unparsable error i got the error java.text.ParseException: Unparseable date SimpleDateFormat ParseException: Unparseable date Error The answers ...
1615903's user avatar
  • 33.6k
5 votes
0 answers
2k views

Creating a dupe target to manage a plethora of duplicate questions

On the asp.net-mvc tag, a few times a week (and I've seen as many as three in one day) a question is posted with the title along the lines of The model item passed into the dictionary is of type .. ...
user avatar
3 votes
0 answers
70 views

Is there a canonical Python reference mutation question?

This question came up on my review queue, and I'm wondering if there's a canonical version of these "X variable (or name or whatever they're called in Python) gets mutated by changing a different ...
Jeff's user avatar
  • 12.7k
-21 votes
1 answer
143 views

Should we be nicer when dupehammering? [duplicate]

We all know the situation, someone posts a NullPointerException or unresolved external question and the dupehammer falls in short order. Now, these canonical questions have ten or fifteen answers to ...
Ken Y-N's user avatar
  • 14.8k
8 votes
1 answer
273 views

Java "logical vs bitwise operator" cleanup

We have these: Difference between & and && Differences in boolean operators: & vs && and | vs || Why do we usually use `||` not `|`, what is the difference? And possibly more....
Jason C's user avatar
  • 39.6k
2 votes
0 answers
38 views

Do we have a canonical question about writing files to disk, from a web page, with Javascript?

Skimming through the front page I found this question: Javascript Write to Textfile This is something that has been asked so many times before that my first thought was "I'll just mark it as a ...
Geeky Guy's user avatar
  • 9,319
25 votes
4 answers
786 views

Can anyone suggest a good generic "turn this JavaScript object to this JavaScript object" question for duplicates?

Basically I'm a bit fed up of questions along the lines of Here's a JavaScript/JSON object I need to be this similar but slightly different JavaScript/JSON object. Please can someone do this for ...
Liam's user avatar
  • 28.6k
15 votes
1 answer
422 views

How many "How many objects are eligible for garbage collection?" questions are eligible for garbage collection?

Everyone knows Java has garbage collection but apparently no one knows how it works so we keep seeing variations of the question "How many objects are eligible for garbage collection?". Here are a few:...
Sotirios Delimanolis's user avatar
8 votes
0 answers
128 views

Request: Canonical question about not throwing away exception details

Quite often I stumble upon code which uses exception handling incorrectly; in particular, which throws away exception details. Examples: // Example 1: swallow exception catch (Exception ex) {} // ...
Heinzi's user avatar
  • 170k
3 votes
0 answers
69 views

Canonical "My JavaScript isn't working" question for the answer "IDs must be unique"?

Is there a good canonical question we can use to close duplicates of questions (like this recent one) that are basically "My JavaScript code doesn't work" to which the answer is "You cannot use the ...
T.J. Crowder's user avatar
36 votes
1 answer
748 views

Can I self-answer a question in order to demonstrate a modern approach?

OK, let's say that there's an API. And in that API, there is a function. This function is critical for modern use of that API, so lots of people use it. However, this function is woefully designed. ...
Nicol Bolas's user avatar
36 votes
1 answer
747 views

The topic area ".NET async/await/TPL" needs a canonical answer on cooperative cancellation

In the .NET space there has been a lot of interest in things like async, await and TPL in the recent years. A very common issue is that someone expects cancellation to be one of these: immediate pre-...
usr's user avatar
  • 170k
3 votes
0 answers
124 views

Procedure and requirements for writing a canonical question/answer [duplicate]

I noticed over the last few days that one particular problem keeps showing up. I went searching for a good canonical question to deal with all of these and wasn't satisfied with what I found. I wrote ...
Mike Cluck's user avatar
  • 32.2k
3 votes
0 answers
68 views

Canonical question for Cartesian product

I just came across several recent questions asking variations of "how to find all possible combinations of multiple lists", and I regularly see similar questions. The reason that people post new ...
m69 ''snarky and unwelcoming'''s user avatar
9 votes
1 answer
331 views

Should we do something about "unsupported format character" questions?

There are a lot of questions about this Python error. As far as I can tell, they're all basically the same: either a % wasn't escaped, or the type specifier (s or d) was missing from a %(name) ...
OrangeDog's user avatar
  • 37.8k
4 votes
0 answers
88 views

Proposal for a "watch" tab?

I wasn't able to find something similar through search. If there is, let me know and I'll delete the question. As much as I like that we already have a favorites tab for starring questions, I feel as ...
timolawl's user avatar
  • 5,524
4 votes
0 answers
133 views

How to ask for a canonical answer to "How to fix 1064 error?"

In this question https://stackoverflow.com/questions/36731837/how-to-fix-1064-error I'm hoping to get a canonical, generalizable, answer to a problem that seems to vex a lot of beginners in an area ...
O. Jones's user avatar
  • 106k
1 vote
1 answer
53 views

What's the best way to provide help for multiple questions? [duplicate]

There are many questions on SO to do with sprite collision and contact detection in iOS. Most are slight variations on one another and are caused by the OP not setting up their environment correctly. ...
Steve Ives's user avatar
  • 8,059
12 votes
2 answers
451 views

How to direct users to JavaScript arrow function answer?

I just saw this question closed as a duplicate. Which is fine, except that it is very difficult to find the one it's a dupe of if you don't know what you're searching for. I actually answered an ...
Jared Smith's user avatar
  • 20.6k
75 votes
4 answers
3k views

What to do about hundreds of the same basic question?

For the umpteenth time someone asked the question "what does 'str object is not callable' mean?" with the tag [python]. This is a very common error for newbies, so it just gets asked over and over and ...
Bryan Oakley's user avatar
3 votes
1 answer
54 views

Is there already a good canonical target for "`var x = func()` overriding `func x()`" JavaScript questions?

On Monday this question got asked. I misread it and flagged it as a duplicate of this question, but retracted my vote after re-reading it as that's not a good dupe target for this specific issue. I ...
James Thorpe's user avatar
  • 31.7k
4 votes
0 answers
298 views

Making a canonical post that needs way too many tags

A few weeks back, I made a canonical post about shader invocation frequency. I tagged it with the tags I thought were appropriate at the time. However as I think about it now, the question/answer ...
Nicol Bolas's user avatar
42 votes
3 answers
940 views

Is this an acceptable canonical question and answer for a common Java exception?

I believe this is related to this question, but it appears that a question and answer have been proposed as a canonical resource for java.lang.ArrayIndexOutOfBoundsException. The asker of this ...
Brad Larson's user avatar
  • 170k
38 votes
4 answers
2k views

What to do with "programming" Qs that are actually just basic arithmetic/ratio questions?

There's a category of questions that are only titularly "programming" and are in fact just simple ratio or pre-algebra questions, example: Transform rotation based on the "Minutes" (Unity ...
Fattie's user avatar
  • 16.8k
47 votes
1 answer
1k views

Canonical question needed: Java's infamous ArrayList(int n)

We've got a few dozen or so Java questions floating around that are of the form: I've initialized my ArrayList with new ArrayList<Object>(50), but the size is 0! What's wrong with this? ......
Makoto's user avatar
  • 105k
28 votes
1 answer
458 views

Canonical answer for PHP within JavaScript questions [duplicate]

If you're following the PHP tag you'll see multiple questions like this one coming up on a daily (sometimes even hourly) basis. Those questions are most likely: I include this PHP code into my ...
KhorneHoly's user avatar
  • 4,726
28 votes
4 answers
1k views

What should be done with this specific highly upvoted question asking how to debug a Node.js application?

The following question has gathered a couple hundred thousand views and more than 800 upvotes: How do I debug Node.js applications? How do I debug a Node.js server application? Right now I'm mostly ...
Kyll's user avatar
  • 7,106
32 votes
2 answers
1k views

Canonical question on how to use parameterized queries in C#

I recently notice a lot of "Why doesn't my SQL statement work?" questions, where the cause of the problem is some improperly formatted (date) or improperly escaped (string) value. Of course, we all ...
Heinzi's user avatar
  • 170k
3 votes
0 answers
113 views

Do we need a general reference question for "ReferenceError: libraryName is not defined"?

There are lots of javascript questions on SO, where OP is using some library, for example jQuery, and is getting following error: ReferenceError: libraryName is not defined Some examples: JQuery -...
Michał Perłakowski's user avatar
38 votes
3 answers
720 views

How to handle questions closed as an incorrect duplicate

At least once a week, a user will ask a question on one of the asp.net-mvc sites as to why their model, or a property of their model is null when they submit their form back to the controller's action ...
user avatar