Live data from Hacker News

Viewing profile — radanskoric

radanskoric

HN member
Joined
Thu, Jan 29, 2015, 9:48 AM UTC
HN karma
96
Public activity
57 items

About radanskoric

https://radanskoric.com/

Recent public activity

  1. comment
    Comment #46209331

    Author here. I didn't mention it because I wasn't writing an evaluation of fixtures. Just writing about how to make better use of fixtures. I actually use both fixtures and factori…

  2. comment
    Comment #46209273

    It's required for tests to clean up after themselves. With Rails and fixtures this is handled by default: each test runs inside a transaction which is rolled back at the end of the…

  3. comment
    Comment #46209249

    I'm with you on the one assertion per test. I bundled two assertions into the same test here because my whole point was to have them effectively together describe a single test, ju…

  4. comment
    Comment #46209144

    Ah, ok, now I understand. Ok, I wasn't talking about that. From what I understand about property based testing it's sort of half way between regular example based testing and forma…

  5. comment
    Comment #46205637

    Ah, Ok, yes, for API endpoints it makes a lot of sense. Especially if it's a public API, you need to inspect the output anyway, to ensure that the public contract is not broken. Bu…

  6. comment
    Comment #46205604

    Author here. Yes, what you describe sound where much like what I call Factories (and that's what they're usually called in Ruby land, and some other languages). The problem arises …

  7. comment
    Comment #46205456

    I think I'm getting what you mean and I almost completely agree with you, let me address one part, the only part where I don't agree: > Plus you do gain testing power, because you …

  8. comment
    Comment #46205355

    I'm familiar with snapshot testing for UI and I agree with you, they can work really well for this because they're usually quick to verify. And especially if you can build in some …

  9. comment
    Comment #46205327

    When you say inheritance do you mean DRY as in "Don't repeat yourself"? I'm not sure what you mean by inheritance in tests but DRY is criminally overused in tests. That could be a …

  10. comment
    Comment #46205297

    In theory you're 100% right, a true unit test is completely isolated from the rest of the system and than a lot of the problems disappear. In reality, that is also not free. It imp…

  11. comment
    Comment #46205223

    Your thinking is sound. At the end of the day Rails default fixtures is nothing more than some code that reads yaml files and creates records once at the start of test suite run. S…

  12. comment
    Comment #46204850

    Author here. I'm a big fan of factories but the slowness is a real drag on large test suites. If you're considering switching, remember that you can do it gradually, there's no law…

  13. comment
    Comment #46204819

    Author here. Thanks for writing up your thoughts on this! The "doesn't include non-active projects objections is easy", please check the Example 1 test again, there's a line for th…

  14. comment
    Comment #46204661

    Author here, thanks for posting. :)

  15. comment
    Comment #45858386

    Woah, this thread escalated quickly.

  16. comment
    Comment #45857212

    Can you explain why you say they would be better off? What else would be a better choice and why?

  17. comment
    Comment #45856687

    Have you used it over the last few years? It has it been rapidly improving, mainly because Shopify put a team full time on it. It doesn’t take a lot of people to optimize a VM/inte…

  18. comment
    Comment #44022173

    It's a sharp knife. You can create a messy nightmare or a clean super readable codebase, it's up to how good the author is.

  19. comment
    Comment #44016597

    No worries, I didn't think that's the case. :) It's an interesting conversation.

  20. comment
    Comment #44014469

    That was my misunderstanding as well. That's why I wrote the article. Btw, it's not even about the RubyLLM gem. The gem abstracts away the calling of various LLM providers and give…

  21. comment
    Comment #44014426

    Interesting. I've not used it but this sounds like the tools that were exposed to it need improvement. Everything you describe seems like it should be mostly in reach of current la…

  22. comment
    Comment #44014408

    Yes, exactly, Ruby has the human readability expressiveness. If you say that expressivity is the ability to implement a program in less lines of code then Ruby is more expressive t…

  23. comment
    Comment #44014385

    It's good that you commented. I see more than a few people are getting caught up on the number of lines so it's good that I clarify.

  24. comment
    Comment #44014115

    Why are people always the reason why we can't have nice things... :D

  25. comment
    Comment #44014108

    That's a very neat idea, maybe even add something like browser-use to allow it to implement a Rails app and try it out automatically. I think you should try it. :) I'm being seriou…