I have recently joined a team which works in Go (no frameworks). My team handles multiple backend services ( exposed through REST APIs ) which are like a platform for various other services.
I have picked up the language grammar and have enough understanding to write working code. However, I feel I don't "get" it. I don't understand how to organise the code into a well-defined folder structure and interfaces.
I would like to understand what are some of the good ways to learn a new language. It's been 2 months since I started learning it and feel like I am working with incomplete knowledge. Maybe at 50% level. I know there's no point in understanding all the features of a language but I would like to understand design patterns, best practices and how to write high-quality code.
I really need to be able to ramp up in another month's time.
Majorly need advice on
Best advice is just to dive in. What's the easiest thing you can do to commit some code? Maybe update some comments or unit tests? As you do this, you'll naturally start to read adjacent parts of the codebase, and that's a very effective way to learn how to write high quality Go which is also compliant with the standards of your company.
Dependency Injection is tricky because the entire point in some sense is to write some code for you (so there's inherently some "magic" that programmers hate. If the existing examples in the codebase are too complicated, I'd recommend starting a project from scratch and trying to recreate some basic examples.
Learning design patterns in particular is challenging unless you have your hands in the code. It's really hard to have nuanced design pattern discussions until you've actually created a few files and modules.
Adding to Rahul's advice, I would like to say that you can get started and keep trying to connect dots between what you've studied and how the same is implemented in the codebase you're working on.
Quite often, a new framework or programming language can seem a bit alien due to lack of usage by the user, however try to understand the fundamentals and not get trodden down by the syntax. For instance, loops and mutex variables share the same meaning across languages even if syntax may vary widely. This is a transferrable skill and understanding the basics will go a long way. Don't feel bad if you need to refer the syntax during the initial usage. If you understand what purpose it is serving, it would eventually come to you.
Alongside connecting the dots, you can try to build your own mini projects that give you some experience of how things are done in that particular language.
At last, don't feel shy to ask questions within your team. You can refer some amazing pointers here on asking questions.
A good reference to a channel that has some videos on Golang.