Sunday, November 7, 2010

Android 2.1 on X10 Mini

I recently got Android 2.1 up and running on my X10 Mini. Although it isn't yet available for Indian X10 Mini owners but through the instructions at XDA-Developers forums, I became one lucky Indian to have the Eclair on my phone!
If you are still running the old 1.6 firmware, you can upgrade to 2.1 easily. There are two techniques. One is to directly flash a firmware into your phone, and other is to make SE Update Service believe that your phone belongs to a place where 2.1 has already been rolled out and then SE Update Service application will put new firmware onto your phone.

The first method

The second method

For the first method to work, you must have Java(at least JRE) installed in your system. To check, just open a command prompt and type java and press enter. If you get some large output, that means java is installed and working. If you get "Java is not recognized as a.........." that means Java isn't installed. Go here and get Java for your OS and install it.

In the second method, you need a rooted phone. Rooting a phone can be done by two techniques. I'll tell you the second one because thats the easiest and even non-engineerig background people will be able to do it without ease! You just need to install an application called UniversalAndRoot on your phone, launch it and tap Root!!!! Thats all!!! After the rooting, you need to install RootExplorer on your phone. Then overwrite the build.prop file in your phone's system directory with the one downloaded from here . After that turn off your phone and turn it on. You will get an error that some application has crashed. Now again turn it off. Launch SE Update Service on your computer and follow the instructions. Your computer must be connected to a high speed internet. In the step when it instructs you to release the back key, don't release it. You will see the New Software Available prompt, release the back button and install the software.

Whats new in the new firmware?


The social phonebook
This is my favourite feature in the new firmware. Your contacts' profile photos from their facebook profiles are displayed when they call you or when you call them. Also, you can see their twitter and facebook status updates right in the contacts. To link any of your phone contacts with his/her facebook/twitter profile go here otherwise if the contact has same first name and last name on facebook, his/her profile will be automatically linked to your phonebook's contact entry.

Double tap to zoom
In the browser now you can zoom to a specific part of the webpage by double tapping. Also its nice when you double tap and the text columns adjust automatically to make reading easier. You can download Dolphin Browser HD from the Android Market to have an still better experience. Dolphin Browser HD has a plugins API and several plugins have been developed for it. For example web2pdf plugin can convert whole webpage to a pdf file.

Live wallpapers
Now you can have animated wallpapers on your phone. I installed the Aquarium live wallpaper and it is very beautiful. There are several more good live wallpapers available for free download from the market to spice up your phone.

Video recording with continuous autofocus
The new firmware makes your phone capable of VGA@30fps video recording with continuous autofocus, which is a big plus.

Skype
Skype is available for Android 2.1 but it isn't supported on X10 Mini. I installed it but it used to crash whenever I tapped any contact's name to call.

Minor changes in interface
There are several minor changes in the interface. The blue ambience has gone deeper blue. The lock screen has changed. The call receive/reject screen slider has changed. It looked confusing for me at first when I got the first call. I was confused which way should I drag the slider to receive the call. Finally I went with my intuition and dragged the slider to the right to receive the call. Dragging to the left rejects the call.
The settings menu entries have got icons beside them. The wakeup key has changed. The middle key should now be used to wake the phone up, instead of any of the three keys.

Album issue
The album has gone damn slow at initial launch. You need to wait patiently till all the thumbnails are generated. Anyways, after loading the thumbnails it regains its elegance and is fast as ever.

I have discovered some more great apps that you should try:
PowerAmp: The best music player for Android
RockPlayer: Play all video formats on your phone
TapaTalk: It can let you browse and post in any TapaTalk enabled forum.
iReader: It can view chm files(the compiled help manuals of windows)
Call Recorder: You can record any calls
Android Notifier: Get notified on your pc about any incoming calls or SMSes when your phone isn't in your direct sight.
goChat: Facebook chat on your phone
Recordoid: Record voices
Wyse Pocket Cloud: A VNC client. You can control your Windows or Linux or even Mac computer from your phone directly as if you are using your PC, on your phone
Camera Zoom FX: Its a good replacement for the inbuilt camera

For downloading more and more apps visit this page To be able to download anything you must be registered there. You should also register and keep visiting xda-developers forums x10 mini zone

Wednesday, November 3, 2010

Grid & Cluster computing

Both grid computing and cluster computing are high performance computing techniques that are interchangeably confused between each other by people not involved in any one or both of these. There are some very fundamental differences between these which I'm going to enlist below:

Salient characteristics of grids
Grids are collections of heterogeneous systems. The underlying OS, as well as hardware may vary among the computers participating in the grids. The computers that are part of a grid use their spare computational power to perform the tasks assigned to the grid. They are very loosely coupled and inherently distributed in nature may be over LAN, MAN or even WAN. In a grid infrastructure, every computer behaves as a single entity and each entity has its own resource manager that manages the computing resources. Grids are of two types: computational grids and data grids. The former are used for computationally intensive operations and the latter are used for large scale data base management systems like Oracle 10g/11g.

