sábado, 19 de octubre de 2013

libgtk flavours

libgtk is one of the most known and used widget libraries. As the base of the GIMP drawing toolkit, as well as the base of the GNOME desktop environment, it has been a very active Open Source project in the last years.

In general, GNOME platform, together with glib, libgtk and many other libraries, it is not only a mechanism to implement graphic applications for GNOME desktop, but also a complete tool set to implement very different applications in top of varied purpose programming languages. Some examples of this kind of different libraries are:

- Pango: for text rendering
- Cairo: for 2D graphics rendering
- GStreamer: as Multimedia library for audio and video reproduction
- PulseAudio: as proxy for sound applications

Back to libgtk, this is basically a C library that allows programming widget base applications. However, there is a whole bunch of bindings to another languages that help on using and expanding the library to a wider set of programmers. Regarding this bindings, there are two well differentiated groups [1]:

- GNOME supported bindings:

Language2.102.122.142.162.182.202.222.243.03.23.43.6
C++ O [#][#][#][#][#][#][#][#][#][#][#][#]
C# O [#][#] _  _  _  _  _  _  _  _  _  _ 
Java O [#][#][#][#][#][#][#][#][#][#][#][#]
Python O [#][#][#][#][#][#][#][#][#][#][#][#]
Javascript O [#][#][#][#][#][#][#][#][#][#][#][#]
Vala O [#][#][#][#][#][#][#][#][#][#][#][#]
Perl O [#][#][#][#][#][#][#][#][#][#][#][#]

Legend

  •  O  Official GNOME Binding
  • [#] Supported
  •  @  Partially Supported
  •  _  Unsupported

Among the languages supported by GNOME, several of the most used programming languages are found, as C++, but also Java, Javascript, Python and Perl and C# (all of them are included among the 12 first places of the Tiobe programming language ranking).  It is somehow surprising that a minority language as Vala is also supported, indeed very well supported, from 2.10 to 3.6 versions, all GTK released versions are supported.

- GNOME unsupported bindings:

Ruby[#][#] @  _  _  _  _  _  _  _  _  _ 
Pascal[#][#][#][#][#][#][#][#] _  _ [#][#]
PHP[#][#][#][#] _  _  _  _  _  _  _  _ 
R[#][#] _  _  _  _  _  _  _  _  _  _ 
Lua[#][#][#][#] _  _  _  @ [#][#][#][#]
Guile[#][#] @  _  _  _  _  _  _  _  _  _ 
Ada[#][#][#][#] @  @  @  @  @  @  @  @ 
OCaml[#][#][#][#] _  _  _  _  _  _  _  _ 
Haskell[#][#][#][#][#][#][#][#][#][#][#][#]
FreeBASIC _  _  _  _  _  _ [#][#][#][#][#][#]
D _ [#][#][#][#][#][#][#][#][#][#][#]
Go _  _  _  _  _  _  _  @  _  _  _  _ 
Fortran _ [#][#][#][#] _  _  @  @  @  @  @ 


Legend

  •  O  Official GNOME Binding
  • [#] Supported
  •  @  Partially Supported
  •  _  Unsupported

Among unsupported languages, it is surprising that Ruby and PHP languages (13th and 5th most popular languages according to Tiobe programming language ranking [3]) are not supported bindings.

But, apart from the C++ binding, which is indeed the main development programming language on this project, which is the most popular binding ? Not much information is provided regarding this on the Internet, but initially, as one of the most popular programming languages, C++ and Java should be two of the most popular bindings. However, as an starting GTK developer, another binding always appears when looking on the Internet for information regarding GTK. That binding is pyGTK, So, from my ignorance, I would dare to assert that C++, Java, and Python should be the most used GTK bindings.

But why also Python? Well, as also a newbie in this programming language, I consider that the ease of programming with this programming language, as well as its increasing popularity in the Open Source scene, (obviously apart from Java, C/C++), help on this binding to be one of the most active ones.

But is Python on GTK really so easy? Well, a good example of this fact is the comparison of a GTK hello world provided by Tom Lee on his blog [4], Compared to other languages, it is shown that languages as Ruby, Perl or Python allows coding a "Hello World" application in much less words and lines that in other languages such as C:

- libgtk "Hello World" on C programming language:

#include <gtk/gtk.h>

int main (int argc, char **argv) {
  GtkWidget *window;
  gtk_init(&#038;argc, &#038;argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Hello, World");
  g_signal_connect (G_OBJECT (window), "delete-event", gtk_main_quit, NULL);
  gtk_widget_show_all (window);

  gtk_main();
  return 0;
}

- libgtk "Hello World" under Python programming language:

import pygtk
pygtk.require('2.0')
import gtk

window = gtk.Window()
window.set_title('Hello, World')
window.connect('delete-event', gtk.main_quit)
window.show_all()
gtk.main()

So, an eye must be kept on Python language binding, as it seems to be one of the most used and alive GTK bindings nowadays.

To summarize, no excuses around programming language used allowed to start programming visual interfaces on top of GTK, A wide bunch of  bindings are supported, and several of them around the most used and easy programming languages.

References:
[1] http://www.gtk.org/language-bindings.php
[2] http://tomlee.co/2008/01/gtk-hello-world-in-six-different-languages/
[3] http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[4] http://tomlee.co/2008/01/gtk-hello-world-in-six-different-languages/

sábado, 5 de octubre de 2013

Some numbers about Eclipse usage per programming language

Eclipse development tool set is, no doubt, one of the most popular development tools. Although difficult to estimate how big this popularity is, Eclipse is one of the most popular due to different aspects such as:

- Its modular architecture, plugin based.
- Its flexibility, as it can be used for different programming language, and to implement different type of tasks.
- Its ease of use.
- Its OpenSource nature, with all the benefits that this convey.

However, it is difficult to find market share statistics around Eclipse usage, as, due to its flexibility, it is present on different development tools market, being also hard to compare on a per programming language basis.

An interesting issue to explore are the profiles having to do with developers that download Eclipse. Next very interesting graphics, provided by eclipse howl, show the different flavors downloaded from Eclipse Kepler version after one million downloads:



From this graphic, it is obvious that Eclipse is mostly used for Java programming language. Considering that Standard version is, above all, suitable for Java developers, the total per-share percentage of usage for Java programming language above 84 %.

Another interesting graphic from eclipse howl, shows the statistics associated to the previous version of  Eclipse, Juno. In this graphic it can also be appreciated that Java was also the predominant programming language:



Based on this graphic, some assertions can be made on the programming languages used inside Eclipse:

- Java is the most used programming language for Eclipse.
- C/C++ programming appears always as the second programming language being used.
- No third programming language appears associated to the Eclipse version. The rest of flavors are, indeed, more functional oriented, in terms for flavors for Mobile, flavors for Modelling tools, Flavors for Parallel application development, and so on, and so forth.

However, some differences can also be observed from previous graphics [1]:

- Mobile flavor has disappeared.
- C/C++ flavor continue to decrease its position
- Java continues to increase its position respect to the rest of programming languages (72% -> 84%)

Some doubts can appear around the usage of Eclipse for other programming languages. How do we know that Python, in example, with its PyDev plugin, is not being widely used, even more than Java?

With the lack of statistics around this issue, another good thermometer for this per programming language usage of Eclipse is the Eclipse OpenSource developer report. This report shows some statistics around Open Source issues and development usage, such as:
- Operating System.
- Application server.
- Server Framework.
- Source code control version system.
And, of course:
- Programming language.

Java programming language predominance can also be observed on this report, with a share of 67%. Very far is C++, with 11% share, PHP, with 5%, Python, with 4%, C, with 3% and JavaScript, with also 3%:



So, to summarize, Eclipse is a nice set tool for programming but, indeed, there is no doubt that it is an indispensable development tool for Java.

References:
[1] eclipse howl: http://eclipsehowl.wordpress.com/
[2] Eclipse OpenSource developer report: http://www.slideshare.net/IanSkerrett/eclipse-survey-2013-report-final

sábado, 28 de septiembre de 2013

Python Package Managers

Python programming language is consolidating its position among the most used programming languages, only after more consolidated languages as C/C++ or Java.

Far from being just a scripting language, Python is being widely deployed to other functionalities such as Web programming (with Django as a powerful driver), Mathematics, Graphics and Game programming, and many other [1].

As a consequence of Python increasing popularity, many attention has to be paid on how Python programs are packaged and deployed, especially when talking about Open Source Python software.

For a Python programming newbie, it is essential to know the existence of Python Package Index (PyPI). But, which are indeed the main causes of having to use PyPI. Better than anyone, Alex Clark's blog collects a good reason of them [2]:

- "Everybody wins": As PyPI is the center, canonical place of Python packages.
- "It is the Right thing to Do": As PyPI is a software release server, that can even be considered as a backup for those software projects that host their own release servers.
- "Because it does not have to be perfect": As developers and maintainers of the place are happy to consider all recommendations, being conscious that it is not as "sexy" as Github, Bitbucket or other places.
- "Because it is not that hard": Packaging and deploying software on an structured basis as the one proposed by PyPI, and although some issues are still there, such as "easy_install" performance, important efforts are in progress for Python setuptools to improve day by day.

Besides this, some alternatives are being provided in order to fix issues with easy_install. In particular, a tool for installing and managing Python packages, PIP, appears as an alternative in order to provide some improvements such as [3]:

- Packages are downloaded before installation, meaning partially-completed installation are avoided.
- Improved usage on console is provided.
- PIP keeps track of the state, meaning that, for a particular package, PIP keeps a record of the reason why that package has been installed.
- Error messages provided are most descriptive
- Code is concise, cohesive, and easier to program.
- PIP allows the installation of flat packages, not as an egg archive.
- Support for other version control systems, in particular GIT, Mercurial and Bazaar, is provided.
- It is simple to define fixed set of requirements and reproduce a set of packages on a reliably way.

So, to summarize, and with alternatives available to those parts which are less robust, as happens with PIP to easy_install, there is no reason why a Python programmer should not release its software to PyPI.

[1] http://sarroutbi-fsw.blogspot.com.es/2013/09/best-python-open-source-libraries.html
[2] http://blog.aclark.net/2011/01/31/in-defense-of-pypi/
[3] http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install

domingo, 22 de septiembre de 2013

Best Python Open Source libraries

Python programming language is one of the most widely used programming languages. Among the reasons of its success we can find:

1 - Ease of learning.
     It is a much faster language to learn compared to "its competitors", typically C++/Java/Perl.

2 - Documentation and support.
     There is a ton of documentation available on the Internet. Besides this, PyPI (Python Package Index) contain a whole bunch of Python modules strictly archived and easily installable.


3 - Dynamic typed language.
     Variable types are not needed to be declared, as happens with other languages as C++ or Java. This, in the end, means saving time.

4 - External modules. 
     There is a whole bunch of external modules developed in Python and ready to use in your Python programs.

Related to this last point, this post tries to analyze some of the most interesting modules developed in Python.  Among all the python developed modules, the most interesting modules I find are:

- pygame: A Python wrapper for SDL which allows gaming development. 
- googlemaps: An easy-to-use Python wrapper for Google Maps
- pyopenssl: Python interface to OpenSSL
- SqlObject: A Python module to provide object oriented access to several type of Databases.
- wxPython: A blending to the popular wxWidgets C++ library and Python programming language.
- PIL (Python Imaging Library): A powerful Python module to provide image manipulation and graphics handling functionality.
- SciPy: A Python-based ecosystem of open-source software for mathematics, science and engineering.
- gnuplot.py: Python package for interacting with GNU-Plot.
- Django: A high-level web framework.
- BeautifoulSoup: HTML/XML parser.
- IPython: An interactive shell to the Python programming language.
- coverage.py: A python tool that provides code coverage in Python.
- lxml: Very fast, easy-to-use XML parser.
- nose: A unit-test framework for Python.

domingo, 24 de marzo de 2013

Video: one of the keys for project success

As the time goes by, video is with no doubt achieving a very important place as media used for promotion, advertising, teaching and many other stuff. Free software is not an exception.
Video plays an important role in these kind of projects, above all as powerful tool for Video Tutorial creation.
And the best example of how important Video is considered from project management view is the 100 Linux Video Tutorial started some months ago, in particular in November 2012, in order to build a complete video knowledge base around the most important Open source project, the Linux Operating System.


But Linux is not the only project who is empowering its community building by means of Video media.
A very important and active project, the Wordpress CMS, provides a unique web, wordpress.tv in order to host not only Video tutorials, but also Video media having to do with news, broadcasting WordCamp events, etc.


To summarize, Video is key for promotion and advertisement, and the extra-effort investment is a guarantee to help on your project promotion. Are you a project manager ? Take this into consideration: Video is one of the keys for success. It is not the only one for your project to be successful, but without Video being successful will be almost impossible.

References:
https://video.linux.com/100-linux-tutorials
http://wordpress.tv