sábado, 1 de junio de 2013

March 2013 - Numbers showing quantitatively the usage or deployment of free software.


March 2013 Web Server Survey

Around 70% of web servers use free software. Besides the second position of Microsoft IIS web server is in risk in the following months by nginx, perhaps the future competitor of all powerfull Apache web server.

Desktop Browser


This nitche is pretty stable with few changes in the last 2 years. Free software are only around 23%, perhaps the reason has relation with desktop operating system.

Mobile/Tablet Browser 


No many change in the case of Mobile/Tablet, only 20,73% user free software. Althought this figures are different if we analyse only mobiles, since Ipad share distorts the numbers.

Worldwide Smartphone Sales to End Users


In the smartphone operating system (OS) market, Android continued to increase its lead, with nearly 50 percent more Android smartphones in the market than a year ago. And it is important to note that new operating system has appeared, Firefox OS.

Desktop Operating System

The same history again and again, GNU/Linux did not know the way to increase its share in this market. But the thing could change with Android OS in tablet, for example, Ubuntu closes first bug “ Microsoft's computing dominance” with the comment of the bug report:"Android may not be my or your first choice of Linux, but it is without doubt an open source platform that offers both practical and economic benefits to users and industry." Maybe the first step for a change.

Open source communities
 


Here we can see a few free software projects communities size, for instance, Windows 7 has a total of 920 developers.

Industries Adopting Open Source


Government should be leading the way.

Linux adoption growing to suport cloud & Mission-Critical workloads


Spanish Public Administrations


* Data in percentages.


Resume


Free software share Actors
Web server 68.94% Apache, nginx
Desktop Top Browser 22,91% Firefox
Mobile/Tablet Browser 20,73% Android
Worldwide Smartphone Sales to End Users 74,4% Android
Desktop Operating System Market Share 1,26% GNU/Linux


-oOo-


References:


viernes, 31 de mayo de 2013

Free software a possible activity for spanish productive model

Let's go to see real models of free software strategies in public administration.

Munich (Germany)
The administration of the city of Munich in Germany has completed the switch to the open source desktop. The IT department is now securing the strategy, to make sure it can be maintained by the city and to sustainably support interactions with citizens, businesses and other public authorities.

The city is now using a unified desktop system, Limux, its own distribution based on the Ubuntu Linux open source operating system and open source applications, on 14,000 of the total 15,000 desktops, spread over 51 offices across the city. That is 2,000 more than it's intended goal, using Limux on 80 % of its desktops.
Hofmann, head of the migration project,  stressed that saving money was never the primary aim. However, he said that moving to open source saved the city over 10 million euro so far.

Extremadura (Spain)
The government of Spain's autonomous region of Extremadura has begun the switch to open source of it desktop PCs. The government expects the majority of its 40,000 PCs to be migrated this year. Extremadura estimates that the move to open source will help save 30 million euro per year.

French Gendarmerie (France)
The French Gendarmerie is migrating some 90,000 desktops. Moreover the Gendarmerie estimates dramatic savings from using free open source software that amount to nearly 7 million Euros per year (2 million euros in licences).

Resume
 
Administration Country Number of desktops Saving (5 years) Saving a Desktop
City of Munich Germany 14,000 10,000,000.00 € 714.29 €
Autonomous region of Extremadura Spain 40,000 30,000,000.00 € 750.00 €
French Gendarmerie* France 90,000 35,000,000.00 € 388.89 €







Calculus

What it would happen if we do calculus for desktop of General Public Administration of Spain. Here, the figures
-->
Administration Country Number of desktops Saving (5 years) Saving a Desktop
General administration (mean)


520.83 €
General Public Administration Spain 450,012 234,381,250.00 € 520.83 €
Local Administration Spain 344,378 179,363,541.67 € 520.83 €
TOTAL

413,744,791.67 €
Direct Employment equivalent (for example programmer or support operator)

3,310
 
Result

    - Direct saving of licences, SO, office suite, antivirus system, ...
    - Ease of maintenance delivers significant time savings
    - Seamless integration simplifies processes

