[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: The impact of data format selection on application develop
- From: Dimitre Novatchev <dnovatchev@gmail.com>
- To: Roger L Costello <costello@mitre.org>
- Date: Sun, 10 Jul 2022 11:02:25 -0700

> The book shows how programs written in little languages such as AWK, Lex, Yacc, pic (picture language), scatter (scatter plot language), troff, sed, can be independently developed and assembled via pipes
I have quite an experience with yacc and highly disagree with its classification as a "little language". One can only state this if they have seen just a simplified example of a tiny LR grammar and language that is input to yacc.
Try it on anything real, like the XPath 2.0 grammar, consisting of 209 rules, and you won't ever make such a statement.
Thanks, Dimitre Hi Folks,
Recently I have been reading a wonderful book titled "Little Languages and Tools". Its authors are Jon Bentley, Brian Kernighan, Paul Hudak, and others. The book shows how programs written in little languages such as AWK, Lex, Yacc, pic (picture language), scatter (scatter plot language), troff, sed, can be independently developed and assembled via pipes
scatter infile | pic | troff >outfile
Little languages provide a powerful way to quickly implement robust tools.
Reading the book made me keenly aware of one thing: The XML data format is complex! Compare the densely written 36-page XML specification (plus the 16-page namespace specification) to this three-sentence specification of a data format:
The data format consists of lines. Each line contains fields. Fields are separated by a delimiter (space, tab, comma, etc.).
You might argue that such a data format is too simple to be useful. Not so! Much data may be expressed using that data format: a list of data about persons (name, age, gender). A list of data about aircraft in the Boeing inventory (model, weight, wingspan, max speed). A list of data about wild flora in the Amazon rainforest (species, size, lethality). A list of data about books (title, author, publisher). The types of data amenable to that data format is virtually endless. For data items that aren't in that format, there are tools available for putting them into the format.
Simple data formats often spawn the development of powerful little tools. AWK is one such tool. With a line or two of AWK code you can quickly implement powerful data filters for transforming data in the above data format.
What is the role of XML as a data format? What is the role of very simple data formats such as the one above? The answer is not clear-cut in my mind. What does seem clear, however, is that choosing the right data format can have a significant impact on application development - on the ease of development, on the cognitive load it incurs on the developer and maintainer, on the ability to create independent tools that can be assembled in a pipeline.
"The important thing, as always, is to find a way of looking at the input data that makes it easy to lay out the program." ["Software Tools" by Brian Kernighan, p. 42]
Comments?
/Roger
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- To achieve the impossible dream, try going to sleep. ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- Sanity is madness put to good use. ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.

[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
 |
Atom 0.3 |
 |
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|