Tuesday, 19 October 2010

Vala


Programmers know that choosing a programming language involve trade-offs. You may wish to use language A because it provides feature X but can't live without feature Y which is only found in language B. For example you may wish to use C because it produces native code that runs fast but cannot live without garbage collection which is found in Java or C#.

Based on that I normally categorize programming languages into three broad groups

1- Interpreted languages like Python and Ruby
2- Run-time dependent compiled languages like Java and C#
3-Native compiled languages like C.

Languages like C are bare-bone languages with very little convenience features like strings or garbage collection but they produce binaries that run very fast.

Interpreted languages sacrifice speed for convenience, they are usually very easy to use but run very slowly compared to compiled languages.

Languages like C# and Java tries to give you best of both worlds in that they provide convenient language features and compile to target a virtual machine at the expense of a little speed.

Vala is a new language developed by the GNOME community. It aims to give the best of all worlds. It comes with convenience of languages like Java and C# and compiles to native binary just like C.

Vala is still in development but is pretty mature to be used for many tasks and is available for Linux and Windows.

The language is introduced on the Vala site as follows;

Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C

Find it at http://live.gnome.org/Vala

Thursday, 30 September 2010

Independence Day
















Tomorrow is Friday 1st October 2010. On that day Nigeria will attain fifty years of political independence. Many argue that there is nothing to celebrate but I disagree. Despite the fact that there are many bumps on the road since 1960, I believe we should look at the brighter side of things instead of perpetually lamenting. We may complain of corruption and bad governance and even argue that Nigeria is a failed state. What we forget is that "Failed State" helped brought an end to apartheid in South Africa and fought for peace in many African states.

Whether to celebrate or not is not the issue, the important thing is that day should not be allowed to pass unnoticed. We either choose to celebrate or reflect. Talking about reflection, I bumped across a copy of the independence speech given by Sir Abubakar Tafawa Balewa on 1st October 1960.  

I reproduce it below as lifted from Webtrends Nigeria


Today is Independence Day. The first of October 1960 is a date to which for two years every Nigerian has been eagerly looking forward. At last, our great day has arrived, and Nigeria is now indeed an independent sovereign nation.

Words cannot adequately express my joy and pride at being the Nigerian citizen privileged to accept from Her Royal Highness these Constitutional Instruments which are the symbols of Nigeria’s Independence. It is a unique privilege which I shall remember for ever, and it gives me strength and courage as I dedicate my life to the service of our country.
This is a wonderful day, and it is all the more wonderful because we have awaited it with increasing impatience, compelled to watch one country after another overtaking us on the road when we had so nearly reached our goal. But now we have acquired our rightful status, and I feel sure that history will show that the building of our nation proceeded at the wisest pace: it has been thorough, and Nigeria now stands well- built upon firm foundations.
Today’s ceremony marks the culmination of a process which began fifteen years ago and has now reached a happy and successful conclusion. It is with justifiable pride that we claim the achievement of our Independence to be unparalleled in the annals of history. Each step of our constitutional advance has been purposefully and peacefully planned with full and open consultation, not only between representatives of all the various interests in Nigeria but in harmonious cooperation with the administering power which has today relinquished its authority.
At the time when our constitutional development entered upon its final phase, the emphasis was largely upon self-government. We, the elected representatives of the people of Nigeria, concentrated on proving that we were fully capable of managing our own affairs both internally and as a nation. However, we were not to be allowed the selfish luxury of focusing our interest on our own homes. In these days of rapid communications we cannot live in isolation, apart from the rest of the world, even if we wished to do so. All too soon it has become evident that for us Independence implies a great deal more than self-government. This great country, which has now emerged without bitterness or bloodshed, finds that she must at once be ready to deal with grave international issues.
This fact has of recent months been unhappily emphasized by the startling events which have occurred in this continent. I shall not labour the point but it would be unrealistic not to draw attention first to the awe-inspiring task confronting us at the very start of our nationhood. When this day in October 1960 was chosen for our Independence it seemed that we were destined to move with quiet dignity to place on the world stage. Recent events have changed the scene beyond recognition, so that we find ourselves today being tested to the utmost We are called upon immediately to show that our claims to responsible government are well-founded, and having been accepted as an indepedent state we must at once play an active part in maintaining the peace of the world and in preserving civilisation. I promise you, we shall not fail for want of determination.
And we come to this task better-equipped than many. For this, I pay tribute to the manner in which successive British Governments have gradually transferred the burden of responsibility to our shoulders. The assistance and unfailing encouragement which we have received from each Secretary of State for the Colonies and their intense personal interest in our development has immeasurably lightened that burden.
All our friends in the Colonial Office must today be proud of their handiwork and in the knowledge that they have helped to lay the foundations of a lasting friendship between our two nations. I have indeed every confidence that, based on the happy experience of a successful partnership, our future relations with the United Kingdom will be more cordial than ever, bound together, as we shall be in the Commonwealth, by a common allegiance to Her Majesty Queen Elizabeth, whom today we proudly acclaim as Queen of Nigeria and Head of the Commonwealth.
Time will not permit the individual mention of all those friends, many of them Nigerians, whose selfless labours have contributed to our Independence. Some have not lived to see the fulfilment of their hopes—on them be peace—but nevertheless they are remembered here, and the names of buildings and streets and roads and bridges throughout the country recall to our minds their achievements, some of them on a national scale. Others confined, perhaps, to a small area in one Division, are more humble but of equal value in the sum-total.

