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.

What questions are we most urgently missing?

+7
−0

Context: As you may be aware, recent poorly received changes on Some Other website are likely to have pushed a lot of their regulars to a breaking point.

Nowadays, Codidact (and specifically Software) seems like the only place commonly mentioned as a viable alternative.

So I think it behooves us to act quickly to make the community seem as viable as possible. I'd like for new arrivals to see an active community engaged in producing the kind of content that the "Q&A site" model excels at (at least in theory), and immediately see what we're about (and how we differ) without having to rely on years-old, stumbling attempts to define ourselves. And this largely depends on new content; there's clearly a ton of important questions left unasked and unanswered so far.

Specifically, for new arrivals with more answers than questions, I'd like them to see the value in posing these kinds of questions anyway, even if they're "artificial". And for those with more questions than answers, it'd be great if their first impression is that they can get answers here by searching.

The historical evidence is pretty clear about the kinds of questions that are most important (as judged by the interest of the general population of programmers in having them answered), but trends have changed over time in such a way that a simple statistical analysis (of what's been most upvoted, viewed, closed-as-duplicate etc.) elsewhere would be misleading. (Not to mention, those metrics don't always align with reality, because of factors like what experts are interested in answering, and because of the difficulty of curating and recognizing duplicates, etc.)

I therefore submit this as a brainstorming thread to collect ideas about what needs to get written. My idea is that everyone can make their own list of ideas for new Q&A, on the basic, "famous" topics (things that a lot of programmers would be able to answer easily, but others would nevertheless need answered).

