Search This Blog

Friday, December 30, 2011

Expand your Root partition in Linux. [Tutorial]



Here is a demo of how to expand the size of any partition in Linux. It could be either Root or Home or any other partition.

Prerequisites:
=> An empty partition just before or after your partition that needs to get expanded.
=> A separate installation of Linux in case you are expanding the root partition. Since the drive getting expanded needs to be un-mounted at the time of expansion.
=> Gparted Partition Editor. (usually comes pre-installed with Ubuntu)

My Laptop has 80GB of hard disk and currently has 4 OS installed. The pic below shows the scheme.
34GB for Windows
10 GB for ubuntu B
10 GB for Ubuntu N
and remaining 20 GB partitioned between swap, home and root partitions of my another Ubuntu installation that i generally use.
I realized that i was running out of space on my Ubuntu B partition while i was rarely using Ubuntu N. So, i decided to format the Ubuntu N installation and allocate the free space to Ubuntu B.

To format a partition, right click on the partition and format it. Gparted doesn't format it rightaway, but queues the action. Now the Free space is being shown as "unallocated".

To re-size the partition, right click on the partition to be modified and click on "resize".
This would prompt the box as shown in the above pic. you can either change the values or drag and shift the blue bar position to increase the size according to your requirement.

This is how it looks when the partition has been re-sized. I allocated the complete space to my partition.


Now it shows the new size of my Ubuntu B partition and 2 operations as pending.

Click on the green "tick" button to apply the operations. All the changes made till this point can be reversed as these are only the queued operations. Once the changes are applied, they will be permanent on the hard-disk.





Voila!!! The task is done. Now my Ubuntu B partition is of approx 20GB, without formatting the installation of Ubuntu B.

Saturday, December 24, 2011

Expand Linux Partition.


I started off using Linux as a hobby and eventually fell in love with it over the due course of time. Now my Linux partition has solution to all my computing problems. But, when i started, i wasn't sure if i would be using Linux full-time. So, i allotted the resources which were just enough to get my system running, i.e. just 5 GB of hard disk space to my Ubuntu's "/" partition(root partition). Recently, i realized that i was totally out of space on my root partition and needed to expand it. The advice from friends and Google was to "Format and re-install with new partition scheme". But that meant, me loosing all my installed softwares and their settings that i have used during past year and a half. Also, the Ego of a Computer Engineer was not allowing me to simply format the system. My efforts paid off and I was able to successfully expand the size of partition.


For demo, i expanded the size of my Ubuntu 8.10(Ubuntu B) after deleting a different version of Ubuntu (Ubuntu N) that i had once installed for testing purposes. Here is the tutorial showing how to safely Expand your Linux partition.

Saturday, October 15, 2011

Clean-up your mess off your Hard-drive.



Here is the first post when i will be discussing about something for which i originally thought about blogging. Every thing has brighter and darker sides and this topic is no different. The dark side of good things is hardly known but they are sometimes an eye-opener.

This post is about your filesystem and how the files are stored and deleted on the physical disk. A majority of people think that if you want to delete a file from your system shift + delete is all you need to do. Or at max, if you would format the drive, all the data is gone permanently and for-ever. But here i would like to tell you that you couldn't be more wrong if you think so. I have personally recovered deleted files as well as partitions using Free tools.

Surprised? Don't be. Because when a file is deleted, the operating system deletes the pointers to the file and in the FAT or MFT the space occupied by the file is mark as available. The computer does not delete the actual data that was contained in the file. Same goes for a deleted partition. The pointer to the start of the partition table is deleted and not the whole file structure.

From next time if you delete a file/partition by any chance, google for "file recovery software" and you should find quite a few tools to recover the file for you. If you are using Linux, they would all be free. For windows you will get trial versions who recover files but have some constraints.

Now coming to the dark side of it.
A hacker can read your data if he gets access to your hard disk and What should someone do if he really wants get rid of file(s) from the system permanently because he want to hide his activities?

