16 December 2010

UML: mal entendimiento

He visto bastante en la escena productiva un mal entendimiento de UML, poniendo 2 posturas opuestas extremas, tal como:
  1. Los que creen que es la panacea
  2. Los que la odian 

Los del primer grupo creen que a base de la primera creen que al usar tal herramienta el proyecto va ser exitoso y todo funcionara.

Los del segundo grupo creen que es basura (muchas veces teniendo la misma base erronea del primer grupo, que es supuesta panacea), porque no les genero el esquelo completo de su diseño de patrones/clases

Generalmente ocurre lo que no se entiende no gusta, ha sucedido siempre en la historia de la civilización, pero acá podemos rescatar algunas buenas practicas para poder usar esta nomenclatura en vez de seguir neófito.

Lo que NO es:

  1. No es la panacea
  2. Por lo mismo no te entregara todas las clases (si tienen un buen diseñador/analista con experiencia en programación y patrones de diseño puede entregar algo robusto, pero siempre tendrá algo que falta y esas iteraciones deberán hacerla el programador, obviamente todo esto funciona si los requerimientos iniciales se hicieron bien y no se ha cambiado en el tiempo). 
Lo que Si es:

  1. Estandariza la nomenclatura
  2. Explica de forma simple ciertas especificaciones como con casos de uso y de secuencia para todo usuario y programadores respectivamente. 

por otro lado simple hay alguna manera de poder especificar guarismos, es más, Meyer y otros ya lo han hecho, lo malo de UML que es propietario, pero se alineo con OMG asi que es el mejor/último esfuerzo que se ha hecho de tal manera que la documentación sea estándar al contratar a Jacobson e IBM comprar a Rational.

-- (15/10/08).



Después de haber escrito el pasado texto hace ya 2 años, veo que Fowler tiene un punto de vista bastante parecido donde me llama mucho la atención los siguientes párrafos:
Changing the design doesn't necessarily mean changing the diagrams. It's perfectly reasonable to draw diagrams that help you understand the design and then throw the diagrams away. Drawing them helped, and that is enough to make them worthwhile. They don't have to become permanent artifacts. The best UML diagrams are not artifacts.

A lot of XPers use CRC cards. That's not in conflict with UML. I use a mix of CRC and UML all the time, using whichever technique is most useful for the job at hand.
 Bueno lo escribió el 2004 :-)

-- (15/12/10)

13 December 2010

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g : Review

This is a good book (→tutorial) for any developer that wants to use EJB 3.0 with the most popular Oracle J2EE technologies.

The book starts with a simple introduction of EJB 3.0 and compares that spec to EJB 2.x, overviews new features such as, annotations, JPA and interceptors.

Then it goes into this topic in depth, always tied-up to JDeveloper; for instance, shows how to convert EJB 2.x to 3.0, it's a very good example if the reader comes from that legacy specification or to see explicitly how much effort we are saving coding and not generating deploy descriptors to obtain the same business/architecture JEE feature.

Continuing the Book's Oracle point of view, look into EclipseLink JPA, JDeveloper (as main IDE) and complete chapter of Eclipse OEPE and their details. Chapters dedicated to integration with ADF & JSF separately, EJB relationships, and finishing with Web Services.

A lot of details, clear explanations, source code, screen-shots of step-by-step instructions to avoid any doubt to the reader to get the best of these specs and tools.

11 December 2010

Lazy initialization

http://en.wikipedia.org/wiki/Lazy_initialization

from GoF:

You can avoid this by being careful to access products solely through accessor operations that create the product on demand. Instead of creating the concrete product in the constructor, the constructor merely initializes it to 0. The accessor returns the product. But first it checks to make sure the product exists, and if it doesn't, the accessor creates it. This technique is sometimes called lazy initialization. The following code shows a typical implementation:

class Creator {
public:
Product* GetProduct();
protected:
virtual Product* CreateProduct();
private:
Product* _product;
};

