I had the privilege of attending Codemash 2017 again this year. Over the next few weeks I will be writing about the various sessions I attended.
The first is a session entitled ES6 Patterns in the Wild by Joe Morgan (@joesmorgan). The premise was that as developers we can learn a lot from reading other developers’ code, but the talk was specifically about what he has learned about ES6 by doing this.
I had not made this distinction before, but the speaker broke down code into two types:
- Code to run (this could be code we write or import)
- Code to teach
Code to teach can come from a variety of sources: tutorials, documentation, conferences, style guides, stack overflow, and books. But perhaps the most overlooked source code you can read and learn a lot from is by looking at github projects. During the session the speaker used examples from the Redux source code to illustrate things he has learned about ES6. Other projects in the ES6 space that have been valuable to read are Angular, React, Moment, and Lodash.
The takeaways from this session were that you should:
- Build up your own list of readable code libraries that you can learn from
- Find a few authors that you like and read code from their projects
I am a big fan of learning new things and finding better ways to write software, but I have to admit that reading code from other projects is not something I have utilized before.
Overall I think this is a great idea and I plan on making it part of my weekly learning time.