There are 2 ways to do it if the files are limited.
a) Use file shredding software.
b) If the file is simple text/word/readable file, open the file, make it a blank file, save it and then delete it.(not completely safe)

But what if the number of files being deleted is large? Or you dont know what all have you deleted in past but now you have to mask it. This process is actually called Wiping Free disk space. There are tools available to achieve it. But as i always prefer to avoid searching and installing tools, here are the simple ways to do it on your own.
For Windows, the best way to achieve it is that once you are done deleting all the files, make a folder and add some random files to it untill the file system drive is full with no space remaining.(You can add multiple copies of the some movie inside the folder to fill up the disk fast). In this way, the bits of the memory locations of the whole drive would change, thus making the file impossible to recover. Once it is done, Delete the folder and the task is done.
You can also defragment the disk. As it involves moving of data from one place to another, it would pretty much over-write any un-used space.
For linux, It could be done by simply typing the following commands at the terminal.
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
cat /dev/zero > zero.file
rm zero.small.file
rm zero.file
This sets all the bits of free memory space to 0. Some advanced commands could be found here.

So next time don't fret if you have Shift+deleted some important file by mistake or have truncated a partition. Also, if you are into something dirty or plan to sell/hand-over your old machine/hard-disk containing personal and important data to some other person, don't think that your system format would take care of all your past.

Happy Hacking.

Sunday, September 25, 2011

Saving Images in MySQL.



Here in an Step-by-Step guide to storing an Image in MqSQL database. Similarly, other binaty files(like documents or videos) can also be stored in the database.

1) Download and install MySQL Query Browser.
For ubuntu: sudo apt-get install mysql-query-browser

2) Start it and create a connection to your database. Use the "test" as default schema.

3a) Excute the following SQL statement.

CREATE TABLE `test`.`pic` (
`s_no` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(45) NOT NULL,
`img` LONGBLOB NOT NULL,
PRIMARY KEY(`s_no`)
)
TYPE = InnoDB;

3b) Instead of creating the table via SQL, you can create a table by pressing the right mouse button on the schemata tree and select "Create New Table"

Type "pic" in the Table Name field. Press enter. Press enter again to create the first column named "s_no" (that will be your primary key). Press enter to accept INTEGER as datatype. Enter "name" to store a name for you picture. Press enter. Type "v" (which will trigger VARCHAR(45)) and press enter. Type "img" and enter. Type "longb" (which will trigger LONGBLOB) and press enter. Click [Apply Changes]. This will show you the SQL statement that will be executed.

Press [Execute] to create the table.

5) Close the table editor or refresh the schemata tree and double-click the new generated table in the schemata tree.

6) This will generate the SQL statement

SELECT * FROM pic p

Now click the table again to execute it. You can press Ctrl+Enter instead (of course)

7) Now click on the [Edit] button in the action bar at the bottom. Double-click the empty caption field. Enter a name for your picture. Press enter.

8) Click the "Open" overlay icon in the left of the img field in the first row. Or you can press the right mousebutton on the field and select "Load Field Content" from the popup menu.

9) Click [Apply Changes] to actually store the new data in the database.

10) Now click the "Magnifyer" overlay icon and if you have inserted a JPG, PNG or BMP image you will see it in the field viewer.

Tip: To be able to insert images that are bigger than 1MB you have to increase the max_allowed_packed option in the server configuration file. You can change that in the Startup Variables section in the MySQL Administrator on the Networking page.

Thursday, September 15, 2011

Storing Images/video in MySQL database



MySQl databases are the most widely used databases. While storing data, sometimes it is needed to store binary files(like documents/images/videos) in a database, instead of storing them as files on the server. MySQL allows us to store such data in the database. For this purpose, MySQl has a special data type called as Blob (Binary Large OBject).
Blob can store any type of binary file. A BLOB column has a maximum length of 4,294,967,295 or 4GB (232 – 1) bytes. The effective maximum length of LONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.

