20 random bookmarks
Тут будут ссылки на всё-всё, что я найду интересным
Тут будут ссылки на всё-всё, что я найду интересным
Following are the main red flags in test assignments that should be avoided:
The assignment was read and understood in full.
All parts are implemented.
Industry-standard tools and frameworks are used.
The code is split into small, readable functions.
Variables have descriptive names.
Complex parts have comments.
Errors are handled, error messages are easy to follow.
Source files are organized reasonably.
The web interface looks nice.
There are tests.
Avoid these AI giveaways and spread the word!
Егор рассказывает про ООП и его анти-паттерны
How about we measure the amount of times programmers touch the lines. Instead of counting the number of lines we’ll count how many times they were actually modified—we can get this information from Git (or any other SCM). The more you touch that part of the aircraft—the more effort you spent on it, right?
I called it Hits-of-Code (HoC) and created a small tool to help us calculate this number in just one line.
What a nice idea! I installed this program and ran it on Betula and Mycorrhiza codebases. For Betula it's 26350 HoC, for Mycorrhiza it's 137208 HoC. Yeah, Betula is still comparatively young! Hey, what about Mycomarkup? 23443. Oh wow, just a little less than Betula. I expected a small number.
Главное правило пропаганды — посыл должен быть простым. Если хочешь, чтобы твоя вера распространялась, нужно упаковать ее в короткое и броское сообщение — мем. Чем он проще и тупее, тем ему легче распространяться. Если мем в рифму — еще лучше.
Мем дожен быть безапелляционным, без деталей, однозначным и не вызывающим сомнений. В идеале — чтобы он касался каких-то человеческих грехов — например, гордыни, алчности или гнева. Это сейчас самые социально одобряемые грехи.
Я согласен с тем, что логику нужно разносить по сервисам. Но сервисы должны использовать общую шину данных: базу, очередь сообщений, файлы в S3 в конце концов. Гонять друг другу JSON выглядит хорошо в теории, но на практике — фу.
Условный Постгрес выплюнет миллион записей за доли секунды. Забрать этот же миллион из другого сервиса — приключение на неделю. Тут и метрики, лимиты, квоты, сетевые спайки, etc… А когда таких запросов несколько, сервис ложится спать.
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)
}
Несколько правил, чтобы держать Git приличном виде.
A proposal for the next generation of portable documents.
Gio is an open source library for creating portable, immediate mode GUI programs for Android, iOS, Linux, Windows, macOS.
Доклад с описанием истории электронной почты и некоторыми техническими подробностями
Sort-merge joins do not need indexes on the join predicates.
MySQL does not support sort-merge joins at all.
Сегодня публике нужно быть впереди соседа. Увидеть Париж первым — и умереть. Важен не процесс — но атрибутика вокруг.
The Go standard library is full of bad design choices from the perspective of safety of use.
PRQL is a modern language for transforming data
Интересная замена SQL. Запросы для аналитики данных станет писать намного проще. Не думаю, что для чего-то другого этот проект подойдёт. Условный CRUD проще написать, используя именно SQL запросы, здесь PRQL излишен.
This site contains writings on the topic of reducing suffering, including the suffering of non-human animals and far-future beings. Most content is by Brian Tomasik, though a few pieces are written by others.