Monday, April 14, 2014

Distance MS and Full time MS - Pros - Cons

Many of us often come across this situation while we are in B.Tech/B.E or even post B.Tech/B.E.

Shall I enroll for MS in Abroad? Shall I do distance MS?  Is it really required to do MS at all?

To answer that there are various ways one has to approach this thought.

Pros/cons of MS abroad:

1. If you do MS abroad, you get to stay in abroad post MS. You can enjoy bachelor life to the max whilst your stay in abroad . Of course you can earn a good amount of money($). You will also get a bonus title(FOREIGN RETURN) when you are ready for marriage. Many consider that as a pre-req to give their daughter/son

2. If your parents are wealthy enough to spend all 30+Laks on your MS expenses, then you are a LUCKY BOY. Trust me. Post MS, you get to earn a lot of money just for yourself :D

3. The experience you get doing MS abroad is priceless( in terms of Learning and in terms of places you get to Visit). Students who are not into the habit of coding during B.Tech/B.E days, are forced to code while they are doing MS. So, they learn enormous amount of technologies.

3. MS abroad is the easiest way to settle abroad.

4. If you have opted for Education Loan for your MS, it will come up to minimum 30+Lakhs for 2 years. So, you would end up clearing that in around 2 years post MS. If post clearing your Edu Loans you decide to come back to India, then you would effectively end up getting + or - two lakhs extra than your fellow classmates who will be working in India after their B.Tech.(Considering your classmates didn't do MS abroad). So, you might have to question yourself, was it really worth spending 30+Lakhs on MS and end up clearing the educational loan by working 2+ years in US and return back to India with actually no difference between you and your non-MS counter parts.

             If your intent of doing MS in US is not money or if you wanted to stay in US,  then point 3 is not valid for you.

Pros/Cons of doing Distance MS

1. If your intent is value add post distance MS, then you might consider not doing distance MS You have to switch to previous paragraph for details.

2. Doing distance MS is any day better than not doing MS at all. This gives you a self satisfaction that you did MS at-least. I preferred distance MS mainly because I fell under previous paragraphs point 4 bracket.

Hope this helps your thought process!


PS : This post is for CS students only.  If you are really strong in coding during B.Tech/B.E days, then you can get good job with brilliant pay.


MS - Completed (2010 - 2012)

Its been two years Since I blogged. Yes, I completed MS from BITS, Pilani in System Software stream. It was a dissertation semester. Semester involves the following steps :

  1. Selecting a project
  2. Submit the project's technical overview before the deadline. Once done after few weeks you will be allotted a Professor(Mentor) for your dissertation. 
  3. Submit the project updates to your Professor(Mentor) before the deadline.
  4. Submit the soft-copy of the completed PPT to your Professor(Mentor) and choose the location of presentation of dissertation.
  5. Final demo at your selected BITS Campus.

My location was BITS, Goa. Two other friends of mine(Avinash and Abhijit) also got the same site for their dissertation. We did plan well during our Goa visit. We reached BITS Goa, a day before. We rented vehicles and visited several beaches, ate outside.

All 3 of us had presentations at different time-slots and under different Professors. It was a great experience overall. 

If your project is not at all acceptable and needs to be redone. Then, the mentor will tell you on the same day of presentation. Then, the candidate has to enroll again for the final semester and Repeat Steps 1-5. But 95 out of 100 students will clear the dissertation.


We got the results after 2 months from the day of project presentation. We obtained our MS Degree certificates after 4 months from the day of project presentation.

Sunday, May 20, 2012

MS 3rd Sem Results

In the earlier blog about the 3rd semester, I had mentioned about waiting for the grade of one more subject. Finally, the results have come.


 ===============================================================================
 SNo.Course No.  Course Title                  EC-1  EC-2  EC-3  Total   Final
                                               (10%)(30%)(60%)  (100%)  Grade
 ===============================================================================
 1. BITS  ZG659 TECHNICAL COMMUNICATION        9.50 18.00  45.50   73.00   A- 
 2. SS    ZG515 DATA WAREHOUSING               8.00 18.00  39.00   65.00   B- 
 3. IS    ZC424 SOFTWARE FOR EMBEDDED SYSTEMS  7.00 11.50  34.50   53.00   A- 
 4. EEE   ZG512 EMBEDDED SYSTEM DESIGN         9.33 13.50  35.00   57.83   B- 
 ===============================================================================
 Current  CGPA :    7.71





Yes, I have completed 3 semesters. One last semester to go. Cant wait for it to happen! 



Monday, May 14, 2012

Largest rectangle ( area ) in the given Histogram

Problem :

Given an array of non-negative integers. Construct a histogram using array indices as height.

Assume the width as 1 unit. Find the rectangle with maximum area. Try to come up with an optimal solution.

Solution :

This problem can be solved in O(n) time, by comparing the prev and the current elements.

Here is the solution for the same.


MS - Software Systems - 3rd Semester

Finally, I am done with my 3rd semester exams. Though I am blogging a bit late about it, better late than never. With the interest of studying the subjects which I have never before, I opted for Embedded Systems Design and Software for Embedded Systems along with the Data Warehouse and Technical Communication.

The initial days were very difficult. I was finding it hard to manage work and the course. But over a period of 4 lectures, I had a hold of it. The mid-sem went fairy well. After one month, the final sem exams arrived. Had brushed through the concepts well and the open book exams were mostly design oriented for Embedded System design and Software for embedded systems.

I have obtained the results of 3 subjects.

In dataWarehouse I have scored 73 on 100, embedded System design, 57 on 100 and 75 on 100 in technical Communication. I am waiting for the last subject result. As soon as I get it, I will be updating the blog.

To all my batch mates, Wish you all the best! 

Design and Code : TicTacToe Game

Problem :

Design and code the TicTacToe game. Take care of all corner cases. The program should be extensible and very modular.

Solution :

This is a trivial game. We just need to take care of the vertical, horizontal and diagonal strikes, after each move. If there is any, then the game ends. After all moves, if there are no strikes, then the game is drawn.

The complete source code is available here

DutchNationalFlagProblem


Problem :

Given an array consisting of 0's 1's 2's ( Red, Blue and Green ). Come up with an approach where in array is rearranged such that, all 0's appear first followed by 1's and then 2's.

Solution :

This is equivalent to the partitioning having pivot element as 1. All elements less than 1( which is 0) will appear on the left hand side and all elements >1 are appearing on the right hand side. ( 2)

Here is the attached code for the same.



Sunday, October 9, 2011

My new Alto K10 VXI


Finally, I got my first Car. Yes, it is Alto K10 VXI ( Silky Silver ). The drive has been so comfortable. No doubt it is the best selling hatch back car from several years. With a decent 17+ mileage, and pretty good look, it suits a small family very much.

Featured with a 1000cc engine, front power windows, and other accessories as part of the fully loaded model, its giving me 17 kms per litre. With the amount of traffic increasing in Bangalore, we can easily sneak in the small roads with this Alto. Thats an added feature, as its small and can be driven through the narrowest roads like Avenue Road :)

