eeue56
Joined 13 years ago
Joined 13 years ago
Also authored the first Elm-in-Elm compiler for a limited subset for json-to-elm, then leading to a pure Elm virtual-dom implementation used for elm-html-test!
Egoless Engineering, a book about how to be an enabling staff engineer in the Nordic's largest mediahouse. I saved up vacation and took the whole of December off, mostly to relax. But I'm also working on more chapters for my book.
I've used my app in various forms for around 5 years, rewritten multiple times. But now I'm creating surrounding tooling to help others put my mental model for personal life prioritize to use. I'm writing in the "Saving Spoons" Substack as I go, trying to explain why and how I do things, with advice for others trying to do the same thing.
One fun fact - my dad took some higher-learning Welsh exam as an adult. They had to time the exam to match Patagonia, as they were given the exact same exam to avoid any cheating.
Results were sent as a CSV file - basically a raw export of the data the server got, not something that was read from the DB. So the operation to save to DB and to send the email were intended to be (almost) parallel operations. The errors weren't shown to users, though there was error handling for other cases that did show the user.
> While this bug was a costly mistake, we learned from it. Whenever we would deploy code-last minute, we'd try to test it more rigorously. If we were running a study without internet access, we'd make sure to test in the same environment. We hadn't accounted for the environment change, partially due to the short notice for the locked-down machine, but also just because we didn't test with the exact same restrictions.
Indeed - I have an extended equivalent from CGI-bin that I'm including in the full story in the book, since running things as a script vs as a program has different implications for killing the running process. The patterns you mention here tend to be my preferred way of working - exhaustiveness checking of branches. In modern TypeScript, I enforce that via union-type error handling rather than using exceptions (which are a nightmare when it comes to affordance imo). I'm generally a functional programmer rather than an imperative programmer. But the case mentioned in the blog post was about 12 years ago now, so it didn't have the same options as we currently have.
The way I put this practice into place involves accepting that people will just do whatever they find easiest, regardless of whether it's technically the right thing to do. I account for that when I'm designing APIs, languages ([Derw](https://www.derw-lang.com/)), frameworks, or tooling. If I make the correct thing the obvious or easiest thing to do, less people will do the incorrect thing. They will still do incorrect things, it's human nature. But they'll do it less frequently.
In this case, I think the actual API we used would take a callback for success, and a callback for errors. I just used JS an example for how unnatural it would be to call something that exits the entire script early.
I have a big problem with promises + exceptions generally in JavaScript - much preferring union types to represent errors instead of allowing things to go unchecked. But I left that out as it was kind of a side-note from the point of affordance.
To be honest, as a top host in my city, the only features that Couchsurfing was actually good for was discovery. Everything else was kinda broken or slow. It added to the charm, but it definitely wasn't much better than what you're claiming here for Couchers.
type MyEnum = {
active: 0;
inactive: 1;
}
const MyEnum: MyEnum = {
active: 0,
inactive: 1,
}
const showAge = MyEnum.active;
const showPets = MyEnum.inactive;
It's slightly more duplication, but a lot more readable (imo) to those unfamiliar to utility types. TypeScript also enforces keeping them in sync.Remote: Hybrid or full remote
Willing to relocate: Probably not
Technologies: TypeScript, Python, Rust, Elm, Haskell.
Resume: [LinkedIn](https://www.linkedin.com/in/noah-h-1264371ab/), [Github](https://github.com/eeue56/), [main blog](https://thetechenabler.substack.com/)
Email: Message on LinkedIn
Developer who has a passion for helping the world and others, through technology (or sometimes no-tech). At my day job, I'm passionate about helping sure we build the right thing, in the right way, by people who are happy and engaged. In the open source world, I have my own programming language, Derw. Well, technically I have 5. But only Derw is intended for production. In volunteering, I'm the board leader of Tekna's Network for Developers - Norway's largest STEM union for those with post-grad education.
I generally am very flexible, I'm more interested in the problem being solved rather than the stack used to solve it. But no Java.