top of page

Creative Problem Solving and Programming - My Experience

  • Writer: Suguru Chhaya
    Suguru Chhaya
  • Oct 22, 2020
  • 5 min read

Updated: Oct 23, 2020


Creativity + problem-solving = the children in the image (the boy is me, by the way)



Ok, the boy isn't me, but I am happy when I solve problems. I want to touch on a recent self-discovery I made.


I have been programming for a while now and I had always believed that PROGRAMMING was what I liked to do. But I recently realized that it wasn't PROGRAMMING that was interesting to me. As a matter of fact, actually writing code was more of an additional component.


What I really liked to do was creative problem solving (CRP).


Since probably most of you reading this blog code, I want to share one of the moments that impacted me the most since I started programming.


I was recently working on a Pygame project in which I was trying to make a clone of a 1v1 aspect of a game called mope.io (I will probably make a tutorial on this soon! Subscribe to me at https://www.youtube.com/channel/UCqnubua38JoJNCCADcG1s4w and stay tuned!) and I was struggling on how to check whether an animal has gotten outside of a circular arena. If you know how to use Pygame, you probably know how masks can be used to check for pixel collisions. Even though I was struggling, I came up with some basic ideas using my prior knowledge, documentation, and creativity. Here are some ideas I came up with:


  1. Use an image of a red ring (without anything in the middle) and apply a mask to it. Apply a mask to the animal image as well and check whether the two collided.

  2. Instead of using a ring, use a regular black circle as the arena. Apply masks to both the arena and the image. Use the pygame.mask.Mask.overlap_area() method to see how much of the image is overlapping with the arena. If the area overlapping goes below some point, I will consider the animal to be outside the arena.

  3. Select some points covered by the animal and check which color the points have. If red, the animal is outside the arena.


I tried implementing all these cases but they failed due to not being able to apply Pygame masks in ideal locations, overlapping areas fluctuating due to image resizing, inability to find points that can accurately tell whether the animal is outside the ring, etc. Even though I kept trying, I couldn’t implement the strategy. I eventually just thought of giving up and making the arena a square (because things are easier that way). I took a break and went to talk to my brother.


Note that my brother had little prior experience in coding. I simplified the problem I was facing (without using complex terminology) and explained it to my brother. I wasn’t expecting any ideas, but I thought some sympathy could help. But then he said,


“If the arena is a circle, why can’t you use the distance between the center of the screen and the center of the animal image?”


The was the ‘Eureka!’ moment.


I started implementing my brother's idea with some adjustments of my own. This idea didn’t have much issues with image resizing, masks, etc. It worked perfect, and I was fascinated with the role of creativity and ideas in the problem-solving process.


Fast forward to now (when I wrote this blog), I have worked on many new projects, but I often found myself leaving my projects and not finishing them. It was as if something was missing. I enjoyed when I started working on these projects, but I lost most of my interest when I was in the stage of just writing less meaningful code, adding little components to my project, tweaking the interface so it looks nicer, etc.


That is when I reflected on my experience with talking to my brother and realized that what I REALLY enjoyed through coding was the creative problem solving aspect.


According to the Creative Education Foundation, creative problem solving (CPS) is “a proven method for approaching a problem or a challenge in an imaginative and innovative way.” I recommend you watch this video (https://www.youtube.com/watch?v=oqwoOpO-4k0) to learn more about CPS.


Back to my reflection, I realized how a lot of things that I did during my programming journey involved CPS. First, there is starting a project. When I started my project, I had nothing in front of me in action, but my mind was thinking about all the things that I could implement and I was really excited about working on the project. (This also applies when working on a single problem like the Pygame problem I faced.)


First, I try to organize all the thoughts I have and the steps I need to take and try tackling it one by one. This is where tolerance for complexity kicks in. Even though there is so much going on in my brain, if you have watched some of my videos, you probably know that I try to follow a step-by-step process when walking you through a project. Though things didn’t (and would never) work so smoothly on my first try, I still believe tackling problems one at a time is important.


Then, I come up with possible solutions to these problems. This step requires a tolerance for ambiguity. In my Pygame example, I came up with solution 2 and 3 by reading documentation, watching YouTube videos, etc. But often I still don’t understand the details of what a function really does for me. When there is uncertainty like this, I like to step back from the big project and try to create an easier and less complex environment where I can test the function and study it.


Finally, I try to implement possible solutions using my problem-solving skills and my knowledge. As the video explained, I agree that allowing incubation (or taking breaks) is essential for coming up with a good solution. Given my Pygame experience, I also want to add that talking to others about the problem could help. I believe that it is completely fine if the person you talk to doesn’t know much about the skill you have. In fact, you might be overthinking about a very specific thing and those who are inexperienced could help you take a step back and give you advice from a broader perspective. (I am not a great writer. I hope you get my point<3)


Overall from my Pygame experience, I was extremely fascinated with the role of creativity in the problem-solving process. My brother’s advice was a game-changer (get that? ”game-changer” because he changed the operation of my game?). Even though I struggled a lot coming up with good solutions, I still enjoyed the process, and the moment I found a solution was an impactful one.


Even though it isn’t EXACTLY programming that I love to do, if I hadn’t invested time and effort into programming, I don’t think I could have made this self-discovery. I believe this concept applies to any activity other than programming as well. If you put time and effort into something, you will start to realize what it is that you really enjoy in that activity. It could be the collaboration between teammates, heated debates on arguments, or finding connections between data.


In the future, I want to continue programming and make my creative problem solving skills to use. I want to keep challenging myself to solve problems and come up with new ideas. I also wish to consider other jobs/activities in which I can use CPS. This was a very valuable experience that will influence me in the future, and I want to discover other aspects of myself as well. Dear readers, I hope you can discover something about yourself through programming (or any activity, really).




Thank you for reading and please share this article if you enjoyed it!!






コメント


bottom of page