Programming for Engineering Students
Fall Quarter 2005 and after
Updated Fall Quarter 2007 to reflect lab change from Windows to Fedora Linux
Instructor: Mark S. Hutchenreuther
See academic home page for additional information, such as office and hours.
Meeting Time and Rooms
This is an activity class, which means the first hour is a lecture and the second hour is a laboratory. Both lecture and lab are held in the same classroom. See my academic page for actual hours and locations
Classes and office hours will not be held on holidays.
Prerequisites
The catalog lists MATH 142 or 132 and PHYS 131 or 121 as prerequisites. High school physics, algebra, and trigonometry should be adequate.Course Purpose and Goals
The student should be able to write a well-documented MATLAB program to solve engineering and scientific problems using the main structures of the programming language.
The student should also be able to perform such basic tasks as electronic mail, and use Internet tools such as web browsers and FTP software, and be familiar with the UNIX operating system including simple text editors.
The student should be able to understand the principles of engineering and scientific computation in any higher-level language and the basics of sound software engineering practices.
Schedule
| Week |
Lec |
Topic |
Reading |
| 1 |
Introduction |
Chapters 1-3 |
|
| 2 |
Data and Input/Output |
Chapters 4, 7 & 9 |
|
| 3 |
Selective Execution |
Chapters 10 & 11 |
|
| 4 |
Repetitive Execution |
Chapters 9 and 11 |
|
| 5 |
Assignment 5 - Functions |
No reading, lots of rereading and study |
|
| 6 |
More Functions |
Chapter 12 |
|
| 7 |
Arrays and Simulators |
Chapter 5 |
|
| 8 |
Files |
Chapter 14 |
|
| 9 |
Integration |
Chapter 24 |
|
| 10 |
19 20 Sample |
Review, course/instructor evaluation. Final Examination Programming Project Due |
n/a |
|
Holidays happen, and are not shown on this universal schedule. In the event of a holiday, scheduled lectures will be made up before or after the holiday. |
|||
|
Topics and reading assignments may be revised, examination dates are fixed. |
|||
Free MATLAB Clones
There are a number of MATLAB clones available, but I find only Octave to be decent:
Textbooks and Materials
The textbook for the course is Essentials of MATLAB Programming, Chapman, Thomson, 2006. You will also need my lab manual which is available from El Corral: Hutch's Handouts and Homework for CSC-231 MATLAB, latest edition.
You probably will not need a UNIX test. The UNIX guide in my Hutch's Handouts and Homework for CSC-231 -- MATLAB from El Corral should be sufficient. If you want something more, get the laminated UNIX Quick Study Chart from Barcharts, Inc., available from the El Corral bookstore, on-line from Barcharts, and possibly at Longs Drugs(!).
I will give you an account and password to access our CSC laboratory computers. Your user name is the same as your e-mail user name (and also the one you use to access My Cal Poly), which is typically your first initial of your first name and up to seven letters of your last name (e.g., I am mhutchen
).You will be storing files on our UNIX server, but may choose to copy them off to a small flash drive.
Class Handouts
I have taken all of my handouts (well, most of them, I add more things each quarter) and published them in my Hutch's Handouts and Homework for CSC-231 -- MATLAB booklet. This also includes all homework assignments, including extras that can be done as part of your final programming project. Topics include:
Grade Basis
Your course grade will be based on five components:
|
20% |
Quizzes (4 x 5%, low is dropped) |
![]() |
|
20% |
Mid-term Examination |
|
|
25% |
Final Examination |
|
|
15% |
Programming Assignments |
|
|
10% |
Weekly Programming Projects |
|
| 10% |
Final Programming Project |
Note that the lowest quiz score will be dropped. The final will be comprehensive but will concentrate on material covered since the midterm. The instructor reserves the right to change the weight of any component by up to 5% and to grade on a curve.
This is an activity class so the final exam will be held during the last class meeting, not during finals week. There will be a review session the meeting before the final which will include a handy handout of all the topics covered during the quarter.
Laboratory Issues
I encourage you to work with a lab partner for a number of reasons. First of all, the number of computers in the CSC computer labs requires that you pair up. Second, by checking each other’s work you will avoid many errors and often solve problems yourself. Only one copy of the homework assignment needs to be submitted for each pair of students working together as a team.
Programming projects are individual efforts. While I do not discourage you from working together, your programs should be sufficiently different, otherwise I reserve the right to penalize both (all) of you for collusion.
|
|
Do Not Bring Food Or Beverages Into The Computer Lab! Please enjoy your drinks and snacks outside the computer lab. Spilled beverages are fatal to computer keyboards and not very nice to textbooks and notes. Crumbs are especially hard on both keyboards and mice. Thank you! |
Homework Issues
Homework assignments and projects will be due at the end of class on the Monday/Tuesday after they are assigned.
Programming assignments will initially be short programs that build on the lecture topic. The first several will build on each other, that is, the second assignment will add features to the first and so on. Some early assignments will also require a short programming project.
The second half of the course will feature longer, more intensive assignments.
Programming projects will be similar to the assignments, however, the student will be designing a program that is similar to the one in the assignment. The purpose is to use the principles learned in the programming assignment in another program. While you may work with each other on these, each student must submit his or her own project. Projects that are too similar to the lab or too similar to anyone else’s will be marked down heavily.
Programming work may be submitted in class, during office hours, or via the mail box outside the CSC Department Office (Room 14-254), which is emptied each day at 4:00 PM and time/date-stamped. Lab work will not be accepted via e-mail at this time, and you should not put work under the door of my office either.
Programming Assignments
I have rearranged the assignments from individual assignments to weekly multi-part assignments. These include:
Lab 1 — A simple header file, to learn how to use the editor.
Lab 2 — A simple computational program.
Lab 3 — Selective execution, Lab 2 with an artificial set of upper and lower limits, and a menu to select temperature scales.
Lab 4 — Event-controlled loop, Lab 3 with a loop to allow repetitive execution, and counter-controlled loop with a loop to build a table of conversions.
Lab 5 — Lab 4 with a function to perform the conversion, plus a change subroutine for the upcoming vending machine simulator.
Lab 6 — The rest of the vending machine simulator.
Lab 7 — An automatic teller machine simulation.
Lab 8 — Reading and writing simple text files.
Lab 9 — Integration or other assignment.
This schedule is subject to change, depending upon the interests of the students. Additional labs will be added to the lab manual as the course evolves.
Loss of Points in Lab
There are several easy ways to lose points in lab. The first is to turn in your lab late, which will result in a 75% or 100% reduction in points. Each part of each lab is usually worth 10 points. Points will be deducted for the following:
Failure to include a run file — 5 points.
Failure to update a source file header — up to 3 points.
Failure to include a source file header — 3 points.
Failure to properly test a program — 2 points.
Failure to fix a program error — 1 point per error.
Submission package out of order — 1 point.
Failure to follow directions — 5 points.
You have been warned. Resubmittal to regain lost points is not an option. Do it right the first time.
Programming Projects
Each assignment will be somewhat routine and predefined. The intent of the programming project is to enable the student to write his or her own program similar to the assignment, one that may do something of interest to the student, or something different than the assignment example.
Final Programming Project
You will also be assigned a final programming project that must consist of a minimum of 100 SLOC (source lines of code). There will be options on this, including simply doing several simple program examples from the textbook. In the past, students have done as much as 1500 SLOC. Computer programming, like engineering, is often an affliction.
Quizzes
There will be five quizzes given in the lecture, with the lowest quiz score being dropped . Tentative quiz topics include:
Basic input/output
Data types
Selective execution (if)
Switch/case
Event-controlled repetition (while)
Counter-controlled repetition (for)
Arrays
Functions
Before each quiz there will be a brief review of the topic which I deviously call, “Short Attention Span Theater.” If you can remember stuff for five minutes, you will do very well on the quiz.
E-Mail Issues
E-mail aliases are automatically maintained by the ITS people. These are generated by the information you have listed in Academic Records, and generally includes your Cal Poly e-mail account unless you have given them a different address. You should check your Cal Poly e-mail often. The e-mail alias is based on course number, section number, quarter, and year. For example, for Fall 2008 for section 1, this would be "csc231-01-2088@calpoly.edu". I will often send you information via these aliases.
When you send me e-mail, you can send me the whole source file as an attachment and I will look at it and see if I can spot the problem.
|
Classroom Behavior The easiest way to annoy me is to talk in class. The second easiest way to annoy me is to be late or absent for quizzes and other important aspects of the class. If I find you disruptive, I will expel you for the session. So behave. |
![]() |
|
These students insisted on talking in class and were turned to stone and left in the garden outside Dexter Hall. Don’t let this happen to you. |
Due Dates
I attempt to make each assignment achievable in the allotted time, but sometimes assignments take longer. Deadlines MAY be extended, however, you should plan on turning in assignments ON TIME for full credit, or be penalized for late submittals. This course requires some amount of work outside of class. Get used to it.
The standard due date is at the end of the class meeting one week after it is assigned. Assignments left in the CSC wooden box by 4:00 will be time-stamped for the current day and not penalized. If an assignment is left after 4:00 PM, it will be time-stamped the next day and will be penalized 75%. Anything later than this will be penalized 100%. No exceptions!
On-Line Materials
The on-line lecture pages are HTML files with links to three versions of each lecture: Native PowerPoint, outline format in RTF (rich text format), and OpenOffice Impress format. I currently use OfficeXP, and files are saved in that format.
Lab assignments and handouts are published in the instructor’s lab manual, available from El Corral (should be on the shelf next to the textbook). There are errors in the lab manual which will be pointed out by the instructor and also noted on an Errata Sheet.
Tutoring
The CSC Department provides free tutoring for the CSC/CPE-101/2/3 students in Java, and can also offer help with C or C++. No MATLAB tutoring is currently available, although the other tutors MAY be able to help you. Your best bet here is to work with a lab partner or even a study group.
Patience is Appreciated
There may be up
to 35 students in this course, and I teach multiple courses and sections. I am here to help you and I intend to do this.
However, please understand that at times I will be spread pretty thin among you,
so please be patient.
By all means call on me if you need help. You could ask another student for help, but you must consider that they may not know the answer either. Rather than “bother” another student, just kick back and patiently wait for me to get to you.
Life Happens
Emergencies and conflicts arise. Absence is not accepted, however, absences can be handled if conditions warrant. I am more liberal if I know about anticipated absences before they happen. If you are contagiously ill, let me know, stay home, and arrange to make up the work in some way (perhaps volunteer to type the report for the group). Same goes for family emergencies, interview trips, etc. If something comes up or is coming up, call me or at least send me e-mail (which is time and date stamped). Let your lab partners know too.
If you tell me before it happens, I am very liberal. Afterwards, I could care less, and you will be out of luck.
![]() |
Cheating is detectable and will not be tolerated. The penalties are too high and not worth it. In the past, students have been beheaded, covered with clay, fired in a kiln, and displayed outside Dexter Hall. Unless you like pain and heat, don’t do it.
|
Heavily revised 9/18/05 to incorporate the changes from Fortran to MATLAB.
Slightly revised 1/5/08 to update for switch from Windows to Fedora.