Some specific requests:

  • Please don't worry too much about categorization. Unless it helps you think.

  • Please hide your entire list in a <details> tag.

    I have a few reasons for this:
    • I generally want to encourage use of this feature across the site, because it helps a lot with scanning over the longer questions and answers that Software topics often require (despite seeming superficially simple) and because it showcases part of the character and culture of the site, as compared to those that came before it.

    • I don't want people to worry about duplicating others' suggestions. In fact, if this happens incidentally (to people who weren't checking for duplication), it serves as a vote for a specific suggestion. We can always edit together and compile a master list later (and in fact I plan to).

    • I want the first impression of this thread to be that many people are contributing, and to emphasize who is standing up for the effort. Contrarily, I don't want anyone to feel intimidated out of contributing a short list (or even just a single idea; you can always add more later!) because someone else contributed a long list. (But do consider checking others' lists if you think you'll be inspired!)

  • Please give just the titles of your proposed questions; for the kind of question I have in mind, a basic idea of what the question might contain should already be clear from the title. I'm looking mainly for the kinds of things that are common gotchas, stumbling blocks or "unknown unknowns" for less inexperienced programmers. I recognize that writing a good question, even about very easy subject matter, is often not as simple as it looks; that's exactly why I suggest that you don't get into it right now. If you know there's something important but can't quite phrase a title, just putting "Something about [specific topic]" is fine for now.

  • If you have the time, please don't hesitate to start writing up questions. (If you can also answer them, great! If not, still fine!) Go ahead and crack open some <details> tags. My model is that this thread is a "living to-do list" with no clear time of completion; so if you see a good idea on anyone's list and want to run with it, run with it. There is no point in waiting.

History

0 comment threads

4 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+4
−0

I think with the modest user base we've had so far, questions get tilted towards what expertize we do happen to have around, rather than towards which languages that are most commonly used.

Overall, I think we just need general programming language usage topics, mainly beginner to intermediate, for all the major programming/script languages. To see what we are missing the most, it might be helpful to look at SO statistics. In the history of SO, these are the top 10 sorted from most common first:

  • JavaScript + libraries
  • Python
  • Java
  • C#
  • PHP
  • HTML and CSS
  • C++
  • SQL
  • R
  • C

(11th place ASP, 12th place Ruby)

Looking at the most frequent tags here at Codidact, we should be seeing more JavaScript questions in particular since that's by far the most popular one at SO. The trend at SO is that it has taken over the #1 position from C# and/or Java that used to hold it.

And there are barely any R questions here despite that one being the 9th most popular language.

History

2 comment threads

How to measure most common (2 comments)
also filter for recency? (2 comments)
+4
−0

I'll start, with questions about Python (although some of them may be applicable to other languages). These come from a combination of reviewing the most "frequent" (i.e., used as dupe targets) SO questions in the Python tag, the "Core language FAQ" in the documentation, and my personal experience teaching Python on the Internet. I'm specifically excluding questions that are specific to major libraries like NumPy and Pandas (and also TKinter).

As a general note, questions that are addressed by the FAQ should have an answer that includes a link to the relevant FAQ section.

Giving "just the title" is hard! I have some parenthetical notes to try to explain and distinguish things that aren't easy to put in the language of someone who would encounter the problem, or where the obvious way to describe the problem doesn't really get at the substance of it. But I also have some just because there are multiple obvious ways to phrase some ideas.

General
  • How can I know the correct indentation for the code?

  • How can I diagnose and understand IndentationError (and TabError)?

    • (And so on for SyntaxError, and for other common types like TypeError, ValueError, AttributeError in particular)
  • (How) can I choose variable names at runtime ("create variable variables")?

  • Where does the code start running?

    • How does if __name__ == '__main__': work?
  • How do if statements work with non-booleans (values other than True and False)?

    • How do tricks like x and y or z work?

    • Why isn't x < y < z the same as either (x < y) < z or x < (y < z)?

  • How do Python's negative indexes (for sequences) work?

  • How do Python's slices (for sequences) work?

  • How do * and ** work

    • in function parameters?

    • in function-call arguments?

    • in "unpacking" syntax?

    • in "packing" syntax (e.g. merging dicts)?

    • How does / work in function parameters?

  • (Something about the conventions Python documentation uses when describing function signatures etc.)

  • What's the difference between / and //?

    • How does // work with negative numbers in particular?
  • How can I call a method on a literal integer?

  • Where does Python look for variable definitions?

    • How do I use (inspect / assign / modify) global variables?

    • ... "non-local" variables from a closure (in a nested function)?

    • What is "shadowing"?

    • Why don't built-in names work properly (after shadowing them), and how do I get them back?

    • Why did I get UnboundLocalError from my local variable?

    • Why did I get UnboundLocalError from my (intended) global variable?

  • How do eval and exec work, and why should I avoid them?

  • How can I analyze and understand recursive code?

  • Why did my recursive code...

    • ... return None instead of the value from a recursive call?

    • ... end up with confused state after returning from the recursive call?

    • raise a RecursionError?

  • What is yield (how do generators work)?

    • What is yield from?

    • How does .sending to a generator work?

  • What is self? (How do methods work?)

    • (Probably needs several questions, can be elaborated later)
  • How do I store separate per-instance data when using classes? (Why are my objects "sharing" a value?)

    • How are attributes looked up/assigned/modified on objects?

    • How do method calls work? (What's a "bound method object", etc.?)

  • How does is work?

    • Why are some simple values always the same object and others not?

    • How does the id builtin work? (and related gotchas)

  • What are "dunder methods", and how do I use them to make my class easier to use?

    • When would I ever need __new__?

    • How do __op__, __rop__, __iop__ combinations work to implement binary operators?

    • Why is there a __repr__ separate from __str__?

    • How do I make my instances show up neatly when printed?

    • How does __del__ work, and why isn't it called when I expect? (How does it relate to the del keyword?)

    • What are "context managers" and how can I implement one (__enter__ and __exit__)?

  • How can I cache or "memoize" results of a function (e.g. for "dynamic programming")?

  • How can I open a file?

    • ... and read its contents, e.g. into a list of string lines?

    • ... and overwrite it, append to it, etc.?

    • What are "text mode" and "binary mode"? (Why does it matter, etc.)

    • What's a "data format"? Can I create my own?

    • How can I easily work with XYZ popular data format? (What can I use to read and parse the file, and where do I go from there? Probably many questions of this form, for JSON, TOML, CSV, images, etc.)

  • How do I share global variables between modules?

  • How do commas (and their precedence) work in Python syntax?

    • (This would probably be split into more concrete questions about gotcha syntax, e.g. failing to make a singleton tuple, the 'a' in 'b', 'a' example from the FAQ, etc.)
  • Is there a "ternary operator" (conditional expression) in Python?

  • Conceptually, how can I get numbers, lists, etc. (non-strings) input from the user?

    • How can I parse the string representation of e.g. a list and get an actual list?
  • How can I repeatedly ask for input until the response is valid?

  • How can I make the same/similar code run repeatedly?

    • Specifically, how can I process a list (or other sequence) to get a list of results?

      • (Probably several different questions on this general theme.)
  • Techniques for avoiding redundant code

  • How can I do many comparisons at once?

    • E.g.: value is one of multiple candidates; all values meet a condition; any value meets a condition; overlap between two groups of values; ...

    • Why is "a == b or c" always evaluating as true?

  • How does assignment work in Python?

    • How does modifying an existing value differ from assigning a new one?

    • What uses of = assign, and what uses modify?

    • Doesn't assignment copy values? How do I get independent (mutable) values?

  • Why is my default parameter value "remembering" changes between calls?

  • How do I use functions to organize the code?

    • How do I provide information to a function / how does it get information?

    • How do I get a result back from a function and use it?

      • ... multiple results?
    • Why do I need to use return? Can't I just print the things I want?

    • What happens when I call a function (how does the program flow work)?

    • If calling a function is not like a "go to", how can I represent "places" in my code?

    • How do values get passed to functions in Python?

    • What happens if I don't return anything?

    • Can I "overload" functions like in other languages? How?

  • How can I make nested data (e.g. a list of lists) with independent values?

  • How can I copy nested data that's independent of the original?

  • How can I access and work with nested data structures?

    • How can I flatten a nested structure by one level?

    • ... All the way (recursively)?

  • When would I prefer each built-in "container" data structure (list, tuple, set, dict, ...)?

  • How can I properly remove items from a list while iterating (looping) over it?

  • How can I store a function and look it up / call it later?

    • ... and "bind" arguments for the later call?

      • When I did this in a loop, why didn't they get separate bound arguments?
    • Why did { 'x': func(value) } not work for this?

  • Why does "chaining" methods that modify a list, fail with an AttributeError?

    • What is "command-query separation"?
  • How can I iterate through sequences in parallel, and "pair up" the elements?

  • How can I get overlapping pairs (or a "sliding window" of longer slices) of a list (or tuple)?

  • How can I get *non-*overlapping pieces (split it into chunks of equal size)?

  • How can I split a str...

    • at newline characters (into "lines")?

    • on whitespace (into "words")?

    • at other specific delimiter characters?

    • where it matches a pattern?

    • into a specific number of pieces?

    • (N.B. the "into equal-size chunks" case is the same as for lists)

  • Are dicts ordered? (How can I sort or re-order them?)

  • How can I get a Cartesian ("cross") product of elements from multiple input sequences?

  • What are combinations, permutations, combinations_with_replacement and product from itertools, and how do I choose between them? (How do I "get combinations" of values, for varying informal definitions of "combination"?)

  • How do combinations etc. work when there are duplicate elements in the input?

  • How can I compute the number of combinations, permutations etc. without generating them?

  • (Possibly some more "advanced" combinatorics questions, but those are definitely lower priority.)

  • How can I remove duplicates from a list?

    • ... and preserve order?
  • How do I properly iterate over a dict?

  • How can I find out what methods or (other) attributes an object has

  • How can I find out an object's name? (Deliberately ambiguous; a question like this needs to address confusion)

    • Within the code of my module, how can I find the module's name?
  • Within the code of my module, how can I get the module object itself? (Lower priority, but prompted by the above)

  • How can I reverse a list (or tuple), or process it in reverse?

  • Why does a_tuple[i] += ['item'] raise an exception when the addition works? (I really can't improve on the FAQ title...)

  • How can I sort a list...

    • ... according to an attribute, etc. of the elements?

    • ... according to a function calculated on the elements?

    • ... according to keys provided in another list?

    • ... according to where its elements appear in another list?

    • ... if I don't know how to "key" the elements, but know how to compare two elements?

  • How can I sort one list, and rearrange another in a corresponding way? (N.B. This is actually the same as "sort according to keys provided in another list"; we can sort the "other" list naturally, and rearrange the first one correspondingly.)

  • How can I check the type of an object at runtime?

    • What is "the type of an object" in Python's type system?
  • How can I find all the instances of a class?

  • What are metaclasses and how are they used?

    • How can Python represent types as objects?

    • How can type be its own type?

  • What is super and how is it used?

  • What are decorators and how are they used?

    • What are @staticmethod and @classmethod and how are they used (and how do they differ from each other)?
  • What is "name mangling" in Python and how does it work?

Specifically about importing modules
  • What are .pyc files and the __pycache__ folder? (Is Python "compiled"?)

  • (Why) Can I put import statements not at the top of the file? (Should I?)

  • How does from ... import ... syntax work? (Why does it let me "import" both modules and non-modules?)

  • What happens in Python when a module is imported?

    • Is the source code necessary to make imports work?

    • Can I import from things that are not Python code? How?

  • How do I write an absolute import statement?

  • How do I write a relative import statement?

    • Why doesn't import .example work?
  • How does Python look for modules, and how do I influence that

    • ... when doing an absolute import?

    • ... when doing a relative import?

      • Why can't Python always find the parent module (or "package") in the parent directory?

      • What's necessary in order to set up working relative imports?

    • Can I import a module "dynamically" (i.e. using a path to the code file decided at runtime)? How?

      • (Probably something about how __import__ works)
    • Why did my import find the wrong file (raise an exception based on the wrong file's contents)?

      • Why did I get an import error from my code unexpectedly importing itself?

      • Why does my REPL break, etc. when I name my code the wrong way?

      • How can I fix "shadowing" problems (e.g. access the standard library despite my own code's module names)?

    • What does and doesn't work in terms of circular imports in Python?

    • Why does top-level module code only run once when I import the module multiple times? (How) can I "reload" the module?

    • (It might make sense to factor out a more general question about the sys.modules cache, and have some other things refer to that. We can worry about that later.)

  • How can I choose between relative and absolute imports?

  • What do __init__.py files accomplish?

  • (Probably a lot of questions about virtual environments and packaging; I've done some of these already and the rest may be less important)

History

0 comment threads

+4
−0

I've had (and likely will still have) beginner-level problems in learning Ruby and/or Rails.

something about... When I've run into problems so far, I didn't have a good-enough understanding to be able to form a proper question, and instead got help from other developers in the project. So I'm afraid my list is going to be mostly "something about X" rather than real titles.
  • Something about scoping and the unscoped keyword.

  • Something about nil-safe references. I can stick a & on the end of everything that could be nil in function calls like something&.function(), where calling function() on nil emits an error, but I probably shouldn't just be sprinkling &s through my code just in case, right? But what should I be doing?

  • This might sound dumb, but in view code, it took me a while to notice (and thus get) the difference between <% ruby code %> and <%= ruby code %>.

  • Our project uses the MVC pattern but there are also helpers (in app/helpers, alongside app/view etc). How are those tied in to the rest of the code? I usually run into this by starting from a view, trying to track behavior back to the controller, and coming up empty in the controller.

  • Something about database migrations versus maintenance tasks -- if I need to move some data, when should I prefer which?

History

0 comment threads

+3
−0

I'd like to see more language-agnostic questions about general programming-related concepts.

I've already tried to do that with a recent Q&A pair: What are the criteria to define if a programming language is compiled or interpreted?.

More suggestions

Unicode related questions. I guess "What is Unicode?" is too broad, we could split it in more specific ones:

  • What is an Unicode code point?
  • How Unicode defines a character?
  • What are encodings?
  • What are the normalization forms?
  • What's a collation?

Floating point arithmetic:

  • Why 0.1 + 0.2 == 0.3 is false?
  • What is IEEE 754?
  • Why NaN is not equal to itself?

Others:

  • Paradigms. There's already What's the difference between Inheritance and Polymorphism?, but it could expand to:
    • What's functional Programming?
    • What's Object Oriented Programming?
    • And so on (maybe those are too broad and could be split in more specific questions)
  • Type systems: difference between static and dynamic typing, strong and weak typing

Of course those topics might expand to other questions about language-specific uses, but I think that having a more general question would make it clear what parts belong to the broader concept, and what parts are specific to each language.

History

0 comment threads

Sign up to answer this question »