Wednesday, 28 January 2015

Finally my book is out: Professional Java EE Design Patterns



Finally it is on ink and paper! Well or on a screen if you prefer :)

It was quite challenging and tiring to write a book which might be the most underestimated thing I have done in my life! I was lucky to have a great co-author and great people from Wiley (Adaobi, Mary, Jim...) without whom i would definitely end up just putting those into my blog.

You may find more details below and click on the pic to buy from Amazon, hope you enjoy ;)




Master Java EE design pattern implementation to improve your design skills and your application’s architecture.

Professional Java EE Design Patterns is the perfect companion for anyone who wants to work more effectively with Java EE, and the only resource that covers both the theory and application of design patterns in solving real-world problems. The authors guide readers through both the fundamental and advanced features of Java EE 7, presenting patterns throughout, and demonstrating how they are used in day-to-day problem solving.

As the most popular programming language in community-driven enterprise software, Java EE provides an API and runtime environment that is a superset of Java SE. Written for the junior and experienced Java EE developer seeking to improve design quality and effectiveness, the book covers areas including:
  • Implementation and problem-solving with design patterns 
  • Connection between existing Java SE design patterns and new Java EE concepts 
  • Harnessing the power of Java EE in design patterns 
  • Individually-based focus that fully explores each pattern 
  • Colorful war-stories showing how patterns were used in the field to solve real-life problems 
Unlike most Java EE books that simply offer descriptions or recipes, this book drives home the implementation of the pattern to real problems to ensure that the reader learns how the patterns should be used and to be aware of their pitfalls.

For the programmer looking for a comprehensive guide that is actually useful in the everyday workflow, Professional Java EE Design Patterns is the definitive resource on the market.

Monday, 12 May 2014

The needle and the damage done... Orcl vs Goog

Last week Federal Circuit overruled Judge Alsup's decision on Java API Copyrights. Minutes later tweets from Oracle employees started rolling out.


Mark Reinhold, Chief Architect of Java Platform and an engineer in Java Platform since from the very early days, was happy about the decision. However,  when I took my Android Developer hat off, even I was a bit worried about the decision. Let's go back few years which I am pretty sure Mark will also remember pretty well from his early Sun days...

In October 8, 1997 Sun Microsystems filed a suit against Microsoft for monetary damages of $35 million because of violating Java licence agreement. The real story was, just after its launch Java Applets took off and gained a huge popularity. Suddenly the web has transformed from static text pages to fancy animations. Dancing Duke logo was almost everywhere. Microsoft was very happy to adopt and integrate Java. Actually they even went further and wanted to make it better in their way which was definitely wrong and broke the compatibility between JVMs. Sun took action and sued Microsoft winning $20m, the largest cash they ever won over Java. It was a big war against an enemy and we were all happy and proud. 

However, Java did not win as we expected. We (the community) lost the applets. The moment Sun loaded their guns, Microsoft started working on .Net platform copying the whole vm, collections, code syntax and many other great ideas from Java platform. Meanwhile they also stop shipping JVM and pulled out the current deployed one. Suddenly the applet miracle has turned out to be a compatibility hell. Flash and Javascript fight to take over the place but both were not yet mature enough to fill the gap for some time.

Sun won against Microsoft but lost the whole desktop and web world. Applets and later swing has left to die and Java became a serverside language while retreating from the front end. 

Meanwhile mobile phones took off and Java once again gained a huge popularity. Java ME rocked the mobile world until iPhone was released and changed the whole mobile world. Almost all existing mobile phone, OS and platform producers were unprepared with such a fast and huge change. Symbian and all other major platforms which Java ME was deployed has died, pushing Java ME to a certain death. We can all blame iOS but the truth was Java ME did not receive any big updates to make use of the new tech hardware and put pressure on Apple or any other vendor to ship JVM with their devices. Oracle and Sun might have been left out of iOS but they haven't been in Windows Mobile either. I remember writing .Net based apps as Java developer just because I could not find a stable JVM on WM5 and WM6.

Meanwhile Google bought Android and launched another mobile ecosystem striking back far from behind. Unlike iOS, this platform was much more Java friendly. There were no JVMs but still there were some compilation tricks to make the developer feel that they were just writing Java code. Android became the only real survivor from the iOS revolution and became a huge player.

