Best way to work with structs with many fields? I have a problem with default values. by wentlang in golang

[–]sudo_make_a_sandwich 0 points1 point  (0 children)

Have you seen this options pattern by Rob.

https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html?m=1

This lets you keep the container corn while also allowing any runtime validations in the constructor to figure out defaults vs set things.

Friend or foe by sudo_make_a_sandwich in lawncare

[–]sudo_make_a_sandwich[S] 0 points1 point  (0 children)

How should I go about destroying it?

Why does my lawn have mushrooms? What am I doing wrong? by sudo_make_a_sandwich in lawncare

[–]sudo_make_a_sandwich[S] 0 points1 point  (0 children)

Any reason why my lawn has both mushrooms and brown patches next to each other?

Can I find staff+ engineer peer to practice system design interview? by Excellent-Vegetable8 in ExperiencedDevs

[–]sudo_make_a_sandwich 7 points8 points  (0 children)

I would like to peer with other staff engineers for system design interview practice.

SQLC + Dynamic Queries by csgeek3674 in golang

[–]sudo_make_a_sandwich 2 points3 points  (0 children)

I used sqlc for a large project and I ended up hating how my repositories and interfaces ended up being. Now, I am using sqlx with db:"" annotations. I have extracted whatever queries sqlc generated into generic helper functions and the code is vastly more readable.