Live data from Hacker News

Viewing profile — byby

byby

HN member
Joined
Thu, May 18, 2023, 2:54 PM UTC
HN karma
63
Public activity
79 items

About byby

No profile information was provided.

Recent public activity

  1. comment
  2. comment
  3. comment
  4. comment
  5. 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…

  6. 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.

  7. 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…

  8. comment
    Comment #36070065

    [flagged]

  9. comment
    Comment #36065257

    [flagged]

  10. 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?

  11. 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.

  12. comment
    Comment #36064605

    [flagged]

  13. comment
    Comment #36064445

    [flagged]

  14. comment
    Comment #36064437

    [flagged]

  15. comment
    Comment #36064391

    [flagged]

  16. 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-…

  17. 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…

  18. 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…

  19. comment
    Comment #36063609

    [flagged]

  20. 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…

  21. 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…

  22. 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…

  23. 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…

  24. 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.

  25. 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…