Sunday, February 17, 2008

Thoda Sa Aasman by Umaira Ahmed

Have finally completed this novel. :
It started off as pretty interesting, then got a bit boring and then again got so good that it was hard for me to put it down.
It's hard for me to put down novels when I have assignments or projects to complete :P.
Well the end though good was a bit horrifying too, for me atleast.
It was just one single thing that completely horrified me, no it's not a horrow novel, but still yaar, I didn't like that bit at all. But I won't spill what that is about.
Khair, overall the novel's good but not as good as "Peer-e-Kamil" (by the same author).
All awards to Peer-e-Kamil. A superb novel.
Anyone who hasn't read it, should.
Anyone who hasn't read Umaira Ahmed, should change this fact by starting with Peer-e-Kamil.
Read Thoda Sa Aasman too, it is a good novel. If you don't think like me, that little bit thing won't be something you dislike, and you'll enjoy the novel thoroughly.
Happy Reading!!!!

Friday, February 15, 2008

Photoshop: The Brush Tool

Okay now. I am not good at Photoshop. I don't even know the names of most of the tools. But yet I am here to write a post on it. Maybe this is because I sooooo want to write something productive instead of all that mindless babble.

So this is something I learnt from the Entheos Website I have given the link of in "Favorite Sites".

I am not copy pasting the entire tutorial, but it still is the gist of it. I'll be explaining it in my own childish way.

Okay so, open Adobe Photoshop 7.0.

Open a new workspace (I think that's what they call it).

Add a new layer. Everything should be done on a new layer (my friend taught me that).

Look closely at the "Tools" window.
If you don't have the "Tools" window visible, go to the "Windows" tab, on the top, second from the right. Click on Windows and then "Tools", you'll now see a Tools window.

Now click on the brush tool:



Now, after selecting the brush tool, click on the arrow I have marked with red in the picture below:




Now, click on the small arrow at the top right corner from the drop down window. From the Brushes option at the bottom of the menu, you can select any kind of brushes.

When you select you a pop up window asks you if you want to replace the current collection of brushes with the one you just selected, click on "OK" here to continue.

If you select "Special Effects Brushes", you'll see a collection of quite a good collection including "Scattered Roses", "Ducks not in a row" etc.




Select any brush you like and do wonders. :)

Look what I have done with "Scattered Roses" with size set as "292px":




And with "Butterfly" with sizes: "29 px", "100 px" and "200 px":


Blog Digger

So, as I have mentioned again and again our Final Year Project is based on blogs.
It's basically a combination of three features:
Most Cited Topics
Opinion Retriever
Summarizer.

We are and will be applying data mining and NLP (Natural Language Processing) techniques to perform the above three tasks.
We have collected quite a few and still in the process of collecting more blog posts through the technology of RSS Feeds. These collected posts act as our collected data and will be the input to our system.
We are collecting them by using a software called RSS Feeder by Omar Al Zabir, which collects posts and then stores them in an Access Database. It has a perfect user interface, but what we need is the database.

We intend that by the end our system would be able to perform: (this line has frequently been used in the documents)

Most Cited Topics:
If the user states a time period, Blog Digger would search and display the hot topics of that time period.

Opinion Retriever:
The user specifies a topic and the opinion of bloggers on that topic is displayed in terms of percentages of positive and negative opinions.

Summarizer:
The summary of the selected blog posts is displayed.

My Final Year Project

The start of the 7th semester, we all had just one thing roaming about in all the rooms of our brains. Final Year Project aka FYP. This is all we thought about the entire day. The first question we would ask others would be "Did you get FYP?". Mostly followed by "Have you made a group yet" and then "What are you guys planning to make?".
We would stay in the university till 4:30, discussing ideas, trying to get some good ones, searching over the net, talking to people, discussing with our teachers.
It seemed like every idea we came up with got rejected. No, it didn't seem like it, it was what really was happening.
It seemed like we spent the most part of our day, going to the ground floor, and discuss one idea with a teacher, asking for his ideas, and he really gave us some excellent ones, and then going to other teachers to get them approved. So most of the day was spent in travelling from the first floor to the ground and then going up again, from one corridor to the next, from one corner to the other.
After browsing through many ideas, we got one that we thought would be accepted by the committee. We didn't have many doubts about it being accepted. What we were worried about was us being able to develop it. But everything doesn't go the way you expect it to go, does it?
And so was the fate of this little, harmless expectation of ours. Our idea was brutally rejected by the committee.
And we are back to square one, again.
The prospect of going through the same ordeal of searching, analyzing (we never really did this part), discussing and getting the approval horrified us. The fact that not much project ideas have been rejected didn't do any good to improve our depressed situation.
We again started going to teachers for ideas, also trying to know why our first idea was rejected and seeing if we could do anything to change the rejected status to the one favorite status of "Accepted".
Couldn't do anything about the first idea, but one of our teacher again presented us with ideas he had already given and the ones we failed to understand.
We were now left with no option then to pick up any of those ideas.
We had realized by then that we can't up with any good ideas, so we should better accept the reality, and try to get our interests in one of the proposed ideas.
We liked both the ideas he gave, but we chose the one that had to do with blogs.
Thus, I am here writing a blog about my project that is based on blogs.
If it wasn't for my project, I don't think I ever would have started blogging. But now when I have started blogging, I am liking it.
A shameful confession:
I didn't know a thing about blogs till this project.

