I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
You could do the same thing with the original question and this clarification:
// Here are my expected resultsDataRow("1/1/2019","2/15/2019",14);// 2DataRow("1/1/2019","1/13/2019",14);// 0DataRow("1/1/2019","12/31/2019",31);// 8
I know there's not a lot of difference, but it's quicker to write and less code for other people to mentally parse. It's not just about providing code that can be pasted into a file and compiled (the "complete"ness), it's also about how quickly and easily other visitors can run through the program using their brain as the interpreter.
I think the users you spoke to were right: people aren't going to do this. I also think it'd be great if people did.
As an exercise, it's also good because the act of splitting it up into testable chunks with descriptive names means you probably solve this kind of question yourself.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You could do the same thing with the original question and this clarification:
I know there's not a lot of difference, but it's quicker to write and less code for other people to mentally parse. It's not just about providing code that can be pasted into a file and compiled (the "complete"ness), it's also about how quickly and easily other visitors can run through the program using their brain as the interpreter.
I think the users you spoke to were right: people aren't going to do this. I also think it'd be great if people did.
As an exercise, it's also good because the act of splitting it up into testable chunks with descriptive names means you probably solve this kind of question yourself.