Now, when we are storing files in a database, it would also result in a considerable amount of increase the size of database itself. Since database is nothing but a file in itself, there are limitations on the maximum size of Database, depending on the Filesystem being used by the database.The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. The following table lists some examples of operating system file-size limits. This is only a rough guide and is not intended to be definitive. For the most up-to-date information, be sure to check the documentation specific to your operating system.

Operating System File-size Limit
Linux 2.2-Intel 32-bit 2GB (LFS: 4GB)
Linux 2.4+ (ext3 file system) 4TB
Linux 2.6+ (ext3 file system) 16TB
Solaris 9/10 16TB
MacOS X w/ HFS+ 2TB
NetWare w/NSS file system 8TB
Win32 w/ FAT/FAT32 2GB/4GB
Win32 w/ NTFS 2TB (possibly larger)


Note: Even though MySQL is capable of storing this data, it is generally discouraged because it decreases the performance of MySQL drastically. The preferred Solution is to save the files on the server and store their path in the table.

In the next post, i will explain(with sample code) how to store an image/video in the database.
Here is the Link:

Thursday, September 1, 2011

Compiling programs with gcc and g++



Using Linux can be a lot difficult, but only for those who are new to it. But that's pretty obvious. Isn't it?
So, one of the most common problem faced by all the new comers to this platform, who are also into computer programming, is... HOW DO I COMPILE MY C/C++ PROGRAM????
After being asked by too many people on how to compile programs on Linux, i felt a need to write a post describing the whole process in a single place.

The only pre-requisition to getting started is -- an Internet connection.
So, firstly we need to install the compiler for c++. GNU-gcc is the standard compiler for C/C++.
To install GCC, go to the terminal and type:

sudo apt-get install g++
Since gcc has some dependencies for its advanced functionality on g++, it is recommended g++ is installed as well. You can skip this step if you want to.
Your output screen would look a lot different, because my computer had g++ and gcc installed at the time of writing of this post. While in your case, it would probably download it from the internet and install it. It would take a while depending on the speed of your internet connection.


Also, this is of-course for those who are using Ubuntu (or any other Debian variant). The users of other operating systems should use their respective installers. For example,
Fedora: yum install g++
RHEL : rpm -ie g++


Once g++ is installed, now we need to install gcc. For installing gcc, again go to terminal and type
sudo apt-get install gcc


Now you are all set. The compiler is installed and auto-configured to be used on your machine.

Simply open a text editor and start writing a program. I prefer gedit, but vim, emacs and nano can be used as well.


Save the file and remember the location where you have saved it.



Now, go to the terminal and change your present working directory path to the place where your program is saved using "cd" command.
when you are there, type the following commands.

gcc filename.c -o output.o

To generate an object file as output.
chmod +x output.o
This would make the generated output file executable.
./output.o
To execute the program from the object file.


Sunday, July 10, 2011

The Power of Linux

It is time when people will have to realize and accept the "Power of Linux". A few years back if someone would ask for an operating system, the obvious answers would have been Windows and Macintosh. But if today someone doesn't know what Linux is, then he is simply ignorant and outdated. we use Linux every day without knowing it. It has become such a fundamental part of our lives.
The world without Linux might be a very different place. One where computing is kind of crappy and homogeneous. It powers the devices in your hands to the supercomputers placed at the most famous places. It's a fact. Here are some less obvious and more offbeat things that depend upon Linux to function.

1) Android :-

The hugely popular operating system Android widely being used in smart phone is based on Linux.

2) Supercomputers :-

Approximately 90% of the supercomputers are using Linux. Organizations like NASA, Google and IBM have Linux to power their computers. The world's fastest Supercomputer(K-computer) is using Linux.

3) Transportation/Automobiles :-

Modern day high-tech traffic controllers are using Linux. The Japanese high speed rail uses Linux system to keep track of all the information. Toyota is making their cars smarter by using it. Not only road automobiles but also the Air Traffic controls use Linux to take people from one place to another. USA has Nuclear submarines that are powered by Linux.

4) Finances :-

