Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

50%
+0 −0
Meta Handling common wrong approaches and misguided motivations for basic technique questions

I think this is important to consider because it doesn't only concern questions about bad practices or XY questions, but also if we should allow questions with artificial requirements or questions ...

posted 8mo ago by Lundin‭

Answer
#1: Initial revision by user avatar Lundin‭ · 2023-09-15T09:58:07Z (8 months ago)
I think this is important to consider because it doesn't only concern questions about bad practices or XY questions, but also if we should allow questions with artificial requirements or questions about code obfuscation. Currently we have no rule for/against any of this.

---

As for if we should call out dangerous practices or XY problems, this boils down to whether we strive to be an ___engineering___ site or a ___general programming___ site. 

In engineering, we always seek to follow best practices and formal or informal industry standards. On an engineering site, an answer ought to be obliged to point out dangerous practices, obsolete functionality and similar. 

Whereas a general programming site is more fuzzy and more tolerant to students/hobbyists building their own strange, non-recommended things. They could be doing so for learning purposes, or because of artificial school requirements, or even because they are doing something bad on purpose (obfuscation, code golf, illustrating vulnerabilities etc).

Another fundamental difference between engineering and general programming is that an engineer _always_ questions if the requirements make sense and they don't start on a task before the requirements are made clear. Whereas (bad) students as well as misc inexperienced programmers _never_ question the requirements (the common derogatory term for those who blindly follow senseless orders is "code monkeys"). 

If we peek at Stack Overflow, it is somewhere in between. SO has a tendency to close as unclear and/or down-vote XY problems. The requirements laid out in questions are often not questioned. Although answers pointing out flaws of reasoning and dangers with certain approaches are often well-received. Artificial homework assignments are allowed. Obfuscation is frowned upon and not well-received, even though there is no explicit rule against it.

---

To address your specific concerns and how I think Codidact should deal with them:

I think we should always prompt the poster for clarification in comments as a first step. 

Answers that may answer the question without addressing obvious problems with it, and also uses clearly dangerous or obsolete functionality should be marked with our reaction feature as "dangerous" or "outdated".

Questions can also use the "language-lawyer" tag to show that the reason behind the question might not necessarily be practical use, but to understand how a programming language work in-depth and what constructs that are actually marked as safe/unsafe by standards etc.

> Write a separate answer to contain such important caveats and anticipate common Xs underlying the Y in the question? 
>  
> Add a caveat to a canonical answer, or separately to multiple answers?

It can be a separate answer or written together with an answer that does at the same time give the "X answer". It might be a good way to illustrate why a certain method isn't good, by posting a code example explicitly labelled "bad".