Exercise 50. Routing the Statistics

Once you’ve solved the problem of the protocol and putting statistics into a data structure, you’ll want to make this much richer. This exercise may require that you redesign and refactor some of your code. That’s on purpose, as this is an absolute requirement when writing software. You must frequently throw out old code to make room for new code. Never get too attached to something you’ve written.

In this exercise, you’re going to use the URL routing from Exercise 47 to augment your protocol, allowing statistics to be stored at arbitrary URL paths.

This is all the help you get. It’s a simple requirement that you have to attempt on your own, modifying your protocol, updating your data structures, and changing ...

Get Learn C the Hard Way: A Clear & Direct Introduction To Modern C Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.