For reaching my goal of having 3 projects online by my 30th birthday I hurried up in releasing While Model Trains, but I did not make a proper introduction for it.

So let me do it now.

The Idea

I am a fan of Louis Pereira’s Reading Something Great that allows you to discover timeless articles in various categories.

I really enjoy reading blogs, especially related to the data world and programming. The ones that look promising but I have not time to read end up in a chat with myself in the hope of going back to them and are forever forgotten there.

forgotten-post

Connecting the two dots I thought: why don’t embrace randomness and make an app that let you discover nice data blog posts and eventually refind them?

So in a weekend (plus weeks of under the tip of the iceberg work) I managed to implement it.

The App

While Model Trains is a single page application that is best to consume while you are waiting for your model to finish training (or your pipelines are running).

Instead of mindlessly scrolling social media (I am sometimes a victim of this myself) on this page you are served 3 blog posts about data, AI, ML. Each article comes with title, author, a short description and the link to read it.

If you are not interested in any of the articles you can just smash the button “Another Round!” and you will have a new triplet straight away.

As the slogan says the articles are carefully chosen. For this first release there are roughly 100 of the best articles I collected in the last months. I look forward to adding many more of them.

The Stack

It’s a bare bone Flask app with a single API to retrieve articles and a template to show the articles retrieved.

The articles are stored in a SQLite DB.

There is a little JavaScript for retrieving the articles when the button “Another round!” is clicked and for some “cosmetic” effects.

For the styling I relied heavily on Chat GPT since I am a noob in this area. After various iterations I obtained something pleasant (for my engineering standards).

I did not use any framework for the frontend. I tried using Bootstrap but the results were worst (given my knowledge) of plain css.

The code is hosted on GitHub and the app deployed on Vercel.

The part that took longer (similar to several data jobs) was collecting the articles, selecting the ones I prefered and preparing the descriptions.

Next Steps

In the next weeks I plan to work on adding other articles to the DB and moving from SQLite to PostGres on Vercel, otherwise when adding a new article on the DB I have to redeploy the solution.

Some other features I would like to implement are:

  • Suggest an article to allow users to share with me (and add to the db) one of their articles or one they found interesting.
  • User Login to serve best articles based on person. That would open up a nice experiment in recommendation systems.
  • Estimated Reading Time so if you are training a logistic regression you don’t start to read a post that takes 30 minutes.

Now you have something to do while (your) model trains, besides XKCD’s idea of dueling with laser swords

while-model-trains