Event scheduler
Authors: David, Johnson
What is the problem?
A command-line-based scheduling app. Provide features such as add/remove/list events. Each event may contain information such as name, date, starting time and duration. Events may be categorized into different user-defined tag, and the user may list events according to the specific tags. The application also supports modifying of the events created, and updates the changes to the KB.
What is the something extra?
The app will read the local time to perform additional features such as date calculation, current event, and auto removal of outdated events.
Link to the Canadina Holiday API to check holidays and notify the user about it.
Create a local storage for all the event created and automaticly reads it at the begining of the program.
What did we learn from doing this?
What did we learn about Logical programming?
Logical programming language(referred to as LPL) is very different from the OOP languages frequently worked with. Though the return for function in LPL was a bit hard to understand at the beginning, the simplicity and strait-forwardness of the language makes writing functions quick and easy. With some external libraries and modules, we were able to easily create an external physical database and use APIs or system information. Also, similar to Functional Programming Languages like Haskell, LPL is easy to build tests and declare variables. It’s more convenient than Haskell for declaring functions since you do not need to care about types when declaring. The uniqueness of the language’s ability of returning multiple answers with “;” is very helpful when listing and testing, but it can also bring troubles if not careful with case handling. Because the ordering of declaration matters in LPL, it caused a lot of trouble when we first encountered this. As a way to represent cases for a function, we have to declare multiple copies of the function to handle different situations. If not careful, it might result in returning multiple answers when it shouldn’t.
What did we learn about using API in Logical Programing?
It was surprising to us as we did not expect Prolog to be able to use API like other languages. Yet it works perfectly and is even more concise when dealing with JSON handling compared to some other languages. By giving API functionality of prolog, we were able to easily call Canada holiday API in prolog to get the Date, Name of each Holiday in BC and the respective nearest holiday in respect to global time. With this, we were able to extract the needed JSON code for the information we needed. Prolog also made it fairly simple in allowing us to convert the extracted JSON into prolog so that commands can be used to call the information extracted.
Is Logical Programing suitable for this project?
As a terminal based program Prolog works well in this project. It was able to satisfy all our current needs and we were able to work with it conveniently. However we might encounter problems when we are trying to expand on this program such as having a GUI, because it does not have too many library supports.