Thursday 13 December 2012

CISCO : Interview


After clearing written test it was the time of CISO interview.
I must say HR was cool man :).

I waited long from morning till evening and around 5 pm I got my turn.
Interviewer first asked some formal questions like
I : From where you belongs to?
I : Where you took your lunch?
I : Field of Interest?  I answered real time operating systems and then he asked some of the question on Operating systems an asked what is the difference b/w genreal OS and RTOS. It was simple as i explained it.
I :Then he asked are you interested in CISCO? I said obviously yes then he asked Why ?

I : Then one or two questions on Computer Architecture.
I : Paging and Virtual memory?
I : Now how about your programming skills?  I said i am good in C language.
I : C programs
He asked me to write program to reverse the linked list.

I : Without using sizeof operator find sizeof the structure having several data types within the structure and you don't know how many data elements are there in the structure.
I was unable to answer this question at that time
although it is simple but it did not strike in my mind.
  Answer is
Declare a null pointer to the structure suppose structure is

struct list 
            {
..
.
.
.
}
struct list *a=0;
a++;
printf("%d",a);

In this way it will print sizeof the structure.

Although Interview was good but i guess the reason of failure is he was not satisfied with my programming skills and more or less they want coder and a very good programmer also the post was of Software Engineer So.

Even i do have good programming skills but something went wrong.

God has something better for me so that is why CISCO did not take me.
Only What i can say is Unlucky CISCO :)

Finally an Advice: Do polish your programming skills all the simple programs on Linked Lists, Binary Search Trees, Sorting techniques, Simple programs like reverse the string, reverse the sentence, Simple programs on implementing Standard library functions in your own way.
"I am talking about the post of Software Engineer". CISCO also recruit on the post of Network Engineer where they need some core Computer Networks knowledge. But We were interviewed on the post of Software Engineer and they strictly require good programmer.
Polish your data structures and Algorithms and I guess you are in. Almost no stress on the core areas Like computer networks, operating systems.
So the keyword is Programming.    

It is not first failure of my life so be cool.


--Will contribute. 
 


Tuesday 11 December 2012

Infosys : Interview tale

It was telephonic interview The way it was started is like.
Interviewer: Saurabh I will take your 20-30 minutes. Are you comfortable?
I said yes. I am fine sir.

Interviewer was asking more about my M.Tech project so it was easy for me to handle that.
Two questions on C language, then he asked me about JAVA. He asked are you comfortable with JAVA?  I said no and i stated that i have read this subject when i was in my B.Tech and it is long back and said although i am good on OOPS concepts and can pick up this language easily.

Then there were two pet questions
1. one was Why do you want to join Infosys?

2. Do you have any question for me about infosys?

 I prepared both of these questions so that was not that much difficult. 
I asked three questions to him and he was quite impressed and replied answers to my questions very patiently.
My first question.

Infosys is very famous for their mentoring concept where each employee get mentored and coached by his predecessor. So How do you assign mentors to the employees Is it on the basis of some test or purely based on the interest of the employee?

Second Question
What is this Infosys 3.0 and what is logic behind 3.0 why not 2.0 or something else?

Third Question
Recently infosys shifted their listing from US index to European Index Why?


Finally interview lasted 25:07 (As my mobile was saying this call duration). It was nice obviously when you do have good interview then always it feels nice :)





-Will try to contribute.

Monday 10 December 2012

Unpredictable season of Placements !

It's long ago, posting after lots of days. Actually busy with placements and the period was very stressful by the way that is the different story. Got job in Infosys, so now i do have some time for fun and that is why i thought why not write new post on my blog.
Although I know my blog does not have huge audience but i do feel great satisfaction when i write something. I am significantly inspired by many authors, writers ha ha :).
So the next target is to fix your goals those i have to complete in next 4-5 months and then see where i land up.

Going to prepare To Do list for me. Now i am more enthusiastic, thinking about the things those I want to accomplish in next few months.
Thesis work is pending from last month  i have done nothing new, have to revamp everything.

So i was talking about unpredictable placement season. All probability and statistics fails, more unpredictable than the rainy season. And here one thing again pushes me to believe on god. I really agree with the fact that it is not important how much talented you are it is all about your belief. And I once again can say i do believe on god as well as on myself.

In the mean time a great thing happened, my flat partner also get placed in a company i am very happy about him because he was the most pessimistic among us. I guess now his perception towards the life would change :)

--Will try to contribute.

Monday 5 November 2012

Setting DropBox for using Free Cloud

Settled Dropbox on both of the college $window$ and my own linux machine. Other option is UbunutOne ( I am using this service of Ubuntu too..).

Now using free online cloud to share my documents and data. 2GB space with additional space (rewarding points for referring).

Maximum free space is only 2GB. For more space you have to purchase premium plans.

The points good about Dropbox are-

1. Sharing same folder between two computers. (Irrespective of the platform whether Linux, window$  or mac$)

2. Create links to your folders so any one on the web can access your folder.

I am using it, will comeup with more tools.



Sunday 4 November 2012

Install software using .deb and .bin package in Linux (Ubuntu)

For installing debian package in Ubuntu..

Debian package manager is used to install debian packages on Ubuntu. We have full software in the form of debian package.

dpkg is a tool to install, build, remove and manage packages. dpkg itself is controlled entirely via command line parameters. For example -i use to install .deb file.

                                      
                                $dpkg -i  filename.deb


Bin package installation in ubuntu

Simply make it executable
                              $chmod +x filename.bin

now the file is executable

                               $./filename.bin 

Monday 15 October 2012

Setting up Eclipse IDE on Linux

Today i have settled eclipse environment on my linux machine and installed c,c++ and python plugin to work with it.

Simple steps i followed:-

1. Installed eclipse classic from eclipse.org

2. Then  Help->Install Software Installed CDT (C,C++ development tool)
Add           http://download.eclipse.org/tools/cdt/releases/helios
Name        CDT
click finish to install it with your Eclipse ide

3. Executed Hello world in cpp and checked the environment


4. Then Help-> Install Software then settled python environment.
Add                 http://pydev.org/updates
Name              PyDev
and finish


Now my eclipse platform is ready to make projects in Java, C , C ++ and Python

These days trying out some basic stuff in Python, hope that eclipse environment will provide much more power to my programs.

Saturday 13 October 2012

Tools on Linux (Give them try)

Dissect following tools

1. Glade - For GTK+ toolkit development

2. Anjuta - IDE

3. KDevelop - Making interface and application for KDE desktop environment.

4. Eclipse - Although i am familiar with this IDE but you have to decode it more and experiment with it, very famous in industries for the software development. 

Experiment with Desktop Environments in Linux KDE,GNOME and XFCE

One more reason to use Linux and this is what you can really try from your own.

Isn't it is nice that you are customizing your desktop environment.  How your desktop looks like. This is what windows can not provide you.

A general architecture
 -------------------------------------------------------------------------------------------------------------------------------
Command Line ----------------------> Top layer

Windows Manager--------------------> Adjust your tools

X Window OS ------------------------------> Manages your drawing on the output device
---------------------------------------------------------------------------------------------------------------------------------

GNOME comes with desktop environment and windows manager in various flavors (for example matacity windows manager etc.) essentially you call GNOME as desktop environment itself. Your default Ubuntu distribution comes with GNOME desktop environment.

Similarly KDE and XFCE is also a desktop environment, and speciality of XFCE is that it is lightweight.


On same machine you can install more than one desktop environment to use them you have to just logout and then choose desktop environment from the pop up list while right clicking the password box during log in.
Go here and find more...

And most fabulous way to add your own linux lightweight desktop environment is by installing windows manager (often lack of task bars, panels and tools)  without installing any desktop environment and add features according to your need.

Will love to experiment with my desktop environment so be ready for learning

Happy learning......


Wednesday 10 October 2012

"Sanskriti Gyan Pratiyogita"- By Gayatri Shakti Peeth Shanti Kunj

10, Oct. 2012

"Sanskriti Gyan Pariksha" I attended this exam when i was in my 5, 6, 7 and 8 th  class. This exam is all about getting familiar with the bhartiya sanskriti and it's rich culture. Exam is organized by Gayatri Shakti Peeth Shanti Kunj, for spreading message of indian culture among the students (those who will take weight of this nation on their shoulders).

