<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Randi Seeberg</title>
    <description>The latest articles on DEV Community by Randi Seeberg (@randiseeberg).</description>
    <link>https://dev.to/randiseeberg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F632113%2Fce3053da-2661-4bd7-bf26-c0bc7600f4a4.jpeg</url>
      <title>DEV Community: Randi Seeberg</title>
      <link>https://dev.to/randiseeberg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/randiseeberg"/>
    <language>en</language>
    <item>
      <title>What does Tarot reading have to do with coding?</title>
      <dc:creator>Randi Seeberg</dc:creator>
      <pubDate>Sun, 16 May 2021 12:08:07 +0000</pubDate>
      <link>https://dev.to/randiseeberg/what-does-tarot-reading-have-to-do-with-coding-3478</link>
      <guid>https://dev.to/randiseeberg/what-does-tarot-reading-have-to-do-with-coding-3478</guid>
      <description>&lt;p&gt;Very little, acturally, unless you find yourself stuck for ideas for a portfolio project on Codecademy and really want to get going with the coding bit.&lt;/p&gt;

&lt;p&gt;That was my starting point. This is the final part of the excercise: "Write a blog post about your program".&lt;/p&gt;

&lt;p&gt;The program is written in Python3. It is named "Mme Nugget's Tarot Reading" after my son's guinea pig. If you decide to try the program, be warned that it offers only guaranteed useless advice, occasionally bordering on rude or harmful.&lt;/p&gt;

&lt;p&gt;A basic run goes like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Greeting&lt;/li&gt;
&lt;li&gt;Offers a choice of questions for the reading&lt;/li&gt;
&lt;li&gt;Picks a random card&lt;/li&gt;
&lt;li&gt;Delivers a reading of the card in relation to the question&lt;/li&gt;
&lt;li&gt;Offers another reading or to quit&lt;/li&gt;
&lt;li&gt;If another reading is chosen, the program starts again from 2&lt;/li&gt;
&lt;li&gt;Else, Thank you for your visit!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's a simple enough program. I endeavoured to set it up with a view to make it easy to add to it and increase the complexity later on: &lt;/p&gt;

&lt;p&gt;The cards and the questions are declared in two separate files from which they are imported for use in the main file. At present, there are only two cards and three questions, which is all I needed to test the code.&lt;/p&gt;

&lt;p&gt;The program is put together from small, simple functions which may be run, improved and tested separately.&lt;/p&gt;

&lt;p&gt;You can see the program here: &lt;a href="https://github.com/Randi-Seeberg/tarot_reading"&gt;https://github.com/Randi-Seeberg/tarot_reading&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The learning process&lt;br&gt;
An important part of the process was setting up my coding environment and start coding on my own computer, using Visual Studio Code and version control. Getting it to cooperate properly with the Anaconda Prompt was a challenge, but an internet search provided me with a solution. I have had an account on GitHub for a while but actually programming locally and pushing all changes to my program's repository on GitHub was new to me.&lt;/p&gt;

&lt;p&gt;Getting a push in the direction of where to join and write a blog post about my work was also part of the learning process.&lt;/p&gt;

&lt;p&gt;Thoughts about improving the program&lt;br&gt;
As the program currently has only three questions and two Tarot card to work with, the possible output is somewhat limited. It would be a big improvement to have more of both. However, as the program provides a reading based on the combination of a card and a question, every card must have as many readings as there are questions. Two cards times three questions amounts to six readings. To step that up would mean a lot of additional textwork. As much as I enjoy offering useless advice, I decided to leave that part of the program as it is.&lt;/p&gt;

&lt;p&gt;I liked the idea of being able to easily add questions or cards to the program, which is why in the 'questions' file, there is function called 'add_question'. However, I have not yet learned how to store the added questions and make them available for next time I open the program. I need to find out how to do that.&lt;/p&gt;

&lt;p&gt;For adding cards, it's a little more complicated, as each card is a dict item with (name:[reading1, reading2, etc.]). This means that every time a new card is set up, it needs to get the current length of the 'questions' dict in order to know how many readings must be in the value list of the card.&lt;/p&gt;

&lt;p&gt;To simulate something closer to a real-life Tarot reading, the program could ask the user to allow reversed cards in the deck. This would make readings more interesting but again double up on the aforementioned textwork.&lt;/p&gt;

&lt;p&gt;If you got this far, thank you for your time! You can have a free test run at Mme Nugget's Tarot Reading anytime.&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
