T-shirt Quotes

I was asked by Piyush Mundhra to come up with a one-liner for my personlized Pragyan Core T-Shirt. These are the ones I liked :

Smile. It confuses People.

I am not BOSSY!
I just have better ideas.

I don’t suffer from insanity.
I enjoy every minute of it.

Has any of this time-saving technology ever let you go home one minute early?

The nice thing about standards is that you have so many to choose from.

You are in a twisty little passage of standards, all conflicting

Implementation is the fruitless struggle by the talented and underpaid to fulfill promises made by the rich and ignorant.

My software never has bugs. It just develops random features.

Windows: Just another pane in the glass.

Doing a job RIGHT the first time gets the job done. Doing the job WRONG fourteen times gives you job security.

TEAMWORK means never having to take all the blame yourself.

We waste time, so you don’t have to.

We waste more time by 8:00 in the morning than other companies do all day.

Work: It isn’t just for sleeping anymore.

The one I chose : I don’t suffer from insanity.  I enjoy every minute of it.

Life

Only yesterday I was having a discussion with Purnima on the way while escorting her to the station. How should you spend your life such that you have no regrets about it in your death bed?

I haven’t figured out the answer for myself yet.

I tend to try to achieve as much as possible. But why?

A part of the answer is my thirst for knowledge, my unending desire to make sure things work and another part is, I fear, to make others look up to me. But this again conflicts with my notion of not having a role model. Why do what others have done before? How does that make your life worthwhile? And by worthwhile I mean precious, non replaceable.

In other words, I tell myself it doesn’t matter what others think of me. But I it still does matter to me what others think.

As for the question what makes one life complete/worthwhile/not regrettable, will blog about it when the answer comes to me.

Fedora Directory Server Rocks!!!

Having gone through the hell of installing an LDAP server once, I thought I could I could install the openldap server on the old server that we had to shift to.

Anshu had already broken his head on it and was at the verge of losing his sanity. And so i stepped in.

First I checked /etc/openldap/slapd.conf, line by line. Everything was fine.
ldapadd -W -x -D "cn=Manager,dc=pragyan,dc=org" -f base.ldif
**invalid credentials (49)**

slappasswd
Enter password:
{SHA}xyxzsdf;alskjdf;lasjdf;lajd
I put the password in slapd.conf

tried again.
**invalid credentials (49)**

Changed the rootdn in slapd.conf
**invalid credentials (49)**

Removed evolutionperson.schema
**invalid credentials (49)**

Uninstalled openldap-server, openldap-client, db4utils
rpm -e --nodeps openldap-server openldap-client db4utils etc...
Reinstalled all of these from yum
yum install openldap-server openldap-client db4utils etc...
Reconfigured slapd.conf
**invalid credentials (49)**

I started making strange sounds, started laughing without reason.

Opened a website listing down installation steps, followed them line by line
**invalid credentials (49)**

Thats when I remembered Fedora Directory Server. (It wasn’t fully developed when I was implementing LDAP in Fedora 7, so didn’t use it then).

To my pleasant surprise they have the concept of “install scripts”. I felt like a king when the script asked me, “What would you like your domain root to be? Usually, you should keep it the same as your fully qualified domain name”. A smile appeared on my face. I knew the meaning of true happiness then.

http://directory.fedoraproject.org/

A tryst with a first year :)

(08:51:38 PM) lucky: hi..

(08:51:44 PM) sahil: hi

(08:51:48 PM) sahil: who are you?

(08:52:01 PM) lucky: which year?????

(08:52:08 PM) sahil: who are you?

(08:52:13 PM) sahil: one year …

(08:52:17 PM) sahil: from 1 to 4

(08:52:23 PM) lucky: i am a nittian

(08:52:29 PM) lucky: 1st yr..

(08:52:29 PM) sahil: probability of 0.25 being in each year

(08:52:32 PM) sahil: really?

(08:52:36 PM) lucky: ya

(08:52:51 PM) lucky: which hostel???

(08:52:53 PM) sahil: coz I thot irc address delta.nitt.edu is also available to non nittans

(08:52:56 PM) sahil: why?

(08:53:07 PM) sahil: that information shouldn’t affect our conversation

(08:53:09 PM) lucky: just like that…

(08:53:18 PM) lucky: plzzz tell

(08:53:24 PM) sahil: age, sex, color … are no indication of a person’s true knowledge

(08:53:32 PM) lucky: k

(08:54:09 PM) sahil: what’s your name?

(08:54:24 PM) lucky: rajan

(08:54:35 PM) sahil: ece?

(08:54:41 PM) lucky: ya…

(08:54:50 PM) lucky: how do u know..??

(08:54:58 PM) sahil: I guessed.

(08:55:09 PM) lucky: wat’s ur branch????

(08:55:12 PM) sahil: ice