With the launch of the hyundai-eon. There has been a very big hype already about eon, that it might compete and even beat Alto ( 800 cc).
We need to wait and watch as to how the competition goes between eon and Alto.

Yahoo!!!!



Its been 2 months since I joined Yahoo!. I have learnt ample amount of technologies. I am already experiencing as to why engineers like to work at Yahoo! and why its one of the best places to work for!

I have seen engineers being not happy in companies, either due to the constraints they will be having, to incorporate the languages. They will be restricted to work on only one thing for a very long period of time. There will not be much of coding, and only enhancements for the existing code. LIke these, there may be several reasons for why they dont like their jobs.

Yahoo! is one of the few companies whom you should look for. It provides the engineers to leverage the power of open source technologies, freedom of implementing the code using the open source technologies based on engineers choice and its feasibility and flexibility.

Below are some of things I have dealt with.

1) Hadoop File System, Grid Computing.

2) Selenium

3) Robotium

4) Android programming.

5) IOs programming using Objective C.

6) IntelliJ IDE which is robust and really awesome.

7) Hibernation in Java using various Databases.

I am enjoying every single moment at Yahoo! and hoping and hunger to learn ample amount of things, every day!

Friday, August 5, 2011

Last day at NetApp!




It was a great journey from July 20th 2009 till Aug 2nd 2011, both professionally and personally, at LSI and NetApp. I will be missing my friends and I am carrying back ample amount of memories to cherish them in the coming days. The weekend cricket, trek, quarterly trips and team meetings and many more. The recent team outing at the Royal Orchid Resort is a heavy load to cherish :)

I will be joining Yahoo soon. All excited about my new career ahead.

Thursday, August 4, 2011

Spiral Display of a 2-D Matrix


