20 random bookmarks
stuff me collect
stuff me collect
I've written a number of little scripts over the years, many of which I use every day. Here's a little collection.
Настольное пособие по тому, как писать в go-way стиле
Wow so advanced
via Optozorax
Our design goals are safety, performance, and developer experience. In that order.
Contrary to popular belief, simplicity is also not the first attempt but the hardest revision
code, like steel, is less expensive to change while it's hot.
NASA's Power of Ten — Rules for Developing Safety Critical Code
Use only very simple, explicit control flow for clarity.
Put a limit on everything. Fail Fast
Assertions detect programmer errors. The only correct way to handle corrupt code is to crash.
Assertions are a safety net, not a substitute for human understanding.
Build a precise mental model of the code first.
encode your understanding in the form of assertions,
write the code and comments to explain and justify the mental model to your reviewer,
and use VOPR as the final line of defense, to find bugs in your and reviewer's understanding of code.
No memory may be dynamically allocated (or freed and reallocated) after initialization.
Declare variables at the smallest possible scope, and minimize the number of variables in scope.
Good function shape is often the inverse of an hourglass: a few parameters, a simple return type, and a lot of meaty logic between the braces.
Centralize control flow. When splitting a large function, try to keep all switch/if statements in the "parent" function, and move non-branchy logic fragments to helper functions.
Centralize state manipulation. Let the parent function keep all relevant state in local variables, and use helpers to compute what needs to change, rather than applying the change directly.
Add units or qualifiers to variable names, and put the units or qualifiers last, sorted by descending significance. latency_ms_max rather than max_latency_ms.
Callbacks go last in the list of parameters.
Order matters for readability (even if it doesn't affect semantics). On the first read, a file is read top-down, so put important things near the top. The main function goes first.
Don't overload names with multiple meanings that are context-dependent.
Статьи предназначены для максимально легкого вкатывания в плагинописание для Obsidian.
Официально документация Obsidian настоятельно рекомендует использовать TypeScript и npm и использует только такой подход в своем GitHub с примерами. Я же в свою очередь утверждаю, что если вы хотите просто сесть и написать малюсенький плагин, у вас нет необходимости даже в этом стеке.
How to use different git identities for different projects
Из гречки можно чай делать...
Notes as database. Supports Frontmatter, querying, backlinks, live preview, wiki style linking link, templates.
One of my favorite tools on the internet. I love the design! The person behind it: https://pketh.org/archives/ seems cool as well. They also worked on Glitch.
Website to create animation of your text using falling tetris blocks
По сути, выражение
s[~i]эквивалентно выражениямs[-i - 1]иs[len(s) - i - 1], однако является более красивым и компактным вариантом записи.
A single-user “wiki” engine powering the ThoughtStorms wiki.
I can't get the noise out of my head. People who watch the video express awe and disgust. And that is why Dutch software developer Bert Hubert's experiment is so powerful. It doesn't really uncover something that we shouldn't already know. Something we often choose to ignore. The brilliance is
Did you ever wake up in the middle of the night wondering what would happen if you applied JPEG-style lossy compression to text?
In the wonderful solarpunk future, we do not use telepathy
In the wonderful solarpunk future, we have enough time to not do two things at once
Blog post about very small linux distribution and small programs