We may argue if Google did the right thing with creating another JVM standard or not but there is no doubt that they kept the Java community and the ecosystem alive by providing a mobile platform which uses Java language and JVM for development. Thanks to Android (and GWT), many developers installed JVM, Java tools and continue writing Java code. Believe it or not Google had a huge role on keeping Java and its community alive and health. Without Google's non-JVM Java products such as Android and GWT, Java might have already became the new Cobol being trapped on serverside only.

Today, with the latest ruling, Google can just walk away from Java language. Android is already huge so whatever language Google chooses to continue with will be accepted by the community no matter if they like it or not. However, taking Java out of Android will be the end of Java in the mobile world, lowering number jdk/jre installs, usage of java and damaging the ecosystem with a real fork this time unlike the current virtual one.

Finally back to tweets, Donald who is an OpenJDK guy and whom I also know from his previous work in eclipse send the following tweet...

Definitely Oracle will make a huge cash from this ruling but for the sake of loosing a big part of the ecosystem. I just wish at least community guys at Oracle would care more about the community than Orcl shares.

I personally believe APIs should not be copyrighted but let's forget what I, Oracle or the judges believe... This will be the end of Java on mobile forever! 

Ohh unless Oracle really thinks they can survive with JRE on Raspberry Pi...

p.s. There is no typo in the title, since this war only about money I though it makes sense to use the stock exchange symbols instead of full company names.

Monday, 28 April 2014

Managing Success in Devil's Triangle of Software; Projects, Project Managers and Developers

I am not a project manager of any kind and never interested to be one. I am not a huge fan of non-tech posts and talks but just had an incident which gave me the idea to post my thoughts and experiences.

First what is project management? Since there are projects we do need project managers and management right? But what about those github projects or hackathons which has rock solid outputs in lightning strike time where most real paid projects fail miserably. So do we really need project managers? Let's start with describing the verb 'manage'.

Clearly we need something to control or direct to manage it. Can we control the projects or can we direct them? Apparently not, but we can control and direct people! So project management is actually not a real fact at all but the team management is.

So how do we manage teams? First thing we need is a team to manage. Let's describe the 'team'.
Clearly a team does not mean just a bunch of people who is just standing next to each other. A team must be competing and working together! Just like the third meaning above if the group who is pulling the wagon is not moving the same direction then that would not form a real team.

So first we need to do is to form a real software team who will work, act and develop together which can be managed. So next question how do we manage a technical team?

Technical people love and respect great technical people, you need to be more technical than them. If you ask who I respected most in my whole my career, was someone who was much more technical than me. I could easily accept his decisions and happy to see him as a boss or manager. So want to control the team? Be technical, learn the technologies you are planning to use. Try to stay one step ahead but not just show off, the team will respect you if they know they can get your advise and trust what you say.

Don't start with overriding them. Be open to every approach, decision or idea. Give them space to prove what they think by a small project or prototype. Challenge different ideas, let each party to agree on the best one. Accept good ideas, never hesitate to step back from yours. If someone else has a better approach accepting his way does not make you weaker. It just means he had a better solution but you are wise to see his approach is good. If you just override for the sake of keeping control in hands you will only lose respect.

The leader may need to give up some of his technical work hours to keep the team away from non tech details. The leader needs to be a leader not only be respected but also be trusted. The best way to achieve this status is to keep developers free of non technical duties and knowing them you will handle management pressure and their non technical problems. The more the team knows you are putting yourself between them and management to watch their back, they will watch your back! You may be surprised how tight and even impossible deadlines can be achieved if you are working with a bunch of friends who trying to watch your back instead of just professional developers. If the team doesn't want to log work and the management asks for it, either make the management accept it or do it on your own. You will be surprised how the team will fight back for you either keeping the deadlines or start logging. Just make them see you are there for them.

If you will be responsible for a team, it would be best if you hire that team which may not be possible most of the time. Still if you have any chance to meet, interview or decide who is going to be hired, take your part. I have seen lots of examples where non technical people hiring technical people and ask the team to work with them. Try to be a part of the hiring process and also let other members of the team join you. Let the team decide who they want to work with not the managers!

It is best to work with the best team but you can't always have a choice. If possible work with the best, if not it is ok. Each project will have different needs and roles, just try to give responsibilities according to the skills and interests. You can easily find something suitable to someone which would let other engineers to work more efficiently while getting input from everyone. One of the best team I ever been in had different level of engineers. Yet we could always find a way to split responsibilities and keep everyone busy and engaged. Good engineers don't like the repeated works and not so good ones may find it hard to invent new stuff, just do a fair share.

