What did the developers of 'D3.js' used all over the world learn in 10 years?



'D3.js ' is a data visualization library used by various websites such as The New York Times and OpenStreetMap. In commemoration of the 10th anniversary of the development of D3.js, developer Mike Bostock has released 'What I learned while developing D3.js for 10 years'.

10 Years of Open-Source Visualization / Mike Bostock / Observable
https://observablehq.com/@mbostock/10-years-of-open-source-visualization

◆ 'Usage examples' help spread the tool
According to Bostock, the newly developed tools are foreign to non-developers. Therefore, it is necessary to prepare 'documents', 'tutorials', 'use examples', etc. in order to popularize the tool.

'Even as a developer, I often see D3.js use cases,' Bostock said, emphasizing the effectiveness of 'use cases.' On the other hand, he also pointed out the danger of relying too much on 'use cases', saying, 'The use cases only show how to use the tool in a specific situation, and may not assume the situation where the tool is actually used.' doing.

◆ Communicating with the community helps improve tools
According to Bostock, interacting with users through services such as Stack Ovewflow, GitHub, Twitter, and Slack 'discovers significant tool flaws incredibly quickly.' In addition, user questions can reveal flaws in 'documents' and 'use cases,' which can be fixed to prevent other users from facing similar issues. ..

However, Bostock is concerned about the mood of 'unpaid maintainers having to respond immediately to any problem' on platforms such as GitHub. 'You don't have to aim to help everyone. If you feel uncomfortable or unconstructive trying to respond to user feedback, you can stop responding. We recommend that you work on the development of the tool with plenty of time.



◆ 90% of bugs are caused by 10% of code
'Some code can cause far more bugs than others,' Bostock said. Bostock also argues that it's not the quality of the code that causes many bugs, but 'they don't know exactly what features developers implement.'

Mr. Bostock mentioned the functions related to drawing processing such as 'd3-zoom', 'd3-drag' and 'd3-brush' as the functions that are prone to bugs in D3.js. , Users perform various operations such as click, double-click, and drag, so it is difficult to accurately grasp the execution result of these functions. ' It is difficult to eliminate bugs, so it is important to prioritize problem resolution quickly.

◆ The internet is offensive
Mr. Bostock says that every time he sees complaints about D3.js on the Internet, he feels sick. 'Before complaining about the tool, think about how the word affects developers.' 'If possible, help improve the tool by improving the documentation and pull requests. That's the beauty of open source. If you feel dissatisfied, we ask you to help develop the tool.

He also argued that it was necessary to build a community of small numbers of people to provide 'verification,' 'feedback,' and 'support' in order to prevent emotions from being influenced by reactions on the Internet. We hope that the web service '

Observable ' developed by Mr. Bostock will be used as 'a virtual space for the community to work together to solve problems'.



◆ Have a good time
Mr. Bostock spends a lot of time 'looking back on what part of his life and work he enjoys.' “By knowing what you're enjoying, you're more patient and closer to achieving your goals,” Bostock claims.

in Software, Posted by log1o_hf