juan_gandhi: (Default)
[personal profile] juan_gandhi
 So, if you think you call a function in your code, and this function returns current time, or a random number... IT'S NOT A FUNCTION. Your code is function of "random number", or "time".

So, if your code is written as something that retrieves this kind of data, to test your code, you should provide that data. Not just today, but try the time, like 10 years from now. As to "random", You provide the randomness. If your code cannot be fixed to behave as a function of those inputs, make your "random stream" or "time stream" not hard-coded, but substitutable. Mockable. And mock it in your tests. MAKE SURE that you don't provide just happy-path data. Provide anything. A sequence of 100 numbers 4 for random. Time that is 10 years from now. Or even 30 yeas from now.

Make sure that your tests don't depend on anything. Because test Must Be Reproducible.

All these things, I know, are obvious to some, and not obvious to others.

If you still have questions, ask. But don't argue. Because what I say is math. Unless you have another math (some people do), or another logic (there's plenty of them), please don't argue.

I'd be glad to see how all this changes if logic is e.g. linear. 

 

Re: "то есть" trick

Date: 2020-08-26 03:45 pm (UTC)
From: [personal profile] sassa_nf
> Did you ... or did you ...?

I am not inclined to answer your questions because you are not inclined to answer mine. Although by saying this I've just answered one of yours.

> Is that what you are doing?

This is a "то есть" trick of yours, so the best I can do is ignore.

Expecting answers to unasked questions

Date: 2020-08-26 06:09 pm (UTC)
dennisgorelik: 2020-06-13 in my home office (Default)
From: [personal profile] dennisgorelik
> I am not inclined to answer your questions

Yes.
That suggests that you are avoiding reaching clarity in our communication.

> because

That causality claim is wrong.

> you are not inclined to answer mine

This your hypothesis is wrong.
I am, actually, inclined to answer your questions, but you did not ask any questions [at least in the last 8 your replies to me].

Re: Expecting answers to unasked questions

Date: 2020-08-27 06:10 am (UTC)
From: [personal profile] sassa_nf
> I would rather you answered whether you understood the substance of the post.

Re: Expecting answers to unasked questions

Date: 2020-08-27 04:59 pm (UTC)
dennisgorelik: 2020-06-13 in my home office (Default)
From: [personal profile] dennisgorelik
Are you implying that it was your way of asking a question?

Re: "то есть" trick

Date: 2020-08-26 06:16 pm (UTC)
dennisgorelik: 2020-06-13 in my home office (Default)
From: [personal profile] dennisgorelik
>> Is that what you are doing?

> This is a "то есть" trick of yours

What is "то есть" trick?
How is that trick relevant to my question?

> the best I can do is ignore

Nope.
Not entering discussion in the first place -- is a much better for saving time.
Answering the question is the best for reaching clarity.
Entering discussion and then not answer clarifying questions that pop up in that discussion -- is, usually, a bad choice. I disrespect such behavior.
Edited Date: 2020-08-26 06:18 pm (UTC)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 23rd, 2025 05:43 am
Powered by Dreamwidth Studios