![]() |
15-Apr-2005
In the backroom, Jorge Becerril presents his weblog Ingeniería del Software and his bio: My name is Jorge Becerril and I have a degree in Computational Systems, specializing in Software Engineering from the University in Guadalajara, Jalisco, Mexico. I have been working in the pharmaceutical industry for the last 10 years. I started as a software developer and during this time I realized the importance of Software Engineering and the need for the use of a series of methods and processes in software projects to guarantee quality in the software tools produced. For this reason I decided to start this blog where I record some of my findings and experiences. I believe that little is said about Software Engineering in Spanish circles, so the work of a Software Engineer is not well understood. I hope that this blog may be of interest to its readers. Jose A. Suárez in chochurro, warns that Antonio Guisasola, the president of Promusicae (the group representing the music producers of Spain) is about to send out an e-mail to some 10,000 users of the Kazaa network in Spain which appears to threaten them with legal action. If anyone receives such an e-mail, they can get in touch with Rafael Garcia, a lawyer specializing in new technologies, who may be able to advise on appropriate action. In Bitácora de Guti, Javier Gutiérrez Chamorro (Guti) explains that when constructing a long string of characters, the string is often divided into a number of smaller sections in the source code and appended together like this: However, it is more efficient to create the string all at once like this:
He goes on to demonstrate that the latter is roughly 6 times as quick as the former for a specific number of concatenations. Clbustos in Php y otras yerbas takes issue with the methodology of Guti above. He says that Guti's calculation of the running time of the code is valid only for PHP5. More importantly, the two sets of code presented by Guti are not equivalent. In the second set, the strings are separated by carriage returns. Although this does not affect the appearance of the strings in HTML, it can be significant, for example where creating a PDF. On re-writing the code to remove the carriage returns at the end of the string creation process, clbustos shows that the second method (creating the string all at once) takes marginally longer than the first (simple concatenation). A third method of creating the same string using the ob_start() function takes twice as long as either of the first two methods. Jaime Irurzun in código escrito describes an idea that occurred to him to solve a particular problem when working with 16 bit compilers like Clipper. In Clipper, the first 10 characters of function names must be unique. If you are trying to name functions according to their place in the hierarchy of the program, this can be an annoying limitation and you may spend more time than necessary trying to shorten names so that they are unique in their first 10 characters. A possible solution to this problem is to create classes, without attributes, whose methods are the names of the functions that you wish to extend. So, for example, if you had a program that needed two functions, BooksPrintDetails() and BooksPrintList(), you could create a class like this:
and refer to the functions
as Books:PrintDetails() and Books:PrintList(). |
Return to Extracts from Planeta Código |
|
|
© 2005-6 |