Class Announcements

Penultimate class today: there will be class Wednesday, but no class Friday.


Lecture Materials


Questions & Answers


Q: Will section leaders do the diagnostic regrades or just the professors be by the wednesday lecture?

A1:  Section leaders are working on diagnostic regrades. They shoud all be out by Wednesday.


Q: How long will canvas videos and online course materials be available after the quarter ends?

A1:  Website will be up until January. Canvas website is out of our control, so I am not sure. Sorry!


Q: Hi! I had a quick question about the assignment. In extension_server.py there is a global variable MAX_RESPONSES_PER_REQUEST = 10. I was wondering whether we have to implement this? I don’t believe the handout does not say anything on this. Thank you!

A1:  You don’t have to worry about that.


Q: if we want to be a section leader but don’t feel super confident in our ability to explain concepts, do you have any recommendations for trying to improve our abilities before applying? thank you!!

A1:  Yes! Practice teaching section problems to your friends or family. You can start with the early section problems so that you don’t also have to teach them all of the course material. There are also workshops that you can attend when you apply that current section leaders hold to give you tips and trick

A2:  You can practice teaching by trying to teach section problems or Karel to your friends/family. You can also learn a lot by videotaping yourself teaching, so you can watch it and critique it yourself.


Q: if Chris and Mehran do offer the code in place project again, will I be able to be a section leader if I don’t take CS106B?

A1:  Yes -- we don't require CS106B in order to section lead for Code in Place. CS106B is only required if you want to be a section leader for regular Stanford classes.


Q: Cant you just write ‘main()’ at the end instead?

A1:  if you want to run the file as a program, you should put the boilerplate at the end of the file that we usually add: if __name__ == '__main__': main()


Q: How did you get the command to open up sublime text from the terminal?

A1:  subl .


Q: I noticed that while executing a program for a specific assignment in sublime text, it didn’t work correctly, but in PyCharm it did. Why might this be? Specifically, it was printing lists out of order.

A1:  You might have been using a different Python interpretter which implemented the function differently.


Q: Looks very similar to Java!

A1:  c++ has similar syntax to Java

A2:  Yes! Actually Java syntax is based on C++ (C++ came first).


Q: Why would you use <double> to create a list of floats when you just want a list of integers?

A1:  Chris could have used an integer instead of double here.


Q: How do you write a programming language?

A1:  You create a compiler or interpretter that understands the syntax of the lanaguage you want to create and converts it to code that the computer understands. Take CS143 if you'd like to learn how to do that.


Q: So what language was C written in?

A1:  Assembly language -- which is very close to what the hardware/CPU direclty understands. Assembly language gets translated into 0s and 1s pretty directly, but is very low level in what you can write.


Q: is there a difference between arrays and lists?

A1:  In Java, arrays have a fixed length. So you can’t change the size after you create them.


Q: why doesnt it print the decimal points since its Double?

A1:  oh that was a typo! It would print decimal points (thanks!)


Q: is this the last lecture?!

A1:  No, this is the second to last lecture. We have lecture on Wednesday.


Q: Are html and javascript both the languages of the web?

A1:  Yes!

A2:  HTML is a markup language, which means it includes the static content and how stuff gets layed out on a page. Javascript is actually code in a web page that executes.


Q: Chris it seems like you have lived a lot of places, what (speaking) languaes do you speak?

A1:  I do speak a few! english, spanish, bahasa malayu, and swahili (though i stopped when i was 12). and french too


Q: Are there any outside resources that you’d recommend for learning languages on our own?

A1:  w3 schools is an awesome resource with information about many different programming languages.


Q: are global variables acceptable to use in other languages?

A1:  Depends on the language, but its still generally bad style.


Q: What’s the difference between a global variable and just initializng a variable?

A1:  A global variable can be accessed and updated in any function even if it is not passed as a prameter.


Q: when will the code in place project be offered? will it happen during spring quarter or sometime during spring vacation?

A1:  I think during spring quarter. But the application to become a section leader for code in place will come out a few weeks before the course starts.

A2:  It will start sometime during Spring quarter. We are still working out the details.