Conclusion
 - Saving of 414 million of € in 5 years, we could employ 3,310 programmers or support operators. (It is important to note that Windows 7 has a total of 920 developers, we could develop 3 new versions of Windows )
 - How many new employees around this business of free software will be create, direct and indirect employment.
 - How many companies could take advantage of use free software product in different ways, internal cost (licenses, better support, ...) and more competitive products using firmware base on free software.

Spain needs new ideas and activities in its productive model, maybe and I am convinced that this would be one of them. And public administrations should encourage local employment.


References

domingo, 26 de mayo de 2013

Android - Inter Process Communication

What the best way to do inter process communication (IPC) in Android between activities, the answer is parcelable

you need to implement an interface Parcelable

import android.os.Parcel;
import android.os.Parcelable;

public class UserParcelable implements Parcelable {
    private Integer mID;
    private String mName;
    private String mDescription;

...

} 


 and override the following method:
- writeToParcel(Parcel out, int flags): You should implement serialization of the object.


    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(mID);
        out.writeString(mName);
        out.writeString(mDescription);
    } 

- describeContents(): You should define the kind of object, for instance using hashCode().

       
    @Override
    public int describeContents() {

        return hashCode();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((mDescription == null) ? 0 : mDescription.hashCode());
        result = prime * result + ((mID == null) ? 0 : mID.hashCode());
        result = prime * result + ((mName == null) ? 0 : mName.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        UserParcelable other = (UserParcelable) obj;
        if (mDescription == null) {
            if (other.mDescription != null)
                return false;
        } else if (!mDescription.equals(other.mDescription))
            return false;
        if (mID == null) {
            if (other.mID != null)
                return false;
        } else if (!mID.equals(other.mID))
            return false;
        if (mName == null) {
            if (other.mName != null)
                return false;
        } else if (!mName.equals(other.mName))
            return false;
        return true;

    }
       


- Object CREATOR: You should implement de-serialize your custom data objects from Parcel.

   public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
        public UserParcelable createFromParcel(Parcel in) {
            return new UserParcelable(in);
        }

        public UserParcelable[] newArray(int size) {
            return new UserParcelable[size];
        }
    };
       


- Constructor: You should define a constructor with parcel as argument.

       
    UserParcelable(Parcel in) {
        mID = in.readInt();
        mName = in.readString();
        mDescription = in.readString();
    }
    

