Some Go Web Dev Notes
Julia Evans discusses her experience with Go, highlighting improvements in routing, the sqlc tool for SQL queries, SQLite optimization tips, and Go's memory management, praising its simplicity and ease of use.
Read original articleJulia Evans shares insights from her recent experience developing a website using Go. She highlights improvements in Go 1.22, particularly in routing, which now allows for more streamlined code compared to manual routing. She also discusses the benefits of using sqlc, a tool that generates Go code from SQL queries, reducing boilerplate and simplifying database interactions. Additionally, Evans provides tips for optimizing SQLite, such as using separate database objects for reading and writing to avoid SQLITE_BUSY errors. She notes the introduction of a garbage collection memory limit in Go 1.19, which has helped her manage memory usage in low-resource environments. Evans appreciates Go for its simplicity, ease of deployment, and the ability to quickly resume work on projects after long breaks. She contrasts her experience with Go to her attempts to learn Rails, finding Go's straightforwardness more conducive to her workflow. Overall, she expresses enthusiasm for the new features in Go and encourages developers to stay updated with release notes.
- Go 1.22 improves routing capabilities, allowing for cleaner code.
- sqlc generates Go code from SQL queries, reducing boilerplate.
- Optimizing SQLite involves using separate objects for reading and writing.
- Go 1.19 introduced a memory limit for garbage collection to prevent OOM issues.
- Evans prefers Go for its simplicity and ease of project resumption.
Related
First impressions of Go 1.23's range-over-func feature
The author shares positive experiences with Go 1.23's range-over-func feature, initially skeptical but finding it easy to use. Successful adaptation in their project Kivik disproved initial concerns, highlighting benefits for codebase improvement.
Go is my hammer, and everything is a nail
Markus, a solo developer, exclusively uses Go for software development, valuing its simplicity and versatility. He believes focusing on one language enhances productivity and deepens expertise without limiting career options.
Go 1.23
Go 1.23 has been released with enhancements to the toolchain, runtime, and libraries, including the "range-over-func" feature, opt-in telemetry, and updates to the standard library for improved performance.
An unordered list of things I miss in Go
The blog post highlights features missing in Go, such as ordered maps, default arguments, and improved nullability, suggesting these enhancements could benefit the language despite requiring significant revisions.
A Love Letter to Go
The author reflects on 12 years with Go, praising its simplicity, performance, and concurrency, while suggesting improvements in data structure handling and broader use in data science and machine learning.
> Also sometimes if I have two tables where I know I’ll never need to do a JOIN beteween them, I’ll just put them in separate databases so that I can connect to them independently.
Never thought of using SQLite like this. Will keep this in mind!
> I’ve tried to learn Rails a couple of times and I really want to love Rails – I’ve made a couple of toy websites in Rails and it’s always felt like a really magical experience. But ultimately when I come back to those projects I can’t remember how anything works and I just end up giving up. It feels easier to me to come back to my Go projects that are full of a lot of repetitive boilerplate, because at least I can read the code and figure out how it works.
Reflects my experience with Rails as well. In contrast to this when I build using Ruby (Roda, Sequel), I never have this problem.
Related
First impressions of Go 1.23's range-over-func feature
The author shares positive experiences with Go 1.23's range-over-func feature, initially skeptical but finding it easy to use. Successful adaptation in their project Kivik disproved initial concerns, highlighting benefits for codebase improvement.
Go is my hammer, and everything is a nail
Markus, a solo developer, exclusively uses Go for software development, valuing its simplicity and versatility. He believes focusing on one language enhances productivity and deepens expertise without limiting career options.
Go 1.23
Go 1.23 has been released with enhancements to the toolchain, runtime, and libraries, including the "range-over-func" feature, opt-in telemetry, and updates to the standard library for improved performance.
An unordered list of things I miss in Go
The blog post highlights features missing in Go, such as ordered maps, default arguments, and improved nullability, suggesting these enhancements could benefit the language despite requiring significant revisions.
A Love Letter to Go
The author reflects on 12 years with Go, praising its simplicity, performance, and concurrency, while suggesting improvements in data structure handling and broader use in data science and machine learning.