I C BB 2 E

I hate identifiers.

A bad dream last night dragged me back to a project I took over some years ago, a Web shop bungled by its original developers. Their code implemented both shopping baskets and the products customers put into them as arrays, using numeric constants as field selectors. So when reading it, you had to know that {moscode}prod[1]{/moscode} was a product's name and {moscode}prod[2]{/moscode} its price. If {moscode}bask{/moscode} is a shopping basket, you had to know {moscode}bask[1]{/moscode} to be the total price of its contents, {moscode}bask[2][N]{/moscode} the {moscode}N{/moscode}'th product therein, and {moscode}bask[3]{/moscode} the delivery charge. (The developers dropped out of touch and out of Google. Perhaps they're farming pigs.)



April 21, 2008
URL:http://www.drdobbs.com/architecture-and-design/i-c-bb-2-e/228701321

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.