Final Project: Coding Part 2

 In my first post about my final project, which you can read here, I lament the difficulty of condensing everything I learned into one blog post and that difficulty has followed me into this week’s post. I also remark that part of why I think I’m having trouble writing was because I wasn’t sure how to make it a reflection post and not a “this is what I did post.” While there’s a certain truth to that for this week as well, I am finding that the difficulty arises primarily due to the fact that I have a paltry week to wrap up this project. For those of you who did not read the first post, or just need a refresher, my final project involves me learning, or attempting to learn, two programming languages, R and Python, and contemplating how, if at all, I might use this in my future classroom. 

Alright, so I left my last post by letting you all know where I was in my work, namely that I was going to finish this tutorial that shows you how to make data visualizations in Python and then move on to R. Well, funny story, I did not do that. I have found that when I code, I tend to get sucked into the coding vortex and refuse to leave until I have completed what I set out to do even if that means being cranky later because I didn’t eat enough haha. [1] While this isn’t inherently a bad thing, when you, like me, are at the end of a jam-packed semester and have multiple other finals to complete, you have to relegate certain days to coding and leave it at that. This week, I spent about two and a half days working on my code, and even though I want to work more on my code, I currently cannot afford to do so. [2] During that period of coding frenzy, I worked on the data visualization tutorial, did a very small portion of this data visualization (viz) tutorial in R, and spent the majority of my time working more on the minigame I mentioned last time. [3]

So far, I have found that I prefer working in Python to R which is why I spent so little time with that language. However, since my project was originally supposed to focus on both of them, I wanted to run the idea of mostly or only working with Python in the second week by my professor first. When I did, he mentioned that R was made to be, and is, a statistical language and people have found ways to use within that/those parameters whereas Python is more of a broad purpose programming language. Given that cool tidbit of knowledge, it makes sense to me why I found it more compelling to use Python. [4] Once my professor gave me the go-ahead to basically do what I want (haha), I had originally planned on focusing on finishing the Python data viz tutorial but alas my brain decided that what it actually wanted to do was add more to our Pypet game. As a reminder, the Pypet game originally came from this tutorial, but I have subsequently added various things to it that go relatively far beyond what the tutorial takes you through. Last week I had added some of the features that the tutorial suggests, such as a play function and a health variable for the pypet; I also added in a second day with a birthday party sequence for the pet and made it so that the user both chose what kind of pet they wanted and then named it. This week, I added in: having the player buy their pet a bed, food, and a toy with different options for each corresponding to different benefits, a way for the player to spend money (as in, I gave them a “bank” preloaded with “PyCoins”), had the game last for three “days” and showed that time passed by displaying what day it was in the morning, and a lot contingencies depending on what choices the player made.

While that might sound like I added a lot, I’m not really sure I did since I mostly just defined and used a bunch of functions and if/elif statements which I had already known how to do from last week. The only new feature I learned was how to use the date.time module, so my work just didn’t feel that impressive to me. Plus, I tried adding in text graphics (as in I tried to draw using only the symbols on a keyboard, aka emoticons), with little to no success which means that it feels, in my opinion, like the game has a lot of text and is thus boring. To add insult to injury, I feel like my code is way too long and could somehow, in ways I could not figure out, be simplified. The main issue for me is that since each step is different depending upon which animal you chose for your pet it leaves a lot of if/elif statements and I have not found a way around that. Sometimes when I’ve been working on a piece of writing for too long, I start to hate everything about it—which, incidentally, is why I sometimes fear editing because I don’t want to end up hating my writing so much that I feel compelled to re-write the entire thing—and that is exactly what’s happening here. I currently hate my game; I think it’s boring and not well-coded and just, I don’t know, bad. Thankfully, I recognize that this is just me going into that negative head space, so I’m going to take a leap of faith and share my code with anyone reading this. [5] Please let me know if that link doesn't work. If anyone happens to play the game or view the code and has thoughts, please feel free to (kindly) comment!

