Size: a a a

Go на двоих

2020 December 24
Go на двоих
My engineering axioms by Martin Rue:

1. Change is constant.
2. Your product is an asset, but code is a liability.
3. Duplication is less costly than premature abstraction.
4. Code should be easy to delete.
5. Existing code exerts a powerful influence.
6. Accidental complexity is one of the biggest risks.
7. Technical excellence can be shadowed by bad personal skills.
8. You are not your code. Be kind to the coder, not to the code.
9. Treat people who know less than you with respect and patience.
10. The only true authority stems from knowledge, not from position.
11. Teaching is a form of learning in disguise.
12. Lift the skills of people around you, not just yourself.
13. The longer you wait the more you'll know.
14. A good type system is worth its weight plus some.
15. The right team of people trumps everything else.
16. Stick to boring technology, unless there's a good reason not to.
17. Have the smallest team possible, but no smaller. Grow it carefully.
18. Rest.
19. Don't pick a solution until you've thought of at least one more.
20. Have opinions, but avoid expressing them in ways that cause other people to believe you won't change them.
21. It's OK to say "I don't know" or "I need to research that before I have an answer".
22. Writing throwaway code to explore a problem space is underrated.
23. Manage state carefully.
24. It's all about trade-offs.
25. A good design is one in which you can change your mind without changing too much code.

https://martinrue.com/my-engineering-axioms/
источник
2020 December 31
Go на двоих
Happy New Year’; DROP TABLE 2020;--
источник
2021 January 01
Go на двоих
Note about cuelang

Недавно нашел интересный проект CUElang [1] (естественно написанный на Go).
Расшифровывается как Configure, Unify, Execute. Cue - это язык для конфигураций со встроенной проверкой типов. Вообщем, выглядит как попытка улучшить ситуацию с тем адом из yaml файлов, который сейчас есть.

Tl;dr чтобы быстро понять что к чему, можно пройти туториал [2], в котором предлагается перевести k8s *yaml файлы на *cue с валидацией и блэкджеком.

Так же есть смысл познакомиться с концепциями [3]. Из приятного, то что сразу есть консольная утилита cue, которая умеет например форматировать cue файлы =), больше инфы тут [4].
P.S. выглядит примерно так:
  $ cat <<EOF > foo.yaml
 kind: Service
 name: booster
 EOF

 # include the parsed file as an emit value:
 $ cue import foo.yaml
 $ cat foo.cue
 {
     kind: Service
     name: booster
 }


[1] https://github.com/cuelang/cue
[2] https://github.com/cuelang/cue/blob/v0.2.2/doc/tutorial/kubernetes/README.md
[3] https://cuelang.org/docs/concepts/logic/
[4] https://github.com/cuelang/cue/blob/master/doc/cmd/cue.md
источник
2021 January 11
Go на двоих
Go blogs

1 A Journey With Go  https://medium.com/a-journey-with-go
2 Applied Go  https://appliedgo.net
3 Ardan Labs’ Blog  https://ardanlabs.com/blog
4 Dave Cheney’s Blog  https://dave.cheney.net
5 DEV’s Go Tag  https://dev.to/t/go
6 Digital Ocean’s Go Series  https://digitalocean.com/community/tutorial_series/how-to-code-in-go
7 Eli Bendersky’s Blog  https://eli.thegreenplace.net/tag/go
8 Go By Example  https://gobyexample.com
9 Go Web Examples  https://gowebexamples.com
10 Go’s Articles Wiki  https://github.com/golang/go/wiki/Articles
11 Golang Bot  https://golangbot.com
12 Golang Programs  https://golangprograms.com
13 GolangCode  https://golangcode.com
14 Gopher Academy Blog  https://blog.gopheracademy.com
15 Gopher Guides  https://gopherguides.com/articles
16 Hashnode’s Go Tag  https://hashnode.com/n/go
17 Ilija Eftimov’s Blog  https://ieftimov.com
18 ITNEXT’s Blog  https://itnext.io/tagged/golang
19 Just For Func  https://medium.com/justforfunc
20 Learn The Go Programming Language  https://medium.com/learning-the-go-programming-language
21 Official Go Blog  https://blog.golang.org
22 Russ Cox’s Blog  https://research.swtch.com
23 Tit Petric’s Blog  https://scene-si.org
24 Tutorial Edge  https://tutorialedge.net/course/golang
25 Thoughts’ Go Topic  https://utcc.utoronto.ca/~cks/space/blog/__TopicGoWandering

