Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 PROGRAMMING


  Go 1.16 is released

Note: The post is authorized by original author to republish on our site. Original author is Stefanie Lai who is currently a Spotify engineer and lives in Stockholm, original post is published here.Last week, Go1.16 was released, bringing relatively more changes than version 1.15, which was influenced by the epidemic.The update is in many aspects, including compilation, deployment, standard library, etc. In the official Go document, all changes are classified based on Tools, Runtime, Complier, etc.It is undoubtedly good to dig into all the changes, but sometimes we understa...

918 0       GOLANG GO1.16 NEW FEATURES


  Top 10 reasons to use a low-code platform

Generally, as the best coding platforms, low code includes low code app development, process development solutions and software development tools. IT users utilize low code solutions as a source of the required building blocks for the building of workflows and applications. The building blocks make it easier to assemble apps and workflows without requiring hand-coding. The growth of low-code platforms therefore levels business grounds by reducing the time spent in coding among other benefits. Organizations now have access to more tools and technologies. For this reason, IT teams can handl...

926 0       LOW CODE PROGRAMMING


  Is Java Set ordered or not?

“Is Java Set ordered or not? ” is the most popular question asked when you interview for a Java Developer position. Many fail to answer it, and I have to admit I was one of the many.I have known the answer is “Yes and No” for a long time.No. HashSet is not ordered.Yes.TreeSet is ordered.If the interviewer continues with some follow up questions, I’m not confident that I know the answer then.Why is TreeSet ordered?Are there any other ordered Set implementations?As a growth-minded developer that always wants to improve, it is necessary to absorb some ...

3,715 0       JAVA HASHSET SORTEDSET ORDER


  How to check when an API is introduced in GoLang

Normally people would not pay much attention to which GoLang version is being used as lots of functions are backward compatible. However there are cases where GoLang version does matter as some functions may not be supported by old version of GoLang. For example, strings.Builder is introduced in Go 1.10, but below code would fail to be compiled on Go 1.10.package mainimport ( "fmt" "strings")func main() { var b strings.Builder b.WriteString("polarisxu") fmt.Println(b.Cap())}The compilation error is:$ go versiongo version go1.10.8 darwin/amd64$ go run main.go# command-line-arguments./main.g...

2,001 0       GO TOOL API VERSION GOLANG


  How to do pprof for gRPC service

gRPC is a RPC framework based on HTTP and is frequently used for communications among micro service inside the same organization network. However,  the service functions cannot be accessed via normal HTTP URL as it's not a WEB framework. In this case, how to do pprof on a gRPC service?The trick is starting a HTTP server asynchronously while starting the gRPC service. This HTTP server can be accessed to run prrof debug.go func(){ http.ListenAndServe(":10001", nil)}()Since it uses the default ServerMux, the pprof related routes will be registered automatically after importing the package&nb...

3,930 0       PPROF GOLANG GRPC


  Demo on creating worker pool in GoLang

A worker pool is a pool where a specified number of workers(usually goroutine) created and run to pick up tasks. This can allow multiple tasks to be ran at the same time while keeping the number of workers a fixed number to avoid overuse of resource in the program.There are usually two approaches of creating worker pool.One is with fixed number of workers pre-createdOne is creating worker when needed until the max number of workers createdIn this post, we will cover the demonstration of creating fixed number of workers pre-ahead. This approach is usually used when one knows there are lots of t...

6,335 0       GOLANG GOROUTINE WORKER POOL


  How does GoLang know how many CPUs to use?

When running lscpu command on Linux, it will list the CPU info on the machine. Take one example where there is one CPU with 2 cores and each core has two threads which indicates there are 4 cores available.Now let's see how many cores GoLang program would identify.From output, NumCPU and GOMAXPROCS both output 4 which is expected. How does go runtime get this info, does it get it through similar command like lscpu or /proc/cpuinfo? Let's dig more in GoLang's source code.In runtime/debug.go, it tells that this value is from the global variable ncpu which is set when process starts and...

6,901 0       CPU GOLANG NCPU


  About go get and go install in Go 1.16

Go version 1.16 beta1 has been released on 18 Dec 2020, major features of Go 1.16 have been finalized with this beta release. Many people are discussing about the support of Apple M1, however, this post will not cover this topic. Instead the focus will be on go get and go install changes.There are lots of changes related to modules in Go 1.16, the details can be found in the release note. Below are some of the key highlights.GO111MODULE is on by default, if wanna keep old behavior, needs to set it to auto. This means that GOPATH would gradually get away from us.go install can take a versi...

12,920 0       GOLANG GO 1.16 GO INSTALL