Better HN
topnewbestaskshowjobs
Log inSign up

mcdoker18

9 karma · joined Mar 5, 2020 (6y ago) · 9 submissions

Submissions

comment 5y ago · link · parent

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?

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 5y ago · link · parent

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.

comment 6y ago · link · parent

Only Azure doesn’t charge for the k8s control plane, that is the most surprising thing for me.

comment 6y ago · link · parent

I know that it's a valid expression, but are there any use cases for it?

comment 6y ago · link · parent

Can someone explain the meaning to use 'x == NULL' expression? Why does not PostgreSQL prohibit usage of this expression?