Lecture 14: Midterm Review
Midterm Review
- In-class Midterm on Monday
- This review is presented at a high level of abstraction
- We can go back to slides from previous lectures in response to questions
No Silver Bullet
- Fred Brooks claims there is no silver bullet to solve the “software crisis”
- A silver bullet would be a single technique that leads to an order of magnitude improvement in the production of software
- He divides the problems facing software engineers into accidental and essential difficulties
- The essential difficulties include complexity, changeability, conformity, and invisibility
Fred Brooks Continued
- Other chapters covered in MMM
- Tar Pit (Chapter 1)
- Programming Systems; Joys and Woes of The Programming Craft
- The Mythical Man-Month (Chapter 2)
- Adding people to a late project…
- The Surgical Team (Chapter 3)
- Formalizing (and reducing) communication paths
- How does a software team design scale to large teams?
- Aristocracy, Democracy, and System Design (Chapter 4)
- Conceptual Integrity
- Primary goal is ease-of-use
- Can be achieved by balancing functionality with simplicity (conceptual complexity)
- The Second-System Effect (Chapter 5)
- Designers are attempted to add too many features, ignore changing assumptions, etc. when designing the second version of a particular type of system
- Need to use extra self discipline on such systems with help from their managers
- Sharp Tools (Chapter 12)
- Project teams need both general-purpose and special purpose tools
- Team-specific tools can greatly increase a team's productivity if the tool automates a frequently recurring task
- Make sure someone on your team is empowered to build tools
- Note: this is built into the culture at Google. Each week a Google developer can spend one day working on personal projects
Deployment
- Deployment is the process of delivering software to a user after it has been created
- We want this process to be “engineered”
- We need to support the deployment life cycle
- Producer Side
- New Release and/or Update
- Retirement (of obsolete versions)
- Consumer Side
- Install/Uninstall
- Update
- Adapt (to changing environment)
- Reconfigure (to meet new needs)
Unix and the Shell
- The Unix Architecture is split
- between user-level programs, the kernel, and devices
- The Shell (in our case, bash) is a user-level program that provides an interpreted programming environment
- Shell Variables/Environment Variables
- Expressions including (integer) math operators
- Input/Output Redirection
- Job Control
- Control Flow
Pattern Matching
- Wildcards
- Used to match sequences of characters, digits, etc.
- “a*.c” — all files that start with a, have any number (including zero) of characters or digits after the a, and end in .c
- Regular Expressions
- Used to match sequences of patterns
- “(ab)*c” — matches zero or more instances of the pattern “ab” followed by the pattern “c”
- c, abc, ababc, abababc, …
- We looked at how regular expressions can be used to process documents, looking for information, using Ruby's regular expression capabilities as our regular expression engine
- There are many different regular expression engines out there including the one in grep, perl, python, etc.
- Pattern Matching is important because it allows us to search large amounts of information in an efficient manner
- More and more software development tools are shipping with pattern matching capabilities, making it important for developers to understand this technology
Find & Grep
- Find
- Tool to search directories and files via sequences of boolean operations
- Makes use of wildcards and can invoke external operators
- Grep
- General Regular Expression Processor
- Tool to search the contents of files using regular expressions
- Both help software engineers deal with large information spaces, that is, they are scalable (and fast)
- Want to see why grep is so fast? Check out this excellent blog post: The Treacherous Optimization
- This post is also an excellent example of a good programmer who knows how to write well!
Build Management
- An engineered process for building software systems
- Process can be supported by tools
- These tools attack accidental difficulties
- They free developers from having to remember code dependencies (among other things)
Make
- Makefiles are specifications that provide precise control over build management
- If something changes, only those files impacted by the change are recompiled (as opposed to the entire system)
- Make is well-integrated with Unix and provides
- rules: targets, dependencies, and actions
- Example of three different specification styles
- Operational (or Imperative)
- Descriptive (or Declarative)
- Structural (or Relational)
- macros (variables), VPATH, and automatic variables
- pattern matching and implicit rules
Ant
- Ant is a cross-platform, extensible build management system
- Ant works at a level of abstraction that is higher than Make
- It allows you to focus on the overall task flow of your build process and not get bogged down with inter-file dependencies
- Ant build files consist of properties, targets, and tasks
- Properties: read-only variables that can be used to customize build files and make them more generic
- Targets: each target represents a step in the build process and consists of one or more tasks
- Tasks: specific actions to be performed during a build process
Versioning & RCS
- Version Control
- Track changes to a file between editing sessions
- Version graph supports extension, split, and merge and is stored in a version control file
- Version control files make use of deltas to save space
- Version control systems provide check-in, check-out, and other capabilities
- RCS: backward-delta version control system
- numbering scheme: branch number.version number
- ci and co are primary commands; rcs, rlog, rcsdiff
- Provides Keywords like $Author$
Coming Up Next
- Midterm: This Monday
- Quiz 6: Available after this lecture. Don't forget to take it!!!