Friday, October 27, 2006

Standard Template Library

For the past few days, I'm learning STL. The good think is that I'm reading it continuously without break and working out the examples chapter by chaper.

STL in a Nutshell
============
STL is a powerful library. It adds more PERL power to C++. STL is an elegant and generic solution. STL have 3 major components :

* Container
* Algorithms
* Iterator

Containers
=======
Stores and retrives data. Examples:

* Simple Array
* Vector (dynamic array)
* Deque (double ended queue)
* List (dohbly linked list)
* Sets & Multisets
* Maps & Multimaps

Algorithms
========
* Copy
* Sort
* Min/Max
* etc ... (You name it, everything is here, expect graph algorithms)

Iterator
========
Thanks to Wikipedia
* input iterator
* output iterator
* forward iterator (sets & maps)
* bi-directional iterator
* Random access iterator

It took me around 1 hr correct the problem in the following code

template <typename>
void display(ttype v) {
typedef typename ttype::iterator v_itr;
cout<<"Element in v :";
for(v_itr i=v.begin();i != v.end();++i)
cout<<*i<<" ";
cout<<endl;
}

I was not able to declare the iterator for the generic type ttype. Most of the programmers are used to

for(int i=0;i<x;i++)

We use i++, postfix increment operator. In some compiler implementation i++ consumes more cpu cycles/memory read than ++i (prefix). The problem is we dont understand i++, when i++ stands alone there is no use. i++ must be used in expressions/assignments.

Tuesday, October 17, 2006

Silence is sometimes the best answer

Always remember that silence is sometimes the best answer.

Today is a good day. Woke up at 7:00 pm. Morning walk @ Anna nagar.

It was a long time since my brother mailed me. I mailed him today, after all he is my own brother. I can forgive him.

I'm keep shifting my books. I couldnt read the books which I promised myself to read.

Currently I'm reading no technical books or self-help books. I'm reading "Children of the Lamp" by PB Kerr. I need to start learning Linux System programming and C++ programming, then Linux kernel programming.

Last week I read "Zen Tarot", the fool is the first one. There are 3 types of fools.
1. simple fool - who dont know that he dont know anything
2. complex fool - who dont know anything, but think that he knows everything
3. blessed fool - who knows that he dont know anything

Tuesday, October 10, 2006

Done it again

I woke up at 6:30 am today, went for walking and Kovai fruit stall. I need to repeat the success.

As I already said I'm reading "The 7 Habits". P/PC (Production/Production Capacity) factor with the "Golden eggs laying Goose" parable is really exceptional. I name it as "Producer/Consumer" factor, the thing is simple, if you want to consume more, then produce more. Examples
* If you want to good healthy, excercise
* If you want good job, learn
* If you want good finance, save and invest

The 7 Habits are

Independance
==========
* Be Proactive
* Begin end in mind
* First things first

Interdependance
============
* Think win/win
* Seek to understand, then to be understood
* Synergize

Excellence
========
* Sharpen the Saw

Sunday, October 08, 2006

Good Start Up

Voila, I made it. I woke up at 6:30 am this morning. It is a great experience.

I've started learing Thinking in C++ (Bruce Ekcel). It is a good book to start with.

I will be reading Pragmatic programmer and The Practice of Programming, next.

One shot at a time. "One Donkey at a time" - Oscar Sir(my school teacher).

Manonmani Miss - My Favorate Teacher

I'm starting with C++, my favorate. I first started learning C++ from 1998(NIIT). My friends used to call Bjorne Stroustrup as my MAMA.

I know this article is not structured, sorry.

Technical Book to Read This Month: Thinking in C++
Self Help Book to Read This Month: The 7 Habits of Effective People

nothing else, I will read it completely. "No beating around the bushes this time".

Thursday, October 05, 2006

Quiz

Yesterday I won 3 Chocos for answering 3 question ?

Figure the personality - Dijkstra
What is Euler cycle ?
Diff. between mutex & semaphore ?

The question which I loved to answer was answered by another guy.

How to distinguish postfix and prefix operator in operator overloading ?

Ans: Add a dummy variable "int" in postfix

I ran a sample program using boost library. It is so cool.

