top | item 39048570

(no title)

whitfieldsdad | 2 years ago

I get what you mean, and agree with the idea of Just Building Things, but, I also want to make sure that I'm building things "the right way" if that makes sense.

For example, I'm not new to programming, but am new to Go and have been struggling to figure out how to model messages as structs using composition rather than inheritance.

As one of, if not the most senior developer in the team that I work on, I have nobody to ask questions to, and even though the answers are out there, on the Internet, I'm still confused by them, which, IMO isn't super anomalous, but, still leaves me in a place where I'm yearning for feedback.

discuss

order

TillE|2 years ago

My preferred approach for that kind of difficulty is just to look at how existing open-source projects have solved similar problems. You'll either figure it out or come away with specific, informed questions that you can ask on a Discord or Reddit or something.

turtleyacht|2 years ago

That makes sense. I'm trying to wrap my head around Dubray's State-Action-Model and have reduced it to rewriting examples from different perspectives (first starting with the model, for example).

I found this answer on StackOverflow about Go structs for composition. It's interesting because at least there's an example of how not to do it (in Go) and a detailed answer:

https://stackoverflow.com/a/70100167

The Ben Franklin approach: "I've seen one more way not to write it."

Hope you find or figure what you're looking for.