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
    A

    Andrew Lock

    andrewlock.net · Personal blog · on HN since 2018

    Andrew Lock, a .NET developer, writes about ASP.NET Core, .NET internals and Git workflow tips.

    Visit blogRSSHN submissions
    ProgrammingWeb Development
    What HN says

    HN commenters link his post on git rebase --update-refs as a useful way to work with stacked branches, and cite his .NET guidance.

    Stats for nerds
    47HN people shared it
    39linked in comments
    381story points
    May 2026last shared
    2018people per year2026

    Top posts on HN

    1. 1
      Understanding the Worst .NET Vulnerability
      1 person · 197 points · first shared 2025 · 63 comments on HN
    2. 2
      Working with stacked branches in Git is easier with –update-refs (2022)
      16 people · 73 points · first shared 2022 · 15 comments on HN
    3. 3
      Fixing an old .NET Core native library loading issue on Alpine
      1 person · 68 points · first shared 2025 · 31 comments on HN
    4. 4
      Closed class hierarchies (Exploring the .NET 11 preview – Part 4)
      2 people · 3 points · first shared 2026 · Discussion on HN
    5. 5
      Running .NET in the browser without Blazor
      1 person · 3 points · first shared 2025 · Discussion on HN
    6. 6
      A Quantum RNG for .NET: The quantum measurement problem and many-worlds approach
      1 person · 3 points · first shared 2019 · Discussion on HN
    7. 7
      Companies complaining .NET moves too fast should just pay for post-EOL support
      1 person · 3 points · first shared 2025 · 2 comments on HN
    8. 8
      Using strongly-typed entity IDs to avoid primitive obsession (Part 1)
      3 people · 2 points · first shared 2019 · Discussion on HN
    9. 9
      Adding simple email address obfuscation for your blog (2020)
      2 people · 2 points · first shared 2020 · Discussion on HN
    10. 10
      Rendering Blazor components to a string: Exploring the .NET 8 preview – Part 9
      1 person · 2 points · first shared 2023 · Discussion on HN

    What HN people wrote when they linked it

    • carapaceNov 2022

      In the first place this is an error of RTFM kind. The "problem" behaviour is literally documented in the docs. However, in the second place, this is the wrong solution for the original problem. (The author links to https://andrewlock.net/why-is-string-gethashcode-different-each-time-i-run-my-program-in-net-core/ )

      The original problem is using linked lists to handle hash collisions. Assuming this is what you want (to keep all values rather than discarding old values, like e.g. Python's dict objects do) obviously you should use a data structure that can handle the case of lots of collisions well, or check your user input.

      At the very least the function should have a name that reflects its behaviour, eh? "GetUnguessableHashCode()" or something?

      This reminds me of the recent fiasco over in Python land where somebody noticed that int() called on large strings can block the interpreter. The obvious solution is to add an optional timeout parameter (the problem is in the time domain after all.) Instead they added a limit to the size of strings you can pass to int()!

    • artimaeisDec 2025

      You specified working with web and .NET Core (now just called .NET). Given the scope of modern .NET I don't think I can recommend a single book, but I've tried to order this in how I see them as most to least impactful for a dev.

      For web dev specific guidance it's hard to beat ASP.NET Core in Action by Andrew Lock. Check out Lock's blog too at https://andrewlock.net, it's a great source of new features happening in ASP.NET. He does go into publishing an app on both Windows and Linux, with a decent guide to both. But you'll probably want to read through MSDN docs on that as well, I don't think there's a book that goes in very deep on that.

      For generally writing modern C# using .NET, I like Code like a Pro in C# by Jort Rodenburg.

      For a quick tour of modern C# features C# 12 in a Nutshell by Albahari is basically the reference guide. 12 is the latest, grab any of them from probably 7 up for a decently modern take.

    • edfletcher_t137Jun 2024

      > - Somehow reviewers never seem to like the stack of PRs, my experience is they always react with disdain and/or confusion.

      Are people sending multiple branches of the stack for review at once? It should only ever be the "bottom" branch out-for-review at any time.

      > - Namely there would be review comments on the first PRs that then cause a cascade of merge conflicts in the follow-on PRs

      This can still happen in the model above of course as you need to make changes to the bottom branch in response to review comments/requests.

      However, as I noted elsewhere, `--update-refs` is an absolute god-send in those situations: https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/

      It reduces a ton of manual work (scaled by how many branches you have stacked!) to one operation.

    • pjc50Dec 2023

      Great examples.

      Is source generation becoming "trendy"? Microsoft have recently added more of it to C#, in order to support their AOT efforts. It's a bit infrastructure-heavy as it seems to be intended for point support for specific things, rather than a general purpose "write code to generate code" tool. But I wonder if there would be a market for such a thing. The architecture currently does not allow you to edit user source code, just add more code. I.e. it's not a preprocessor, it just has readonly access to the AST.

      e.g. the regex generator https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-source-generators

      (Reference blog post https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/ )

    • algorithmsRcoolNov 2024

      Another related effect of this is Protocol Ossification [0] which happens when implementers of a public API/Protocol surface area take implicit dependencies on common but not standardized behaviors of the API/Protocol implementation.

      That being said, you can take proactive steps to defeat this. For example, the default Hash for strings in .NET is randomly seeded each time a process starts[1] in order to strongly dissuade folks from taking an implicit dependency on the underlying algorithm which is not guaranteed to be stable

      [0] : https://en.wikipedia.org/wiki/Protocol_ossification

      [1] : https://andrewlock.net/why-is-string-gethashcode-different-each-time-i-run-my-program-in-net-core/

    • dmsnellJul 2025

      You can interactively rebase after the fact while preserving merges even. I usually work these days on stacked branches, and instead of using —-fixup I just commit with a dumb message.

      git rebase -i --rebase-merges --keep-base trunk This lets me reorganize commits, edit commit messages, split work into new branches, etc… When I add --update-refs into the mix it lets me do what I read are the biggest workflow improvements from jj, except it’s just git.

      This article from Andrew Lock on stacked branches in git was a great inspiration for me, and where I learned about --update-refs:

      https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/

    Related

    .NET Blogdevblogs.microsoft.com/dotnet390 people

    .NET 5.0

    .NET Blog
    Company · last shared 2026
    Jeremy D. Millerjeremydmiller.com21 people

    Moving from RavenDB to Marten (a document store on top of PostgreSQL)

    Jeremy D. Miller
    Personal · last shared 2023
    Matt Warrenmattwarren.org49 people

    Adding a new Bytecode instruction to the .NET runtime

    Matt Warren
    Personal · last shared 2023
    ASP.NET Blogdevblogs.microsoft.com/aspnet26 people

    Blazor Now in Official Preview

    ASP.NET Blog
    Company · last shared 2021
    Azure DevOps Blogblogs.msdn.microsoft.com/devops41 people

    A security vulnerability in Git that can lead to arbitrary code execution

    Azure DevOps Blog
    Company · last shared 2020
    AdaCore Blogblog.adacore.com106 people

    Nvidia Security Team: “What if we just stopped using C?” (2022)

    AdaCore Blog
    Company · last shared 2025
    Stephen Clearyblog.stephencleary.com29 people

    There is no thread (2013)

    Stephen Cleary
    Personal · last shared 2025
    Andrew Ayeragwa.name60 people

    Sign arbitrary data with your SSH keys

    Andrew Ayer
    Personal · last shared 2026