More on Backwards Compatibility

Esta entrada pretende complementar la broma sobre Backwards Compatibility. Comenzamos. En mi Biblia de cabecera, una Biblia Devocional de Estudio editada por La Liga Bíblica, se presenta el Santo Evangelio según San Mateo como un vínculo entre el Antiguo Testamento y el Nuevo Testamento. Señala, literalmente: “Podemos decir, entonces, que el primer libro del Nuevo Testamento se presenta ante nosotros como el evangelio que vincula cosas, que sirve de eslabón entre lo antiguo y lo nuevo”. Indica también que es San Mateo el evangelista que más referencia al Antiguo Testamento: “Para que se cumpliera lo dicho por los profetas”. Y además, siempre en la Biblia Devocional, el comentario sobre Mateo 4:17 comienza con: “Mateo escribió principalmente para lectores judíos”.

El énfasis del evangelio según San Mateo en ese vínculo entre lo antiguo y lo nuevo constituye tema de estudio en Teología. Ver, por ejemplo: “Law and Prophecy in Matthew’s Gospel: The Authority and Use of the Old Testament in the Gospel of St. Matthew”, por R. S. McConnell (Friedrich Reinhardt Kornmissionsverlag, Basel, 1969. Fr./ DM. 16.80.). De la entrada Gospel of Matthew en la Wikipedia destaco:

“Most commentators seem to agree that Matthew, alone among the gospels, alternates five blocks of narrative with five of discourse, marking each off with the phrase “When Jesus had finished… Some scholars see in this five-part layout a deliberate plan to create a parallel to the first five books of the Old Testament…”

y

“The Gospel of Matthew begins with the words “The Book of Genealogy [in Greek, “Genesis”] of Jesus Christ”, deliberately echoing the first words of the Old Testament in Greek.”

En resumen, el evangelio según San Mateo, como ningún otro, presenta el enlace entre el Antiguo Testamento y la vida y obra del Mesías. La estructura del texto, los recursos literarios (como el comienzo basado en las primeras palabras en griego del Antiguo Testamento) y las referencias, respaldan esta observación.

Ahora el otro asunto: Backwards compatibility, Retrocompatibilidad, o Compatibilidad Progresiva. Este término, en computación, es la facultad de algunas aplicaciones para procesar datos generados con versiones anteriores (por ejemplo, una nueva versión de Microsoft Word es capaz de abrir documentos creados con una versión anterior). En este mismo sentido, cuando una nueva versión de un sistema operativo (como Microsoft Windows 8) ofrece “Backwards compatibility” significa que es capaz de ejecutar programas creados para versiones previas del sistema (como Windows 7). El tema es pertinente en estos días, porque ha salido al mercado la nueva versión de Windows, Windows 8, y Microsoft ha dicho que podrá ejecutar aplicaciones de la versión previa, Windows 7 (aunque imagino que no todas). Por tanto, Windows 8 ofrece algún grado de retrocompatibilidad.

La retrocompatibilidad resulta muy importante desde el punto de vista económico, porque promueve la adopción (es decir, ventas) de la nueva versión del software. Es mucho más probable que un usuario compre la nueva versión de un programa si sabe que sus aplicaciones y datos generados con una versión previa seguirán funcionando en la nueva versión.

Listo. Creo que lo anterior proporciona fundamento suficiente para comprender la broma 🙂

The Hobgoblin

Without a doubt, performance is a cornerstone of a great user experience. Like security, it is the most misunderstood and oft-used scapegoat of the software developer. It’s not uncommon to hear developers reject ideas with a flippant, “We can’t do that, it will negatively impact performance.” Rarely quantified and frequently cited, performance is the hobgoblin of software development. How do we quantify performance? Latency is a form of performance. Execution, the time an operation takes to perform, is another.

Andre Charland and Brian Leroux (Mobile Application Development: Web vs. Native, Communications of the ACM, May 2011)

Note: They are discussing about mobile applications. On such context, latency is related to the time required by an application to start executing (which involves download rates and code initialization). Execution, in turn, comprises interpretation of code. Any downside in execution, they argue, is paid off by the ease of writing and mantaining a high-level, interpreted code. And indeed, “we can’t do that, it will negatively impact performance”. Right now I’m floating on the delusion of smooth particle effects and video rendering.

Modifying the TCP Acknowledgement Mechanism

El primer libro de un amigo mío, ya disponible en Amazon.com: Modifying the TCP Acknowledgement Mechanism: An Evaluation and Application to Wired and Wireless Networks by Andrés Arcia-Moret.

