3 ms·
The story starts with inconsistently formatted stream of text data and ends with nicely formatted binary data. Where does she get this nice data, where integer
by wodenokoto 7y ago
The story starts with inconsistently formatted stream of text data and ends with nicely formatted binary data.
Where does she get this nice data, where integers are integers and fields have nice names?
- kd5bjo 7y agoAlso, how does reading the data from the original source solve the business need of verifying that the newspaper included the information in the agreed-upon place in the print edition?
- jt2190 7y agoYeah, I think that the newspaper example obscured her larger point that converting machine-readable data into human-readable data and then using text parsing is both error-prone and unnecessary compared to just using tools that work directly with the machine-readable data. Edit: The meat of the article: > This gets into a whole thing I call "scripter mentality". It seems like some people would rather call (say) tcpdump and parse the results instead of writing their own little program which uses libpcap. Calling tcpdump means you have to do the pipe, fork, dup2, exec, parse thing. Using libpcap means you just have to deal with a stream of data arriving that you'd have to chew on anyway. Edit 2: “Scripter” here refers to operating on text files. The Rule of Composition [1] encourages the use of text processing, for example: > Text streams are to Unix tools as messages are to objects in an object-oriented setting. The simplicity of the text-stream interface enforces the encapsulation of the tools. More elaborate forms of inter-process communication, such as remote procedure calls, show a tendency to involve programs with each others' internals too much. [1] The Art of Unix Programming: http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2877684 http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id...
- eridius 7y agoThe binary data at the end is a different story than the text data at the beginning.