Language Design Principles
- 74Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
74 questions
- 1For a task involving large amounts of data, writing a program is generally preferable to doing the analysis_____.
Hint
Think about the approach that automates repetitive processing.
Answer
by hand
- 2The speaker's C implementation of the volcanic-eruption task was difficult partly because he repeatedly forgot details of functions such as fgets, scanf, and_____.
Hint
This C function was criticized as being especially poorly designed.
Answer
strtok
- 3In C, reading a floating-point value with scanf requires the conversion specifier_____rather than %d or %ld.
Hint
Use the scanf specifier for a double-precision value.
Answer
%lf
- 4For the data-processing example, AWK was preferred over C because it took about_____to write and worked correctly immediately.
Hint
This was dramatically shorter than the 20 minutes or half hour needed for C.
Answer
two seconds
- 5A notation that matches the task can make a programming job substantially_____.
Hint
Good notation reduces the effort needed to express the solution.
Answer
easier
- 6For a program that runs only once and finishes in a tiny fraction of a second,_____efficiency matters more than machine efficiency.
Hint
This refers to the time needed to write the code.
Answer
programmer
- 7Google's search engine is presented as an example of a system where_____efficiency does matter, so C or C++ is used instead of AWK.
Hint
This is the efficiency of the running program rather than the person writing it.
Answer
machine
- 8Choosing a programming language involves tradeoffs between programmer efficiency and_____efficiency.
Hint
One concerns development time; the other concerns execution performance.
Answer
machine
- 9The Tower of Babel analogy is used to compare the many natural languages created in the story with the many_____languages available today.
Hint
These are artificial languages used to instruct computers.
Answer
programming
- 10In the late 1940s, computers were programmed directly using absolute machine code represented in_____.
Hint
Think of the two-symbol representation used by machine hardware.
Answer
binary
- 11Assembly languages automated the clerical work of converting op-codes into_____.
Hint
These are the binary patterns understood by the machine.
Answer
bit-patterns
- 12High-level languages raised the level of discourse above the details of a particular machine_____.
Hint
This refers to the organization and details of a specific computer system.
Answer
architecture
- 13FORTRAN was originally associated with_____kinds of problems.
Hint
This language was designed for numerical and scientific work.
Answer
engineering
- 14COBOL was associated with_____kinds of problems.
Hint
Think of commercial data processing.
Answer
business
- 15The major software advance of the late 1950s and 1960s was the invention of_____languages.
Hint
These languages abstract away from machine-specific details.
Answer
high-level
- 16The ability to write a high-level-language program once and translate it for different machines improved_____.
Hint
This means the program can be moved across hardware platforms.
Answer
portability
- 17C became important in the 1970s because it enabled programmers to write core systems components such as compilers, loaders, assemblers, editors, and the_____system.
Hint
This is the central software layer managing computer resources.
Answer
operating
- 18Object-oriented languages added structures that helped programmers maintain intellectual control as programs became larger and more_____.
Hint
The issue concerns increasing difficulty of understanding and maintaining code.
Answer
complex
- 19C++ is identified as the dominant example of the_____language trend.
Hint
This paradigm organizes software around objects and their relationships.
Answer
object-oriented
- 20A defining characteristic of scripting languages is that_____is treated as a fundamental data type.
Hint
Scripting languages naturally manipulate this as well as numbers.
Answer
text
- 21Regular expressions are typically an_____part of scripting languages.
Hint
They are built in or provided as libraries and form an important part of the language environment.
Answer
integral
- 22All scripting languages are described as having_____arrays for handling collections of data.
Hint
These arrays use keys rather than only numeric positions.
Answer
associative
- 23Compared with languages such as SML, OCaml, and Haskell, scripting languages tend to play fast and loose with_____.
Hint
The issue concerns whether values are strings, numbers, or other categories.
Answer
types
- 24Scripting languages commonly use_____because modern hardware can compensate for some execution-speed loss.
Hint
These execute programs without first compiling them fully into machine code.
Answer
interpreters
- 25The earliest scripting-language example mentioned in the talk is_____.
Hint
It predates shell programming and AWK in the historical sequence.
Answer
SNOBOL
- 26JavaScript began in 1995 and became the dominant scripting language, especially on the_____.
Hint
Think of the platform accessed through browsers.
Answer
Web
- 27Functional programming research influenced mainstream languages through ideas such as recursion, garbage collection, type inference, and_____as first-class citizens.
Hint
These callable units can be treated like values in functional programming.
Answer
functions
- 28A language designed for a narrow and specific problem domain is called a_____language.
Hint
The term contrasts with general-purpose programming languages.
Answer
domain-specific
- 29A domain-specific language does not necessarily need to be_____complete.
Hint
This property concerns whether the language can simulate arbitrary computation.
Answer
Turing
- 30AWK was developed from experience with the UNIX_____.
Hint
This command environment was useful but not very good for numerical work.
Answer
shell
- 31AWK was created through the collaboration of Al Aho, Peter Weinberger, and Brian_____.
Hint
The speaker is one of the three people named.
Answer
Kernighan
- 32Al Aho contributed an interest in regular expressions, while Peter Weinberger contributed an interest in_____kinds of applications.
Hint
These applications organize and retrieve structured information.
Answer
database
- 33AWK was intended for simple one-_____programs.
Hint
The goal was to express a task in a single line of code.
Answer
liner
- 34Finding all volcanic eruptions with magnitude greater than 6 illustrates AWK's use for data_____.
Hint
This operation keeps records that satisfy a condition.
Answer
selection
- 35AWK's central notational paradigm is the_____-action structure.
Hint
A test is paired with an operation performed when the test matches.
Answer
pattern
- 36In grep, the pattern is a regular expression and the action is to_____the matching input.
Hint
The result displays records that satisfy the expression.
Answer
print
- 37AWK automates processing through three nested loops over files, lines, and matching_____.
Hint
The final loop checks the conditions associated with actions.
Answer
patterns
- 38AWK automatically reads input and splits each line into_____.
Hint
These are the individual pieces of a record, such as the first or second item.
Answer
fields
- 39AWK variables can contain either strings or numbers because the language uses flexible, largely_____typing.
Hint
The programmer does not need to initialize a fixed type for each variable.
Answer
dynamic
- 40An AWK action with no pattern is executed on_____input line.
Hint
Without a condition, the action applies universally.
Answer
every
- 41The speaker describes the associative array as the most useful single_____structure.
Hint
It is a mechanism for organizing collections of related values.
Answer
data
- 42Linear programming seeks variable values that satisfy constraints while minimizing or maximizing an_____function.
Hint
This function expresses the quantity to optimize.
Answer
objective
- 43When constraints and the objective are linear, the problem is classified as_____programming.
Hint
This is the standard optimization category described.
Answer
linear
- 44AMPL lets users describe optimization problems using notation convenient for people familiar with basic_____notation.
Hint
The notation resembles algebra written on a board.
Answer
mathematical
- 45AMPL combines a model description with data for a specific instance and sends the result to an optimization_____.
Hint
This program computes the optimal solution.
Answer
solver
- 46The diet problem seeks a food plan that supplies enough nutrients, avoids excessive amounts, and minimizes_____.
Hint
The university wants to keep people alive as cheaply as possible.
Answer
cost
- 47In the diet problem, the amount of each nutrient in each food is represented by a_____-dimensional array.
Hint
The array varies over both foods and nutrients.
Answer
two
- 48AMPL is fundamentally a_____language because it describes what problem to solve without specifying the computational process.
Hint
It states the desired model and relationships rather than an algorithm of execution.
Answer
declarative
- 49Industrial linear-programming models may have thousands of rows and columns but are typically very_____matrices.
Hint
Most entries are zero, so the density is far below one percent.
Answer
sparse
- 50AMPL includes a separate data specification language because the same model can be applied to different_____instances.
Hint
The model stays general while the actual inputs vary.
Answer
specific
- 51Adding the word integer changes an AMPL model so that the solver seeks an_____solution.
Hint
This prevents fractional quantities such as forty-six and two-thirds packages.
Answer
integer
- 52Integer linear programming is described as a much harder problem because it is_____-complete.
Hint
This is the computational-complexity classification mentioned in the talk.
Answer
NP
- 53The EQN language was designed to typeset_____material using notation based on how mathematicians speak expressions aloud.
Hint
It handled expressions such as 'x sub i equals pi.'
Answer
mathematical
- 54EQN processed mathematical input through a Unix_____that fed its output into a program handling ordinary text.
Hint
This mechanism connects separate programs so one program's output becomes another's input.
Answer
pipeline
- 55The first Unix machine mentioned had only 64_____bytes of memory.
Hint
The speaker contrasts this unit with M and G.
Answer
K
- 56The mathematics mode in TeX derives from the basic idea introduced by_____.
Hint
This was the earlier Unix document-preparation language.
Answer
EQN
- 57EQN was easy enough to teach to Bell Labs typists with no mathematical background in about_____.
Hint
The instruction period was very short.
Answer
an hour
- 58EQN's implementation used YACC, a_____generator.
Hint
This tool converts a grammar into a program that recognizes the language.
Answer
parser
- 59Pic was designed to specify textual descriptions of_____drawings such as flowcharts and organization charts.
Hint
The drawings consist primarily of lines, boxes, and related shapes.
Answer
line
- 60Pic converted drawing descriptions into_____commands that produced the final formatted picture.
Hint
This was the document-formatting system used in the pipeline.
Answer
Troff
- 61Adding a conditional to the Pic description made it easy to draw every fourth vertical line when illustrating waveform_____.
Hint
The vertical marks indicate selected points on a waveform.
Answer
sampling
- 62The language Grap generated graphs by converting data into Pic, which then generated_____input.
Hint
Pic served as the intermediate drawing language.
Answer
Troff
- 63A language is more likely to succeed when its notation solves a problem people care about while remaining easy enough to_____.
Hint
The issue is the effort required to express programs in the language.
Answer
write
- 64Languages whose syntax resembles familiar C syntax are described as culturally_____.
Hint
Familiarity makes programmers more willing to try the language.
Answer
compatible
- 65A language is environmentally compatible when it fits existing tools, libraries, operating systems, and ways of_____.
Hint
The phrase concerns avoiding a completely new development environment.
Answer
doing business
- 66C++ succeeded partly because it fit naturally into the existing_____ecosystem.
Hint
The language was deliberately designed to remain close to its predecessor.
Answer
C
- 67The speaker argues that open-source status is increasingly important because users can invest in improving a language without first having to_____for it.
Hint
This is the financial barrier removed by open-source software.
Answer
pay
- 68JavaScript outperformed Java in browsers partly because JavaScript source could be sent directly, without first sending a_____result.
Hint
Java required an additional translation step before deployment.
Answer
compiled
- 69C benefited from good timing by gaining renewed use with minicomputers, workstations, PCs, and_____systems.
Hint
These are specialized systems built into devices.
Answer
embedded
- 70Languages can fail when the application_____they serve disappears, as happened with many Troff-related tools.
Hint
This is the specialized area in which a language has a role.
Answer
domain
- 71Languages may also fail because they become too large, complicated, slow, or_____.
Hint
Arriving after the relevant opportunity has passed is one possible failure mode.
Answer
late
- 72The speaker recommends beginning language-design projects with a small_____-specific language rather than attempting to build the next C++.
Hint
Focus on a narrow task instead of every possible programming problem.
Answer
domain
- 73When a language accumulates loops, conditionals, and other later additions, it may lose its original conceptual_____.
Hint
This term refers to the cleanliness and coherence of the original design.
Answer
integrity
- 74The talk concludes that most languages do not disappear completely; instead, they often_____to thrive as their user populations shrink.
Hint
This phrase describes decline without total extinction.
Answer
fail

Ask anything
We've read this whole study set, so questions about it get the best answers.