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

    Two Wrongs

    two-wrongs.com · Personal blog · on HN since 2015

    Two Wrongs is a personal blog on statistics, software design, Emacs, Awk, and decision-making.

    Visit blogHN submissions
    ProgrammingMathWriting & Thinking
    What HN says

    Commenters cite its Awk state machine parser pattern and statistical literacy essay, and one flags a site that copies its content.

    Stats for nerds
    74HN people shared it
    184linked in comments
    3.1Kstory points
    Sep 2024last shared
    2017people per year2024

    Top posts on HN

    1. 1
      Useful Uses of cat
      1 person · 274 points · first shared 2024 · 180 comments on HN
    2. 2
      Buying into the Emacs Platform (2018)
      4 people · 258 points · first shared 2018 · 133 comments on HN
    3. 3
      Code reviews do find bugs
      2 people · 224 points · first shared 2024 · 160 comments on HN
    4. 4
      Technical Writing: Learning from Kernighan
      1 person · 180 points · first shared 2018 · 46 comments on HN
    5. 5
      The Awk state machine parser pattern (2018)
      4 people · 175 points · first shared 2018 · 27 comments on HN
    6. 6
      The Bug in the Physical Building
      3 people · 167 points · first shared 2016 · 32 comments on HN
    7. 7
      Types as Interfaces
      1 person · 159 points · first shared 2024 · 194 comments on HN
    8. 8
      SI Units for Request Rate
      3 people · 140 points · first shared 2024 · 91 comments on HN
    9. 9
      .NET on Linux: What a Contrast
      1 person · 117 points · first shared 2024 · 106 comments on HN
    10. 10
      On Competing with C Using Haskell (2017)
      2 people · 111 points · first shared 2018 · 23 comments on HN

    What HN people wrote when they linked it

    • modernerdOct 2019

      This blog post may help some but readers shouldn't expect it to magically flick a switch that allows them to use or create monads.

      Instead, I really like:

      1. Stephen Diehl's “Eightfold Path to Monad Satori” from “What I Wish I Knew When Learning Haskell”:

      http://dev.stephendiehl.com/hask/#monads

      “Much ink has been spilled waxing lyrical about the supposed mystique of monads. Instead, I suggest a path to enlightenment:

      1. Don't read the monad tutorials.
      2. No really, don't read the monad tutorials.
      3. Learn about Haskell types.
      4. Learn what a typeclass is.
      5. Read the Typeclassopedia.
      6. Read the monad definitions.
      7. Use monads in real code.
      8. Don't write monad-analogy tutorials.

      In other words, the only path to understanding monads is to read the fine source, fire up GHC, and write some code. Analogies and metaphors will not lead to understanding.”

      2. Chris/kqr's “The ‘What Are Monads?’ Fallacy?”, which mirrors the advice from Stephen Diehl:

      https://two-wrongs.com/the-what-are-monads-fallacy

      “Instead, learn to use specific monads. Learn how Maybe a works, learn how Either e a works. Learn how IO a and [a] and r -> a works. Those are all monads. Learn to use them with the >>= operator and with do notation.

      Once you've learned how to work with all of those, you'll have a really good idea of how monads can be used.

      Asking "What is a monad?" to learn how to use monads is as wrong as asking "What is a musical instrument?" to learn how to…

    • neonsunsetAug 2024

      > I've been using .NET for far over a decade now. I even was at one of the hackathons for Windows Phone developers back in the day.

      This conversation comes up from time to time. It is sometimes difficult to talk to developers who have a perception of .NET that predates .NET Core 3.1 or so and newer. Windows Phone and its tooling is older. I am sad UWP has died, the ecosystem needs something better than what we have today, and the way Apple does portability with MacCatalyst is absolutely pathetic. In a better timeline there exists open and multi-platform UWP-like abstraction adopted by everything. But these were other times and I digress.

      The package distribution did not change significantly besides small things like not having to write .nuspec by hand in most situations. Nuget was already good and far ahead of the industry at the time it was introduced.

      The main change was the switch to SDK-style projects files. Kind of like Cargo.toml but XML.

      Adding a file to a nuget package (or anything else you build) is just adding a <Content ... /> item to an <ItemGroup>.

      Adding custom MSBuild stage or behavior is done via .targets file for packaging purposes: https://learn.microsoft.com/en-us/nuget/concepts/msbuild-props-and-targets

      Which is why I linked you Whisper.net. It has a .targets file that manages platform-specific dependencies: https://github.com/sandrohanea/whisper.net/blob/main/Whisper.net.Runtime/Whisper.net.Runtime.targets.

      As you can see, it is possible to make…

    • jacques_chesterMar 2024

      Oh hey, this is me.

      The background is that I've thought about applying SPC to software behavior for a long time[0]. While I was at Shopify I began to think about using it for detecting regressions in the YJIT benchmark suite[1]. My first thought was to code a Ruby library (Shopify is a Ruby on Rails outfit), but I decided that it would be more accessible to more folks if it worked inside a database instead. I got caught in a 20% layoff at Shopify and that somewhat took the wind out of my sails, which is why it's been dormant for a year.

      There are some limitations to be aware of in a software context.

      First, sample sizes have to be constant. In a world of unreliable systems and networks this is a pretty tough constraint. It could be achieved by taking fixed subsamples at random from a varying larger sample (eg, normally we get 100, pick 50 at random). Switching to variable sample size would be possible, but it will be a lot of work and I haven't had the motivation to tackle it yet. It's also only lightly treated in the main textbook I've worked from, because the usual focus is manufacturing operations where fixed sample sizes are common.

      Second, it doesn't deal with non-parametric distributions. Classical SPC is rooted in the Normal distribution, and continues to work quite well with any distribution that has some kind of centrally-located mass that tapers off to the edges. But a lot of software behavior follows power laws, especially Pareto distributions. There is SPC…

    • Ethan_BarryJun 2024

      You got it! By approximate category and in no particular order:

      ## MISCELLANEOUS

      - [Low Tech Magazine](https://solar.lowtechmagazine.com), a solar-powered website showcasing the amazing low-tech things you can do with a little ingenuity,

      - [Stephen Wolfram's Blog](https://writings.stephenwolfram.com) on math, compsci, and everything else,

      - [Cool Macrophotography](https://www.barrywebbimages.co.uk/Images/Macro/Slime-Moulds-Myxomycetes) for amazing pictures of tiny things (WARNING: Time Sink!),

      ## COMPUTER SCIENCE

      - [While-True-Do](https://blog.while-true-do.io) has lots of stuff on Linux administration and self-hosting,

      - [Backend Banter](https://www.backendbanter.fm) for a great podcast on backend development,

      - [Two Wrongs](https://two-wrongs.com) for statistics and functional programming,

      - [Math ∩ Programming](https://www.jeremykun.com/) where math and programming intersect! Written by a Googler...

      - [Paul Bourke's site](https://paulbourke.net/) where you can get happily lost exploring old pages on every topic CS touches,

      - [Jason Punyon's blog](https://jasonpunyon.com) for some fun algorithms and things,

      - [Yossi Kreinin's blog](https://yosefk.com/blog) for C, Python, and plenty of non-technical topics,

      - [Adrian Sampson's academic blog](https://www.cs.cornell.edu/~asampson/blog) for an academic's perspective,

      - [Cool polyhedra viewer project](https://georgehart.com/virtual-polyhedra/vp.html) if you like geometry,

      - [Another academic blog on…

    • ptsnevesJun 2024

      Insurance can benefit the insured and insurer according to Kelly’s criterion depending on respective wealth and risk probability. Have a look at this blog for intuitive examples where insurance is beneficial for both the insurer and insured.

      https://two-wrongs.com/the-misunderstood-kelly-criterion.html

      The thing that makes or breaks the Kelly criterion is the correct evaluation of risk. If the risk is incorrect then it is garbage-in garbage-out. Due to this uncertainty, people tend to use fractional Kelly criterion.

      For a car example, my current car price is a significant proportion of my total wealth and the risk of totalling it is perceived by me to be high, so I pay insurance. I say perceived because in 15 years of driving I never totalled a car.

      But now that I understand the Kelly criterion I will account for how expensive it is proportionately to my wealth and figure the cutoff price where I need to get total coverage insurance and how much it costs. It also explains by cell phone insurance and similar are normally not a good deal, the insured asset is worth a small proportion of my wealth.

    • ncrucesJun 2024

      Yes, you are, if you can't “afford” the loss. And this does not mean that loosing the car bankrupts you.

      It just means that reimbursing you for your loss is worth more to you than the insurance company, because it's harder for you to recover form a (e.g.) $10k loss than for the insurance company.

      When priced correctly, and depending on your wealth, on average insurance can be a win-win (i.e. profitable) transaction for both parties. That's why it's economically useful.

      See: https://two-wrongs.com/the-misunderstood-kelly-criterion.html

    Related

    Stack Abusestackabuse.com28 people

    A SQLite Tutorial with Node.js

    Stack Abuse
    Company · last shared 2024
    Errata Securityblog.erratasec.com357 people

    Extracting the SuperFish certificate

    Errata Security
    Personal · last shared 2025
    Bluish Coderbluishcoder.co.nz77 people

    Using Freenet

    Bluish Coder
    Personal · last shared 2025
    Random ASCIIrandomascii.wordpress.com274 people

    There are only four billion floats, so test them all (2014)

    Random ASCII
    Personal · last shared 2026
    James Iryjames-iry.blogspot.com143 people

    A Brief, Incomplete, and Mostly Wrong History of Programming Languages

    James Iry
    Personal · last shared 2026
    Niko Matsakissmallcultfollowing.com221 people

    Towards a Rust Foundation

    Niko Matsakis
    Personal · last shared 2026
    All That Is Wrongallthatiswrong.wordpress.com18 people

    OS X – Safe, yet horribly insecure

    All That Is Wrong
    Personal · last shared 2021
    programming is terribleprogrammingisterrible.com124 people

    Write code that is easy to delete, not easy to extend

    programming is terrible
    Personal · last shared 2026