lunes, 6 de enero de 2014

managers

I always had this post in mind. In fourteen years as a developers (and sometimes offshore), I found these weird patterns about managers.

Let's say you come from outside to an office, and you don't see where everybody sits, you just see the behavior. What would you think about this profile?

-People who can't typewrite. They just use two fingers.
-People who can't speak in English, or have a horrible accent and they are not willing to correct any of their usual mistakes.
-People who don't have any group initiative, such as puttying money for buying a present for a guy who is going to be a father, or a group bet before a match.
-People who absolutely never pay a coffee to anybody.

Yes, that's right. That's the profile of a manager here.

I have seen some exceptions: for example, my first manager was one of them (at least an exception in the first points). But curiously, she was the worst manager I ever had.

The thing is that in the year 2000... ok, it was possible to find people with some lacks of knowledge and still understand that they were managers. But the weirdest thing is checking, so long after, that these kind of profiles are the ones that get promoted.

Ah, of course, one more thing: low technical depth. I never saw a manager with a record of programming excellence.

Conclusions? Good question. I guess the reason why a manager promotes a subordinated into being a manager is basically trust. So if you want to become a manager, try hard to get a good relationship with your manager, become a friend of s/he, have a good relation and a good communication, and the best of all: do some personal favors (even if they are not asked) so that the manager owes you something. Doing your work correctly is apparently just secondary.

martes, 15 de octubre de 2013

The java defeat (II)

Ten or twelve years ago, java was the coolest place to be for a developer. Either you wanted a website, an integration between systems, or any kind of server program, java was the first option. Job vacancies everywhere, careers, good salaries. Java was heaven.

Today, as java leaves the top of the tiobe index, things are completely different. This is my opinion about why.

In my first post, I focused on java as a language to build websites. In this one, I'll discuss how java has abandoned some its firsts targets and at the same time is getting behind on technology trends.


Learning and documentation.
When java came out, it had a huge support from the education community. Why? Because of javadoc. Java introduced something revolutionary: you could annotate your code and it generated automatic documentation: coding and documenting was done at the same time.

Even more: you could learn JDK 1.1 almost by reading the javadoc. Something that had been generated together with the code. Again: revolutionary.

But then the framework era came, and the later JDK versions. Can you learn your favourite framework just by reading the javadoc? Don't even try. And java EE6 concurrency? Of course not.

I haven't seen a single framework that includes project documentation as an output ("artifact") of coding. And even worse, everyday more, they use the "convention over configuration" paradigm. If you don't know what this means, this simple dialog explains:
-Developer: "how will my application behave?"
-Framework: "you know how it will behave".

Convention over configuration means that now, the behavior of your application is not written anywhere. A huge, non-modular xml file was a bad idea? Then how about "nothing at all"? With struts or jsf, there are some tools that draw "navigation diagrams" from the huge xml file. With "nothing at all", I don't think much documentation can be obtained.

Dynamic world.
Java is static. Even more, I love it because it is static. But I understand that if you are a guru and you build frameworks, a dynamic language comes very handy.

Ten years ago, with the war of the frameworks, more and more dynamic functionality was added to java: reflection, proxies, inversion of control... until at some point a new concept came. Yes: virtual machine languages. Clojure, scala, ... dynamic languages that are compiled into java. Scala in particular is important, because it is based in lisp, and some gurus were immediately attracted to it. These gurus diminished their interest in java or frameworks, and java really felt the blow of losing these guys. For the first time in years, there was something cooler than java itself for a guru.

Something similar happened a short time after: rhino. And after that, the V8 engine. Yes, javascript.
I have always felt a lot of respect for javascript. Even when it was a poor language to add effects to your website, and people recommended to disable it in your browser. It had a weird concept of classes, and function pointers. It was powerful from the beginning, though we just used it to manipulate the DOM and for some navigation tricks.
But a couple of years ago, javascript became a first-class citizen when it was included in the JVM, and for the first time you could write server-side programs in javascript. And then the V8 engine came and provided a faster way to run these server-side programs. And then node.js came in. And if you want to provide something like a web service now, and you have the right to choose, you will forget about the complexity of java + axis + xml + schemas + burden in the traffic + slower sites, and you will do something fast with node.js + json.

Android.
Some guys saw android like a "java vengeance" or a "java win". It is not. You don't write in java when you do android applications. It is again javascript.
Java seems completely strange to html5 and mobile devices. This is maybe the biggest recent mistake of java, and a first step to the grave. I have seen some tutorials about how to build websockets for html5: in node.js and even in php. I haven't seen anything in java.

Mono.
Just a last comment about mono. When I have to do almost anything server-side, I use java. I'm not talking about a website, I mean tasks like monitoring if something is running, or examining logs. Or sometimes connecting to an external system and doing some communication. I use java either if the server is windows or linux.

Consider now that your server is a little device with an arm processor, like the famous raspberry pi. I'll tell you something that you may not know: if you want to use java in this device, you need to contact Oracle and negotiate a license price. You can't even buy online, you have to contact them.
Because of this, many engineers are very discouraged to use java for their projects. And again, a couple of years ago a new friend came in: mono. It is a portability of C# for linux, and initially I thought it was almost a toy. But I talked later to some engineers and it is not: it is actually their first choice building software for their gadgets.

Conclusion.
So, java is not cool anymore. How could it be? Java hasn't enlisted for the recent wars: the mobile world or the little gadgets with arm processors. Java is still fighting wars that nobody cares, like the jigsaw or the clojures. Wars that come from the old .NET rivalry or the effort to recover some gurus that have moved to the JVM languages. And in the meantime, java is replaced with node.js for server-side tasks, and replaced by php CMS's, with a great billable concept of plugins, for websites.

