Programming 101
Programming vs. Coding?
- “Coding, as the word suggests, is involved in writing code. A coder translates the requirements into the programming language of their choice and writes lines of codes. Programming, on the other hand, is a much broader term that involves coding AND other tasks like problem solving, critical thinking, conceptualizing, and understanding algorithms and data structures.”
- Nicholas Hargreaves in this Quora discussion)
Pre-Coding Steps
Getting Help and Helping Yourself
- Use CS50’s resources and tools!
- Google stuff!
- a lot of people are worried about academic honesty
- my rule of thumb: don’t Google anything with “CS50” or the problem set’s name or “Harvard” or anything else that might take you directly to something “unreasonable”
- if you stumble upon something “unreasonable” by accident/indirectly, best to reach out to heads
- and if you make a mistake and do something unreasonable, also email heads
- all of that^^ being said, there are tons of things you can Google that are aok (and even recommended and expected!)
- some of my top recommendations:
- Collaborate with your peers! (in a “reasonable” way)
Debugging
Everything from using print statements to commenting out parts of your program (this is a skill that will take a while to learn)
Being Stuck
Testing
Design
- Some questions you can ask yourself when thinking about design:
- Is there repetition that could be eliminated?
- Are there unnecessary loops?
- Is my code scalable?
- reference sheet on Principles of Good Design
- short on Magic Numbers
Style