Mostrando las entradas con la etiqueta Lenguajes. Mostrar todas las entradas
Mostrando las entradas con la etiqueta Lenguajes. Mostrar todas las entradas

martes, abril 07, 2015

Diez reglas para recordar (y seguir...)

Firmado por Javin Paul, un artículo que recuerda diez reglas importantes de orientación a objetos en el diseño con Java (10 Object Oriented Design Principles Java Programmer should know), que podríamos extender fácilmente a otros campos (y estoy pensando en Plex). Un pequeño decálogo, tan escueto que podríamos pegarlo en una pizarra frente a nuestros ojos, y que deberíamos repasar todos los días.
 DRY (Don't repeat yourself)
Our first object oriented design principle is DRY, as name suggest DRY (don't repeat yourself) means don't write duplicate code, instead use Abstraction to abstract common things in one place. If you have block of code in more than two place consider making it a separate method, or if you use a hard-coded value more than one time make them public final constant. Benefit of this Object oriented design principle is in maintenance. It's important  not to abuse it, duplication is not for code, but for functionality . It means, if you used common code to validate OrderID and SSN it doesn’t mean they are same or they will remain same in future. By using common code for two different functionality or thing you closely couple them forever and when your OrderID changes its format , your SSN validation code will break. So beware of such coupling and just don’t combine anything which uses similar code but are not related.

Encapsulate What Changes
Only one thing is constant in software field and that is "Change", So encapsulate the code you expect or suspect to be changed in future. Benefit of this OOPS Design principle is that Its easy to test and maintain proper encapsulated code. If you are coding in Java then follow principle of making variable and methods private by default and increasing access step by step e.g. from private to protected and not public. Several of design pattern in Java uses Encapsulation, Factory design pattern is one example of Encapsulation which encapsulate object creation code and provides flexibility to introduce new product later with no impact on existing code.

Open Closed Design Principle
Classes, methods or functions should be Open for extension (new functionality) and Closed for modification. This is another beautiful SOLID design principle, which prevents some-one from changing already tried and tested code. Ideally if you are adding new functionality only than your code should be tested and that's the goal of Open Closed Design principle. By the way, Open Closed principle is "O" from SOLID acronym.

Single Responsibility Principle (SRP)
Single Responsibility Principle is another SOLID design principle, and represent  "S" on SOLID acronym. As per SRP, there should not be more than one reason for a class to change, or a class should always handle single functionality. If you put more than one functionality in one Class in Java  it introduce coupling between two functionality and even if you change one functionality there is chance you broke coupled functionality,  which require another round of testing to avoid any surprise on production environment.

Dependency Injection or Inversion principle
Don't ask for dependency it will be provided to you by framework. This has been very well implemented in Spring framework, beauty of this design principle is that any class which is injected by DI framework is easy to test with mock object and easier to maintain because object creation code is centralized in framework and client code is not littered with that.There are multiple ways to  implemented Dependency injection like using  byte code instrumentation which some AOP (Aspect Oriented programming) framework like AspectJ does or by using proxies just like used in Spring. See this example of IOC and DI design pattern to learn more about this SOLID design principle. It represent "D" on SOLID acronym.

Favor Composition over Inheritance
Always favor composition over inheritance ,if possible. Some of you may argue this, but I found that Composition is lot more flexible than Inheritance. Composition allows to change behavior of a class at runtime by setting property during runtime and by using Interfaces to compose a class we use polymorphism which provides flexibility of to replace with better implementation any time. Even Effective Java advise to favor composition over inheritance.

Liskov Substitution Principle (LSP)
According to Liskov Substitution Principle, Subtypes must be substitutable for super type i.e. methods or functions which uses super class type must be able to work with object of sub class without any issue". LSP is closely related to Single responsibility principle and Interface Segregation Principle. If a class has more functionality than subclass might not support some of the functionality ,and does violated LSP. In order to follow LSP SOLID design principle, derived class or sub class must enhance functionality, but not reduce them. LSP represent  "L" on SOLID acronym.

Interface Segregation principle (ISP)
Interface Segregation Principle stats that, a client should not implement an interface, if it doesn't use that. This happens mostly when one interface contains more than one functionality, and client only need one functionality and not other.Interface design is tricky job because once you release your interface you can not change it without breaking all implementation. Another benefit of this design principle in Java is, interface has disadvantage to implement all method before any class can use it so having single functionality means less method to implement.

Programming for Interface not implementation
Always program for interface and not for implementation this will lead to flexible code which can work with any new implementation of interface. So use interface type on variables, return types of method or argument type of methods in Java. This has been advised by many Java programmer including in Effective Java and head first design pattern book.

Delegation principle
Don't do all stuff  by yourself,  delegate it to respective class. Classical example of delegation design principle is equals() and hashCode() method in Java. In order to compare two object for equality we ask class itself to do comparison instead of Client class doing that check. Benefit of this design principle is no duplication of code and pretty easy to modify behavior.
Y volviendo sobre la idea de su aplicabilidad en Plex, sin duda lo es. En algunos casos fácilmente entendible, (Favor Composition over Inheritance, Encapsulate What Changes, DRY,  Favor Composition over Inheritance) y en otros casos, después de luchar contra la vía fácil de hacer las cosas (Programming for Interface not implementation). Solo veo difícil implementar Dependency Injection. Y cuando me refiero a aplicabilidad, lo hago a nivel del modelo, no a nivel del código generado, donde su aplicabilidad está asegurada.
Plex, como otros productos, admite distintas interpretaciones, distintas formas de desarrollar. Aplicar principios de OOD permite explotarlo en forma más productiva, potenciando sus características. Luchar por no usar una hoja de ruta rutinaria favorece resultados consistentes y duraderos.

domingo, julio 28, 2013

DSLs en su lugar

Una "vieja" entrada del blog de Bertrand Meyer, necesaria de recordar cuando se habla de DSLs (Domain Specific Languages) con alguna liberalidad: en ocasiones se los propone para resolver problemas específicos  que parecen condenados a bufurcar el camino de trabajo. La posición de Meyer es radical: ¿cuándo crear un lenguaje de dominio? Nunca:
El contexto:
It is a common occurrence in software development. Someone says: “We should design a language”. The usual context is that some part of the development requires a rich functionality set, and it appears appropriate to provide a flexible solution through a specialized language.
La objeción de Meyer:
Designing a language in such a context is almost always a bad idea (and I am not sure why I wrote “almost”). Languages are endless objects of discussion, usually on the least important aspects, which are also the most visible and those on which everyone has a strong opinion: concrete syntactic properties. People might pretend otherwise (“let’s not get bogged down on syntax, this is just one possible form”) but syntax is what the discussions will get bogged down to — keywords or symbols, this order or that order of operands, one instruction with several variants vs. several instructions… — at the expense of discussing the fundamental issues of functionality.
Worse yet, even if a language will be part of the solution it is usually just one facet to the solution.As was already explained in detail in [1], any useful functionality set will naturally be useful through several interfaces: a textual notation with concrete syntax may be one of them, but other possible ones include an API (Abstract Program Interface) for use from other software elements, a Graphical User Interface, a web user interface, yet another for web services (typically WSDL or some other XML or JSON format).
In such cases, starting with a concrete textual language is pretty silly, since it cannot yield the others directly (it would have to be parsed and further analyzed, which does not make sense). Of all the kinds of interface listed, the most fundamental one is the API: it describes the raw functionality, excluding any choice of syntax but including, thanks to contracts, elements of semantics.
Conclusión:
One of the key rules for successful software construction — as for many other ventures of course, especially in science and technology — is to distinguish the essential from the auxiliary, and consequently to devote proper attention to the essential issues while avoiding disputations of auxiliary issues. To define functionality, API is essential; language is auxiliary.
So when should you design a language? Never. Well, hardly ever.
 Si computaramos el tiempo de trabajo para definir el DSL y asegurar que funcione, en tales contextos, la adhesión a la posición de Meyer es segura...

domingo, julio 07, 2013

RPG antes y ahora

Este año se cumplieron veinticinco años de la aparición del As400/iSeries/System i o cualquier otro nombre que se propongan agregarle. De su robustez y excelente diseño dan testimonio dos artículos recientes: uno dedicado a recordar sus primeros ensayos y nacimiento, y otro evaluando el estado actual del RPG como lenguaje moderno. El primero, escrito por Mel Beckman, recuerda su inicio como programador, participando en beta tests del equipo en una empresa cercana a Rochester. Sólo rescato dos párrafos:
Despite the plethora of early bugs, we RPG programmers quickly began to see their frequency decreasing as the S/38 OS, called CPF (Control Program Facility) stabilized. S/38’s single-level store, object-oriented architecture, and integrated database really did seem to make programs more reliable, heading off the most common coding gaffs and preventing wholesale machine crashes. As the S/38 matured, it gained a reputation for solid reliability in the finance and healthcare industries, which are still strong markets for the system’s descendent, today’s IBM i. Throughout the S/38’s evolution to AS/400, iSeries, and ultimately Power hardware architectures, IBM has been able to preserve customer’s investment in business logic and data storage.
I had no idea then just how powerful the S/38’s innovations would turn out to be. They enabled IBM, and its many customers, to transport an immense amount of binary code and data into the future – not just twenty-five years, but thirty years, with very few disruptions. IBM promised, with both the S/38 and the IBM i, to protect users’ business investment in applications, processes, and logic.
In the intervening decades, many other systems have come and gone, dragging their user populations into oblivion with them. Only IBM i has preserved a continuous architectural path that is still going strong today. In 2013 it’s clear that IBM alone kept it’s promise.
El segundo artículo es un editorial del IBM System Magazine, escrito a propósito de las celebraciones de los 25 años del equipo (sistema operativo + recursos + hardware), puntualiza el estado actual del RPG, que de ninguna manera es ya lo que inicialmente fue (generador de reportes):
In reading today’s anniversary chapter, Susan learned something new—although Jon claims he knew it long ago. When RPG IV was introduced, the name “RPG” was officially declared to be no longer an acronym—or, more correctly as Scott Klement pointed out recently, an initialism. For those who didn’t realize this, to be an acronym, apparently it must be pronounceable as a word, such as NATO. If it is simply spelt out, as RPG is, it’s technically an initialism.
While the letters RPG may not officially stand for anything any more, RPG, the language, means a great deal to many thousands of programmers around the world and the users of their rock-solid, efficient, modern business applications.
In many ways it’s a good thing that RPG no longer stands for “Report Program Generator” because it has been many, many years since RPG’s primary function was reporting. It has evolved radically over the years.
If the picture that comes to your mind when you think of RPG is of columnar logic with multiple conditioning indicators and nary a hint of SQL, it’s time to wake up, Sleeping Beauty—you’ve missed a lot in the last 25 years. IBM i’s modern RPG IV is barely recognizable as a relative of the AS/400’s original RPG/400.
Today’s RPG logic is written in free format. It also utilizes libraries of homegrown, open-source and third-party functions in addition to RPG’s own library of more than 70 BIFs (built-in-functions). As a result, what would have been dozens of lines of indicator-laden, columnar “old-style” RPG are replaced by simple, powerful expressions.  And RPG’s data access has “grown up” too. Support for a huge variety of native data types and a deeper level of integration with SQL than is seen in almost any other language makes RPG a natural partner for IBM i’s integrated DB2 database.
Still think that RPG = Green Screen? Think again. Many shops are running interactive Web and mobile applications with logic powered by RPG. Or if you prefer, RPG code can easily provide the business logic underpinnings of Web services, stored procedures and other services to applications written in PHP, Java, Python, Ruby, .NET, etc.
Inevitably there are things that RPG doesn’t understand natively and that IBM cannot add to the language in a meaningful timeframe. The pace of change in today’s IT world is just too fast. That’s why Open Access was recently added to the language. It allows for the development of drivers to add new functionality while maintaining RPG’s powerful data marshaling capabilities. For example, you can write a driver to call a currency conversion Web service from RPG, allowing any RPG program to treat access to real-time currency conversion data as if it were a huge database in the sky. Simply set the key values for the currencies involved and issue a CHAIN operation. The conversion rate is returned as if it were being retrieved from a database column.
Como los autores dicen, mientras hemos visto pasar y desaparece equipos, lenguajes y arquitecturas, el diseño conceptual del AS400 sigue vigente y en primera línea. Centenares de miles de instalaciones lo demuestran. Quizá aún a pesar de algún directivo de la propia IBM, que a veces parece dudar de su producto.

sábado, diciembre 29, 2012

Java legacy, II

A propósito de las afirmaciones sobre la declinación de Java, mayores hacia inicios de año que ahora, Martijn Verburg, en su revista de Java para 2012, se refiere al tema y lo refuta claramente:
The community continues to thrive despite many main stream tech media reports of ‘developers leaving the Java platform’ or ‘Java is dead’. There are more Java User Groups (JUGs) than ever before, consisting of ~400,000 developers world wide.
Notably, one of them, the London Java Community won several awards including the Duke’s Choice award and JCP Member of the Year (along with SouJava – the major Brazilian JUG).

The conference circuit is bursting at the seams with large, sold out in advance, world-class Java conferences such as JFokus, Devoxx and of course JavaOne. In addition to this the host of regional conferences that often pack in an audience of over 1000 people all continued to do well.
Oracle’s Java Magazine was launched and has grown to over 100,000 subscribers. Stalwarts like JaxEnter, Coderanch and the Javaposse continue to grow in audience sizes.

OpenJDK

Further OpenJDK reforms happened over 2012 and a new scorecard is now in place for the wider community to give feedback on governance, openness and transparency.
2012 also saw a record number of individuals and organisations joining OpenJDK. In particular, the port to the ARM processor and support for running Java on graphic cards (Project Sumatra) were highlights this year.

Java Community Process (JCP)

The Java Community Process (JCP), Java’s standards body also continued its revival with record numbers of new sign-ups and a hotly contested election. As well as dealing with the important business of trademarks, IP and licensing for Java, a re-focus on the technical aspects for Java Specification Requests (JSRs) occurred. In particular the new Adopt a JSR programme is being strongly supported by the JCP.

Java and the JVM

The JVM continues to improve rapidly through OpenJDK – the number of Java Enhancement Proposals (JEPs) going into Java 8 is enormous. Jigsaw dropping out was a disappointing but given the lack of broader vendor support and the vast amount of technical work required, it was the correct decision.

JEE / Spring

JEE7 is moving along nicely (and will be out soon), bringing Java developers a standard way to deal with the modern web (JSON, Web Sockets, etc). Of course many developers are already using the SpringSource suite of APIs but it’s good to see advancement in the underlying specs.

Rapid Web Development

Java/JVM based rapid web development frameworks are finally gaining the recognition they deserve. Frameworks like JBoss’s SEAM, Spring Roo, Grails, Play etc all give Java developers parity with the Rails and Django crowd.

Mechanical Sympathy

A major focus of 2012 was on Mechanical Sympathy (as coined by Martin Thompson in his blog). The tide has turned, and we now have to contend with having multi-core machines and virtualised O/S’s. Java developers have had to start thinking about how Java and the JVM interacts with the underlying platform and hardware.
Performance companies like jClarity are building tooling to help developers understand this complex space, but it certainly doesn’t hurt to get those hardware manuals off the shelf again!
Y cuando Martijn se refiere a las perspectivas de 2013, la expectativa persiste, con Java 8 en deliberación. Pero mejor vea el artículo, o siga Java Code Geeks. Al menos en mi caso, encuentro usualmente excelente material práctico con ellos.

miércoles, diciembre 26, 2012

¿Java Legacy?

Esta es una noticia "vieja": InfoQ comenta la migración de Twitter de Ruby a Java a propósito de la exitosa travesía de Twitter durante las elecciones estadounidenses. Twitter resistió 327.452 tweets por minuto, hasta 15.107 tweets por segundo en algunos momentos, sin caídas de proceso ni congestionamientos. InfoQ atribuye (en parte) esta mejora a la migración desde Ruby hacia java:
[ dice Mazen Rawashdeh, VP de Infrastructure Operations Engineering en Twitter]Part of the reason Twitter was able to sustain this level of traffic was down to a set of changes the company has been making to their infrastructure, including, as InfoQ previously reported, a gradual shift away from Ruby to a set of services written in a mixture of Java and Scala and running on the JVM.
InfoQ historia este proceso gradual de migración:
Twitter was at one time thought to be the largest Ruby on Rails shop in the world, and has made a substantial investment in its Ruby stack, going as far as developing its own generational garbage collector for Ruby called Kiji, which, unlike the standard Ruby collector, divides objects into generations and, on most cycles, will place only the objects of a subset of generations into the initial white (condemned) set.
In 2010, however the firm announced that it was shifting some of its development focus. For the front-end the firm followed the HTML5 trend of shifting rendering code into browser-based JavaScript, and, in so doing, it ceased to gain much benefit from Rails' templating model for building web pages. Then, citing both performance and code-encapsulation as drivers, the engineering team re-wrote both its back-end message queue and tweet storage engine in Scala.
 Respecto a los clientes móviles, Rawashdeh dice: As part of our ongoing migration away from Ruby we've reconfigured the service so traffic from our mobile clients hits the Java Virtual Machine (JVM) stack, avoiding the Ruby stack altogether.

Respecto a su motor de búsqueda, también el cambio se inclinó por java: in 2011 the engineering team announced that they had replaced the Ruby on Rails front-end for search with a Java server they called Blender. This resulted in a 3x drop in search latencies.

En años anteriores se comenzó a hablar de Java como un lenguaje legacy, y de su toma por parte de Oracle, como su sentencia de muerte. Sin embargo, ha corrido agua, y la muerte no se produce: Java 7 en marcha, y preparativos para Java 8. En mi experiencia personal, con un uso más extenso de Java, observo estabilidad, confiabilidad, y buena performace. Cada vez que he tenido problemas con la JVM se ha debido a fallos en la preparación de funciones, y he podido contar con buena ayuda de la  consola de java en primer lugar, y de la documentación y la buena capacidad de manejo de errores. Tanto como soporte servidor, como en funciones cliente, la respuesta ha sido normal. Como máquina servidora para aplicaciones web basados en HTML + Javascript, su servicio es transparente y robusto. Y esto, sin contar con su ubicuidad: en cierto modo, "multiplataforma" en mi caso implica Java. En fin, mi experiencia es coincidente con esto dicho en InfoQ.

domingo, junio 10, 2012

iSeries: Con amigos como estos...

El 16 de mayo, Mel Beckman,en Iprodeveloper, publicó un artículo decretando la muerte del RPG (Is RPG Dead?), con cuestionamientos definitivos al lenguaje más básico y fundamental del iSeries, (o AS/400, o System i, o como se lo quiera llamar), que desató una larga discusión cuyos ecos continúan. Una gran parte de la discusión puede seguirse en las respuestas de lectores al propio artículo, pero tambíen en la excelente -y elegante- respuesta de Scott Klement en mismo sitio, así como en otros medios (grupos de LinkedIn, en nuestro grupo de usuarios de Plex, en IDevelop (1, 2), y en blogs,entre otros.
Un aspecto notable de este cuestionamiento del que ha sido y sigue siendo el principal lenguaje de diálogo con el iSeries, es que fue escrito en una publicación, Ipro Developer, que está enfocada en el iSeries, en la que "RPG programming" es el primer ítem del menú que encabeza la página, y que fue escrita por Mel Beckman, quien, según el pie del mismo artículo, "is the senior technical director for iPro Developer". Y más notable aún, que, habiendo pasado casi un mes, no exista ni un deslinde de responsabilidades de la publicación, ni un descargo del director técnico (senior).
La afirmación de obsolescencia del RPG resulta peor todavía en el marco de los reclamos de la comunidad de empresas y consultoras usuarias del iSeries, que se vió obligada recientemente  a publicar manifiestos y sostener su difusión  ante la inactividad del propio IBM en su defensa. Resulta incomprensible que un sistema que ha representado y representa un importante volúmen de las ventas y licencias de IBM, adoptado por miles de grandes y medianas empresas de primera línea en todo el mundo, que defiende el buen nombre de la empresa por su fiabilidad, y que no ha dejado de actualizarse nunca, sea torpedeado por quienes viven de su existencia.
Pero, para establecer una defensa en regla del iSeries, nada mejor que lo que Scott Klement responde en su defensa:
Yet, Mel even goes so far as to suggest that C (from 1972) and C++ (from 1983) are more modern languages.  Are you kidding me?!   Like RPG, I code in C every day, it's a big part of my job.  And let me tell you, C is not nearly as modern as RPG.  It's not even close. C and C++ can't even do simple string operations without you having to code manual memory allocation, bounds checking, and extra code to make sure that a simple string concatenation doesn't turn into a security hole.  Its database access routines are nowhere near as simple or advanced as RPG's.  Its date operations are awkward and clumsy by comparison to RPG.  Don't get me wrong, I like C, especially for lower-level systems coding.  But it's nowhere near as modern as RPG, nor as well suited for writing business logic.
But, maybe Mel doesn't understand that when today's authors refer to RPG, we really mean RPG IV.  We don't bother including the "IV" every time we say it, because RPG IV today's RPG, and everyone should already know that!

What Features Are Important In Business Logic?

Before we go throwing around opinions about old, legacy, etc...  maybe we should define what is important to us?  What are important features for a language that's aimed at people writing business logic?
  • Business logic uses numbers heavily.   Numbers represent quantities, prices, and weights.  These are key to almost every application in the business world.  Very few languages today support numbers with true decimal-based arithmetic (as opposed to integer and floating-point which are ubiquitous).  Java supports decimals properly, but only by working through complex classes.  RPG supports decimal numbers simply and easily, because they are the default numeric data type in RPG.
  • Business logic uses databases heavily.  Almost every business application is database driven, and database access is deeply integrated into the RPG language.  Native record access is simple and powerful.  Even more powerful is SQL, which is an order of magnitude simpler to code in RPG than it is in many other languages such as PHP or Java.
  • Business logic uses dates frequently.  Whether you're checking when a customer's payment is overdue, managing inventory turnover, determining when an order should be shipped, or when an employee was hired, you need to work with dates in a simple and effective manner.  Today's RPG does that.  Many other languages have APIs or classes for working with dates (this includes Java, PHP, C, C++, etc) but in RPG they are built right into the language, and that makes it simpler.
  • Business logic uses a ton of string manipulation.  Concatenating, scanning, or substringing character data is something I do every day in every program I write.  This is easy in many of the languages that Mel considers modern (PHP, JavaScript, Perl, Python, Ruby), but some of them make string manipulation much harder than it should be (Java, C, C++).  Today's RPG, unlike its predecessors, makes string manipulation a snap.
I've coded in more than 20 programming languages.  Some are object-oriented (such as Java, C++, and JavaScript), some are procedural (C, RPG, Pascal, Fortran), and some are a mixture of the two (such as PHP.)  But when I sit down and figure out which language is  easiest for my business logic, it's invariably RPG.

domingo, marzo 18, 2012

Java y Metro/WinRT

Windows 8, en su versión orientada a futuro, es Metro/WinRT. Francamente, no sé si Metro será un nuevo Vista, condenado a ser cambiado a una nueva versión tras ser descartado masivamente; sin embargo, creo que está claro que este será el nuevo sistema operativo de Microsoft, con mayores o menores parches o variaciones, después de un mayor o menor paso de tiempo. Y también está claro que el API de Win32 tiene sus años contados, que será considerado "legacy", y que no se deben esperar mejoras futuras sobre él. En estas condiciones, que creo que son irreversibles desde el punto de vista de Microsoft, WinRT debe ser considerado como el futuro del mercado Windows dependiente.
Si esta premisa es cierta, la pregunta siguiente es acerca del universo de productos, lenguajes o herramientas construídas sobre y para esta plataforma: seguramente, algunas que ya hoy han quedado obsoletas, o cambiarán radicalmente, o deberán repensar una tecnología que las suplante, como sería el caso de Flash. Otras, las más, enfrentan un camino complicado. Particularmente, en este momento pienso en Java; no sé si tendrá sentido crear una máquina virtual pensando en Metro como interfaz de usuario (tiles, pantalla táctil), que pudiera quedar a futuro como algo más asociado al usuario final, a tablets, a dispositivos móviles en general. Pero seguramente sí debe comprobarse que una máquina virtual puede ejecutarse sobre WinRT. No he visto todavía ningún pronunciamiento de Oracle ni de otros responsables del estándar, y probablemente pase algún tiempo antes de que haya alguno; habrá problemas de políticas (qué excelente momento para cerrar Windows a la competencia...), antes de resolver cómo enlazar la máquina virtual. por ahora, solo es posible encontrar algunos sencillos intentos de ejecutar java, algunos logrados, pero doy por entendido que estos casos lo han hecho sobre el escritorio (Win32). La siguiente es una pequeña lista de  casos en este sentido:
Ejecutando Java en DOS, claramente sobre Win32,
Lo mismo, en una edición temprana.
Un intento de  instalar Eclipse.
Un intento algo inadvertido, quizá sobre Metro, pero que cae hacia Win32.
Un intento con muchos problemas.

Sin embargo, lo más sustancioso está en otros casos tempranos enfocando Metro/WinRt. Particularmente uno en Google Groups (The Java Posse), discutiendo los problemas de arquitectura (aunque para nada hay que despreciar otro argumento discutido allí: "The real reason is Microsoft pathetically trying to exclude competitors and competing technologies, trying to impose HTML5 for everything"):
So it seems that Windows 8's new "Metro" user environment will make IE plugin-free. Any attempt to use plugins like Flash, Java, Silverlight or anything else, will bring the user to the "old-style" (as in  Windows 7) desktop, which will be seen as a severe experience degradation for users who prefer the new environment.

I am not as much plugin-hater as some people; in my Android smartphone, I certainly appreciate the support for Flash, for simple practical purposes - the rare website that uses some Flash and has no mobile-optimized version or native Android app. And yeah, my karma be damned but Flash works well enough  for me (admittedly on a nice hardware - Tegra2, dual-core Droid X2, rooted & debloated, Flash updated to 10.3).

Still, I love the idea of a plugin-free world, if only for the security improvement. (Including avoidance of trash like "security plugins" mandated by online banking sites...) But this is not really fair if we consider modern browsers that run plugins in separate and low-privilege processes, plus enhanced plugin technology like Google's (Pepper and NaCl / PNaCl), plus plugins for runtimes that are managed and have their own sandboxing and security mechanisms and are sufficiently well patched (candidates: Java, Flash, Silverlight - yes none of them are perfect, they all add some to the attack surface, but the ever-growing browser is already a huge attack surface, there's no single week going without new security bugs being found in every major browser so I don't think the "three big" plugins would make things significantly worse).

There's already people betting that Microsoft will have to back away and maybe, put an option to allow plugins in Metro mode even if not active by default. I know for sure, that corporations are writing new apps with things like Flash, by the thousands. Everybody complains that the corporate world is still dragging its feet with old versions of IE, remarkably the much reviled IE6; but if you think that ActiveX code for IE6 is holding back the web, this is nothing compared to how much stuff depends on Flash. A plugin-free IE10+ will be adopted in corporate world by 2020 with some optimism...

What about the applet tag? This is not part of HTML5 anymore, but it's part of previous versions even if deprecated. This should give Java applets special privileges, at least if Metro-mode-IE will support pre-HTML5 markup (and sure as hell it must, for a long time still). I'm too lazy to install the Win8 beta just to check this, would anybody report if applet [tag] works in Metro/IE? Just curious, I guess it doesn't...

Even in HTML5, there's the [object] tag which is supported and not even deprecated. Will Microsoft break the spec and declare that this feature of HTML5 is not supported in Metro mode? What about Java WebStart, maybe the deployment toolkit can be adapted to detect Metro and not depend on [object], I guess the only fundamental need is the ability to download a JNLP file and launch the associated program? Will Metro restrict such launching too? Both Oracle and Adobe are working on their Plan B for the eventual dominance of HTML5, with new tooling that convert their stuff in plain HTML5. In Oracle's case, there is hope for JavaFX 2.0 if its Web Runtime turns out to be good (it's not yet included in the public beta so I have no idea). There is no similar hope though for old-style, AWT/Swing applets or JAWS apps that will not benefit from a similar Web Runtime.

By the way, the JavaFX Web Runtime (WRT) will be a very interesting test for the claim that Javascript & HTML5 can be fast enough and powerful enough to build any application, competing at least with Java/Silverlight/Flash if not with native apps. Summarizing, the WRT will have a pure-web implementation of the JavaFX frameworks (animation, controls, graphics etc.), I guess using canvas or WebGL and Javascript; and the application code will be (perhaps partially) converted to Javascript code. So, supposing that this WRT is well designed and implemented - and that's a core part of the v2.0 reboot plan so I guess they carefully redesigned the whole thing to make the WRT possible - then if it turns out to be much less efficient than the conventional runtime, this will be strong evidence that the mantra "HTML5/Javascript is fast enough" is bullshit. Let's wait and see.

In another interesting development, Google's technologies like PNaCl and Dart can be powerful enablers for anything that generates Javascript code, from GWT to Adobe's and Oracle's  tools. Dart is supposed to be much more efficient than Javascript, and also, the Java language will probably be much
closer to Dart than it is to Javascript (less sure about AS3...); and I'm sure Oracle and Adobe can write new compilers that emit Dart code instead of Javascript code. Or even, PNaCl code. So if these Google technologies succeed, they can benefit other platforms too. We will still be able to run other browsers in Win8. 
Otra interesante apertura es la expuesta en Iced in code:
The big question now is where does JavaSE fit in all this bold re-imagining? Oracle/Sun have done a great deal of work over the past few years to get Java to work pretty well on Windows and become as natively integrated as possible, but with the re-working of Windows, Java will be confined to the “legacy” application section for the time being, and will not be able to play with the new cool kids in the “Metroverse”. I wonder what steps Oracle  is going to take to make Java still a viable product in the new Windows 8 platform, or will they simple give up and require us all to move to platform specific programming again, like C#?
y alguna acotación de lectores:
First, Oracle should under all circumstances make Java SE compatible with the new platforms like tables, macbooks and metro to keep their concept intact – OR – find a way to easily let Java SE applications run as “apps-likes” under another Java distribution made specificly to these platforms.
Second, Metro is nothing more (or less) than a simple “start-web-page”. Windows 8 is very similar to Windows 7, with program and filesystem seperated – where android and apple are more likely to melt these two things together. Therefore I doesn’t like andorid and apple as their operationsystem are defining the limitations. Some people would call that user-friendliness, I partially agree with that.
I believe that Windows 8 Metro will be an extension to their current desktop on traditional computers, but not a future replacement making the desktop legacy – and we won’t see anything like this within the next 10 years. But Windows 8 Metro will be the beginning of web and computers melting together – and this will eventually make the desktop computer look more like a tablet – and a tablet will look more like a desktop computer – and that will happen!
Uno de los casos que chocaron con WinRT.
Una discusión que refiere a Intel y ARM.

En fin, faltando una respuesta oficial de Oracle, comienza a abrirse el juego. ¿Va usted sopesando el impacto de Windows 8 en sus inversiones en licencias, plataformas, aplicaciones?

jueves, noviembre 17, 2011

Críticas a OOP

James Hague, programador funcional (o por lo menos por un tiempo), interesado en Python y Erlang, hablando del primero, hace una referencia a la programación orientada a objetos, puntualizando lo que lo aparta de oop:
 (Don't Distract New Programmers with OOP) 
[...] The shift from procedural to OO brings with it a shift from thinking about problems and solutions to thinking about architecture. That's easy to see just by comparing a procedural Python program with an object-oriented one. The latter is almost always longer, full of extra interface and indentation and annotations. The temptation is to start moving trivial bits of code into classes and adding all these little methods and anticipating methods that aren't needed yet but might be someday.

When you're trying to help someone learn how to go from a problem statement to working code, the last thing you want is to get them sidetracked by faux-engineering busywork. Some people are going to run with those scraps of OO knowledge and build crazy class hierarchies and end up not as focused on on what they should be learning. Other people are going to lose interest because there's a layer of extra nonsense that makes programming even more cumbersome.

At some point, yes, you'll need to discuss how to create objects in Python, but resist for as long as you can. 
Esta nota de Hague es de marzo de este año. Por casualidad o no, ese mes otro entusiasta de la programación funcional desacredita totalmente oop. Y nada menos que en un curso introductorio de Carnegie Mellon.
Sería muy interesante conocer un balance del curso terminado.

domingo, octubre 16, 2011

Una opinión sobre el valor de Java

En el curso de una discusión sobre Dart en Google+, Rafael Chaves da una interesante visión sobre Java:
"Java was not innovative at the time, and did kill many OO languages initiatives"

I am not sure Java killed other initiatives - I feel more like they were dead on arrival, at least from a market suitability PoV.

The non-technical aspects are just as important as technical merits. It does not matter how cool a language is, if it is not going to be supported by multiple vendors/platforms, if it evolves in a way that invalidates previous investments, if it is hard to learn for the average developer, if doesn't have proper support for a wide variety of application styles/domains, if is going to be hard to hire people. Getting that right is as critical as (or even more than) technical benefits.

Java got all those right, and that is why it succeeded. I don't think it is a lot about money. Sun could have poured twice as much money into it, but if they failed to recognize the importance of those aspects, it would have been a flop, or have limited success (see Microsoft .Net). But these days I wouldn't bet against similar success being attainable by an open source foundation with a strong community, without nearly the same level of financial backing, if they aimed for building for the mainstream and the long term like Sun did with Java.

As a developer, I want my investment in learning my next language to pay off for as long and across as many domains and technical architectures as possible. That is much more important than having the perfect feature set.
...y a propósito del valor de Dart, Angel "Java" López ha abierto una línea de discusión e información.

domingo, abril 10, 2011

Lenguajes de programación y rankings

Reviendo dos rankings de lenguajes de programación: Tiobe y The Transparent Language Popularity Index, éste último, en Source Forge (apuntado por Jean Bezivin). Coincidencias básicas entre ambos para los primeros puestos: con leves diferencias, Java, C, C++, PHP, C#. En ambos rankings, no se habla de número de aplicaciones, líneas de código, ponderación de la importancia de las aplicaciones involucradas. Fundamentalemnte, lo que establece su importancia es la popularidad del lenguaje. La fórmula de Tiobe lo explica:
The ratings are calculated by counting hits of the most popular search engines. The search query that is used is
+" programming"
This search query is executed for the top 6 websites of Alexa that meet the following conditions:
  • The entry page of the site contains a search facility
  • The result of querying the site contains an indication of the number of page hits
Based on these criteria currently Google (32%), YouTube (10%), Yahoo! (3%), Bing (3%), Wikipedia (16%), Blogger (32%) and Baidu (3%) are used as search engines. The number of hits determine the ratings of a language. The counted hits are normalized for each search engine for the first 50 languages. In other words, the first 50 languages together have a score of 100%. Let's define "hits50(SE)" as the sum of the number of hits for the first 50 languages for search engine SE and "hits(PL,SE)" as the number of hits for programming language PL for search engine SE. Possible false positives for a query are already filtered out in the definition of "hits(PL,SE)". This is done by using a manually determined confidence factor per query. A query such as "Basic programming" also returns pages that contain "Improve your basic programming skills in Java". The first 100 pages per search engine are checked for possible false positives and this is used to define the confidence factor. If this factor is 90%, then only 90% of the hits are used for "hits(PL,SE)". An overview of the confidence factor can be found in the groupings table below.
The ratings are calculated with the following formula:
((hits(PL,SE1)/hits50(SE1) + ... + hits(PL,SEn)/hits50(SEn))/n
where n is the number of search engines used.
¿Son importantes estos índices? La popularidad implica que han ocupado la atención pública, que fue analizado para su adopción, que distintas comunidades recurrieron a consultas para resolver problemas o educarse, en fin, que estuvieron en el foco de la atención de la comunidad de la industria. Pero no habla en todo caso de los consolidados, aquellos que se usan sin ruido, y que pueden ser usados también en abundancia, como sin duda sucede con COBOL, RPG y otros.
En el último tiempo, suele hablarse de Java como un lenguaje "corporativo", igualándolo a "legacy". Su continuidad en la primera línea en todo caso muestra que su interés no se ha amortiguado.

sábado, noviembre 06, 2010

Nuevas reflexiones sobre el software futuro

La semana pasada hubo un gran revuelo en la comunidad de usuarios de Silverlight. En su PDC2010 (Professional Developers Conference 2010, finales de octubre), Bob Muglia y Steve Ballmer hicieron comentarios que indujeron a pensar a distintos observadores que Silverlight pasaba a una vía muerta. Mary Jo Foley publicó un artículo que corrió como la pólvora, y desató toda clase de especulaciones que todavía duran. Aunque el tema de por sí es muy interesante, en este caso deberá quedar para otra oportunidad. Está por verse si realmente Siverlight pasa a mejor vida, o el revuelo proviene de un torpe manejo de relaciones públicas (dicho sea de paso, el post del blog de Siverlight que acompañó al anuncio, y que se convirtió en un muro de los lamentos, todavía no ha tenido una respuesta clara y definitiva de parte de sus autores, a cinco días de emitido). En fin, lo que particularmente me atrajo en este caso, fue el tipo de discusión que generó: una vivísima representación del estado de la construcción del software en ésta época. Lo que sigue es una lista de asuntos de primera importancia que fueron discutidos. Todos los comentarios siguientes son respuestas al post de Bob Muglia en el sitio de Silverlight. Al fin de cada párrafo se indica el nom de guerre que cada usuario prefirió usar. Hay mucho más material en otros sitios que generaron respuestas, otros interesados con blog propio, comentarios de periodistas de tecnología, etc. Quizá más adelante se agregue algo de esto.

Múltiples dispositivos y plataformas, no más un ambiente cerrado y confortable
Uno de los temas de mayor preocupación reflejados es el de la cobertura del producto respecto de dispositivos crecientemente heterogéneos, no sólo escritorio: mientras sus seguidores esperarían la ampliación de Silverlight "al menos" a Android, si algo dejan claro, es que para el producto, sólo hay planes para Windows Phone 7. Claramente, el mundo ha devenido heterogéneo y no monoproducto:
I'm in a project where we have to make a decision between Silverlight and HTML5. We were leaning toward Silverlight, but then put the brakes on when we heard about the comments from the PDC. This blog post doesn't help Silverlight's case. It merely looks like you're trying to calm a panic. But the reality is that anyone deciding on Silverlight vs HTML5 for new applications, that will be supported years down the road, must seriously consider jumping into HTML5 as the safer path. Clearly you've admitted it's the best path for cross platform applications. In an iPad, Android, Windows and everything else world we are flying toward... how can we *not* pick HTML5. (Dave Friedel)

To rectify this, I need to see an announcement that Silverlight will be ported to Android. Flash has. Yes, an iPhone port won't happen bc Apple policy, but Android is shipping on more phones and is more likely to be used by business people than iPhone. WP7 is starting from too small a base to invest in significant development. Right now develop for iPhone bc it's got the buzz, Android bc it's got the momentum, and then WP7 if and when resources allow. An Android port of Silverlight means develop for Android/WP7 first which further deflates iPhone momentum. Think strategically. (Anónimo)


I understand that porting it to iPhone is beyond Microsoft's reach and depends primarily on Apple , but it would be nice to get it ported to Android. No one expects you guys to cover all of the platforms with SL, but it would be nice to cover the most popular ones.(Nick Polyak)


Your competitior isn't backing away from taking its technology to popular platforms - they're finding ways to reward developers and designers for their continued support and loyalty by making sure they have a path to run everywhere that's relevant. There's no questioning their commitment, and yet questions persist about yours. (Anónimo)

Basically you're saying that it's not a battle you want to fight, so you're giving up altogether. I don't think everyone expected Silverlight to be on every device. Heck, the top 10 would be more than enough to satisfy nearly everyone out there (including devices your company controls and owns, such as Windows, Zune/WP7 and XBox).
HTML5 certainly hasn't had a problem with adoption on several devices. Heck, even Android (an entire OS) hasn't. So why is Silverlight having such a challenge in doing it? (Daniel)


I've been building a website over the past 2 years that incorporates 20,000+ lines of Silverlight on the client side (and yes, it really does need to be that complex.). I've been completely trusting Microsoft's commitment to this platform, but I'm now very very worried indeed. I've just spent all weekend learning GWT, and I'm starting to think a port might actually be plausible. Bob's blog post really seems nothing more than a half-assed effort at damage control, and I'm afraid that where there's smoke there's probably fire.
This time last week, I was silverlight's greatest fan. But unless you do a *lot* more to restore my confidence, I'm planning to spend the next month seeing how far I can get in migrating to GWT. I can't quite understand why you think this is a good thing for Microsoft. (ArcMan)
I'd like to see Silverlight and the Metro UI phone/tablet interface integrated tightly into Windows 8 the way iOS is being integrated into OSX Lion.
Microsoft should utilize Windows Phone 7 and the Silverlight implementation to create an install base of developers who can then populate a mobile, desktop, tablet, and web app store. It only makes sense then to include license options for apps that run across the different mediums the Silverlight can hit.
I think anyone who doesn't see Silverlight as an LOB/media tool is missing the boat. I would never build a website in Silverlight. I would build my media viewer or my backend system though. I would definitely build an app on Silverlight. (CKLuis)


" As a result, getting a single runtime implementation installed on every potential device is practically impossible. " [conceptos de Bob Muglia en su post]
It's absolutely possible, and moreover that's exactly what must be done. You can have platform specific extensions of course, but core must be the same for all platforms. And if you cannot implement SilverLight runtime for all possible devices, just open source it, and it will be ported to any "potential" device in few months, and we won't need to even listen this meaningless statements how "cool" HTML5 is. (Sipank)
As a .NET/XAML programmer I've been very disappointed that I can't target one of Microsoft's popular platforms, the XBOX 360. It has been difficult to understand this glaring omission, but Scott Barnes' explanation as to the internal unpopularity of WPF sure seemed to make a lot of sense. For the immediate future, say the next five years, these are the relevant platforms...
Windows
Mac
iPhone
Droid
WP7
XBOX
Playstation
You're already on three of the seven. After watching you guys for years supporting NT on x86, Alpha, and x64, you can't convince me that you can't easily port a 5MB runtime to four more platforms. The tools and silverlight groups have done AMAZING work, to "shift" strategies now would truly be grabbing defeat from the jaws of victory. I imagine your partners like Netflix would be delighted if they never had to do another port again and could rely on Silverlight. Seriously, if Sun and their grotesquely incompetent programmers were able to port java to so many platforms, you guys should at least be able to get it on seven. (Jack Bond)
I see silverlight as a better and lighter version of desktop runtime in replacing wpf which is so heavy and hard to deploy to people who don't have the latest runtime.
I found that even without html 5, the current javascript + html4 + css enable people to build much prettier and user friendly UI. Silverlight follows a desktop UI philosophy and doesn't really fit into the browser except some case of advertising oriented banner... (collaboration cloud)

Do what should have been done in the first place - make Silverlight compile down to a html5 compliant web application. You know, sorta like how GWT does it. Write java, get all the benefits of it, but it produces minimized, best practice compiled javascript.
I think MS took the fight against 'Flex', and by the time it was ready, realized they missed the train because Apple and Google are attacking the web pieces, meanwhile MS went backwards and is now sitting in the same 'yucky' spot as Adobe.
Making browser plugin's is yesterday's technology.
Actually, what is odd, is that the MS team used Script# to build the online Office - not Silverlight - that alone should tell you the status of Silverlight. Wake up people. MS should be investing in Script#, not Silverlight. (Steve)


The community will definetly like to see silverlight ported to more platforms. How commited are you to making silverlight cross platform? (Arson)

When you buy a PC or a car, you own it. You are free to use it the way you like and you can install any extension/software you want without asking the manufacturer. The mobile phone market is different. Think of it as a car you paid for in cash, however every year you have to pay a license fee and for every drive you have to pay-per-use for the steering wheel. Not to mention the payment for the manufacturer's OK for 3rd party tires... This is exactly the Apple business model for the iPad/iPhone. You buy it, yet Apple owns it/controls its usage.
Now Microsoft obviously failed in coming up with a similar or competing business model. Option a) entering the hardware market, controlling the devices, with full power offends all hardware partners and option b) controlling the application market through a license check in the SL runtime fails, because Silverlight (legally) cannot be installed at the majority of mobile devices.
(...)
So dear fellow developers, this is not about SL, this is about losing the first big battle on the mobile phone operating theatre. We're the collateral damage.
Microsoft has enough cash for scraping another phone platform; happened early this summer didn't it? However what about you and me?
And I hope: Microsoft buys Nokia. (Hidden War)
Los lenguajes y arquitecturas propietarias son un escollo
Un tema que subyace en la preocupación de varios de los reclamantes, es la necesidad (aceptada o no, da lo mismo en este caso) de adaptarse a estándares concertados, dado que "el mundo es ancho y ajeno":
What we have here is a fundamental conflict between the desire for standards (although how anyone can call HTML a standard is beyond me since even simple stuff renders differently in different browsers) versus the desire for productivity. Given enough time, resources, and patience, you could create and maintain just about any piece of software using just about any environment and tools. However, creating increasingly complex RIAs with the brain dead HTML/CSS/Javascript/4 million libraries stack strains the time constraints and resource that companies have and exceeds the patience of professional developers used to working with even modestly productive development environments. Silverlight should be more correctly call Silverbullet because it massively overdelivers on the productivity and capability needed to create RIAs. If standards are a problem, why not just turn the future definition Silverlight over to a standards body like Netscape did with Javascript and whoever did with HTML? Then the standards people would have their objections undercut and those of us who actually do development could get on with our work. (Bryan Morris)


Perhaps MS should consider releasing a lightweight SL runtime for low power handheld devices. This make great sense, because these small screen interfaces normally use fancy animations with just a minimal input control set, and a lightweight runtime would allow MS to easily port SL to a large number of low power devices.
The apparent problem now is that SL is rather weighted with features -- many of which are appropriate only in larger screen environs, and this limits the potential device audience. This is likely why WP7 required a more robust engine. Perhaps a simple solution would be to offer WP7 with the full runtime, but publish lightweight runtimes for the rest of the mobile universe. This would give WP7 a control set edge, and at the same time, would allow most (efficiently coded) apps to cover the bulk of the device universe.
The iPhone and other market-significant proprietary boxes will quite likely be pressed by market forces or lawsuits into support other runtimes, such as Flash and SL. A lightweight runtime option makes SL more palatable to these vendors, since they wish to protect product performance perceptions, but at the same, wish to enjoy revenues from app sales. (Handled device suggestion)


Silverlight is not and never will be the one tool to use for all situations but it continues to be a very useful tool for many situations.
I'm typing this on a iPad and so I cant use many of my own Silverlight apps in the same way that Flash isn't available to me.
After lunch I'll go back to my desk and continue to work on my current Silverlight project which is the best tool for that particular project and environment with some support software being written in MVC2 for the web.

To get angry for being told Silverlight won't run on iPads and some other environments is madness, we already know this. If you want to hit every environment, use an open standard like H5 and accept the limitations that come with it. Judge on a project by project basis. (kaseciu pildymas)


I understand your point and your choice of client side technology is the most reasonable choice given the platforms you are targetting. However that does change nothing about Javascript not being suitable for complex client application development. I believe that the main reason for the choice has nothing to do with Javascript qualities as a language and development technology rather than the simple fact that Javascript is available on all those platforms and Silverlight is not. And I believe you would seriously consider Silverlight or other technology based on statically typed language, full cross-browser and cross-platform compatibility etc. if it was supported on all those platforms.
My understanding of Microsoft's message is "we are not able to put Silverlight on every platform so we are moving to HTML5/Javascript". And my fear is that it will slow down and with time maybe even stop Silverlight development and expansion because Microsoft "already has a strategy to get you everywhere" so why invest to Silverlight. Or at very least "why invest to Silverlight in a pace like last years", which is also disappointing.
HTML5 is a must have, there is no doubt about it, but it should not affect Silverlight in any way. (Martin)


I am not sure why so many people blame Microsoft for their commitment to Silverlight. It was quite clear from the beginning that Silverlight will be only available for Windows platform. I don't think this decision changed to much. If you stick with Widows platform you will be fine in any case. If you wanted to have a cross platform solution Silverlight was never a good choose or did some of you naively think that it will be ported to other platforms? (Aleximo)


I commited our development team and reputation to Silverlight. And now I have been left high and dry ! I am not really convinced by this Blog Post. The message is out there, Microsoft is adopting HTML5 in preference to developing Silverlight further. Microsoft are just going to let Silverlight die, after a couple more weak releases. Shopw me the Silverlight Roadmap for the next 5 years, on the Main Microsoft.com page, and maybe you will convince the Developer and their bosses that we have all not just adopted a turky technology.
I should have learn't from the J++ experiment.
I will never trust MS again. (No longer trust Microsoft)
I think some of you are missing the big picture. Whether or not Silverlight's direction has "shifted" or whether or not HTML5 is a full replacement is tangential at best to the point Bob made in his original quote.
Many of you have been saying Silverlight is "cross platform". If we were in the 90s, this would be right, it covers multiple browsers on the two largest operating systems.
Bob's comments are simple: web development is not about cross browsers, and it's definitely not about two operating systems. The ecosystem of web applications on a broad scale is widening greatly to include many new OSes, hardware types, form factors, screen sizes, hell even bandwidth assumptions are up in the air at this point.
If you wanted a "cross platform" web site or web application, Silverlight isn't and never was the right answer. The only difference between last week and this week is that Bob pointed out that it is infeasible to port Silverlight to all of these devices, form factors, and platforms. That should have been obvious to anyone knowledgable enough to be on this thread; him saying it is just a rubber stamp on something intuitively true.
This was true last week and it'll be true next week: If you're trying to come up with a desktop application that is loaded through a web interface, and you're okay with only supporting two operating systems, Silverlight will give you some nice bells and whistles for grander application. However, if you're looking to make a truly cross platform web solution, you need to be using HTML and its related standards and technologies. (ChrisC)
El panorama está dado...Hay otros elementos de gran interés, que en todo caso, irán en otro momento. Por ahora es suficiente. Un común denominador entre tantos desarrolladores del ecosistema de productos de Microsoft, es la nula referencia entre todos ellos a herramientas de desarrollo basado en modelos, o al menos, referencias a lenguajes específicos de dominio,  a pesar que durante dos años el tema fue un caballo de batalla de Microsoft. Sin embargo, en el fárrago de lenguajes y arquitecturas, éste debiera ser el punto que les diera perspectiva y tranquilidad ante abruptos cambios de frente o apariciones de nuevas arquitecturas. Un elemento general es el sentido de decepción y vacío, frente a la inversión de horas y dinero, cuando el dueño de un producto los deja solos y sin respuesta. Una estrategia no recomendable, existiendo la alternativa del desarrollo basado en modelos, en el sabor que se desee.

domingo, octubre 31, 2010

Oyendo reflexiones sobre el software futuro

Mencionado por Jean Bezivin en Twitter: algunas reflexiones de Michael Nygard acerca del futuro del desarrollo de software, que suenan razonables, aunque quizá a Java le reste más (y mejor) recorrido que el que Michael estima. Lo fundamental, la computación móvil y su asociada, la "computación en la nube", aparecen forzando la marcha según sus requerimientos:
  • Two obvious trends are cloud computing and mobile access. They are complementary. As the number of people and devices on the net increases, our ability to shape traffic on the demand side gets worse. Spikes in demand will happen faster and reach higher levels over time. Mobile devices exacerbate the demand side problems by greatly increasing both the number of people on the net and the fraction of their time they are able to access it.
  • Large traffic volumes both create and demand large data. Our tools for processing tera- and petabyte datasets will improve dramatically. Map/Reduce computing (a la Hadoop) has created attention and excitement in this space, but it is ultimately just one tool among many. We need better languages to help us think and express large data problems. In particular, we need a language that makes big data processing accessible to people with little background in statistics or algorithms.
  • Speaking of languages, many of the problems we face today cannot be solved inside a single language or application. The behavior of a web site today cannot be adequately explained or reasoned about just by examining the application code. Instead, a site picks up attributes of behavior from a multitude of sources: application code, web server configuration, edge caching servers, data grid servers, offline or asynchronous processing, machine learning elements, active network devices (such as application firewalls), and data stores. "Programming" as we would describe it today--coding application behavior in a request handler--defines a diminishing portion of the behavior. We lack tools or languages to express and reason about these distributed, extended, fragmented systems. Consequently, it is difficult to predict the functionality, performance, capacity, scalability, and availability of these systems.
  • Some of this will be mitigated naturally as application-specific functions disappear into tools and frameworks. Companies innovating at the leading edge of scalability today are doing things in application-specific behavior to compensate for deficiencies in tools and platforms. For example, caching servers could arguably disappear into storage engines and no-one would complain. In other words, don't count the database vendors out yet. You'll see key-value stores and in-memory data grid features popping up in relational databases any day now.
  • In general, it appears that Objects will diminish as a programming paradigm. Object-oriented programming will still exist... I'm not claiming "the death of objects" or something silly like that. However, OO will become just one more paradigm among several, rather than the dominant paradigm it has been for the last 15 years. "Object oriented" will no longer be synonymous with "good".
  • Some people have talked about "polyglot programming". I think this is a red herring. Polylgot is a reality, but it should not be a goal. That is, programmers should know many languages and paradigms, but deliberately mixing languages in a single application should be avoided. What I think we will find instead is mixing of paradigms, supported by a single primary language, with adjunct languages used only as needed for specialized functions. For example, an application written in Scala may mix OO, functional, and actor-based concepts, and it may have portions of behavior expressed in SQL and Javascript. Nevertheless, it will still primarily be a Scala application. The fact that Groovy, Scala, Clojure, and Java all run on Java Virtual Machine shouldn't mislead us into thinking that they are interchangeable... or even interoperable!
  • Regarding Java. I fear that Java will have to be abandoned to the "Enterprise Development" world. It will be relegated to the hands of cut-rate business coders bashing out their gray business applications for $30 / hour. We've passed the tipping point on this one. We used to joke that Java would be the next COBOL, but that doesn't seem as funny now that it's true. Java will continue to exist. Millions of lines of it will be written each year. It won't be the driver of innovation, though. As individual programmers, I'd recommend that you learn another language immediately and differentiate yourself from the hordes of low-skill, low-rent outsource coders that will service the mainstream Java consumer.
    (...) 
  • To my great surprise, data storage has become a hotbed of innovation in the last few years. Some of this is driven by the high-scalability fetishists, which is probably the wrong reason for 98% of companies and teams. However, innovations around column stores, graph databases, and key-value stores offer developers new tools to reduce the impedance mismatch between their data storage and their programming language. We spent twenty years trying to squeeze objects into relational databases. Aside from the object databases, which were an early casualty of Oracle's ascension, we mostly focused on changing the application code through framework after framework and ORM after ORM. It's refreshing to see storage models that are easier to use and easier to modify.
    (...) 

viernes, mayo 28, 2010

Un perfil laboral del mercado de TI en Argentina

Guía senior publicó el 26 de mayo una nota sobre el mercado laboral argentino, basada en una evaluación de TeamSeele, división de reclutamiento de recursos humanos de Baufest. Tomado como un indicador de tendencias, da información interesante en varios aspectos:
Según TeamSeele, la web 2.0 ha cobrado importante relevancia en los procesos de búsqueda durante el último tiempo. Más del 40% de las empresas se han volcado a la búsqueda de profesionales a través de redes sociales. En consonancia con ello, redes como LinkedIn han pasado de 25 millones de usuarios en octubre de 2008 a más de 60 millones en la actualidad. De los 65.000 profesionales de IT de Argentina, según la CESSI, 14.000 de ellos están registrados en LinkedIn.
La publicación de avisos laborales en la red, ha ganado definitivamente la batalla con respecto a los medios tradicionales. Los sitios de reclutamiento en Argentina vienen creciendo con ritmo sostenido desde 2004, encontrándose en estado de maduración.

Como consecuencia, ante la avanzada de las redes sociales, estos sitios han diversificado sus servicios en los dos últimos años, ofreciendo una oferta diferenciada, permitiendo a las empresas reclutadoras acceder a más y mejores perfiles, cuestión de vital importancia para el mercado IT.

Por otra parte, en relación a los perfiles más buscados, las empresas han aumentado el rango de edad considerado como requisito para sus posiciones IT. La búsqueda de profesionales mayores de 40 años ha aumentado en un 20% en comparación con el 2008.

Además, aquellos con mayor salida laboral son Desarrolladores Java, .NET, Sharepoint, Especialistas en Business Intelligence e Integración de Datos, Administradores SAP Basis y Project Manager y Líderes de Proyecto con experiencia en Scrum. Del universo total de búsquedas más del 30% apuntan a la tecnología Java.

Por otra parte, una tendencia que viene imponiéndose es la demanda de profesionales para el desarrollo de aplicaciones Mobile, que ha registrado un importante crecimiento en el último año. Esto viene de la mano de los smartphones, que aparejaron un boom en el desarrollo de aplicaciones y la traslación de contenido por parte de las empresas a la plataforma móvil. Sólo desde Argentina se producen un 33% de las aplicaciones para móviles, tendencia que prevé incrementarse fuertemente en 2010.

Por último, el Headhunting como método de reclutamiento se ha incrementado en un 35% en comparación a 2008, como consecuencia de la escasez de recursos en el mercado argentino, y el avance de las redes sociales que permite acceder con mayor facilidad a los profesionales en mercado.
Si bien no se debería tomar el informe más allá de un indicador de tendencias, al que debe descontársele su carácter de parte involucrada, un aspecto queda en claro: la escasez de recursos actual para Argentina. No tengo cifras para relacionar con otros mercados los 65.000 profesionales estimados, pero a primera vista parece una cifra baja, para un país que ronda los cuarenta millones de habitantes. Lo refirma la ampliación del espectro de búsqueda a profesionales mayores de cuarenta años, algo que hace diez o quince años era un techo insuperable.

viernes, abril 16, 2010

Modelos y libertad de acción

Jean-Jacques Dubray escribió, el once de este mes, una "carta abierta a Steve Jobs", en la que, a propósito de la declaración de Apple de que cerrará la programación para el iPhone, recuerda su catastrófica experiencia con NeXTStep, el revolucionario sistema operativo que Jobs desarrolló en su transitoria etapa fuera de Apple. Dubray recuerda su decidido compromiso por el sistema operativo y sus herramientas, y cómo la absorción posterior de NeXT por Apple destruyó su inversión, y afectó a sus clientes:

I discovered NeXT and NeXTStep in 1990 at Penn State and it was love at first sight. I was inspired, from the very first second after years of programming in Turbo Pascal. It is hard to believe for most people that something like Xcode was available as early as 1989. I had built two solutions with NeXTStep: a Laboratory Information Management System (LIMS) and an Industrial Process Control System. It was not easy but the results were incredible.

NeXTStep was so productive that a very small team of 2 or 3 people could write software that was vastly superior to the one written by much larger teams (10-50). I still remember a professor from Stanford visiting us at Hughes Research Lab and looking at these two products (at the time I had also added a Natural Language Interface to the Process Control Software to log process data in the LIMS and define control rules), his jaw dropped on the floor.

Yet, around 1994, NeXT started to fail. You had already moved to create OpenStep (a port of their APIs to Sun -yet incompatible with NeXTStep) and all together in 1997, NeXTStep was packed in boxes and moved to Apple. It resurfaced nearly a decade later. You can easily imagine how these two "strategic" moves impacted my business and my customers. Yes, devastating doesn't really qualifies.

La enseñanza que sacó Dubray de su experiencia tiene dos aspectos: uno, respecto a la evolución de la industria del software, que no necesariamente coincide con los intereses del usuario de la tecnología:
Software vendors are always looking for new customers, they compete against each other and ultimately they have no commitment to their past customers. I actually don't know a single Platform Software Vendor which understands and focuses on helping their existing customers migrate to new versions of their platform. They simply don't care, older customers are just collateral damage.
Su segunda conclusión es que ya nunca encarará la construcción de software comprometido técnicamente con un proveedor, sino que se apoyará en el desarrollo basado en modelos:
I have learned my lesson, never, ever will I write code directly tied to a set of APIs.
(...) NeXT shaped my mind to build model-driven software. Somehow, I could never go back to just writing imperative code ever again. Around 2005, my understanding of MDE became a lot more formal with the emergence of DSL Tools and Eclipse Modeling Framework and later XText and Oslo.
Ever since I understood how deadly, and frankly stupid it was to tie your solutions to vendor APIs, I spent lots of time developing strategies to become technology and architecture independent.
Jean-Jacques expresa un punto de vista importante en el estado actual del mercado del software: en un universo de negocios cambiantes, donde la tecnología es infinitamente variada, y donde es difícil contruír soluciones estables porque el ciclo de vida de las aplicaciones es crecientemente corto, comprometerse con una solución basada en una tecnología es peligroso. Y orientarse hacia el desarrollo basado en modelos es preventivo: difícilmente un cambio de tecnología afectará la especificación del software. Existen distintas variantes de desarrollo basado en modelos; cualquiera de ellas ofrecerá mejores perspectivas que un diseño apegado a un lenguaje, o infraestructura, o plataforma específica. En el estado actual de la industria, cada variante de lenguaje o plataforma se acerca a ser un commodity, y es el desarrollo basado en modelos el que permite manipular esta diversidad.

martes, junio 16, 2009

Rápida y breve historia del desarrollo en la Web


Un gráfico suele ayudar a entender un problema, particularmente las líneas de tiempo. Publicadas en Wikipedia, dos "timelines" sobre evolución de lenguajes y de browsers tienen la virtud de hacer visible el fulminante crecimiento de Internet como carril del desarrollo del software. Con trabajos precursores a finales de los ochenta, a partir de la década del 90 su crecimiento convirtió cualquier predicción sobre su evolución en hechos consumados en pocos años, retroalimentando una espiral de crecimiento que abre posibilidades apenas imaginadas quince años antes. Un impacto que promete cambiar profundamente las posibilidades de conocimiento del conjunto de la sociedad urbana.
Aquí se publica uno de ellos. El otro, se lo puede encontrar en Wikimedia.
Los artículos de Wikipedia que los sustentan son History of the web browser, y Web development.

domingo, abril 19, 2009

Indice TIOBE de popularidad de lenguajes: reaparece RPG

Ya mencionado antes aquí, mensualmente Tiobe publica un ranking de popularidad de los lenguajes de programación, que es interesante para observar tendencias. Lo puede leer estimando el futuro tecnológico, profesional, de negocios, y más, ya que los cuadros de análisis son variados a partir de la masa de datos obtenida:

The TIOBE Programming Community index gives an indication of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, MSN, Yahoo!, and YouTube are used to calculate the ratings. Observe that the TIOBE index is not about the bestmost lines of code have been written. programming language or the language in which

The index can be used to check whether your programming skills are still up to date or to make a strategic decision about what programming language should be adopted when starting to build a new software system.
La lista comparativa de abril muestra una situación estable o muy levemente descendente para los lenguajes más populares, incluyendo Java, C, C++, PHP, C# y Visual Basic, una pequeña subida para Python y Javascript, para los primeros diez puestos. Notablemente, RPG sube y se coloca en el puesto 18, creciendo fuertemente durante 2009. Mas notable todavía que la subida de ABAP en el mismo período, ya que RPG está fundamentalmente ligado al OS/400 y el ISeries (AKA AS/400). ¿Recupera posiciones el uso del AS/400?. Considerado en sí, el actual RPG tiene ya poco que ver con sus versiones iniciales, y se ha potenciado tanto como lo ha hecho el ISeries.
El ranking completo para los primeros veinte puestos:

Position
Apr 2009
Position
Apr 2008
Delta in PositionProgramming LanguageRatings
Apr 2009
Delta
Apr 2008
Status
1 1 Java 19.341% -1.55% A
2 2 C 15.472% -0.04% A
3 3 C++ 10.741% -0.06% A
4 4 PHP 9.888% -0.32% A
5 5 (Visual) Basic 9.097% -0.69% A
6 7 Python 6.080% +1.18% A
7 8 C# 4.059% +0.00% A
8 9 JavaScript 3.678% +0.75% A
9 6 Perl 3.462% -2.09% A
10 10 Ruby 2.569% -0.07% A
11 11 Delphi 2.272% +0.25% A
12 14 PL/SQL 1.086% +0.33% A
13 12 D 1.076% -0.37% A
14 13 SAS 0.792% -0.13% A
15 15 Pascal 0.717% +0.12% A-
16 21 Logo 0.707% +0.37% A
17 27 ABAP 0.658% +0.42% B
18 26 RPG (OS/400) 0.646% +0.40% B
19 19 Lua 0.491% +0.12% B
20 23 MATLAB 0.482% +0.22% B

El análisis completo se puede encontrar en la página de Tiobe. Se puede suscribir al informe mensual.
Otro aspecto de interés acerca del análisis es el análisis por categorías, con indicación de un 40% de persistencia de lenguajes procedurales:
CategoryRatings April 2009Delta April 2008
Object-Oriented Languages 55.6% +0.0%
Procedural Languages 40.3% -1.1%
Functional Languages 3.0% +0.8%
Logical Languages 1.2% +0.2%

El método de cálculo del índice es este.
Sobre Tiobe:

TIOBE is specialized in assessing and tracking the quality of software. We measure the quality of a software system by applying widely accepted coding standards and quality metrics to it.

We provide quality systems that monitor your software real-time. Software managers and architects are offered a top down view, whereas engineers get a plug-in for their programming environment to measure the quality at file level.