Friendship & French Fries

A podcast & blog about life and the creative pursuit of happiness

ICM: Reorganizing Code

ICM: Reorganizing Code


This week, our assignment was to reorganize code to make it more manageable and understandable. We could either use code we had already made, or create new one.

For the purposes of learning, I decided to create a whole new sketch, so that I could keep practicing and honing my skills.
I wanted to do something fall-themed as the season kicked off last week, so  I decided to create and apple-picking game.

How it works:
Once you open the sketch, apples will start falling randomly from the trees. The point is for you to move the basket (connected to your mouse) to try and catch as many apples as you can. Once you collect 20, you win the game!

Screen Shot 2015-09-29 at 7.37.50 PM


Screen Shot 2015-09-29 at 7.36.44 PM

Simple, right? Oh so wrong. This thing got the best of me. I managed to create the sketch and make the apples appear on the range of the leaves but after that I got stuck. I tried to trouble shoot it alone and with help and although we felt we were getting close, we couldn’t seem to crack the code.

Finally, I caved in and booked some time with Moon. He’s a freaking genius. I explained what I was trying to do and he walked me through the process. I don’t think I would’ve been able to get there without his help honestly, and even know when I look at my code I still have to take a step back and slowly go through it again.

So far I’ve had two major realizations with coding:

  1. simplify, simplify, simplify.
    • If you have a big idea, I find it so much more helpful to open a new sketch draw one thing (usually an ellipse) and try to slowly make it do what you want to do. No other distractions on the page, nothing else. I find it very helpful to focus on making things work and somehow trouble shooting it this way. Definitely helped with the apples!
  2. think differently
    • The more I code, the more I learn to think about things the way P5/ the computer would. By shifting my way of thinking, it’s easier to try and get it to do what you want it to do. Typical example of lost in translation.

I definitely have my moments. I feel more confident about coding but I feel the ideas I have are out of my skill set so far (and they’re not fancy epic ideas either). It’s like standing on one side of a cliff and wanting to get to the other side without a bridge. I know we’re slowly building it, but sometimes I would just like to jump and get to the other side already. The curse of being part of the instant gratification generation I guess. I can’t wait until my technical side doesn’t mess with the idea side.


One thought on “ICM: Reorganizing Code

Leave a Reply

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

Back to top