I need to learn Qt.

sample boost code:
==================

vector x;

x+=1,2,3,4,5,6,8,9,0;

will append the elements into the vector. += operator is overloaded and used (...) variable parameters.

Now, Finally I have list of Areas which I need to Master
=========================================================
1. Data Structures & Algorithms (C, C++, Perl)
2. Unix/Linux Internals (Maurice J.Bach, Vahallia, Understanding Linux Kernal)
3. Object Oriented Programming & Design (+UML)
4. Network Programming (Richard Stevens)

I don't want any deviation from these areas. From here onwards I will be posting blogs regarding these Areas(and nothing other than this).

God Please Help Me !!!

Friday, September 29, 2006

Some Ayn Rand Quotes

Evil requires the sanction of the victim.

I don't build in order to have clients. I have clients in order to build.

Only the man who does not need it, is fit to inherit wealth, the man who would make his fortune no matter where he started.

Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter.

The purpose of morality is to teach you, not to suffer and die, but to enjoy yourself and live.

The question isn't who is going to let me; it's who is going to stop me.

To say "I love you" one must first be able to say the "I."

What objectivity and the study of philosophy requires is not an 'open mind,' but an active mind - a mind able and eagerly willing to examine ideas, but to examine them criticially.

Anyone who fights for the Future lives in it today. - "I love this"

Great men can't be ruled.

There's nothing of any importance except how well you do your work.

Reason is man's basic means of survival.

"The three cardinal values of the Objectivist ethics with their three corresponding virtues: :
* Reason - Rationality
* Purpose - Productiveness
* Self-Esteem - Pride

"What is greatness? I will answer: it is the capacity to live by the three fundamental values of John Galt: Reason, Purpose, Self-Esteem."

My quote:

Pride is not evil, if have pride over your own creation.

Once Again

Once Again I'm late. I got up at 9.00 am. I must do something, I want to put an end to my laziness. I don't know why I'm not doing that.

Morning Walk is always good. Fresh Air, Trees, Excercise, Lily Pond ... It is really good in the morning.

Weekend (long weekend)

* Read "Unlimited Power"
* James Barclay
* Sophie's World - I love this book

One thing I really like abt myself is preservence. I thrive to be my best.

I'm a follower of Ayn Rand (Philosophy of My Life).

Quote of My Life
================
"Never, Never, Never Give Up"

My Life Statement
=================
"I want to be a Programmer". One who is able to read D.E.Knuth, that will be my greatest achivement in my life.

Steps towards that
==================
1. Build programming skills in C/C++
2. Read all library books ***
3. Build strong mathematical foundation with J language
4. Read Knuth

Library Books **
================
The Pragmatic Programmer:From Journeyman to Master -- Currently Reading
The Practice of Programming -- Currently Reading
WRITING SOLID CODE Steve Maguire
Programming Pearls Jon Bentley
Data structure and Algorithm Analysis in C Mark Allen Weiss
Step-By-Step Problem Solving Chang, Richard Y
How to Solve it :New Aspect of Mathematical Method Polya, G
Working with Emotional Intelligence Goleman, Daniel
Time Management Bird Polly
Advanced C Herbert Schildt
Code Reading-The open source perspective Diomidis Spinellis
Design Patterns Explained Shalloway, Alan
Design & Implementation of 4.4BSD Operating System
C Traps and Pit Falls Koenig, Andrew
Advanced C++:Programming Styles & Idioms Coplien, James O
Effective C++ Meyers, Scott
More Effective C++ Meyers, Scott
Generic Programming and the STL Austern, Matthew H
Refactoring :Improving the Design of Existing Code Fowler, Martin
After the Gold Rush Steve McConnell
Code Complete Steve McConnell
Programming Perl Larry Wall
Learning Perl Randal L Schwartz
Lex and Yacc John R Levine
Computer Architecture - A Quantitative Approach John L Hennessy
Beginning Linux Programming Stones, Richard
How to Solve it : Modern Heuristics Michalewicz, Zbigniew
The Psychology of Computer Programming Weinberg, Gerald M

