Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Diary of my first OSS library

Diary of my first OSS library

Link to the talk: https://www.youtube.com/watch?v=g1BIdbA_eXQ

This presentation covers the next points:
- OSS current existing problems
- Building a JS library like a pro
- Release and maintenance.

Raúl Gómez Acuña

September 16, 2017
Tweet

More Decks by Raúl Gómez Acuña

Other Decks in Technology

Transcript

  1. Diary of my first OSS
    library
    Raúl Gómez Acuña

    View Slide

  2. About me
    ‣ Spanish expat in Wroclaw since 5 years ago
    ‣ React & React Native developer
    ‣ Working at callstack.io
    ‣ https:/
    /github.com/rauliyohmc
    ‣ Twitter: @rgommezz
    ‣ https:/
    /medium.com/@rauliyohmc

    View Slide

  3. 1. OSS existing problems
    2. Build a JS library like a pro
    3. Release and maintenance

    View Slide

  4. Diving into oss
    Skimming the surface

    View Slide

  5. Diving into OSS
    Evolution of GitHub repositories from 2008 until 2013

    View Slide

  6. Diving into OSS, 2016
    ‣ 19.4+ million active repositories
    ‣ Is this something beneficial for the community?
    ‣ Analogy to JS fatigue
    ‣ You don’t need to reinvent the wheel!

    View Slide

  7. Discovery

    View Slide

  8. Quality Assessment

    View Slide

  9. Conference driven
    development

    View Slide

  10. Key points
    ‣ Open source is not a competition
    ‣ We need to see it as a collaborative environment
    ‣ Contribute to existing libraries!
    ‣ Start with something simple, like documentation

    View Slide

  11. React Native and Offline

    View Slide

  12. Discovery
    • Googled “react native offline”

    View Slide

  13. Quality Assessment
    ‣ 2 were only libraries and 1 example app
    ‣ The most starred (83) only had 1 file with 55 lines of
    code
    ‣ Last commit 12 of January
    ‣ No test coverage

    View Slide

  14. Wish List
    ‣ Showing/hiding several elements on a screen if offline
    ‣ Easy redux integration
    ‣ DRY for checking connectivity before launching API calls
    ‣ Offline queue

    View Slide

  15. Extraction
    Would this be useful for other people?

    View Slide

  16. Build a js-Based
    library
    Like a PRO

    View Slide

  17. ESLINT
    ‣ Static analysis of your code
    ‣ Discover problems in JS code without executing it
    ‣ Comes with a predefined set of rules embraced by JS
    community
    ‣ Easily pluggable

    View Slide

  18. ESLINT

    View Slide

  19. rettier
    ‣ Opinionated code formatter for JavaScript
    ‣ Enforces a consistent code style across your codebase
    ‣ You focus on writing code

    View Slide

  20. LOW
    ‣ Static type checker for JavaScript
    ‣ Benefits:
    ‣ You can incorporate it incrementally
    ‣ It finds bugs you encounter in runtime
    ‣ Downsides:
    ‣ Time spent on learning and typing

    View Slide

  21. Testing
    ‣ Guarantee our users the library works as intended
    ‣ Reduce the number of future issues
    ‣ Facilitate external contributions

    View Slide

  22. Continuous integration

    View Slide

  23. Example app
    ‣ Key factor for developer engagement
    ‣ Users can copy paste snippets into their apps
    ‣ Improves quality assessment

    View Slide

  24. Example app

    View Slide

  25. Badges

    View Slide

  26. Quality pyramid
    UX
    ROBUSTNESS,
    RELIABILITY
    DX

    View Slide

  27. Bonus
    ‣ Node module generator
    ‣ Commitizen
    ‣ Semantic Release

    View Slide

  28. Release and
    maintenance
    Handle it properly

    View Slide

  29. Naming

    View Slide

  30. Advertise!
    ‣ Write a blog post in medium
    ‣ Tweet about it
    ‣ Use reddit
    ‣ Use Facebook groups

    View Slide

  31. Contribution guidelines
    ‣ Set it up from the beginning
    ‣ Avoid medium size PRs without previous discussion
    ‣ Award contributors: https:/
    /github.com/kentcdodds/all-
    contributors

    View Slide

  32. Contribution guidelines

    View Slide

  33. Maintenance
    ‣ Onboard more admins -> offload responsibility
    ‣ Engage active contributors to become admins
    ‣ Anticipate that fact before realising you don’t have time
    for maintenance

    View Slide

  34. Present and future
    ‣ https:/
    /github.com/rauliyohmc/react-native-offline
    ‣ Adding more maintainers to the library
    ‣ OSS my RN app
    ‣ So that others can learn from a production ready app
    ‣ Example of react-native-offline usage

    View Slide

  35. Thanks :)

    View Slide