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 »

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.

Activity for qohelet‭

Type On... Excerpt Status Date
Comment Post #290905 It works both ways, I just assumed there is some formal convention perhaps defined somewhere. I couldn’t find it but did see examples of doc strings in the std lib so assume that is the convention but not any kind of standard per se
(more)
2 months ago
Comment Post #290907 I just updated the answer. It works fine both ways in `cargo doc`
(more)
2 months ago
Edit Post #290907 Post edited:
Clarified
2 months ago
Comment Post #290907 I don't know. Good question!
(more)
2 months ago
Edit Post #290907 Post edited:
2 months ago
Edit Post #290907 Initial revision 2 months ago
Answer A: Proper location of docstring on struct with attributes
Option 1. The docstring precedes the attributes by convention. Here is an example of the docstring for `std::vec::Vec`. However, if using `cargo doc` to generate documentation, it works just fine if you put it after as well.
(more)
2 months ago
Edit Post #290905 Post edited:
2 months ago
Edit Post #290905 Post edited:
fix formatting
2 months ago
Edit Post #290905 Initial revision 2 months ago
Question Proper location of docstring on struct with attributes
When documenting a struct with attributes, where does the docstring go? Before or after the attribute(s)? Option 1: ```rust /// Does it go here? #[derive(Deserialize, Debug)] pub struct Metadata { pub version: f32, pub contributors: Vec } ``` Option 2: ```rust #[derive(Des...
(more)
2 months ago
Comment Post #289184 Try spelling `Sereialize` correctly.
(more)
2 months ago
Edit Post #290884 Initial revision 2 months ago
Question Why does this work? .collect() automatic conversion to function return type
I'm completing the `rustlings` exercises as part of self-teaching Rust. While working on the third iterators exercise, I solved the exercise but don't quite understand why my solution works. Specifically, I made two functions that are identical except for their name and return type, but the functi...
(more)
2 months ago
Comment Post #290488 See also: https://youtu.be/aHaBH4LqGsI?feature=shared
(more)
3 months ago
Comment Post #285801 Agreed. By all means close
(more)
almost 2 years ago
Comment Post #285801 Weird. I was able to get getenv to work once I switched to parentheses instead of brackets. environ still does not work for me for some reason. Maybe something weird with being in a conda virtual environment.
(more)
about 2 years ago
Comment Post #285801 Doh! Thank you! This solved it for me
(more)
about 2 years ago
Edit Post #285801 Post edited:
about 2 years ago
Edit Post #285801 Post edited:
about 2 years ago
Edit Post #285801 Initial revision about 2 years ago
Question Load environment variables from .env file in Python 3
In Python 2, I was able to create a file named `.env` within a project folder like so: # .env MYID=abc123 TOKEN=4567890 Then in a Python file in the same directory, I could read these variables like so: # example.py import os id = os.environ["MYID"] token =...
(more)
about 2 years ago
Edit Post #280222 Initial revision over 3 years ago
Question Capture args from repeatable flags in Golang pflags package
How do I create a flag that can be used multiple times in a command using the `pflag` package? For example, let's say I wanted to select multiple fields and did not want to have to use comma-separation with a single flag, but instead something like follows: cmd -f field1 -f field2 -f field3 ...
(more)
over 3 years ago
Comment Post #278303 I agree with the Power User migration but have no issues with them in either location.
(more)
over 3 years ago
Comment Post #278303 While I agree with you, why do we allow a ton of questions about Google Sheets and Excel if this is true? It seems like those are the majority of questions here
(more)
over 3 years ago
Comment Post #278809 @klutt true, depending on style of collecting params via stdin, usually clicking "Enter" is sufficient to accept default values. However, they could be ignored altogether in CLI params and just sensible defaults used (but I see your point that this could also be the case at runtime also if an alterna...
(more)
over 3 years ago
Edit Post #278791 Post edited over 3 years ago
Comment Post #278830 @Lundin The C++ list is the main one I'm aware is referenced actively even by non-SO users. The others I threw in as additional examples, but apparently are examples of what _not_ to do.
(more)
over 3 years ago
Comment Post #278830 Good to know, @Lundin !
(more)
over 3 years ago
Edit Post #278830 Initial revision over 3 years ago
Answer A: Are reference requests welcome here?
Consider the following posts which have essentially become canonical references in their own right within their respective communities on SE: The Definitive C++ Book Guide and List (viewed 2.5 million times) The Definitive C Book Guide and List (viewed 451 thousand times) The definitive gu...
(more)
over 3 years ago
Comment Post #278794 @Moshi IIS and then just have a tag for [url-rewriting] and nothing more specific IMHO
(more)
over 3 years ago
Suggested Edit Post #278791 Suggested edit:
Nitpicky edits for clarity
(more)
helpful over 3 years ago
Edit Post #278809 Post edited:
added consideration based on comment
over 3 years ago
Edit Post #278809 Post edited:
over 3 years ago
Edit Post #278809 Post edited:
Other considerations
over 3 years ago
Edit Post #278809 Initial revision over 3 years ago
Answer A: For scripting what are the pros and cons of command line arguments versus capturing input at the start?
Pros of CLI arguments/flags include: Easier to leverage the tool in another script or via other automation so that user interaction is not required If certain arguments are optional and/or have default values, the user is not burdened with these choices when they are unimportant Once ...
(more)
over 3 years ago
Edit Post #278808 Post edited:
over 3 years ago
Edit Post #278808 Post edited:
over 3 years ago
Edit Post #278808 Post edited:
over 3 years ago
Edit Post #278808 Post edited:
over 3 years ago
Edit Post #278808 Initial revision over 3 years ago
Question Are hyphens and/or underscores valid in golang package names?
Can a Go package name validly contain a hyphen and/or an underscore? The godocs say that >By convention, packages are given lower case, single-word names; there should be no need for underscores or mixedCaps. However, this does not indicate if underscores are invalid/illegal vs. simply not f...
(more)
over 3 years ago