Its one of the common interview questions where you will be asked to display elements of a 2-D matrix Spirally. I was trying to write the code for the same. Over a period of nearly 5 hours. I got something decent.



Code can be found here

The complexity is not so good. If you have any suggestions on improving it, you can comment.

The logic here is :

Traverse the first row and then the last column and then the last row and then the first column.

Then, discard the traversed rows and columns. The matrix will be reduced by 2 rows and 2 columns.
Keep doing this until you fetch the order number of elements in a matrix.

If its a row, column matrix. Don't perform the above operation , just print out the elements.

Friday, July 29, 2011

MSSS - 2nd Semester - 2011

After the 1st Sem results were out, I had almost 2 months off. Off as in, it is not the usual full time student holidays, but a long break from studies and was completely involved in the office work.

Now its time for some hard core studies. The 2nd sem has begun. Having said that, its almost one month from the day course handouts were listed for the current semester.  At first in the current sem, I had technical communication as one of the subject. It was swapped with data structures and algorithms. I had called up BITS to clarify the same. They confirmed that the data structures and algorithms was moved to the next semester.

On a weekend I bought all the semester books. After few weeks, I opened the virtual site of BITS and looked up for my subjects. I saw a change again. Data structures and algorithms was back in my subjects list. I called up BITS the next morning. They confirmed me that they changed back the subject as many students had called and requested.

With all this drama happening, I have not yet been able to concentrate on the 2nd semester. This time new concept called quiz has been introduced for data structures and algorithms. 10% of the weightage is given to that and it is mandatory to attend. The mid sem exams will be in September Last week.


Hopefully I will come to track on my 2nd Semester soon!!!!!

Sunday, June 26, 2011

Exploring Ubuntu 11.04 - the Natty Narwhal !!

Last time I had posted something about Ubuntu was in Jan 2010.

It was about Ubuntu 9.10. After that I got into some things related to my work and could not concentrate much on Ubuntu releases though I used to download the releases and carry them.


This weekend, I had planned to download and install the Ubuntu 11.04 - the Natty Narwhal. Everything went well as planned and I am very happy. 

1) The look and feel is very awesome, and its changed quite well when compared to the earlier releases of Ubuntu. Now the default look on the screen is like the Vista Theme. 

2) Twitter, FaceBook accounts come along with Empathy IM.


3) The FireFox 5.0 is very awesome and default in Ubuntu 11.04 - the Natty Narwhal :). 


4)The app launcher is like the Samung Galaxys Home Screen, with a search tab at the top, which is so so cool. 


5) Searching the applications based on their type. 


6) The usual Compiz-Fusion and the WorkSpace Switcher :)

7) Comes with default LibreOffice Writer and Gimp Image Editor :)


Still many more features to explorer and more precisely the above ones were GUI related. A lot to explore w.r.t the TERMINAL. Will update those experiences as soon as possible. 



Happy Ubunting :) :)



Wednesday, June 22, 2011

BITS Pilani, MS -- End Sem ( Comprehensive Exam) Results :) :)

Few months back I was worried about my end sem results. I was expecting to get a D or E in Data Mining and C in Advanced OS too. And the results turned out to be as expected. Bingo!!!!

Here are my results of my Comprehensive Exams of 2nd Semester ( Dec2010 - May2011).


===============================================================================
 SNo.Course No.  Course Title                  EC-1  EC-2  Total   Final
                                               (40%)(60%)  (100%)  Grade
 ===============================================================================
 1. CS    ZG623 ADVANCED OPERAT SYSTEMS       14.50 26.00   40.50   C  
 2. SS    ZG514 OBJ ORI ANALYSIS & DESIGN     30.00 31.00   61.00   A  
 3. BITS  ZC481 COMPUTER NETWORKS             33.00 45.00   78.00   A  
 4. IS    ZC415 DATA MINING                   17.50  9.50   27.00   D  
 ===============================================================================
  Current  CGPA :    7.47

 Legend : EC-1 : Mid-Semester Test (Closed Book)
          EC-2 : Comprehensive Examination (Open Book)
          NA   : Not Appeared               
          UE   : Under Evaluation
          RRA  : Required to Register Again
I was very very happy as the results turned out to be as expected. I hadn't done well in Data Mining, so pretty much I obtained as much as I deserved. 
The Registration card for the continued students is out on June 21, 2011. Looking forward to apply for the First semester 2011 ( which is my actual 2nd Semester).
I will post the further updates once I have any. 
Congratulations to all those who faired well in their exams. :)