Today, we have with us representatives of those who have made Nigeria: Representatives of the Regional Governments, of former Central Governments, of the Missionary Societies, and of the Banking and Commercial enterprises, and members, both past and present, of the Public Service. We welcome you, and we rejoice that you have been able to come and share in our celebrations. We wish that it could have been possible for all of those whom you represent to be here today: Many, I know, will be disappointed to be absent, but if they are listening to me now, I say to them: ‘Thank you on behalf of my Thank you for your devoted service which helped build up Nigeria into a nation. Today we are reaping the harvest which you sowed, and the quality of the harvest is equalled only by our gratitude to you. May God bless you all.
This is an occasion when our hearts are filled with conflicting emotions: we are, indeed, proud to have achieved our independence, and proud that our efforts should have contributed to this happy event. But do not mistake our pride for arrogance. It is tempered by feelings of sincere gratitude to all who have shared in the task of developing Nigeria politically, socially and economically. We are grateful to the British officers whom we have known, first as masters, and then as leaders, and finally as partners, but always as friends.  And there have been countless missionaries who have laboured unceasingly in the cause of education and to whom we owe many of our medical services. We are grateful also to those who have brought modern methods of banking and of commerce, and new industries. I wish to pay tribute to all of these people and to declare our everlasting admiration of their devotion to duty.
And, finally, I must express our gratitude to Her Royal Highness the Princess Alexandra of Kent for personally bringing to us these symbols of our freedom, and especially for delivering the gracious message from Her Majesty The Queen. And so, with the words ‘God Save Our Queen’, I open a new chapter in the history of Nigeria, and of the Commonwealth, and indeed of the world.
Sources:
Sir Abubakar Tafawa Balewa, Mr. Prime Minister: A Selection of Speeches Made by Alhaji the Right Honourable Sir Abubakar Tafawa Balewa, K.B.E., M.P., Prime Minister of the Federal Republic of Nigeria (Apapa: Nigerian National Press, Ltd., 1964).

Tuesday, 31 August 2010

A Little Mathematics For Independence Day






This year (2010) 17 African countries will mark their 50 years of independence from colonial rule. Many people especially in Nigeria think there is nothing much to celebrate. Some go on to call Nigeria names like "fool at fifty". I am not going to argue for or against that point of view but I will try to make a comparison of Nigeria with the United States and see whether we have made any progress in the last fifty years. I picked the U.S.A because people often cite examples with the United States when trying to make a point about how backward we are.

The United States became independent in 1776, that is 234 years ago. If we are to assume both Nigeria and the U.S are human beings and the U.S to be an adult of 40 years old then how old will Nigeria be in comparison.
Using simple mathematics we can apply the following formula

50/234 = x/40

where x is Nigeria's age if it were human.

x =8.54 years

So Nigeria is only an 8 year old child compared to the 40 year old America. For a child of that age, I think we've not done too bad.

Friday, 27 August 2010

Dealing With Piracy








I was reading an article about Selling Software In China and came across the following statement under the topic "Dealing With Piracy";

"Actually “Dealing with piracy” is a misleading title, because in reality there is no way to deal with piracy. People will crack, copy and use your software as they wish, and they will not even feel guilty about it. Again, let’s not judge, but accept the fact that piracy is simply part of the culture (for some it is piracy, for others it is just sharing) Instead of talking about code scramblers and licensing keys, let me offer here a contrarian (perhaps even controversial) point of view, in the wisdom of “if you can’t fight them, join them”. You should consider yourself lucky if your software gets pirated, because that means that it got traction. For every pirated software there is always a happy user behind it (after all, they chose to pirate your software, and not your competitor’s), and if this user convinces their employer to use your software, then there is a good chance that these companies will be your future clients."

