在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:quii/learn-go-with-tests开源软件地址:https://github.com/quii/learn-go-with-tests开源编程语言:Go 98.8%开源软件介绍:Learn Go with TestsFormatsTranslationsSupport meI am proud to offer this resource for free, but if you wish to give some appreciation: Why
Table of contentsGo fundamentals
Build an applicationNow that you have hopefully digested the Go Fundamentals section you have a solid grounding of a majority of Go's language features and how to do TDD. This next section will involve building an application. Each chapter will iterate on the previous one, expanding the application's functionality as our product owner dictates. New concepts will be introduced to help facilitate writing great code but most of the new material will be learning what can be accomplished from Go's standard library. By the end of this, you should have a strong grasp as to how to iteratively write an application in Go, backed by tests.
Questions and answersI often run in to questions on the internets like
If you have such a question raise it as an issue on github and I'll try and find time to write a short chapter to tackle the issue. I feel like content like this is valuable as it is tackling people's real questions around testing.
Meta / Discussion
Contributing
BackgroundI have some experience introducing Go to development teams and have tried different approaches as to how to grow a team from some people curious about Go into highly effective writers of Go systems. What didn't workRead the bookAn approach we tried was to take the blue book and every week discuss the next chapter along with the exercises. I love this book but it requires a high level of commitment. The book is very detailed in explaining concepts, which is obviously great but it means that the progress is slow and steady - this is not for everyone. I found that whilst a small number of people would read chapter X and do the exercises, many people didn't. Solve some problemsKatas are fun but they are usually limited in their scope for learning a language; you're unlikely to use goroutines to solve a kata. Another problem is when you have varying levels of enthusiasm. Some people just learn way more of the language than others and when demonstrating what they have done end up confusing people with features the others are not familiar with. This ends up making the learning feel quite unstructured and ad hoc. What did workBy far the most effective way was by slowly introducing the fundamentals of the language by reading through go by example, exploring them with examples and discussing them as a group. This was a more interactive approach than "read chapter x for homework". Over time the team gained a solid foundation of the grammar of the language so we could then start to build systems. This to me seems analogous to practicing scales when trying to learn guitar. It doesn't matter how artistic you think you are, you are unlikely to write good music without understanding the fundamentals and practicing the mechanics. What works for meWhen I learn a new programming language I usually start by messing around in a REPL but eventually, I need more structure. What I like to do is explore concepts and then solidify the ideas with tests. Tests verify the code I write is correct and documents the feature I have learned. Taking my experience of learning with a group and my own personal way I am going to try and create something that hopefully proves useful to other teams. Learning the fundamentals by writing small tests so that you can then take your existing software design skills and ship some great systems. Who this is for
What you'll need
Feedback
Logo is by egonelbre What a star! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论