Sunday, April 3, 2011

Mid-Sem and Comprehensive Sem 2010 MSSS BITS Pilani

In the last post I had blogged about my first closed book MS WILP. Like i had mentioned I have opted for Software Systems.

The mid sem marks were out. I hadnt performed well in Data Mining, so there were no surprises that I didnt get
enough marks.

Here are the mid-sem marks.


===============================================================================
 SNo.Course No.  Course Title                  EC-1 Regular
                                                (40%) 
 ===============================================================================
 1. CS    ZG623 ADVANCED OPERAT SYSTEMS       14.50 
 2. SS    ZG514 OBJ ORI ANALYSIS & DESIGN     30.00 
 3. BITS  ZC481 COMPUTER NETWORKS             33.00 
 4. IS    ZC415 DATA MINING                   17.50 
 ===============================================================================

I have given my Comprehensive Marks on April 1st and April2nd. Phew. April 2nd was supposed to India vs Sri Lanka WC Finals :)

In the comprehensive exam, Data mining was a flop again. I have not performed well at all. I am little worried if I can get at least a "D" to pass the paper. Else, I have to reappear for Data Mining exam again by paying the complete semester fee after all the 4 sem's get over. This is because the exams will be held only on Saturday and Sunday during the usual Mid-Sem, Comprehensive exam timings. So, there will be no separate slots for us to take up the remaining subjects. 

Hoping to pass in Data Mining. I will update the results once I get my Comprehensive marks.

Note :

I have learnt that its always a nice trick to score well in Mid-Sem exams. Since the Comprehensive exams will be Open book, we might take it very lightly and not prepare well, and end up like I did. So, smash the Mid-Sem papers to atleast get a B overall.

Sunday, January 9, 2011

Pursuing MS at BITS, Pilani

It's been my long time I have blogged since 2010 and I have decided to do one about my continued education. My long term desire, to have a MS degree has come true. After series of research, I have decided to Opt for Work Integrated MS Course which is being offered by BITS, Pilani. Numerous employees from different companies, are and have been doing it. Though at first I didn't opt for the course, later I decided to do it.

               Each semester will be offered 4 courses, for 3 Semesters. Then, final Semester(4th) will be dissertation. We will be needing to present our project at Pilani institute on the preferrable day, which will be agreed upon by you and the university. ( Prior to the day of submission of project, University will contact us and based on your available schedule, you can book a day and visit Pilani and present your project).

I am right now in my first semester. I have opted for 4 courses ( Data Mining, OOAD, Advanced OS, Computer Networks). The first closed book exams are on Feb 5 and Feb6th 2011. Its been hard to maintain work and study life balance. Hoping to fare well in the exams. I will be updating the blog periodically. Drop in if you any questions regarding this WILP, at BITS. I will get back to you.

Tuesday, January 5, 2010

Cisco VPN Client to Ubuntu 9.10

Its usual that the vpnclient while installing for the first time on Linux, it gives few error messages reporting to the missing library files, header files. Here is the procedure of fixing them.


VPNClient requires kernel header files while getting installed. So, we need to download the patch and patch it with the old source code. Below are the few steps you need to follow to successfully install vpnclient on your linux machine. 


Ubuntu supposed to be my option here. 


 

Downloading Cisco VPN Client And Patch

  1. sudo wget http://projects.tuxx-home.at/ciscovpn/clients/linux/4.8.02/vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
  2. sudo tar -zxvf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
  3. cd vpnclient
  4. sudo wget http://lamnk.com/download/vpnclient-linux-2.6.31-final.diff
  5. sudo apt-get install patch
  6. patch < ./vpnclient-linux-2.6.31-final.diff
  7. sudo sed -i 's/const\ struct\ net_device_ops\ \*netdev_ops;/struct\ net_device_ops\ \*netdev_ops;/' `find /usr/src -name netdevice.h`

Starting Cisco VPN Client

  1. copy your .pcf file to /etc/opt/cisco-vpnclient/Profiles/.pcf
  2. sudo /etc/init.d/vpnclient_init start
  3. sudo vpnclient connect  
Just include only the filename with no extension in the previous step.

Tuesday, December 29, 2009

Problem and Solution to Installing Google Chrome Browser in Windows 7

While Installing Chrome to My Windows 7, I was getting the following error message --->
"Google Update Error 0x8004071c"

