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.

Leap Motion: A small step or a giant leap?

I've been playing with Leap Motion for the last few days and here are my first impressions with this tiny device.

First, this is a great piece of hardware and there are tons of things to be done with it. However it doesn't really have compelling software accompanying it and currently not really going beyond a geek device but still it is a great geek device!! Here are my feelings in a more visual way :)

As you might see, after the shipment my package moved to Paris from Czech Republic instead of coming to Istanbul. The unpacking and installiation was quite 'appleish'. The intro and the included demos were very impressive. The first thing I expected was an out of box replacement for the mouse which this device is definitely not. After a while playing with all the apps, I realized currently most apps are just mimicking a mouse experience instead of creating a unique one for Leap. Leap motion is great device offering a new way of controls and it must be treated that way, just like the iphone first released.

The accuracy of the controller is great! You may realize it loses some finger when you do sharp moves but the accuracy is great for any idea and any app, well may be not for flying a real plane. The gem of this device is the sdk. It is designed in a beautiful way and the more you dig into api, the more you want to write code on it. The APIs are implemented and designed in a beautiful way.

After downloading the sdk from leap's website all you need to do is to follow the guidelines to set up your favourite development environment.

I built some sample apps using Java so I'll continue with the provided Java SDK. Looking at the sample app provided with the sdk, the first thing you will notice is you need to create a class which extends the com.leapmotion.leap.Listener class. Next create another class with the main method and create a  com.leapmotion.leap.controller.Controller and add your listener to the controller you just created.

// your custom listener class
SampleListener listener = new SampleListener();
Controller controller = new Controller();
// add your listener to the controller
controller.addListener(listener);

The custom listener class which extends Listener needs to implement several methods.

class SampleListener extends Listener {
    public void onInit(Controller controller) {
        //can check if controller.isConnected() and decide how to proceed
    }
    public void onConnect(Controller controller) {
        //this method is invoked after your code is connected to the device
        //it is time to decide what to listen. You can register for swipe, tap, circle... etc
        controller.enableGesture(Gesture.Type.TYPE_SWIPE);
    }
    public void onFrame(Controller controller) {
        // Get the most recent frame
        Frame frame = controller.frame();
        //this is where the fun begines, you can how many hands or fingers in the frame
        //and what they are doing such as moves, gestures...
        //lets see how many fingers are there in the frame
        if (!frame.hands().empty()) {
            Hand hand = frame.hands().get(0);
            FingerList fingers = hand.fingers();
            System.out.println("Fingers " + fingers.count());
        }
        //checking gestures is not much different
        GestureList gestures = frame.gestures();
        for (int i = 0; i < gestures.count(); i++) {
            Gesture gesture = gestures.get(i);
            if (gesture.type()==Gesture.Type.TYPE_SWIPE){
                SwipeGesture swipe = new SwipeGesture(gesture);
                if (swipe.state()==swipe.state().STATE_START){
                        float x=swipe.direction().getX();
                        float y=swipe.direction().getY();
                        float z=swipe.direction().getZ();
                        System.out.println("Swipe started at: "+ x +", "+ y +", "+ z);
                }
                if (swipe.state()==swipe.state().STATE_STOP){
                        float x=swipe.direction().getX();
                        float y=swipe.direction().getY();
                        float z=swipe.direction().getZ();
                        System.out.println("Swipe finished at: "+ x +", "+ y +", "+ z);
                }
            }
        }
    }      
}


As you might see its pretty easy to detect hands, fingers and gestures. Combining those Java's Robot class you may end up with a simple mouse replacement app for Leap Motion or integrate some gestures to your favourite IDEs debugger to debug your code with simple gestures.

Leap Motion is a giant leap as a hardware unit which currently comes with a small step in software. However the opportunities are endless and what can be done with this little device is all up to your imagination!