from reddit comments (https://www.reddit.com/r/golang/comments/kul1hd/go_blogs_rated_by_consistency_writing_quality_and/):
Jon Calhoun's Blog  https://www.calhoun.io/
Bojan Živanović's Blog  https://bojanz.github.io/
Jack Christensen's Blog https://www.jackchristensen.com/
Matt Layher's https://mdlayher.com/blog/
Johan Brandhorst-Satzkorn's Blog https://jbrandhorst.com/
Filippo Valsorda's Blog https://blog.filippo.io/
Peter Bourgon's Blog https://peter.bourgon.org/blog/

Other:
https://github.com/sanmak/awesome-blogs
https://www.mohitkhare.com/categories/golang

Если читаете что-то еще пишите в комменты :)

happy Monday!
источник
2021 January 12
Go на двоих
к этому списку я бы еще добавил -> https://github.com/enocom/gopher-reading-list
источник
2021 January 18
Go на двоих
Нашел интересный проект Fortio,  начиналась как инструмент нагрузочного тестирования для service mesh Istio, а теперь превратилась в собственный проект.

Написан естественно на Go и поставляется также в докере размером 3Mb, умеет считать сразу персентили и показывать результаты в небольшой веб страничке.

Больше деталей в README.md https://github.com/fortio/fortio

P.S.
Добавил по традиции в https://github.com/andriisoldatenko/awesome-performance-testing.
Если вы знаете еще какие-то performance тулы дайте знать в комментах  либо можно сразу PR.
источник
Go на двоих
go-internals is a work-in-progress book about the internals of the Go (1.10+) programming language.

Автор правда забил 3 года назад, но то что есть очень интересное чтиво.

https://github.com/teh-cmc/go-internals
источник
2021 January 19
Go на двоих
gitbatch утилита для управления сразу несколькими git репозиториями)

tl;dr https://asciinema.org/a/lxoZT6Z8fSliIEebWSPVIY8ct

https://github.com/isacikgoz/gitbatch
источник
2021 January 21
Go на двоих
Вот интересный твит трэд от Даниэля об изменения в go 1.17 (который выйдет через 7 месяцев):

https://twitter.com/mvdan_/status/1352194794064392192?s=20
источник
2021 January 26
Go на двоих
Если вы интересуетесь eBPF, то вот вам примеры от Leo создателя Falco.

https://github.com/leodido/go-ebpf-examples

P.S. под капотом тот самый https://github.com/iovisor/gobpf о котором я писал уже ранее -> https://t.me/golang_for_two/96
источник
Go на двоих
FOSDEM 2021 Go dev room

В этом году FOSDEM пройдет online, в субботу 6 февраля!

И уже есть расписание https://fosdem.org/2021/schedule/track/go/
источник
Go на двоих
Интересный трэд [1] от Matthew Dempsky  о runtime баге [2]:

Links:
[1] https://twitter.com/mdempsky/status/1353999359537364993?s=21
[2] https://github.com/golang/go/issues/43921("recover does not correctly recover from panic")
источник
2021 January 28
Go на двоих
Всем известный Ben Johnson, он же автор BoltDB сегодня зарелизил новый проект Litestream.

Litestream - инструмент потоковой (stream) репликации для SQLite. Он работает как фоновый процесс и безопасно реплицирует частичные изменения в другой файл или AWS S3. Litestream взаимодействует с SQLite только через API SQLite, поэтому он безопасен для ваших данных.

Как обычно фидбэк в твиттер автору: https://twitter.com/benbjohnson/status/1354468790558281731

Ссылка на код: https://github.com/benbjohnson/litestream
источник
2021 January 29
Go на двоих
Сегодня зарелизился Delve v1.6.0

Из важных изменений:
- Go 1.16 support, Apple M1 support, syntax highlighting for code blocks, and more!


dlv version
Delve Debugger
Version: 1.6.0
Build: 75485427957fba167a6eaca76b1ee9549d62916f

Полный CHANGELOG -> https://github.com/go-delve/delve/blob/master/CHANGELOG.md#160-2021-01-28
источник
Go на двоих
источник
2021 February 06
Go на двоих
Видео начали заливать https://twitter.com/maartjeme/status/1358101853955883008?s=21
источник
2021 February 23
Go на двоих
Proposal is to add fuzz test support to Go 1.17.

https://github.com/golang/go/issues/44551
источник
2021 March 12
Go на двоих
Интересный тред о том по каким материалам готовится к собеседованию по Golang:

https://twitter.com/Randomazer/status/1370109404679442432
источник
2021 March 15
Go на двоих
Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust

https://benhoyt.com/writings/count-words/
источник
2021 March 16
Go на двоих
Automatically Detecting and Fixing Concurrency Bugs in Go
Software Systems

https://songlh.github.io/paper/gcatch.pdf

Также у автора есть интересный репозиторий https://github.com/system-pclub/go-concurrency-bugs

Ну и список багов

https://docs.google.com/spreadsheets/d/1mDxB6IRxrTodF9CrmpUu72E6673y5s9BkjKuTjtx1qc/edit#gid=0

подсмотрел у https://twitter.com/dgryski
источник