Two Wrongs is a personal blog on statistics, software design, Emacs, Awk, and decision-making.
Commenters cite its Awk state machine parser pattern and statistical literacy essay, and one flags a site that copies its content.
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…
> 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…
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…
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…
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.
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