Bill Gates speech about life after school

Bill Gates speech: 11 rules your kids did not and will not learn in school

Rule 1: Life is not fair – get used to it!

Rule 2: The world doesn’t care about your self-esteem. The world will expect you to accomplish something BEFORE you feel good about yourself.

Rule 3: You will NOT make $60,000 a year right out of high school. You won’t be a vice-president with a car phone until you earn both.

Rule 4: If you think your teacher is tough, wait till you get a boss.

Rule 5: Flipping burgers is not beneath your dignity. Your Grandparents had a different word for burger flipping: they called it opportunity.

Rule 6: If you mess up, it’s not your parents’ fault, so don’t whine about your mistakes, learn from them.

Rule 7: Before you were born, your parents weren’t as boring as they are now. They got that way from paying your bills, cleaning your clothes and listening to you talk about how cool you thought you were. So before you save the rain forest from the parasites of your parent’s generation, try delousing the closet in your own room.

Rule 8: Your school may have done away with winners and losers, but life HAS NOT. In some schools, they have abolished failing grades and they’ll give you as MANY TIMES as you want to get the right answer. This doesn’t bear the slightest resemblance to ANYTHING in real life.

Rule 9: Life is not divided into semesters. You don’t get summers off and very few employers are interested in helping you FIND YOURSELF. Do that on your own time.

Rule 10: Television is NOT real life. In real life people actually have to leave the coffee shop and go to jobs.

Rule 11: Be nice to nerds. Chances are you’ll end up working for one.

0  

Was longing to savour this treat!

Oreo cookie with milk

Oreo cookie with milk

Found an incredible way to enjoy Oreo’s with milk by using a FORK without even breaking up the cookie! Yummy! 😉

(Will try with chopsticks soon! xD )

0  

Bug in Google Images! (as of 3rd Sept 2010)

Google Images (images.google.com) has a mighty bug! Let’s try to reproduce the error by searching for the keyword “matrix”

When images.google.com has finished loading, we type in “matrix” in the search textbox and click on “Search” eventually.

Relevant Images are displayed indeed.

First Search query

First Search query

But now we have changed our mind and wish to search for the keyword “matrox” instead of “matrix”. We position our mouse at the end of the textbox input and attempt to use the left-arrow key in order to reach the character ‘i’ and swap (backspace/delete & insert) it with ‘o’.

But for some reason, the focus moves on to the Images down below and we are able to traverse across the Images rather than traversing through the string expression in the textbox. 🙂

Second Search query

Second Search query

Google indeed has its surprises or rather I should say “Easter Eggs”. Aye! This is a BUG! =)

0  

Fetch Blog Data from RSS link

Parsing Data

Parsing Data

As part of rebuilding my website from scratch, I was longing to display the titles (and links) of my recent blog articles. There are many RSS fetcher implementations online but I wanted to make one by myself (Breath of fresh air 😛 ).

Initially, all I could think of is using a Web Service to bring in the data using SOAP and then ripping through it to fetch the titles and links. But there are nifty tools as part of C# which we can use to get the same data. I zeroed in the WebClient class which is available as part of System.NET API and we just have to pass in the URI and get a steady stream of data :).

Remaining work revolves around parsing/chopping/filtering/nunchuck”-ing” through the downloaded data! \o/

Next, we use efficient data structures to hold the parsed data, flatten the data into a string variable and then call the variable by using <% =STRING_VARIABLE_NAME%> inside an asp.net page and display it the way we want. I displayed it inside a simple marquee tag at present and will be extending it further soon.

Source Code >> BlogData.cs

>>>>Updated copy of the above source code which does not include management of the intermediate temp file >> BlogData2.cs

(Replace the “.cs_.txt” extension to “.cs” before using the file)

class BogEntity
{
public string title;
public string link;
}

class BlogData
{
public string GetData()
{
//
// TODO: Add constructor logic here
//
String finalString = string.Empty;
List<String> titles = new List<string>();
List<String> links = new List<string>();
List<BogEntity> entityList = new List<BogEntity>();

using (WebClient client = new WebClient())
{
using (Stream myStream = client.OpenRead(“http://gauravpandey.com/wordpress/?feed=rss2″))
{
using (StreamReader reader = new StreamReader(myStream))
{
StringBuilder sb = new StringBuilder();
String data = string.Empty;
while ((data = reader.ReadLine()) != null)
sb.Append(data+”\n”);
finalString = sb.ToString();
}
}
}

using (StreamWriter writer = new StreamWriter(HttpContext.Current.Server.MapPath(“temp.txt”)))
{
writer.WriteLine(finalString);
}

finalString = string.Empty;
string defaultURL = “http://gauravpandey.com/wordpress/?p=”;

using (StreamReader reader = new StreamReader(HttpContext.Current.Server.MapPath(“temp.txt”)))
{
string line = string.Empty;
while((line = reader.ReadLine()) != null)
{
if(line.Contains(“<title>”) && !line.Contains(“Weblog”))
{
titles.Add(line.Replace(“<title>”, string.Empty).Replace(“</title>”, string.Empty).Trim());
}
else if (line.Contains(defaultURL) && line.Contains(“<link>”) && line.Contains(“</link>”))
{
links.Add(line.Replace(“<link>”, string.Empty).Replace(“</link>”, string.Empty).Trim());
}
else
{
//all the remaining garbage data
}
}
}

int len = titles.Count;
for(int i = 0; i < len; i++)
{
BogEntity objX = new BogEntity();
objX.title = titles[i];
objX.link = links[i];

if (!objX.title.Equals(“GauZ&#039;s Weblog”) && !objX.link.Equals(“http://gauravpandey.com/wordpress”))
entityList.Add(objX);
}

titles.Clear();
titles = null;
links.Clear();
links = null;

StringBuilder sbX = new StringBuilder();
sbX.Append(“Recent blog articles by Gaurav from WordPress >>  “);
foreach(BogEntity x in entityList)
{
sbX.Append(“<a href=\”” + x.link + “\” target=\”_blank\”>” + x.title + “</” + “a> &nbsp;&nbsp;&nbsp;&nbsp; “);
}

return sbX.ToString();
}
}

0  
1