20 random bookmarks
Тут будут ссылки на всё-всё, что я найду интересным
Тут будут ссылки на всё-всё, что я найду интересным
Case study: it's possible to live on one income, and to raise kids in shared housing.
Artifacts is an image + link organizer app for macOS and iOS. A
completely native, local first way to save all that stuff you find
across the web.
Chats, emails, phone calls, mailing lists, issue tracking systems, face-to-face meetings, and other communication instruments for a software project.
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)
}
By wrapping errors and building well-formatted error messages, we can keep better track of where errors are happening. I often just add the name of the function being called to my error messages, but we can make the message say whatever we want. For example, I’ll often include parameter information in the error so I know which inputs caused the error.
The most complete list on the web about cars, bikes, trucks and other vehicles seen in movies and series, image captures and information about them.
When I’ve listened the most effectively to people, it’s because I was intensely curious—I was trying to build a detailed, precise understanding of what was going on in their head.
Коллекция интерактивных штуковин. Очень красивое
Заметки о том, как писать и оформлять код на Си
Kак работает правосудие в России: легко ли сфабриковать уголовное дело против невиновного человека, почему в России мало оправдательных приговоров, и что на самом деле не так с «палочной» системой полиции.