It is important to note that using parcelable object than serializable object is sometimes up to 15 times faster. (http://blog.rocapal.org/?p=560)



jueves, 23 de mayo de 2013

The most important state diagrams in Android

ACTIVITY

The following diagram shows the important state paths of an Activity:

SERVICE

The following diagram shows the important state paths of a service:

miércoles, 22 de mayo de 2013

Android Components

Android components
    - Activity
    - Service
    - Content Provider
    - Broadcast Receiver



Application components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.

There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.

Here are the four types of application components:

ACTIVITIES [User Interaction]
    Activities are components that interact with the user and represents a single screen with a user interface, an activity is a single, focused thing that the user can do. For instance, an instant message application might have one activity that shows the list of contacts, another the conversation detail, and another activity for sending emails. Although all of them work together in an application, each one is independet of the others. As such, a different application could start any one of these activities.




  
 An activity is implemented as a subclass of Activity.

 public class MyActivity extends Activity {
     ...
 }


public class Activity extends ApplicationContext {

     protected void onCreate(Bundle savedInstanceState);

     protected void onStart();
    
     protected void onRestart();

     protected void onResume();

     protected void onPause();

     protected void onStop();

     protected void onDestroy();
 }



Declaring the activity in the manifest
<manifest ... >
  <application ... >
      <activity android:name=".ExampleActivity" />
      ...
  </application ... >
  ...
</manifest >


Starting activity
Intent intent = new Intent(this, SignInActivity.class);
startActivity(intent);


Android developers -> Activity
http://developer.android.com/reference/android/app/Activity.html
http://developer.android.com/guide/components/activities.html


SERVICES [Service Provider]
A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. A service does not provide a user interface. For instance, a service might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it.

Because it is sometime misundestood let's go to show what it is not
    - A Service is not a separate process.
    - A Service is not a thread.

Traditionally, there are two classes you can extend to create a started service:
    Service

        IntentService (This is a subclass of Service that uses a worker thread to handle all start requests, one at a time)

Declaring a service in the manifest
<manifest ... >
  ...
  <application ... >
      <service android:name=".ExampleService" />
      ...
  </application>
</manifest>


Starting a Service
    Intent intent = new Intent(this, HelloService.class);
    startService(intent);


Android developers -> Service
http://developer.android.com/reference/android/app/Service.html
http://developer.android.com/guide/components/services.html


CONTENT PROVIDERS [Data Provider]
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process. Application could store the data in the file system, an SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data.

    A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions.
public class ExampleProvider extends ContentProvider {
...
 public Cursor query(
        Uri uri,
        String[] projection,
        String selection,
        String[] selectionArgs,
        String sortOrder) {
...
}



Android developers -> Content Provider
http://developer.android.com/guide/topics/providers/content-providers.html
http://developer.android.com/reference/android/content/ContentProvider.html


BROADCAST RECEIVER [System Event Listener]

A unique aspect of the Android system design is that any application can start another application’s component. For example, if you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. When complete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application.

Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.

Broadcast Receivers enable reception of intents from the system or other applications without running other activities or services of the application.

A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object.

Android developers -> Broadcast Receiver
http://developer.android.com/reference/android/content/BroadcastReceiver.html


viernes, 29 de marzo de 2013

Netiquette for newcomers (Everyone was a newbie once)


People take different roads  seeking fulfillment and happiness.  Just because they’re not on your road  doesn’t mean they’ve gotten lost.
    Dalai Lama XIV

It is important to note and understand that newcomers and veterans are both necessary for and valuable to the community. For that community should look after newcomers, since they will be the veterans in the future, and without them the community and project is not sustainable.  If a project doesn't make a good first impression, newcomers rarely give it a second chance.

The free communities should offer to newcomers a least:
  •  Setting up a project web site that's infomative to newcomers
  •  A guidelines for newcomers (Beginner's Kit/Etiquette Guide)
  •  A groups of members with few experience. (news.announce.newcomers)
  •  Getting starting section.
  •  Every channel topic is a brief message each user sees when they first enter the channel.
  •  Tasks easy to do.
  •  Assigning a mentor.
  •  Section of common errors.


Newcomers may be annoying to other members of community. They ask the wrong questions, including ones that seem obvious (or whose answers seem easy to find). But lots of valued contributors started out this way, and treating newcomers kindly makes them more likely to turn into the valuable community members.

So while you don't have to humor them or suffer them gladly, and it's fine to point out when they make mistakes, point newcomers in the right direction in addition to turning them away from the wrong ones, and be kind to them in the process of correcting their transgressions.

The community manager should promote online or onsite training events for expert members in general and newcomers in particular.

A good way to determine what to include is to base the document on the questions that newcomers ask most often, and on the complaints experienced developers make most often.

As a project acquires history and complexity, the amount of data each incoming participant must absorb increases. Those who have been with the project a long time were able to learn, and invent, the project's conventions as they went along. They will often not be consciously aware of what a huge body of tradition has accumulated, and may be surprised at how many missteps recent newcomers seem to make. Of course, the issue is not that the newcomers are of any lower quality than before; it's that they face a bigger acculturation burden than newcomers did in the past.


[0] Wikipedia:Please do not bite the newcomers (http://en.wikipedia.org/wiki/Wikipedia:Please_do_not_bite_the_newcomers)
[1] Welcome to the wiki of The Document Foundation Jump to: navigation, search (https://wiki.documentfoundation.org/Netiquette#Dealing_with_Newcomers)
[3] Producing Open Source Software, Karl Fogel

miércoles, 27 de marzo de 2013

Handling Conflict and Relationships


"Reason and emotion are not antagonists. What seems like a struggle between two opposing ideas or values, one of which, automatic and unconscious, manifests itself in the form of a feeling."

Branden, Nathaniel

This is a entry of the most sensitive topics in community leadership, handling conflicts and relationships in the community free software (and in others communities) and is completely based on the book The art of Community by Jono Bacon and I try to make a brief summary.

The Nature of the Beast
    Conflict is part of every communities and projects, sometimes people just don’t get on in, and so you should handle them.
    Conflict is the acid that slowly erodes community, then it causes an uncomfortable and unpleasant environment for volunteers, for that reason Community Manager (CM) should handling conflicts as soon as possible and in a properly way.
    On the other hand, it is important to note that maybe conflicts are proof of a alive community.
   
    - The Structure of Strife
    The members of a community has confident/free-thinking personalities, different incompatible goals/values and personal way of interaction. Typically the participants in the conflict are  often strong personalities who are not afraid to speak up when they are unhappy. Community Manager should perceive goals and values of members.  The manner in which these personalities interact that causes the strife, and Community Manager should perceive the real reality of members in conflict.
    Conflict resolution in a volunteer community is very different from conflict resolution in a formal organization such as a company or a government agency, because community members usually are volunteers and also don't want lots of conflicts in their "hobby".

The Calm Before the Storm
    Frankly, experience is the academy for handling conflicts, every conflict teaches you a new lesson. CM should have the ability to detect a conflict as soon as possible, although every community and member is different, Community Manager should have the enough knowledge for that.    

    - Contentious Personalities
         In principle, everyone in a volunteer community is welcome to join and participate, there is not filter about personalities, openness as the norm.
            Community Manager should profiling the polemical understanding personality differences, there are reasons for that differences: age, culture, opinions, and experience. it is essential to understand the importance of allowing people to mature in these attributes.
            Sharing feedback about personality issues: Communicating feedbacks sometime are unpleasant, but it is the right thing to do. CM should gently and sensitive manner share every feedback, and for doing that it is important to note the email and chat channels are not the right mediums for this kind of feedback.
            It is a pity but in community sometimes are poisonous people. But we should keep in mind that expressing concern does not make people poisonous, but privately discussion against community does, discussion and debate must be in the common communication space. CM should identify poisonous people and watch them carefully.
        - Barriers to Input: The community ought to have the slogan "community should always feel that their input and contribution is welcome". Therefore it is important for Community Manager to handle communities with commercial sponsor and members paid for it and volunteers.
    There should be resources that encourage people to submit their ideas and views, for instance, mailing lists, brainstorm website, public IRC channels, sponsored  developer participation.
    Community Manager should ensure that feedback, opinions, and ideas are discussed, considered, and engaged with.
        - In communities are usually leaders in some areas where may appear problems with responsibility, like governing members, team leaders, community managers, and sponsored leaders. And for each of them the community will expect a certain degree of professionalism, responsibility, and responsiveness.
     In community should avoid a single person has too much responsibility and control over a given part of the community, because it could be a bottleneck.
        - Lack of Justice: Justice must be done and it must be seen by community to be done. Every member's conflict must be dealed by Community Manager.

The Conflict Resolution Process
  1.     Calm and reassure.
  2.     Get the facts.
  3.     Discuss.
  4.     Document.
  5.     Reflect and maintain.

    The Role of a Facilitator
    Community facilitator or mediator must secure the trust and confidence of the conflict parts. The profile of the facilitator must
            Be objective: There are a few simple best practices: Be honest, admit when you are wrong, don’t wear the flame suit, don’t be afraid
            Be positive: Conflict is not fun for anyone involved, but positive stance and good humor can break down strife.
            Be open: Equality with all participants in the conflict
            Be clear: Facilitator has to communicate clearly to all parties involved the expectations: Solutions are the goal, evidence is central, conduct must be under control, and compromise is the modus operandi.

Dealing with Burnout
    Detecting and Treating Burnout
    Required rest and relaxation
    Work/Life Balance
    Addiction

Handling Absence
    Firstly, it is to ensure the community member is ok, and help him it is possible.
    There are many reasons why people may leave, but they can be broadly divided into three categories: Planned, gradual and abrupt. The community manager should always encourage a culture in which your community members inform one another when they are going away for a while and also encourage a culture of leaders stepping down gracefully.

Handling Bereavement
The death of a community member can be a challenging and difficult time. Although this was a sad time, the way the community came together to support one another, celebrate member’s memory, and be there for one another as a family was a memorable and
warming experience. 

References:
[0] The Art of Community (Jono Bacon) http://www.jonobacon.org/2012/12/06/the-art-of-community-update/