Course Introduction for ENCM 339 Fall 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 8 September, 2014 ENCM 339 Course Introduction Today’s lecture Course organization. Key points from the course outline. Brief introductory comments and examples related to programming in C and C++. slide 2/20 ENCM 339 Course Introduction slide 3/20 ENCM 339 Instructors Steve Norman: L01 (this lecture section, MWF 1:00pm), tutorial section T01, lab sections B02 and B04. Mahmood Moussavi: L02 (the other lecture section), tutorial section T02, lab sections B01, B03 and B05. ENCM 339 Course Introduction slide 4/20 Contacting Steve Norman Office: ICT 411. This is near the north end of the 4th floor. You should be able to use your U of C ID cards to access the hallways outside academic offices on the 4th floor—ask at the ECE main office (ICT 402) if have trouble. I haven’t set up any office hours yet. When I have them ready, I will post them on the Web. Email: norman@ucalgary.ca Please try to come up with a detailed subject line. “Question about ENCM 339 Lab 2 Exercise C” is a good example. “ENCM 339” and “Problem with course” are examples of what not to do! I will try to answer all emails within 24 hours, except weekends and holidays. ENCM 339 Course Introduction slide 5/20 Course Web site Most course information will be on Desire2Learn (which is the replacement for Blackboard). However, material specific to lecture section 01 will be posted outside of D2L at http://people.ucalgary.ca/~norman/encm339fall2014 ENCM 339 Course Introduction slide 6/20 In the Classroom Lectures will start at 1:00pm sharp (except today). Please try hard to be on time, and enter quietly if you’re late. If you need to leave early, pick a seat that allows an easy exit. Please, no conversations! Please ask questions! Call out, “Question!” if I don’t see your raised hand. ENCM 339 Course Introduction slide 7/20 Tutorial Periods Tutorials start this week: Thursday, September 11. There will be several small pencil-and-paper exercises each week. There are NO marks for tutorial exercises, but the exercises will be helpful toward labs, the midterm test, and the final exam. ENCM 339 Course Introduction slide 8/20 Lab Periods These start next week, not tomorrow! Lab periods are for help with lab assignments. A lab instructor—either me or Dr. Moussavi—and some TAs will be available to answer questions. Lab assignment instructions will be posted on D2L. Pay close attention to instructions about what parts of assignments are due when! ENCM 339 Course Introduction The ENCM 339 Course Outline A link to the complete course outline can be found on the course D2L site. Please read the whole thing carefully! slide 9/20 ENCM 339 Course Introduction slide 10/20 Course Outline: Exams Midterm test: Tuesday, October 21, 2014, from 7:00pm to 9:00pm. Locations will be announced well in advance. The midterm test will be closed-book and closed-notes. There will be a common test for sections 01 and 02. Final examination: Duration 3 hours, to be scheduled by the Registrar’s Office. The final examination is closed-book and closed-notes. ENCM 339 Course Introduction slide 11/20 Course Outline: Grading Lab assignments: 20% Midterm tests: 30% Final exam: 50% Attention: I A mark of 40% or higher on the final exam is needed to pass the course as a whole. I An average of 50% or higher on lab assignments is needed to pass the course as a whole. Read the Course Outline for more details about how letter grades will be determined. ENCM 339 Course Introduction slide 12/20 Course outline: Textbooks Two textbooks are recommended, not required: I C in a Nutshell, by Peter Prinz and Tony Crawford. I C++ Primer, fifth edition, by Stanley B. Lippman, JoseĢe Lajoie, and Barbara E. Moo. Reasons these books were chosen: I clear explanations for all key features of C and C++; I texts are good references for advanced concepts you might want to know about for 3rd & 4th year courses and at work; I authors were very careful to get things right; I prices are reasonable, compared to many other books. ENCM 339 Course Introduction slide 13/20 Free online access to textbooks This works for both ENCM 339 textbooks, and also for the ENEL 353 textbook . . . I Use your web browser to get to library.ucalgary.ca I Choose “Ebooks” from the “Search Collections” menu. (If you are off-campus, you may have to log in for access.) I Click on “Safari Tech Books Online”. I Use the search tool to find the book you want. ENCM 339 Course Introduction slide 14/20 Course Outline: Missed or Delayed Term Work Contact your lecture instructor (NOT a TA) as soon as is reasonably possible. See the Course Outline for more information. ENCM 339 Course Introduction slide 15/20 Get Help, but Don’t Cheat It’s easy to copy somebody else’s assignment, and it’s easy to let somebody tell you what to type to get your code to work. Don’t do it! But do talk about your assignments with fellow students, and with your TAs and instructors. Discussion and debate are great ways to learn! When you hand in your assignments, ask yourself two questions: 1. Do I understand all the material I am handing in? 2. Could I do this assignment over again without any help? The answer to both questions should be YES. ENCM 339 Course Introduction slide 16/20 Why C? Why C++? The number of useful programming languages is large and growing. Why are C and C++ the two languages chosen for ENCM 339? A few reasons . . . I Both are in wide use for wide ranges of current applications. (Example: the Linux kernel, one the most important pieces of software in existence, is written almost entirely in C.) I C, the older, simpler language, has been tremendously influential in the design of other languages. I C++, newer and more complicated, has features well-suited for building large applications and getting best performance from modern hardware. ENCM 339 Course Introduction slide 17/20 But what about other languages? C and C++ have some serious flaws. The designers of C and C++ have admitted that. C and C++ have succeeded not because they’re perfect (they’re not), but because they have strengths and have often been the best tools available for important projects. Even if you never get paid a dollar to develop in C or C++, a good working knowledge of both langauges will be a big help to you if you get paid to write code in other languages. ENCM 339 Course Introduction slide 18/20 Example C and C++ programs The next two slides show a C++ program and C program that does the same thing as the C++ program. The C++ code should serve as a quick review of some things you learned in ENGG 233. The C code makes a couple of points: I C and C++ have a lot in common. I In ENCM 339, you will need to learn some features of C that don’t get used much by C++ programmers. ENCM 339 Course Introduction slide 19/20 // A simple C++ program. #include <iostream> using namespace std; void say_hello(int course); int main() { say_hello(339); return 0; } void say_hello(int course) { cout << "Hello, " << course << " students!" << endl; } ENCM 339 Course Introduction // C code that does what the C++ code does. #include <stdio.h> void say_hello(int course); int main(void) { say_hello(339); return 0; } void say_hello(int course) { printf("Hello, %d students!\n", course); } slide 20/20