|
maze3 wrote: Why - so it can be learned by a broader group of people. Hahaha, that broad group isn't inhibited now; they're free to learn the subject. So no, I won't accept that as a reason.
If I want to add unit-test with my answer on CP, I can do so; simply add a link to the GitHub that contains them.
Next, answers should be short and to the point, with examples being as simple as possible - anything that isn't relevant to the question or answer should not be there; imagine a book to learn C# that has unit-tests for its "Hello world".
Finally, it will mean very few volunteers there; given the questions here (and there), a unit-test is hardly relevant. Also lot of people who might want to answer, and won't (due to the added requirement).
Perhaps you want full XML-documentation too? And did you consider asking for multi-version answers, so that you can download code & unit-test for your exact .NET version? And, if the question involves a database, a complete SQL-script to generate the structure and fill it with test-data? Let's have all that before allowing someone to answer
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Maybe the code isn't posted to the thread at all, maybe the person answering should have to physically visit the asker to enter the code directly into their solution and fixed any errors that occur?
|
|
|
|
|
Exactly, but you worded it a lot better
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
[TestMethod]
public void QuestionIsAnsweredCorrectly()
{
var question = GetQuestion();
var answers = question.GetAnswers();
var isCorrect = answers.Any(a => a.Body.Contains("duplicate") || a.Body.Contains("Google") || a.Author == "Jon Skeet");
Assert.IsTrue(isCorrect);
} Directly taken from the StackExchange source code
|
|
|
|
|
When they can't even get the lusers posting irredeemable drek to post an MCVE; isn't just a bridge too far. It's a bridge from here to Jupiter where the people who're failing to ask good questions have all gone to get more stupider.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
By "unit tests" you probably mean "unit tests, according to test-driven-development standards" (or a TDD variant).
Problems with this idea:
1. You can't learn TDD by code snippets and basic intuition; you learn its theory by organized study, and then do lots of exercises to solidify the knowledge.
2. The vast majority of unit tests written in the industry are by people who don't understand TDD basics. The answers with unit tests will be written (and upvoted) by people who don't understand TDD, accomplishing nothing for beginners hoping to gain useful knowledge.
3. TDD is not as widespread or useful to the industry as it appears. People pay lip service to how wonderful it is, clutter their code with useless unit tests not written according to any real standard, and then proceed to ignore all those useless unit tests 99% of the time (except for the 1% of the time where they talk about how wonderful and useful the unit tests are).
|
|
|
|
|
Are you making the suggestion to ensure the cut-and-paste "developers" have even less to do on their own?
|
|
|
|
|
Squeeze copper for spinner (5, 7)
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
|
Nope
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
Squeeze PRESS
copper OFFICER for spinner
PRESS OFFICER
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Yep, thought it was time for another spinner clue and was way too lazy to come up with one for Muttiah Muralitharan ...
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|
|
I don't know what I've started here with spinner , twirly to tell
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
|
Judging by reactions, you'd think mass suicides would've been reported shortly thereafter.
|
|
|
|
|
|
It doesn't matter how quickly and creatively you solve the problems, the wife will find you something to do immediately...
(As they say the greatest pain of a wife is seeing her husband sitting without any project to do)
Wizard of Id by Parker and Hart for June 05, 2019 - GoComics[^]
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
well yes, projects are all fine, but during the project the wife's role changes:
- "why do you have to make so much mess?"
- "when will it be done? I'm expecting people over soon"
- "make sure that you ..."
....the inevitable:
- "do you know what you are doing?"
that's not counting the offers to help [when you know she can't, wont or will make it harder]
Message Signature
(Click to edit ->)
|
|
|
|
|
The things we men do for...
Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
...and that proves what an idiot men are...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
I know someone who downloads pretty much anything and everything he can find (whether he's got a use for it or not) because, the way he describes it, he's paying for the bandwidth anyway, so he might as well keep his router busy downloading stuff all the time.
I'm told being married is the same--she married you to do things she can't/won't do herself, and she hates to see you not being busy.
I'm guessing the key to a happy marriage is to make sure you always look busy.
|
|
|
|
|
I picked up a few items for lunch at the cafeteria and there was this cashier woman who took my payment. The cutlery box is usually just beside the till, which I found only had forks and knives. I immediately had an ear-to-ear smile, and told her with gleeful eyes: "There is no spoon" (I did my best with the voice).
The lady said "I'm sorry, I'm sorry", started backing away and went straight into the kitchen and shrieked "somebody bring the spoons from the dishwasher, please". She must have taken me either for some kind of a psycho creep, or a en entitled prick.
I giggled at the dude behind me in line, and said "I can't believe there was a real-life scenario that let me tell someone 'there is no spoon', but I think she unfortunately didn't get it".
This dude's face turned almost pale, and he responded confusingly: "Sorry mate, the cutlery comes from the dishwasher and the staff could sometimes be behind in replenishing it at the front. You could drop in a complaints/compliments form on the box as you go out".
/FML
|
|
|
|
|
That movie is old enough by now that you may as well have stared at her and intoned: "Rosebud"
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
|
These are not the spoon you were looking for, I am afraid!
|
|
|
|