The New York Stock Exchange(NYSE) is fully powered by Linux. Ever since its transition from the previous system in 2007, NYSE has been able to reduce IT cost, increase the flexibility and make the whole system more robust.

5) Science/Research :-

Due to its high performance and reliability, it is widely used in computers meant for research purposes. CERN, the world's largest particle physics laboratory, relies upon Linux to power its huge particle accelerator.

6) Internet/Servers :-

Internet giants like Google, Facebook and Amazon use Linux to host their web servers. Npne of the web query made by any user reaches back without passing through one or more Linux machines.

Friday, June 24, 2011

No Synaptic Package Manager for Ubuntu 11.10

This news may come as a shock for the users of Ubuntu that the advanced system packaging tool ‘Synaptic Package Manager’ has been dropped from the latest builds of Ubuntu 11.10 Oneiric Ocelot.

The removal of Synaptic Package Manager is not unexpected, having been planned since the inception of the Ubuntu Software Center. Since Software Center provides the same features along with allowing users to install debian packages(.deb files) and listing the softwares categorically in a very nice GUI. Many of the advanced features Synaptic currently provides are ear-marked for inclusion in the Ubuntu Software Centre.

Synaptic will still remain easily installable from the Ubuntu Software Center as a Utility.

Due to the development nature of Ubuntu 11.10 decisions and actions are subject to evaluation and change.

Tuesday, June 14, 2011

Google Launches Instant Pages, Goggles, Voice and Image Search




Today Google announced the launch of its new features that will change the way people search over the Internet. With these new features available, with an un-matching speed of Google, there is nothing that could not be searched over the Internet.


1)Google Goggles


This cool feature enables you to take a snap(picture) of whatever is written in front of you and it takes it in as a input, matches the characters with different Languages and gives back the translated result. Moreover, it can detect 3 different items at the same time like text, logo, barcode, product etc...
Click here to see an overview.

2)Voice Search

For Desktops and Mobiles.

All those users of Chrome Browser who have Chrome 11 onwards, will see a new icon of Microphone in the right corner of www.google.com search box. On clicking on it, you can speak into your microphone yosearch, June 14, 2011, press release, goggles, mobile search, instant pages, mobile sur query. The voice recognition system scans this voice uses the Chrome's speech technology for processing the input. As of now, it coves only the ENGLISH users and is hence only available for www.google.com. To make this possible, Google fed in 230 Billion words of just English language with various accents and combinations into their systems to learn the patterns.
The added feature is the fact that just because of the presence of android on your Mobile device, the other applications also become voice enabled without any explicit coding. An hence, voice search can be used by them easily.

3)Image Search


Even this feature was only available exclusively for the Android users. Now Google has taken a leap ahead and launched this service for the Desktop users today. Using the Chrome toolbar, users can now drag and drop images into the Search Box to find out the matching results. Google will take up the image and perform the search on publicly available images over Internet to display the results.
The code is available as Open Source and hence this feature can be included in other browsers like firefox via addons in near future.

4)Instant Pages


The Instant search got even faster. Instant Pages can get the top search result ready in the background while you’re choosing which link to click, saving you yet another two to five seconds on typical searches. As you scan the results deciding which one to choose, Google is already pre-rendering the top search result for you. That way when you click, the page loads instantly.
The Instant pages work with a super fast speed to give back not only the the Web results but also the image results associated with any text query made at the search box. The speed with which the image and web results are fetched back to the user is simply outstanding.

5)Mobile Search


Google Launched a new interface for the Mobile searches with a better auto-completion designed to help you perform a search and more easily understand the results. Google introduced mobile local search to Google.com, an improved local result experience, auto-complete improvements, and Russian language OCR in Google Goggles.

6)Local Search


This feature has been introduced to Google Mobile to give the results that are more relevant to the users and their present geographic location based on the IP of the user.

7)New Version of Auto Complete


This new version of Auto-complete is better in terms of easy and speed from its successors. This is bound to improve the user experience and change the way people search on Google and its various products and platforms.




