You Are Not Alone — My Journey Learning Python (Part 1)
In 2014, someone I loved was diagnosed with a terminal illness. I devoted all of my free time to taking care of him, reading research journals, and consulting with specialists to try to find the best treatment options. Unfortunately for him, he was a cat. A lot of feline medicine today is trial and error, subjective judgements made by veterinarians based on years of experience. It is not data-driven.
And yet, every day, over half a million cats and dogs visit the veterinarian. That is a lot of wasted data. Some veterinary record-keeping software allows data to be harvested for research. However, most studies done on the rarest diseases tend to be case studies, or small scale studies of 20–30 animals. This limits our ability to elucidate why certain animals benefit from one treatment and not another. If we had the ability to anonymize the data generated daily and make it available to scientists, we could revolutionize veterinary research. That is my goal.
Right now, I am learning Python as a total beginner. Although I have a background in mathematics, I have no background in a coding language like Python. As such, my short-term goal is simple: to create a website for pet parents to submit data to be made available for research. I believe that I can go from no knowledge of coding to this in 3 months, and I hope that the project (and the data it collects) can serve as a prototype to demonstrate the value of my larger goal.
I am 1 month through the mentorship, and I am very grateful to my mentor, Hana Lee, for making time to regularly meet with me and help me set realistic goals.
- Completed 39 exercises from Zed Shaw’s Learn Python the Hard Way (including 15 exercises on the terminal)
- Registered and hosted my website
- Fell down my first rabbit hole (see Advice for Beginners: #4).
- Editing the PATH
- Navigating the file directory using the terminal
- Installing packages
- Creating a virtual environment
- Accepting inputs from users
- Defining functions
- Importing scripts or arguments
- Registering and hosting my website
- Pushing files to GitHub
Where will I go in the next month?
- Complete 15 more exercises from LPTHW (If, Else, While, Loops, Lists, and Dictionaries).
- Use Pelican to generate a basic static site.
- Design the interface for the pet portal.
Final Thoughts: Some Advice for Beginners
- Get by with a Little Help from Your Friends
If I were not a part of this mentorship program, I would not have made as much progress as I have so far. Life has a funny way of finding when you are busiest and then putting more on your plate. However, I can’t make excuses. I have a mentor who I speak to weekly, and I would feel incredibly embarrassed if I hadn’t met my personal goals when meeting with her. Even more than that, I have made friends with other mentees, and we regularly chat about our projects. I don’t think I could drop out of this program even if I wanted to, because of our shared momentum. With friends, studying is easy.
2. No Zero Days
If I could go back to my 20-year-old self with one message, it would be this. There will be days when you are tired. There will be days when life throws something at you that you think is more than you can handle. Too bad, because you cannot stop. It’s not about the tally of time spent for that day or that week, it’s about your overall momentum. You are either increasing your knowledge or standing still, and if you think you are standing still, you are really falling behind. So every day, give your project at least 5 minutes (and that 5 will likely become 20 or 50).
You have to know yourself. I started by thinking I would program in the morning as I ate my breakfast. I must have been eating breakfast when I decided that because I am not awake in the mornings. Anything I program is buggy and makes no sense. The work I do later in the day is generally error-free and I learn much more.
Make a plan, reflect regularly (weekly is good), and change as necessary.
4. Be realistic.
I have the benefit of knowing a few programmers. When they talk about coding, they sometimes get this distant look in their eyes, like they were fighting in the fields of World War 1, watching the trenches move forward foot by foot, hard fought every step of the way.
Coding not nearly so grim, but be prepared for unexpected delays. Somehow one of my files was encoded Unicode-16. When it was imported into another script and then printed, there were spaces between each character, and it would begin with these two crazy symbols (the byte order mark). I lost a day of studying to this menace. First I had to figure out what it was, but then I was entranced by why some of my files were encoded in Unicode-16, when the default on my sad Windows Notepad is ANSI, and all the files I generated from the terminal were also in ANSI.
Not only was this a hit to time, it was also a hit to my momentum, as it was the first rabbit-hole I’d tumbled into. I had known this day would come, but still I was surprised when it happened to me. If you are about to start your first project, estimate how long you think it will take to complete, then triple it. You should be about half done by then (just kidding… sort of).
I am grateful to Ray, Patrick, and Hana for organizing the 2017 Spring Mentorship program. I am grateful to all the organizers of ChiPy for creating such awesome events. Finally, I’m grateful to you for reading. I offered some advice for you; what advice do you have for me? Leave a comment below. Good luck with your own projects!