Q: how does a website run when it doesn’t have a html file? (say it has .md files instead)

A1:  Your browser knows how to deal with different sorts of files that might be served by a webserver.


Q: so even in JvaScript, we can import classes written in other html file like we did in Python?

A1:  Yes! You can import classes in many other languages.


Q: When creating some sort of software that you want people to use, and you want to build both a web app and a desktop app, what do you recommend learning?

A1:  It depends on what you are trying to build. There's no one right answer.


Q: if we want to teach for code in place, do we get class credit for it? or is it kind of separate from credit at stanford?

A1:  It's a volunteer project.

A2:  I think it is separate. It is a volunteer opportunity.


Q: Do section leaders in the code in place project get course credit or is it more volunteering?

A1:  It's a volunteer project.


Q: are there any other CS classes that are graded using the bucket system like this class?

A1:  CS106B is often graded using the bucket system as well. The grading system for different classes can be pretty different.


Q: how are the weights created?

A1:  The often start as random values and then get updated as data is presented to the system.


Q: Do we loose points for how many times we take LaIR or SL help while doing our assignments?

A1:  Nope! We encourage you to use these resources.

A2:  No. Getting help from SLs or LaIR does not negatively impact your grade.


Q: are there other courses to learn more about AI?

A1:  CS221 is all about AI. And there are lots of more advanced classes as well.


Q: How does data get presented to a program? Do humans have to hand-label data so that a program learns what to look out for?

A1:  often it does involve humans to label data (which can be used to teach AI)


Q: What professors teach 106B and what do you think of them?

A1:  They are all great.

A2:  Keith Schwarz is teaching in the winter. All of the professors who teach 106B are awesome!


Q: How can we get involved with the exciting research you all conduct?

A1:  Good question! First build up your base — take cs109, take cs106b, perhaps take cs221. Actually my first research experience was in cs221 — the first half you learn context, the second half they have you do your own research project — and provide TA support. Once you have your base come talk to us (or other professors)! A protip. Research is most fun when you work on your own ideas! Try and think about a cool idea to solve a problem — perhaps you can think of a problem other older folks might have missed!


Q: a quote that i found really interesting about technology and its social impacts is 'imagine a world where robots taking all the jobs would actually be a bad thing', i feel like it would vote for Andrew Yang

A1:  very interesting. As technology gets so powerful and fast paced we do have to think deeply about its interplay with society (and thats why we are working to integrate ethics and cs106a)


Q: How does the software code connect to the steering?

A1:  good question! There is a student solar car race team at stanford. You can talk to students who have done this or you can join them and write it yourself. But your program sends an electical signal, a wire sends that to a special stearing wheel, and then it turns… actuall its a little bit like how you write print(‘hello world’) and then ‘hello world’ shows up on your monitor


Q: Whos teaching 106A next quarter?

A1:  Nick Parlante


Q: i really want to do more coding over the summer, but research and internships can be hard to find :/ do you have any advice?

A1:  there is a program at stanford called CURIS. You have to be a declared cs major — but they have a lot of undergraduate research projects for undergrads!

A2:  You can apply to CURIS which is research! My other advice is to apply for anything that sounds interesting. You can check out websites like Angels List or Y Combinator for different startsup (that is how I found two of my cool summer internships).


Q: Would we be able to do CURIS in summer 21 with what we know now + 2 more CS courses in the next 2 quarters?

A1:  sure! The more experience you have, the further you can go in your summer project


Q: What are some classes in comp. economics ?

A1:  i actually dont know — i am not sure someone has made that class yet. Did you know if you find a class that doesn’t exist at stanford you can make it yourself (as a student initiated course)


Q: What classes should we take if we’re interested in natural language processing? Also congrats Chris!!

A1:  CS124 is all about NLP. Same with CS224


Q: Can AI programs react dynamically to new situations that was not in the original data set it originally learned from? For example, would a self-driving car that is familiar with the intersections in American roads be able to work safely in Europe where they use round abouts?

A1:  generally no. its one of the biggest open problems in theoretical AI


Q: I’m currently a frosh interested in majoring in CS, but I’m not really sure what I want to do yet. Should I take more CS core clases now or later?

