The silly tarot

The silly tarot ✦

Building on my realization at Nubank – that truly understanding user experiences requires looking beneath the surface, much like the cross-sections that fascinated me as a child – my exploration into technology has been further fueled by my MBA studies in Data Analytics. This pursuit of deeper understanding naturally led me to a personal project that blends technical application with a touch of the absurd: 'Monty Python's Silly Tarot Reader,' written entirely in Python.

This project, in its own whimsical way, continues my exploration of how underlying mechanisms – in this case, code and data – can create engaging and unexpected user interactions. Leveraging the versatility of Python and the Tkinter library, the application delivers a graphical interface for a decidedly non-traditional Tarot reading. It randomly draws one of 14 major arcana cards, pairing its conventional meaning not only with a carefully (or perhaps haphazardly) selected Monty Python quote.

This juxtaposition of esoteric tradition and British surrealism aims to provide a unique and humorous user interaction. The underlying logic for the random card selection demonstrates the application of probabilistic concepts learned during my data analytics coursework, echoing the data-driven insights I began to appreciate at Nubank.

Beyond the whimsical facade, the project involved structuring a dataset of Tarot card information, managing image assets, and implementing a user-friendly GUI. Deploying the application on GitHub using Git provided practical experience in version control and project management.

This endeavor underscored the importance of organized data handling, the application of randomness in programming, and the principles of user interface design – all skills that complement the user-centric approach I developed in my design work and began to quantify with data at Nubank. Built with Python, this project showcases my ability to translate data into an interactive and entertaining application, demonstrating transferable skills in logical thinking, data manipulation, and a proactive approach to learning and applying technical skills.

Key
Learnings

    • Using a list of dictionaries (tarot_cards_data) to structure the information for each Tarot card, including its name, meaning, quote, and image file path. This made it easy to access and iterate through the card data.

    • Realizing the importance of consistent keys within the dictionaries (e.g., "name", "meaning", "image") for reliable data retrieval in the draw_card() function.

    • Employing random.choice(tarot_cards_data) to select a Tarot card unpredictably when the user clicks the "Draw a Card" button, simulating a random draw from a deck.

    • Understanding that each time the draw_card() function is called, a different card could be selected due to the nature of the random selection process.

    • Creating basic GUI elements with Tkinter, such as the main window, a Button for user interaction, and Label widgets to display text (card name, meaning, quote) and images.

    • Using layout managers like pack() to arrange the widgets within the window and config() to update the text and image displayed in the labels dynamically.

    • Learning to handle user interaction through the command attribute of the button, linking it to the draw_card() function.

    • Initializing a Git repository (git init) to track changes in the project files.

    • Staging files (git add .) and committing them (git commit -m "...") to save snapshots of the project's progress.

    • Linking the local repository to a remote repository on GitHub (git remote add origin ...) and pushing the local commits to share the project online (git push origin master).

    • Encountering and resolving authentication issues with GitHub using a Personal Access Token.

    • Debugging the KeyError: 'images' by realizing the incorrect key was being used to access the image file path in the chosen_card dictionary.

    • Troubleshooting the "Error loading image" by identifying issues with file paths, file names, and the location of the image files.

    • Resolving the "bad cursor spec 'hand3'" error by identifying the correct Tkinter cursor name ('hand2').

    • Navigating the complexities of Git branch management, including rebasing and force pushing to align local and remote branches.

Previous
Previous

The Cross-Section

Next
Next

The Principle of The Bigger Smile