Sunday, September 30, 2007

Research versus regular job


Research versus regular job, the topic 4 my GD today; I did not get enough time to mention my all points, and as this is what I would personally love to discuss, so I'm writing a blog on it.
The start of our discussion was a mess, Mr. Deepak started the discussion and in the middle of his statement, someone blamed him for speaking out of the scope of the topic, another voice supported him, and thus the of discussion really lost its scope, and at that moment I was thinking, it has started or not! But after all we are on track. Despite of the bad start we finally did good job and appreciated by our Councilor. Now I should focus on the topic than what happened today.
What I believe is, research or a regular job, it should depend on person's capabilities and interests. If a person is innovative and can handle challenging work, he should go for research job, and a person who wants an easy go life he should better get a regular job.
And when it comes to me, I would prefer to go for a research job, and the reasons for this choice are:
1. My continuous quest for learning would be better satisfied by research job, and for me job satisfaction is more important than money.
2. A research job is far more innovative and we have freedom of work.
3. In a research job we work to get desired outcome, not just to meet the deadlines.
4. Research leads to refinement of available technology, products or services.
5. Research improves the living standard of peoples that gives a great sense of satisfaction to us on social front.
6. Research job is like contribution to future generations, as our ancestors contributed to ours.
Finally I would like to say that in current scenario; research is very important component of all industries, as it gives them cutting edge against their rivals, without which they can't survive. Yes we can't ignore the regular jobs, all I can suggest is that elite people should join research job because our country's contribution in research job is still not remarkable.

My favorite Movie, "I Robot"

I Robot is my favorite movie, this is a movie about an intelligent robot, Sony who saves humanity from other robot who were taking control of the whole city. The story is picturized for Chicago in 2035 when robots are used to do all tasks. The robots are programmed never to harm humans, and governed by three rules... sorry not for writing them, It would take lots of efforts to remember them and even then they wont be as they were in the movie. A scientist create a robot named VIKI (I think it is Visual Interactive Kinetic Interface, not damn sure about it), VIKI was initially created to monitor all unites of a company which is creating human like robots which are as perfect as a human.
VIKI was prevalent in the whole company and can be assessed just by calling VIKI, a Kinetic Interface is created just by calling VIKI, and this interface can serve all your commands. The production unit of the company creates thousand robots daily, and all the production work is monitored by VIKI itself. Later VIKI was expanded to control the traffic system of the whole city, and it reduces accidents by 80% in a year.
The real twist in the story starts when, the scientist who created VIKI and developed the those human like robots kills himself and leave a message for a homicide detective Spooner, a role played by my favourite actor Will Smith, the perfect actor for the movie.
Later it is found that after the scientist finds the plans of VIKI to take control of whole world with the help of those robots, he creates Sony which was much more intelligent and resembling the human behavior, Sony can even dream. Sony later solves all the mysteries and saves the world form VIKI. It’s a very good movie to watch so I’m not going to write anymore, you better watch it.
The movie has great stunts and hi-fi technical scenes, I think you will certainly enjoy the movie, and one more thing your mind should be active to understand true meaning of dialogs.

Sunday, September 23, 2007

My fev. place to hang out @ lucknow

Lucknow is famous for it's ancient architectural monuments which were built long time back.Today, still they are standing tall, maintaining the rich cultural heritage of the city. They have been a source of attraction to many tourists from different countries and it has been one of the important places of historical interest. The Bara Imambara, the Chota Imambara, Roomi Darwaza, Residency , Clock Tower, Dilkusha etc are some of the famous examples of sightseeing which leave such an impact on all those people who visit them.But I like kukrail reserve forest.
Kukrail, a picnic spot is approximately nine to ten kilometers away from Lucknow. Here one will find the endangered species of crocodiles and also a deer farm where many cute deers can be seen roaming around.Many different varieties of birds are also spotted here. The place provides recreational facilities to children as one wud see them enjoying in parks and gazing the amazing part of wildlife. The place also has a cafetaria and a rest house.Also, the beautiful natural surroundings and the lush green gardens create a scenic beauty and provides a refreshing atmosphere.
The positive aspect of this place is that it is working for the betterment of the animals. It is a sort of rehabilitation center for someof the endangered species.Also it has got recognition from the Animal rights activists for successfully doing it an outstanding performance. As i'm an animal lover so for me this is the ideal place to be.
Though one wud find many beautiful sightseeing places in Lucknow but I wud suggest everyoneto come come to this place as it is a worth visiting place. Here you can spend a quality time with your family and friends. After visiting this place you will feel so much charged and energised that you'll completely be under it's spell. So this is what Kukrail is all about.