This is because my computer was in audit mode and I had to take it out of that. So, to do that try the following
  • Go to Run in Start Menu. 
  • Type regedit and select OK. 
  • In, HKEY_LOCAL_MACHINE
  • Scroll to SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State 
  • Right Click and Select Modify. 
  • Delete the value.
  • Select Ok. 
  • Now try to run the chrome setup.exe

Thursday, October 1, 2009

PyCon India 2009






It was 26th September. The Day 1 of Python Conference India, 2009. It was held at IISc. I was all excited to attend the same. At 8 30 I was at IISc. Registrations were started. Since, I had registered late, I paid 300. It was worth it. Got 2 T shirts( One is mandat given, and the other T shirt had a constraint, which I ll be telling you later :) ) Food coupons were also given for 2 days, including Tea :)

 Madhusudan came after few minutes. He had come with his team mates from IIT Bombay. ( Prabhu Ramachandran, Asokan Pichai, Puneeth and Kadambari Devarajan). After sometime, Krishna, Subbu and Roshan were also there. We all went to Hall L4.

My adventures with Python - Prabhu Ramachandran :

At 9.30 in Hall L4, Dr. Prabhu started exploring his adventures with Python. How he used python for various Research work at IIT Madras and Bombay. We were really shocked and amazed by his views. A person who is into Aeronautics, totally non CS background, has mastered Python to a great extent, and still hungry to achieve even more. This was very catchy. His implementation of Python for Temperature studies,  and implementation of numpy and matplotlib for statistical calculations, and his implementations of VTK combined with Python were excellent. The way he took us about his journey in python was really awesome. We felt happy that Vattam and Madhu had got into an excellent project at IIT Bombay, and adding to that an energetic Professor too. The session ended at 10.30.

Build Out for Development and Deployment by Baiju Muthukadan :

At 10.45 we went to Hall L5. Baiju gave a session regarding the usage of Build Out and its tools. How it can easily be installed and implemented. This session was not that effective. It ended at 11.30

Algorithms in Python by Senthil Kumaran ( AKAMAI ) :

At 11.30 We went back to Hall L4. This session was given by Senthil. He is from Akamai Technologies. He showed the implementation of Sieve of Eratosthenes. He also gave brief overview of various sorting techniques. He also showed bisection sort , tim sort of python, sorted function and timer function. This session was very informative.

This session was followed by Lunch and the next two sessions were not effective again. At 3.30 pm we ( Me, Subbu, Krishna, Roshan, Nagraj and Kavoor) went for sight seeing at IISc.

National Mission on Education through ICT and Python by Asokan Pichai and Prabhu Ramachandran @ 4.30 :

This was the most awaited session , atleast for us ( We were very keen on getting T shirts :) :) of FOSSEE - Free and Open Source Software for Science and Engineering Education ). Asokan the implementor and Prabhu the Dreamer, gave us the overview of thier plans and thoughts in the coming years. They are very keen on bringing python into the Syllabus of Engineering students. This is purely on general basis. They were not targetting CS branches. After the session, all the people in the hall were distributed the Live Python 9.09 DVD and T shirt. Whole day was a wonderful experience and it was very informative.

After the sessions, we were at IISc till 7.30. Krishna and Subbu left as they were getting late. Later, Madhu, Vattam, Roshan, Nagraj, me went and hogged at a hotel. Then, we all left for home.

It was all worth it. Especially after getting those 2 geeky T shirts and a DVD :) 
Special credits goes to Madhu, Vattam , and the entire team from IIT Bombay. Hope Python gets into our VTU Syllabus :)

Tuesday, September 22, 2009

BREAKAGE OF GLASS




It was my second weekend cricket. Everyone had already come to MES grounds, Jayanagar 4th Block. Then, we did practise for few hours. Then, the match started. As usual, Our team likes to chase and Srinidhi Adiga's ( Captain of LSI team, which won previous year's LSI Premier League) won the toss and chose to bat. They scored 85 runs in 10 overs. We could not chase it. We lost by 7 runs.
The second match, again Adigas team won and chose to bat, this time they scored 89 runs. It was a tough ask. Adiga ans Shashi, had played well. They had scored  many sixes and fours.  I and Nagesh were the opening batsmen this time. Again, it was lady luck. We got to a good initial start. I hit several sixes. One of them broke a house glass. We all pooled in and paid for that. I was feeling very uncomfortable in that situation. Pavan, and Adiga and many others went and spoke to the house owner. I was standing behind, little scared and was afraid also :) Then, the match continued, and shastry gave a wonderful standing. We finally chased 90 runs.