There was the time i use to sit in the exam and now time is different i am on the other side. As an invigilator and mentor i was there to take this exam. The name of the school was Dr. Padam Chand Bilam Kanwar School, a government school in jodhpur with limited facilities and resources. We (Me, Puneet Sir, Parmod Sir, Umesh) somehow managed to reach at school. There was no arrangements for the exam as it was government school so no one takes care.

We talked to some responsible person and said him that we came here to take sanskriti gyan pariksha, and he arranged all the boys and girls who registered themselves to give this exam.

Not wasting much time i coming to the point.

Experience was awesome.  When we were delievering instructions to the students they were giving their proper heed to the instructions. Meantime some of the girls calling us uncles "I am not saying it felt good ha ha :) " but after saying uncle they use to laugh. Truely speaking for their laugh i can do anything and it did not feel bad to be called uncle at the cost of their smile, just a shyness came to my face. 

But one thing that is constantly pinching me is that lot of students didn't know how to fill OMR sheets and even they don't know how to write their father's name in english. It really hurts me.

I am not saying that filling OMR sheets and knowledge of english is the certificate of  intelligence but to keep up yourselft up to date and with the pace of your outside environment it is needed.  It is not like they don't know but when i compare theses students with the students of fancy schools where students get enough resources. I feel sorry for government schools students. The relative comparision that is what makes me restless. I know it is easy to say and difficult to improve the situtaion, but we are not trying because it is difficult is not the solution. 

I was just pondering on the facts that,

How they would be able to match up with the students who are reading in fancy and very resource ful schools where quizes, various competitons are very common?

How they would be able to deal with so called competitive exams? Lacking on this stage will lack them in their entire life. Think of this thought makes me shiver.

Experience was awesome felt good, their smiles cost millions even they don't know but it is true. After a very long time i am seeing this innoncet world. Their innocent smile made me cry.

Day inspired me to do something for these kids, they should not lack behind because of the shortage of resources and awareness.
    

   

Monday 24 September 2012

Lecture Motivated Me : Ram Kedlaya @ IIT Delhi

25 Sep., 2:00 am

Just finished motivational lecture by Ram Kedlaya an alumni of IIT Delhi and founder of Tminus company.
according to him Tminus stands for

T - TIME
M- MENTOR
I - INTERDEPENDENCE
N- NEWNESS
U - UNIVERSALITY  
S - SPARK

Really motivated me shared some of the good stories
He inspired me in the way that, you should be a very good story teller, very good communicator, you should have great networking skills and obviously sharing is very important whatever you learn just share it with others and also nice concept of reverse mentoring.

During his talk he spoke about lot of guys who some how inspired him during his lifetime. I did google search on them-

About the guys he talked in his presentation were

1. Arvind Kejriwal -  Extremely talented guy. You all know about this guy but how Ram Kedlaya described him is as a man who grasped all the concepts given by Gandhiji and applied them very nicely and executed in the form of actions.

In the meantime i also watched speech given by arvind kejriwal @ IIT chennai, and also watched some of his interviews about "JAN LOKPAL BILL". 

2. Gandhiji- A shrewd lawyer by profession, the one who have his mind and heart both aligned.

3. "The last lecture by randy paush"   just give it a search on youtube

4. Michael Jordon - One of the greatest basketball player in the world

5. Google start up story

6. Vinod Khosla IIT Kanpur guy and multi billionaire now, a well known person in silicon valley

7. Ram Kedlaya's own start up story.

Simply liked it...

Let us contribute. 

Sunday 23 September 2012

Google Written Test 21 Sep. 2012,IIT Rajasthan

Third party conducted test on behalf of Google @IIT Rajasthan. 

This is effort of  my colleagues and B.tech guys. I have not included answers of  questions, also i can't claim that my answers are 100% accurate :) though we can discuss. 

Questions asked in Google written test  (21st Sept, 2012 of 70 minutes) 

(30 minutes for objective questions and 40 minutes for programming questions)

Objective questions (18 questions in 30 minutes):

1. How many distinct BSTs are possible for 6 distinct numbers?

(A) 128
(B) 132
© 720
(D) 120

2. Inorder and Preorder Traversals of a tree were given. Find the Postorder Traversal.

3. Which one of the given grammars is regular?
a. (wwr)
b. (wawr)
c.
d.

4. 2 or 3 scheduling questions. (LRU), optimal page replacement policy

5. Find the time complexity of a recursive algorithm.

6.  We are given a set X = {x1, x2, ..., xn} where xi =  2^i. A sample S (which is a subset of X) is drawn by selecting each xi independently with probability pi = 1 / 2. The expected value of the smallest number in sample S is
(A) log n
(B) 2
©  n
(D) √n

7. Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true?

a) R is NP-complete
b) R is NP-hard
c) Q is NP-complete
d) Q is NP-hard

8.

if(fork() && fork())

fork();

if(fork() || fork())

fork();

printf(“hello\n”);
how many times hello will be printed?

9. which of the following languages can be solved using DFA
 (a^n)(b^n)\
 (a^n)x(b^n)
 (a^n)(b^n)x
 x(a^n)(b^n)

10. 1 question from computer architecture.

11. Three processes with process ids 0,1 and 2 with their CPU burst times 2,4 and 8 time units respectively arrive at the CPU at t=0. If the Longest Remaining Time First (LRTF) algorithm is followed, what will be the average turnaround time for these 3 processes. In case of a tie for 2 or more processes, the process with smaller process id is given the priority of executing first.

(A) 11 units
(B) 12 units
©   13 units
(D) 14 units               

12. What the following code does:
bool SomeFunction(unsigned int v)

    {
    return (v!=0) &&  ! (v & (v-1));
}

a) odd number
b) power of 2
c) number contains a 0 digit
d) multiple of 2 

13. A simple graph is one in which no two vertices are connected by more than 1 edge and neither does it contain any cycle. Given a simple undirected graph with 6 vertices which of the following can be the only possible set of degrees corresponding to the vertices of the graph?
(A) {4,4,2,1,1,1}
(B) {4,4,2,2,1,1}
© {4,4,2,2,2,1}
(D) {4,4,1,1,1,1}           

14. An array A has 7 distinct numbers. It has to be splitted into two arrays B and C such that B contains 3 numbers and C contains 4 and atleast one of the arrays should be sorted in increasing sequence. How many possible combinations of B and C are possible?
(A) 30*(7C4)
(B) 29*(7C4)
©   28*(7C3)
(D) 32*(7C4)


15. Two numbers are chosen at random from the set {1,2,3}. What is the expected value of sum of these numbers?

(A) 4
(B) 5
© 4.5
(D) 3
 

16. What is the time complexity for finding the GCD of nth and (n+1)th Fibonacci Number using Euclid’s Algorithm?
(A) log(log(n))
(B) log(n)
© n
(D) n^2        

17. How many minimum states do you need to draw a DFA of strings which include a’s that are divisible by 6 and the number of b’s divisible by 8?
(A) 8
(B) 14
© 24
(D) 48      

18. There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that only one station transmits in a given time slot?
(A) (1-p)^(n-1)
(B) np(1-p)^(n-1)
(C) p(1-p)^(n-1)
(D) 1-(1-p)^(n-1)   


40 minutes for this programming question given below-

----------------------------------------------------------------

Programming question: (Language could  be  C,C++,Java. An optional component of logic presentation was also there)

There are n dice each with m faces numbered from 1 to m. Given a number x, find out the probability that the sum of all numbers obtained from the n dice in a trial is greater than x. All dice are fair. A function double winningProbability(int n, int m,int x) was to be written.

This question can be divided into two cases, n<=m and  n>m.

Case 1: When n<=m,

Probability=(1-xCn/k), where k=m^n.

Case 2: When n>m,

Wednesday 19 September 2012

" Install Greasemonkey and try some scripts in your browser"

Today i was browsing and got to know that you can use scripts to give extra functionality to some particular web page or particular websites and ride and drive them according to you. I mean the code or script you write that drive the functionality of that page.   

 for example

1. Suppose in you tube you want a download link right below the video so that you can download it in mp4 video format or some other formats.
 You don't have to go to some other websites to download youtube videos, Or you don't have to download and install youtube video downloader.
