20 random bookmarks
Тут будут ссылки на всё-всё, что я найду интересным
Тут будут ссылки на всё-всё, что я найду интересным
PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations.
Sounds like a way to write less code. I skimmed through the reference, looks cool. PostgREST is written in Haskell for some reason though.
We all know that naming things in programming is hard. If you’ve read this entire post it just got a little bit harder.
Everyone knows micromanagement is evil, but very few understand what exactly it is and what's a better alternative.
То, что западноевропейским ученым запрещают выступать на конференциях в России безусловно огорчает, но более всего настораживает их на это реакция.
Solving technical problems in a large scope which is difficult to understand is a very stressful activity; I suggest we behave professionally.
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)
}
Казалось бы, программисты — люди с точным мышлением, а в жизни все наоборот: в голове кисель.
Для меня выход из ситуации простой: трусы или крестик. Либо ты выходишь из разработки со словами: хорош, я в этом не участвую. Либо пишешь качественный код, понимая, что мир огромен, и у тебя нет возможности контролировать, кто и как его использует. Оба варианта честные и снимают все вопросы.
Раскадровка сняла видео про мусор и переработку!
a minimalist and opinionated feed reader.
Коллекция интерактивных штуковин. Очень красивое
The largest instant sound buttons website in Russian Federation!
Cycling is the most sustainable form of transportation, but the bicycle is becoming increasingly damaging to the environment. The energy and material used for its production go up while its life expectancy decreases.