The third match, we changed the ball. Again, Adigas team batted. This time , they scored 94 runs. We doubted if we could chase that score. Shashi and Adiga and others played well again with several sixes and  fours. We came to know while we were batting that the ball was actually favourable for batting side. One of the six lead to a ball loss. We had to play with another ball. We chased 95 runs in 9.2 overs.

Then, We had a photo session, after the match. Hoping to play lots more in the coming days :)

My First Cricket @ LSI !

Cricket is my Passion. Whenver I play, I will be having the mindset ," must win". Though, people say, winning and losing is a part of the game, I personally feel, If you play you got to win. I have had a wonderful experience playing cricket at LSI. And, I am also happy that, I have contributed fairly well to our team.

Till now, I have played for two weekends with my LSI co-workers. The first week, we played at Oxford College of Nursing grounds. First, we had planned to play at Green Pitch, later due to bad field conditions, we shifted the venue to Oxford. That day, was a LADY LUCK for me. The opponent team had scored 84 in 10 overs. In reply, we lost early wickets. We were 45 for 7 in 6.1 overs. Then, I got to bat. I scored 3 sixes and 2 fours. Then, we needed sixteen runs in 15 balls. Then, we lost a wicket. The opponent team won the match. Though, we lost, I had satisfaction that i did play well in my debut match at LSI :)

The second match, opponents scored 93, but we chased it in 9.* overs. Nagesh and Raman and few others  played well, to take our team to a victory.

Friday, May 22, 2009

Tickling, (Did you hear Tickling) Ouch, Its Pickling :-)

Before using pickling, I had a tough time to have the entire data in a single file. Infact i had more than 1Mib in a file. Gedit used to get stuck and infact it lost syntax highlighting too. Python pickling helped me rule out the problem.

Note: For those who are wondering what is pickling, go through this
PICKLE

I had a file full of dictionary elements in it. It was more than 1Mib and I faced lots of problems. It used to take hours together to do a simple program. Then, python pickling helped me to dump the data in to a file in pickle format, more precisely, in a binary format. And, whenever we need, it can be loaded back to the file. If its in the form of dictionary, it will be loaded in the same manner and we can perform get or update functions on the same datastructure. Here is an example of how to convert the dictionary data in to corresponding pickle format.

Consider the following code:

#!/usr/bin/python
import string
import pickle
data={'1':'chandan','2':'nandan'}
file = open("test.py","w")
pickle.dump(data,file)
file.close()
file = open("test.py", "r")
data = pickle.load(file)
file.close()
print data['1']

After dumping the dictionary set into a file test.py, it will be in pickle format in that file. It looks like this
(dp0
S'1'
p1
S'chandan'
)

/* The above pickle format will be in binary. Here i have used a small dictionary set. If we have a large dictionary set, then it is feasible. You can get ur hands dirt using this on your own*/

    * Coming back to the 1Mib file i was mentioning, I converted the entire dictionary set which I had in 1Mib file into pickle format by using the above stated method, dumping it into a file. Then I deleted the entire dictionary set in the 1Mib file. So, that file size reduced to less than 200Kib.
    * Then, I loaded the pickled file to the 200Kib file, which still remains 200Kib itself. The loaded pickled format will be in dictionary format.
    * Then, I used the get, update operations and thus the overloading of gedit is ruled out
    * I have attached few files which might give you an idea of what of I discussed above

How to install NS2 in intrepid ibex or fedora 8

Download the ns2-allinone package from here This is version 2.31. You can download 2.30-33 versions. The steps are same for everything. It will be in compressed form. Extract them to a specific directory. Say, /home/chandan

How to install NS2 in intrepid ibex or fedora 8

Download the ns2-allinone package from here This is ns-allinone2.31 version. You can download 2.30-33 versions. The steps are same for everything. It will be in compressed form. Extract them to a specific directory. Say, /home/chandan

Follow the below mentioned steps.
sudo apt-get install autoconf automake libxmu-dev xorg
cd ns-2.30
./install

It will configure all the files needed to execute the tcl scripts. It will take ten minutes. Dont interrupt the terminal in between. It will be linked with otcl and c++ libraries. By default ns2 supports, aodv, dsdv, dsr and tora protocols. zrp protocol is still under research.

Once its installed, you will get series of instructions at the terminal itself. Follow those instructions carefully.

If you cant follow that, do this.

cd /etc
sudo gedit ~/.bashrc (Ubuntu 8.10)
or
gedit ~/.bashrc (Fedora 8)