Saturday, September 22, 2007

Great Lucknow, My Lucknow...

Now I'm going to elaborate very distinctive city, a city having glorious past and bright future, the one n only my "Lucknow".
Lucknow, often called the "City Of Nawabs"is one of the most beautiful cities of India. Being the capital city of Uttar Pradesh, it boasts off a rich historical and cultural background.This place has really got a charm and all those people who visit it come under the spell of this city.What drives most people here is it's unique rich culture and what we call the "Lakhnawi Tehzeeb" for which this city has always been famous for, and this is the thing which makes Lucknow very distinct from rest of the cities. Lucknow is an ancient and a historical city and it dates back to the period, when the Moghuls ruled over it. At that time the city was named"Awadh". Later, the British came into existence, due to which the city had to come come under their control. The city was so much prosperous and rich in resources that it became a soft target of exploitation. But, despite losing it's independence and being in years of suppression, this city today still retains it's cultural heritage and traditional values which are just remarkable. Lucknow, is also famous for it's beautiful architecture. Great monuments like the Bara Imambara, the Chota Imambara, the Roomi Darwaza are some of the perfect examples, which till date are still standing tall and maintaining the city's rich cultural prestige.People from various places are completely mesmerised by the grand beauty of these monuments and so the city becomes one of the important areas of interest.There are many attractive parks like the Ambedkar and Lohiya park which are some of the favourite places to spend leisure time.Not to forget the beautiful National Botanical Garden, being the pride of the city. The city is also famous for it's Chikan work(a unique embroidery), which has received global recognition.There are many other things which makes the city very distinct from others. I, being a citizen of Lucknow, feel proud to be a part of it and i feel honoured to represent my city to whatever place I go. I wish, the city always maintains it's distinct culture and prestigious values which has been responsible for making it a beautiful and a worthy place to live in.
But this is not all I want to say, but it's better to keep dark side in dark, is all I can say...

Monday, September 17, 2007

going through hell to bangalore

Sept Friday 14, was the worst day I had here in Bangalore, Actually it was idea of hanging out which turned to as worst as it could be...
In the morning of Friday(11am), I had my MGPA, me and some of my friends had decided to go to forum after the MGPA, as soon as we done with our MGPA, I ran to SBI ATM to get some money...shit the only ATM in our area was not working... doesn't matter I'll get money in the city and then went to our canteen.
After having dinner, I was feeling quite tired...ya I was not willing to go but It was me who already had screwed last two such plans, thought I must go...let's go...
While going to bus stand we'r thinking that we'll get a Volvo, for smooth journey, but even after standing around 40 minutes on the stand, didn't get Volvo any not even BMTC bus were coming...bad day let's try private bus...
After 15 min in the private bus, I realized it was a big mistake, the bus was moving like a tortoise...I never thought that so many people can travel in a bus...I was not able to see anything out, not even had proper air to breath.
After passing around 1hr:10 min in the bus I took a look outside the window, the bus was standing near Oxford Engineering College, this was the best time to get out of the bus...there was nothing else I can think that time...first just get out, two of us sitting in the back and other two were in the front, I just moved out and called other's to follow...
Outside I realized that I was a good decision because I was seeing so much traffic on the road...lot's of people were coming out of their vehicles and moving on foot, I thought I'll take a taxi, after I'll cross this traffic...
flooded roads were not easy to move on foot, I still had the "No Turning Back" attitude, so kept moving on... this was the first time I was seeing dirty face of Bangalore, the Hosur road. we were almost running on the road to cross the traffic as there were chances of raining and this rat race was ended at Madiwala, near Vishal Mega Mart. The area flooded up to nee, now I was so tired, I decided to go back, just thought "I can't cross this dirty river" party mood was already off as there was water in my shoes......
Hell day, hell Hosur road, now I'll think thrice before planning to go out...