The particular script will enable a download link below your video and just by clicking it you can download video.
Greasemonkey will execute this script for you. (* I am explaining about greasemonkey below). 

2. Signout from your gmail account automatically within some prescribed time limit (decided by you).

3. In facebook if you go on chat id's you can see there big pictures and images on the left side of the page.
and many more.

  So there are two things you need to make the things work-
1. you want script (code) that drives functionality. Extra Functionality in the form of code. 

and the

2. second thing is execution of the script in your web browser that is done by installing greasemonkey addon.

We will follow the above stated procedure but second  option first, first install greasemonkey addon required to execute script in web browser and then after install script or manually add source code of script into the web browser.    

Note I am illustrating it on FireFox web browser only, if you use another browser then there are some other extensions like greasemonkey in firefox same like tempermonkey in googlechrome.

So start,
For adding these functionality for particular pages and websites in your web browser, first you have to install Greasemonkey addon it is simple  : I am talking about greasemonkey an addon on firefox.

Greasemonkey add on is required because it executes your script in web browser fine. 

STEP 1:
Just go to the site Greasemonkey  click Add to firefox button
and you will get greasemonkey addon installed on your computer.  

The top right most sign of monkey near your link bar signifies that greasemonkey is installed on your computer. There is drop down button just near that monkey sign, where there are options to enable and disable greasemonkey and etc. 

STEP 2 :
Now you require some cool scripts to run on.
Just search some scripts on this link
and install any script you like in your browser  it is simple just click install button.

Second way to install script after installing greasemonkey.
This is from source code also you can install these scripts.  just save source code by         
                 filename.user.js extension.
                    keep attention on .user.js extension

open this file in your web browser by going on file open and it will prompt to install your script on the web browser.
as greasemonkey is installed on your computer so just install the script and you are done the new functionality has been added to the browser.
You can manage the script remove by going in tools->greasemonkey and then manage scripts
from there you can remove disable and set preferences to the scripts that you installed.

If you have problem in setting up scripts then can comment. I will try to sort out the issue

Cheers and Give it a try, it's cool and try to make your own scripts too..

Wednesday 5 September 2012

More on LaTeX : History and Motivation

LaTeX is a highly efficient document preparation system developed by Leslie Lamport. It all started when the legendary author Donald Knuth was writing the second volume of The Art of Computer Programming. The lack of a good type-setting system led him to develop Tex and release it as free software. LaTeX can be thought of as a Tex extension intended for UNIX systems. Like Tex, LaTeX is also free software, released under the LaTeX Project Public License (LPPL).

Why use LaTeX ?

One of the main advantages is that it helps typeset documents beautifully, especially technical documents:
Mathematical formulas can easily be constructed using certain commands.
  1. Being a programming language, a user can easily modify its default behaviour.
  2. The availability of professionally crafted inbuilt layouts make a document really look as if printed.
  3. Documents in PS, PDF formats can be easily generated.
 
 Classes and Packages:

Like the Linux mechanism of extending kernel features with modules, LaTeX provides classes and packages for extending behaviour. A class is used to modify a document style. Beamer is one of the most popular LaTeX classes for creating presentations. Prosper is another widely used presentation-making class.

Packages can be added and used inside a document class. A package is used to provide some additional functionality to an existing document. For example, if we need to insert a picture, we have to include the graphics package. For a document, there can only be a single class, but many packages can be used inside a class. Some commonly used packages are:
  • amsmath — Mathematical formula formatting — \usepackage{amsmath}
  • graphics — Handling imported images — \usepackage{graphicx}
  • fancyhdr — Used to insert custom headers — \usepackage{fancyhdr}
  • makeidx — Used to build an index for a document — \usepackage{makeidx}
  • fontenc: Handling font encodings — \usepackage[encoding]{fontenc}
 

Updatation of tex-live package for LaTeX : More Tips

Updatation of TexLive package- (for unix, linux flavors and mactex)

all tex live distribution contain

1. binaries
2. packages and classes

for updating tex live there is separate update schedule for both of these. The TeX Live binary part of the distribution undergoes a major update only once a year, while the packages can be updated constantly.

if you have for example TeXLive 2011, you can update its packages roughly until TeXLive 2012 is created. After that point, your 2011 system will not be able to update any packages ever again using the normal package manager. (You can update individual packages manually via CTAN, of course.)

Binaries updates available once in a year and once it is out you have to update like you have to install distribution fresh, now you would not be able to update the packages but manually packages can be updated via CTAN. 
for more refer to

http://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution


Continuation my previous post on latex, i just want to ensure that i am using the latest version of tex-live as  i checked using
                                     $tex --version
 i got to know that i am running tex-live 2009 version and 2012 is already there on TUG website.

So i checked why is it so and i deciphered that by default if you install tex-live using
               $sudo apt-get install tex-live
it will install tex-live version 2009


for testing which version of tex live you are running on your machine use
                   $tex --version
 it will return version of tex live you are using


Now for installing tex-live version 2011 on your machine follow following steps-
Although the most recent version of tex-live is tex-live 2012.

STEP : 1
To install TeX live 2011 on ubuntu 11.10, download the installer “install.tl” from
 http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

STEP :2
Extract the package. Now open terminal, and go to the directory where the folder is extracted. In the extracted folder you will have “install.tl” file, which is a perl file.
                             Now, give the command
                               “sudo perl install.tl”




Sunday 2 September 2012

Doxygen : Documentation of your Source Code

If you are working on big projects then documentation is very important for keeping your audience skilled and make them understand about your development.

There are various automated tools that automatically document your code. Moreover from the comments that you put up in between your code that are taken by these tools and used in your documentation. These tools make tex files, html pages for your software code automatically. There are many automated  tools  available some are

                             Javadoc - specifically used to document java code.
                             doxygen- c,c++,java and document code in various languages

some of the tools and their comparative feature are stated on this wikipedia link

http://en.wikipedia.org/wiki/Comparison_of_documentation_generators

just visit this link and have a look on various features.

I have settled up doxygen for documentation of our project on my Linux machine.

Installation of Doxygen-
1. Directly you can install it from synaptic manager. There is separate package available, atleast i know above Ubuntu 11.04 it is available as separate package and you can download and install it from Ubuntu Software Center.

2.if you want to install it using binary installation then you can download doxygen from
               http://www.stack.nl/~dimitri/doxygen/download.html
on this link binary distribution is available this is compiled code for the software for linux and windows.  You just have to extract it and make it install on proper place.

Using Doxygen-

1. Creation of doxyfile, that is a configuration file where you configure for the documentation. 
for creating doxyfile just go into the main directory of your project and
use

$doxygen -g
(A doxyfile configuration file is created with the name doxyfile)

$doxygen -g filename
doxygen configuration file is created with the name as filename

 2. Now doxyfile has been created you have to set or configure various parameters in this doxyfile, just study this doxyfile and set various parameters according to your requirements.

3. For compilation use

$doxygen
this command will compile your doxyfile and generate, two directories name
html and latex.
these directories will contain the documentation in the form latex file and in the form of webpage.

Important thing is to set various configuration parameters in configuration file, like path of  source files, files you want to document etc. etc. just have a look on
doxyfile created using the command $doxygen -g
and you will get to know various parameters you have to set. ...

Another important thing is coding style and adding comments in between your source code. There is specific style for writing the comments so that doxygen can compile it and take out the comments and convert them in the proper documentation.

If you have doubt can comment. More finer details like how to set various parameters of doxyfile would be discussed in next posts.

 "Happy documentation"........

 


Friday 31 August 2012

"Aur bachpan ki yaad aa gayi"

31 Aug.,2012
1:15 pm 

It is raining outside and I am tempted to go outside to take bath in this rain certainly after my school completion i have never taken rain drops on my body intentionally, but many times uncertain nature of rain made me wet.

 This rainy season reminds me my childhood days, I used to go to my school on my own foot only, this was the golden era of my life, i was in my early days of schooling was in 2nd class (journey continued upto 10th class), indeed conscious about the environment around me. I can't forget those masti days, aur aaj bachpan ki us masti ki yaad aa hi gayi.

 I have to go now, can't resist myself, going to take bath in this rain let me enjoy those days again, i will complete this post afterwards...

Happy rainy season..    