Google focuses on Accuracy and Ubiquity in their searches to make user experience pleasant. The focus is to take the Phone features that are only available to Android users can be taken to the Desktop environment so that they can be used widely even by non-android users. As far as the Privacy issues are concerned, Google has made it clear that all the queries fed into the system for search will be treated same as the other text queries. Even the images will be treated as the pattern of pixels and no face-recognition algorithm will be applied on them to maintain the anonymity. All these features are being rolled out and will be available Globally within next 1 week and will have full support of all features in the next version on Chrome which is due for release in next few days.


Sunday, June 12, 2011

Geek Meetup on 11Jun




Yesterday i happen to attend the Geek Meetup in the JNU campus jointly organized by JNU's LUG, Python NCR and the IITD-LUG thanks to some great planning, efforts and teamwork of the core members.
The general idea was like the other meet-ups, to start off the discussion with the Agenda as agreed upon on the IITD-LUG wiki.

The meet started with the introduction of students who have been selected this year for the GSoC. There were 6 students from all over the India who are working on their projects this year. It was a great experience to have a direct interaction with the students who have made it all the way to international level.

Then there was a discussion with all the members, to promote FOSS and organize regular Meet-up in North India, to make the community more active and powerful.

Then, there was a open talk session, where the coders working on HTML5, Python and other open technologies presented their work.
There was a demo of a HTML5 based game using java-script. Then Narendra Sir, presented a part of his Project EDUVID slidecasting on which i have been working under his supervision.

The meeting concluded with a general discussion of all the members on what FOSS is all about. What Freedom is all about, when it comes to Computers. The freedom in the world of computers must be the same as we enjoy in the real world with real objects(just like a Table or a Fan). The Freedom has been defined into four levels by Richard Stallman.
1) The freedom to use (the software code).
2) To know the operating mechanism for the research program, and modify it according to the needs of the user without anyone's approval.
3) Redistribute copies so that others can share free software and use it.
4) To improve the process, in order to benefit others and distributed it free.

Since, The meeting was attended by many users of closed source technologies who up-till now, loved to use the Cracked versions of their favorite softwares and didn't mind being called as Pirates, but were interested in exploring this fascinating world of Free and Open-Source. This was the time, when they shared their open views and their fears of switching to something like Ubuntu/Fedora or other Distros. But it turned out that their views about Linux were more of ignorance of facts. The discussion unfolded a series of Myths and Misconceptions about the Linux distros, main being the support and free and very easy availability of softwares for different purposes. Narendra Sir also showed a video where young minds (8-14 year old) gave their feedbacks,learnings and views after 10 hours of training session.
Discussion went into more technical terms that involved the ICANN and the influence of US and other Giants. Privacy issues with Google and Facebook were an eye-opener for the most of us.(more on that later)

Overall, it was yet another awesome experience at Geek-Meetup. Learning while having Fun...

Wednesday, June 8, 2011

Restore Panels back to Default Configuration in Gnome..



Many times due to some mis-click or other reasons, we find that some essential Applet has gone missing from our Desktop panel. Once removed, it is hard to place them back as we don't know where to find them. So, here is an easy method to get the panel back with DEFAULT SETTINGS.
Be careful, because it will remove all the settings you have made to the panel in order to customize it and bring it to default. You will have to reconfigure it according to your needs.
Open the Terminal window and enter the following command at the prompt:

gconftool-2 --shutdown

(Note: There should be no spaces between the two dashes before shutdown.)

gconftool-2 -recursive-unset /apps/panel


Then enter the next command:

rm -rf ~/.gconf/apps/panel

And enter one more command:

pkill gnome-panel

That's it!

Both top and bottom panels will appear (if missing) with their default settings. Now you can customize them to your preference and get on with using Ubuntu.




Saturday, June 4, 2011

Startup Guide for Web Development.




This post is focused on explaining the basic terms and ways that are frequently used for web Development. If you are a newbie and wondering about how to start designing your own website or a blog, then read on.

The basic pre-requisite softwares for any web development are
1) PHP ( A programming language for webpages)
2) Apache ( Webserver )
3) MySql ( SQL database to store data )
4) content management system CMS (Optional)

Firstly, you need to install PHP Apache and MySql on your machine wherever you want to host your website. Php is a programming language for the websites. Apache is a webserver that allows a service to run on your machine to parse Http requests. MySql is a database that is used to make databases/tables for your website. It is important that before going onto a live server, some practice is done on local machine to make sure if everything works fine. With Apache service running on your computer, you can run the web pages using
http://localhost/mytestwebsite in your web browser. where mytestwebsite is a folder containing your webpages, placed under /var/www/ directory in Linux systems and C:/inetpub/wwwroot in Windows.
The combination of Apache, MySql and PHP on a Linux machine is also referred as LAMP(Linux Apache MySql PHP), and WAMP (Windows Apache MySql PHP) for Windows machines.

Now, you need to decide what kind of website are you planning to make. the most common possibilites are:
1) you want to make something really fast. The design Doesn't matter. Predefined Templates can be used since there are no commercial or copyright issues involved.
2) You are planning to custom make a website in a particular language i.e Html, PHP, Flash to serve a specific purpose that can otherwise not be achieved using predefined templates.
3) you need to make a website ready as soon as possible and then you may want to include some custom pages later that may have Php or the Html and Javascript. CMS has many plugins available that enable this feature.

A Content Manager sometimes also known as CMS (content management system), allows the simple use of predefined templates where content needs to be put in simple text format in a very easy interactive interface that itself runs inside the browser, just like email composer. The most famous CMS available are WordPress, Drupal and Joomla. They automatically embed the input text inside the PHP/HTML pages. These CMS also take care of all the security loopholes making your website less prone to hacks. But they have a drawback. Inserting a custom PHP or HTML code is difficult for the starters. But the biggest advantage is that anyone can make a website with no prior knowledge of any Web based programming language.
Many tutorials can be found on www.youtube.com that will give a clear demo of how to install a CMS and use its features.


Almost all of the website hostings on severs come with a cPanel hosting where a user has access to a control panel to perform the administrative tasks for the website, like creating databases, managing user accounts, web page upload/updation etc... This must not be confused with a CMS. A cPanel is a set of tools that let you perform the administrative tasks for your whole of website. It deals with global variables of your website, while a CMS only maintains the CONTENT of your webpages. A CMS like Wordpress or Joomla can be installed on the server to be used, with the help of cPanel options.

If you want to make the website from scratch using the basla, CMS, cPanel, ic programming language, the webpages can be made and stored in the web dictory as told above. When the pages are ready on your local machine, they can simply be sent onto the server via FTP to make website accessible to everyone.



Saturday, May 28, 2011

Embedding Python scripts in your Open Office document.

i am posting about it on my blog even though it has been answered over the open office and python forums a number of times, because, i had a tough time understanding those replies which were very misleading and complicated. So this is one of the simple and easy version which i think would be simple to understand for all.

Share directory for Python macros is /usr/lib/openoffice/share/Scripts/python
as well as ~/.openoffice.org.2.0/user/Scripts/python
while the former allows you to add a macro that would be available to all the users of the system(since Linux is meant for multiuser environment), the latter allows you to add the macros that will be only available to 1 particular user(depending on who's home directry are you in).

Now, it may be possible that you cann't see these directories. well, in that case, you need to create the directory.
i Hope you do know that .openoffice.org would be a hidden type. also, i have seen that the Scripts folder in second case is empty. So, you can just create a directory of name "python" and place your scripts in it.
to make your scripts visible in the macros inside open office, you will have to put the .pyc file in the python folder otherwise it won't show the python script in executable format.
PS> dont forget to make the file executable.
to make the .pyc file from the py file, use the command
python -m compileall filename.py

And do look at the sample code of helloworld place under the /usr/lib/openoffice/share/Scripts/python directory. It will give you a fair Idea about how the macros work inside the open office. It is much more complex than a simple helloworld program of python, because here it is in the form of a Macros rather than a simple python program

NOTE: these fact remains the same in the higher version of open office too. Just the directory under the Home is changed to the subsequent version. eg: ~/.openoffice.org/3/ user/Scripts/python

Friday, May 27, 2011

Being an ENGINEER

The Idea of this post came to my mind when i was sitting with a few friends. A pretty YOUNG friend of mine who is aspiring to become an Army Officer got stuck with a small problem in maths. So, another friend of mine after failing to explain it, referred the problem to me for a solution with explanation. As i started to explain, the things got complicated for the New fresh mind, and Pat came a comment "They are Engineers. They can prove anything... :D". Though it was of-course in a light mood, but it is a general perception about Engineers. This forced me to ponder about what makes others think of Engineers in this manner.
I am Pretty much sure, on the Internet, we all must have read numerous feats of engineers proving the most absurd and impossible things. But did anyone ever think of the reasons which makes us so Creative?? What makes it so easy for us to prove anything and almost everything? Why don't we ever care about what the answer actually comes out to be. All we care about is, “What answer is NEEDED”.

Engineers are not for solving the Problem. But they are for getting the solution of every problem in any possible manner. By Hook or by Crook. Einstien proposed E=mc2 , but it became a headache for the engineers to build a Nuclear Reactor. Shahjahan just wished to dedicate a beautiful Tomb to her late queen, and suddenly it was a headache for the engineers to design something that is worth a wonder for the world. Newton gave us laws of motion and escape velocity, and once again, engineers were called in to make something that could somehow be thrown out of earth's atmosphere(e.g. satellites). But what makes them so? How are normal human beings casted into an entity of a Engineer?

The Answer to these question lies deep. The moment someone decides to be an engineer, it is the end of life for him right after class 10th. Atleast the Social life. He fights to be an engineer. Burning the Mid-Night Oil in the table lamps surrounded by numerous books while the other students of his age-group (who are not planning to be engineers) spend their time dating or partying. While others have to only care about their marks in Board exams, these few "soon to be Engineers" have to worry about their competitive exams in order to get into a college. This is the only stage where they Learn to Solve the questions to get the solution.


Then comes the college. Full of hopes and dreams with the sole aim of enjoying their life in college they enter the class rooms. But their happiness doesn't survive for Long. Here they are Greeted with some more books, old, awkward and unrelated subjects and numerous assignments with UNREALISTIC deadlines. They work hard in a hope to make a good repute among the fellows and the faculties. And a beautiful year comes to an end.
After a Year at college, they are sure about certain things.
a) Studying for a whole Year is a waste of time.
b) If you have to pass, mug up what's written in the book.
c) Appreciation and respect for Aryabhatta for Giving us 0. Most of the problems could be solved correctly in Maths in bottom to top approach considering 0 as an answer.


With the start of second year, they start to get serious about their career. But the Count-less assignments continue. They start to think about what they wanted from life and How they landed down here. Every passing day decreases the count of days in Hell. Their time is either spent hanging out at the cafeteria or the nearby multiplex with their gang.
Learnings:
a) Maintain the Required attendance and don't get Debarred.
b) Assignments would definitely be solved by atleast one of the class Toppers. They can always be copied on the last day.
c) Solve the question from Bottom to Top. Its the only way to solve them. (Especially in MATHS)
c) Never Forget to Buy the Photocopy of the notes at the end of the semester.
d) Once Again the Power of 0 is realized. A 0 is always better than going into -ve. It is an inevitable friend of an Engineer.


And before they could ever know, Half of their college life is over. Now the faculties are cool. But you are not spared of assignments. Faculties get more strict about the snapshots pasted in your Lab file. Total of Internals Depend only on how you perform in your written internal Irrespective of your attendance or the class Performance. And This is Time when they again start to worry about their Future. Some Great Minds choose for an MBA, which they could have anyways done after a simple college(I wonder why they wasted their 4 years). Then there are others who have started to love their life as a GEEK opt for M.S. or M.Tech. And the rest start to worry even more about how are they going to get a Job.
Learnings:
a) How to Use GOOGLE to copy codes/Procedures.
b) How to Copy assignments more efficiently. i.e Copying 2 assignments at a time, Copying an assignment while taking dummy class notes.
c) Facebook could also be used as a very efficient medium for collaboration. And By that i mean, organizing mass bunks and sharing some of the numerous assignments.
d) Doesn't matter how much to study, there is no way you could attempt the full Question Paper.
e) Faculties will still treat you the way they were treated. Use of modern Equipments for demonstrating your project is not allowed as they didnt have them in their time. Your Project marks are ONLY dependent on that particular thing that your examiners used while they were in college, and not on what you have made.


The Fourth year is all About Projects. Making something that is Unbelievable but still achievable. More than making something awesome, it is about making something that SOUNDs awesome. While you still have to attend the college, you have to come up with something NEW, INNOVATIVE and TECHNICALLY NEW with the time left with you when you are at home. And not to forget about the Numerous exams of companies and institutes of higher education.



After Going though all this, in 4 years, i think the only thing that anyone could learn for sure is:
a) You dont have a life because you are an Engineer.
b) Its the Easiest way to make others happy and save your life is to Give them what they want.
c) Methods Don't matter. Only FINAL ANSWER/SOLUTION DOES. Just get the damn answer.
d) You Would never need a Book. They only need 1 month Before the exams. Photocopy of notes is an easy and efficient alternate. Investing your money in a Nice CELL-Phone With wi-fi and 3G/GPRS services is the best option.

Sunday, May 8, 2011

Tata Photon 201e:2009 Not working in Linux.

Got a new data card that is not working on your Linux machine. Well, its not your Linux machine's fault but the manufacturer who thought that its users wouldnt use anything but Windows. this is a very common problem faced by the Linux users. This problem was faced by me recently when one of my frind bought a Brand new Data Card.

It was Tata Photon+ model 201e:2009
From my past experience, i have seen that Linux used to identify such device as a modem and it was a easy task to configure it using the New Network Connection, by simply clicking "Next" button a few times. But the case wasn't the same this time. This modem's hardware turned out to be incompatible and hence there was no support for it by default in Linux. this was Quite surprising for me.
After calling up friends for help who have done it in the past and going through numerous blogs and forums, which asked us to do hoards of changes to a numerous files and execute commands, we all agreed to one solution... "GET RID OF THIS TATA PHOTON AND BUY A NEW DEVICE".

But some things are just meant to happen. A small comment in som blog caught the eye.
It had suggested of making a small change to 1 file and i got my device working.

You are all set to run your device. Make sure you have no other USB device connected on your PC. Incase you have, just remove them and connect them after your Data Card is connected to internet.

To get your device working, First install programs called as
wvdial and usb-modprobe
These programs help to identify your USB device at Modem and then dial through the Modem to connect to internet.
Since i have used Ubuntu this time, hence the following commands. i am sure, this solution would also work with other flavours of Linux too. therefore..

$sudo apt-get install usb-modprobe
$sudo apt-get install wvdial

once you have installed them, you need to add the following two lines in the file wvdial.conf

$sudo gedit /etc/wvdial.conf

add these lines....

Init3 = AT+CRM=1
Stupid Mode = 1

Stupid mode allows the connection to dial through a firewall and Init3 = AT+CRM=1 prevents frequent disconnections.
Also, dont forget to check your Modem type to be Analog. just match each line of your file with the sample shown below. Remove the comments i have written.
Now your file would look like this.


[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CRM=1
Stupid Mode = 1
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Password = internet
New PPPD = yes
Username = internet
Modem = /dev/ttyUSB0
Baud = 9600


and save this file.

To connect to the internet using your Data Card, On terminal, type:

$sudo eject /dev/sr1
$sudo wvdial



and you are done... enjoy. :)