I'm not going to diverge about the community and Oracle. I'll just say that java can't win all the wars, but at least can be a decent option if these guys think less about the JDK and more about some industry standarization. Hosting packages that offer a tomcat, jetty or glassfish. With a control panel to deploy your applications. With monitoring and backup tools. Arm support. The possibility of creating java applications for a mobile device.
It can't be that hard.

sábado, 28 de septiembre de 2013

The java defeat (I)

Ten or twelve years ago, java was the coolest place to be for a developer. Either you wanted a website, an integration between systems, or any kind of server program, java was the first option. Job vacancies everywhere, careers, good salaries. Java was heaven.

Today, as java leaves the top of the tiobe index, things are completely different. This is my opinion about why.


Java and the websites. 
As I was writing this, it became quite long, so I'll divide it in two parts. In this first post, I'll focus on java as a language to build internet sites.

The wrong war.
Ten years ago, when java thought about its big foe, it looked at .NET: big mistake. Not C#, not asp.net: the real foe of java was php. You may say: "What? That interpreted thing that mixes code and layout, and has no debug environment?" Yes. The language may not be the best, but build your site in php and you will have:
-Lots of internet providers that will give you php support, gigabytes of hosting, and a mysql database. And cheap.
-Wordpress! Or if you don't like wordpress, some other php cms tool like joomla or magento. You will get this "out of the box" from the provider!!! Literally, for 40$ a month, you can start your own website in a few hours.
-Cpanel or some other tool, so that even a guy without experience can manage different websites, databases, backups, ... all inside one hosting.
-And a much lower programming cost, of course. The cost of a php developer is always lower than a java guy. Yes, the language may not be so cool or featured, but you can start from wordpress, buy a good template and a couple of plugins for galleries or shopping cart and save weeks of time.

And what do you have in java?
-Google application engine. Have you tried it? I did, and I felt like a big time sucker. No relational databases, no threads, a time limit for your pages to return, frameworks don't work... even the java is not a real java, it is just a weird subset. 
-I haven't tried amazon, let me know if you did, and what you found. As far as I have read, they will give you an empty linux box.
-You can hire some php hosting and ask for a java installation. You may need a dedicated server for this (more expensive) and you won't have the same cpanel support, but to me, this is the best possible idea for a small business.
-Anything like wordpress in java? Not at all. The most similar could be liferay, and it is years away. But let's discuss this later.

Java focused in competing with .NET capabilities: collections, i/o, modularity. Wrong war. Java should have looked for a standard CMS, and to provide a way to be massively supported by hosting packages. Even today, with java going down, there is no popular CMS project for java.

The clash of the frameworks.
Search for "java frameworks" in google, or just take at the java section in this list of frameworks. There are dozens of them. If you build a site in php, you will very likely start from wordpress, joomla or whatever you want to choose. Those products offer a whole website out of the box, and there is a whole ecosystem of third parties that provide templates and plugins. If you want to build a website in java, you will do it from one of these frameworks. What will they provide? Just a way to create pages, little visual components, connect to databases... very fine-grained stuff. But for some reasons, ten years ago, we thought that choosing the right framework was the most important thing. And we had more and more of them, reinventing the wheel once and again, providing ways to create pages and components.

Java frameworks are necessary, yes. But they are also rigid, hard to learn, and they take time be productive. It is not unusual that you have to be searching in forums or in the framework source code for the explanation to why something doesn't work as one would expect. But the worst of all: there is no "plugin concept". You can't buy a gallery, go to a "config" page, select a zip file and be able to use it across your site. You can of course use libraries, but in most cases we are talking again about fine grained tasks. If you want to build a mansion with small bricks it will take you a long time. Wordpress provides big bricks. Java frameworks provide small bricks.

Today we learnt something: the framework in not the cornerstone. Either if you choose one or another, you will have to build your website. And you will likely not be able to use framework plugins or anything that will really save a big time in your development. Just little libraries.

Portal solutions.
There is no standard portal solution in java. The most successful is liferay. I used an old version, that only worked in jboss: it took 3 minutes to compile and build the ear file, and almost 2 to start running. It used EJB's with local and remote interfaces: adding a method related to persistence implied modifying about 7 source files.

I have read about later versions and I don't see this exact kind of complaints, but I see many about other stuff that ends in the same: build code in a rigid way, which will make you slow and improductive. And I also read about something new: undocumented features that take time to be learnt.

But even with all of that, the real power of a portal solution is to have third party solutions that you can integrate: skins, templates, portlets, plugins. Is there anything like this in liferay? As far as I know, not at all. Even more, we see very frequently that licenses avoid this: companies try to have a complete control of anything related to their product, making difficult any third-party interaction.

Conclusion.
Java is not the reference language right now if you want to build a website. Php, that was seen as a little toy, is now the first option even for big projects. But the very sad thing is that I still have no easy hosting option for a java project. Compare this with php, where you can get a hosting with wordpress, mysql and cpanel out of the box and you will understand why java goes down.

Java focused on frameworks, on servers (jboss, weblogic, glassfish,...), on .NET features, and forgot about the websites. To build a website, the best they can give you is an existing website that you can modifiy, withoug having to worry about the pieces that sustain it.

Java tried (and tries) to fight with "competitors" by incorporating more features to the language. But as a developer, I need a full stack and the language is just the bottom layer. And there are no providers for the full stack in java. Dear java world, if you are reading this, I dare you: build a whole java stack (language, database, server, CMS or portal), make it a de-facto standard, and make it easy for hosting companies to provide it. Or you can just look at how java is less and less used for the internet.