× {{alert.msg}} Never ask again
Hire top freelance developers on CodementorX
Learn More

“Undefined Self”? Are you suggesting I need therapy, PyCharm?

– {{showDate(postTime)}}

This is the 2nd week of Amanda’s coding journey as she pairs with a mentor to learn Python & Django. Amanda is participating in Codementor’s Featured Star program, where she will be coached by a dedicated mentor to bolster her understanding of programming concepts and become a better entrepreneur.


Learning Python and Django is like learning a new language… where all the instructions are also written in a foreign language.  Through this week’s exercise, I’ve been learning about reading and working with various APIs.  It’s been very empowering to write code that calls an API and see results display on the screen.  Girl coding power rules!

This learning process hasn’t been a walk in the park.  There are many times I’ve wanted to give up and move on to the rest of my busy schedule, but I’ve become addicted to solving my latest problem.  Often with emails to Jess asking for help in between sessions!

PyCharm has really helpful error messaging if you happen to be someone who already knows what they are doing!  For my first real project I decided to call the Yelp API and display restaurant deals close to me.  I struggled with an error called “Undefined Self”.  It tripped me up for a long time as I was trying to set up the OAuth request and query the Search API.

An ‘undefined self’ sounds like a rather horrible personality disorder.  I’m pretty sure PyCharm has said this to many a college student.  PyCharm was probably right in many cases!  During our next session, Jess assured me PyCharm wasn’t suggesting I should go see a therapist and then walked me through why I need to define self when defining functions.

Through each step, I’ve reached the point of success and the emotional payoff after various levels of frustration.  I know Jess is responsible for that success.  Having a Codementor has sped my learning process greatly!


Looking for a developer?
Hire top freelance developers on CodementorX


Questions about this tutorial?  Get Live 1:1 help from Startups experts!
Jayen Ashar
Jayen Ashar
5.0
Linux power user for over 20 years
"I consider myself a problem solver, but I am mainly focused on problems that technology can solve. As a tech enthusiast and serial entrepreneur,...
Hire this Expert
Anar Jafarov
Anar Jafarov
5.0
Software Engineer
I'm CTO, System Architect, Full-Stack developer with 10+ years of experience. I've experience of building billing systems for Internet Service...
Hire this Expert
comments powered by Disqus