Sunday, September 16, 2007

Most Power full feature of .NET 2.0 languages: Generics

The type system of a programming language enables us to check for illegal instructions and memory violations at compile time. Defining the types for values at design time allows us to detect related bugs in the code at compile time in all the strongly typed languages, including C# and VB.net (using Option Explicit On). Since the binding is done early, it makes the code run faster and thus increases its performance. In spite of all these advantages, type system has some disadvantages. It reduces flexibility of the code and restricts its reusability. If the same type of operations is to be executed on two different types of values, we need to rewrite the code for each type. For example, if we need to write stack classes for String and Integer values, we will have to write two classes for it.
As a solution to the above problem, Microsoft has added a cool feature known as Generics to .NET 2.0. Actually, Generics is the parametric polymorphism that is supported by many programming languages but has not been available in .NET languages till now. In .NET, Generics is the type extension of the Common Language Runtime (CLR). Using generics, we can write code that is type-safe, runs faster and works with any data type. As the CLR supports many languages, you can write the generic code in any .NET language. Depending on the language, syntax of the generic code will also change, however, they are absolutely inter-usable with each other.
In generics, we specify the data type as the replaceable element. This missing information is completed in the consumer code using the (of T) construct. The capital “T” is used by convention and can be replaced by any letter.
When we define the class with (Of Integer), it uses the Integer type wherever we have specified the “T” type and, similarly, when we define the class with (Of String), it uses the String type wherever we have specified the “T” type in the class. As the data types of generic classes are determined at compile time, it reduces the chances of illegal assignments. There is no need of casting, which increases the performance of the code. As the class works with all data types, there is a substantial increase in the code reuse.

Not only can Generics be used at the class level, we can also write generic code at the procedure level. Following is the code in VB.NET 2.0 to explain generics.

Public Sub Swap(Of T)(ByRef Val1 As T, ByRef Val2 As T)
Dim tmp As T
tmp = Val1
Val1 = Val2
Val2 = tmp
End Sub

In case we would like to use the above procedure for integer values, we will call the procedure in the consumer code as:
Dim j, k As Integer
j = 10
k = 100
Swap(Of Integer)(j, k)

Similarly, in case of String values, we will write the calling code as:
Dim str1, str2 As String
str1 = "sushant"
str2 = "verma"
Swap(Of String)(str1, str2)

Tuesday, September 11, 2007

Pair programming: power of Core2 Duo

