Vocab and Q&A
- What terms, concepts, names, or acronyms would you like me to discuss in class?
Turtle programs: Show and tell!
In pairs, grops, and as a class, we’re going to look at each other’s code.
Questions to bring with you:
- What does the program do?
- What code corresponds to that?
- How does the ability of python combine with the ability of the coder to produce this specific technical artifact?
Intermission
Let’s take a break about here.
Welcome forms
Thank you for your thoughtful responses!
Here’s a selection of anonymous comments:
What excites you about coding or learning to code?
- “I like coding because I like video games, I want to learn how to code games”
- “The ability to unravel insights from data through a piece of code is what excites me the most about it.”
- “I want to know how design prototypes are executed in different software languages and understand what is possible and what isn’t (limitations).”
- “Learning about large scale projects and how different modules come together to create such applications is pretty fascinating.”
- “The sense of acheivement of creating something”
Do you have any apprehensions about code or learning to code?
- “I am worried I will be slower than everyone else to learn or that I will struggle with time management.”
- “Just falling behind. In past experiences with any code, if that starts to happen it can be really hard for me to catch back up”
- “Sometimes when I feel so overwhelmed because there are too many codes to the point I have no idea what’s happening, I crash and feel helpless on where to even start.”
- “Not really, I am going into this very open-minded and willing to learn.”
- “Not particularly other than very normal feelings of not being smart enough.”
- “No. Bring it. I am the “doer” you spoke of… I’ll try to remember to ask why.”
What, if anything, have you done to learn to code in the past?
- “I tried to learn how to code via google but since I am always busy, I rarely had time to actually learn anything.”
- “I haven’t coded in the past.”
- “I’ve learned R with some online tutorials, the documentation, and A LOT of stack overflow. “
- “Bootcamp”…“Coursera”…“Java”…“Databases”…“Data visualization”
What are your goals for this class?
- “I want to be able to hold conversations with everyone on the team I work on in my future career.”
- “To understand fundamentals of software development from a developer’s perspective and get rid of the imposter syndrome.”
- “Help me collaborate with developers within my organization by learning …“Portfolio”
Let’s discuss.
Syllabus
Let’s review, briefly!
Overview of the Materials Page
I want to explain the materials page, and highlight a few things.
- The materials page is the best overview of what’s going to happen in class. I’ll explain a little later about the different platforms we’re going to use, but you should bookmark the class website, check it every week, and use it to link to the other platforms we’ll use.
- Readings will be due by the beginning of class. We’re using an interactive textbook edited by University of Michigan School of Information professor Barbara Ericson, who is an expert in coding education. It’s really quite excellent. The platform we’re using to access it, Runestone, is powerful but has some rough edges. It will be worth it, trust me.
- When you read the textbook, there will be a lot of little activities and quizzes. Do the activities. Not only will that let me see you’ve engaged with the readings, it is a key part of your learning.
- Especially in the first few sessions, we’ll complete exercises related to the readings together during class. When we’re in person, those will be individual activities which we’ll discuss as a class. When we’re remote, I’ll incorporate group and/or pair programming components to some of the questions.
- All in-class exercises should be completeable during class. If you’re able to do this, your homework will mostly be reading and interacting with the textbook. You’ll have until midnight each day of class if you need extra time in the evenings.
- We’ll talk about some larger projects and the final when it gets closer to time for them.
- Reflections are a big part of this class.
Complete these by the beginning of next class:
- Read about Variables
- Read about Debugging
Note: I’m currently debugging the textbook. Stay tuned for an announcement on homework
Intermission
Let’s take a break about here.
Chapter 2 Preview: Variables
Content Highlights
Let’s discuss each of these briefly:
- Variable names and keywords
- Statements: executeable units
- Operators: Ways of combining/computing things
- Expressions: values and/or variables, by themselves or with operators
- Modulus: the ‘remainder’
- ‘Good’ variable names: Our first encounter with “Goodness” in code
Chapter 3 Preview: “Debugging”: Solving Problems
First off: Errors are Python’s, not (always) yours. Don’t feel bad about yourself when you get an error. Try to understand what Python is telling you. Like a little baby, it only has a few ways to communicate with you. But if you get good at understanding them you’ll be able to 1) interpret them when they happen and 2) avoid many of them in the future. But all parents must hear babies cry, and all programmers must deal with errors.
What are the main error types you’ll encounter? How do they relate to how Python gets executed?
Parse Errors like SyntaxError: This is the parser not understanding how to translate your words into action
Runtime Errors like NameError and TypeError are the interpreter not understanding how to do the action you’ve specififed.
Python is interpreted, so it first parses your code into actions, then starts trying to do them by running them.
Problem Solving Attitudes
- Self-awareness
- Calm
- Determination
Always know how you feel. This is critical. If you know you’re frustrated, that could be a key indicator that it’s time to go take a shower (or get a cup of tea, or do some yoga or…).
Keep in mind that you will understand the problem. Work backwards from that certainty.
Don’t let uncertainty overwhelm you or lessen your determination. Focus on the certainty you do have.
Talk it out.
If you’re crushing it , think about other ways the problem could be solved. If you’re not breaking a sweat - if you’re not initially confused about something - you’re not getting stronger.
Problem Solving Strategies
Go in the Right Direction
- Make sure you know what problem you’re trying to solve. Articulate it clearly. This is harder than it sounds.
- Make sure you know what you think you know. Test what you think you know to confirm it. Build from there.
- Keep your goals in mind. Sometimes you’ll discover you’re off on a tangent. Re-focus.
Work smart
- Start early.
- Make lists of what you need to accomplish. I use Google Keep. Separate the planning from the doing to keep your mind clear.
- Break the problem down into solvable pieces. At least one solveable piece will keep you moving forward. Once you’ve solved a piece, save/commit your work and take a breather.
- Time box. Work no more than 15-25 minutes at a time on a single problem.
- Stumped? Stop and come back later. In the shower is where many a tough programming problem has been solved.
Use Your Resources
- Who would know the answer? Find them, in person or via Google.
- Re-read the relevant parts in our textbook or the other resources I linked to in our syllabus.
- Know what to google for. Much of the help on the internet (e.g. StackOverflow) is too specific for the basics. Use a trusted reference when you can, be that a person or a book.
Problem Solving Tactics For Python
-
print
what you think things should be and see if they are - see if you can predict what kind of
Error
s you’ll generate -
try
andexcept
errors you don’t care about for now - Comment out as much code as you can to isolate the problem