Back on the post yeah i enjoyed rain today, it was awesome. When the rain word come in my mind obviously i can not resist myself to think about haridwar and  memory of haridwar rainy season became fresh. Obviously when a person like me who never crossed the boundaries of rajasthan when saw the environment of haridwar it was totally like divine experience specially when i came back from my home for my second semester (February onwards...) my god awesome awesome. I remember the june month was our exam time and we used to go to our university campus for our final semester exam in heavy rain.

 As far as the weather is concerned haridwar is a very nice place to live, it is heaven like experience, time when i was there my opinion was not like that, "ghar ki murgi to daal barabar hoti hi hein" but i can feel it today. Soon gona visit haridwar willing to live that life again ...
 
    See post started with rain ended on haridwar strange but only human mind has this capability

Mansa devi, Ganga Maa call me soon, waiting for your call. Wish my all friends, we all meet again there. To all my sweet friends, have a bright future....



  

Monday 27 August 2012

ISKCON : I believe on God but.....?

After such a long time i attended lecture of a person who is believer on the principles rooted by ISKCON. Although previously i have attended lots of sessions by ISKCON. I am writing this post because explanations and arguments given by them are perfectly valid, but i have some doubts, and  have my own arguments.

If you attend any ISKCON session you will get to know they usually start the session by asking following questions--

1. First they ask
 Who are you? Are you only this body whom you want to satisfy?
 what you want to do with your life? What is your ultimate aim?

My answer would be obviously i am a student and son of my parents. :) not that much complex correct.. :)
 
2.Second they say you are not body. I agree with it and the arguments given by them are very nice. I too believe on that. ..

3. They say you are soul

4. They say to achieve something, we need to control senses- I perfectly agree with it.

5. Now in final they say that for controlling your senses you have to chant name of the god moreover they say best way to control your senses and get to know the real truth, real knowledge ("Gyan") is to chant name of Krishna.

And the best part of  ISKCON sessions is "Prasadam". I like prasadam a lot because when i eat my body feel kind of peace, obviously tasty and delicious.

Wow.. Today also they distributed "Cadbury made by milk" :).   

The magical mantra (According to them) is- 

                        "HARE KRISHNA HARE KRISHNA 
                         KRISHNA KRISHNA HARE HARE 
                         HARE RAM HARE RAM 
                         RAM RAM HARE HARE"

I do respect their beliefs but don't know, because at some point i am not
 able to convince myself about chanting this mantra regularly.

I partially believe on it, why i believe partially and not fully, reasons are as follows-
 My mother is a very religious lady and she used to chant lot of mantras (Hanuman chalisa, Sundarkand, Amritwani, Geeta, Two time Aarti in a day and don't know some more chalisas) and i believe that she is real "bhakt". Moreover she is very punctual in her schedule as far as "Puja" is concerned. She always say to me to chant name of god and because of the love i have for her i can't say no to her and i do too. 
But is this the solution, is chanting the real solution,

i don't know either i am ignorant i mean i am not able to understand the power of theses words, or something else.
 Second So many people in the world are following and they have belief and they say positive benefit by doing it, it give peace to them and obviously my mother's love make me to do it.

 I believe that someday i would understand power of these mantras.
  Although i do believe on God. Because nothing can happen without cause and so this nature is also result of someone's creation the one who is behind it, we call him God and in my opinion yes God exist.

Finally ending words, I don't know how chanting helps and is there any science behind it or not but whenever you do it atleast you feel your mind blank you feel yourself detached with rest of the world,  but how it helps in controlling our 5 senses i don't know perhaps because of my lack of knowledge and ignorance.

I don't do chanting regularly, so i can't end this post by saying "Happy Chanting" :),  but give it a try and share your experiences, perhaps you can give better arguments and convince me to do it regularly... : ) : )

Have a nice day....

Monday 20 August 2012

Internet will shrink : Do you agree?

In my previous posts i shared my bookmarks with you, also i was talking about keeping your files safe moreover maintaining your code and preserving versions of your program using git.

All this i was doing because i ask myself, what if your laptop will collapse? What if your hard drive will get corrupted? You will miss all those useful information your laptop is having with it.
  But what if internet will collapse isn't there is any probability? I will loose all my posts on this blog, i will loose my  website too. Isn't there is minute possibility of collapse of internet.

With time internet is spreading like demon, Is it right word to use :) ?. Everyone is addicted to it and situation is same like our ancestors were living without electricity but in this age we are not able to live without electricity continuing the same tradition next generation would not consider their lives without internet, almost the time has come. Way we are having electricity connections in our homes, soon we would have internet connections too in our houses. But I do remember very famous quote
                
               "One who reaches on his peek, he has to fall back again".

Nowadays government is taking stringent action towards the use of internet moreover on the access of information on internet. Various copyright laws, piracy protection laws has been made to control this giant from spreading. This is a kind of balance that is maintained in some form. Don't know whether it is right or wrong and don't want to mess up in arguments.
 I just want to say, soon time will come when you will have internet connections implicitly in your houses but you have to pay for the information. None of the thing would be much more important than information and you will not get it freely on internet. You will have to pay price for the information.

So ending this post with last words, preserve and spread information you are having with you and make redundant copies of information by spreading it to others so that we can eliminate this possibility.

"Happy information sharing"............... 

   

GIT : "Keep your waste safe :)"

In my previous post i was talking about preserving your files and directories and i was wondering to search something about it, is there any tool to do it?

From last 5-6 months i was hearing about GIT.

I was thinking that What this GIT is all about? Yesterday i was googling about GIT and found lot of stuff about it. I deciphered bit about git, installed it on my laptop and got to know what this is all about?
 
 These days so many companies mainly software firms require some tools to control source code of their programs and also when so many programmers are working on a project then distributing the main thread among them so that they can do parallel work, having various versions and various repositories of files. Preventing data from any kind of corruption.

Essentially companies have large no. of database with them mainly files and directories of various versions and they constantly want to maintain and update these repositories. But doing it manually like copy files save them in a folder time-stamping them by giving them relevant names is common but as the structure grows it would become much difficult to maintain. Suppose you want to modify a file and something goes wrong and you want to revert  back onto the previous version then it is very difficult and probably you lost your code. GIT is something which gives you way to do it.

A most fascinating stuff about git is that this software is made by the same guy who developed linux yeah correct none other than Linus Torvalds. I just got to know it yesterday.

The main reason for the invention of this product is Linux Kernel. Linux Kernel is one of the complex project ever and Linus was maintaining his Kernel versions using Bitkeeper (A commercial tool for maintaining the source code). But according to linus, he was searching best tool for maintaining his kernel and he decided that he will not touch Linux kernel until he don't write his own software for maintaining it, and so Linus started to work on git.

Somewhere on wikipedia i read that he gave name git to it because Linus is a egotist man every product he make he named it to his name and  slang meaning of "git" is unpleasant person. So it implies linus is not a pleasant person ha ha :).

Presently there are various tools for maintaining the source code and versions of softwares. They have their own pros and cons. But if you talk about the distributed version control system tool then GIT is the best.

What is version control systems and why they are required?

Version control systems are used to maintain not only the source code of a project but any kind of file can be maintained using version control systems. It allows you to revert files back to the previous state, revert entire project compare changes who changed the code and when.

The second issue with version control systems are distributed developers, developers are distributed over large geographical regions what if they want to colloborate for a project. To deal with it Centralized Version Control System (CVCS) developed. GIT is also for distributed developers but it is a decentralized system.
 Because of the disadvantages of CVS a new paradigm is used for the maintenance of the source code that is Distributed Version Control Systems (DVCSs). Linus give negative credit to CVS and positive credit to Bitkeeper that motivated him to write git.

GIT Installations-

There are two ways to get GIT
1. One is from source codes
2. second is from Package for your platform but advantage is to install it from the source codes because in this way you can obtain latest version of git.

git depend upon the following libraries
curl, zlib, openssl, expat, libiconv

Simplest way to install git 
         installing git on your linux distribution via binary installer use
         $apt-get install git-core


The other way to install git is first to get all the libraries described above using the command
    $apt-get install curl-devel expat-devel gettext-devel openssl-devel zilb-devel

after installing all the libraries
download latest version from git website    
       

then compile and install
$tar -xzf git.tar.gz
$cd  in above unzipped directory
$make prefix=/usr/local all
$sudo make prefix=/usr/local install