Pair programming is the practice of two programmers working together on the same terminal and on the same development-task. One person is the driver and the other is the observer. The driver has control of the keyboard and contributes by coding or drawing design diagrams. The observer wears the hat of a strategist. He or she observes what the driver is doing, to analyze its correctness and also to understand how well it fits into the big picture of the software being developed. Developers switch roles as well as pairs during the duration of a project.Pair programming initially seems like a very unorthodox way of working. Developers are used to the notion of code ownership and solo programming. Some initial reservations people often feel are:· Code ownership improves quality of code because developers would not want their code to be of bad quality. How can a methodology, which eliminates code ownership, produce good quality code?· Why have two people work on a task, when one person can do it in the same time?· Developers will not want to work together because of ego clashes.The above reservations may initially seem very intuitive and correct, but in reality, studies have shown them to be incorrect. Let us take each reservation separately and analyze it.
Code ownership improves quality of code: It is true that when developers own the code they write, they try to make it as good as possible, because after all, it is their reputation at stake. However, individual code ownership diminishes the chances of peer review. Peer review has been found to be very helpful in increasing code quality. During Pair programming, the code and design is reviewed immediately. Thus, if a developer makes a mistake due to an oversight, it is very likely that his pair will point it out. Also, when dealing with a particularly difficult coding or design problem, it has been found that two developers will explore a larger solution space and will find a better solution.
Having two developers working on a task would be wasting human resources: If we apply simple mathematics here, we can conclude that if 1 person takes 100 hours to code a particular task, then 2 people working together on the same terminal and the same task would also take 100 hours, which is actually 200 person-hours. Why would we spend double the time and reduce productivity?
1. Studies have shown that when people program in pairs, they actually code faster, taking only 15% more time.
2. It has also been shown that the resulting code has 15% fewer bugs. We all know that if a defect is caught early in the development cycle, the cost of rectifying it is a lot lesser than if it were caught later. In Pair Programming, since all code is reviewed immediately when it is written, many defects are eliminated almost right away. This results in significant savings in time that would be spent in removing these defects, had they been caught later in the development cycle. The 15% extra time that the pairs take is more than compensated by the time saved in QA related tasks. The saving can be as much as 60 times the extra time spent due to pairing.
3. The resultant code is also of a significantly higher quality, thus increasing the robustness and flexibility of the software.
Developers will not work together because of ego clashes or differing working styles: Most people have their own unique style of coding and approaching a problem. It is felt that Pair Programming would work well only if both developers had a similar style of working. Studies have found this myth also to be untrue. Even though people do have their own style of coding and problem solving, most of the time they are not averse to working in pairs. When two people work together on solving the same problem, they explore a larger solution space enriched by their unique experiences. Most likely they will solve the problem with a more creative and efficient solution. The fact that developers in a pair bring their experience in the way they work, very often results in spontaneous learning. Working in pairs can also be a socially pleasurable activity, specially if both of them belog to different gender anf ofcourse it helps the team to reduce work related stress.
So enjoy pair programming...

Friday, September 7, 2007

get tru, "SQL injection"

Haking has never been my interest, but as a programmar, we should be aware of various hacking techniques, to make our code- safe from malicious attack, first I will touch SQL injection which is a technique to get safe information from your database by using some special characters in input.
SQL injection works on logical operations such as AND, OR, UNION, etc. If this technique is used properly, a malicious user can gain complete access to your server. If the application is using dynamic queries, it can create some real surprises.Vulnerability occurs as a result of faulty or incomplete validation of data provided by the user in web applications. It may be possible that the programmer is a newcomer and does not understand such attacks. A majority of programmers believe that the client or end-user will always give correct input to the application. They just check for some minor validations like empty string or null values, etc. but never think of the fact that a user could insert a specially crafted query which reveals all the important information on your machines.

query="select * from userinfo where username='"&strUser&"' and password='"&strPass&"'"
strCheck=GetQueryResult(query)
if strCheckheck=""

bool loginflg=False
else
bool loginflg=true


This query works fine, without any problems, if a user enters the correct characters. But suppose a malicious user enters the following:username=testpassword=' or 1=1--Now the above query will become:

query="select * from userinfo where username='test' and password='' or 1=1--'"

-- Symbol denotes the comment in SQL Server. Hence in the MS-SQL Server everything after the -- is ignored.So this query actually becomes something like this:

select * from userinfo where username='test' and password='' or 1=1

We can break this query into two portions, e.g.:

p=>username='test'
and
password=''q=>1=1

So we can write it as pVqFrom Boolean algebra we know that in V(OR) operation the result will be true if any of the value is true. As in the above code the value of q is always true, since 1 is always equal to 1, hence the value of this entire expression(pVq) is always returned as TRUE. Now, as discussed above, the pVq is always true and hence the query will select all the records in the current table. But generally a programmer takes one record for login and hence the username becomes the username of the first record. Hence on executing the above malformed query a malicious user can bypass authentication mechanisms of the web application. This is only one thing among several endless options that an intruder can use. By using specially crafted query a user can retrieve the entire database schema of your application or the user can upload/download any file or even gather any other information such as credit card numbers stored in the database, delete the user, add a new user, etc.
However when it comes to me, SQL injection can't harm my code as right from my first project, I'm in the habit of writing stored procedure which are fail safe from such attacks.