A1:  I would recommend taking CS106b. If you like that, try 107. That is how I figured out I wanted to major in CS. I just kept taking classes and I kept liking them.


Q: can we take cs 161 right after cs 103?

A1:  I think CS109 is a prereq for CS161.

A2:  Yes


Q: How does one not get overwhelmed by how large the field of CS is and how much one still doesn’t know?

A1:  Just take things one step at a time. And remember that there is no bad path forward. I thought i wanted to do graphics for most of my undergrad. It turned out to be fun and useful when i switched directions. I still haven’t learned it all, which is great. There is always more to learn and CS reminds you of that :)


Q: If I am really interested in graphics, are there any classes that focus on that or will I just generally get a good feel for graphics as I keep taking classes in the standard track?

A1:  there are! check out cs148 and cs248


Q: what would you say is the difference between majoring in CS on the comp bio track as opposed to the BMC major?

A1:  they are very similar :). Two good paths!


Q: is 106b a definite pre-requisite to take 109? I’d want to take 106b and 109 next quarter

A1:  its a co-requisite. Its best to have it finished when you start cs106a, but you can take them at the same time!


Q: Can we hear your thoughts on CS vs Symbolic Systems :)

A1:  I love sym sys. And I love CS. In fact they are pretty similar at the end of the day


Q: What about quantum computing? Is that more physics or CS related? How will that affcet how we conduct research and/or the personal computer landscape?

A1:  oh yea! quantum computing is very cool. You can contribute as a physicist or as a computer scientist (or better yet, learn both). If we can get qbits to stay around for long enough its going to have a huge impact


Q: Is there a track that would be good for environmental science (specifically, one that is heavy on remote sensing and data analysis)?

A1:  there is an amazing school of earth science and they have classes on all of the above. Its a huge intersection waiting for more young researchers!


Q: Can SCPD students be Section Leaders as well?

A1:  Unfortunately no : (


Q: If we’ve taken a class like stats 116, would cs109 still be of use/interest to us?

A1:  they are actually pretty similar. But I keep teaching cs109 and I keep learning more! Cant get enough probability these days…


Q: what are all courses when you say Math through 51?

A1:  I think he means math 19, 20, and 21


Q: Is quantum computing more of something that concerns physics and engineering, or is there a track in CS at Stanford / classes that allow someone to expand on the field?

A1:  There is this class: https://cs269q.stanford.edu/ Some students have made a group and I bet you could joing: https://qc.stanford.edu/


Q: what are the requirements for a CS coterm? can we apply after finishing the core?

A1:  Similar to the major. You can apply once you have 120 units.


Q: would you advise taking Math 51 within this year if a student is thinking about a CS Minor?

A1:  That sounds good! Its a useful core class to have for cs and for lots of other fields at stanford


Q: Would CME 100 count towards the CS minor?

A1:  Yes! https://cs.stanford.edu/degrees/undergrad/Minor.shtml


Q: How does symsys differ from cog. sci?

A1:  more cs in symsys


Q: For AI, do you recommend CME 100 or Math 51?

A1:  Both are good! I have heard great reviews of CME 100 recently


Q: Are there any courses that teach/introduce students to ui/ux design?

A1:  yes! cs147 and cs247. Amazing classes. some great instructors


Q: When is a good time to start taking elective classes like CS124, CS129, or CS142? After we take CS106B or 107?

A1:  live answered


Q: How does Computer Science interact with the aerospace industry, whether it be through developing new technology or contributing to economics of the expanding industry?

A1:  most of modern “aero astro” uses cs! And there is a whole department at stanford


Q: What are some cool applications of CS in the space exploration and aerospace industries that you’ve heard about?

A1:  live answered


Q: Wait is there class on Friday?

A1:  No class on Friday.


Q: Has anyone gotten ++ on an assignment this quarter?

A1:  Yes!


Q: Is there tracks or majors that are overlapping between symsys and mechanic engineering?

A1:  live answered


Q: Juliette what’s that class called again?

A1:  Idk the name, but check out Prof. Juan Alonso and also Mykel Kochenderfer in the aero astro. They are working on cool problems.