Next make your team feel special, for working with you and with each other. You probably may have heard how Steve Jobs canibalized Liza with the team of pirates he formed for the macintosh team. Although I have never been a fan of competition in a team, it is great when its between teams. Make your team feel special like the pirates of Jobs, let others see how you and your team feel special. One of the best team I worked with, we used to call ourselves as the A team, we designed special tshirts for the whole team and let everyone in the company know how good we were and enjoying what we do. Basically what we were doing was just a simple web app.

Being professional is not enough, be friends with the team. Go out drinking, or talk on not work related stuff. Want them to talk about their problems? You talk about yours first and once they do, try hard to help them. Who would watch your back? a friend or a perfect professional. A great developer may just stop delivering his work if he is not happy with management but a friend would not do that just not to put you in trouble. I have seen several examples where a developer was about to leave but still delivered his best just to help his friends in the team.

Still not convinced and believe the projects needs to be managed to get estimations and decide on timelines? First if you already have solid deadlines in your or management's head and not even consider team's estimations, please just cut the crap and don't even ask for estimations!
Else just let the team prepare a queue of tasks (sure you/they can use scrum way of backlogs, poker games...). Let developers to make estimations, preferably just units not time. Let them deliver tasks on intervals like sprints. Try to have working prototypes as much as possible. Start with pen and paper wireframes, working mockups, half functional products and let everyone see what is working.

Don't just put developers under ruling of someone filling an excel sheet or drawing bars on microsoft project and expect them to accept they will be paid less and respect him/her. Instead find or be a technical leader for the team which the team will respect the fact he/she should be paid more than them.

Tuesday, 3 September 2013

Windows 8, The Frankenstein

A little background about me, I have been using MacOS as my primary OS for the last 5 years, had been using windows since 3.1 as the primary OS prior to that and have been using Linux for the last 10 years time to time. After sticking to mac for so long, now I am exposed to Windows 8 through an ultrabook with touch screen. While using Windows 8, I came across the news that Steve Ballmer is going to retire from his job as the CEO of Microsoft.

Frankenstein is popular novel where Victor Frankenstein creates a creature using body parts from corpses as a scientific experiment. However, Frankenstein, the creature turns out to be evil.

Windows 8 gave me similar feelings with the touch experience. I have used a touch enabled laptop before, thanks to chromebook pixel. The experience was not smooth either but pixel can easily be used via touching. However it was a more frankensteinish experience with Windows 8. First of all the OS and the hardware are not really beware of each other, as you touch the screen the OS starts thing itself as a tablet and fires the touch keyboard on every input enabled field which may become weird. As an example if you swipe the screen to unlock and get ready to type your password you might be disturbed by the touch keyboard which would disappear as you type on the physical one. The experience is not blocking but not smooth either. Since the OS is aware there is physical keyboard attached, it should be pretty easy to not show up the touch keyboard on ultrabooks.

As you get used to touching and trying to use apps, you realize the apps and OS is strickly tight to its roots and not really designed to be used via touch. Its something like Frankenstein who took the old os, with a touch screen from ipad and trying to mimic the mouse with the finger. The experience does not get better if you avoid touching, just like your palm touching the touchpad as you type, you may accidently touch the screen as you are reading, typing or carrying your laptop and unlike smart software disabling your touchpads as you type you do not have any support from OS for touch screen.

I believe resisting to change and holding to your comfort zone is a sign of getting old and windows 8 is not only holding to its own roots its also holding to apple's roots instead of creating something new. I am really looking for Ballmer's departure and someone new to get on board.

Friday, 2 August 2013

I'll be speaking... at JavaOne, jDays and GWT.create

So here is my conference talks schedule for the following months...

JavaOne, San Francisco September 22-26
- The Zodiac of OSGi: Meet Eclipse Libra, Virgo and Gemini 
- Eclipse Orion: The IDE in the Clouds
- Mobile Java with mGWT: Still "Write Once Run Everywhere"
- Eclipse Orion: Your IDE in the Clouds

jDays, Gothenburg November 26-27
- Paranoid Android
Mobile Java with mGWT: Still "Write Once Run Everywhere"
The Zodiac of OSGi: Meet Eclipse Libra, Virgo and Gemini 

GWT.create, San Francisco December 12-13

I'll be updating (updated!) this post as the exact dates and schedules are announced. Stay tuned if you will be around at given dates.