TURTLEHACKS!

by Maddy

24 May 2018

Assignment for Thursday, May 24

Turtlehacks!

Now for the Turtlehacks assignment, I waited until Thursday morning to start it because of work on Wednesday. I also thought, “Oh, I know what I’ll do for this one. It’ll be easy. Maybe take me an hour! I have all of Thursday to hang out and do homework.” Of course that didn’t happen. I started this at 9:30am and ended at 4pm, but it still needs so many edits for it to be “perfect”.

My initial idea was to do a connect-the-dots followed up with a color-by-number at the end. This is just a connect-the-dots. The 800 lines of code make a car that the user can tell Tina to trace. I aimed to make this as interactive as possible by have the user tell Tina to go forwards, backwards, upwards, and downwards. That makes for a lot of “If-elif-else” statements.

There were several things that were problematic while making this. The most problematic was probably that there were so many “if-elif-else” statements because it caused this cascade of collapseable lines of code and things got extremely confusing. I eventually found out that things weren’t in alignment and this also caused problems (it may cause the program to stop for you mid-connecting because I may have missed another alignment mistake).

Were I to do something like this again, I would have set variables early on, and I would have created a better plan rather than just going for it and quickly losing myself. Creating this definitely made me realize how much code and attention to detail must go into coding much more complex programs than a little connect-the-dots activity.

Here it is! See if you can spot my errors (or maybe you’ll be lucky and pick a route that doesn’t have errors!):

Maddy is a Professional Science Master's student at UNC-Chapel Hill studying Biomedical & Health Informatics. Find Maddy on Twitter, Github, and on the web.