Go developers see many challenges in Error Handling

The Go Blog has published the Q1 2023 Go Developer Survey . A total of 5,844 developers participated in the survey, sharing how they use Go, the biggest challenges they encounter while using Go, and their top priorities for improvement.

This year's survey introduced a new segment based on self-identified level of experience. Based on the respondents' responses to the question "What is your level of Go experience?", broken down into the following options:

  • Awareness: Know Go, but can't write simple Go programs without help
  • Newbie Novice: Can do simple programming projects in Go, may need help
  • Intermediate: can complete important Go programming projects with some help
  • Advanced: Can complete important Go programming projects without assistance
  • Expert: Available to guide, troubleshoot, and answer other engineers' Go-related questions

The main findings of the investigation are:

  • Novice Go developers are showing greater interest in using Go for web development .
  • Error handling and learning were the biggest challenges faced by respondents. Historically, the lack of generics was the most frequently mentioned issue; but since the introduction of generics, related comments are decreasing. Comments on error handling (in terms of readability and verbosity) and difficulty learning best practices are now the most commonly reported challenges.

  • Optimization guides are the most valuable way to improve Go performance. When asked how resources were spent on various improvements to the Go compilation and runtime, respondents reported spending the most on optimization guidelines rather than specific performance improvements. This demonstrates the value of the document, the announcement said.
  • Managing dependencies and versioning is the biggest challenge for maintainers of open source Go modules. Open source module maintainers face the challenge of keeping their dependencies up to date and avoiding outages due to version control and breaking changes. The official stated that it plans to further explore this area to help maintainers provide a stable and healthy ecosystem.

As with previous survey results, Go is primarily used in the tech industry, with about 80% of respondents saying they program in Go at work. Overall, survey respondents have tended to be satisfied with Go over the past year, with 92 percent saying they are somewhat or very satisfied. Another  4% were dissatisfied and 4% were neutral.

How people of different experience levels currently use Go (and where else they would like to use it)

Experienced Gophers tend to use Go for more types of applications. For example, experts use Go in at least four domains, while novices use Go in only two domains. Regardless, building API/RPC services and writing CLIs are still the two most common use cases.

The GUI and Website / Web services (returning HTML) are also showing some interesting trends. People of all experience levels adapt Go to Desktop/GUI applications at roughly the same rate. "This gave us evidence that the desire for a GUI came not just from new Gophers looking for interesting introductory projects, but across the spectrum of experience."

Websites / services returning HTML shows a similar trend. The report suggests that one explanation could be that this is a common use case early in someone's Go journey (as it is the top 3 most common for newbies), or that newbies are more likely to work on websites or web services returning HTML.

When asked "Areas I want to use Go but haven't used Go yet". 29% of respondents said that they have used the Go language in any field they can think of, but the top two fields of expanded usage are GUI/Desktop and AI/ML applications; and in different organizational sizes and job roles This is the case in the group. But in terms of experience level, the first area where newbies prefer to use Go is websites / web services returning HTML.

The report also states that in an open text question, 12 out of 29 respondents expressed a desire to use Go for websites / web services returning HTML; the reason they did not do so is that other languages ​​have frameworks that can be more This use case is well supported. It may be that more experienced Go developers won't try or expect to use Go for this use case, while other languages ​​already have frameworks for these needs. "It's often easier to do this in other languages ​​like PHP or Ruby. Part of that is because of the good frameworks that exist in those languages."

Also, another explanation for newbies' interest in web development might have to do with their use of JavaScript/TypeScript. Novices spend more time writing in JavaScript/TypeScript than more experienced respondents. The higher interest in the Web may be related to novice respondents' current jobs in other languages, or may indicate a general interest in Web technologies. "In the future, we hope to learn more about this use case and how we can help new Gophers start using Go in areas that are most useful to them."

Biggest challenge when deploying Go code

"Ease of deployment" is often cited as one of Go's strengths, but in a recent study, the Go team received some conflicting feedback "that prompted us to explore potential issues when deploying Go code." Of the open text responses, the most common issue reported by far was difficulty cross-compiling with cgo (16%), followed by support for WebAssembly or WASI (7%).

Some other findings include:

  • About a third of respondents maintain an open source Go module.
  • Linux and macOS are nearly neck-and-neck as the most popular development platforms. Newbies prefer Windows over experienced Go developers.

  • Thirty percent of respondents have used the Go language for two to four years, 19 percent for five to seven years, and 8 percent for more than eight years.
  • Visual Studio Code is still the mainstream choice for Go developers to write code .

in conclusion

  • Novice Go developers prefer web development over respondents of other experience levels. This is an area that the Go team wants to explore further to ensure that the needs of new Go developers are met.
  • Security defaults, best practice guidance on security and optimization, and more refactoring help in the IDE will be valuable additions to the community.
  • Error handling is a high priority issue for the community and presents challenges in terms of verbosity and debuggability. The Go team currently has no public proposals to share, but is continuing to explore options for improving error handling.
  • Onboarding and learning best practices was one of the biggest challenges faced by respondents and will be an area of ​​future research.
  • Keeping dependencies up to date, module versioning, and identifying or avoiding breaking changes are the biggest challenges for Go module maintainers. Helping maintainers provide a stable and healthy ecosystem is another UX topic that deserves further research.

More details can be found in the full report .

Guess you like

Origin www.oschina.net/news/241492/go-survey2023-q1-results