The past few days I’ve been banging my head against the wall trying to learn object-oriented programming.
Here’s what happened:
I sat down and decided to convert my teleabsence robot code to a ‘finite state machine.’ But I didn’t really know what that meant. All I knew was that I wanted my robot to do a bunch of things at the same time, and I discovered the idea of a finite state machine via this Adafruit tutorial on multitasking the Arduino. I followed the tutorial and got my lights blinking at different rates, but I just couldn’t understand how to translate what I had learned to my robot.
I decided to take a step back and learn wtf a finite state machine was. I read a bunch of tutorials, but still didn’t get it. I decided to go even further back and watch some lectures. I settled on this MIT course, Introduction to Electrical Engineering and Computer Science. I finished the lecture on Object Oriented Programming (OOP) and did the design exercises. You can see my code here.
I’m feeling a little disheartened at this point. I spent all of Monday reading and studying and doing problems, but I still wasn’t understanding how to apply any of this to my robot project. I was feeling my enthusiasm dip just as I described in my learning with context post.
But I powered on! I finished the next lecture on state machines and did the associated software lab (you can see my code here) and quiz (code here).
Then I tried giving my robot another stab and was totally stumped.
I felt completely discouraged. When I looked at my robot code it was like looking at it through a fog. Who was I kidding trying to learn this stuff at 31? These kids I see in the audience at the MIT lecture at half (ish) my age. I’m 15 years too late to the game.
I had to remind myself that I had been learning OOP for TWO DAYS and I just needed to keep at it. Of course it was hard! Plus the class is in Python and my robot is in Arduino (kind of like C++). This meant there was be an extra step of learning new syntax on top of new programming concepts.
Today I woke up redetermined to figure it out. Of course it was going to take longer than two days to learn this stuff. What I needed to do was figure out what exactly I wanted to learn and focus on that. I need to stop jumping back and forth between projects and focus on what exactly I need to learn. And I need to give myself enough TIME to learn this stuff. I need to forgive myself for not magically understanding everything right away.
My mini-crisis last night, though, made me want to write a psychoanalytical post. I think about this a lot, my mindset, how I learn, what I want, why I want it, etc., and I thought it might help to get it all out.
Fixed vs. Growth mindset
If you’ve never heard of Carol Dweck, go watch her TED talk now. And read her book. She studies mindsets and learning.
I’ve thought a lot about my own mindset and approach to learning, what’s served me well, and what’s changed over the years. I think it’s simplistic to say I have a fixed mindset and that’s why I’m not focused enough to learn this stuff.
Dweck also notes that mindsets change over time and depending on the subject matter. You might have a fixed mindset when it comes to math, but a growth mindset when it comes to running.
I’ve thought about how my mindset has changed over time. I often think about how focused I was in HS. I would go to the art studio and stay there for hours painting or sculpting. I’d forget to eat. I’d do problem sets for math over and over. Erase the answers and do them again.
I kind of had a growth mindset in high school, but only insofar as my grades were concerned. I would believe I could get an A if I studied hard (and study hard I did!) but I didn’t believe I was ‘smart enough’ to really do subject X.
For example, I got a 5 on the BC AP Calculus exam, and a perfect score on my BC Calc final, and a very high grade in the class overall. Part of the reason is because I wasn’t admitted to the class to begin with. I was told my math skills weren’t good enough for BC, that I was placed into AB Calc. My first day of senior year the AB Calc teacher caught me in the cafeteria and asked why I was in his class. You should be in the BC class, he said. I showed up for BC Calc and the teacher wasn’t happy I was there, but said he’d let me have a try.
I took that challenge and ran with it. I aced the class. But I never thought to myself, hey, I’m really good at this. I should be a mathematician. I thought ‘real’ mathematician’s got the material right away. They didn’t have to study and struggle.
It took me many, many years to realize that I was wrong. Yes, some people struggle less with some things, but everybody struggles with something. And if you do something over and over again for long enough (build enough context) you can be good at nearly anything.
Fuck you mindset
I didn’t really have a ‘real’ growth mindset. I wasn’t intrinsically motivated to learn this stuff, though I did believe that with effort I could do anything. What I really had was a fuck you mindset.
In HS, what I really loved was showing people they were wrong about me. I loooved upturning expectations. My parents like to tell this story about when I was a kid how they were worried I was a slow learner. I was terrible at spelling and was put into a remedial class in the 4th grade. They didn’t think I’d amount to much. I think that story stuck with me. I incorporated it into the narrative of who I was. I was someone you weren’t expecting. I was smarter than I looked. I wasn’t a typical girl. Whatever.
However, that part of me, the “fuck you” part kind of died off as I got older.
As an adult, nobody cares. Nobody has particular expectations of you. There are no grades. Markers of success are in your mind. The external markers that do exist don’t have a linear path to obtaining them like good grades in HS. You might want to make the Forbes 30 under 30 list (I know people who wanted to make it, and people who did make it). But you can’t just work hard and make the list. It doesn’t work like that. You have to work hard, but you also have to be well connected, noticed by whoever it is that’s putting that list together, etc etc etc. It’s luck as much as it is hard work.
So as I got older I realized that nobody really cares and learning something or getting good at something just to prove somebody wrong isn’t really a sustainable motivator. I needed to figure out what it is exactly that I enjoy.
Figuring out what I like to do
From the first coding class I took back in 2011, I fell in love. This was something that I could do for hours on end and not get bored. This was something I really enjoyed.
As an adult, though, it’s a lot harder to throw yourself into learning a new skill. You don’t have external motivators (my fuck you mindset wasn’t going to serve me here!), you have other responsibilities (job, relationship), you don’t have a clear path (take these 16 classes and become an engineer!).
I KNOW all this. I know it so hard. It’s embedded in my fucking bones. But I still need to remind myself of it now and again. When I hit my wall yesterday, I needed to take a step back and remind myself, Ann. It’s been TWO DAYS. You’re discouraged because there is no purpose, no degree at the end of the tunnel, there’s not even an end to the damn tunnel. And that’s ok.
It’s ok because this time I’m doing it because I LIKE doing it. I like programming. I like seeing my robot run around and I want to make it run around even better. So that’s what I’m going to do. I’m going to slog through learning OOP. I’m going to figure it out in python and figure it out on Arduino. And at the end of the day I have no idea if any of this will lead to a job or an award or anyone caring at all, but none of that matters. I’m going to keep my head down and figure this shit out.