Skip to main content

Tagged Index

I finished the first implementation of the “tagged index” feature. For the first use, I created an index of Haskell books. It took more time than I anticipated! There are quite a few books, and there were a lot of decisions to make.

  • Should the index include books that are really old? Newer does not mean better, but most old books are probably not what people are looking for. I eventually had the idea to include the publication year in the index and sort by publication year so that old books are displayed at the bottom.

  • Should the index include books that are not about Haskell but are usually of interest to Haskell programmers? I decided to only include books about Haskell or the implementation of Haskell-like languages. Perhaps I will create a different index for Haskell-adjacent topics, such as category theory.

  • Should beginner books be tagged with all of the topics that they cover? Some beginner books just cover core language topics, while others cover many topics. For example, Alejandro Serrano Mena’s Practical Haskell could potentially be tagged with testing, web, database, and concurrent! I decided to assign tags based on primary theme, as I think that it makes filtering by tag more useful.

  • Should the book pages include any commentary from me? At one point, I considered listing strengths and weaknesses of books that I am familiar with. For example, my commentary may be helpful to beginners to determine if it is worth reading Real World Haskell or not, more than ten years after it was published. I decided to not include any such commentary. Instead, I will likely write a separate article about my recommendations, allowing me to focus on positive aspects of books.

  • Should I include images of book covers? I decided against it. One can easily see the cover images on the linked sites.

I implemented the tag filtering using simple TypeScript. I much prefer PureScript, but I selected TypeScript in order to keep the size of the generated JavaScript small. TypeScript provides some basic type safety, and the compiled output should run in a wide range of browsers.

I tested the simple UI in a variety of browsers, and it did not work in Chrome on my phone, even though it worked fine in Chrome on my desktop and tablet! (I am not a fan of Chrome, and it seems to pick on me at every opportunity.) I was unable to debug the issue at all on my phone, so I connected it to my laptop via USB and set up remote debugging. The remote debugging feature is impressive, but it did not help me solve the problem.

After giving up on remote debugging, I started a test server on a LAN IP and connected to it on my phone, allowing me to utilize some last-resort debugging techniques that involve compiling test builds with alert statements. It started working before I made any significant changes! I have no idea how it could have happened, but I suspected a browser cache issue. I wiped the Chrome cache, and the live UI worked fine.

I shared links to the Haskell books index on Haskell Café and Reddit, and I have received some positive feedback via email.

Thinking about it today, I realized that this “tagged index” functionality would be more valuable as separate software, not part of my website. The primary benefit of having it integrated with my website is that it might result in more people seeing my projects, articles, and blog entries, but there are many more benefits to making it separate…

What I have in mind is a program that builds a “tagged index” that can be hosted on a static site, as part of a large website or as a standalone site. For example, I could create a haskell-books-index repository on GitHub that includes the source (YAML metadata and Markdown content), and the built site could be hosted on GitHub Pages. One benefit is that GitHub Pages has better uptime than the VPS that hosts my website. Another benefit is that it would make it easier for people to contribute. The repository could be managed my multiple maintainers, and anybody could submit changes via pull requests! Alternatively, the built site could even be hosted on the haskell.org website, if the community would like to make such a service “official.”

With standalone software, other communities would be able to easily use it to create similar services for their community members. The software could be very helpful to people in many different communities!

I have started thinking about how to implement such a standalone program, but I have yet to determine if I can spare the time to work on it anytime soon.

Author

Travis Cardwell

Published

Tags
Related Blog Entries