I am a ruby developer and have been for a long time not. It shouldn't be a surprise that a language written to optimize for developer happiness makes developers happy. Looking at all the hoops people are jumping through to get an application built and launched I still think that for 95% of what is being built Rails is more than capable of doing and being built faster and and cheaper than the alternitives. Unfortunately for those who love ruby and the productivity of rails the other way is preferred.
- Does it have some odd behaviors? No doubt.
- Does it run pretty much everywhere? You betcha.
- Is it the optimal solution? Probably not.
- Does it need to be? Nope.
- Is it adequate? Probably.
I landed on go for a couple of reasons.
- It is a small language. The footprint of what the language does is reallty small and gives you the pieces for building larger more complex systems.
- It is web native. Looking at the lack of Go web frameworks that might sound silly. The reason there are not a lot of frameworks is the standard library has most of the web stuff built in. Why use a framework or 3rd party library when the standard library is excellent?
- The small compiled binary model works well with the modern Docker containers everywhere view of the universe. Building stateless web services that can be quickly deployed in isolated containers is a win.
- The community has spent a lot of time and energy on tooling to make the developer experience better. The language server for VS Code is very nice. Running the code formatting tool
gofmtautomatically on save really saves on bike shedding.
- Opinionated code formatting is 100% the way to go. I like prettier and running with the defaults. Overriding a tool like this seems like a huge waste of time and a great opportuniity to introduce problems.
- TypeScript is an improvement over regular JS. I do wish it was run time type checking instead of just compile time. But baby steps.
- It shouldn't have to be said but let the old JS syntax die and only use the es6+.
- Don't start a project by importing underscore.js until you have to.
- Coming from ruby I think 98% of the underscore library just needs to be included in the JS standard library.
- CSS-in-JS feels like inline styles with extra steps but sure lets do it
- Rendering html server side and letting JS take over on the client side is a much better experience than having a loading spinner.
- Rest API's are better than graphql. Sure graphql puts a lot of power and control in the client but it also requires a lot of reinventing the wheel to do things that the browser will give you for free using restful http verbs.
- Cypress.io is a solid tool for testing. Also listening to people say how easy the jquery inspired syntax is to use is hilarous. Jquery really did make dom manipulation sooo easy.
- Storybook + percy solves a lot of the problems with UI component libraries and unexpected changes slipping between the cracks.