My Experience with Coding – Week 3 blog

Our students will need to become more at ease reading (and writing) back and forth across the boundaries between natural and artificial languages. Such an education is essential if we are to cultivate critically informed citizens — not just because computers offer new worlds to explore, but because they offer endless vistas in which to see our own world reflected

Kirschenbaum, Matt. Hello Worlds (Why Humanities Students Should Learn to Program), 26 May 2010, mkirschenbaum.wordpress.com/2010/05/23/hello-worlds/.

I believe that humanities students should learn to code. As Kirschenbaum says, computers “offer endless vistas in which to see our own world reflected”. Learning to code provides students with tools that they can use to engage with the world around them. Coding and other computer skills can allow students of all disciplines to share their work. It expands the possibilities for what a project can be and do.

I believe proficiency in a computer language can fulfill many of the same functions — accessibility, self-reliance, heightened critical awareness — as knowledge of a traditional foreign language

Kirschenbaum, Matt. Hello Worlds (Why Humanities Students Should Learn to Program), 26 May 2010, mkirschenbaum.wordpress.com/2010/05/23/hello-worlds/.

Humanities, like every other subject, is an evolving field. While all humanities students may not use coding in their work, many of their peers likely will. An understanding of coding gives humanities students the capability to think critically about and understand other humanistic works that have digital components.

My coding experience started during the spring term of my freshman year with Introduction of Computer Science. I quickly realized that I was in too deep — working in Python did not come naturally to me. No matter how hard I tried, I could not seem to get it right. I refused to take another computer science class and accepted that coding was just not for me. My junior spring, I took Introduction to Statistics, where I learned to code using R and RStudio. R clicked for me and I could not get enough of coding. Since then, I have used R in data analysis for my summer research job and during my OCS program in Ecuador.

The code chunk below is a piece of R code from one of my assignments in Ecuador. I think it shows a way in which coding can help with critical thinking and reflection. You can see here the comments (indicated in R by #) I made throughout every step in the coding process. As you can see in this piece of code, I realized that the dataset I loaded into R was not in the correct format to do the type of analyses I wanted later on. In running the code over and over and trying new things until I was able to reformat the data frame in the right way I was thinking critically and reflecting on why a certain line was or was not working. While this is an example of coding in STEM, I think that the process of critical thinking that I went through in these lines could be gained from learning to code in any discipline.

```{r}
#read in combined data with separate habitat columns: Species, River.Number, Forest.Number, Guild

BirdDataComb <- read_csv("~/Downloads/Amazon Bird Data - spreadsheet, rivers and forest - Data for Sim Index.csv")
View(BirdDataComb) #check to see you loaded the right dataframe

#it is so much easier to set up the dataframe correctly the first time (columns for each species, row for each habitat)
#I didn't set it up correctly, so here's how I fixed it

#make it into a presence/absence matrix
presabs.bird <- BirdDataComb %>%
  mutate(River.Number = if_else(River.Number > 0, 1, 0))
presabs.bird2 <- presabs.bird %>%
  mutate(Forest.Number = if_else(Forest.Number > 0, 1, 0))

class(presabs.bird2$River.Number) #check your work

#if the previous step was done correctly, this gives the correct number of species in each habitat
sum(presabs.bird2$River.Number)
sum(presabs.bird2$Forest.Number)

#this flips columns and rows
presabs.bird3 <- data.frame(t(presabs.bird2))


#this takes the first row (species) and uses it for column names using janitor package
presabs.bird4 <- presabs.bird3 %>%
  row_to_names(row_number = 1)

#this removes the third row (guild)
PresAbsBirdFin <- presabs.bird4[-3,]
```

3 thoughts on “My Experience with Coding – Week 3 blog

  1. You raised some really good points, and I appreciate you sharing your own experience using coding in your OCS. While I still believe that students should decide for themselves whether to learn coding, your post made me want to learn how to code.

  2. Hi Anya, thank you for sharing this transformative experience of getting into coding! I totally agree that coding is a critical thinking process that requires a flexible, adaptable mind as changes and difficulties arise. Like what you encountered with your dataset for your OCS project, I believe there are countless occasions in real life where usable data are not readily available. That is when our programming skills come into play to turn what we have raw into something ready for closer examination. Your R code is a perfect demonstration of such application. I am also starting to build some R skills , so it is very encouraging to learn what R can do in a variety of disciplines!

  3. Hi Anya, I love your points. I actually chose the same quote with your first one and I agree that learning how to code is definitely not just about coding. I also have a similar experience of coding with you. I was not really into CS and felt like Python is sometimes too much for me. I think R is a really handy tool for data analysis which is the primary purpose that I’m using coding for. What coding impressed me the most is the logic behind constructuring the lines and the various ways to tackle one problem.

Leave a Reply to Sophie Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

css.php