So we started a project that was a data mining project. Basically, blog mining.
But our supervisor, the teacher who gave us the idea of this project, wanted us to not to name the project as "Blog Miner".
He wanted to come up with a different name, he said and I quote:
"Tum loog naam soch rahay ho ya mein apni ammi se pochoon......... unhein buhat shauq hai naam rakhnay ka"

And so we named it "Blog Digger".

Still thinking of a title for this one... :)

I have always been impressed by brilliant people...... but it's just till I start knowing them..... and then I think they are no more different than me.

There was this girl in my school, my class mate, and she was good at practically everything. Name any thing and she'll excel at it. From studies to extra curricular activities, from singing to acting, from sports to comparing. From this to that.... in short everything. And I was utterly impressed by her. I wanted to become friends with her (embarrased by this confession, but let me tell you I have never really been friends with any intelligent people, cheetahs as I like to call them, or maybe I don't put my friends under the Einstein List, even if they are really genius. So intelligence is not what I look for in people, coz for me every person is talented). But when I did get to know her I came to know that she was just like other people. No; no two people in the world are similar, everyone is different in their own perfect way. But it's just that intelligent people don't live in a different part of the world either. Don't really know how to explain this.

Sometimes I am content with my life (and that is just sometimes), I thank Allah for blessing me with everything. So what if I don't belong to the elite cohort. I still have a great life mashaAllah. Allah has blessed me with everything before I even thought I needed it. I feel happy with myself, I feel happy with my life.
This is the time, when I hate people who are complaining about their lives. I sit with them and try to explain to them that their lives are better than others.
I have this friend who sometimes start wishing that she was dead. And all I want at that moment is really kill her so that she would learn her lesson. But isn't this something we all sometimes wish for without even realizing the stark reality of what we are asking for.
Listening to this my mother would try to tell me that I haven't done much good in my life to make my after life any good. And I would become more depressed at the prospect.

(I started on a different note and think I have gone somewhere else)

So at other times when I am not so happy with what I have got. Sometimes when I wanted something else and got something completely different, I complain, forgetting that just the other day I was scolding someone for being so 'nashukray' (ungrateful).

It may seem very childish to you, but sometimes when I am not getting the results I expected, I become depressed like something really wrong has happened with me. I start complaining, I become irritating and everything bad. And this is the time I wish I was as smart as other people, more particularly the people who managed to get good results.
And then when I survive this so-called crisis of my life, I start feeling good again.
And then when I see some one behaving in an improper fashion (won't shed any light upon this), I thank God that I am not like them, forgetting completely that I do the same, I too hurt others, and never realize it.

So in the end..... we all are the same yet very different from each other.
Some of us realize that whatever they've got is good enough for them, they have been blessed with something and they should go on and help others, these are the people who have learnt the golden rule of happiness "live with what you have, be satisfied with whatever you have got". These are the people who make the most of what they have.

I would like to mention here about one my friends.
This girl joined our campus after I think the 5th semester.
I didn't know her very well then, I still don't I guess.
One day, I just asked for the sake of making a very short conversation, instead of just the usual 'salam dua' thing. I asked: "How's life"
And she replied with a sweet smile on her face, the smile she almost always has on: "Pathetic, pathetic, pathetic".
And then again, without thinking, and just for making the conversation a little longer instead of abruptly ending it, and because I just love talking with anyone who would listen and care to reply, I stated:
"You have to smile na? no matter how much wrong things go".
I didn't really expect her to agree, even reply to this. But she did:
"Yup, coz if I make a sad face, everyone would get worried about me, especially my parents."
And this is what finally stopped me talking. To this I had no reply.
But it got me thinking of how I never think in this way. If I am feeling low, I make sure everyone around me knows that, although this is all unintentional. I just can't get myself to smile, when I don't feel like it. And this friend of mine, who happens to be of almost my age, just about more than one month younger, and she has learnt to smile in any circumstance. She does complain about her life sometimes, but not as much as I do. She always amazes me with her little stories of problems of her life. These problems are the ones, all of us face, these are the problems I face too, but I never do that with as much courage as she does and again with a smile on her face.
This little dialogue of ours, really got me to like her......

And then there are others like me, who have nothing better than to complain about their lives and about others. Unfortunate people who continue doing this even when they know it's a great big sin.
But in spite of these differences I still sometimes think that everyone is the same at least to some 0.000001 extent. We have all been blessed with some things, some amazing talents, and we all think that we have been deprived of a lot. And some of us only want to get to that deprived part, we try to just get hold of the things we don't have as soon as possible. I am not saying this is a bad thing, it's just that in this race we ignore the things we already have, evading the chances of a much better life, I guess.
But who am I to talk about such things?????
I am just a talker. :)

Wednesday, February 13, 2008

What do you do????

