Getting in touch
Instructor | Office | |
---|---|---|
Lucia Nunez | l.nunez@northeastern | Meserve 335 |
Things to do now
Bookmark: https://course.ccs.neu.edu/cs3500/
Sign up for Piazza (instructions on main web page)
Register on https://handins.ccs.neu.edu. Choose your section correctly! (If you choose wrong, contact me immediately.)
Resources for the entire semester
Grading
Grade breakdown:
60% homework
5% labs / in-class exercises (style + attendance + non-trivial submission)
15% first exam
20% second exam
Both exams count towards your final grade
N.B. exact percentages may change slightly
Homework
Nine homeworks: four shorter ones, then four longer ones, and one extra credit
Usually due at 8:59 PM
Self-eval: another separate assignment from the "main" assignment that opens 24 hours after the main assignment.
Late policy
Four No-Questions-Asked Late Days (2 for individual, 2 for group)
Use at most one per assignment (including labs and self-evals!)
No other late work accepted without extension.
Academic integrity
No illicit collaboration
Guideline: words okay, code not okay
If unsure, ask!
You must submit only your own work
If you steal someone else's work, you fail the class
If you use ChatGPT or anything similiar to write code for you, you fail the class
You are responsible for protecting your work
If someone uses your work, you fail the class
If you are using github, make and keep repo private
What to expect
- Time commitment
- Read lecture notes, attend lectures regularly
- Start early, work often
- If you are working on same thing for hours, take a step back. You may need some assistance.
- Lecture -> Assignment correspondence
- Testing matters, how/when to test
- The idea of self-evaluations
Why Object-oriented Design?
Because software
isn't easy
Writing software is hard
Writing good software
is very hard
Simple semantics
(define (f->c f) (* 5/9 (- f 32)))
(f->c 212)
(* 5/9 (- 212 32))
(* 5/9 180)
100
But programs get big
Year | OS | MLoc |
---|---|---|
1993 | Windows NT 3.1 | 4 |
1994 | Windows NT 3.5 | 7 |
1996 | Windows NT 4.0 | 11 |
2000 | Windows 2000 | 29 |
2001 | Windows XP | 40 |
2003 | Windows Server 2003 | 50 |
2007 | Windows Vista | 50 |
We compose complex systems from simple parts
We can write programs that we cannot completely understand
Another challenge: change
Customers don't know what they want
What they want changes
Software development life cycle
Analysis
Design
Implementation
Testing
Deployment
Evaluation
GOTO
1
Software development life cycle in theory
Analysis
Design
Implementation
Testing
Deployment
Evaluation
GOTO
1
Software development life cycle in practice
Cursory analysis
Completely wrong implementation
Slightly less cursory analysis
Wrong-headed design
Some implementation and testing
More analysis and re-design
More implementation and testing
Iterate, iterate, iterate
Deployment
Bug reports (Yay!)
Head scratching
Coffee
Temptation to rewrite from scratch
We need help!
How can we deal with complexity?
How can we design for flexibility?
One possible answer:
object-oriented design
Object-oriented design
Central concepts:
Information hiding
Interfaces
Polymorphism
Loose coupling
Replacement
Reuse
SOLID Principles
Single responsibility: every object should be responsible for just one focused purpose
Open/closed: everything can be open to extension, but closed to modification
Liskov substitution: if a type
S
is a subtype of a typeT
, then objects of typeS
can be used anywhere objects of typeT
can.Interface segregation: no client should be forced to depend on methods it doesn't use
Dependency inversion: abstractions should not depend on details; rather the reverse
What makes software “good”?
Correctness
Efficiency
Security, maintainability, robustness, portability, reliability, testability, usability, scalability, ...
“No silver bullet”
There is no single development, in either technology or management technique, which by itself promises even one order-of-magnitude improvement within a decade in productivity, in reliability, in simplicity.—Fred Brooks
Topics
What are objects all about?
Interface polymorphism
Data abstraction and encapsulation
Client perspective versus implementor perspective
Object-oriented terminology
Generic polymorphism
More topics
Testing and specification
Algorithmic efficiency
Software archaeology
Class diagrams
Design patterns