Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    V

    Vladimir Khorikov

    enterprisecraftsmanship.com · Personal blog · on HN since 2015

    Vladimir Khorikov writes about software design, unit testing, domain-driven design, and .NET development.

    Visit blogHN submissions
    ProgrammingDesign & UX
    What HN says

    HN commenters recommend his posts on when to mock and on testing without mocks, and favor his classical approach to unit testing.

    Stats for nerds
    29HN people shared it
    78linked in comments
    1.1Kstory points
    Feb 2022last shared
    2017people per year2022

    Top posts on HN

    1. 1
      How I tried to get into game development and failed
      2 people · 298 points · first shared 2017 · 168 comments on HN
    2. 2
      Database versioning best practices
      1 person · 171 points · first shared 2015 · 70 comments on HN
    3. 3
      Unit testing anti-patterns: Structural Inspection
      1 person · 148 points · first shared 2018 · 51 comments on HN
    4. 4
      C# and F# approaches to illegal states
      2 people · 99 points · first shared 2015 · 92 comments on HN
    5. 5
      Early exit is a tail call optimization of procedural languages
      1 person · 93 points · first shared 2015 · 49 comments on HN
    6. 6
      When to Mock
      3 people · 60 points · first shared 2020 · 79 comments on HN
    7. 7
      Law of Demeter and immutability
      2 people · 50 points · first shared 2016 · 36 comments on HN
    8. 8
      Make hard coding your default choice
      1 person · 43 points · first shared 2015 · 52 comments on HN
    9. 9
      SQL vs. NoSQL: you do want to have a relational storage by default
      3 people · 20 points · first shared 2015 · 2 comments on HN
    10. 10
      Growing Object-Oriented Software, Guided by Tests Without Mocks
      4 people · 12 points · first shared 2016 · 1 comments on HN

    What HN people wrote when they linked it

    • stemmlerjsApr 2019

      > 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 groups. Consider that you might also be able to add policies to users. These are a few different areas in code where you might need to create an instance of a User.

      This is exactly what we're doing; we're limiting the amount of places where valid users can get created. The User domain object and it's invariants are validated right here at the model.

      If there was an invariant saying that users can't have more than 5 policies on them, a user.addPolicy(policy) method would exist right on the user model/aggregate root, and the aggregate root would be responsible for determining if any invariants will be unsatisfied after the operation.

      > Also, the private constructors do absolutely nothing. The static factory methods in this blog post could be written the exact same way as a constructor, and they would work exactly the same. The only reason the author uses a static factory method is because that's what he was taught to do in Java.

      The reason why I use a static factory method is because it allows you to protect the aggregate invariants (domain logic that deems the…

    • amw-zeroAug 2021

      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-oriented-software-guided-by-tests-without-mocks/.

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

      Give it a read. I love Growing Object oriented software guided by tests as well, these are all just different approaches with different mindsets.

    • spawarottiSep 2020

      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-dependencies

      - Unit Testing Principles, Practices, and Patterns

    • NicoJuicyFeb 2022

      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-supports-net-core-2-0/

      So the issue is mostly nhibernate?

    • arwhateverJan 2021

      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.

    • kraftmanAug 2018

      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-painless-tdd/

    Related

    matkladmatklad.github.io237 people

    Architecture.md

    matklad
    Personal · last shared 2026
    PVS-Studio Blogviva64.com135 people

    Criticizing the Rust Language, and Why C/C++ Will Never Die

    PVS-Studio Blog
    Company · last shared 2021
    Igor Ostrovskyigoro.com35 people

    Gallery of Processor Cache Effects

    Igor Ostrovsky
    Personal · last shared 2026
    Yossi Kreininyosefk.com387 people

    Yosefk - My history with Forth & stack machines

    Yossi Kreinin
    Personal · last shared 2026
    Vladimir Supalovvsupalov.com17 people

    You Don't Need to Rebuild Your Development Docker Image on Every Code Change

    Vladimir Supalov
    Personal · last shared 2024
    Hillel Waynehillelwayne.com294 people

    1/0 = 0

    Hillel Wayne
    Personal · last shared 2026
    Jeff Preshingpreshing.com147 people

    An Introduction to Lock-Free Programming (2012)

    Jeff Preshing
    Personal · last shared 2026
    Jessitronblog.jessitron.com64 people

    Hitting OKRs vs. Doing Your Job

    Jessitron
    Personal · last shared 2026