Viewing profile — byby
byby
HN member- Joined
- Thu, May 18, 2023, 2:54 PM UTC
- HN karma
- 63
- Public activity
- 79 items
- HN profile
- View on Hacker News ↗
About byby
No profile information was provided.
Recent public activity
-
comment
Comment #36086488
[dead]
-
comment
Comment #36086334
[dead]
-
comment
Comment #36076257
[dead]
-
comment
Comment #36073213
[dead]
-
comment
Comment #36071999
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 opposi…
-
comment
Comment #36070419
Yeah but to keep on topic you suggested that this sort of thing was happening in the thread. I disagree, it's not.
-
comment
Comment #36070376
>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 function…
-
comment
Comment #36070065
[flagged]
-
comment
Comment #36065257
[flagged]
-
comment
Comment #36064820
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?
-
comment
Comment #36064682
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.
-
comment
Comment #36064605
[flagged]
-
comment
Comment #36064445
[flagged]
-
comment
Comment #36064437
[flagged]
-
comment
Comment #36064391
[flagged]
-
comment
Comment #36064377
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-…
-
comment
Comment #36064097
> 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 o…
-
comment
Comment #36063845
>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 fr…
-
comment
Comment #36063609
[flagged]
-
comment
Comment #36063562
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 tes…
-
comment
Comment #36063540
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 onl…
-
comment
Comment #36063464
>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…
-
comment
Comment #36063330
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 ma…
-
comment
Comment #36062970
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.
-
comment
Comment #36062953
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 a…