1/29/23
Browsing this week’s commit messages, there weren’t too many exciting additions. A few user experience improvements, alert if no records for search, but nothing major. I have decided against a major async rewrite of the server code, for now. It would be an interesting experiment, likely nothing more.
Cleaning the server code is more important now, especially as the Gallica Grapher moves into a new phase of public responsibility. Working with the Gallicagram team, we hope to integrate the context searching portion of the grapher into Gallicagram as an iframe. The Grapher will become more of a community tool; I want to ensure the code is maintainable by others. In the ideal case, the code is just as complex as the problem it solves, nothing more. My hope is that researchers would contribute to the design of their own tool, together, learning from the practices of open source development teams across the world. I must do a few things to prepare the repository for contributors:
Finishing these items will be the task of the coming week. I am also getting some tracemalloc errors when testing portions of my fetching code. An unclosed resource somewhere in my Python code. Much to do!
Indeed, I’m late partly because I was puzzling over pagination, working on the new context viewer. React Query’s useInfiniteQuery made the task easier. I am still learning what makes a good API; I think useInfiniteQuery is general enough to be widely useful. My use case was greatly complicated by allowing the user to skip pages. I had to manage the cache, control the boundary, and so on. Hopefully, I solved the core complexity, without adding frivolous complexity. The eternal challenge of software design: managing complexity. Check out the viewer, let me know if it breaks!