Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #2607

E

Enterprise Craftsmanship

Personal blog · enterprisecraftsmanship.comprogrammingcareer

Enterprise Craftsmanship is a personal blog at enterprisecraftsmanship.com about programming and career. Since 2015, 29 different Hacker News readers have linked it 87 times, most often “When to Mock”. The last post was in 2023, but the archive is still widely read.

Visit the blog
87mentions?
29HN people?
2015–2025first – last linked?
Links on Hacker News per year · peak 29 in 2015

Too few sampled comments (8) to say how often HN recommends it.?

Why HN links it

HN readers cite Khorikov's posts on mocking, unit testing and dependencies. They are recommended as a clearer overview than Fowler's mocks article and as guidance for using fewer mocks.

Summarised by Claude from a sample of 8 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Painless Unit Testing

Most-linked posts?

  1. When to Mock
    3 people · 5 mentions · first linked 2020-04-15
  2. SQL vs. NoSQL: you do want to have a relational storage by default
    3 people · 3 mentions · first linked 2015-11-06
  3. Growing Object-Oriented Software, Guided by Tests Without Mocks
    2 people · 3 mentions · first linked 2016-07-05
  4. How I tried to get into game development and failed
    2 people · 3 mentions · first linked 2017-07-26
  5. What is functional programming?
    2 people · 2 mentions · first linked 2016-04-21
  6. You are naming your tests wrong
    2 people · 2 mentions · first linked 2019-08-28
  7. Growing Object-Oriented Software, Guided by Tests Without Mocks (2016)
    2 people · 2 mentions · first linked 2021-08-09
  8. Test-induced design damage or why TDD is so painful
    2 people · 2 mentions · first linked 2015-06-29
  9. Law of Demeter and immutability
    2 people · 2 mentions · first linked 2016-09-29
  10. TDD best practices
    2 people · 2 mentions · first linked 2015-08-03

What Hacker News says?

  1. Do you need an ORM? http://enterprisecraftsmanship.com/2015/11/30/do-you-need-an...

    Comment linking /2015/11/30/do-you-need-an-orm/

    on “Uncle Bob and Silver Bullets”
  2. Submitted How I tried to get into game development and failed as a story · 295 points

    HN discussion
  3. > how are you suppose to "unit test" that you properly increment a varibale before inserting into the DB without mocking the DB? You put the logic that increments that variable into a pure function and unit test the input/output pair. Because it is now decoupled from the database, you don't have to deal with it. > mocks allow you to isolate the unit to be tested. You achieve isolation instead by refactoring to a "pu…

    Comment linking /posts/when-to-mock/

    on “Don’t mock what you don’t own”
  4. Submitted Database versioning best practices as a story · 171 points

    HN discussion
  5. I see a lot of complaints from you. But I should mention that nhibernate is not even in the dotnet foundation and not supported for .net core ( I visited their site and it mentions dotnet framework). I see this though: https://enterprisecraftsmanship.com/posts/nhibernate-now-sup... So the issue is mostly nhibernate?

    Comment linking /posts/nhibernate-now-supports-net-core-2-0/

    on “20 Years of .NET”
  6. Submitted Unit testing anti-patterns: Structural Inspection as a story · 148 points

    HN discussion
  7. > The heart of the argument presented is that using mocks in unit tests is problematic (...) If you use real implementations No. As you say, the moment you have a real out-of-process dependency, you no longer have a unit test, but an "integration-with-external world" test. The heart of the argument is to not mock out internal (in-process) business logic. Instead: a) do not use mocks (e.g. leveraging Moq); use fakes…

    Comment linking /posts/when-to-mock/

    on “Favor real dependencies for unit testing”
  8. Submitted C# and F# approaches to illegal states as a story · 95 points

    HN discussion
  9. Here’s another review / critique of this book, but with a full implementation based on the author’s grievances: https://enterprisecraftsmanship.com/posts/growing-object-ori... . The main point of it is to avoid testing via mocks and to also avoid interfaces that are only there for testing purposes. The end design is extremely simple, and because it has command / query separation, the actual logic is trivially testab…

    Comment linking /posts/growing-object-oriented-software-guided-by-tests-without-mocks/

    on “Growing object-oriented software vs. what I would do”
  10. Submitted Early exit is a tail call optimization of procedural languages as a story · 93 points

    HN discussion
  11. arwhatever · 2021-01-30Recommends
    Might I recommend this overview? https://enterprisecraftsmanship.com/posts/when-to-mock/ I more understand the Martin Fowler article quite well, but only after struggling with it and revisiting it (sporadically) over several years, and I really think this by Mr, Khorikov gives a much clearer, more straightforward overview.

    Comment linking /posts/when-to-mock/

    on “Mocks Aren't Stubs (2007)”
  12. Submitted When to Mock as a story · 59 points

    HN discussion
  13. spawarotti · 2020-09-24Recommends
    Came here to say exactly that. The author is advocating for mockist style of unit testing, which is quite terrible for many, many reasons. What you are describing is classic unit testing, and this is the way to go. Good article and book about it: - https://enterprisecraftsmanship.com/posts/unit-testing-depen... - Unit Testing Principles, Practices, and Patterns

    Comment linking /posts/unit-testing-dependencies

    on “Evil Unit Testing (2019)”
  14. Submitted Make hard coding your default choice as a story · 43 points

    HN discussion
  15. > How many places in your code create new users, and how many places in your code need to validate users? If the answer is “many,” you have serious design problems that should not be solved by introducing more classes but by restricting how many different areas of code do the same job. Consider an application where you can edit and add users. Consider that you can also add users to groups and remove users from group…

    Comment linking /2015/03/20/functional-c-handling-failures-input-errors/

    on “Value Objects – DDD with TypeScript”
  16. Submitted Law of Demeter and immutability as a story · 41 points

    HN discussion
  17. kraftman · 2018-08-15Recommends
    I found this set of articles great for using less mocks and creating less brittle tests: https://enterprisecraftsmanship.com/2015/07/06/how-to-do-pai...

    Comment linking /2015/07/06/how-to-do-painless-tdd/

    on “Observations on the testing culture of test-driven development”
  18. Submitted SQL vs. NoSQL: you do want to have a relational storage by default as a story · 16 points

    HN discussion
  19. Submitted Law of Demeter and immutability as a story · 9 points

    HN discussion
  20. Submitted Test-induced design damage or why TDD is so painful as a story · 5 points

    HN discussion
  21. Submitted Growing Object-Oriented Software, Guided by Tests Without Mocks as a story · 4 points

    HN discussion
  22. Submitted The most important TDD rule as a story · 4 points

    HN discussion
  23. Submitted You are naming your tests wrong as a story · 3 points

    HN discussion
  24. Submitted To TDD or not to TDD as a story · 3 points

    HN discussion
  25. Submitted OOP, FP, and object-relational impedance mismatch as a story · 3 points

    HN discussion
  26. Submitted OOP, FP, and object-relational impedance mismatch as a story · 3 points

    HN discussion
  27. Submitted Is SQL a good place for business logic? as a story · 3 points

    HN discussion
  28. Submitted Why following software design best practices decreases code complexity as a story · 3 points

    HN discussion
  29. Submitted Why following software design best practices decreases code complexity as a story · 3 points

    HN discussion
  30. Submitted C# and F# approaches to illegal states as a story · 3 points

    HN discussion

Search all of HN for enterprisecraftsmanship.com

Linked by the same people?