byby
No user record in our sample, but byby has activity below (stories or comments). Likely we have partial data — the full bulk-load will fill profiles in.
No user record in our sample, but byby has activity below (stories or comments). Likely we have partial data — the full bulk-load will fill profiles in.
[dead]
[dead]
[dead]
[dead]
No. This is false. Even senior engineers can have this problem. It's not a differentiator for success. This is counterintuitive but actually there is raw science to back the opposite fact up. I'm not joking. The more…
Yeah but to keep on topic you suggested that this sort of thing was happening in the thread. I disagree, it's not.
>You've written 3 functions instead off one. 3 functions is better. Think about it. Do people write all their stuff in one big function? No. Better to compose higher level functions with smaller ones rather then write…
[flagged]
[flagged]
This is the function I gave chatGPT: ME: def (x: int): for i in range(x): print(i) It takes an int. Are you trolling now or did you get mixed up with something else?
Alright fine, I can concede to this. ChatGPT should not have given me the best alternative but it should have given me the exact technically correct answer. You're right.
[flagged]
[flagged]
[flagged]
https://www.testim.io/blog/unit-test-vs-integration-test/ Bro just read up on what a unit test is. You clearly didn't know.
I've been writing them for over 20. Doesn't matter. What matters is factual correctness. See here what a unit test is versus integration test: https://www.testim.io/blog/unit-test-vs-integration-test/ And also see my…
> I'm sorry, I clearly haven't explained myself well as otherwise you would not have wasted a huge amount of text tying yourself in knots based clearly on a mistaken apprehension of what I was saying. No need to…
>Output formatting is still a type of transformation! I'll quote part of my reply (which you missed): (Btw making print formatting unit testable means segregating the formatting from the print. Produce the string first,…
[flagged]
It is. There is literally zero other way to make that function unit testable. What are you gonna compare that data with in a test if it's thrown into IO? By definition all unit testable functions have to return data…
You have to change the semantics of the function to make it unit testable. Literally tell me how else can you test that function with a unit test? By definition a unit test can only test functions that return data. So…
>That would be fine if the core thing needing unit testing was the data generation/ transformation logic, but just as often as not it's the output formatting too. Output formatting touches io. In this case it is no…
Bro, dependency injection and mocking is the same thing as segregating your function from IO. Your replacing io calls to stdout with io calls to something else. But that doesn't make your code unit testable. The…
Yeah those crazies are far and few in between and none of them are on this thread. Throwing out religious accusations is going too far.
I think you don't understand what unit testability means. It means removing IO and side effects from your code. How the hell do I test a print function? I take the print function and match it with what? It has no output…