20 random bookmarks
Тут будут ссылки на всё-всё, что я найду интересным
Тут будут ссылки на всё-всё, что я найду интересным
With a sufficient number of users of an API,
it does not matter what you promise in the contract:
all observable behaviors of your system
will be depended on by somebody.
Type safety and ergonomics, with full interop.
Enums and pattern matching
Error handling with ?
Nil safety
Clear error messages
BlueMap is a program that reads your Minecraft world files and generates not only a map, but also 3D-models of the whole surface.
With the web-app you then can look at those in your browser and basically view the world as if you were ingame!
Or just look at it from far away to get an overview.
Instead of trying to shorten the time that our builds take, we order and chain them by complexity, thus gradually reducing the risk.
Если вы — Майкл и Карл, то желать выздоровления больше одного раза не нужно. Если прям неймется, поставьте к первому сообщению лайк — в знак того, что вы присоединяетесь к пожеланию. Иначе вы затрахете коллегу и всех, кто в чате.
Если вы — Джон, и коллег не перевоспитать, не пишите о личных проблемах в общий чат. Достаточно написать руководителю и паре людей, с которыми вы плотно работаете. Остальным хватит и статуса в мессаджере.
The concept of feature flags is simple – it’s essentially just an
if. This makes it a very powerful concept!
Жетбрейнсы рассказывают о концепции фича-флагов
I often hear the question of how to become a senior developer; this is my story and my advice; hope it helps you.
Programmers are expensive and difficult to control; here are a few tricks to keep them underpaid and happy, for a while.
package src
type config struct {
// Required
foo, bar string
// Optional
fizz, bazz int
}
// Each optional configuration attribute will have its own public method
func (c *config) WithFizz(fizz int) *config {
c.fizz = fizz
return c
}
func (c *config) WithBazz(bazz int) *config {
c.bazz = bazz
return c
}
// This only accepts the required options as params
func NewConfig(foo, bar string) *config {
// First fill in the options with default values
return &config{foo, bar, 10, 100}
}
func Do(c *config) {}
You’d use the API as follows:
package main
import ".../src"
func main() {
// Initialize the struct with only the required options and then chain
// the option methods to update the optional configuration attributes
c := src.NewConfig("hello", "world").WithFizz(0).WithBazz(42)
src.Do(c)
}
Хотя обычно дома рисовать очень просто — прямоугольник с building=yes, — на практике постоянно всплывают какие-то сложности. Danidin9, автор картинок про дома в Петербурге, наглядно объясняет
Мой любимый рецепт борща
Рич Хикки рассказывает о различиях простоты и лёгкости в контексте проектирования и написания программ.
Говорит, что многие выбирают лёгкость, забывая про простоту. Со временем комплексность превращается во что-то такое, что сложно поддерживать и в чём сложно разобраться новичкам.
Нужно стремиться искать лёгкие способы делать простые программы.