(08:55:23 PM) lucky: which state????

(08:55:46 PM) sahil: http://delta.nitt.edu/doku/doku.php/delta/core_delta

(08:56:02 PM) sahil: heryana

(08:56:05 PM) sahil: haryana

(08:57:05 PM) lucky: k it was a pleasure talking to u…. bye tc…

(08:57:43 PM) sahil: you too :)

(08:57:47 PM) sahil: ;)

Stereoscopy

Today is a great day!!

For the first time I was able to cross view. And only today I found out the type of stereograms I used to play with were parallel viewing. To find the difference between them go here or here. (Gosh! wikipedia articles for cross view and parallel view don’t exist. I could create one someday!)

Read more

Normal forms

Sitting here in Morgan Stanley, it’s hard to find free time. Things are always on the run.

But one day, I did find free time, and did what I had wanted to do for a very long time - learn about Normal forms in RDBMS.

Here is what I gathered from these websites :

  1. No multivalued attribute

    StudID Course
    12345 3100,3600,3900
    54321 1300,2300,3400
    (Wrong)
  2. No repeating group

    StudID Course1 Course2 Course3
    12345 3100 3600 3900
    54321 1300 2300 3400
    (Wrong)
  3. Presence of atleast one unique identifier (addn of ID field)

    StudID Course
    12345 3100
    12345 3600
    54321 1300
    54321 2300
    (Right)

There needs to be one composite key atleast. (One or more fields that can be used to distinguish every row uniquely). In the above example, if it was possible for the same student to take the same course twice, then we would have to add another uID field to bring the DB to the first normal form.

2nd Normal Form:

The DB is in this if all non-prime attributes are completely dependent on a candidate key. (and not on a part of it).

i.e. no repetition of key detail in one detail

StudID CourseID StudNm ProfID ProfName
123456 310000 April00 6789 David
123456 410000 April00 2345 David
123456 210000 April00 6789 David

Candidate Key = StidID + CourseID

But StudNm (student name) depends only on StudID (and not on StudID + CourseID)
Had prof been just a function of course, even that would have to be removed.
Hence it is not in 2nd NF.
The ProfName-ProfID dependency is removed in the 3rd NF (where no attribute can be dependent on a non-key attribute in that table).
No part key dependencies can exist in 2nd NF.

None of the non-prime attributes of the table are functionally dependent on a part (proper subset) of a candidate key; in other words, all functional dependencies of non-prime attributes on candidate keys are full functional dependencies. For example, in an “Employees’ Skills” table whose attributes are Employee ID, Employee Address, and Skill, the combination of Employee ID and Skill uniquely identifies records within the table. Given that Employee Address depends on only one of those attributes – namely, Employee ID – the table is not in 2NF.

  • Candidate key: A candidate key is a minimal superkey, that is, a superkey for which we can say that no proper subset of it is also a superkey. {Employee Id, Skill} would be a candidate key for the “Employees’ Skills” table.

  • uperkey: A superkey is an attribute or set of attributes that uniquely identifies rows within a table; in other words, two distinct rows are always guaranteed to have distinct superkeys. {Employee ID, Employee Address, Skill} would be a superkey for the “Employees’ Skills” table; {Employee ID, Skill} would also be a superkey.

  • Non-prime attribute: A non-prime attribute is an attribute that does not occur in any candidate key. Employee Address would be a non-prime attribute in the “Employees’ Skills” table.

  • Primary key: Most DBMSs require a table to be defined as having a single unique key, rather than a number of possible unique keys. A primary key is a candidate key which the database designer has designated for this purpose.
    Some thoughts :

  • In and after 2nd NF, all tables have only one candidate key. -> FALSE

  • All candidate keys in a table map to each other one to one. -> TRUE

  • What normalization stage ensures that only one candidate key is remaining?

    • None. Beacause normalization aims at reducing data duplication and inconsistencies. Candidate keys in a table causes no redundency.
  • If a table in 1st NF has no composite candidate keys (candidate keys consisting of more then one attributes), then it is automatically in 2nd NF.

3rd Normal Form:

No non-transitive dependencies:
A non-transitive dependency is one in which an attribute is dependent on a non-key attribute in that table.
For example, in the ProfID example given above, to bring it to 3rd normal form, ProfName and ProfID would have to brought to a separate table. Because ProfName is a non-transitive dependency.

  • In 2nd Normal form, all candidate keys become mutually independent. FALSE
  • In 2nd Normal form, any candidate key is a candidate key (i.e. is a sufficient and necessary dependency) for all other attributes. FALSE - this happens in 3rd NF.
  • In 3rd Normal form, non-prime attributes become dependent on a candidate key. TRUE

Sunlab

Last Row of the SUN lab
Here’s a great blog to keep yourself updated about the last row of SUN lab!! ;)