Swift
Realm
A mobile app where you can schedule
deadlines or weekly habits along with their estimated
time for completion and track timed progress
Overview
I built this application with the intention of bettering my time
management. The base concept of the app came from Universities 'hours
per credit' systems where they prescribe a recommended amount of time to
focus on each module per week. For example, a 20 credit module would be
200 hours of work. Working off this concept my app lets you add tasks
with their required hours per week so you may: view this progress, see if you
are hitting the goals and see whether you are neglecting certain modules.
I later expanded this focus on Uni life and added individual tasks.
These are tasks with deadlines (such as a coursework
or dissertation), again you would prescribe a target time to complete this
task. Along with this I added in an advanced feature where you could alter
the time blocks you would like to work towards the target in, meaning the timer
could count down from a different starting number depending on the task
being completed.
Features
Adding, deleting and editing tasks
Due to only writing this project in swift, with the intention of it being
used for iPhones and iPads, I didn't see the need to store user data remotely
as the only benefits I could see for this type of data storage were
syncing between devices (which is unlikely as the code is only for one
type of device), or as a fail-safe in case local data is lost (this data
is likely not that important to the user). As this is not enough to justify
the costs, I instead opted to store all data locally through the use of
Realm as this is a relatively friendly database management system.
Timer
The challenge I found with the timer is ensuring it persists when the
phone is sent to sleep or the app is sent into the background. To get around
this I decided to store the timer start time in a plist as this is a small
amount of data which does not need to be searched or ordered and so a
database would be overkill. The use of a plist in this instance would
likely also result in quicker retrieval which is important
to ensure the timer has less initial lag upon re-entering the app.
Sorting Tasks
For this I used a bubble sort as this will likely be a list under 15 or
so items and so the extra code complexity of a merge sort, quick sort or
any other O(n log n) algorithm would not me worth the impact on code
readability.
Tech Stack
- Programming Language: Swift
- Development Environment: Xcode
- UI Framework: SwiftUI
- Database: Realm