 All right, thanks everyone for making it this early and very, very cold morning. I was thinking on the way over here, I was like, man, I'm so happy that it's not like fall and it's not like 110 degrees walking over here. After like two minutes, I was like, man, maybe I shouldn't have wished so hard because it's really, really cold. So just to make sure you're in the right room, I saw some people leaving earlier when I put this up so they were not in the right room. So you should be here for CSE 340. If you're not, go leave. You know, we won't laugh and make fun of you. Or you can just sit and maybe you'll want to take this class after hearing what we have to say today. Cool. Okay, so today is kind of, I'm going to tell you what the class is about. I'm going to tell you a little bit about myself. Hopefully try to get to know each other a little bit. And then we'll get into kind of some of the high level big questions that we want to answer with this class. So let's go over with this, the story of the thing. All right, so basically, have to go over the syllabus. So the reason why we go over the syllabus is so that you know what to expect in this class. And I know, or you know at least what I expect of you in this class. If we have any questions, we can definitely talk about that now and get it all kind of out of the way and settled. Can everybody read the screen? Yeah? By the way, this is a really sweet room. I'm really digging this room. There's a lot of room with the chairs, like you're all spread out, it's all fancy up here. Do you like the two screens or just one? Does it matter? It's fine for now. All right, let me know what you think. Okay, so a little bit about myself. For those of you that don't know me, I see a few familiar faces, so that's good. So I'm Adam DuPay. You can call me Dr. DuPay, you can call me Professor DuPay, you can also just call me Adam, which I prefer. That is totally fine. Whatever you want. A little bit of background about myself. I did, let's see, I did a total of nine years at UC Santa Barbara. So I did my undergrad there, did their four plus one program. So got an undergrad and a master's there. Then decided I hated it. Well, maybe that's too trying to work. I wanted to, was done with academia, wanted to go work. So I worked full-time at Microsoft for a year as a software developer up in the Seattle area. And then I was like, well, man, maybe I really do like doing research. So I went back to Santa Barbara for my PhD where I worked on my area of specialty is security research. So specifically how to automatically find vulnerabilities in software. And so I did that for four years. And then after that I was fortunate enough to be here. So this is my third semester here at ASU. So I'm pretty excited. And there's half the number of students here that I taught last semester for 340. So I'm also very excited about that. Yeah, any questions? Is that a hand or no? Just a high scratch. Okay, any questions about me, my background? Anything? Okay, cool. My office is here. I'll be meeting with the TAs today to establish some office hours. We'll try to keep them spread out throughout the week so that all of you can get help on the course. It is really important to take advantage of that. I know sometimes it could be a little weird. Maybe you're intimidated. I hope I'm not too scary, maybe just scary enough. No, please come and see us. Come see the TA. We want to talk to you. We want to help you as the TA here. Yeah, you want to stand up and introduce yourselves to the class? Hi, my name is Uncle. I'm a Ph.D. student. And my video specialization is security. Cool. All right. So yeah, we'll be posting all of our info, all of that stuff in here. Okay, so unlike other classes, I guess I'll get down to it in a bit, but unlike other, I absolutely hate using Blackboard. Every time I ask you Blackboard, it makes me feel like the stupidest person that's ever lived. And maybe you've never seen the other side of it where you have to create things. It's just like a nightmare. It's the most enterprise-y software I think I've ever been used. So we will use Blackboards for me to post the homework assignment to you and for you to submit the homework assignment, because that's a lot easier for us to grade that stuff. We'll also post grades on there, but pretty much everything else will be happened on this course mailing list. So all class announcements, any questions you want to have asked, can you go through the mailing list? Questions so far? Lots of material. Okay. Office hours. So yeah, please. So, you know, we will... Can you read that in the back? I'm going to say no. Can you read that? What's the second paragraph, third word today? Okay, so the point of the office hours are that you can come ask questions. So this is going to be a very programming intensive course, so much so that it's probably much more programming than you've done in your previous classes. And this is specifically by design, because as a computer scientist you need to be able to build complex systems and be able to take something from specification and build something pretty much exactly the way we want it. And so because of that, so anybody here coded perfectly? Yes? Okay, I would venture that maybe you're not coding hard enough or solving ambitious problems, right? It's easy to code something simple perfectly, right? And even then sometimes it's difficult. One of the tricky things, especially at your stage, right, is it's very hard to estimate how long something's going to take, because maybe you think everything's going great, and then you hit a bug that takes you four or five hours to find and fix, right? And you never know when exactly those things are going to come. So to survive in this class, you've got to start early on the programming assignments, and when you have problems, you've got to ask the mailing list or come into office hours. So I really urge you to take advantage of that. One thing we will not do is you come in, give us your program and be like, my code doesn't work. Well, that sucks, okay? That's what we're going to do about that. I'm not going to spoon feed you the answers, right? It's my job to help you think about and understand what's wrong and try to figure it out what's wrong about your code, rather than me just saying, oh, yeah, you didn't free that buffer over here and now it's being reused and now that's where that second-patient fault's coming from. So, you know, when you ask questions, I have a link here, which I think is a really good essay. It's how to ask questions the smart way. So you've never seen this before. It's all about if you just say, hey, what's the answer to problem three on the mailing list? I'll probably say, you know, maybe you should think about it. If you have, you're much more likely to get a response and help if you say, hey, I'm stuck on problem three. I've tried, you know, X, Y, and Z, and I see that the grammar looks like this and I see that the third production rule looks like this, but I still, the answer that I'm getting doesn't make sense because of X, Y, and Z, and I've Googled and I looked at this page and this page says this thing, but I don't really understand it, right? So if you demonstrate that you've put in some effort to solving a problem when you come to us, absolutely happy to help, right? We want to help you. We want you to be successful in this class. So yeah, this is a really good how to ask questions and helps in all kinds of things, so class stuff, stack overflow, all that kind of stuff. Do you have any questions on office hours? Have you ever been to office hours in a class? Is there anything not? Okay, come to my office hours. So there you go. Okay, so just be very, very, very clear. All announcements and communications about this course is going to take place through the mailing list, which is the wrong link there, but actually I think it's the right link. It's the wrong text, yeah. Yeah, so it's just a Google group. I highly recommend you sign it up to, there's like settings when you sign up for it, have it send you emails automatically. That's the best way to keep up to date on the course, because oftentimes one of your classmates will ask a question that maybe is something that you're struggling with. And so when I respond, right, rather than you later say, oh, I'm also having the same problem, you'll probably just get a link to the discussion on the forum, right? Because you've already answered that question. Okay, and the other great thing that I really like about this mailing list is we're only two people, right? And you are, hey, may I know? More than two. More than two. That is also correct. If it was four, it wouldn't be a big problem. What's that number on the back there? 125. 125, right? You're 125 people. So we want you to succeed. We're going to help you. We're going to do everything out of power. But really, part of the way to survive this course is to help each other in the class, right? So if somebody posts a question on the mailing list and you think you know or maybe know an answer, you're totally more than welcome to reply. And I actually really encourage you to do that. Just like I said, right? We don't want to just spoon-feed people the answers, right? Oh, problem three, that's, you know, five. Probably not going to be as simple as five. But you can help answer or clarify things or questions about concepts or how does this grammar work if there's an epsilon here or how do character star-star pointers work when you dereference them and take the address out of operator? All that kind of stuff. So don't go overboard. Don't send any other student like your code or anything like that. Don't post that on the mailing list. It's also very bad. It's a lot better. I also like it if you know of a resource, right? That can help them. Send them the link to the resource, right? So they can further their understanding and be able to learn and kind of understand it rather than giving them the answer. Yeah, so the other thing is, so also with 125 students, right? The communication gap or the communication difference here. So if you have a question, it's a lot easier if you post it to the mailing list. That way I can get to it. That way the TA can get to it. Or that way one of you can get to it, right? If you just send it to me, I get a lot of emails and I'll just say that, right? It's been making me a little while to get to them. I'll definitely reply to all of them. And then if I think it's helpful, and oftentimes I will when you email me directly, if it's something I think the whole class can benefit from the response, I'll CC the class mailing list so that everybody can see that response. Obviously not if there's private information there. This borderline I'll ask you the default is to not, but oftentimes I will because I think it makes it a lot easier for you and I think it's very helpful for everyone in the class. Questions, mailing list? All that kind of stuff. Here are your rex. You've been able to register for this course so you probably, this probably is not necessary. All right, textbooks. So this is the recommended textbook. It's not required. You don't have to have it in. I'll say it's good on some parts. It's not great on other parts, but it can serve as a pretty good additional place to try to understand some of the concepts and some of the techniques that we're talking about. You can definitely also get the second edition which is a lot cheaper, so do with that what you will. I'll post. So for each of the topics that we discussed, I'll post the relevant material in the book for both the third edition and the second edition. So that way you can use whichever one. Okay. Lecture topics. I don't think nobody really cares about that. The exam dates will be posted in advance. We'll be posting them soon. I guess the other thing that I didn't mention so far about this class, right? So there's another section of 340 this semester. You should be aware there was no choice. You chose the 9am one, so it's kind of on you. So we're going to try and sync up project due dates and exam dates so that we're more or less aligned. So that's why I will post them very soon in the exam dates, because me and Professor Bozzi have to talk and find out a good date. So you basically have to let me know in advance if you're going to have to miss an exam. Please, it needs to be a real reason, right? Religious holidays, university sanctioned activities. Let me know in advance so I can do something different for you. If it's due to medical reasons, they need to be documented. There's a lot of students. 340? No, I guess not. Okay. Workload. How many courses have a workload section? A lot. Okay. This is a demanding class. This class requires consistent effort. So I'm going to tell you this now. I probably will not in the future go. I told you so because that's not the kind of person I am. But if I give you three, four weeks on a project, when should you start that project? Three or four weeks before the due date. Yes. Right? As soon as it's assigned. And we'll get more of this as we get closer to the projects, but I saw some things last semester where people didn't start until three days before the assignment was due. And I give you this amount of time because these are difficult, complex assignments that you have to build, essentially some of them from the ground up. So you have to decide how to design it, how to code it, how to make it execute on our test cases. What kind of algorithm do you need to come up with the algorithm to be able to solve it and apply it to this problem? So these are things that, even if you're not coding right away, you need to be thinking about this problem. How am I going to solve it? How can I create an algorithm to solve this? And if you don't do that, if you wait until the week of, you're just going to get hosed. And I don't give extensions. So definitely do not count on that. You're going to have to write a lot of code. You're going to have to read and understand code that we give you so we may say, hey, use this lexer and use that to create a parser for this language. And so you've got to understand our code to understand how it works and how to use it in your program. So why do we do this? It's because I'm very mean. You can say yes. I try not to be mean. Just unfair or something like that. So this is real life. So the closer you're getting to graduation, the more and more we ramp up, hey, you have to be able to solve difficult problems. You have to be able to design software. You have to be able to read code. So these are things you have to do in the real world. Actually, it really surprised me when I was at Microsoft because you go through your undergrad career and you're creating all this stuff and you like software and you think it's really cool. And then you get to a company. Are you creating stuff from scratch? Probably not. Probably not. They're like, hey, great, you're working on this project. Oh, by the way, it's like 200,000, 500,000 lines of code, whatever it may be. And now here's a bug. Go change that thing. And you're just like, uh. So this is part of the skills that you're developing, obviously not in that massive of a context, but these are the skills that you have to have in order to be a successful computer scientist, software developer, software engineer. And so, yes, it's going to be a very demanding class. You will work a ton in this class, but I think that it's very much worth the effort and it's going to make you a better computer scientist and a better programmer. And so not only that, so if it was just a programming class, that would be difficult, but we're also going to discuss theoretical concepts, new ways of thinking about programming and programming languages, new types of theory and abstract concepts, and so you're going to have to also understand that, which is part of why I really like this class. Questions on workload stuff? So if you're having some doubts about the class or I've got a whole bunch of stuff on my plate, it's worthwhile to seriously consider this part and maybe, you know, consider taking this class another semester when you're not as full. Assessment, okay. So homework, there'll probably be five homework assignments, four homework assignments. The goal of homework assignments is really just midterm prep. So the idea is we're giving you questions based on some of the problems that we've been talking about in class. You'll go through them, you'll submit them, when you see those questions on the midterm, you're not, oh my God, we've never talked about it first and follow-ups. Actually, we spent a week on that and you did a homework assignment on that. There'll be three midterm exams sprinkled periodically throughout the course. These will be helping to reinforce the concepts in class, all that kind of stuff, make sure the homework's. Priority projects, there's going to be five projects. The first two are pretty easy as we'll see. The last three are the very, very, very difficult ones. Okay, and one final exam that's comprehensive and covers everything in the class. Questions? All right, grading percentages. Let's see, homework 15. Midterm exam's 30, so each midterm is 10. Programming projects is 40. Let's take the math that's right here, that is. So projects one and two are each 5%, and projects three, four, and five are 10%. And 15% for the final exam. Questions? So the programming projects are a ton of work, so that's why they're rated very highly. But they're good, because they help reinforce the things that we're doing in class, and the things that we're doing in class help reinforce the programming projects. All right, so these are what I'm doing right here is promising you that these are the thresholds for the grades. So if you get a 97 or above, you get an A plus. So I may, what I say here is I may reserve the right to create the grades down by lowering, but I'm not gonna curve them up. So if you get 97% of this class, you get an A plus regardless. I'd love everyone to hit this 93%. If you all do 93% on the projects, or on the projects, on the course, I will give everyone in this class an A. Absolutely promise. So no curving like that, or none of that nonsense. I'm still optimistic that will happen. How does it not happen yet? No confidence. I guess I should say I can't discuss students' grades legally. Yeah, so I may pull these down, but I won't ever pull them up. Does that make sense? So you'll be able to know at any point in time. So this is just a formula. It's a mathematical formula. So you can at any point in the class plug in the grades you got on the assignments to come up with what's your current grade. Cool. And you can use this to find out the letter grade. Questions, grading, grades, letter grades, anything? Okay, this is something that's very important because I think some people may be unbelievable. Okay, so written homeworks. Homeworks are all written homeworks. They must be submitted online on Blackboard by midnight on the date that they are due. No late homework. I'm talking in 1205, 1206 is too late, zero on the homework. So submit online. You can submit multiple times on Blackboard. So please, if you're still working on it, submit something. That way we have something to grade. You know, this is also inspired by the real world, right? Like your boss asks for something. It's because he or she needs that thing before a meeting. And if you don't give them that bug report or the list of outstanding bugs or the current, your current sprint status or something like that, right, then they can't do their job. And so it's important that you're able to hit and know the deadline. This way there's no ambiguity, right? Everybody knows it's due by this date, this time. That's it. Project due dates. Projects are a little more difficult. So for each day that a project is late, 20% deduction based off of the grades that you got on there. So on almost all program assignments, they'll be automatically graded. So you'll be able to, through a submission system, submit your code and get feedback on exactly how many test cases you passed. And from there, you can figure out your grade very, very simply. Yeah. Are we allowed to submit multiple times? Yes, you can submit as many times as you want. And obviously, I don't know, maybe I should, well, I don't know. I should just say it, just sort of being clear. Obviously, though, messing with or, I don't know, trying to figure out the test cases by stealing code or running some malicious code on the server, right? Like you're honest, ethical people. So don't do that. We'll have serious, serious problems. If you have a documented medical emergency, you know, talk to me and we'll come to something that's fair. So, you know, like I'm saying, right, if you have a four week assignment and you're sick for two days, I don't know, right? Probably not an extension. Not extension worthy because there's a ton of time to work on these projects. But talk to me. I'm reasonable, but it's not just, we gotta remember when you talk to me about these things, right? It's not just you I have to think about. I think about what's also fair to the rest of the students, right? So questions on this? So I did this last semester. I think it was helpful. So I'm going to try to record all class lectures and post them on YouTube. And I'll post the link to those on the course website. But, so this is a best effort kind of thing. So if it turns out that I forget this microphone and the recording's really crappy or I lose my laptop or, I don't know, something could happen, right? I'm not going to re-record a lecture just to post it online. So it's not guaranteed. Don't count on it because you're still responsible for the material that's covered in class. But I will do my best to try to do that. I've heard the feedback from the students last semester was that it was very helpful when prepping for exams or they had to miss class or something like that. So I think it was useful and it's very little work on my part. So I will keep doing that. And I don't, like, cut it or do any cool fades or anything like that. Crazy. Although that would be kind of cool. Somebody wants to do that. All right, cell phones, cell phones vibrate. If you have any special accommodations, talk to me if we could make that work. All right. Okay. This is an incredibly important section so I really like everyone's full attention on this. Okay. Incredibly serious issue plagiarism and cheating. So what constitutes plagiarism or cheating? Taking somebody else's work and claiming it as your own. Yeah, taking somebody else's work and claiming it as your own in programming assignments or the projects that you're going to be doing, what kind of stuff will that entail? Taking someone's code. Taking someone's code. Yeah. I wouldn't solution off Stack Overflow or something. Say that again. Pulling a solution off Stack Overflow or something like that. So pulling a solution off Stack Overflow. So probably they would never have left some stuff. Right. Yeah, so never mind. Yeah. So actually that's something we'll talk about in a second. So if you do find a code on Stack Overflow and it's for a specific thing, how to iterate, reverse over a doubly linked list or something like that. The license on Stack Overflow says it's great to comment so you can use it. I'm fine if you use it, but you better put a comment in your code about where that code came from. Because one student uses some code from Stack Overflow and another student uses code from Stack Overflow but neither document that. And so we see this code looks identical. Right. Then now we have a problem because how do we know you got through Stack Overflow and not through each other. Right. So that's the big issue. If you want to use that, I'm... So realism, right? Realistic. I use Stack Overflow, Google when I'm coding constantly. Mainman say it's mostly because I... I don't know. I've used a lot of programming languages so I never know. Like, okay, how do I do this stupid thing in Python or in C or something like that? But I use it all the time. I'm not going to prevent you from using it because I'm going to get silly but also don't say on the Stack Overflow how do I use Alexa to parse tokens in a thing, right? That's like a programming assignment. What other things would constitute? We talked about some things. What other things would constitute? Working on a project together with someone. Yeah, working on a project together with someone. So, you know, these assignments, these projects are individual projects. And I will admit that that, you know, takes away from the realism in some aspects, right? Because rarely ever are you going to be solo developing a whole entire project, you know, by yourself, right? You have to work with other people. But at this stage in your development, right? Being able to hone and develop those skills of how to organize, how to design a complex system is incredibly important. So I really do want you to work on those problems. Work on the programming projects alone. So, yeah, if, let's say, I don't know, you and a friend are working in the lab really close to each other. You never look at the code, but the code comes out exactly the same. We're going to have problems. So don't do that. You can talk at a high level, right? So I think at a high level it's fine, like, oh, you know, oh, how'd you do that thing? Like, oh, yeah, you iterate over this thing. If you talk about it at a high level, it's less of a problem. If you're talking about it at a low level and your code comes out the same, then that's very bad. What else? Sending your code to someone? Yeah, that was the big one, right? So we talk about taking code from someone, but sending code to somebody, right? So, yeah, you're just as culpable. And in fact, in my mind, it's almost worse in some sense because the person who plagiarizes is probably very desperate. That's what I've seen as they're, ah, it's right in front of the deadline. Just, let me please get your code, right? But then they don't learn anything, right? They didn't go through that development phase of, oh, let me fix all the problems and oh, and they didn't solve all those problems that came up. They didn't design the software, right? So you're really taking away from their growth and their experience as a computer scientist. So I would much rather you take a zero on the assignment and the project than plagiarize. Okay, so, all right. So this is the big thing. So, zero, I have an absolutely zero-tolerance policy in this class. So I've only been here three semesters. I've only taught two classes, I guess, so far. I've already issued 20 academic integrity policy and violations. And how many grad students in this class? Efficiencies, some? Okay, okay. Hopefully I won't have to worry about you. Good. Okay, then this doesn't apply. But some of these were grad students, so I treated grad students under grads exactly the same. So I do not want this number to increase because I hate being the bad guy. But I will do it because it's fair to everyone else in the class, right? So, you know, I have to think about all the fellow students who put in the work and tried really hard and maybe got that zero or got, I don't know, 10 or 20%, right? But they tried really hard and didn't cheat. And then you have the students who cheated, plagiarized, and then, you know, that's not fair to those other students. So I will, when we detect it, and we're very good at detecting it, it'll be, you'll get a zero on the assignment, a lowered letter grade in the course, and the violations reported to the dean's office. So you said we're not allowed to work with our fellow students. Are we allowed to come in and ask specific questions on code TU? Yes, absolutely. Just making sure. Absolutely. Yeah, that's kind of what me and the TA are more here. Like, we can help answer those questions. And so, yeah. But you can always ask a, you know, high level question to the class mailing list, right? You're like, ah, I'm trying to compile and I'm getting this compile error, right? That's totally fine. And then somebody says, oh, it's probably because you're not using these flags or something, something, something, right? Yeah, absolutely. Okay. All right. Another big thing. Submitting a prior students code as your own. So we have all the code that's been written for this course since, I would say the dawn of time. I don't think that's correct, but I think it's like 2005 is what it might as well be. So yeah, if you submit a student's code from another year, right, which is just as bad, and that there can actually still be consequences for that student. So if you take somebody's code from last semester and submit it as your own, just like if you took from another student of this semester, right, that still can be accurate to your mother. Yeah. What if it's on the get-go? All right. Do you have plans? Do I pay you just a chance to pass that question? No, I heard last year that everyone did that. That's everyone they thought. Yeah, so that was part, that was one group. There were multiple clusters, if you will. Okay. So, let's talk about this. So why do you want to post your projects online? Yeah, perfect. I totally understand that. I totally get that. Let's think about it from the employer's perspective. Do they really want to see your classwork? How many people have done the CSC 340 programming assignments? At least 125. Well, that's the end. At least, I don't know, about 200 from my last semester, let's say. The semester before that was probably another 250. Probably like 1,000 people who have done these projects or similar versions of them since then. So honestly, from the employer's perspective, I didn't care less about what projects you do in class because that doesn't differentiate you from anybody else. What differentiates you is doing something different, something outside of the class, right? That's what employers want to see. They want to see that you put in that extra time and develop just some cool, stupid, it doesn't have to be fancy, something different that you didn't have to do for a class because that makes you stand out. And so this is why for this class, do not post your projects online. I've had multiple, multiple issues in my various classes where some students during the semester submitted it online right after the deadline and then other students found that code and took it and submitted it at their own for the late penalty. Some people took up old students code that they found online, yeah. What about using it for the purposes of version control and that kind of stuff? Especially if you have access to private repositories in that. If it's private, absolutely, totally fine. Yeah, yeah, yeah. That's kind of the view you get, right? You can use it just in a directory without a server, but if you want the backups there and do it privately, that's fine. I think GitHub is available to pretty much everybody in this room through ASU. Perfect, with private repos? Yes. Awesome. Yeah, so this is for the student package. Yeah, sometimes it takes like a month. I got mine like less than a couple hours. Do you have any problems? I think also BitBucket you can use. They have private repos. I think we could probably give you access to our server if all of us fail. So yeah, if you have any questions, if there's anything like that, just totally ask. But please don't post your projects online. Honestly, it's not helpful to you and it's not helpful to the future students who take this class. So, you know, you worked really hard on these programming assignments. Let the next group work really hard on their programming assignments, right? I'll make it easier for them. Questions on that? Yeah. FileBucket gives free private ones, correct? Isn't that limited? BitBucket. BitBucket, that's good. Yes, yeah, yeah. BitBucket does. Got another thing I don't know. Yeah. Question about the project. Sure. Is it only in C and C++? Yes. I think we're... Oh, maybe we'll get that. Does that include C++ 11? Probably not. We'll see. Like, just our release. The thing is, we have to... We have to check... The submission and automated grading system is targeted to a specific OS and a specific version, right? Which makes sense because there's 125 of us here and I think there's 140, 130 in the other section. We're all using the same submission system. So if... You know, we have to all standardize, right? So if you're using some weird Microsoft C compiler extension feature that doesn't work in the GCC version that we use, like, it's just crazy. Like, nobody wants to deal with those problems. So that's why we standardize. I'll have to check with Professor Bozzi's TA who's managing that system to see what exactly version it's using. Because I would like to... I want you to be able to use the latest cool stuff, you know, but you have to trade that off with... We have a system that works, right? This automated grading system works as pretty bulletproof. So exactly what's going to happen when we upgrade and then things break. What, you know... Is the entire project grade based on test cases? More or less. Yes. So... Okay, we can talk about that in a second. Oh, class is so short. Okay. Okay, update. I could update the syllabus. Things changed. Yes. Is the syllabus only available at what appears to be your website? Yes. It's a link from my ASU... Would you be willing to put this link in the library? Because there's a syllabus heading, but there was nothing there. It should be a link to here. Or at least I changed that this morning. I don't know. I was setting it up this morning, so maybe there's... See? A more blackboard weirdness. Yeah. So if you want to go to the thing, to the course stuff, you can go to my website, teaching classes, your spring 2016, right? Yeah. 340. Cool. And everything will be posted on here. So lecture slides, the links to the recorded lectures. I didn't mention it. Sometimes I'll record office hours if I think that it's useful. So I'll post those online. Because I know oftentimes everybody can't make every office hours and people have work commitments. And the links to the relevant books sections. Okay. I guess I don't have one. Okay. All the projects will be done in C or C++. The first homework assignment is... The first programming project is to get you set up with a Linux environment. So that way, we know that you're running the exact same of Linux version distro that is a compiler that is used on our assessment system. So that way, we get rid of all these headaches. There are many, many... There's all... Even though we did this before, there's many, many problems where people are like, oh, I'll just develop on Windows. Like, pressure doesn't know what he's talking about. I'll develop on Microsoft Visual Studio, which is a fine environment, right? But then when you decide like a couple of hours before to then try and port that over to our Linux environment, it doesn't work. It doesn't work, right? So if you're in a company and we're like, hey, we need a new feature for this product. You go code it. You push it out. And it goes into production. And it fails because you were using Ruby 1.8, but production uses Ruby 1.9. Does it matter that you wrote all this code? No, because it's broken, right? It doesn't work. It doesn't work in production. It doesn't work. So that's why we use the automated submission system because it's... I believe it's more fair, right? So some of the test cases we will give you, some of the test cases we will not. I'll talk about those more in upcoming classes. Any other questions on course stuff? Yeah? What IDE would you suggest considering you just used Visual Studio as a reference as one that wouldn't be perfect for this class? Well, it's not really the IDE. It's the periodic... You need to test. Honestly, if you want to be... I think I'm going to cover this to Wednesday. But I would use something like Emacs or Vim. Anything that you... So if you... I'll talk about it on Wednesday. But that's what... I use Emacs. You can use whatever... I mean, honestly, whatever, you can use Sublime Text. You could use Notepad, I guess, but that would be terrible. Don't do that. As long as you have a good, right compile run test cases loop, right? And you're actually running the test cases on the same operating system that we're running our automated test cases on. Because it works on my machine, but not on the submission server, is not a valid excuse. Right? You might as well have not done the assignment, so... Yeah. You could use Visual Studio, but if you wait to port, it's going to bite you. It's going to be a problem. Yeah. So with that... With saying that, would you recommend us putting some version of... or a particular version of Linux? Yes. We'll get into that very soon. Once we make sure we're standardized. Yeah. That's what the first project is. It's basically install this version of Linux on a virtual machine, all that kind of stuff. There's tons of resources. Oh, the other problem. That's right. The other problem with the Linux version is we want to use the same version that's available in the labs in case you lose your laptop or whatever, and it's available in general. So if we deviate from that too much, then we have problems. So you use the same version that's ASU General? Because ASU General has C++7. It has a... It has a weird version. It's like a pre-11 thing. We had problems last semester. That's why I don't know. Anyways. Okay. Cool. So let's talk for a little bit. So the class is called Principles of Programming Languages. So what does that mean? Why programming languages work? Why programming languages work? I have a deep question. Well, that's not going to how. How they work, right? Why they work? I guess that is also covered. Yeah. Maybe the fundamental structures that after a while programming languages? Yeah. So some kind of... We want to talk about programming languages. We want to understand what's possible. So... What is a programming language? How would you define it? What was it? Stuff you can write so that the computer can do stuff. Basically, instructions for the computer. Instructions for the computer. Can my Intel processor run my Ruby code? It's human readable text that can be taken into a computer and then converted to the way the computer speaks. Human readable text can be taken into a computer and translated into something that a computer can read. What if you... So... Let's see. Is x86 assembly a programming language? Technically. Technically. Is it human readable? Technically. There are people who make this. What about the ones in the zeroes? Like the binary, you know, when it is compiled, like the binary... Probably not. Not really human readable, but the compiler can execute it. Yeah. What else? That's my better definition of a higher-level programming language. Yeah. Higher-level programming language. Like that. Is it? Have we covered it? Covered. Yeah. Has it defined syntax? Is it defined syntax? What do you mean by that? It has specific code. It has specific non-secode that will do searching... do searching functions. I guess for now, we can maybe say that there's a way to tell what's a valid program in that programming language and what's not, right? In some way, but you could say. Pretty much just a set of tokens and values. A set of tokens and values is a little level, I would say. Think of it like high-level. What is a programming language? Yeah. Grammatical and syntactical structures paired with variables to allow for a computer to run and develop software. Does a programming language have to have variables? Yeah. Usually. Does it have to? Actually, at the very end of the class, we'll get a language that does not have any variables. I've actually refined this definition because the more I think about it, the more I don't know, I change my mind. But this is what I kind of like to think of it. It's a structured way to define computation. Structured kind of gets to the syntax thing, right? There's ways to tell what is in this programming language there's ways to tell what's not. Defining computation is like a recipe for a cheeseburger. A programming language or a program written in a programming language. What do you think? Is it? No. No? Why not? Well, can you repeat what you said actually? Oh. I just... Okay, there we go. Is a recipe for a cheeseburger a program written in a programming language? I would say, you know, because let's define computation as actions carried out by a computer. And I don't think... Well, we might be able to 3D print a cheeseburger. It could be a little recursive definition for self-referential. Define the computation as something that somebody could do. Alright, in that case, what's complicated? Yeah. I think it is. Yeah, why? Well, it's... It's definitely structured as a defined order. And then it's defined. And then the computer is... Yeah. I think it... I don't know. I think it depends, right? So it depends on maybe the recipe. It depends on what you consider computation. It depends on... What were the original computers? Where did the term computer come from? There was a person who did math. Yeah, a person who did math, right? Especially when they were doing the Manhattan Project. They showed rooms full of people doing math problems. And they would pass the results to the next person, right? And they called those people computers because they were computing results. So what's the purpose of a programming language? To accomplish a task. To accomplish a task? That's pretty good. I like that as a high-level definition. What else? Yeah, it could be to make the programmer more productive. So... But that's not right. Is it the purpose of a programming language itself? Or is that more so the... What would you say? That's more so how we would compare two programming languages, maybe. But it could be the purpose of creating a new programming language. To facilitate the ability for the programmer to interact with the computer? Yeah, so you want some way... I think that goes to the very beginning where you're talking about talking to a hardware, right? Some piece of hardware. Are you only ever talking to computers when you write programs? That's on how broad your definition of computer is. We'll go back to the original or normal definition of a hardware thing. Also programming languages so other people can read your code. Yeah, exactly, right? So oftentimes you're actually writing code not just for the computer, but you know that somebody else is going to have to read this code and fix bugs in it. So you may be writing for your teammates. You may be writing for your future self two years from now. Have you gone and looked back at your freshman year code that you wrote? Probably terrible, right? Maybe I should... I won't do that now. Yeah, it could be... We want to communicate an algorithm, right? So we may not even care if it runs or just trying to communicate some ideas, some algorithm. We may want to use it to describe a process, to communicate a whole system to another person, right? So now we're not even really talking about machines. And we may want to communicate instructions to a machine. So how does the hardware understand your instructions? The beauty of a compiler. I like that. I may steal that. Is it magic? I can spoil it. Pretty funny. It's not computer science, yes. Yes? Everybody who's not computer science. I guess that's true. I guess there's no, right? It's not magic. There's no magical way that the hardware eventually executes your stuff. What does your CPU understand? Machine code. Machine code, yeah. Or you can think about it slightly higher up as assembly language. Right? So we should just stand in front of our computer to these big 1's and 0's and keep typing away. So, what do we need? Do we want to program those 0's and 1's? No. Oh, it'd be crazy, right? I mean, you could do it. It'd be a little crazy. So we need some kind of way to translate our intentions to the assembly language that the CPU understands. And that's where we get our compilers, right? And that's part of what we're studying here is how this translation process works. We're really, we're trying to, compilers are trying to translate a programming language essentially into an executable binary, right? So they take in a programmer in a language and they spit out something that you can just essentially double click if you think about it at a high level. What about an interpreter? How's that different from a compiler? Yeah? It just goes line by line. Right? So it doesn't compile. It's performing the computation itself, right? The program is doing that, not any underlying hardware. Now that program itself is actually running, this executable is probably running on the actual hardware, right? So you've got, like, all kinds of levels. What about transpiler? Anybody heard that term? Yeah. I'm guessing just by the name, it merges multiple languages? Merges multiple languages? Yeah. Translate from one language down to another. Yeah. So these are things, I actually don't like this term. I would much prefer the term compiler because a compiler doesn't have to spit out binary. It can spit out C or Ruby or whatever, right? But transpiler is kind of the new term for that. So, for instance, let's say you're writing a web application and you want to use the new JavaScript, is it ES6 or 7 or 8? ES6. Features 6. You want to use the ES6 features, but not every browser supports that. So they actually have transpilers that will take your ES6 JavaScript and compile it to, it must be ES5 then, JavaScript, and so that you're programming in the higher level language, but it actually comes out as the regular language that will work in any browser. So, in this class, we're going to answer this question. How do they work? How do compilers work? How do you, essentially, how and why programming languages work? We want to understand why do they work. I don't use this word because I don't want to scare anybody, but what's the theory behind them, right? What are they, why, why can, essentially, why can we have programming languages? What does it mean to be a language? Why are we talking English? I guess I'm not talking, but why are we writing English to our computers? Right, so. Anyways, I think we will stop here. Yeah, we're going to do, so examples of programming languages. Wednesday is a very important class. I'm going to talk about specifically,