Waste your life

During my master's program in the "Programming Concepts" module, I ventured into the world of functional programming with this project called "Waste Your Life". This marked my first encounter with Haskell and the realm of functional programming.

visualize your life

                   _                              _ _  __  
__      ____ _ ___| |_ ___ _   _  ___  _   _ _ __| (_)/ _| ___    
\ \ /\ / / _` / __| __/ _ \ | | |/ _ \| | | | '__| | | |_ / _ \  
 \ V  V / (_| \__ \ ||  __/ |_| | (_) | |_| | |  | | |  _|  __/  
  \_/\_/ \__,_|___/\__\___|\__, |\___/ \__,_|_|  |_|_|_|  \___|  
                           |___/  
scroll up to be depressed

Inspiration

I took inspiration from the video "What Are You Doing With Your Life? The Tail End" from kurzgesagt, which visualized our days on earth in their typical upbeat depressing style and I'm also a big fan of these boxes-per-day type of visualizations like github or other sites use it (Street Complete also does it)

Kurzgesagt

[--] What Are You Doing With Your Life? The Tail End

  • shows how long certain events are in your life

Box-Per-Day

[--] Street Complete

  • Commit History / Activity

The result is a small CLI tool that can display each day you lived with a '#' and also display events that you can highlight.

#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  ######   |  09.09.2022 -  Event X   
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
######■  #######  #######  #######   |  04.03.2023 -  Event Y     
#######  #######  #######  #######   |     
#######  #######  #######  #######   |     
#######  #######  #######  ######   |  15.06.2023 -  Event Z     
#######  #######  #######  #         | 
  
each # is a day you lived

Persistence

in order to save the that I settled on a simple txt that I parsed in order to get the events that should be displayed and also to save events that can be input via the CLI. Nothing fancy but it works.

data.txt

birthday - 01.01.1956  
01.01.1956 - Born
12.05.1973 - High school graduation
19.07.1978 - First day of work at the Springfield Nuclear Power Plant
03.12.1980 - Marriage to Marge Bouvier
01.05.1981 - Birth of Bart Simpson
03.11.1983 - Birth of Lisa Simpso

...

I will probably never go back to this project but if I would these changes would be nice to have:

Enhancements / TODOs

  • Display content responsive based on terminal size
  • sort data.txt by dates
  • Show in representation years or similar
  • Delete entries
No results found.
2023-12-20 12:37:00