Check yourself
' \
+ f'{caret_token}{caret_token}{answer_block_contents}
Figure {}'.format( + self._refs.get(label).get('ref') + ) + caption_line = None for line in block_contents.strip().split("\n"): @@ -34,7 +46,7 @@ def _figure_block(self, matchobj): if not line.startswith("\\includegraphics"): line = get_text_in_brackets(line) images.append(get_text_in_brackets(line)) - elif line.startswith("\\caption"): + elif "\\caption" in line: if '}' in line: caption += get_text_in_brackets(line) else: @@ -59,9 +71,15 @@ def _figure_block(self, matchobj): markdown_images.append( "".format(caption, image) ) - caret_token = self._caret_token - return f'{self._caret_token.join(markdown_images)}{caret_token}{caret_token}**{caption}**' + caption = caption.replace("**", "").strip() + + if markdown_images: + return f'{self._caret_token.join(markdown_images)}{caret_token}{caret_token}**{caption}**' + + block_contents = re.sub(r"\\caption{(.*?)}", r"", block_contents, flags=re.DOTALL + re.VERBOSE) + + return f'{block_contents}{caret_token}**
{caption}
**{caret_token}' def convert(self): output = self.str diff --git a/converter/markdown/ignore.py b/converter/markdown/ignore.py index 2144efa5..26e50872 100644 --- a/converter/markdown/ignore.py +++ b/converter/markdown/ignore.py @@ -37,10 +37,29 @@ def make_block(self, group): def convert(self): output = self.str - output = self.remove_chars(output, "\\index{") - output = self.remove_chars(output, "\\label{") + output = re.sub(r"\\index\n{(.*?)}", r"\\index{\1}", output) output = self.remove_chars(output, "\\vspace{") + output = self.remove_chars(output, "\\index{") + output = re.sub(r"\\textit{.*?}", "", output) output = re.sub(r"\\noindent", "", output) + output = re.sub(r"\\bigconcepts", "", output) + output = re.sub(r"\\prereqs?", "", output) + output = re.sub(r"\\relax", "", output) + output = re.sub(r"\\vfill", "", output) + output = re.sub(r"\\indent", "", output) + output = re.sub(r"\\pitfallicon", "", output) + output = re.sub(r"\\fallaciesandpitfalls", "", output) + output = re.sub(r"\\makebox\[.*?\]{}", "Figure {}.{}'.format( self._chapter_num, self._figure_counter + self._figure_counter_offset ) if self._refs.get(label, {}): - caption = '**Figure {}**'.format( + caption = '**
Figure {}'.format( self._refs.get(label).get('ref') ) caret_token = self._caret_token - return f"{caret_token}{caption}{caret_token}{content}" + return f"{caret_token}{caption}: {content}
**{caret_token}" def convert(self): self.images.clear() pdfs = filter(lambda img: img.endswith('.pdf'), self.images) - return picfigure_re.sub(self.make_block, self.str), list(pdfs), self._figure_counter + out = self.str + search_str = "\\picfigure" + pos = out.find(search_str) + while pos != -1: + matches, index = match_elements(out[pos + len(search_str):], 3) + start = out[0:pos] + end_pos = pos + len(search_str) + 1 + index + end = out[end_pos:] + out = start + self.make_block( + matches[0], matches[1], matches[2] + ) + end + pos = out.find(search_str, end_pos + 1) + return out, list(pdfs), self._figure_counter diff --git a/converter/markdown/pitfall.py b/converter/markdown/pitfall.py index 2283f764..bbcb8069 100644 --- a/converter/markdown/pitfall.py +++ b/converter/markdown/pitfall.py @@ -13,6 +13,7 @@ def __init__(self, latex_str, caret_token): def make_block(self, matchobj): block_contents = matchobj.group('block_contents') block_contents = self.to_paragraph(block_contents) + block_contents = block_contents.replace('\n', ' ') title = matchobj.group('title') title = self.to_paragraph(title) caret_token = self._caret_token diff --git a/converter/markdown/quotation.py b/converter/markdown/quotation.py index 4baa00c5..b5b664e8 100644 --- a/converter/markdown/quotation.py +++ b/converter/markdown/quotation.py @@ -1,5 +1,6 @@ import re +from converter.markdown.match_elements import match_elements from converter.markdown.text_as_paragraph import TextAsParagraph @@ -7,20 +8,19 @@ class Quotation(TextAsParagraph): def __init__(self, latex_str, caret_token): super().__init__(latex_str, caret_token) - self._makequotation_re = re.compile(r"""\\makequotation{(?PFigure {}.{}: '.format( self._chapter_num, self._figure_counter + self._figure_counter_offset ) if self._refs.get(label, {}): - caption = '**Figure {}: '.format( + caption = '**
Figure {}: '.format( self._refs.get(label).get('ref') ) @@ -51,7 +51,9 @@ def remove_matched_token(self, output, chars): caret_token = self._caret_token content = output[pos + token_len:index - 1] content = content.strip() - output = output[0:pos] + content + "**" + caret_token + output[index + 1:] + content = re.sub(r"\\{", r"{", content) + content = re.sub(r"\\}", r"}", content) + output = output[0:pos] + content + "
**" + caret_token + output[index + 1:] break else: level += 1 @@ -63,6 +65,7 @@ def convert(self): output = self.str output = table_re.sub(self.make_block, output) + output = re.sub(r"\\protect\\index{.*?}%?", "", output) for token in self._matches: output = self.remove_matched_token(output, token) diff --git a/converter/markdown/tabular.py b/converter/markdown/tabular.py index d4b750f7..07f620fd 100644 --- a/converter/markdown/tabular.py +++ b/converter/markdown/tabular.py @@ -9,6 +9,9 @@ class Tabular(TextAsParagraph): def __init__(self, latex_str, caret_token): super().__init__(latex_str, caret_token) + self._graphics_re = re.compile(r"\\includegraphics(\[.*?]){(.*?)}", + flags=re.DOTALL + re.VERBOSE) + self._table_re = re.compile(r"""\\begin{(?PCheck yourself
-True or False: User stories on 3x5 cards in BDD play the same role as design requirements in plan-and-document.
-Check yourself
True.
Check yourself
- Suppose you mix **Enumerable** into a class **Foo** that does not
- provide the **each** method. What error will be raised when you
- call **Foo.new.map { |elt| puts elt }**?
- Check yourself
The **map** method in **Enumerable** will attempt to call **each** on its receiver, but since the new **Foo** object doesn't define **each**, Ruby will raise an Undefined Method error.
Figure 1.1: a) Study of software projects found that 53% of projects exceeding their budgets by a factor of 2.9 and overshot their schedule by a factor of 3.2 and another 31% of software projects were cancelled before completion (standish95). The estimated annual cost in the United States for such software projects was \$100B. b) Survey of members of the British Computer Society found that only 130 of 1027 projects met their schedule and budget. Half of all projects were maintenance or data conversion projects and half new development projects, but the successful projects divided into 127 of the former and just 3 of the latter (taylor00). c) Survey of 250 large projects, each with the equivalent of more than a million lines of C code, found similarly disappointing results (Jones04). d) Survey listing just the large examples of 50,000 projects, in that they cost at least \$10M in development (standish13). It has the most dismal outcomes, suggesting that HealthCare.gov had just a 10% chance of success.
** \ No newline at end of file diff --git a/tests/unit/cases/href.md b/tests/unit/cases/href.md index af79e25d..b969236f 100644 --- a/tests/unit/cases/href.md +++ b/tests/unit/cases/href.md @@ -1 +1 @@ -If you have additional comments or ideas about the text, please send them to: [mailto:feedback@greenteapress.com](feedback@greenteapress.com). \ No newline at end of file +Despite design patterns' popularity as a tool, they have been the subject of some critique; for example, Peter Norvig, currently Google's Director of Research, [has argued](http://www.norvig.com/design-patterns) that some design patterns just compensate for deficiencies in statically-typed programming languages such as C++ and Java \ No newline at end of file diff --git a/tests/unit/cases/href.tex b/tests/unit/cases/href.tex index 4c90b312..74c7ba8f 100644 --- a/tests/unit/cases/href.tex +++ b/tests/unit/cases/href.tex @@ -1 +1,6 @@ -If you have additional comments or ideas about the text, please send them to: \href{mailto:feedback@greenteapress.com}{\tt feedback@greenteapress.com}. +Despite design patterns' popularity as a tool, +they have been the subject of some critique; for example, Peter +Norvig, currently Google's Director of Research, +\href{http://www.norvig.com/design-patterns}{has argued} that some design +patterns just compensate for deficiencies in statically-typed +programming languages such as C++ and Java \ No newline at end of file diff --git a/tests/unit/cases/href_simple.md b/tests/unit/cases/href_simple.md index c5a589f6..b969236f 100644 --- a/tests/unit/cases/href_simple.md +++ b/tests/unit/cases/href_simple.md @@ -1 +1 @@ -If you have additional comments or ideas about the text, please send them to: [mailto:feedback@greenteapress.com](feedback@greenteapress.com). +Despite design patterns' popularity as a tool, they have been the subject of some critique; for example, Peter Norvig, currently Google's Director of Research, [has argued](http://www.norvig.com/design-patterns) that some design patterns just compensate for deficiencies in statically-typed programming languages such as C++ and Java \ No newline at end of file diff --git a/tests/unit/cases/href_simple.tex b/tests/unit/cases/href_simple.tex index 80d965e2..74c7ba8f 100644 --- a/tests/unit/cases/href_simple.tex +++ b/tests/unit/cases/href_simple.tex @@ -1 +1,6 @@ -If you have additional comments or ideas about the text, please send them to: \href{mailto:feedback@greenteapress.com}{feedback@greenteapress.com}. +Despite design patterns' popularity as a tool, +they have been the subject of some critique; for example, Peter +Norvig, currently Google's Director of Research, +\href{http://www.norvig.com/design-patterns}{has argued} that some design +patterns just compensate for deficiencies in statically-typed +programming languages such as C++ and Java \ No newline at end of file diff --git a/tests/unit/cases/html.md b/tests/unit/cases/html.md index 9973cfcd..17766062 100644 --- a/tests/unit/cases/html.md +++ b/tests/unit/cases/html.md @@ -1,27 +1,29 @@ -In contrast to a native app, which is designed to render a particular user interface associated with only one SaaS service, we can think of a desktop or mobile browser as a *universal client*, because any site the browser visits can deliver all the information necessary to render that site's user interface. Both browsers and native apps are used by millions of people, so we call them *production clients*. +In contrast to a native app, which is designed to render a particular user interface associated with only one SaaS service, we can think of a desktop or mobile browser as a universal client, because any site the browser visits can deliver all the information necessary to render that site's user interface. Both browsers and native apps are used by millions of people, so we call them production clients. Indeed, modern practice suggests that even when creating a user-facing SaaS app designed to be used via a browser, we should design the app as a collection of resources accessible via RESTful APIs, but then provide a Web browser-based user interface “on top of” those API calls. -If the Web browser is the universal client, _**HTML**_, the HyperText Markup Language, is the universal language. A _**markup language**_ combines text with markup (annotations about the text) in a way that makes it easy to syntactically distinguish the two. +If the Web browser is the universal client, ___HTML___, the HyperText Markup Language, is the universal language. A ___markup language___ combines text with markup (annotations about the text) in a way that makes it easy to syntactically distinguish the two. -HTML consists of a hierarchy of nested elements, each of which consists of an opening tag such as ****, a content part (in some cases), and a closing tag such as **
**. Most opening tags can also have attributes, as in **$<$a href="http://..."$>$**. Some tags that don't have a content part are self-closing, such as **Figure 1.1: A few CSS constructs, including those explained in Screencast css-intro. The top table shows some CSS selectors, which identify the elements to be styled; the bottom table shows a few of the many attributes, whose names are usually self-explanatory, and example values they can be assigned. Not all attributes are valid on all elements.
** Using this new information, Figure fig:10k expands steps 2 and 3 from the previous section's summary of how SaaS works.  -**Figure 1.3** -SaaS from 10,000 feet. Compared to Figure fig:50k, step 2 has been expanded to describe the content returned by the Web server, and step 3 has been expanded to describe the role of CSS in how the Web browser renders the content. +**Figure 1.3: SaaS from 10,000 feet. Compared to Figure fig:50k, step 2 has been expanded to describe the content returned by the Web server, and step 3 has been expanded to describe the role of CSS in how the Web browser renders the content.
** + CSS provides for sophisticated layout behaviors, but can be tricky to use in 2 regards. First, some background in layout and graphic design is helpful in deciding how to style site elements - spacing, typography, color palette. Second, even if you know what you want the site to look like, it can be tricky to write the necessary CSS to achieve complex layouts, in which elements may "float" to the far left or far right of the page while text flows around them, or rearrange themselves responsively when the screen geometry changes (browser window resized, phone rotates) to provide a defensible user experience on both desktop and mobile devices. @@ -83,19 +85,19 @@ JavaScript - more sophisticated behaviors such as animations, collapsing menus, Rather than delving deeply into the aesthetics of graphic design, our goal for you as a well-rounded full-stack developer is that you should know how to provide well-structured pages with proper element nesting and clean CSS class tags, for two reasons. First, with a good front-end framework, just doing this will be enough to provide an AURA site (aesthetic, usable, responsive, accessible). Second, a clean site layout and classing allows designers to refine, customize, or work separately on the site's visual appearance. There are 2 principles to using front-end frameworks successfully in this way: semantic styling and grid layout. Semantic styling means First, think of your page's visual elements not in terms of their visual characteristics ("This message should appear in a red box with bold text") but in terms of their function ("This message signals an error", "This text is the page title", "This list of items is a menu of navigation options"). A good front-end framework names its styles according to the function they enable an element to fulfill, rather than according to their visual appearance. - ## SPA or MPA? SPA vs MPA: Are you building something that's more like a website (transactional? lots of different possible screens? user navigates large amounts of data in a typical session? multi-screen workflows?) or more like a desktop app (few screens? continuous interaction vs transactional, eg something like Pivotal Tracker? user navigates modest amounts of data in a typical session? short workflows or interactions typically limited to 1 screen?) If it's primarily a website, use HTML5 + jQuery where needed. If primarily an app, may be better off using a framework. [Need a checklist like "when to use agile" for "when to build a SPA vs MPA"]. Examples of popular SPAs: Gmail, Google Docs, Pivotal Tracker. Popular MPAs: IMDb, Amazon.com, Google Search. *MPA vs SPA is primarily a user experience question, not a technical one!* + --- -**Summary** +Summary -* An _**HTML**_ (HyperText Markup Language) document consists of a hierarchically nested collection of elements. Each element begins with a _**tag**_ inCheck yourself
- True or false: every HTML element must have an ID.
-
- Check yourself
False---the ID is optional, though must be unique if provided.
Check yourself
- Write down a CSS selector that will select *only* the word
- *Mondays* for styling.
- Check yourself
Three possibilities, from most specific to least specific, are: **#i span**, **p.x span**, and **.x span**. Other selectors are possible but redundant or over-constrained; for example, **p#i span** and **p#i.x span** are redundant with respect to this HTML snippet since at most one element can have the ID **i**.
Check yourself
- In Self-Check ex:css1, why are **span**
- and **p span** *not* valid answers?
- Check yourself
Both of those selector also match *Tuesdays*, which is a **span** inside a **p**.
Check yourself
- What is the most common way to associate a CSS stylesheet with an HTML
- or HTML document? (HINT: refer to the earlier screencast example.)
+Within the HEAD element of the HTML or HTML document, include a LINK element with at least the following three attributes: REL="STYLESHEET", TYPE="text/css", and HREF="uri", where uri is the full or partial URI of the stylesheet. That is, the stylesheet must be accessible as a resource named by a URI.
Figure 1.1: Screen image of the UI of the Pivotal Tracker service.
** +  -**Figure 1.2** -Storyboard of UI for searching The Movie Database. \ No newline at end of file +**Figure 1.2: Storyboard of UI for searching The Movie Database.
** \ No newline at end of file diff --git a/tests/unit/cases/pitfall.md b/tests/unit/cases/pitfall.md index 04b8105a..f94ea463 100644 --- a/tests/unit/cases/pitfall.md +++ b/tests/unit/cases/pitfall.md @@ -1,2 +1,2 @@ ## Customers who confuse mock-ups with completed features. -As a developer, this pitfall may seem ridiculous to you. But nontechnical customers sometimes have difficulty distinguishing a highly polished digital mock-up from a working feature! The solution is simple: use paper-and-pencil techniques such as hand-drawn sketches and storyboards to reach agreement with the customer---there can be no doubt that such Lo-Fi mockups represent *proposed* rather than implemented functionality. \ No newline at end of file +As a developer, this pitfall may seem ridiculous to you. But nontechnical customers sometimes have difficulty distinguishing a highly polished digital mock-up from a working feature! The solution is simple: use paper-and-pencil techniques such as hand-drawn sketches and storyboards to reach agreement with the customer---there can be no doubt that such Lo-Fi mockups represent proposed rather than implemented functionality. \ No newline at end of file diff --git a/tests/unit/cases/quote.md b/tests/unit/cases/quote.md index 7792643b..3f38c2b6 100644 --- a/tests/unit/cases/quote.md +++ b/tests/unit/cases/quote.md @@ -1,3 +1 @@ -> A word is said to be a “doubloon” if every letter that appears in the word appears exactly twice. -> Write a method called `isDoubloon` that takes a string and checks whether it is a doubloon. -> To ignore case, invoke the `toLowerCase` method before checking. \ No newline at end of file +> A word is said to be a “doubloon” if every letter that appears in the word appears exactly twice. Write a method called `isDoubloon` that takes a string and checks whether it is a doubloon. To ignore case, invoke the `toLowerCase` method before checking. \ No newline at end of file diff --git a/tests/unit/cases/saas.md b/tests/unit/cases/saas.md index ee2a3a56..784b91ce 100644 --- a/tests/unit/cases/saas.md +++ b/tests/unit/cases/saas.md @@ -1,23 +1,23 @@ ### Software as a Service -The power of SOA combined with the power of the Internet led to a special case of SOA with its own name: _**Software as a Service (SaaS)**_. It delivers software and data as a service over the Internet, usually via a thin program such as a browser that runs on local client devices instead as an application binary that must be installed and runs wholly on that device. Examples that many use every day include searching, social networking, and watching videos. The advantages for the customer and for the software developer are widely touted: +The power of SOA combined with the power of the Internet led to a special case of SOA with its own name: ___Software as a Service (SaaS)___. It delivers software and data as a service over the Internet, usually via a thin program such as a browser that runs on local client devices instead as an application binary that must be installed and runs wholly on that device. Examples that many use every day include searching, social networking, and watching videos. The advantages for the customer and for the software developer are widely touted: 1. Since customers do not need to install the application, they don't have to worry whether their hardware is the right brand or fast enough, nor whether they have the correct version of the operating system. -1. The data associated with the service is generally kept with the service, so customers need not worry about backing it up, losing it due to a local hardware malfunction, or even losing the whole device, such as a phone or tablet. -1. When a group of users wants to collectively interact with the same data, SaaS is a natural vehicle. -1. When data is large and/or updated frequently, it may make more sense to centralize data and offer remote access via SaaS. -1. Only a single copy of the server software runs in a uniform, tightly-controlled hardware and operating system environment selected by the developer, which avoids the compatibility hassles of distributing binaries that must run on wide-ranging computers and operating systems. In addition, developers can test new versions of the application on a small fraction of the real customers temporarily without disturbing most customers. (If the SaaS client runs in a browser, there still are compatibility challenges, which we describe in Chapter chap:arch.) +2. The data associated with the service is generally kept with the service, so customers need not worry about backing it up, losing it due to a local hardware malfunction, or even losing the whole device, such as a phone or tablet. +3. When a group of users wants to collectively interact with the same data, SaaS is a natural vehicle. +4. When data is large and/or updated frequently, it may make more sense to centralize data and offer remote access via SaaS. +5. Only a single copy of the server software runs in a uniform, tightly-controlled hardware and operating system environment selected by the developer, which avoids the compatibility hassles of distributing binaries that must run on wide-ranging computers and operating systems. In addition, developers can test new versions of the application on a small fraction of the real customers temporarily without disturbing most customers. (If the SaaS client runs in a browser, there still are compatibility challenges, which we describe in Chapter chap:arch.) |||info **SaaS: Innovate or Die?** Lest you think the perceived need to improve a successful service is just software engineering paranoia, the most popular search engine used to be AltaVista and the most popular social networking site used to be MySpace. ||| -1. SaaS companies compete regularly on bringing out new features to help ensure that their customers do not abandon them for a competitor who offers a better service. -1. Since only developers have a copy of the software, they can upgrade the software and underlying hardware frequently as long as they don't violate the external application program interfaces (API). Moreover, developers don't need to annoy users with the seemingly endless requests for permission to upgrade their applications. +6. SaaS companies compete regularly on bringing out new features to help ensure that their customers do not abandon them for a competitor who offers a better service. +7. Since only developers have a copy of the software, they can upgrade the software and underlying hardware frequently as long as they don't violate the external application program interfaces (API). Moreover, developers don't need to annoy users with the seemingly endless requests for permission to upgrade their applications. @@ -25,7 +25,7 @@ Combining the advantages to the customer and the developer together explains why file content -**Figure 1.1: Examples of SaaS programming frameworks and the programming languages they are written in** +**Figure 1.1: Examples of SaaS programming frameworks and the programming languages they are written in
** @@ -34,7 +34,7 @@ Unsurprisingly, given the popularity of SaaS, Figure fig:SaaS_frameworks lists t Ruby is typical of modern scripting languages in including automatic memory management and dynamic typing. By including important advances in programming languages, Ruby goes beyond languages like Perl in supporting multiple programming paradigms such as object oriented and functional programming. -Useful additional features that help productivity via reuse include _**mix-ins**_, which collect related behaviors and make it easy to add them to many different classes, and _**metaprogramming**_, which allows Ruby programs to synthesize code at runtime. Reuse is also enhanced with Ruby's support for _**closures**_ via _**blocks**_ and _**yield**_. Chapter chap:ruby_intro is a short description of Ruby for those who already know Java, and Chapter chap:rails_intro introduces Rails. +Useful additional features that help productivity via reuse include ___mix-ins___, which collect related behaviors and make it easy to add them to many different classes, and ___metaprogramming___, which allows Ruby programs to synthesize code at runtime. Reuse is also enhanced with Ruby's support for ___closures___ via ___blocks___ and ___yield___. Chapter chap:ruby_intro is a short description of Ruby for those who already know Java, and Chapter chap:rails_intro introduces Rails. In addition to our view of Rails being technically superior for Agile and SaaS, Ruby and Rails are widely used. For example, Ruby routinely appears among top 10 most popular programming languages. A well-known SaaS app associated with Rails is Twitter, which began as a Rails app in 2006 and grew from 20,000 tweets per day in 2007 to 200,000,000 in 2011, during which time other frameworks replaced various parts of it. @@ -44,37 +44,38 @@ Note that frequent upgrades of SaaS---due to only having a single copy of the so --- -**Summary:** _**Software as a Service (SaaS)**_ is attractive to both customers and providers because the universal client (the Web browser) makes it easier for customers to use the service and the single version of the software at a centralized site makes it easier for the provider to deliver and improve the service. Given the ability and desire to frequently upgrade SaaS, the Agile software development process is popular for SaaS, and so there are many frameworks to support Agile and SaaS. This book uses Ruby on Rails. +Summary: ___Software as a Service (SaaS)___ is attractive to both customers and providers because the universal client (the Web browser) makes it easier for customers to use the service and the single version of the software at a centralized site makes it easier for the provider to deliver and improve the service. Given the ability and desire to frequently upgrade SaaS, the Agile software development process is popular for SaaS, and so there are many frameworks to support Agile and SaaS. This book uses Ruby on Rails. --- |||challenge +Which of the examples of Google SaaS apps---Search, Maps, News, Gmail, Calendar, YouTube, and Documents---is the best match to each of the six arguments given in this section for SaaS, reproduced below. +Check yourself
-Which of the examples of Google SaaS apps---Search, Maps, News, Gmail, Calendar, YouTube, and Documents---is the *best* match to each of the six arguments given in this section for SaaS, reproduced below.
- Check yourself
While you can argue the mappings, below is our answer. (Note that we cheated and put some apps in multiple categories)
-
+While you can argue the mappings, below is our answer. (Note that we cheated and put some apps in multiple categories)
1. No user installation: Documents
-1. Can't lose data: Gmail, Calendar.
-1. Users cooperating: Documents.
-1. Large/changing datasets: Search, Maps, News, and YouTube.
-1. Software centralized in single environment: Search.
-1. No field upgrades when improve app: Documents.
+2. Can't lose data: Gmail, Calendar.
+3. Users cooperating: Documents.
+4. Large/changing datasets: Search, Maps, News, and YouTube.
+5. Software centralized in single environment: Search.
+6. No field upgrades when improve app: Documents.
-
Check yourself
- True or False: If you are using the Agile development process to develop SaaS apps, you could use Python and Django or languages based on the Microsoft's .NET framework and ASP.NET instead of Ruby and Rails.
- Check yourself
True. Programming frameworks for Agile and SaaS include Django and ASP.NET.
Figure 1.1: The Spiral lifecycle combines Waterfall with prototyping. It starts at the center, with each iteration around the spiral going through the four phases and resulting in a revised prototype until the product is ready for release.
** + Rather than document all the requirements at the beginning, as in the Waterfall model, the requirement documents are developed across the iteration as they are needed and evolve with the project. Iterations involve the customer before the product is completed, which reduces chances of misunderstandings. However, as originally envisioned, these iterations were 6 to 24 months long, so there is plenty of time for customers to change their minds during an iteration! Thus, Spiral still relies on planning and extensive documentation, but the plan is expected to evolve on each iteration. |||info -**Big Design Up Front** , abbreviated _**BDUF**_, is a name some use for software processes like Waterfall, Spiral, and RUP that depend on extensive planning and documentation. They are also known variously as _**heavyweight**_, _**plan-driven**_, _**disciplined**_, or _**structured**_ processes. +**Big Design Up Front** , abbreviated ___BDUF___, is a name some use for software processes like Waterfall, Spiral, and RUP that depend on extensive planning and documentation. They are also known variously as ___heavyweight___, ___plan-driven___, ___disciplined___, or ___structured___ processes. ||| -Given the importance of software development, many variations of Plan-and-Document methodologies were proposed beyond these two. A recent one is called the _**Rational Unified Process**_ (_**RUP**_) (Kruchten03), which combines features of both Waterfall and Spiral lifecycles as well standards for diagrams and documentation. We'll use RUP as a representative of the latest thinking in Plan-and-Document lifecycles. Unlike Waterfall and Spiral, it is more closely allied to business issues than to technical issues. +Given the importance of software development, many variations of Plan-and-Document methodologies were proposed beyond these two. A recent one is called the ___Rational Unified Process___ (___RUP___) (Kruchten03), which combines features of both Waterfall and Spiral lifecycles as well standards for diagrams and documentation. We'll use RUP as a representative of the latest thinking in Plan-and-Document lifecycles. Unlike Waterfall and Spiral, it is more closely allied to business issues than to technical issues. Like Waterfall and Spiral, RUP has phases: 1. Inception: makes the business case for the software and scopes the project to set the schedule and budget, which is used to judge progress and justify expenditures, and initial assessment of risks to schedule and budget. -1. Elaboration: works with stakeholders to identify use cases, designs a software architecture, sets the development plan, and builds an initial prototype. -1. Construction: codes and tests the product, resulting in the first external release. -1. Transition: moves the product from development to production in the real environment, including customer acceptance testing and user training. +2. Elaboration: works with stakeholders to identify use cases, designs a software architecture, sets the development plan, and builds an initial prototype. +3. Construction: codes and tests the product, resulting in the first external release. +4. Transition: moves the product from development to production in the real environment, including customer acceptance testing and user training. @@ -117,57 +119,58 @@ In addition to the dynamically changing phases of the project, RUP identifies si 1. Business Modeling -1. Requirements -1. Analysis and Design -1. Implementation -1. Test -1. Deployment +2. Requirements +3. Analysis and Design +4. Implementation +5. Test +6. Deployment These disciplines are more static than the phases, in that they nominally exist over the whole lifetime of the project. However, some disciplines get used more in earlier phases (like business modeling), some periodically throughout the process (like test), and some more towards the end (deployment). Figure fig:RUP shows the relationship of the phases and the disciplines, with the area indicating the amount of effort in each discipline over time.  -**Figure 1.2** -The Rational Unified Process lifecycle allows the project to have multiple iterations in each phase and identifies the skills needed by the project team, which vary in effort over time. RUP also has three “supporting disciplines” not shown in this figure: Configuration and Change Management, Project Management, and Environment. (Image from Wikipedia Commons by Dutchgilder.) +**Figure 1.2: The Rational Unified Process lifecycle allows the project to have multiple iterations in each phase and identifies the skills needed by the project team, which vary in effort over time. RUP also has three “supporting disciplines” not shown in this figure: Configuration and Change Management, Project Management, and Environment. (Image from Wikipedia Commons by Dutchgilder.)
** + An unfortunate downside to teaching a Plan-and-Document approach is that students may find software development tedious (Nawrocki02,Estler12). Given the importance of predictable software development, this is hardly a strong enough reason not to teach it; the good news is that there are alternatives that work just as well for many projects that are a better fit to the classroom, as we describe in the next section. --- -**Summary:** The basic *activities* of software engineering are the same in all the software development process or _**lifecycles**_, but their interaction over time relative to product releases differs among the models. The Waterfall lifecycle is characterized by much of the design being done in advance of coding, completing each phase before going on to the next one. The Spiral lifecycle iterates through all the development phases to produce prototypes, but like Waterfall, the customers may only get involved every 6 to 24 months. The more recent Rational Unified Process lifecycle includes phases, iterations, and prototypes, while identifying the people skills needed for the project. All rely on careful planning and thorough documentation, and all measure progress against a plan. +Summary: The basic activities of software engineering are the same in all the software development process or ___lifecycles___, but their interaction over time relative to product releases differs among the models. The Waterfall lifecycle is characterized by much of the design being done in advance of coding, completing each phase before going on to the next one. The Spiral lifecycle iterates through all the development phases to produce prototypes, but like Waterfall, the customers may only get involved every 6 to 24 months. The more recent Rational Unified Process lifecycle includes phases, iterations, and prototypes, while identifying the people skills needed for the project. All rely on careful planning and thorough documentation, and all measure progress against a plan. --- |||challenge +What are a major similarity and a major difference between processes like Spiral and RUP versus Waterfall? +Check yourself
- What are a major similarity and a major difference between processes like Spiral and RUP versus Waterfall?
- Check yourself
All rely on planning and documentation, but Spiral and RUP use iteration and prototypes to improve them over time versus a single long path to the product.
Check yourself
- What are the differences between the phases of these Plan-and-Document processes?
- Check yourself
Waterfall phases separate planning (requirements and architectural design) from implementation. Testing the product before release is next, followed by a separate operations phase. The Spiral phases are aimed at an iteration: set the goals for an iteration; explore alternatives; develop and verify the prototype for this iteration; and plan the next iteration. RUP phases are tied closer to business objectives: inception makes business case and sets schedule and budget; elaboration works with customers to build an initial prototype; construction builds and test the first version; and transition deploys the product.
Check yourself
- True or False: A big difference between Spiral and Agile development is building prototypes and interacting with customers during the process.
- Check yourself
False: Both build working but incomplete prototypes that the customer helps evaluate. The difference is that customers are involved every two weeks in Agile versus up to two years in with Spiral.
|||
diff --git a/tests/unit/cases/saas3.tex b/tests/unit/cases/saas3.tex
index 985d0d6e..021b5655 100644
--- a/tests/unit/cases/saas3.tex
+++ b/tests/unit/cases/saas3.tex
@@ -1,5 +1,5 @@
\makequotation{
-To me programming is more than an important practical art. It is also a gigantic undertaking in the foundations of knowledge.\\}{Grace Murray Hopper}
+To me programming is more than an important practical art. It is also a gigantic undertaking in the foundations of knowledge.}{Grace Murray Hopper}
\index{Software as a Service (SaaS)!beautiful \textit{vs.} legacy code|textbf}%
\begin{sidebargraphic}[-1in]{ch_backwards_forwards/figs/Hopper}{Grace Murray Hopper}
diff --git a/tests/unit/cases/screencast.md b/tests/unit/cases/screencast.md
index a660c6fc..07d4c671 100644
--- a/tests/unit/cases/screencast.md
+++ b/tests/unit/cases/screencast.md
@@ -5,7 +5,7 @@
-CSS uses _**selector notations**_ such as **div#***name* to indicate a **div** element whose **id** is *name* and **div.***name* to indicate a **div** element with class *name*. Only one element in an HTML document can have a given **id**, whereas many elements (even of different tag types) can share the same **class**. All three aspects of an element---its tag type, its **id** (if it has one), and its **class** attributes (if it has any)---can be used to identify an element as a candidate for visual formatting.
+CSS uses ___selector notations___ such as div#name to indicate a div element whose id is name and div.name to indicate a div element with class name. Only one element in an HTML document can have a given id, whereas many elements (even of different tag types) can share the same class. All three aspects of an element---its tag type, its id (if it has one), and its class attributes (if it has any)---can be used to identify an element as a candidate for visual formatting.
|||
-
-|||xdiscipline
-
-
-|||
-
+
-**David Patterson** recently retired from a 40-year career as a Professor of Computer Science at UC Berkeley. In the
\ No newline at end of file
+David Patterson recently retired from a 40-year career as a Professor of Computer Science at UC Berkeley. In the
diff --git a/tests/unit/cases/summary.md b/tests/unit/cases/summary.md
index e7ee8795..37a4ad36 100644
--- a/tests/unit/cases/summary.md
+++ b/tests/unit/cases/summary.md
@@ -1,4 +1,4 @@
---
-**Summary:** Following the Agile Manifesto's emphasis on customer cooperation over contracts, an Agile team's notion of “cost estimation” is therefore more about advising the client on what team size can provide the maximum efficiency, following Brooks's Law that there is a point of diminishing returns on team size (see Section sec:bdd_idea_FnP). The Agile team's goal in the scoping process is to identify that point, then ramp the team up to that size over time. Agile companies bid costs for time and materials based on short discussions with external customers. As we shall see in Section sec:BDD_P_and_D, this approach is in sharp contrast with companies that follow plan-and-document processes, which promise customers a set of features for an agreed upon cost by an agreed upon date.
+Summary: Following the Agile Manifesto's emphasis on customer cooperation over contracts, an Agile team's notion of “cost estimation” is therefore more about advising the client on what team size can provide the maximum efficiency, following Brooks's Law that there is a point of diminishing returns on team size (see Section sec:bdd_idea_FnP). The Agile team's goal in the scoping process is to identify that point, then ramp the team up to that size over time. Agile companies bid costs for time and materials based on short discussions with external customers. As we shall see in Section sec:BDD_P_and_D, this approach is in sharp contrast with companies that follow plan-and-document processes, which promise customers a set of features for an agreed upon cost by an agreed upon date.
---
\ No newline at end of file
diff --git a/tests/unit/cases/tablefigure.md b/tests/unit/cases/tablefigure.md
index bfcbf9be..6943a776 100644
--- a/tests/unit/cases/tablefigure.md
+++ b/tests/unit/cases/tablefigure.md
@@ -1,15 +1,15 @@
-We can therefore say that the expression **3+2** results in calling **Fixnum#+** on the receiver **3**.
+We can therefore say that the expression 3+2 results in calling Fixnum#+ on the receiver 3.
file content content
-**Figure 1.1: The first column is Ruby's syntactic sugar for common operations, the second column shows the explicit method call, and the third column shows how to perform the same method call using Ruby's **send**, which accepts either a string or (more idiomatically) a symbol for the method name.**
+**Figure 1.1: The first column is Ruby's syntactic sugar for common operations, the second column shows the explicit method call, and the third column shows how to perform the same method call using Ruby's send, which accepts either a string or (more idiomatically) a symbol for the method name.
** file content content -**Figure 1.2: Comparing Amazon.com and Healthcare.gov during its first three months. (Thorp13) After its stumbling start, the deadline was extended from December 15, 2013 to March 31, 2014, which explains the lower goal in customers per day in December. Note that availability for ACA does *not* include time for “scheduled maintenance,” which Amazon does include (Zients13). The error rate was for significant errors on the forms sent to insurance companies (Horsley13). The site was widely labeled by security experts as insecure, as the developers were under tremendous pressure to get proper functionality, and little attention was paid to security (Harrington13)** +**Figure 1.2: Comparing Amazon.com and Healthcare.gov during its first three months. (Thorp13) After its stumbling start, the deadline was extended from December 15, 2013 to March 31, 2014, which explains the lower goal in customers per day in December. Note that availability for ACA does not include time for “scheduled maintenance,” which Amazon does include (Zients13). The error rate was for significant errors on the forms sent to insurance companies (Horsley13). The site was widely labeled by security experts as insecure, as the developers were under tremendous pressure to get proper functionality, and little attention was paid to security (Harrington13)
** file content content -**Figure 1.3: Some common Ruby methods on collections. For those that expect a block, the “Block” column shows the number of arguments expected by the block; if blank, the method doesn't expect a block. For example, a call to **sort**, whose block expects 2 arguments, might look like: **c.sort { |a,b| a $<=>$ b }**. These methods all return a new object rather than modifying the receiver, but some methods also have a *destructive* variant ending in **!**, for example **sort!**, that modify their argument in place (and also return the new value). Use destructive methods with extreme care, if at all.** \ No newline at end of file +**Figure 1.3: Some common Ruby methods on collections. For those that expect a block, the “Block” column shows the number of arguments expected by the block; if blank, the method doesn't expect a block. For example, a call to sort, whose block expects 2 arguments, might look like: c.sort { |a,b| a $<=>$ b }. These methods all return a new object rather than modifying the receiver, but some methods also have a destructive variant ending in !, for example sort!, that modify their argument in place (and also return the new value). Use destructive methods with extreme care, if at all.
** diff --git a/tests/unit/cases/tabular.md b/tests/unit/cases/tabular.md index b23bd696..ee3059bf 100644 --- a/tests/unit/cases/tabular.md +++ b/tests/unit/cases/tabular.md @@ -3,23 +3,23 @@ |$2^4$|$2^3$|$2^2$|$2^1$|$2^0$| -|**Selector**|**What is selected**| +|Selector|What is selected| |-|-| -|**h1**|Any **h1** element| -|**div#message**|The **div** whose ID is **message**| -|**.red**|Any element with class **red**| -|**div.red, h1**|The **div** with class **red**, or any **h1**| -|**div#message h1**|An **h1** element that's a child of (inside
+|||
+
+
+> In programming, everything we do is a special case of something more general---and often we know it too quickly.
+>
+> __Alan Perlis__
+
+ End content
+
+
+
+|||xdiscipline
+**Vinton E. “Vint” Cerf (1943--) and Bob Kahn (1938--)** shared the 2004 Turing Award for their pioneering work on networking architecture and protocols, including TCP/IP.
+
+|||
+
+
+
+End content2
diff --git a/tests/unit/cases/turingwinner.tex b/tests/unit/cases/turingwinner.tex
new file mode 100644
index 00000000..3c216473
--- /dev/null
+++ b/tests/unit/cases/turingwinner.tex
@@ -0,0 +1,25 @@
+Hello content
+\turingwinner{perlis}{Alan Perlis (1922--1990)}%
+ {was the first recipient of the Turing Award (1966), conferred
+ for his influence on advanced programming languages and compilers.
+ In 1958 he helped design ALGOL,
+ which has influenced virtually every imperative programming language
+ including C and Java. To avoid FORTRAN's
+ syntactic and semantic problems, ALGOL was the first language
+ described in terms of a formal grammar, the eponymous
+ \w[Backus-Naur_Form]{Backus-Naur form} (named for Turing award
+ winner Jim Backus and his colleague Peter Naur).}%
+ {In programming, everything we do is a special case of
+ something more general---and often we know it too quickly.}{Alan
+ Perlis}
+End content
+
+\turingwinner{cerf_kahn}{Vinton E. ``Vint'' Cerf (1943--) and Bob Kahn
+(1938--)}%
+{shared the 2004 Turing Award for their pioneering work on networking
+architecture and protocols, including TCP/IP.}{}{}
+
+End content2
+
+
+
diff --git a/tests/unit/cases/verbatim.md b/tests/unit/cases/verbatim.md
index bd031650..25b6b3c5 100644
--- a/tests/unit/cases/verbatim.md
+++ b/tests/unit/cases/verbatim.md
@@ -12,9 +12,9 @@ public final class Integer extends Number implements Comparable