Final Reading - Before I die
============================
* Read "Concrete Mathematics"
* Read "Art of Programming" - All Volumes

I remember oneday Shiju (I don't remember whether it is shiju or stalin or kannan) asked me, "What do you want to become after 10 years down the line ?", I answered "A Programmer". No man, It is not Stalin. He is the one who understands me completely.

Sometime back I forwarded an haox mail to Stalin. He replied back, I know he would. I replied back, which he don't know I was making fun of him.

I want everyone to learn. I, myself love to teach, esp. Kannan. Yes, Everyone but One. Stalin !!! I dont want him to read any other book in rest of his life. I hate him reading books. (If he happen to read this blog he will kill me). This idiot has already red(old noun read - past-tense, I can put 'read' there but one has to read it as 'red') a lot of books, now I'm struggling hard to read the books which he has already red.

I couldnt bear it. Now, this idiot is reading "World is Flat". In Phani's words "Thokka fellow".

Wednesday, September 27, 2006

Quality Issue

The Quality of My Life is in question ?

I'm waking up late these days !!! I need to do something abt it.

I want to regulate my daily activities. I will record my morning waking timings. At first I will start by 7.oo am.

Today I made an important decision. I'm going to install Linux in to PC. I'll be doing it this weekend. I got Linux CD from Joju.

Friday, September 22, 2006

Mathematics is fun

After a logtime, I've started blogging again.

I want to blog, b'coz I want to learn ... to track my learnings ... to learn is to know you know no more ... the more you learn, the more you learn you know nothing. (Truth: I want to know that "I know nothing" more.)

Blogging is a sort of "Time Talking" .. You can talk to your future self (this is not bad..)

I love programming, b'coz I love "Problem Solving". If there is a problem, there is a solution (no, there are solution. No !!! I meant an elegant solution.)

Today I visited some sites... mathematical sites.

It proves pyathoras theorem, with geometry.

* I know why area of an decahedran = 3R^2
* I know 1^3 + 2^3 + 3^3 + ... +n^3 = (1+2+3...+n)^2
* I know 1+3+5+... (n-terms) = n^2

I can prove that(thats is what Mathematicians are Proud of). Now, I know "I know nothing in mathematics" really!!!

Coming to Programming...

I didn't learn anything today, in programming.

To start with programming. I'm going to learn programming...

* The Pragmatic Programmer:From Journeyman to Master
* The Practice of Programming

* I'm going to solve some problems in ACM Contest (1/(week/month))

* I have to learn all the e-books I have collected (hmm... Let me see).

Today is Friday !!! Weekend !!!

* Lunch @ Kebabish
* Chruch
* PG Wodehouse/TerryBrooks
* Chat with my MiniMe (Already I'm Mini, MiniMe for Me...)

Thursday, August 10, 2006

Duplicating Knowledge in Programs

Many a times I wanted to write a Programmer's Blog. Now, I'm going to do it.

Duplicating Knowledge in Programs

I dont know how to write this ... I'm a Programmer not a writer...

If you have a knowledge in a program, put in one place. Dont replicate it.

for example -

if you have a condition check or a small piece of calc. , put in inside a function. The benefit is one access point of change. C++ dont that using Classes.

I will try to write this blog in professional way...

Tuesday, November 29, 2005

After a long time

After a longtime, I want to write my blog. Let me see, how I'm going to to it.

Thursday, June 30, 2005

Chat with a Friend

... after a long time, 2day I meet my friend Stalin. We had long chat. Dinner in Merry Brown.

... Nostalgia..., Data Structures (Longest Increasing Sub-sequence)

LISS - Still I'm not able to solve the problem

What Reemus ? What the HELL are you doing ?

You are gone idiot !!! your mind has gone blank !!!

Time Management !~!~!

Have to manage my time ... Plan ... Prioritize ... Action ... Result ... Feedback ... Learning ... Plan

Tuesday, June 28, 2005

Software Design

A key point while designing software is identifing the real-world objects which can be represented in computers. Object Oriented Programming Languages provide ways to map the real-object to software-object (soft-objects).

Dragons

I love Dragons. Dragons are magical creatures.

They appear in

* Hobbit
* Eragon
* Harry Potter