This statement makes a lot of sense to me. Instead of looking at piracy from the constant negative point of view why don't we try to be innovative and tactically deal with, and profit from it. For example, companies like Oracle and Microsoft have made some money in Nigeria because of piracy. The easy availability of pirated copies of their software gets a lot of users for them and these users end up paying for the certifications offered by these companies. Imagine a piracy free Nigeria where users only have access to legitimate copies of these software, definitely there will be very little or no users and almost zero dollars generated from the certifications.

I am not saying piracy is good, but if you can't get through it why not get around it.

Thursday, 29 July 2010

Webification Part 2















By now it is obvious that the web 2.0 revolution will be hinged on some particular technologies. The most important of which are JavaScript and HTML5. These technologies are all available today in most modern browsers and have started to prove that we can build desktop like applications in the browsers. But there is a flip side to the in-browser web 2.0 revolution, what happens if these technologies were made available outside the browser. What happens if modern desktop environments support JavaScript, CSS and HTML5 out of the box? What happens if web 2.0 is brought out of the browser unto the desktop instead of squeezing the desktop into the browser.

Imagine designing your desktop application GUI with HTML and CSS and getting your desktop OS to interpret JavaScript outside the browser. That way web applications can run directly on the desktop. That way all web developers automatically become desktop developers without requiring any additional skills. That way, the line between desktop application development and web application development disappears. The same can also be done on mobile operating systems. Then the dream of write once run everywhere will finally be achieved and above all it will be achieved on open standards.

Imagine having a desktop shortcut that downloads and starts a JavaScript application and runs it natively without requiring any changes. That is the future of software I envisage. The good news is that future doesn't seems to be very far away.

GNOME 3 desktop has a built-in JavaScript interpreter and also supports theming with CSS. The default text editor GEdit allows on-line real time collaboration. The default note taking application let's you drop notes into the instant messaging application allowing easy note sharing.

That may not exactly be the future I imagine, but it's a huge step in the right direction. The future will be such that you can't draw a clear line separating web, desktop and mobile applications.

And that future is almost here.

Monday, 26 July 2010

Webification Part 1









I've blogged before about my view on the future of software development. I argued that there will be a blurring of the line dividing web application development and native/desktop application development. I clearly disagreed with the argument that everything is going to move to the web. One of my key arguments was that the web was originally a presentation or publishing platform, so hacking it into a processing platform just won't be enough.

But a lot has been happening in the web space. HTML5 looks like it's going to change the game and JavaScript just keeps getting faster in all major browsers. Tools like GWT make it easy to write client side web applications using Java and VisualWebGui allows you to do the same with .NET languages.

Clearly Google is one company that is really pushing for the migration to the web. They have created a market place for web applications and have supported HTML5 on their chrome browser and on android. Given the financial and cerebral power of Google, you can bet they have the capacity to make a huge impact.

So is it time for the Webification of all applications? My guess is still no. Google itself is still actively writing desktop applications like Google desktop search and Google earth desktop client. This is because they know that an all out migration to web still doesn't look feasible.

Obviously there will be more and more web applications written than before, but that doesn't mean all applications will be moved to the web. Google knows that and that is why applications targeting android are written with Java to target the android virtual machine without any JavaScript getting involved.

Saturday, 17 July 2010

Nigerian Internet Revolutionaries







By Internet revolutionaries I am not referring to those people that brought about the Internet revolution but to those people that think they can bring a revolution using the Internet. Many times you come across them in forums or see their comments on blogs and news sites. They talk about how bad things are in Nigeria and how frustrated they are and how very soon those on top will pay for everything they owe.

The ones I am very familiar with are typically found on the political section of Nairaland or commenting to articles on 234next.

First of all, I disagree with their idea of a violent revolution being the solution to our problems in Nigeria. The solution should be built from the ground up and not the other way round.
The solution starts from you, what have you done lately to make things better. Have you stopped shunting in queues? Have you managed to fill that pot hole on the road in your neighborhood? Have you stopped that guy dumping refuse by the roadside. No I don't think so, because all those things happen in the real world and not in cyberspace. To get to the real world, you have to leave the coziness of your room or office and get out to make a change.

But I forgot, just getting outside is not enough because the greater number of the revolutionaries have left the country and plan to come back only when things get better.

Definitely the revolution will come, it will not involve shedding blood but individual efforts coming together to build a better system. But the Internet revolutionaries are going to miss it. They will miss it because it will not be fun as they imagined. They will miss it because they can't risk leaving facebook , twitter or Nairaland for so long as five minutes.

But they will read about the revolution, in fact, they have been reading about it because the real revolutionaries also use technology, but they don't call for bloodshed. They use technology to create positive change. And after adventures in the real world, some come to cyberspace and tell their stories in blogs and forums. They just know that you don't tweet a revolution.

So. What have you done for Nigeria lately?