Posts

10 errores que la mayoría cometemos en el trabajo

10 errores que la mayoría cometemos en el trabajoenviar documentación en correosadjuntar documentación en JIRAsno automatizar tests porque no hay tiempono documentar cosas porque no hay tiempopensar que documentar es una pérdida de tiemporeinventar la rueda todo el tiemposobre usar fichero excel para gestionar el proyectopresumir ser ágiles cuando fallamos en todo lo anteriorpretender construir soluciones extraordinarias en una empresa de negocioscreer que las empresas de negocio les importa la calidad del software 10 errors most of us do at worksending documentation in emailsattaching documentation in JIRAsnot automatizing tests because there is no timenot documenting things because there is no timethinking that documenting is a waste of moneyreinventing the wheel all the timeoverusing excel files for project managementpresuming being agile when we fail on all previous things pretending to build outstanding solutions in a business companybelieving that a business company cares about …

Java 8 Optional. ¿De verdad hacía falta?

Java 8 Optional ¿De verdad hacía falta una API para tratar nulos?Me surgen las siguientes dudas.

¿Desde cuando tratar con valores nulos dentro de un programa se convirtió en un problema? ¿Es el temido NullPointerException realmente un problema del lenguage o del programa?¿Esta el Optional realmente simplificando la lógica del programa?¿Esta el Optional realmente ayudando a diseñar un programa más robusto?¿Esta el Optional realmente resolviendo el problema original?

Hasta donde yo he podido llegar, no veo ninguna aportación ni a la programación ni al lenguaje el uso del Optional de Java 8. De hecho, lo que si he podido llegar a ver ha sido justamente lo contrario. Donde antes veía simples if ahora veo sobre-ingeniería, e incluyo utilización de APIs adicionales para tratar con los tales Optional. Después de ver esto, esto es tal y como yo lo veo:

La programación es un arte y por lo tanto el tratamiento de nulos también lo es.El Optional es sencillamente más verbose que escribir directament…

¿Certificarse o no certificarse?

Un colega me preguntó. Vale la pena certificarse?  Yo le respondí así:

Creo que es bueno tener certificaciones:

1. Aprendes cosas nuevas seguro.
2. Eres más profesional que antes.
3. Algunas empresas lo requieren.
4. Genera más confianza al cliente.

Desde luego una certificación por si sola no garantiza conocimiento ni nada. De hecho, antes de certificarse en algo lo ideal es tener algo de experiencia para aprovechar al máximo la nueva información, "No es lo mismo conocer el camino que recorrer el camino". Segundo hay que estudiar a conciencia si realmente quieres aprender. Solo si has aprendido se puede amortizar una certificación.

Para amortizar una certificación primero hay que ponerla en el curriculum. Pero ponerla en el cv por si sola no sirve de nada. Hay que saberla vender al empleador, demostrando que sabes del tema y si es posible poniendo ejemplos reales de cosas que hayas hecho antes. Aquí vale decir de manera relajada, en el momento oportuno, sin presumir demasia…

Java 9 Process API

Java 9 will come with interesting features. Here is a quick review of the new Java 9 Process API.

Use Cases for the Java Process API
These are probably some ways how we are using the Java Process API:

To Install, configure or to communicate to other programs from Java: For example, I implemented a Java Installer to install the WebSphere Application Server into the system, and then I configure it by running a script coded in Jython executed the wsadmin tool.To install specific Operating System stuff. I didn’t find any other simpler way to install Windows start menu items from Java other than by doing it in a VBScript program.In my opinion, the Java Process API is in general used to integrate Java with other programs or processes. For example. I made a game in Blender and I implemented a launcher in Java. So, from Java I am calling the blender.exe passing the game.blender file as argument.
Known Problems and Workarounds
There are common issues in Windows when invoking commands which have …

Android 3D Model Viewer Open Source

So finally I decided to publish my 3D model Viewer android app on the Google Play Market :)

This app is about drawing 3D objects in android using OpenGL ES 2.0; and its Open Source as my other projects, so people can either contribute, start a similar project based on that or just learn how to do it by looking at the source code.

Although there is already similar apps on the market and lots of 3D frameworks out there, neither of the published apps are Open Source.

So I wanted to learn how 3D works and I think the best way to understand how it works is by looking at how matrices transforms the objects in space and how pixels are drawn to the screen. Thats why this app does not use any third party framework.

So far the app serves as a model viewer, but I have some ideas of what can be done with the code; or as I prefer to think of it, mini-3D-framework.  So for example, I am thinking in creating my very first and simple mini-game and I want to do it in 3D as it is a matter I really like…

Introduction to Software Design Patterns

Image
This is a presentation I did for the company I work Digital Origin. Its an introduction about architecting software solutions using Design Patterns.  Hope you like it.

What is a Design Pattern "Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice"
- Cristopher Alexander -
"Is a general resuable solution to common ocurring problems. It is a description of template for how to solve a problem in different situations"
- Wikipedia - Prerequisites & Basic Principles These are the basic principles one should be concerned before applying patterns. Use Object Oriented languageUse of AbstractionUse of EncapsulationUse High CohesionUse Loose CouplingUse Open - Closed prinipleUse Separation Of ConcernsUse Dependency InversionSeparate volatile from Stable componentsUse Interfa…

How to build a replicated ehcache through firewall and not to die trying

It's assumed that:

You already have a java application and you have an ehcache instance running in your program with 1 cache configured to replicate.You want to connect 1 instance to another instance you have in a remote machineThe remote machine you are connecting to is located behind a firewall.You have been given access to only 1 port to make an ssh connection to the remote (firewalled) machine. Ehcache uses RMI to connect the remote instances. When the cache in host 1 tries to connect to cache in host 2, RMI opens a new server socket in host 1 to listen for incoming connections from the host 2.
The problem here is that these random ports are not accesible to remote hosts because the hosts are behind a firewall.

So to fix it, we need to configure ehcache to only use 2 ports. The "remoteObjectPort" does the magic. So we have this ehcache.xml configuration:
1 server port for the ehcache server to listen to other ehcache servers.1 server port for the ehcache cache to liste…