As one might have noticed if they clicked the link to my code, I am sharing it using repl.it which is another IDE. So far, I prefer writing code in Spyder, but repl.it’s ability to easily share and fork code is a huge plus. Moreover, repl.it has a ton of tutorials in all of the languages it supports. I have been looking into ones that focus on making games in Python because I’m still interested in making my minigame more aesthetically pleasing. Unfortunately, I have not had any success for reasons that are unclear to me, the young padawan coder. Regardless, I am definitely still learning more about Python through these, which is the real goal anyway, and I just think it’s super cool that there are all of these free resources. On the one hand, all of this combines to mean that I’ve had a bunch of fun (and frustration) coding which makes me want to continue with it. On the other hand, I’m not sure how realistic that is because I haven’t exactly had the best track record with teaching myself skills in a setting other than a classroom. [6]

Now onto the last section of this post, the answer that I’m sure all of you have been waiting on the edge of your seats for: how, if at all, will I use this in my future classroom? I hate to disappoint, but I’m not really sure what my answer to that is. I can see ways that coding can be used to deepen, further, and bolster English-specific academic skills, but the issue is that I don’t feel like I have enough experience and/or knowledge about coding to properly incorporate it into my own classroom. One idea is that I could use Python (or maybe R eventually, who knows) to craft graphs of data that I then use in my classroom; I talk about this in a little more depth in this post. Furthermore, I can see how learning to write in Python could help students’ writing skills in general because writing code requires the ability to discuss and explain what you need/want someone to do as well as the ability to think about how we communicate (meta-cognition). This is where my lack of experience hinders me since I can see the benefits of coding, but I have no real idea how to go about crafting a lesson or unit that utilizes this. I think that I could probably co-teach a course that integrated coding and English.  

As a concluding thought, coding is fun and you should check it out if you have not already. ^-^  Thank you for reading!

 

 

 [1] Since I didn’t tell my mom that I had blog there is no way she could be reading this, but also, just in case, I’m sorry I was so cranky after coding, mom. *insert sheepish emoji here*

 [2] On the one hand, I feel bad because I know that part of why I don’t have the time is because I didn’t manage myself well enough. On the other hand, part of why I didn’t manage myself/my time properly is because writing my field experience reflections for this class, which you can read here, has been a frustratingly painstaking process. As I mention in those posts, there’s no discernable reason they were so hard to write, it just was. I understand that’s no excuse, especially since we did have the whole semester to complete, but I figured if there was any time to contextualize my actions, it would be here on my blog.

 [3] And I am still working on the Python data viz tutorial because I keep getting stuck at certain junctures and I often can’t figure out why I’m stuck until I either take a long break from it or I meet with Dr. Ardito. I was working on it right before I started writing this but then I, wait for it, got stuck and can’t figure out why. For those curious coders in the audience, I keep getting a key error, but I can’t figure out why because each part appears to be defined.

 [4] Having said that, I do think R is really powerful and part of me thinks I should learn it so I can create real cool looking data visualizations, like the ones that represent social networks. Speaking of, my professor and I found this awesome social network visualization that is based on the Star Wars trilogy (the original of course, not the prequels). You can access the data here.

 [5] To my professor who might be confused reading this since I already told him it was ok to show my code to the boys in his programming class—the negative spiral happened directly after I said you could do that. I didn’t say anything because I knew it would be ridiculous to be like psych, don’t share the code because I’m feeling weird about it now haha.

 [6] There’s no real answer to that quandary, I’m just putting it out into the universe because that’s what I’m thinking about.

Comments

  1. Ezra,
    I am glad you had such a good experience with this project.
    And your reservations/questions about doing similar work with your future students is reasonable and appropriate. But, then again, who knows what you will end up thinking about what you do and do not do with them.

    ReplyDelete
    Replies
    1. Hi Dr. Ardito,
      Thank you for helping me get here and have as much fun as I did!
      Hmm, I'm not sure what you mean by the last sentence of your comment. Could you explain it a little more, please?

      Delete
  2. Ezra,
    What I meant was our teaching always reflects where we are about learning at a given point. So, I was simply remarking that once you have students, we will see where you are and how you decide to work with them.
    How's that?

    ReplyDelete
    Replies
    1. Dr. Ardito,

      Oh ok! I had an inkling that it was something about how my teaching will change as I grow in my role as an educator, but I wanted to double check. Thanks for the clarification. :)

      Delete

Post a Comment