Copy the following things and paste there. Replace /home/chandan with your installed path. For example, if its /usr/local, replace /home/chandan with /usr/local.

# LD_LIBRARY_PATH

OTCL_LIB=/home/chandan/ns-allinone-2.30/otcl-1.12

NS2_LIB=/home/chandan/ns-allinone-2.30/lib

X11_LIB=/usr/X11R6/lib

USR_LOCAL_LIB=/home/chandan/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY

TCL_LIB=/home/chandan/ns-allinone-2.30/tcl8.4.14/library

USR_LIB=/usr/lib

export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH

XGRAPH=/home/chandan/ns-allinone-2.30/bin:/home/chandan/ns-allinone-2.30/tcl8.4.13/unix:/home/chandan/ns-allinone-2.30/tk8.4.13/unix

NS=/home/chandan/ns-allinone-2.30/ns-2.30/

NAM=/home/chandan/ns-allinone-2.30/nam-1.12/

PATH=$PATH:$XGRAPH:$NS:$NAM

Save and close the file.
Now, type this at the terminal

source ~/.bashrc

Then, type this command at the terminal.

$ns
%
You will get a "%" prompt. If not follow the above steps carefully and you can have simulation working on your intrepid ibex or Fedora 8.

NOTE: In case if u get error message in ubuntu, make sure you have not installed "host" package. If its installed, remove it from synaptic package manager.

Sunday, April 26, 2009

FAREWELL TO Intrepid Ibex!!

Its been quite a long time I have been using Intrepid. Installed it the night it was released. Unfortunately, I could not get JJ on the releasing day, which was released 2 days ago, due to power cut in our area. Finally, I could install it today. This became the last day of II on my comp. II helped me learn Python, GAE, shell scripts (though we had it in our 5th sem) and how to use remote desktop access using SSH(madhu helped me), tcl, Googles Native client. Literally I could apply thoughts which I lacked during my earlier semesters. I can say this is the luckiest OS of all times for me, I did get placed - dont mind crediting II for it :-). For all the efforts I put, I can say, its solely because of II. I have learnt lots and I am technically much better than what I was a semester ago.

In the beginning boots of II, I was not comfortable with the terminal. I started getting used to terminal only after attending the BMSLUG - hackathon session. Especially I got inspired by some of our juniors, who are and were much better than me. I asked many of them quite a lot of things while the session was going on. The session gave an insight of how to build GNUsim8085, and how to fix a bug, and how to report a bug. The session was given by Madhu, Vattam, Krishna, Puneeth and others. Nearly 30 to 40 people had come for that session. And it was very very useful. Came home and got my hands dirt with the things they taught in the session. Who can forget the DOCTOR - PATIENT CONVERSATION while the session was on. :P ( Ishesh, Vattam and Me). It was a fantastic journey of these 6 months. Today, I'm giving A happy farewell to II.





This is how JJ looks on my comp.I hope JJ will help me learn even more things and I am already on it :) It has lots of additional features. Adding to What Madhu has posted in his blog JJ has built in Compiz fusion in it. The editors show the tabwidth and the text format by default. Since it has Openoffice 3.0, It solves a great problem of building graphs for our project at IISc. Everything is so neat and clear. Unfortunately I am not able to install ns2 on JJ. Hope it will be fine. Will list its pros and cons once I get through them. As of now, JJ looks so cool and lightning fast.

Wednesday, April 22, 2009

Playing with Dictionary

This post is to develop a ranklist. Using python it is very simple. Its a mere ten to fifteen lines of code.


At the terminal. Give this command.
$python test4.py > test4

The code is given below.

#! /usr/bin/python
f = file('test2')
ranklist = []
while(True):
c = f.readline()
if(c):
d = c.split('')

marks = d[-1].split('')[-1].split()[0]
try:
marks = int(d[-1].split('')[-1].split()[0])
name = d[0].split('')[1].split('<')[0]
percentage=round((float(marks)/9),2)
usn=name.split()[-1][1:-1]
cusn=usn[-3:]
f.readline()
ranklist.append([marks,name,percentage,cusn])
except:
pass
else :
break

ranklist.sort(reverse=True)
print "RankName(USN)MarksPercentage"

for i in range(len(ranklist)):

print ""+str(i+1)+""+str(ranklist[i][0])+""+str(ranklist[i][2])+""

print ""

