Future of mobile development

It took me a while to converge to a decision regarding what cross platform mobile development platform I should commit myself to (at least in the foreseeable future). After considering the various frameworks, I came to the understanding that MoSync is the winner for me. The reasons are that MoSync best matches my view on where mobile development technology should be going:

  • It provides the ability to quickly develop web or native UI for a mobile application using HTML5 and get immediate feedback on the mobile device when changing the UI code on the development platform.
  • It provides a C++ abstraction layer for running native code on all the major mobile device operating systems.
  • It provides a bridge (called wormhole) to effectively pass bidirectional events between the HTML5/JavaScript world and the C++ world.

This struck a chord with me as this was the exact philosophy I had in mind when developing JNEXT, which enables smoothly combining demanding CPU and native resource tasks with demanding UI tasks while using the appropriate technology for each.

As a note regarding the longer-term future of mobile development, my guess is that what is going to happen is that native mobile APIs (using Objective C for iPhone, Java for Android, C# for Windows Phone etc.) will become as interesting to future mobile application developers as assembly language is for todays application developers. There will be just too many interesting apps to create and distribute to be bothered with wasting time learning the specifics of any particular “CPU”.

Software reliability

Endless volumes have been written about the problems associated with the growing complexity of software. It is interesting how the ancient story about the tower of Babel seems to be materializing in the form of broken communications between software applications located on different hardware products and vendors.

I don’t claim there is a silver bullet that would solve this, but there is one thing I’m certain of, and that is that a lot of this mess has to do with doing things fast instead of doing them well, complicating instead of simplifying, building huge buildings without first taking the time to make sure they have rock-solid foundations.

This is obviously a generalization, and as such has its exceptions – but I’m referring to much of what I’ve experienced over many years in a wide spectrum of development platforms, software products, SDKs and what not.

I suspect part of the reason for what I call the “race for quantity at the expense of quality” has to do with the Western way of life and its financial driver – i.e capitalism. This philosophy tends to orient people more towards quantity than towards quality, resulting in companies wanting to churn more and more features so their products will have more check marks than their competition in the competitive analysis chart.

But this also has to do with caring enough about the people who are going to use your product. This is something that can be improved by just starting to give a damn about making your product simple and reliable to the point that there is no room for ambiguity or question as to how to make it work.

There are so many examples of this that I probably don’t have to specify – any software developer has come across them. Hours or days of research that result in an answer that had it been documented, would have put the problem to rest in 5 minutes. As another example – endless code with bad documentation that upon inspection can be reduced to code a fraction of the size and simple examples that would provide much better help than any documentation would. Sites like Stack Overflow are great, but in a way many of the questions posted there stand as evidence of this problem.

The trigger for this post is me currently wasting time trying to understand why a very simple code example does not work as advertised in a certain commercial product. I’ve been through this before and I’m experienced enough to know that it has nothing to do with the code logic. The question I’m asking myself is “why do I have to waste time on this ?”. As a consumer, you wouldn’t put up with buying a TV, turning it on, switching it to the channel you like, only to find an error message on the screen saying “Error: situation not anticipated, please configure the firmware accordingly”.

Keep it simple. Keep it reliable. Strive for better instead of larger – this might not solve the software complexity issue, but at least it won’t make it worse.

Added a new JavaScript game

Took a couple of hours to create an old game I played about 30 years ago on a friend’s digital watch… I don’t remember the model of the watch, the name of the game or even the friend’s name, but I do remember everyone took turns trying to play and beat the high score. The idea was to try and delay the stampede of marching numbers by selecting a digit and removing it from the advancing number sequence.

I’ll try and continue adding another JavaScript game once a week, at least until some submissions start to arrive.

Google can’t find everything

For some reason there’s an old song I learned at school more than 35 years ago, whose tune and lyrics I can still remember. It goes like this:

I hear echoes that are dear to me
that whisper oh so sweetly to my heart
You must come, come to those you love across the sea
nor let lt be to long afore you start

So I go on my journey through the bonnie heather
never tiring though I walk a hundred miles
There’s a song in my heart be black or bright the weather
for so much am I nearer to the isles.

Its either an old Scottish or Irish song and of course I’ve never heard it since that music lesson back in 4th grade.
I thought that a Google search would shed more light on the source of the song, but no matter which part of text I quoted the search yielded nothing of relevance. Quite interesting, considering the mind boggling volume of texts of both present and past works that are indexed by Google.Perhaps this was something the music teacher made up…

4K JavaScript games

I’ve added a new JavaScript 4K page will host JavaScript games that are contained in one html file which is no larger than 4K. This is an even more difficult constraint than the Java 4K challenge since the Java files are in compiled bytecode whereas Javascript is at most minified source code.

The gallery currently contains only one game which I wrote a few years ago during a short break on a PC with no Internet connection, development tools or ways of saving the data to external devices. I kept a printout as a souvenir which I recently found and which gave me the idea for the JavaScript4K gallery/contest. If it picks up, I’ll make it a site of its own.

Don’t let the ITU rule the Internet

The ITU did not create the Internet. There was no way it could. The Internet could only be created by engineers who celebrate freedom, openness, sharing, curiosity, innovation and even humor – values that have made the Internet what it is, and which the ITU lacks. As an engineer, this comes across in a striking way when viewing the difference between the contents of technical documents the ITU release (which of course you have to purchase) and those of Internet organizations like IETF (which are free for everyone). The ITU is the old world – it should have no say in the new one.

If you oppose putting the Internet behind bars, voice you opinion on Google’s Take Action page.

.htaccess rewrite for URL parameters

Suppose you have a page at

http://www.example.com/mypage.php?ab=38

but you want people or bots that access it to see this page instead:

http://www.example.com/mypage.php?ab=38&cd=39

By the way, this is not some constrained example – it is from a real production site where the owner has little control over the PHP code.

It took a bit of experimenting plus the help of this answer to arrive at the answer, which is add the following to your .htaccess file:

RewriteEngine on
RewriteCond %{QUERY_STRING} ab=38$
RewriteRule ^mypage.php mypage.php?%{QUERY_STRING}&cd=39

Hope this saves someone some time.

Predicting software development platforms

I’m going to make three predictions today:

  • Cloud vs. PC: The PC is not going to fade into insignificance in the near (1-2 years) or more distant (3-10 years) future.
  • Tablet/Mobile vs. PC: See above.
  • Cross platform development tools are going to rise in popularity.

You are welcome to come back anytime during the next decade and prove me wrong.

Now when I say PC, I’m referring to an independent unit with a strong CPU, a good deal of dynamic and static memory, a large screen and a real keyboard.

I’ve been around long enough to see through hypes and trends. Its always amusing to see a new herd mentality thinking that this or that new technology is going to replace everything. Nothing ever solves everything. I guess its a human wish that a savior will come and with a magic solution solve every problem with one sweep. Life is more interesting and more complex than that. New technologies and methodologies fill a space that was less suited than older technologies, that’s why cloud technologies and mobile technologies are here to stay. But at the same time, old methodologies fill a space that newer ones shouldn’t try to since they will not do it as well. As I ranted on the now inactive JNEXT site, the wisdom is to keep a sense of balance and use the right combination tools and methodologies for the job. Don’t let a specific technology or methodology be your hammer.

Anyway, back to the prediction thing

  • On the Web: expect rising popularity of higher level languages that compile to JavaScript+HTML5.
  • On mobile devices, additional and improved cross platform development frameworks. Native applications will continue to be popular and HTML5 based applications won’t replace them.
  • On PCs, Qt will become more popular being the strongest multiplatform development tool. Qt applications will eventually compile to all popular mobile devices.

Now I’ll hop back to my time machine and wait for 10 years to check this post again.

How many days ago ?

I once created a site that shows you interesting things that happened a round number of days ago. You can also check when you special day birthday is, for example, at what date do you turn to be 17000 days old ?

Although the site even made the news once, I didn’t bother to maintain it, but if you’re interested, take a quick look at the Count In Days site. Perhaps you can surprise someone who isn’t aware a special birthday is coming up soon…

Changing browser associated with html files on Krusader

When I moved from Windows being my default OS to Ubuntu Linux, the thing that I missed the most was Total Commander. Over the years it got so that if I ever found myself on a computer that didn’t have it, I could immediately feel my productivity getting a hit.

On Ubuntu, I used Gnome so the natural replacement for Total Commander was Gnome Commander. Gnome Commander is OK, but it wasn’t a natural replacement for Total Commander and I didn’t feel completely at home with it. I also played with muCommander, which I still use on my Mac OS/X, but at the time it still wasn’t quite there.

I finally found and settled with Krusader. Installing Krusader requires all its’ KDE dependencies but it is well worth it.

So much for the background. I’ve recently been developing some stuff using HTML5. Whenever I’d hit Return or double-click a file with an html extension, Konqueror would launch to display it. The problem is that Konqueror does not do HTML5. I needed to change the associated application for html files but after searching high and low in the Krusader options, I found no way to do this.

The answer was that the file associations aren’t handled by Krusader but by the KDE system settings, and to change those I had to install and launch the KDE application that does that:

sudo apt-get install systemsettings
systemsettings

The first time you launch systemsettings it might whine about not having anything to display. Just close it and run it again. When it opens, click on the icon named “File Associations”. In the text box where it says “Find file type or filename” type “html”. Click the “text” type and select the “html” subtype. On the right you will see the Application Preference order (see below).

KDE system settings
KDE system settings

Select the browser you’d like to be launched when double clicking an html file from Krusader and using the “Move Up” button, click it all the way to the top. Don’t forget to click “Apply”.

Open Krusader again and you’re set to go.