Tuesday, May 14, 2013

Great Scientific Biographies You Should Read

Some years ago I picked up, in a second-hand bookshop, a rather battered but extraordinary book ... 'Napoleon: how he did it' by Baron Fain, Napoleon's former 'First Secretary of the Cabinet'. It presents a picture of the Emperor, his work and personal habits. It eschews the larger historical perspective and instead concentrates on the personal and quotidian. I had hoped to acquire the secrets of Napoleonic accomplishments, just that ... 'how he did it'. The best I can say is that it is, in my case, a work in progress.

So too, though I enjoy history and biography in general, I read scientific biographies hopeful that I might understand how they achieved scientific greatness, in order obviously, that I might emulate it. The outcome is, inevitably, that I better appreciate just how exceptional the individuals are and how unlikely any strategy dependent upon emulation might be. Only one practical lesson shines through, the requirement for a sustained and  unblinking focus on a challenge that is worthy of the effort that must be devoted to it. Scientific greatness is earned, but it is also chosen.

Short of step-by-step instructions on how to get a Nobel prize, here are some scientific and mathematical biographies (and autobiographies) that I have enjoyed reading, and that you may too. They are about people but also about historical and social context and as a side benefit some interesting maths and science. In each case however, they are also selected on the basis of some wonderful, lucid and entertaining writing. I have deliberately excluded group biographies or more general scientific history, this is about individuals, otherwise really first rate books such as 'The Age of Wonder: How the Romantic Generation Discovered the Beauty and Terror of Science by Richard Holmes' would have made the list. There are no biographies of women scientists on my list, and I really need recommendations for books I should read. Surely, for example, Marie Curie merits a biography to measure up to her attainments.