NOTE: The formatting may not be proper. Indentation is very important in python. I have attached those files. You can download them .
P.S: Thanks to subbu who assisted me.

Wednesday, April 1, 2009

Converting to and from dictionary!!

In this post I will be showing you how to convert a set of data in to dictionary format in python. This was very handy for me while developiing few applications.

While creating ISE RANKLIST I was giving the 5 line code which I mentioned in my vtu post in a for loop. After fetching the result into a local file, to display the same for a particular usn was kind of tough for me. So, I thought of dictionary datastructure in pyhon.

Here is the code to fetch the results in to a file from the terminal.
$ python test.py > test
And here is the code in test.py file

import urllib
for i in range(1,9):
res = urllib.urlencode({'rid' : '1bm06is40'+str(i),'submit':'submit'})
req = urllib.urlopen('http://results.vtu.ac.in/default.php',res)
data = req.readlines()
print data[245]

/* The above code fetches 9 students result. And it will be put into a file test. */

The test file looks like this .

CHANNABASAVA (1bm06is401) Semester:6      Result:  FAIL SubjectExternal InternalTotalResultSoftware Engineering (CS62)452166PManagement Information Systems (IS63)661985PSystem Programming Lab (ISL68)02323ATotal Marks: 174  

HARSHAVARDHANA G (1bm06is403) Semester:7      Result:  FIRST CLASS SubjectExternal InternalTotalResultEngineering and Technology Management (CS71)532376PObject Oriented Analysis and Design (CS72)411960PDistributed Operating System (CS753)472370PJava and CGI Programming (CS73)672491PComputer Networks - II (CS74)542478PClient Server Computing (CS764)552176PNetworks Laboratory (CSL77)452570PCGI Programming Laboratory (CSL78)461965PTotal Marks: 586  

Now to convert it into a dictionary format. Type this at terminal
$python dict.py > test2
This is the code of dict.py

f = file('test')
z={}
while(True):
c=f.readline()
if(c):
d = c.split('')
c = c + f.readline()
try:

name = d[0].split('')[1].split('<')[0]

usn=name.split()[-1][1:-1]

z.update({usn : c })
except:
pass
else :
break

print z

test3 file looks like this below.

{'1rv05is048': 'SHARMA R S (1rv05is048) Semester:7      Result:  FIRST CLASS WITH DISTINCTION SubjectExternal InternalTotalResultEngineering and Technology Management (CS71)731891PPrinciples of User Interface Design (IS761)662187PObject Oriented Analysis and Design (CS72)692493PJava and CGI Programming (CS73)701585PDistributed Operating System (CS753)572279PComputer Networks - II (CS74)542276PNetworks Laboratory (CSL77)442569PCGI Programming Laboratory (CSL78)482472PTotal Marks: 652     \r\n\n'}

/* here the key is USN. Value is Result */

VTU-RESULTS and ISE-RANKLIST

This is an application to check VTU results and also ise ranklist. I did this using GAE, python, CSS, HTML. I wanted to do this during my 3rd sem. I could do it within a month after learning python and GAE. These are those applications.
VTU RESULTS and
ISE RANKLIST .

It was my longtime dream to develop an application to fetch and display vtu results. Finally I could do it using Python and GAE. Thanks to google for providing such a platform, and giving free hosting :-)


For Linux users :


$python
>>>import urllib
>>>res=urlllib.urlencode({'rid':'type your usn','submit':'submit'})
>>>req=urllib.urlopen({'http://results.vtu.ac.in/default.php',res)
>>>data=req.readlines()
>>>data[245]




For windows users :



Download IDLE IDE for python from www.python.org. Its free and its of 10 Mib. Then after installing open it. You will get a prompt like this
>>>
Then type the following.
>>>import urllib
>>>res=urlllib.urlencode({'rid':'type your usn','submit':'submit'})
>>>req=urllib.urlopen({'http://results.vtu.ac.in/default.php',res)
>>>data=req.readlines()
>>>data[245]

/* Here is the complete description of the above five lines. First we have to import the library for extracting internet resources. Python provides a library for the same. Since the usn what we type will be stored in the text box of VTU site, it will be in the form of key value pair and it needs to be encoded. So, we are using the second line. Then, the result corresponding to the entered usn will be returned in the form of a file object by urlopen function. Then, that needs to be read in the form line by line (using readlines() ) or in the form of a string (using read() ) . Finally if readlines() function is used, we can display the fetched content using data[245]. It will be in the form of a list. So, it will display the result of the corresponding student */