Product* Creator::GetProduct () {
if (_product == 0) {
_product = CreateProduct();
}
return _product;




--
Atte.

German Gonzalez

06 December 2010

CWEB en Español

Después de varios meses de trabajo, he podido terminar de traducir a Castellano The CWEB System of Structured Documentation de Donald Knuth.

Fue una tarea bastante ardua, más de lo que imagine ya que hay muchas frases técnicas (de tipografía) y sobre todo con mucha información tácita.

Se puede bajar desde el mismo sitio del Prof. Knuth: http://www-cs-faculty.stanford.edu/~knuth/cweb.html

Si alguien tiene comentarios, sugerencias para el documento, por favor diganmelo.

23 November 2010

Liar, Liar: Solved - FaceBook Puzzles

I have solved the first problem of Facebook Engineering Puzzles (Snack difficulty). It took me more time that I've planned, as usual, being a blackbox is harder to reach a solution.

Right now the robot has problems to receive emails from gmail (using the webmail app), therefore the solution is to send the solution through a script that uses SMTP.

This is the email sent by the robot:
Thank you for your submission of a puzzle solution to Facebook! After running your solution to liarliar (received on November 22, 2010, 9:24 am), I have determined it to be correct. Your solution ran for 1400.789 ms on its longest test case. If you have not already, try installing the official Facebook Puzzles application from http://apps.facebook.com/facebookpuzzles/ and publish a story about your solution! To publish, just go to http://apps.facebook.com/facebookpuzzles/mypuzzles.php and click on the publish link.

If you are applying for a position within Facebook, the puzzle difficulty solved will be taken into account with regards to how much time you had available to solve it (remember that Hors D'oeuvres are only tests for your benefit). I have taken the liberty of alerting our recruiting team about your success. Best of luck!

Sincerely,
-The puzzle robot

23 September 2010

Kludge

Después de haber traducido un documento de Knuth, muchas palabras interesantes me llamaron la atención, entre otras fue kludge que significa una solución no inteligente a un problema en ingeniería, en este caso particular de computación.

UPDATE1 (2016.01.25): Que es diferente a la palabra que intenta crear (y popularizar) en honor a Turing:
"Nomenclaturing: Let's Ture to the Max!"
http://www-cs-faculty.stanford.edu/~uno/news12.html


25 August 2010

Falsos Amigos Em Português

Después de estudiar Português por 1 año, pude hacer mi lista de vocabulario y donde me sorprendio varios aspectos de este idioma, entre otros la gran cantidad de amigos falsos que existen entre Castellano y Portugués:

PortuguêsCastellano
acordardespertar
acordedespertar
apagarapagar, borrar
apelidosobrenombre
asaala de avion, pajaro
asasalas
assim queapenas (apenas pueda)
assistever, ir
baterpegar
batirlater
bilhetebillete, boleto, papeleta
biscoitogalleta
bistecbife
boloqueque
bolsacartera
borrachogoma (caucho)
cabocable
cachorroperro
cafe de manhadesayuno
cafe passadocafe de maquina
calçapantalon
carterabilletera (de hombre)
casacochaqueta mujer
cenaescena
costasespalda
criado-mudovelador
dadosdatos
decoraraprender de memoria, memorizar
descargatirar cadena
deslocadadislocada, desplazado
despidadesnuda
dirigirmanejar, conducir
distintadistinguida
encomendarencargar
enganoequivocado
escritoriooficina
feiraferia
feriadía de la semana, descanso
fracadébil
irritadaenojada, molesta
latirladrar
malamaleta
massapasta
mesmorealmente
mesmo queaunque
montemontón
moralmoraleja
ondaola
palavrãogarabato
pastapaté
pasteisempanada fritas
pegartomar
perdurarcolgar
pimentaaji
pincelisopo
presuntojamón
prontolisto, acabar
pulsomuñeca
que logode pronto
romancistanovelista
ruviapelirroja
secasequia, secado
segundosegún, segundo
senhacontraseña
serenasirena
sinocampana
sobre tudocasaca
sobremesapostre
sobrenomeapellido
solosuelo
telapantalla, televisor
termotérmino
tirarquitar, sacar
tomara queojala
tonturamareo
traçoguión
tragatraiga
vasoescusado, macetero
veiavena

06 August 2010

Sun Certified Enterprise Architect (SCEA)

Varias veces me han pregunto he insistido respecto la certificación Sun Certified Enterprise Architect (SCEA). La mayoria cree que se necesitan todos los certificados especificos de J2EE.

Como se ve en la figura (y pueden rectificar en la página), no tiene ningun requisito para poder tomarlo. Claro esta que no se recomienda ya que abarca todos los temas especializados.

Lo que si es diferente es que la forma de desarrollo del examen es diferente, cual consta de 3 partes: Examen, Proyecto, Ensayo. Mas parecido a una memoria de pre-grado.

02 August 2010

Neo-vintage 2: Pagination in Struts... JSTL implementation

Many times I have needed to use an pagination for many data to be shown in my page, however there is no a good Tag implemented for Struts and not as JSF that has components for it..

There is a good encapsulation with the great library DisplayTag, but this one doesn't give too much freedom to create different things, thus this approach is more flexible.

Finally searching for the web I found a simple JSTL pagination, where you can give a collection of data and at level of presentation parse it and embedded with html and javascript we can get the final pagination that we wish.http://web.archive.org/web/20071213001753/http://www.ekcsoft.com/jstl/content/paginate/ (it is no longer alive).

It has a small bug when the collection is empty therefore the totalCount is zero.

It can be put inside Struts without problems, below can see code of it,:
<c:set var="totalCount" scope="session" value="${queryResults.rowCount}"/>
    <c:set var="perPage" scope="session" value="20"/>
    <c:set var="totalPages" scope="session" value="${totalCount/perPage}"/>
    <c:set var="pageIndex" scope="session" value="${param.start/perPage+1}"/>

   <c:if test="${!empty param.start && param.start >(perPage-1) && param.start !=0 }">
          <a href="?start=<c:out value="${param.start - perPage}"/>">Prev </a>
    </c:if>

   <c:forEach
        var="boundaryStart"
        varStatus="status"
        begin="0"
        end="${totalCount - 1}"
        step="${perPage}">
        <c:choose>
            <c:when test="${status.count>0 && status.count != pageIndex}">
                             <a href="?start=<c:out value='${boundaryStart}'/>">
                                <c:out value="${status.count}"/> |
                            </a>
            </c:when>
        <c:otherwise>
                <c:out value="${status.count}"/> |
        </c:otherwise>
        </c:choose>
    </c:forEach>

    <c:if test="${empty param.start || param.start<(totalCount-perPage)}">
          <a href="?start=<c:out value="${param.start + perPage}"/>">Next </a>
    </c:if>

02 July 2010

Oracle JRockit: The Definitive Guide Review

Oracle JRockit: The Definitive Guide
Copyright © 2010 Packt Publishing

Just like the title establish, this is the definitive guide of JRockit, including the last features of version R28.

It starts with the canonical knowledge to work and understand the JVM, showing details from the most basic until the advanced topics. Describing how and why certain features were made, how it was improved and plus several Best Practices lists to take the best of the suite of tools bundle with JRockit.

The book is wisely divided in two parts, the first is about JVM and the second part is regarding to JRockit Mission Control. Which is a powerful set to dissect JRockit Beauvoir to find out memory leaks, performance, bottlenecks, etc.

It gives an extended explanation of the parameters to take better of this tools suite with a low overhead, many of the areas referred can't be found somewhere else in such deeply detail form.

Everything in only one compendium of information done by the same creators of JRockit.

 More information at:

Blog Archive

Disclaimer

Qux