after this, you can install git via git itself for updates-----

$git clone git://git.kernel.org/pub/scm/git/git.git

The above are very simple steps to setup your machine for working with git.
Soon i will come upon more interesting things about GIT.

I am gonna soon maintain a website where we will talk more about it. Although doing it yourself is the best way to learn the things, so install git and keep doing work on it..

Let me know if you are facing trouble in setting up git on your machine...



Friday 17 August 2012

My BookMarks : Yeah I freezed them

Posting my Bookmarks here, I don't know whether it would be useful for you or not but for me storing them, preserving them and making redundant copies is important. What if my laptop would crash or at some point i format my laptop i would loose them and i have to again do that painful search for searching worthy out of google. I spent hours to search these links with different different keywords.

 I always wonder isn't there is good way to store and arrange and preserve your information neatly somewhere so that we can retrieve it whenever required. Nowadays we are having alot of information lot of files and directories in our computer when we try to find some files on our hard drive we navigate from one folder to another and from one drive to another we don't know exactly that where is that file, Just think about it.......

So here is the list of my bookmarks -

Robotics

1. http://www.societyofrobots.com/robottheory.shtml
2. http://www.beam-wiki.org/wiki/Photovores

Motivational 
1. http://zenhabits.net/
2. http://www.matthewcornell.org/blog/
3. http://tinybuddha.com/blog-posts/
4. http://meanttobehappy.com/
5. http://www.stevenaitchison.co.uk/blog/

For a Writer
1. http://writetodone.com/        Write to done

GTD - Getting Things Done

1. http://www.davidco.com/about-gtd

Project- That is specific to our project 
1.  http://dev.frozeneskimo.com/notes/getting_started_with_cortex_m3_cmsis_and_gnu_tools

2. http://www.ladyada.net/products/tfttouchbreakout/

3. http://arduino.cc/hu/Tutorial/ArduinoSoftwareRS232

Real Time Systems Sources

1. http://www.cs.york.ac.uk/rts/recent_phds.php
2. http://delivery.acm.org/10.1145/1020000/1017980/7355.html?ip=117.240.111.2&acc=ACTIVE%20SERVICE&CFID=103537481&CFTOKEN=36638884&__acm__=1344669704_03f9dffac9e892b8d67188200a11ca39

3. http://www.cs.wustl.edu/~lu/

SystemC Resources
1. http://ece.iisc.ernet.in/~bt/systemc/index.html

Web Development
 1.  http://www.littlewebhut.com/css/color/

Top Bloggers
 1.  http://indianbloggers.org/  - Really nice one having list of all top indian bloggers, list is partitioned according to interests and areas ..

Will update it as i would come upon some more nice links .....


Cheers ...................

Thursday 2 August 2012

4th Foundation Day of IIT Rajasthan

2 August, 2012


Today is "Rakshabandhan" and 4th foundation day of IIT Rajasthan. 4 buses were arranged from institute to the permanent campus cite, we celebrated this day by planting trees at  permanent campus cite of IIT Rajasthan. It was very far from our present campus (around 22 kms) and the journey was tiresome.

Feeling of tree "one who gave me life is not alive but he is still alive in the form of mine". These words inspired me to go there and plant trees. One more reason is,  i was very much willing to see how the work is progressing @ permanent campus cite. How our permanent campus looks like. Although we would not be able to see IIT Rajasthan campus fully functioning there till our completion of degree.

When we reached there,  lot of trees were waiting for us :) Actually we were huge in numbers (UG's,PG's and faculty also) so it took very less time and all the trees been planted within few minutes.
I planted "ARJUNA" (only one :(  ),  i don't know some of them were saying that it is ARJUNA so i got to know ohh okay it is "ARJUNA", a teacher instructed me plant it in that particular row, i did the same.

 I am writing this post because i know i would not be able to see the full fledged building of IIT Rajasthan but still there is my symbol, symbol of my presence here at IIT Rajasthan,  in the form of "ARJUNA".
 
Some of them were having cameras with them, they were taking pictures of the plants and also their pictures with plants,  so that they can post their memorable pic on social networking sites :) :). We use to see those kind of pictures in newspapers when some ministers use to go on plantation drive (jealous with them :( :( :( because i was not having camera with me), and i don't want to say anyone  like "please take picture of mine with this plant i ropped". So mentally I  mapped the location of the plant i roped, if in future i come to permanent campus (just kind of imagination human beings only have) i would be able to recognize the plant.

 Below is something i can understand only and i am writing it because in case i forget i can get hint from here.

Location of the plant i roped:

First Gate NH-64
9 feets away from the road inside the campus.
and also RH-3 mark was a bit left to the tree.       

I pray all the plants roped today live long. I felt what a amazing thing it is. The Plant you are planting live more than you and indicate your presence forever. 

Don't know your son or anyone most beloved to you would be honest and devoted towards you or not but these trees will always there with you in any season and in any situation.

With this,  day Inspired me to plant more no. of trees.
  
Happy Rakshabandhan and Happy IIT Rajasthan foundation day. ....

Cheers ..........

Wednesday 1 August 2012

Why LaTeX? Installation and some Tips

Why i came upon this post?

 Before jumping into the topic, first i want to tell you person behind is Swagat Sir (Ex. IIT Rajasthan Professor). Ohh sorry i did not use Dr. actually his name is DR. SWAGAT KUMAR and presently he is working in TCS. Extremely talented,  contributor and a great motivator. He is my guide and guiding me on my masters thesis.
So,  he mailed and said that send your progress report, whatever the work you have done in this summer May-June,2012, Hence I was busy in  making my reports essentially i was making it in Open-Office. I sent him back the report of my work. I included everything relevant and not relevant (i mean not relevant to the research topic on which i am working but still good as far as the knowledge and learning is concerned), though it was brief and i did not arrange it nicely in terms of arranging index and contents also i did not draw proper figures. I sent him my report.

He is very responsive and within a day i got his reply (The thing i like most about him :-) ... ) He replied me with review of  my report, his comments were something like this, I am taking his exact words only because his words are having more impact than mine...
   
Saurabh,


"I am happy with your progress. Please take note of the following:
First start learning LaTeX and write all your documents using LaTeX.
Any other format for technical writing is simply not acceptable. It is
very easy to learn. Sooner you start, better it is for you. There are
enough tools on Linux to create graphs, diagrams etc. Please ask me if
you are looking for a particular tool on Linux. But please write all
your reports in LaTeX."

I took his comments seriously (I always take it...), the day i got his mail i started searching around LaTeX. I got to know lot of stuff about LaTeX.

I too recommend that if you are making your technical report please give it a try and try to learn it. It is very technical and make you realize that you are working on something which is worthy and you feel yeah you are an engineer. When you compile your tex file it gives you the feeling of compiling a program :).

    The other benefit is preserving your documents, tex files are much more important to me now. Before, i use to write a lot but this was like writing something and tore it and throw it in dustbin :) .   
 
Presently i am having only Linux operating systems on my Laptop :), i can't say that i will not work on windows in my future but i really really believe that as far as possible i will try to do my all work on Linux. In this way i definitely discourage "Windows". I don't have personal enmity with "Windows". But the work done by  Linux developer is for social cause. The aim of the FSF (Free Software Foundation please do a google search on FSF, Linux, and Richard Stallman) is to provide free softwares to the users. We should not waste their efforts, suppose no one use their softwares then it would be discouraging for whole FSF community, in effect we should use free softwares only and try to make it better no matter whether they are comparable with the commercial softwares or not.
 
    "How can we compare a free product with a commercial product?" 

Ohh i distracted from my topic (i always), only thing i want to tell you is that i know how to install LaTeX on linux only, I don't know how you to do it on Windows :). For windows you have to search around on internet, i know it would be easy.. ...... 

Installation of LaTeX:

On linux using command line
                      sudo apt-get install texlive-full

This would install a full version of tex live on your computer it is around 1.5GB in size. 

some of the commands used to compile tex files-
              pdflatex filename.tex
              latex filename.tex

Tips:
I am not providing you detailed help on LaTeX,  i will do it on my web page (soon i am gonna prepare it..) there i will provide support on LaTeX.
But atleast i can provide you some tips to sort out your problems with LaTeX.

