Sunday, September 21, 2014

Teach how to think and not what to think

With the changing times and across levels of education, one thing that might have remained constant is that good teachers always teach how to think instead of being just the source of information on what to think. They use all the resources around them to help student's build their personalities. The goal of education cannot be mere preparation for earning livelihood in future. Coaching and training are enough for that purpose and anyone with proper access to the information can gain enough knowledge to earn a living. Better society is not formed by better earning future generation alone, it is formed by better ideas, innovation and evolution of human values, generation after generation. 

Given the technological advances and access to enormous information, students of 21st century are not dependent on formal coaching for making ends meet. Before a teacher starts teaching a topic in classroom, some of the students may already have number of different pieces of information on the topic which may very well be differing from the textbook version of the facts, not any particular of them being necessarily the correct one. This makes the role of teachers in the process of education of 21st century even more critical and challenging.
In the vast sea of information, teachers first need to learn fast on their own, be updated on the various perspectives on the same topic, learn from the students, and above all of this, they need to be the guides who will ensure that the learners are going in the right direction while surfing through all the information. While technology brings lot of resources for teachers, it also makes their role even more challenging. The more reluctant teachers are to adapting this change, the more directionless will be the future generations.
So should the teachers gain a lot of knowledge? Should they really know which direction is correct for each of the students? That would fairly impractical and inefficient. So while being updated on the teaching resources, the teachers need to be able to guide and mentor their students on certain basic values which will help them filter the information for its rationality, correctness, interest, ethics and practicality. There would be more such basic values and each teacher needs to develop them on their own. But once the students get the sufficient 'coaching' on these while learning the set courses, there is more likelihood that they would neither be lost in the amount of content, nor be restricted in their perspectives. This would further help them be more self-driven, innovative and practical. Once these values are imbibed, they would be sufficiently equipped to both sustaining a livelihood as well as making a better society of their own.
Teachers need not just remain the source of information, either from textbooks or from internet, either on paper or on the screen, they just need to provide proper pointers on what to look out for, how to filter that, and further encourage its practical use by means of 'creating' various kinds of useful resources from that. For doing all these, they can very well make use of the technology solutions, which facilitate creationism, collaboration, prototyping, and automation for the mundane tasks.

Thursday, September 18, 2014

Launching the project 'i18nWidgets for Android'

A lot of Android devices, platforms and apps have several issues regarding rendering of non-English text especially that of Indic text. Though many of them claim to support various Indic and other languages, it usually either means that they have a font for that language included or they have some of the native apps supporting all these languages. But this does not mean all the app will be able to render the non-English text properly. This usually happens for one of the following problem being present:

1. No fonts added in the device (or the native android system)
2. Fonts are not accessible by the third party application
3. App has its own Unicode font, but the native android system does not support text layout rendering for the language
4. App has the font and the android system also supports the language, but the sdk for the particular platform does not have widgets integrated with the complex text rendering features.

This problem gave birth to the idea of developing and extending android widgets which will be integrated with text layout and rendering system on their own. So that, the apps that make use of these widgets will have their own independent rendering system free from the underlying bugs and limitations of the base android system.

The good part is, we do not need to rewrite those rendering systems. The two very well known projects that we need to make use of are Harfbuzz and Freetype. Harfbuzz for text layout of the complex scripts, and Freetype for drawing the font glyphs. 

So, this is what the project 'i18nWidgets for Android' is, under which we are developing independent widgets for app development which will have their own complex text rendering support through integration with freetype and harfbuzz libraries.

The project tree is already made suitable for using with eclipse and hence is readily testable from within eclipse. There are three dependencies to take care of while building:
1. Andoroid SDK 14/15: You may have to configure your development environment for Android SDK 14/15 
2. Android NDK 8: Make sure to have NDK 8 support enabled. 
3. Also have the appcompat_v7_2 library added properly to the project dependencies. 

Please make sure to have exact sdk and ndk versions setup, as the project includes working with native C/C++ libraries along with android platform and hence may run into tedious binary incompatibility issues if not built with proper resources. I have made best attempt to keep things simple for working within eclipse, but do go through the documentation of above development environment thoroughly if you are new to developing native android apps, in case you are struck at some compilation issue.

The project tree has following important components:
1. /jni : This contains the complex-script-rendering library that integrates Android Java widget with the C/C++ libraries of Harfbuzz and Freetype. The entire source tree of particular working snapshot of HB and FT are given in the repo to avoid any incompatibilities during the compilation. Also their makefiles are tuned to work with the given setup.
2. /src/gujaratirendering : This package contains a widget IndicTextView, an extension to the TextView widget which can render Gujarati text. Currently 
3. /src/com/example/i18nwidgetdemo: This is a demo package for testing the the IndicTextView widget with sample text on a simple app screen with Lohit-Gujarati font.
4. /assets: It contains the Lohit-Gujarati font to be used in the demo app

The library complex-script-rendering is based on the original work from Shiva Kumar, and is enhanced and made more generic. Indeed the attempt is to make it further generic and extendable. 

As of now, the project supports text rendering on app being developed for ICS platform and Gujarati language, but the language is not a necessarily limitation. Its just that I tried it with one language to start with, and this can be easily extended and made flexible for auto-supporting any language on the fly. Currently, one will have to make a small change in the complex-script-rendering.c to support language other than Gujarati and add the font of the respective language.

The objectives of the project are:
1. To further improve the library and the widgets code (may involve a lot of code cleaning to fit the norms)
2. Add support for all the languages, by detecting the language of the running text
3. Add more extended widgets to support complete android SDK
4. Create and maintain different branches supporting different android platforms

As of now the platform supported is Android 4.0.3 ICS. One would argue why support an older revision, but that's exactly where the problem is relevant. As many of the lower end widely used android devices are still to upgrade to the latest version, there are vast number of users still struggling to use their native languages, where as the developers who wish to maintain compatibility with these devices are also struggling while making apps for those users. 

While the language support on android systems and their sdk is continuously improving, there is no reason why an independent, reliable, native lang support cannot be added to the apps with help of widgets developed in such manner. This would only improve the reach of technology to those who are facing the economical and linguistic barriers.