Lisette's Drawing App

by Lisette Dunham

06 Jun 2017

Drawing app

Final Milestone list

  • User can draw using drag and click events
  • User can click select different colors
  • User can clear the screen
  • User can use different shapes to stamp in drawing
  • User has directions to read on app
  • User does not have to watch animation of the user interface
  • When user clicks to change color or shape the drawing lines don’t lead to where they clicked

Reflection

Getting my turtle to draw on drag and click events was easy, but I really struggled with trying to get my turtle to go to a location and click on a button to change color or shape mode. I struggled with this part for several days and tried a million different things that did not work. I created and wrote down steps to try to get the turtle to change color when clicking on certain locations (the buttons), but really just didn’t have the right tools in my toolbox or the right thought process to get this step to function correctly. After learning that I could use turtles (and their click events) to change the mode of the user turtle, I was able to make progress. However, after I completed all of the required milestones, I went back and tried to get my turtle to do specific things above a line and different things below a line and again could not get it to function properly. I have a feeling that a week from now I’ll be able to solve these issues easily, but right now I’m just spinninig my wheels in circles and I know I need to step away.

I also struggled with using different modules and importing them into each other. I had problems with “from x import (star)” and “import x” and understanding when to use one or the other (at least in part because they were not function in the same way across all module). I was able to get much of my code to run while importing all the modules into all the other modules (though I recognize this is not a good practice), but I also created extra turtles. I wrote down in my notes that I also struggled with getting the drag function to work, but I have it working now; I must have blocked out the pain of that struggle since I don’t remember having issues with the drag function.

My milestones stayed the same for the most part throughout this project, though the order of the milestones has changed somewhat. I also gave up on the milestone that creates logic based on where on the screen (using xcor and ycor) to change the mode of my turtle.

This project was again a coding roller coaster. It started off fun drawing the buttons with my turtle, but took a turn for the worse as I struggled with using the location on the screen to change the turtle’s mode. At one point I thought about scrapping the whole thing and starting over, but I realized I would just be writing the same wrong code again. During this process, I realized one of the things holding me back from really understanding Python and its syntax is that I can spend hours doing the same wrong thing over and over again. Even when I overcome my errors and have correctly functioning code, I’ve spent 10 times more time trying the wrong thing that I don’t remember the solution. My perspective on Python has done a 180 in the last 24 hours because of this issue. Last night I was super stressed about python because I didn’t feel like I understood loops and nothing on my drawing app was working correctly. It didn’t help that I also spent most of yesterday (Monday) trying to debug and add to someone else’s loop at work (in SAS code) that wasn’t working the way I was expecting it to. After deciding to go to bed a reasonable hour, and spending some time to more carefully read the chapter on lists, I was able to get the homework exercises (mostly) running. I was also frustrated considering I spend so much time coding and feel pretty confident with the code I write on a daily basis, but I have to remind myself that not only is this a different programming language, but the input data is completely different than what I deal with at work. The review in class was also super helpful, especially getting a chance to see code specific to the different topics we’ve covered in class. And after taking a slightly different direction based on what I learned about in the clinic, I feel much better about coding (and my drawing app)!

Lisette is a Research Data Statistical Analyst at UNC's Lineberger Comprehensive Cancer Center Find Lisette Dunham on Twitter, Github, and on the web.