HackerTrans
TopNewTrendsCommentsPastAskShowJobs

mcdoker18

no profile record

comments

mcdoker18
·vor 5 Jahren·discuss
Interesting, how many there are such 3rd party's products that AWS offers as a service? Who will be the next for license changing, Redis?
mcdoker18
·vor 5 Jahren·discuss
The most significant value of Jetbrain IDEs is that all programming languages have good support. I switched between Java, Python, JS, Typescript, C, Golang, and so on regularly. For example, Java and Kotlin support are miles better than all other IDEs.
mcdoker18
·vor 5 Jahren·discuss
Good advice! A small addition in the third point: you can create a separate interface for HTTP errors, for example:

    type HTTPError interface {
        GetHTTPCode() int
    }
    func ServeHTTP(w http.ResponseWriter, req \*http.Request) {
        result, err := DoTheActualThing()
        if err != nil {
            statusCode := http.StatusInternalServerError
            if httpError, ok := err.(HTTPError); ok {
                statusCode = httpError.GetHTTPCode()
            }
            http.Error(w, ..., statusCode)
            return
        }
        w.Header().Set("content-type", "application/json")
        w.WriteHeader(http.StatusOK)
        w.Write(result)
    }
You can apply the same approach for the HTTP body in case of error.
mcdoker18
·vor 5 Jahren·discuss
I prefer the same approach, but I'd create a separated struct, such as TaskFilter, and using a pointer because zero ID or empty tag can be valid values.
mcdoker18
·vor 5 Jahren·discuss
As BE, I was surprised how many FE developers use PWA. I need to take a look at this technology. By the way, I am happy that the usage of typescript increases over time.
mcdoker18
·vor 5 Jahren·discuss
I wonder why no one has not mentioned tests. For me, the tests are more valuable for system or service understanding than, for example, documentation. But the best scenario when you combine tests and documentation. I have joined the new team recently. They have a lot of e2e BDD tests implemented using the Cucumber framework. It helps me to get a complete view of the system in the shortest possible time.