A Beautiful Mind by Sylvia Nasar. Forget the film. This book captures the strangeness of John Nash and his navigation of the line between mental illness and sanity, and the oddity of his personal relationships. It places the work on game theory in a political and historical context and gets the balance between a troubled personal life and the mathematical work just right. Perhaps less strong on explaining game theory but it is easy to pick up the classic book (Prisoner's Dilemma: John Von Neumann, Game Theory and the Puzzle of the Bomb) by William Poundstone to get a better understanding.
Naturalist by Edward O. Wilson. I selected this autobiography because of the quality of the writing above all, with beautifully composed vignettes. It is particularly strong in giving an insight into the early development of the scientific impetus and on his interests and motivations. Inevitably,  you do not get a balanced view of the heated disputes about sociobiology that have formed a part of his later professional life but the book is sharp and witty and rarely tips into polemic.

The man Who Knew Infinity: Life of the Genius Ramanujan By Robert Kaniget. It is surprising that this book is not better known, it certainly deserves to be. The story it tells, of the self-taught mathematical genius from India, discovered through his unsolicited letters to the pure mathematician, GH Hardy,  is an extraordinary one. It moves from the heat and colour of Imperial India to a cold, damp Cambridge where Ramanujan dies, tragically young. A wonderful read .

Further suggestions are very much welcomed.

Thank you,
$hreyansh $hah
(9408390654)

Monday, May 13, 2013

A Brief History of Windows Sales ---- From 1985 to Present

I may maintain that the fact that Microsoft has sold 100 million Windows 8 licenses in six months doesn’t mean much. But that doesn’t mean that Windows sales figures aren’t interesting. In fact, Microsoft’s news moved me to rummage around in Google Books, Microsoft’s press site and elsewhere for past sales data for various major editions of Windows dating back to version 1.0, which debuted in November 1985.

Paying too much attention to the exact numbers I quote below would be nuts. Some are from Microsoft; some are from other sources; some refer to all licenses sold while others relate only to boxed software. What’s fascinating is the overall trend and what it says about the number of PC users in the world. Back in 1990 — 15 years into Microsoft’s existence —  the fact that Windows 3.0 sold four million copies in its first year made it one of the industry’s biggest smashes until that time. Today, Windows 8 is selling 50 times as fast, and we’re trying to figure out whether that’s an encouraging sign or evidence that it’s a disappointment.

And now the numbers, all of which are for unit sales in copies or licenses:
  • Windows 1.0 sales from its November 1985 launch to April 1987: 500,000 (Computerworld)
  • Windows sales in 1988 (Windows 2.0 shipped on December 9, 1987): 1 million (InfoWorld)
  • Windows sales, all versions, 1985 to January 1990: less than 2 million (InfoWorld)
  • Windows 3.0 sales, first year: 4 million (InfoWorld)
  • Windows 3.1 sales, first 3 months or so: 3 million (InfoWorld)
  • Windows 95 sales, first year: 40 million (Network World)
  • Windows 98 sales, first four days: 530,000 boxed copies through retail channels (New York Times)
  • Windows 2000 sales, less than a month after launch: 1 million (Microsoft)
  • Windows ME sales, first three days: 200,000 boxed copies through U.S. retail channels (Network World)
  • Windows XP sales, first three days: 300,000 boxed copies through U.S. retail channels (Network World)
  • Windows XP sales, just over two months after launch: 17 million (Microsoft)
  • Windows Vista sales, one month after launch: 20 million (Microsoft)
  • Windows 7 sales, first six months: 100 million (Engadget)
  • Windows 7 sales from October 2009 launch to June 2010: 150 million (Neowin)
  • Windows 7 sales in less than two years: 450 million (TechCrunch)
  • Windows 8 sales in a little over two months: 60 million (ZDnet)
  • Windows 8 sales, first six months: 100 million (Microsoft)
Here, as an experiment in data visualization, is a little timeline I made with Preceden. (The relative size of the bars represent the time required to sell the number of copies indicated.)

Thank you.

Monday, April 2, 2012

Write a program of Transposition Cipher


import java.io.*;
public class ColumnTransSender
{
            String columns1[]={"","","","",""};
           
            public static void main(String s[])
            {
                        String columns[]={"","","","",""};
                        String key="21403";
                        String msg = "My name is Shreyansh";
                        String result = "";
                        int i;
                        for(i = 0; i < msg.length(); i++)
                                     columns[i % key.length()] += msg.charAt(i);

                        for(i=i%key.length();i<key.length();i++)
                                    columns[i] += "a";

                        for(i = 0; i < key.length(); i++)
                                    System.out.println("Data is : " +  columns[i]);
                                   
                        for(i = 0; i < key.length(); i++)
                        {
                                    result += columns[Integer.parseInt(""+key.charAt(i))];
                        }
                                   
                        System.out.println("Data in Result : " + result);
                        ColumnTransSender d = new ColumnTransSender();
                        d.decrypt(result,key);
            }
           
            public void decrypt(String result,String key)
            {          int i=0;
                        for(int j = 0; j<key.length();j++,i+=Integer.parseInt(""+result.length()/key.length()))
                        {
                                     columns1[Integer.parseInt(""+key.charAt(j))] += result.substring(i,i+Integer.parseInt(""+result.length()/key.length()));
                        }
                       
                                     
                        for( i = 0; i < columns1.length; i++)
                                    System.out.println("Data in again : " +  columns1[i]);
            }
}

Thursday, March 1, 2012

Write a Program of Uthopia Protocol

//Header.c

include
#include
char str[100];
void from_network_layer()
{
printf("Enter the data :");
scanf("%s",str);
}
void to_network_layer()
{
printf("Received data is : %s\n",str);
}
int from_physical_layer(int pid)
{
read(pid,str,100);
}
void to_physical_layer(int pid)
{
write(pid,str,100);
}


//Receiver.c
#include "header.c"
main()
{
int pid;
mkfifo("pipe_data",0666);
pid=open("pipe_data",O_RDONLY);
//printf("ok......\n");
while(from_physical_layer(pid))
{
to_network_layer();
}
close(pid);
unlink("pipe_data");
}

//Sender.c
#include "header.c"
#include "header.c"
main()
{
int pid,no,i;
pid=open("pipe_data",O_WRONLY);
printf("Enter the no of frames you want to enter :");
scanf("%d",&no);
for(i=0;i

Saturday, February 25, 2012

Write a program for Bit stuffing(Write a code for sender and receiver side both)

/* sender- Bit stuffing*/

#include
#include
#include
main()
{
int pid,i,fno,cnt,k,j;
char flag[]="01111110";
char frm[100],frm1[100]="",packet[100]="";
system("clear");
pid=open("pipe",O_WRONLY);
printf("Enter The Frame : ");
scanf("%d",&fno);
printf("\t\tEnter The Binary Data\n");
for(i=0;i/* sender- Bit stuffing*/

#include
#include
#include
main()
{
int pid,i,fno,cnt,k,j;
char flag[]="01111110";
char frm[100],frm1[100]="",packet[100]="";
system("clear");
pid=open("pipe",O_WRONLY);
printf("Enter The Frame : ");
scanf("%d",&fno);
printf("\t\tEnter The Binary Data\n");
for(i=0;i

Write a program for Byte stuffing framing method.(Code for sender and receiver side both)

/* Sender.c - Byte Stuffing*/

#include
#include
#include
main()
{
int fno,i,pid,k=0,j=0;
char str[100],packet[100]="",*ch,str1[100];
ch=(char *)malloc(sizeof(char));
ch[0]='$';
system("clear");
pid=open("pipe",O_WRONLY);
printf("Enter The No. Of Frame : ");
scanf("%d",&fno);
for(i=0;i/* receiver- Byte Stuffing*/

#include
#include
#include
main()
{
int pid,cnt=0,i=1;
char packet[100],ch='$';
system("clear");
mkfifo("pipe",0666);
pid=open("pipe",O_RDONLY);
read(pid,packet,100);
printf("%s\n\n",packet);
while(packet[cnt]!='\0')
{
if(packet[cnt]=='$'&& packet[cnt-1]!=='#')
{
cnt++;
}
else
{
printf("Frame %d : ",i);
i++;
while(packet[cnt]!='$')
{
if(packet[cnt]=='#')
{
cnt++;
}
printf("%c",packet[cnt]);
cnt++;
}
}
printf("\n");
}
close(pid);
unlink("pipe");
}

Write a program for character counter. (Sender and receiver both side)

/* Sender- Character count */

#include
#include
#include
#include
int main()
{
int pid,no,cnt=0;
char str[50],packet[100]="",*len;
system("clear");
len=(char *)malloc(sizeof(char));
pid=open("pipe",O_WRONLY);
printf("How Many Frames U Wnt To Enter : ");
scanf("%d",&no);
while(cnt/* Receiver - character count*/

#include
#include
#include
main()
{
int pid,cnt=0,len=0,i,k=1,j;
char packet[100],frame[100];
system("clear");
mkfifo("pipe",0666);
pid=open("pipe",O_RDONLY);
read(pid,packet,100);
printf("\nData Received Is : %s\n",packet);
while(packet[cnt]!=NULL)
{
len=packet[cnt]-48;
printf("\nFrame %d : ",k);
for(i=cnt+1,j=0;i