Salient characteristics of clusters
Clusters are collections of homogeneous systems. The operating system as well as hardware in the participating computers of a cluster are same. The computers in the cluster use their full computational power to solve a problem together, contrasting to the spare computational power usage of grid entities. In a cluster all nodes behave like a single system and there is a single centralized resource manager.

Hope, this clears the confusion between grids and clusters. Both of these technologies are trending research topics for scholars.

Thursday, October 21, 2010

Realtek ALC888 sound issues in Ubuntu 10.10

I own a Fujitsu Siemens Amilo Si 3655 laptop computer which has Realtek ALC 888 audio mixer. Everything was working fine until one on 10/10/10 at 10:10 GMT I downloaded Ubuntu 10.10 and installed it in 10 minutes 10 seconds on my notebook. I encountered an strange issue. I couldn't hear any sound from the notebook's built in speakers, but when I plugged in earphones into the stereo jack, the sound worked perfectly in the earphones. I never had this kind of issue when I was using Ubuntu 10.04. I searched through Ubuntu Forums but none of the tricks worked. I ran the command ubuntu-bug audio and reported the bug to launchpad. While browsing the bugs with the same sound card on launchpad I came across a comment that advised me to edit the /etc/modprobe.d/alsa-base.conf file and append two lines given below, to it.
alias snd-card-0 snd-hda-intel
options snd-hda-intel model=auto
I did the same by running sudo gedit /etc/modprobe.d/alsa-base.conf in a terminal and adding those two lines at the end of the file and saving it.
As soon as I restarted the computer, I heard the Ubuntu Login sound that pops on the login screen!!! So if you have a Fujitsu Siemens Amilo Si3655 or any other notebook that uses Realtek ALC888, just follow the step above and get your internal speakers working.

Thursday, October 14, 2010

scanf() is nasty!! Is it?



If you have begun C programming, chances are you have already faced or you will very soon face the nasty behaviour of scanf while inputting characters. If you have faced this problem and didn't get a solution yet, read on. If you haven't faced this problem, you'll do very soon, so read on :P

The problem
Consider the following C program:

#include <stdio.h>
int main(){
    char ch[10];
    int i[10], j=0;
    while(j<10){
      printf("Please enter a character: ");
      scanf("%c",&ch[j]);
      printf("Please enter an integer: ");
      scanf("%d",&i[j]);
      j++;
     }  
    j=0;
    printf("Char\tInt\n");
    printf("____\t____\n");
    while(j<10){
    printf("%c\t%d\n",ch[j],i[j]);
    j++;
    }
    return 0;
    } 

The program is very simple. It takes a character and a number as input, 10 times and then outputs them neatly in a table format. Is it so? The program code looks like that. Now compile the program with gcc and run it. The behaviour you'll see is unexpected! Then what went wrong?

The cause
We have used the format specifier %c with the first scanf. That is the root of the problem! What happens is that, when you enter a character, for example a and press enter, actually two characters go into the standard input stream. First is the a and second is the \n i.e. the newline character corresponding to your enter press. %c reads the single character i.e. a and stores it in the variable. Next you enter anything as integer, say 1. The second scanf skips the \n that was left after the because it doesn't look like an integer. Then it encounters 1 which is followed by a \n so it stores the 1 into the integer variable. In the next iteration of the loop the %c in the scanf directly takes the \n from the stdin that was entered after the 1 and you don't even get a chance to enter a character. This process goes on and on and you never get a chance to enter any character. You are prompted to enter integer only, during each iteration of the loop. Hope you got it ;-) To confirm, just enter %d as the format specifier of printf instead of %c for the character variable in line 16. You'll get the ASCII value of newline character i.e. 10 printed neatly in the table in place of characters in the output.

The solution
There are several solutions to this problem.
The first one I saw in a forum was to clean the stdin. A funcion proposed to do that was as follows:
void clean_stdin(void)
{
int c;

do
{
c = fgetc(stdin);
}
while (c != '\n' && c != EOF);
}
and you're supposed to call this after every time you scanf a characer with the %c format specifier. I tried it, and it worked.
Another solution is the put a getchar() line after every scanf. It will take the trailing newline character and put into oblivion :P
Yet another solution, that I loved was to put a trailing space before the %c like this:
scanf(" %c",&ch[j]);
What the space before %c do, is that, it makes the scanf skip any kind of trailing whitespaces and then reads any non-whitespace character and puts into the character variable.
In fact, as you now know the reason of the issue you can develop as many solutions as you want.