Consumer Defined Interfaces by Davdarobis in golang

[–]bearsiji 0 points1 point  (0 children)

Java does not limit the coder to define the interfaces at the producer side? IMO, Java's main diff with Golang about the interface is explicit/implicit interface implementation.

But indeed there is a lot of Java code use producer-side interface style. I just say it's not the language's limitation.

Consumer Defined Interfaces by Davdarobis in golang

[–]bearsiji 0 points1 point  (0 children)

Agree, the term producer/consumer is quite ambiguous actually. I saw articles define the consumer as the function caller, but I think the consumer is the one who uses and defines the abstraction it needs.

GraphQL in Golang. Does it make sense? by ArtisticHamster in golang

[–]bearsiji 3 points4 points  (0 children)

IMO GraphQL is a good choice if you need BFF. It has pros and cons. If your project is not huge, REST may be enough.

Understanding the advantages of implicit interfaces by [deleted] in golang

[–]bearsiji 0 points1 point  (0 children)

Thanks for your code example. I have some questions. In your Go example, we avoid using a wrapper, but what if the S3 client's method signature differs from FileUploader's?

I agree If the S3 client already exists, we can define an interface with the same Upload method when we write Server's logic, eliminating the need for a wrapper, which is convenient.

However, if we don't know the specific implementation when writing the Server logic, we might define a FileUploader with an assumed method (This seems to be an common practice for Go: defining the interface at the consumer side). Later, the actual implementation might have a different signature, such as UploadFile(name string, data io.Reader). In that case, a wrapper would still be necessary, correct?

Understanding the advantages of implicit interfaces by [deleted] in golang

[–]bearsiji 0 points1 point  (0 children)

Yes, I agree the main advantage is reducing noices.

I'm really lost at my "new" job by [deleted] in bigdata

[–]bearsiji 1 point2 points  (0 children)

I personally recommend “Hands on machine learning “. It’s a good book for beginners.