1. Rule of Thumb- Internet is a big source of information and if there is no one to help you google it... (you will say ohhh we know, it is a very obvious, this guy is worthless :), very common solution)

2.  Templates are best thing to start with. I would not recommend you to  make  from scratch, just search some of the nice templates available on web and try to edit them and change them according to your need.

3. For example if you want to make your programming report then on google search, LaTeX templates for making programming reports, Similarly for thesis you can search templates for thesis etc.

4. Try to understand those templates and try to change them according to your need, and learning starts from here.

5. Understand the commands and try to apply them somewhere else.

6. One of the difficult part is adjusting your images and figures. Use scaling, height and width to adjust them.

As i will come up with more tips i will edit this post and make it better...
But the thing is use LaTeX, soon you will be able to make your own template and support others by providing it to others.   

                                           "LET US CONTRIBUTE "

Friday 13 July 2012

UART Serial Communication on LPC1768

19 June,2012
The core of the board is arm-cortex-m3, Now the task is to send the commands and messages to the board. We will send the commands and messages to the board and the board will decode the commands and messages and accordingly give instructions to the actuators and peripherals to behave in a certain manner.  Our computer is connected to the microcontroller via serial port. Hence we have to decipher the UART communication of the Board. For this I took the manual of LPC1768 and studied How the serial communication can be done on the Board. Before proceeding further we need to understand that there are two programs required, one on microcontroller to handle the serial port of microcontroller and one on computer, using that program on computer we can send data to the microcontroller, here i mean to say that for setting the various parameters of the serial port of the computer for example baud rate , parity, stop bits so that we can synchronize both the ports (our computer and microcontroller serial ports).
For testing purposes like to send the characters on the serial port of the comptuer i used hyperterminal (windows utility), minicom (In linux). These are the client programs but in future we ourselves have to write this program (Client Program for serial Communication).
First We will connect our microcontroller to the Computer via serial port. Mainly the communication between computer and microcontroller is done via interrupt. Whenever there is character available on the serial port of the microcontroller, an interrupt is occured and those interrput can be handled using the UARTIRQHandler Routine. When interrupt occurts it jumps on the UARTIRQHandler routine and executes it. In LPC1768 four kinds of interrupts can be occured which are handled in the same irq handler using if else if statements.

Structure of the interrupt handler in LPC1768

void UART0_IRQHandler (void) (Interrupt Handler Routine)
{
1. if ( IIRValue == IIR_RLS ) /* Receive Line Status */
{
if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
{
}
if ( LSRValue & LSR_RDR ) /* Receive Data Ready */
{
}
}
2. else if ( IIRValue == IIR_RDA ) /* Receive Data Available */
{
}
3. else if ( IIRValue == IIR_CTI ) /* Character timeout indicator */
{
}
4. else if ( IIRValue == IIR_THRE ) /* THRE, transmit holding register empty */
{
}
}

As above in the structure shown in the bold fonts with numbered as 1,2,3, and 4 these are the 4 interrupts can be occured.

The first one is Receive Line Status interrupt, it is a highest priority interrupt and it occurs in one of the following conditions-
(a) OVERRUN ERROR (OE)
(b) PARITY ERROR (PE)
(c) FRAMING ERROR (FE)
(d) BREAK INTERRUPT (BI )
the interrupt will execute within this particular block of code.

if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )
{
}

The second most priority interruput is 2 receive data available when rx fifo reaches on trigger level, in this case cpu can read the data block from the receive buffer register.

In the priority order third level interrupt is CTI (Character Timeout Interrupt)
and the lowest priority interrupt occurs when transmit holding register is empty (transmit holding register handles the data which is transmitted)

Hence followed by this i managed to control the LED'S of the microcontroller using the keyboard of my computer. This was something like this, when i pressed suppose 's' character of keyboard of my computer (client program for sending the character on the serial port was minicom) using minicom i sent the character 's' on the serial port of my computer and serial port of my computer is connected to the serial port of the microcontroller, so microcontroller receive the character 's' and it invokes the interrupt handler routine and in interrupt handler routine i compared the character received with the character 's' if it is true i switched on the specific led of the microcontroller.

In this way i managed to control the LED of the microcontroller using the keyboard of my computer.

-------------------------------------------------------------------------------------------------------------------------------------

Friday 1 June 2012

LabVIEW Training @ IIT Rajasthan by NI

01, June 2012
I always fascinate, from where these companies get those bunch of talented guys. This time i am talking about National Instrument famously known as NI. The training was organized by IIT Rajasthan and a guy came from NI to train us.
The guy came was extremely talented guy, from NI for imparting training to us. Appearance of the guy was normal but as he started to give introduction his talent was obviously visible. And as the days were passing he was looking more smart and more handsome to me obviously his intelligence made me die on him ha ha ha ha :). The training was of 10 days from 21May,2012 to 31May,2012. Name of the guy was Raghunandan Mukund, and i liked the way he was teaching to us. The thing that i liked most was that he did not hesitate to give extra knowledge i mean knowledge that is deviated from the course but i still feel useful atleast for me beause it motivated me alot, other than the LabVIEW (for which he was sent to IIT Rajasthan). First of all those who don't know, LabVIEW is the software made by National Instrument used to program hardware platform essentially made by themselves only.  If you would work on LabVIEW you will appreciate the beauty of LabVIEW. But i always think that where is the executable. Because whenever you write program in LabVIEW you don't have to compile it. The program compiles itself whenever you are writing your program periodically compiler invokes and compile the program you don't have to invoke compiler explicitly. Hence whenever you click on run button it runs the program and you can see the interactive output on the Front Panel. But still where is the executable which runs on the processor Don't know and i forgot to ask him. It's okay i will figure it out somehow.

           So i was talking about the guy who was teaching us, yes Raghu. When Raghu used this sentence ---->"Two or three years after you gonna start your own start up and you will think which NI instrument you should use to develop your application then according to blah blah methodology you will decide". The instances when he used this sentence, I felt a spark in me. You can easily see a smile on my face when he used this sentence. He used this sentence more than two or three times, i think there is something in a corner in  his mind to start of his own company. Many times when he was teaching my heart was saying beauty man beauty at the same time i felt jealous to him and comparing myself with him (How can this guy having much more knowledge than me ha ha :) :) :) ). I would not say that i understood everything he taught to us, many times i could not understand but i think this is because my limited intellectual level and lack of knowledge i am having, that's why  i could not understand. Many instances he inspired and motivated us.
            Now something about the modules that we learned during the session.
1. Core 1 (Basics of LabVIEW)
2. Core 2 (Again some basics and required for advance level learning)
3. Real time programming in LabVIEW
4. Finally on FPGA (awesome and i liked it) although it was short course and not covered advance topics on FPGA. But i always like basics, don't want to do complex things .. ha ha :) :) .
            In totality the experience was awesome and a satisfying experience. I made lot of friends interacted with them. Raghu in every class you asked about the feedback ----->"Guys  are you having any feedback for me?" So Raghu this full post is for you only. Feedback from me and dedicated to you. Wish to learn more from you in future don't know whether it will fulfill or not ha ha :)  and also the knowledge i learned from you i can apply somewhere to make something such a nice and cool stuff useful for all, will try to contribute.

Last words to say that i felt very irritated when i was typing the word LabVIEW because i have to use caps lock key three times, caps lock on "L" caps lock off "ab" then on "VIEW" then again off, typing this line itself was painful stuff but i don't want to play with the integrity of the word,  so LabVIEW    (short for Laboratory Virtual Instrumentation Engineering Workbench) thanks to wikipedia.
My good wishes with you Raghu. Sorry for not using postfix "sir" after Raghu but i think you are dude respect is implicit and always feel you as my friend.
And thanks to IIT  for arranging such a nice course for us.

"Make me learn Learning is key knowledge is power".         

Friday 25 May 2012

Hyperterminal Equivalent in Linux to communicate with other device

I am using minicom (like hyperterminal in windows) on my Ubuntu 11.10

Step 1  install minicom (easy go ubuntu software center and search minicom) install minicom.

Step 2 Connect your serial port to the other device to whom you want to communicate.

Step 3   on command line type
                    $dmesg |grep tty
Output : [    0.000000] console [tty0] enabled
 and output also consist of other devices connected to the ports of your computer