Andrés es amigo, estudiante, docente, investigador, usuario de Mac, padre de familia, serio candidato a gurú universal de la computación. Doy fe de su calidad profesional y humana. Y éste, su primer libro, es un reflejo de su pasión por la informática. Enhorabuena, Andrés. La próxima vez que el avión me deje en Mérida reanudaremos nuestra charla sobre la despreocupación de los margariteños 😀

Calculus of resonances in an uniform acoustic tube

We assume that the glottal end is closed, but the mouth is open. This is the configuration we are referring to:

The acoustic tube is uniform, and its length is L. The glottis, located at x=-L, is closed (infinite impedance) and the mouth, located at x=0, is open (impedance zero). Now, pressure variation p(x) along this uniform acoustic tube is expressed as:

$latex \frac{d^2p}{dx^2} + \left(\frac{2\pi f}{c}\right)^2p = 0 ~~(I)$

where f represents frequency in Hz, and c is the speed of sound: $latex 3.53 \times 10^4 cm/s$ at 37° C.

According to the boundary conditions (the impedances at both ends), the solution is:

$latex p(x) = P_m \sin{\frac{2\pi f}{c}x} ~~(II)$

where $latex P_m$ is the peak in sound pressure. On the other hand, we have a relation between pressure and volume velocity

$latex \frac{dp}{dx} = -\frac{j2\pi f \rho}{A}U ~~(III)$

$latex A$ is a constant representing the tube’s area. Now, volume velocity can be expressed as

$latex U(x) = jP_m \frac{A}{\rho c} \cos{\frac{2\pi f}{c}x} ~~(IV)$

where $latex \rho$ equals the average atmospheric density ($latex 1.14 \times 10^{-3} gm / cm ^ 3$ at 37°C).

As U(−L) = 0, resonances Fn of the acoustic tube are

$latex Fn = \frac{2n – 1}{4}\frac{c}{L} ~~(V)$

where n=1, 2, 3… And that’s it. We can see that the area function does not affect the location of resonances. Finally, remember that, in average, the male oral tract has a length of 16.9 cm, and the female tract has an average length of 14.1 cm.

Stub

What’s a stub? It obviously depends on the context. A Stub may even be a relative of the Danish poet Ambrosius Stub. After all, code is poetry.

In computing, I know of 4 contexts where the word stub has a well-established meaning:

1. Web Sites: A stub is a web page in progress, i.e., a page which provides minimal information and is intended for later development. For instance, a Wikipedia stub is a short article in need of expansion.
2. Coding: During development, we sometimes use a “skeleton” function (or procedure, or method) to simulate some intended (but not yet implemented) functionality. For instance, the function may stand in for a complex algorithm to be developed later, or simulate a procedure running on a remote host. Such placeholder function is called a stub function. Stub functions come in handy for quick prototyping and testing.
3. Distributed Systems: In distributed systems, a service interface defines the services available to programs. These services are distributed among several networked machines. In distributed systems, a program in machine A may request a service by calling a procedure. However, the procedure may be offered by a remote host, say, machine B. Remote Procedure Calls (RPC) are a paradigm of distributed systems aimed at abstracting the communication between hosts in a network. The goal of RPCs is to hide the details of the remote call. The remote call should look like a local one, i.e., the program in machine A would invoke the procedure in machine B as it would invoke a procedure locally. Under the hood, though, it’s obvious that we have to transmit information from the client (caller) to the server (callee), and in the other direction. Now, how to hide the fact that we are calling a procedure located in other machine? This is the basic idea of RPCs:
• In the address space of the client, we represent the server procedure by means of a local procedure called client stub. Likewise, the server is also linked to a server stub, which will receive the message from the client stub.
• When machine A requests a service which is provided by machine B, a call is made to the client stub (which has the same name as the procedure in B). As the client stub lies in the same address space of the caller, the invocation is handled locally, and the program sees this invocation as a local one. However, the client stub marshalls the received parameters and sends them, throught the network, to the server stub. In turn, the server stub unmarshalls the parameters and perform the call to the real procedure in the server. When the server procedure finishes, results or exception data travels back, from server to client. By the way, marshalling is the process of taking a collection of data items (such as the procedure name and its arguments) and grouping them according to some predefined representation, suitable for transmission over the network. The server should know and conform to this representation in order to unmarshall the received data and recover the transmitted information.

Albeit conceptually simple, there are some interesting (nasty) problems for implementing RPCs, such as passing pointer arguments (remember that client and server have different address spaces).

4. Computer Networking: A stub network is a network or part of network with only one communication path to external networks (non-local hosts). For instance, if we connect to our Internet Service Provider using only one router, our local network is a stub network with respect to our provider.

There is other related context for stubs: in electronics, we identify Stub sections, which are mostly used for impedance matching in transmission lines. But I’m not too familiar with this “stub” meaning.