Thursday, September 13, 2012

On Cross platform development

I have been looking at suitable platforms for cross-platform application development. While there are many such available, including Java, I was more interested in a write-once-compile-anywhere kind of platform. Since I have kept in touch with most of these stuff over the last 8years, I narrowed the list to two specific platforms
1. wxWidgets/C++
2. Lazarus/Object Pascal.

I could have used wxPython but I needed a compiled app rather than a scripted/virtual machine based app. The reason is that the application was likely to be closed source/proprietary till it made sense to open source it. This ruled out Java and Mono/.net since decompilation was fairly trivial.

In terms of elegance, of all the programming languages I have learnt I consider the worst to be BASIC and the second worst to be COBOL. But the language I really like for its elegance has been Pascal. I still remember writing a simple console-based banking/financial application in my second year of engineering in less than a day. The application even had those command line menu kind of interface (using Turbo Pascal) and the entire code (as far as I remember) was less than 2000 lines of code. For those guys who do not believe it could be possible, well you should visit http://www.wieringsoftware.nl/mario/. Mike Wiering wrote a Mario clone for the PC which became quite famous. The entire compiled code with 256color VGA at 320x200 was less than 256kBytes.

During my final year, at one time I even contemplated using Delphi as my primary RAD platform. But then I shifted over to working with embedded systems. got into an MS and then PhD program during which time I started working on speech/signal processing. I wanted to program a cross-platform speech/voice source analysis application to go along with my electroglottograph (http://www.techcadenza.in/productlist/speech-and-voice/egg).

I have been following Lazarus since the 0.9.1 version (2004), and the 1.0 version was released last month. It seems to have become quite stable and a number of applications have been developed using it. However I had not coded in Pascal since 2002 and so I decided programming simultaneously in both, till I found one faster to code than the other. Strangely it took me just a glance at couple of Pascal programs for me to recollect the syntax. One of the features of Freepascal which Lazarus uses is that I can use C libraries as units in my pascal code. Since I am more comfortable coding in C/C++ especially for signal processing related applications this is a very useful feature.

So at this stage I am stuck between deciding on the two. Hopefully I may not have to. Both can co-exist for different sets of applications. Anyway I think the following criteria will finally help me decide
1. Stability
2. Ease of use
3. Speed of development
4. Available libraries







Tuesday, August 28, 2012

My alternative to the Apple's bounceback patent.


I am posting it here before someone at Apple patents it. I call it the page stretch. The behaviour is similar to that obtained using a piece of latex with printed text. If you fix it to one end and pull at any particular place the resultant behaviour is what the page stretch effect would look like. 

Assume that the list/screen is made of latex, scrolling down when we are at the top of the page stretches the content from the top of the screen till the location of the finger. This can be uniform stretching along the x-axis or non uniform stretching with the maximum stretching taking place at the coordinates of the finger. Aternatively the stretching can be uniform with more stretching on the top of the screen. I am not very good at doing illustrations, but a crude mockup is shown below:

Original List

Uniform Stretched List

Non Uniform Stetched List
Similarily the page contents can stretch when the bottom of the page is reached. 


Sunday, July 8, 2012

Since the beginning of times, humanity with its ingenuity and its inventions and discoveries has never managed to improve the world we live in. We know more of the world and its history and yet we never learn.