the output of the above command will show that on which specific port you are connected with the other device, if it is not able to show the port in the output that means your machine is not able to detect the other device. 

if it is showing the connected port then it's fine.

Step 4 Now on command line type
                     $minicom
and the minicom terminal will appear here you can set the properties of the specific port that is connected to the device (to whom you want to communicate) properties like baud rate, parity bits, stopping bits and etc.
According to the connected device support for example how much baud rate it can support upto, we will set those properties for the communication.

Hence this is at one side, i mean you have configured @ PC side port for the communication with the other device. But still if you want to test that whether or whatever you are sending on the port is able to go onto the other device, for this you have to write program on other device (consider other device is some micro controller) will do some processing on the data received from the sender, and can again send processed data to the PC and we can see the output on the terminal.
 

Wednesday 23 May 2012

Ubuntu Struggle

Unable to open Ubuntu Software Centre

 
Try out the following commands in terminal  

sudo rm -f /var/lib/apt/lists/*
sudo apt-get update
 
This is for upgrade  
sudo apt-get update && sudo apt-get upgrade 
 

Virtual Box (After Update of Kernel) 

After Updation of the kernel you will probably see that you are not able to open you operating system in virtual box, this is because you have to compile your virtual box driver again for the new kernel 

try the following steps- 
1. Removing 
sudo apt-get remove virtualbox-dkms

2. Installing it again 
sudo apt-get install virtualbox-dkms

3.sudo modprobe vboxdrv 

After trying out the above commands you will be able to use your operating in virtual box 
The other alternative is you can install virtual box software from ubuntu software center again. 



Friday 18 May 2012

"Start of Project - PHASES Description"

Briefly i have described about the project and the capabilities of P3DX and what we gonna do.
The way we started is something like that. The first thing that we decided to use microcontroller from NXP LPC 1768 having arm cortex m3 processor embedded on it. Why we have used this microcontroller? I don't have  concrete reason except it was cheap :) and cortex m series processor was sufficient to accomplish our tasks.
 The programmer or the JTAG that we have used was Emlink for programming the board.
The first thing was to prepare the high level design (hld) that was the structure that how we gonna progress, and aakash did this job. He guided me and showed that how we can complete our project in the steps.
Divided the whole model into the tasks and identified the tasks. Identified that which are the tasks our robot should perform. It was simply like
robot should perform
1. serial communication task (sct.c) - this c code will handle the serial port where the serial port will continuously here the messages from the onboard computer or the pc connected to the laptop and process those messages accordingly and send them to the other tasks

2. Ded reckoning Task - this is mainly the task which is controlling the motor
 3. Buzzer Task
 4. Health and diagnostic task
 5. Sonar Task
6. TFT task - task handling the display 
As from the name it is clear that what are the functionalities of these tasks.

This is what the high level design of the bot.
And the stages in which we will complete our work is something like that

 STAGE 1.  The first task was to set up the toolchain because we will write the code in c language and that can only be compiled on our laptops or desktop we can not compile the code on the microcontroller itself simply we gonna only give binary to the board so the first task was to find out a complete toolchain that can be used to compile the code that will generate the binary compatible to the arm cortex m3 board. (Talking about Cross Compilation).
I have searched lots of toolchains and gained a good knowledge and finally i decided to use Code Sourcery G++ lite toolchain it was pretty much good toolchain and good support and nice online help was available "How to use the toolchain" i  will come up with the separate tutorial on toolchains and also how to install  toolchain i mean how you can use this toolchain on your linux machine.

STAGE2- stage 1 was accomplished and we decided to use code sourcery g++ lite and the way we can compile our program using g++ lite is simply
$arm-none-eabi-gcc options and -o target.

STAGE 3- The next tasks was to make the board in running state. Here i have used the demo available on internet and made a Makefile to compile the code systematically and used keil to port my .elf on the board.  The step was successful and we made it in running state and this much work we complete very
fast.

STAGE 4- The above step was to just test the board the main thing is to use a real time operating system and here aakash suggested to use FreeRTOS. So the next task was to read about FreeRTOS and read about the API'S of the FreeRTOS. Because ultimately all the tasks that we have divided above like sct.c buzzer.c etc all we gonna write using the API's of FreeRTOS.

STAGE 5- Porting of FreeRTOS on the evaluation board. Here we have tried alot and i wasted almost my 1 month to try it, but finally i was able to port FreeRTOS on this board and this i have already described in my other post.

lot of work to do now we have to write all the tasks using api's of FreeRTOS this is almost the longest work that we have to do, but i think not much difficult we can do it.. Aakash is great guy he would guide me and i will do it really fun to work with him and after FreeRTOS porting i am very enthusiastic and motivated  to complete it, without his help this would not be possible to reach upto here ...

concrete description of the stages will be followed in other posts. .
Cheers .... . 


"FreeRTOS port on NXP LPC1768 GCC Compiler"

Cheers!!! Long time after Feeling this kind of pleasure because what i thought i did that ... because of the grace of god and obviously some human beings are also responsible they came in the form of God.
As i was talking about the P 3DX robots and we gonna make prototype of P3DX robots (robots same like P3 DX ) with more functionality and power than present P3DX has and the important thing is that we gonna make right from the physical structure of the robot to all the softwares required to make our bot working.  In totality the robot is fully made by us only.
   Actually P3DX provide development environment for the robots which are used for the mission critical purposes. I mean they are very basic and more complex robots can be developed using these bots by extending them like attaching more number of peripherals to them and etc.
From past 2 weeks i was having great stress on me those were very anguishing days for me because we were not able to get progress on our project and we just stuck at one point. Aakash was busy with his product and all the way i was the only who was trying to make it work. The task was to port FreeRTOS on the board NXP LPC1768 that we bought for our project. Everything we have done correctly but the board was not responding, we were not able to port correctly. I thought that i will port before Aakash and this problem i will solve before aakash but as time was progressing and i was not able to catch the bug i was frustrated, at last one night i decided i will port FreeRTOS today at any price,  i tried very hard i was tracing the code (In between i faced lot of problems because i was running my windows in Virtual Box and also i formatted my laptop once just leave those intricacies those are painful) and the night was 15 May night, I was struggling with my code, for debugging purpose i used a LED of the board and i was playing with the led inserting the instructions for led on off in between the code same like inserting printf statement (used in C) for debugging the program i think the best way to grab the bug (Thanks to aakash he suggested the way). The program was simply blink the three led's of the board with different- different frequencies.
FreeRTOS was managing the three tasks, where each task was responsible for one led.

I was at the last stage of debugging my program and here i got that where is tick interrupt handler.........  i was continuously thinking that where this tick handler is. I just opened the startup.c and found that the handler is systickhandler  and where is the code of the tick handler ? And i found no where that means it is going into the default handler which is nothing but a infinite loop it means i have to give port specific handler to my startup.c and i thought probably this is the only error that has not been traced yet,  what i did is i gave the names of the port handlers in the startup.c .. the names were there in port.c and xportsystickhandler, and two more handlers i just gave those name in the startup.c.. Compiled the program and ported my .elf on the LPC 1768 board and code is up for running the great part is all the three led's were flashing with different frequencies yes yes yes ... i did it  Led's are flashing.
 And yes I did it. The pleasure i am feeling today, i did not feel something like this from past 6 months. I was able to do it probably because Aakash was involved in some other stuff otherwise probably he would be able to do it before me, and also Credit goes to Shreya Ghoshal as i was hearing her songs when i was debugging the program and in the meantime i watched her interview too. Thanks Shreya i love you, you constantly and continuously inspire me don't know how but you do it somehow.
 I will come up with more finer details about the project in my next posts.

Tuesday 15 May 2012

"P 3DX Decoded"

Introducing P3DX robots. Robot on which i am working.
 The base Pioneer 3 DX platform arrives fully assembled with motors with 500-tick encoders (controlling motor), 19cm wheels, tough aluminum body, 8 forward-facing ultrasonic (sonar) sensors, 8 optional rear-facing sonar, 1, 2 or 3 hot-swappable batteries, and  complete software development kit. Add an optional internal computer or your own laptop and the robot is ready to go.
 Typically P3 DX uses Hitachi H8S based microcontroller.

The Pioneer 3 DX is an all-purpose base, used for research and applications involving:
  • mapping
  • teleoperation
  • localization
  • monitoring
  • reconnaissance (french word for recognition) military use reconnaissance to track their enemies
  • vision
  • manipulation
  • autonomous navigation
  • multi-robot cooperation and other behaviors     
Pioneer 3 DX runs best on hard surfaces. It can traverse low sills and household power cords and climb most wheelchair ramps. It can reach upto 1.6 m/s and have 23 kg payload capacity.
P3 DX has all of the basic components for sensing and navigation in a real world environment.

All the things are managed by onboard microcontroller and mobile robot server software running on this onboard microcontroller. 
On board microcontroller have open systems robot control software running on it(mobile server), and the other is robot also come with Pioneer SDK, a complete set of robot control client software applications and applications development environments also.
Hence essentially robot consist of
         1. Micro controller for acquiring sensors readings, motor control, managing attached accessories like gripper
         2. Mobile server software runs on micro controller so our microcontroller behave like a server
         3. For the completion of client server architecture, a client software run on onboard computer or a laptop(connected with the robots microcontroller via a HOST serial link) provides high level intelligent robot control, including obstacle detection, path planning, features recognition, localization, navigation

Pioneer SDK  is a collection of libraries and applications that come with very pioneer mobile robot so ofcourse with P3 DX also it includes
    (a) open source ARIA ArNetworking
    (b) Mobile eyes
    (c) 3 Basic Network GUI applications
    (d) SonARNL
    (e) MobileSim

(a)  ARIA- Provides interface and framework for controlling and receiving data from all pioneers its simply extensible framework for client server network programming

(b) MoblileSim- It is a GUI application for configuration

(c) SonARNL  used for the sonars 

Modes of Operation-
1. Server- easy access to robot's functionality
2.Maintenance and standalone- This mode is generally used to upgrade the ARCOS software on the microcontroller
3. Joydrive- In this mode you can control your robot using joystick with client server implementation.


Thursday 3 May 2012

Where is my Enthu?


         The day i entered in IIT. The only aim of mine was to learn and learn as much as you can. The only thought in my mind was learn with limitless boundaries and i have enjoyed the consequences of it but all of sudden the aim was shifting from learning to making marks and i was hanging between the two sides of the rope where one side is learning and another side marks. I started blogging and took some good initiatives but in the mean time i feel that i have not done proper justice with what i thought and what i did. Initial days were very satisfying and they were increasing my self belief. I could not maintain  my persistence and discipline.
   I don't know but, I am distracting from my goal. Why i am going like very passive. You should be proactive saurabh. Really I Need motivation.
For What and why i get distracted, i don't know but god please help me to get the same enthusiasm and zeal as i was having before. How can some one distract me.... One reason of my distraction is, my very bad and worthy less investment of time on Internet. I just over utilizing the Internet and getting under utilized performance.
              I think i have to take the initiative and i have to create the environment that is beneficial for all. (Random thought came in my mind and wrote it ..)
         One problem also, that sometimes i don't deliver "gyaan" which i have with me to others... and here techbuddy's concept "read" "write" and "speak" i am not applying.
Facebook, orkut all social networking sites are just useless fellows, why i have wasted my lot of time on them.
Hey one thing you should know how to use these resources (Facebook, gmail, and internet......). I should make them my slave not like they make me slave.
      Today Someone inspired me. The name of the guy is Aakash and this post is dedicated to him only. What a worthy guy he is. I always love to talk with him. I like his attitude towards life, great great really. He is really true motivation for me. Aakash you really motivated me today.  I read about several personalities, all have done great and inspirational work in their respective domains but i never communicated with them.
Last book i have read was describing the personalities of several corporate Tycoons like
Ashank desai, Ashok Wadhwa, Dilip Chabaria, Zia Moody, Suresh Talwar, Atul Nishar, and so many but did not communicated with them ever in my life.
There are lot who motivated me, one of them is my father, Aakash is also there in the list. The real thing is that i can make conversation with them and sort out my problems.
Last two or three para i am saying about aakash but i know you are bit irritated that who is this guy and what does he do ?
             He is an entrepreneur by profession having his own company "MindField Technologies" and doing whatever is his passion. There are also some of the characteristics he is sharing with the big tycoons. Like his simple and jolly nature, always happy, enthusiastic (I am lacking with that but he made me that if i can do it you can also do it.), he don't underestimate others, and helping (this is the biggest characteristic and very common among entrepreneurs) and also sound technical skills.  ( I also want to share these characteristics).
             One of the latest achievement of MindField that they made 3d printer. We are very less aware about 3d printer, When I got to know that they made 3d printer i thought what is 3d printer it prints 3d objects or what, i mean what it does? If you don't know just search 3d printer on YOU TUBE and you will get to know about it....

In some sense i am publicizing their company but  i know they deserve  it.
Even he has small company but motivating and accessible to me :).

hey saurabh you can also do it. If anytime and at any point you feel distracted saurabh just open this post and read it.
This time i am again recollecting  my strengths i think i will make best out of me.
                                   Appreciation is the key ... 

Tuesday 24 April 2012

Why exams? (A,B,C,D,--------->F)

End semester exams are going on in our institute and the only talk among the students is about marks and Grades. Sometimes i think that we are running behind marks and grades, yeah we are that is true. We even don't think why we are reading and we just read. "Arre yaad kar le exam mein aayega to chaap dena :) don't you want marks" we usually talk like this during exams.
Not only B.Tech students but also PG students talk like this. Hey yaar this time i want to improve my grades, i want 8 pointer this time. If i will get A in maths, A in electronics, B in blah blah i would reach on 8 pointer other one say "hey bhagwaan iss baar 9 pointer ban jaaye to maja aa jaaye".  "arre sir acche hein B de denge but networks mein kya hogga yaar mid sem bhi accha nahi gaya hein" "Prabhu C laga do iss subject mein" ""iss subject mein to F ka khatra hein" Looks like very funny but when i see myself, i am also not different.
     When i was sitting in the library some of the UG guys were talking in group like 20 mid sem I tera to 16 hein na mere se kam, 5 mid sem II arre yaar yaha kam diye sir ne marks, A ke liye 70 out of 70 chaahiye last sem mein bhi CPI 6.2 rah gayi thi yaar".

Don't know whether it is expectation from our family, friends, pressure from our educational system or it is human nature,  that whenever exams get closer and closer we use to talk and think about our Grades and exams.
Have a good day, good grades and good exams (what can i say except this...)

Saturday 3 March 2012

"French Diary"

Dedicated to my french teacher Emylene madame (French word madam).

The first i took this course because of my attraction towards Emylene madam, here i don't mean that i don't like to learn languages. The way she teaches is like wow. I feel very comfortable and we can ask any kind of question to her, very frank and the best part is to see her expressions, when she smiles and when she scold us those expressions are adorable.  Yesterday (02-03-2012 ) was my first french exam and i think probably i will pass it.As the course is proceeding it is going difficult, french is not  very small language and have very rich in vocabulary as well as their grammar is difficult to grasp. But still we find similarity of this language with hindi and english and sometimes we understand french lines that makes her very surprising.

                           But still we find our benefit and the question raised in my mind was that, why i am studying french and I searched on google for the utility of french language and why study french? the article i found is http://www.fll.vt.edu/French/whyfrench.html.
According to me why i am studying french my answer would be....

1. It makes me confident because it separates me from the crowd or others
2. It makes me to understand the french culture.
3. How french people view the things, their attitude towards a problems.
4. The most important is you are able to make friends easily i think that is the best part. .......   The incident of mine with jennifer ( phd  scholar), and eulis a french undergraduate student. I easily made them my friend by using some of the french words.... :)

Study of my french language is going as follows

Lesson 1 The first two classes we learn alphabets and how we pronounce them
Lesson 2 Informal and formal situations, which words we use in these situations.
Lesson 3 Writing and understanding visiting cards.
Lesson 4 Description of a person or kind of Bio data I mean how you will write your Bio data and understand other's bio data.
Lesson 5 Subjects and understanding the "eter" and "avoir" verbs.


                   Probably the time will come when i will write my full post in french language and specially dedicate it to my french friends hey don't panic yaar i will translate it in english too ha ha :).
Constant inspiration, motivation and reinforcement is required from you all my friends and i think my passion towards french will continue..................................

merci (french word for thank you) for reading this post ...