Sunday, September 2, 2007

MIMO: Nxt Gen Wireless Services

Knowing new and new technology is one of my interest, I always want to keep up with abreast changes in the tech-world. Now I'm writing about a very promising wireless technology, MIMO.
MIMO (Multiple Input Multiple Output) and is fast growing as a broadband wireless communication technology. It provides higher data transmission rates with more robust connections.
There are some physical limitations for any mobile environment due to the topsy-turvy nature of the radio channel. As we roam around in a mobile environment, the distance between the transmitter and the receiver varies and this in turn degrades the service quality. Also the signals would clash with the fixed objects, physical walls, high-rise buildings, trees, mountains etc resulting in signal reflections, diffraction, and deviations in their original paths. Also there are possibilities for the signals to interact and interfere with other signals from different sources. This results in signals traveling in multiple paths and hence signal fading occurs. That is, signals become so weak that they cannot be reliably captured and even sometimes there is not enough signal to demodulate or even to detect the transmission itself and to extract the communicated information from the carrier precisely. There are several ways and means being explored in order to mitigate this problematic fading and energy loss so that users can experience preferred reliability, speed, clarity, coverage and ultimately better throughput. Smart Antenna technology is an excellent mechanism to surmount this problem of fading. A conventional radio uses one antenna to transmit a data stream. A typical smart antenna radio, on the other hand, uses multiple antennas. This design helps to combat distortion and interference. Beam forming (a.k.a. beam switching) concentrates the signal energy on the main path whereas receive combining (a.k.a. diversity) is to capture the strongest signal at any given moment. These two, being the multi-path problem mitigation techniques, do not multiply data throughput over the wireless channel. Both techniques however have demonstrated their power in incrementing performance in point-to-point (P2P) applications such as outdoor wireless back haul applications.Another interesting performance-enhancing technique is channel bonding that multiplies throughput by combining two or more radio channels. That is, to gang together multiple radio channels. For example, for attaining 108 Mbps, two 54 Mbps channels can be simultaneously utilized. Compressions and other relevant techniques are being leveraged to gain additional advantages. Assuming the channels are readily available, channel bonding is a promising technique significantly increasing the throughput. However, channel bonding consumes more bandwidth. In some cases, channel bonding may not be an option because the target frequencies have been already allocated to other users or services. Hence the ideal solution for the performance degradation problem is to come out with competent technologies that simply pack more information per unit of bandwidth and time. That is, optimized utilization of channel to attain higher spectral efficiency.

Saturday, September 1, 2007

Interests continued

The third area of my interest is .NET & J2EE interoperability, as I have done some project in .NET and I also know nitty-grities of J2EE and learning extensive codeing here @ C-DAC. First let me introduce you what interoperability means in application software development. Interoperability is the ability to communicate or transfer data between functional units running on different platforms, implemented in different technologies, using industry standard or widely accepted data description and communication protocols. For.NET/J2EE interoperability, this process consists of ensuring that applications built on one platform connect to those created on the other.
Interoperability is a key requirement for many enterprises, allowing internal systems to work together and enabling businesses to connect to customers, external partners, and suppliers. With ever increasing requirements for efficiency, responsiveness, and cost cutting, interoperability is a key demand for the modern IT environment. Effective interoperability projects take the approach that an organization should use the best technology for the job at hand. If a company creates the majority of its applications in-house, there may be more factors pushing in the direction of staying with the current environment. However, if you need to implement a third-party solution or want to make use of features that, for example, only .NET offers, interoperability offers an effective mechanism for ensuring that the two environments
work together. Delving further into the business needs for interoperability produces the following areas where interoperability is a major factor:
1. Achieving reuse of existing systems.
2. Achieving lower project costs.
3. Making use of best from both platforms.
Best Example: http://www.orkut.com/ User authentication using Java servlets and user interface using ASP.NET.