I’ve always found discrete mathematics (*) much easier to understand than, e.g., calculus or statistics – because it is so similar to programming. Relations, orders, graphs are all part of discrete mathematics.
If you think you don’t like math, you may actually enjoy discrete math.
Math topics that keep being useful for programming: relations, orders, graphs.
Example: You have plugins with conditions such as “plugin A must run before plugin B“.
– These conditions define a partial order: In general, not every plugin can be “compared” with every other plugin. – If we want to sort an Array with plugins, we need a total order. – One algorithm that works with a partial order is topological sorting: https://en.wikipedia.org/wiki/Topological_sorting
“For the first time you'll have a way to see the entire web platform mapped as a set of features, along with their support in browsers.”
“The Dashboard isn't intended as a replacement for Can I Use or the browser compatibility data on MDN. In your day to day life as a developer, it's likely to be less useful than these places. However, showing the platform in this way creates some interesting possibilities.“
Web apps—topics I’d like to be discussed more: – Offline capability – Peer-to-peer operation (syncing etc.)
It’s a shame that most web apps cease to work properly whenever the internet connection is flaky or gone. For me, that happens whenever I travel (train, plane, etc.).
#TypeScript: Arrow functions help with partial evaluation [1] – e.g. a factory for functions for which there already is a type. Then they are more elegant than using .bind() [2]
A. The discriminant is not very sticky: – There is no refactoring for renaming it. – TS cannot infer the type of an object via a discriminant (only narrow it). In contrast to: new MyClass()
B. Classes provide locations for initialization code and operations. I could put each DU in its own module but that is often too fine-grained for my taste. Future: submodules?
1/ #TypeScript: – My own experience of TypeScript is overwhelmingly positive. – But I’m also seeing people complain about its complexity.
I think both are true: 1. If you stick with simple types and strict type checking (no `any`), you’ll have a good experience. 2. Alas, some JavaScript APIs can only be described with very complicated types and then things can get ugly.
Definitely Typed has some type definitions that I find too complicated.
Last week’s ECMAScript News summarizes several interesting things that happened: – Should npm be unbundled from Node.js? – LLRT, Amazon’s new JavaScript runtime based on QuickJS – TC39’s February 2024 meeting – Trailer for “Node.js: The Documentary” – And more
// Discriminated union! type HeadingType = PropValues<typeof Heading>; // Name could be `Heading` but that trips up TS language server in // some cases.
Movies and TV: I’d like to see “Roman space empire” instead of “nazi space empire”. Then the story would get more interesting because it wouldn’t simply be about “good vs. evil”—it would have politics in addition to war.
I can’t overstate how pleasant it is to consume various kinds of content via feeds. For example, you can group it into categories, which makes it easy to skip things you’re not interested in at the moment.
Thanks to JSON Feed (*) it is now easier than ever to add feeds to websites. I could even see myself subscribing to a feed instead of an email newsletter to be notified of an important event (such as a product coming out).