UdS Fahrplan Bot Development Log (2) -- Planning for telegram bot
This blog post is trying to tell you:
- The motivation of making my own telegram bot
- Is UdSfahrplan “Reinventing the wheel”?
Saarfahrplan v.s. Uni Students
Previous post: UdS Fahrplan Bot Development Log (1) – Fetching data from HAFAS and its APIs through POST requests
SaarFahrplan is a public transport app to provide real-time information and services related to public transportation in Saarland. Its target users are the people who live and travel in Saarland for general purpose. When it comes to a smaller group of users, for example Uni students, some functionalities might be redundant and we may optimized some common use case for better user experience.
Common use cases for students
Instead of searching different connections, Uni students’ timetable are usually consistent and repetitive. There are a few places where they always go, for example:
- Go to the Uni
- Go to the Mensa
- Go to the Dormintory
- Go to the City
- Go to the Supermarket
Another scenario will be when we are in somewhere new, we would like to know how to go back home (dormitory).
Key functions on our telegram bot
Based on the above use case, So we create our own app/bot that only accommodate them.
Specified set of stations
We first made a set of stations that are commonly used by Uni students, that can be used without further search. On the other hand, we also provided a search function for other stations if needed.
/home
– A function that saves your time
Originally, if you want to search for a trip in Saarfahrplan, you need to:
- Go to the “Trip Planner” page
- Type the starting location
- Select the correct station in the pop up fragment
- Back to the “Trip Planner” page
- Type the destination
- Select the correct station in the pop up fragment
- Back to the “Trip Planner” page
- Select Departure time in the pop up (optional)
- Press “Search Button”
This is somehow annoying if you already know which station you are planning to go. Therefore, we create the following flow:
- Use the
/home
command - Select the destination
- Select Departure time
Since we’ve already made a set of stations, we can save lots of time from searching. Of course, if we are in a new place where the set is not included, we can:
- Use the
/home
command - Select the
More Stations
- Type the station name
- Select the correct station
- Select Departure time
All actions can be done in the same interface.
/sethome – One time setup, use forever
As we can see, the major difference between our design and the app is that we don’t have to search or select our destination when using the command /home
. This is because we already stored users’ home station beforehand.
Short Summary
Instead of repeating the whole workflow, we can first save the progress of some subtasks, and retrieve them in our daily workflow to save our time.
$$\text{(Task A + Task B)}\times\text{repetitons}\Rightarrow\text{Task A + (Task B}\times\text{repetitons)}$$
Continue Reading: UdS Fahrplan Bot Development Log (3) – Implementation on /trip and /Depart function
Reference
UdS Fahrplan Bot Development Log (2) -- Planning for telegram bot