Week 2, Day 1- More Coding in the Dark and Pair Programming

Today we had to do two Coding in the Dark assignments that led up to a pair programming project. This week I had not one but TWO partners, Tenzin and Janiece.

For our first CITD challenge, Professor D showed us some alien code and asked us to translate it into P5.

This was the code we were given to translate.

Here’s the code translated into my p5 editor.

A nice red square! If you compare the codes, you’ll see this wasn’t super hard.

Onto CITD challenge #2!

This was pretty fun, check mine out here! Try pressing “b”, “p”, and “enter” and see what happens!

Then the fun halted and we were handed a serious pair programming project, see below.

I entered this challenge enthusiastically. I knew that I’d basically done some parts of this really quickly just moments before in the CITD challenge. However, time started moving quickly and my group and I became increasingly flustered.

We ended up not getting it done in the 90 minute time frame Professor D had allotted, but most of the other pairs were in the same boat so this turned into homework.

Something magical happened though, I took a break and found a second wind. With the help of some of our classmates, we were able to troubleshoot our code. The solution was simple, we had an array running indefinitely when in actuality we need to be calling the push and pop functions to edit it as we went along.

Once we got this tip from a couple of our peers our sense of defeatism perished.

We modified our array so that it wouldn’t continue to loop, and added some fun conditionals that modified the image as the user interacted with it. To put it simply, when one drags the mouse, they are given new circles. These circles can be deleted in reverse order by pressing the up arrow key, the colors can be changed by pressing space, and the whole board can be erased by hitting enter.

Check out our final project here, and please read about coding it on Janiece’s and Tenzin’s blogs!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
<span>%d</span> bloggers like this: