Wednesday, October 14, 2009

All characters in this story are fictitious, but any resemblance to people living or dead may be considered purely intentional ;-).




Last week, there was a program conducted in my department on Open Source technologies. A person named Pukka Ram from LGISL was the one who was to speak on it. Couple of minutes into the meeting, I found that it was not about Open Source but about selling Projects to final year students! What difference does LGISL have compared to the other Student Project Centers? It actually infuriated me. Mainly because, I did not make a single page of word document ready leave alone the print out of it for my CASE tools lab record(I had my semester exams in three days). I planned to do that during the last hour of that day. This meeting took over it. Initially before the meeting started, I thought maybe open source would be of some help. But when this was about selling project I was upset and angry.

He connected his reliance data card to the system available at our seminar hall. And showed us his PACS software. He said that, normally PACS costs around 1.2 crores and he had finished it for 6.5 Lacs. His PACS was very poor. In terms of user interface and in terms of functionality. Poor chap; he didn’t know that I had witnessed far superior PACS software developed by a German Company for 20 Lacs. It was 100 times better than the PACS software he showed us. He was speaking so high of LG Group. Ok, he is their employee, can’t blame him.

His reliance data card often lost signal. He brought a very intelligent assistant who did not know to work with Mozilla Firefox, it switched to ‘work offline mode’, and he did not have a clue of what happened to the browser! I wondered how that person could demonstrate the software which Mr. Pukka Ram had brought us. Anyway, atleast Mr. Pukka Ram knew how to operate Mozilla Firefox, so he changed the mode!

He teasingly said, "This is the problem with Windows you see."

I was holding my anger but at that point I couldn’t control it. I loudly shouted, “No!”

At that instant I remembered the part in The order of the Phoenix, where Harry Potter loses his temper and shouts that ‘Voldemort has returned’. Atleast he got Detentions, Sivan Sir who was attending the meeting was the only staff who was present there. I had no worries what so ever?

I could see anger peeping out of Mr. Pukka Ram’s face, on a person shouting ‘No’. I continued, “I have Ubuntu in my home. It is highly difficult to configure internet to Linux based OS unless you have internet! I could not listen to songs at the instant I install Ubuntu!”

His answer was, “Nowadays, companies like DELL are providing Linux based laptops with easy access to internet and other plugins!”

From his answer I could conclude that, he did not clearly understand my question and that he was so obsessed with the ‘Open Source tag’.

Mr. Pukka Ram forgot that the problem was with Mozilla which was the same browser in Linux too.

He continued his speech. Now he was showing us the room management module in his hospital management software.

As he was explaining reliance data card had completely stopped providing signal! Think artificial intelligence had reached its highest level at that point; the data card could read my mind, detect my anger and disconnect. He he:-P.

Mr. Pukka Ram changed the topic, surprisingly, he did not find fault with Reliance data card for not being open source.

He asked ‘How many of you had decided your final year projects? Please raise your hand’

None raised the hand.

He was quite shocked. He changed the question asked ‘How many of you had not decided your final year projects? Please raise your hand’

None raised the hand again.

I have always lamented about this hyper-responsiveness of my class. But on that day, it made me happy.

He said, “It’s very difficult if you people are like this!” And he spoke about recession. Goodness me. These days it has become a common trend to all speakers. After Ladies and Gentleman, recession has become the most sought word in a speech. Mr. Pukka Ram was no exception. Probably he did not know Java, if he had, he would have caught this exception and handled it. He he :-P (Sorry for this mokkai(poor joke), couldn’t help it. Kindly forgive me and continue your read :-|)

He said, “It’s very difficult to get a job in this period of recession”

This was the only point in his speech which I agreed with!

And this man provided a superb solution which was icing on the cake. He said, “Come to LGISL. We provide you quality training in Open Source technologies like PHP, LAMP, Ruby on Rails, Linux etc., And we give you your final year project for Rs.10,000!” That was the pinnacle of that program.

I thought, ‘You sell projects for 10,000 Rs. You ----- (fill in the blank with whatever word that comes to your mind:-P, I can’t write it here because my blog censor board has prevented me from writing it here), what respect do you expect from me’

I lost my temper once again and once again shouted, “Open Source Technology itself is free.” Why the hell I thought, but didn’t say that, I polished the statement and said “Why should I pay you money?”

His reply was, “Open Source technology is free. But you will earn money through it. The skills won’t go waste. It will help you fetch jobs. So the skills you learn will be useful”

I finally concluded, he will speak high of Open Source Technology and the so called final year project which LGISL is providing for the students at a shoe string budget of Rs. 10,000 for the welfare of student community. So there was no point in talking to him. My friend Arun had taken that decision very early. That’s why he always holds an advantage over me!

Then finally when everyone thought that the meeting was over, my friend Karthikeyan came up with a question.

“I already know these open source technologies. Then what does LGISL provide me?”

Mr. Pukka Ram said that such students will get a discount and they can do their own projects by paying Rs. 4,000.

That statement was the master-piece in that program! I had to pay 4,000 to LGISL to do a project of my own.

Couple of week’s back I went to meet my friend Kalyani who was admitted in LG hospital for a surgery. When I left, I was shocked seeing a board, at the hospital exit.

Trauma Care

Heart Attack

Brain Attack

We are available 24 hours a day!

‘Brain Attack’, I was shocked by this term. Ok, they may be referring to the Stroke I thought. But laughed my heart out on seeing that term. Only later, when I attended this program, I understood the meaning of that term!

Was it like some kind of a tax? If he is demanding such stuff from our college students what would be the case in their own engineering and arts and science colleges. I feel pity for those students.

Now after the program, I learnt one thing, don’t ever attend a meeting from a LGISL person.

But one question was lingering in my mind for a long time after this program, “What is Open Source?”

Twitter



Atlast I have joined twitter. I have the habit of reading Singer Chinmayi's blog(though she has many other faces, I would like to refer her so!), once in a while. She had a side widget saying, "Follow me on twitter"!

My friend Surya had been saying that Twitter was an innovative concept and was different from the normal websites, couple of months back. I used to wonder about his statement. I have read in newspapers that Twitter was a social networking site. Already we have n number of social networking sites (I favour Orkut). Then whats so special about Twitter. Surya always speaks so high of mozilla, linux, open source etc., and thrashes windows. I have always believed that except for a few most of the people confuse between open source and freeware. It is strictly my view(not to be generalized). To be honest, I didn't bother about the Twitter mainly because Surya spoke so high of it! Thought it must be one of those open source projects which he admires just because it is open source :-P. But it was not to be so!

Anyway, today I was pretty free, with no other job except to relax, which I usually do after the exams!

I followed the link to Twitter from Chinmayi's blog, just like the poor Alice following the white rabbit. I found that there were few messages that Chinmayi had typed in Twitter! They appeared to me like quick sms's that she had typed (Later, I found that those messages are called as tweets). I registered into twitter.

To know more about Twitter, I wikied about it. It's become my regular practice to search as "searchterm wiki" instead of "searchterm" in google.

Twitter is a free social networking and micro-blogging service that enables its users to send and read messages known as tweets. Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers. Senders can restrict delivery to those in their circle of friends or, by default, allow open access. Users can send and receive tweets via the Twitter website, Short Message Service (SMS) or external applications. While the service, itself, costs nothing to use, accessing it through SMS may incur phone service provider fees.

The 140 character limit on message length was initially set for compatibility with SMS messaging, and has brought to the web the kind of shorthand notation and slang commonly used in SMS messages. The 140 character limit has also spurred the usage of URL shortening services such as tinyurl, bit.ly and tr.im, and content hosting services, such as Twitpic and NotePub to accommodate multimedia content and text longer than 140 characters.

So I have to agree with Surya that Twitter is a different social networking site! But, when I was skimming about Twitter in wikipeida, I found this statement, "The Twitter Web interface uses the Ruby on Rails framework". Ruby in Rails is a open source technology, to which Surya is closely associated to! Afterall my conclusion about Surya proves to be right!

Tuesday, October 13, 2009

My last lab



Today, I had my semester practical examination in Internet Programming lab, which turned out to be quite special in many ways. I must admit, I didn't invest much time in preparing for it; only about 30 minutes earlier in the morning, from 6:15 to 6:45. The lab required us to create a chat program, the only one that needed some prior preparation. However, my mind was still lingering on the excitement of watching Champions League T20 games and playing International Cricket Captain the previous day, where I was delighted to see another team from IPL making it to the next round. With my thoughts on cricket and fun, I wasn't exactly in the mood to study.

Eventually, I did manage to get myself to study, but I ended up playing International Cricket Captain until 8:00 AM. Consequently, I left home quite late, at 8:15 AM, but thanks to my trusty Getz and the uncrowded road, I reached college by 8:25 AM. The exam was scheduled to start at 8:30 AM, and although I didn't even bother to study the other programs, I felt oddly confident about this exam—similar to how I had felt during my OOPS lab exam.

As I entered the lab, I had to pick my lucky draw from a stack of sheets, signed in on the attendance sheet, and glanced at the questions. One question required creating a simple HTML page, while the other involved displaying the date and time as the mouse moved. Initially, I thought it would be a piece of cake, and I took my seat with optimism. However, the second question had a slight twist—it demanded the date and time to move along with the cursor of the mouse. It was then that my brain conjured up a solution involving the use of "document.getElementId('component').style.left = '100px'," but I had forgotten this detail, which I later recalled after some time. I eventually managed to add a div and set the innerHTML so that a span inside the div moved accordingly. It took some trial and error, but I eventually got it to work.

By 10:15 AM, I had completed both programs. This lab was the second most challenging one I've encountered, with the first being data structures during my third semester. I still remember the pleasure of doing something different from the usual routine while grouping a set of numbers based on the number of digits repeating in the numbers. As luck would have it, I had only prepared the chat program for this exam, and it turned out that I didn't even get that one. It seems this kind of luck follows me since a couple of semesters back, I had painstakingly learned 8086 Microprocessor programs, even simplifying some given by my Ma'am to the class, but during the exam, I ended up with the simpler 8085 programs.

Today's lab marked the end of my B.E. degree labs, and I can't help but feel a tinge of sadness knowing that I won't be experiencing labs again. Nevertheless, this last lab exam will be etched in my memory, mainly due to that tricky mouse question that challenged me to think creatively.

Sunday, October 11, 2009



You can switch users without going through the Welcome screen: From Task Manager, go to the Users tab, right-click a user, and select Connect.

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

Hold down the shift key in the shutdown dialog to change "Stand By" to "Hibernate". Or just press H to hibernate instantly. You can even use the Power Control Panel to configure your power button to hibernate.

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

To disable the password when resuming from standby or hibernation, open the Power Control Panel and uncheck "Prompt for password after returning from standby" on the Advanced tab.

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

You can rename multiple files all at once: Select a group of files, right-click the first file, and select "Rename". Type in a name for the first file, and the rest will follow.

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

Hold down the shift key when switching to thumbnail view to hide the file names. Do it again to bring them back.

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

When dragging a file in Explorer, you can control the operation that will be performed when you release the mouse button:
Hold the Control Key to force a Copy.
Hold the Shift key to force a Move.
Hold the Alt key to force a Create Shortcut.

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

If you create a file called Folder.jpg, that image will be used as the thumbnail for the folder. What's more, that image will also be used as the album art in Windows Media Player for all media files in that folder.

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

From the View Menu, select "Choose Details" to select which file properties should be shown in the Explorer window. To sort by a file property, check its name in the "Choose Details" in order to make that property available in the "Arrange Icons by" menu.

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

To display the volume control icon in the taskbar, go to the Sounds and Audio Devices Control Panel and select "Place volume icon in the taskbar".

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

Hold down the shift key when deleting a file to delete it immediately instead of placing it in the Recycle Bin. Files deleted in this way cannot be restored.

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

If you hold down the shift key while clicking "No" in a Confirm File Operation dialog, the response will be interpreted as "No to All".

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

To save a document with an extension other than the one a program wants to use, enclose the entire name in quotation makes. For example, if you run Notepad and save a file under the name:
Dr.Z
it will actually be saved under the name Dr.Z.txt
But if you type:
"Dr.Z"
then the document will be saved under the name:
Dr.Z
(Note that a document so-named cannot be opened via double-clicking since the extension is no longer ".txt").

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

Put a shortcut to your favorite editor in your Send To folder and it will appear in your "Send To" menu. You can then right-click any file and send it to your editor.
Ctrl+Shift+Escape will launch Task Manager.

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

To arrange two windows side-by-side, switch to the first window, then hold the Control key while right-clicking the taskbar button of the second window. Select "Tile Vertically".

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

To close several windows at once, hold down the Control key while clicking on the taskbar buttons of each window. Once you have selected all the windows you want to close, right-click the last button you selected and pick "Close Group".

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

You can turn a folder into a desktop toolbar by dragging the icon of the desired folder to the edge of the screen. You can then turn it into a floating toolbar by dragging it from the edge of the screen into the middle of the screen. (It helps if you minimize all application windows first.)

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

You can turn a folder into a taskbar toolbar. First, unlock your taskbar. Next drag the icon of the desired folder to the space between the taskbar buttons and the clock. (Wait for the no-entry cursor to change to an arrow. It's a very tiny space; you will have to hunt for it.) You can rearrange and resize the taskbar toolbar you just created. You can even turn the taskbar toolbar into a menu by resizing it until only its name is visible.

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

In the Address Bar, type a domain name like "microsoft" an hit Ctrl+Enter. Internet Explorer autmatically inserts the "http://www." and the ".com" for you.

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

To remove an AutoComplete entry from a Web form, highlight the item in the AutoComplete dropdown and press the Delete key. To remove all Web form AutoComplete entries, go to the Internet Explorer Tools menu, select Internet Options, Content, AutoComplete, then press the "Clear Forms" button.

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

To organize your Favorites in Explorer instead of using the Organize Favorites dialog, hold the shift key while selecting "Organize Favorites" from the Favorites menu of an Explorer window.

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

You can organize your Favorites by dragging the items around your Favorites menu. Alternatively, you can open the Favorites pane and hold the Alt key while pressing the up and down arrows to change the order of your Favorites.

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

To run Internet Explorer fullscreen, press F11. Press it again to return to normal mode.

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

To add or remove columns from the Details mode, select Choose Details from the View m menu, or just right-click the column header bar.

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

In Internet Explorer, hold the Shift key while turning the mouse wheel to go forwards or backwards.
In Internet Explorer, hold the Shift key while clicking on a link to open the Web page in a new window.
In Internet Explorer, type Ctrl+D to add the current page to your Favorites. This and many more keyboard shortcuts can be found by going to Internet Explorer, clicking the Help menu, then selecting Contents and Index. From the table of contents, open Accessibility and click "Using Internet Explorer keyboard shortcuts".

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

Saturday, October 10, 2009

After two years I had changed my mobile model.
From nokia 6300 I had moved to its successor 6303.
Some interesting facts about nokia, to mark this occassion!


Mine is the one in the left!

1) The ringtone "Nokia tune" is actually based on a 19th century guitar work named "Gran Vals" by Spanish musician Francisco Tárrega. The Nokia Tunewas originally named "Grande Valse" on Nokia phones but was changed to "Nokia Tune" around 1998 when it became so well known that people referred to it as the "Nokia Tune."

2) The world's first commercial GSM call was made in 1991 in Helsinki over a Nokia-supplied network, by Prime Minister of Finland Harri Holkeri, using a Nokia phone.

3) Nokia is currently the world's largest digital camera manufacturer, as the sales of its camera-equipped mobile phones have exceeded those of any conventional camera manufacturer.

4) The "Special" tone available to users of Nokia phones when receiving SMS (text messages) is actually Morse code for "SMS". Similarly, the "Ascending" SMS tone is Morse code for "Connecting People," Nokia's slogan. The "Standard" SMS tone is Morse code for "M" (Message).

5) The Nokia corporate font (typeface) is the AgfaMonotype Nokia Sans font, originally designed by Eric Spiekermann. Its mobile phone User's Guides Nokia mostly used the Agfa Rotis Sans font.

6) In Asia, the digit 4 never appears in any Nokia handset model number, because 4 is considered unlucky in many parts of Southeast/East Asia.

7) Nokia was listed as the 20th most admirable company worldwide in Fortune's list of 2006 (1st in network communications, 4th non-US company).

8. Unlike other modern day handsets, Nokia phones do not automatically start the call timer when the call is connected, but start it when the call is initiated. (Except for Series 60 based handsets like the Nokia 6600)

9) Nokia is sometimes called aikon (Nokia backwards) by non-Nokia mobile phone users and by mobile software developers, because "aikon" is used in various SDK software packages, including Nokia's own Symbian S60 SDK.

10) The name of the town of Nokia originated from the river which flowed through the town. The river itself, Nokianvirta, was named after the old Finnish word originally meaning sable, later pine marten. A species of this small, black-furred predatory animal was once found in the region, but it is now extinct.

An interesting java program that caught my attention is the one that follows!

import java.awt.BorderLayout;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;

public class ScrollSample {
public static void main(String args[]) {
String title = "JScrollPane Sample";
JFrame frame = new JFrame(title);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Icon icon = new ImageIcon("dhoni.jpg");
JLabel label1 = new JLabel(icon);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(
label1);
frame.getContentPane().add(scrollPane, BorderLayout.CENTER);
frame.setSize(300, 200);
frame.setVisible(true);
}
}

Following is a program that was given to my juniors in the C-Debugging finals. It was quite surprising that no one solved it, in an efficient manner!

Only Vivek and Sathish from third year did some justice to the program!

#include<stdio.h>
void main()
{
int x;
char c,h;
clrscr();
printf("\n Enter a character:");
scanf("%c", &c);
printf(" The first character entered was:%c",c);
printf("\n Enter another character:");
scanf("%c",&h);
printf("\n The second character entered was:%c",h);
getch();
}

Solution:

#include<stdio.h>
void main()
{
int x;
char c,h;
clrscr();
printf("\n Enter a character:");
scanf("%c", &c);
fflush(stdin);
printf(" The first character entered was:%c",c);
printf("\n Enter another character:");
scanf("%c",&h);
printf("\n The second character entered was:%c",h);
getch();
}

Explanation:

stdin, gets the character and the enter as another character and it is set to h.
So h is not input at all!

fflush is an interesting function which flushes the unwanted content from the stream!

In java too we face this problem, I will get back to that in my tutorial!

Saturday, October 3, 2009

Hope you meditated enough.

It's been quite some time since my last post.

I had been really busy organizing the Intra Virtuoso events for my college juniors. Anyway getting back to the post, we shall continue from where we left...

No preprocessor directives in Java

Which means that, Java uses something else to makeup!

It uses a technique which we would be calling as...

Importing of Classes

Consider the following code in C

# include <stdio.h>
void main()
{
printf("Hi");
}

It actually has only four lines of code.

But at compile time it shows that there are 312 lines of code!

The remaining 308 lines of code is from the stdio.h header file. Its added into the program.

In C, its just the standard library functions from the header files.
Java has a different hierarchy for programming!

Java Library------->Packages------->Classes & Interfaces------->Methods

So, if a programmer wants to use a class then only that class imported.

Difference between #include and import

#include directive makes the compiler to go to the c/c++ standard library and then copy from the header files into the program.

import statement makes the JVM go to the java standard library, execute the code there and then substitute the result in the program.

Here no code is copied and hence there is no waste of memory or the process time.

Eg:

import java.lang.system;
import java.lang.string;

Note:

java.lang.*;

is automatically imported to all java programs!

So the code import java.lang.*;
is never needed!

Now the comparison between C and Java is over!
We shall try to get along with Java basics from now on.

Try to recollect the Hello world program in Java.
I would try to get back to you with my next post.

Monday, September 21, 2009

A nice Story



Once upon a time there was a shepherd looking after his sheep on the side of a deserted road. Suddenly a brand new Porsche screeches to a halt.

The driver, a man dressed in an Armani suit, Cerutti shoes, Ray-Ban sunglasses, TAG-Heuer wrist-watch, and a Pierre Cardin tie, gets out and asks the Shepherd: If I can tell you how many sheep you have, will you give me one of them?"

The shepherd looks at the young man, and then looks at the large flock of
grazing sheep and replies: "Okay."

The young man parks the car, connects his laptop to the mobile-fax, enters a NASA Webster, scans the ground using his GPS, opens a database and 60 Excel tables filled with logarithms and pivot tables, then prints out a 150 page report on his high-tech mini-printer.

He turns to the shepherd and says, "You have exactly 1,586 sheep here."

The shepherd cheers,"that's correct, you can have your sheep."

The young man makes his pick and puts it in the back of his Porsche.

The shepherd looks at him and asks: "If I guess your profession, will you return my animal to me?"

The young man answers, "Yes, why not".

The shepherd says, "You are an IT consultant ".

"How did you know?" asks the young man.

"Very simple," answers the shepherd. "First, you came here without being called. Second, you charged me a fee to tell me something I already knew, and third, you don't understand anything about my business...
Now can I have my DOG back?"

I got this story as a forwarded mail, few days back. It was like damaging myself because I aspire to become an IT consultant! Anyway, its how the customer always thinks of us! So it was pretty cool to read. Hope you like it too!