What do you do if you become an after thought to the people you care about?
What do you do if they stop caring about you?
What do you do if you don't have them to share your feelings with you?
What do you do if they become irritated with what you say?
What do you do if they don't claim to be your friends anymore?
What do you do if it had always been a mistake?
What do you do if it was never more than a mere acquaintance?


What do you do if you were never more than an after thought, a part of lost memory?

Saturday, February 9, 2008

Why do friendships diminish?

No I am not here to answer this question.
I don't think I can, and I don't think I ever will be able enough to bring myself to answer this simple yet enigmatic question. No I am not going to attempt that.
I am just here to pore my thoughts.
So, why do friendships weaken?
Why sometimes a friendship that could have gone a long mile and may have grown more stronger suddenly losses it's importance?
Why do we do this to ourselves?
When somewhere we do feel that we are loosing a friendship, why don't we fight for it? why don't we work for it? why don't we try to solve the problems? Why do we just let it be?
Sometimes it happens that we are hurt so much that it affects not just one friendship but it just changes our attitude towards people. We start judging everyone. Looking at everyone through the same mirror of skepticism. Why do we do that? But maybe we are right in doing this too.
Why don't we discuss the fears we have? Why don't we just come out and say how low we are feeling? Why is it so necessary for us to pretend all the time? Isn't it okay to surrender sometimes, is it okay to give others a chance?
Or I will say this again, maybe we are right in keeping our fears to ourselves, not letting anyone see our pain.
We loose our friendships doing this?
But are friendships so weak that it can withstand the winds of time?
Shouldn't it be strong enough to go through all of this with a smile?

I should end this here.
It's not going anywhere anyways....


Tuesday, February 5, 2008

Word Net

So here's a somewhat technical post.
See how hard I am trying to write a technical blog?

So, we (a group of 4 people) are currently working on a project, will tell you the details in another post.
During this project, we faced a problem of identifying whether a word falls under the noun category or not. We found the answer immediately. Word Net.

Word Net is basically a database which has classified words into the parts of speech it falls under. There are many other things that Word Net can help you with. Getting Hypernym, for instance.

You can find the Word Net application on it's website:
http://wordnet.princeton.edu/

We downloaded the application from this site, it also gives you the code of word net (after all it's open source)

But the problem was, using word net in our code.
We are working in C#. Word Net is a C++ project.
We tried to call a C++ code from C#.

For this we first tried to get a hang of dll. We made a sample dll in C++ code. Called it through C++ code. Worked perfectly. Yahooooo!!!!
But then we tried to call the same C++ dll through C# code.
Unsuccessful.
Tried hard to get it right.
Surfed through blogs and articles.
Posted questions on the forum.
Got answers too.
But nothing worked.
Yeah, I know we are dumb. :(


But then while trying to get our hands on the Word Net Database. We found a site:
http://sourceforge.net/project/showfiles.php?group_id=135112
which provides the Word Net database in mySQL.

We downloaded it. and yes we thought that we can use it.

Unfortunately we are working on SQL. Not a big problem. We could just as easily have used mySQL. not much difference.
But we always try to do the hardest, most dumbest and senseless thing on earth.
And we continued with the tradition here too.
We decided to convert the database in SQL.


And yeah I did think about downloading a software that could convert mySQL to SQL.
But was only able to find softwares that could convert mySQL database into SQL database. Found none that could do the same with query files.

Then I tried to make a mySQL database with the query files.
again faced some problems.

Now when you download the zip file from the above mentioned site, it provides you with the query files to create and populate database.
On the website the schema is also given.
Using the schema, we created the database on Microsoft SQL Server 2005.
And then we used the query files provided to populate the database. But ofcourse they were in mySQL, so we created a small C# code which reads from .txt file the queries in mySQL, does the necessary manipulation on them and then writes the SQL Queries in a .txt file.

Seems easy enough na?
Well it was easy, but very time consuming. Or maybe I am dumb and couldn't find a less time consuming way.

What I did was I used to open the query file in Firefox. (Wasn't able to open it with Microsoft SQL Server, Internet Explorer or Notepad).
I wanted to populate one table at a time. So I went through the page and found the queries for the table I wanted to populate. Then I would copy paste one line on a note pad. That one line would actually comprise a large number of queries. Then I saved the .txt file and converted into a .txt file with SQL queries through the following C# code:

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace ConvertMySQLtoSQL
{
class Program
{
static void Main(string[] args)
{
String Path = "Osense.txt";
String TbName = "sense";
StreamReader Reader = new StreamReader(Path);
String Content = Reader.ReadToEnd();
Content = Content.Replace("),", ");\n");


String[] Lines = Content.Split("\n".ToCharArray());
for (int i = 0; i < Lines.Length; i++)
{
Lines[i] = "INSERT INTO " + TbName + " VALUES " + Lines[i];
}


Reader.Close();
String OutputFile = TbName + ".txt";
StreamWriter Writer = new StreamWriter(OutputFile);
for (int i = 0; i < Lines.Length; i++)
Writer.Write(Lines[i] + Environment.NewLine);
Writer.Close();

}
}
}