Sunday, October 03, 2010

Even before Hello Android

Piqued by curiosity on the much touted freedom to develop applications on Android, I decided to take the plunge and see for myself. The recommended approach is to follow instructions

My first concern was that Quickstart recommends using the ADT (Android Development Toolkit) as an Eclipse plugin. I have used Eclipse, and know it to be _highly_ configurable. However each time I used it, it was already configured by a system engineer who is more competent than I at developing ANT scripts and what-not.

As it turned out, I didn’t have to worry overmuch ... not yet anyway. Installing Eclipse was a snap. Subsequently it was only a matter of following instructions on the Android site to install the plugin. Phew!

My first hiccough came after creating a project using the plugin wizard. The Android console kept showing a message to the effect ‘AndroidManifest.xml’ could not be found. The file itself, however, was listed in the package view. Hmmm? Took me a while to find out what happened

The problem was that the Android Wizard generated code in two parts

1. Code that is not meant to be modified (recognized by a ‘Generated Java Files’ label)
2. Code that is meant to be modified


The latter relies upon the former; however by default the packages were arranged such that the former was listed after the latter; this caused dependencies to fail.

The solution was to

1. Rearrange the packages created so that code with the ‘generated java file’ appeared before the latter, and
2. Navigate into Project Properties > Android Tools > Fix Project Properties



Now my first Hello World ( if only wizard generated ) is in place, and I'm off to try to run it having made a note of what went wrong even before running the app!

More later!!

Sunday, September 12, 2010

Prevent 'edit source' option in browser for web-page

For a change, this is a tech post rather than my usual 'spur of the moment' thoughts.

A friend who does some web-page development writes some very complex scripts for some of his pages. He has already seen duplicates ( yep, imitation is the highest possible compliment for an artiste ). Anyway, we were discussing some options available to protect his source. A mere copyright notice is no help.

To my knowledge, any webpage travelling in the internet is subject to being viewed at the point of receipt, or at the point of the recipient firewall/proxy/whatever in a text-editor. There is no way to stop someone from viewing the source; the best a person may do is to run a script to hide the menu-bar. This option too will fail if the user simply disables script execution.

My suggestion is to use flash pages, or even change the page format from HTML to some format which does not lend itself to reading in text-pad or such. Say, embed the HTML into a spread-sheet, and then send the spread-sheet to the recipient to be opened on receipt.

Thoughts, people?

Sunday, August 29, 2010

Methuselah's nemesis

I recently watched the movie 'Paa' which introduced to me the affliction known as 'Progeria'

The disease is known to be caused by a mutation in the genes, and has the consequence of causing premature/rapid aging of body of the person afflicted by it. Those so afflicted do not live to age much more than 13 or 14 years. Although the body and various organs age rapidly, the affliction does not afflict brain cells. In a sense, the disease steals the childhood of little ones by making it impossible for them to indulge in the rough and tumble they would be up to if not for such fears as brittle bones, asthma/exertion/heart trouble...most of the ailments that go with old age.

As bad as the disease is, the fact that we know why how it happens is reason for good cheer. The immediate reason, of course, is the fact that if we (I mean, our scientists :) )know how it happens we can probably figure out what to do to cure it. The less immediate reason is because the ... knowledge of how our bodies control aging might be applied elsewhere too.

I'm not a doctor or geneticist, but I wonder whether this knowledge might be applied ( for instance ) to

  • Grow a clone to physical maturity at an accelerated rate, and then revert the accelerated rate to normal?

  • With all this debate in progress about the Synthetic Self-replicating cell created by J Craig Venter Institute could the knowledge of aging be used to ensure the cell, and it's progeny age prematurely as a built-in damage control mechanism



Sort-of like a biological switch marked 'Aging Rate 2x', except that a biological switch is more complex than a mechanical/electrical one, and probably works differently too!

Thoughts, people?

Sunday, March 07, 2010

Past through a coloured glass...

Chambers Dictionary defines a 'journey' as 'a process of travelling from one place to another'. It goes without saying that it is the traveller who decides whether or not the journey is complete; a decision that is made usually upon the basis of our visual sense, albeit auditory input play a role too.

For instance - Travelling by train from Nagpur to Raipur, I recognize Raipur by it's station first from eidetic memory. The railways PA system announcement of the station name contributes to the auditory input.

Travelling in the dark, passing hamlets, and towns are recognizable from visual signs of human habitation. Being diurnal creatures, this necessarily translates to light.

Back sometime in the 1980s a study was published that humans, like homing pigeons, had an innate sense of direction. Widely quoted, the study proved that a blindfolded uncued person would, almost unerringly, point in the correct direction of home when asked.

This study has since been refuted. We now know that few people are capable of such a feat without cues to the contrary. Given that evolution has not changed us significantly over the last few millenia, it stands to reason that our ancestors were as fallible as we. Sometime in the distant past, a Sailor's mate would place a burning lamp oriented so the sailor would know how to come home. The light-house at Alexandria served a similar function, a marker for the port of Alexandria in an otherwise unchanging landscape.

Powered flight, as we know it today, was demonstrated by Wilbur & Orville Wright in the United States of America. The first aviators, as all pioneers, had to learn on-the-job; there was no manual except perhaps instructions on how to take-off/land... and guess-work. The first fliers probably did not have the advantage of such mundane things as fuel-guages, fuel-burn status indicators, and their ilk; Flying was mostly a matter of having/developing the right feel, learning which direction the wind was blowing, and such. The first runways were probably meadows, or open grounds; Runways came into existence much later. The first flights too were mostly flown in daytime. According to Wikipedia the first runway was constructed at College Park Airport in 1909.. roughly 6 years after the Wright Brothers demonstrated their machine. Night flying was similarly pioneered by the USPS after they lost mail, aircraft, and pilots to inclement weather, and insufficient navigation aids.

The most important navigation aids were obviously those that allowed the pilot to know the location, and the perimeter of the runway. Common sensically, these aids are basically lights as a pilot, from the air, has a vantage point such that all below is dark... bar where a specific navigation aid is posted, or where the glow on the horizon beckons him to travel.

On the subcontinent, particularly to the followers of the Sanatan dharma, there are many theologically significant events which mandate a yajna. Deities are depicted travelling on such transport as the owl, the swan, the peacock and such; not all travel by air. The more hardy travel seated on a tiger, a lion, a bullock, even a mouse... but i digress. Regardless of the mode of travel, to one travelling by the light of the stars/moon, the glow of light would be a welcome beacon to signal civilization, and a place to spend the night.

From what little I know about ancient India, and rural cultures; Early to bed, and Early to rise was the norm. Early to bed would mean that soon after dusk, the continent would be uniformly dark.

Deepawali commemorates the return of Rama to his people. The commemoration occurs on the night of the new moon, and Rama is known to have returned to his people seated in a vimana flying day-and-night to ensure he reached his home before his brother discorporated in grief at his absence. Even before Rama, the same combination of season/moon was commemorated in similar manner to welcome the Goddess Lakshmi ( who travels mounted on an Owl.

Could it be that what we commemorate was not only the joy in the hearts of the people, but also a means to guide the vimana to a landing? An aircraft beacon?

Making this correlation ... speculative as it may be, dare I deem this to be proof that heavier-than-air flight existed on the sub-continent before Mssrs. Wright demonstrated their invention at Kittyhawk?