Monday, November 27, 2006

Knuth's Lecture

I was going through Knuth's lectures in which he solves 5 problems that have not yet been solved.

First problem:
Monotonic squares: Find all positive integers n such that the decimal digits of n and
n2 are both in nondecreasing order from left to right

While solving this problem, Anil Gangolli pointed out
(6(m)7)2=4(m+1)8(m+1)9

where a(m) is series of a digits (something like Kleene's operator)
eg 3(5) is 33333.

Here is proof for above statement using mathematical induction:

Given: (6(m)7)2=4(m+1)8(m+1)9
TO prove:(6(m+1)7)2=4(m+2)8(m+1)9

Take lhs:(6(m+1)7)2

=(6(m)7+60(m+1))2

so i am now squaring
applying (a+b)2=a2+b2+2ab

= (6(m)7)2 + (60(m+1))2 + 2.6(m)7.60(m+1)

= 4(m+1)8(m)9 + 360(2m+2) +80(m)40(m+1)

Now this can be simplified as

4(m) 4 8(m) 9
8 0(m) 4 0(m) 0
36 0(m) 0 0(m) 0
Adding three equations gives us

44 4(m) 8 8(m) 9

Final equation is

4(m+2) 8(m+1) 9

Hence proved

Tuesday, November 21, 2006

Creating Custom Installer (msi)

I am writing this article since I found very less article on custom installer.

First create a dll (or an exe). Add an Installer class (UrInstaller.cs) into it.

It should generally contains :

  1. Install method
  2. Uninstall method

You can have an additional method that validates parameters (and if they are null, then assign default values).

In Install method, you can write custom action for setup. You can use the parameters by Context.Parameters["TARGETDIR"].

You cannot use any standard i/o methods eg. MessageBox or Console.WriteLine. But you can throw an exception and it will be caught by installer and displayed in message box.

Install method contains base.Install(stateSaver); by default.

Similarly you can write uninstall method for the removing any files you have created using custom install method.

If you face any error while using your custom Uninstall method, use Windows Installer Cleanup Utility (http://support.microsoft.com/kb/290301).

Then to the same solution, add a setup project. Add above project as primary project output.

Then in custom actions, Install or Uninstall > Application Folder > Primary output from above project.

Then right click > Property Window > Custom Action Data >
/someparameter=”[someparameter]” /targetdir=”[targetdir]/”

Note: targetdir is inbuilt parameter. Therefore extra backslash required.

You can access someparameters as Context.Parameters["someparameter"]

You can also add file or assembly and it will be placed in “targetdir”.

For installing the application, use
msiexec /i UrSetup.msi someparameter="abc"

For uninstalling the application, use
msiexec /x UrSetup.msi

Since, here parameters are not provided (this applies for Control Panel Uninstallation), you need to maintain an uninstall.log file which stores the parameters while install method.

Friday, November 17, 2006

Metaphysical Coding

Recently, when I was working on SQL Server 2005 project, I created a job and scheduled it as recurring using GUI interface. Then I tried to reverse engineer the script (Create Script > Change the Script parameters manually).

It showed that begindate as current date but to my suprise, last date was 99991231, ie 31st December, 9999. (What a work around !! - Why not assign End date to a predefined macro or value ie something similar to infinity)

So, SQL Server guys predict that world would end on 31st December, 9999 (Armageddon - There are people who think other wise Refer Wikipedia).

Come on, I always knew there was something spiritual about Microsoft products. They defy all the rules on Computer Science. :-)

When a tester enters my room wearing a big smile, most common replies are "It was working on my machine" or probably "It was working that day" :-) .

Well I say, "You know since it uses Microsoft products, you can start it only on auspicious day and that too by chanting OM (holy word that Hindus use)"

Ok jokes apart, I never supported Microsoft products until I was hired by a Microsoft based company and was placed on .NET and SQL Server projects.

Thats when I realized that Microsoft somehow allows you to create most of the things and that too easily, but still as a computer science engineer I still find things are not in place.

For eg. I was experimenting SQL Server Integration Services using C# code. I wanted use Microsoft.SqlServer.Dts.Runtime namespace. But it is not imported by default for Console application. So I tried to find dll that I should reference (I presumed it should have been Microsoft.SqlServer.Dts.dll or with similar name).

I was visited MSDN for help (See MSDN). I didnt find a thing on which DLL to reference. By the way, if Microsoft claims that they have improved their Visual Studio standards by n%, they have detoriated their MSDN standards by same n%. It is one of the most pathetic documentation for a good product like .NET.

I personally think all MSDN documentor should read Java Doc before even starting to write a line. Any time while coding in Java, most of my problems are solved using Java Doc. This is not in case of C#.

Anyways, I did found out the dll after 1/2 hour of trial and error search. It was Microsoft.SqlServer.ManagedDts.dll

Come on guys, we are not robots to find such references among huge list of dll. (Why Managed ? I understand the difference between managed and unmanaged code. Even if it is important to use Managed substring, please reflect that in your documentation).

Disclaimer: This blog is simply meant for humour and is not meant to offend anyone. This doesnot reflect any views of my company or my collegues. It is purely my personal opinion.

Friday, September 29, 2006

HTTP Get Response using Command prompt

Do telnet to the website. Use port 80 (HTTP port) . I recommend this for two reasons -
1. Generally most sites dont keep their telnet port (23) open.
2. If it is open you require login-password to login to the server

For newbies, open command prompt (Start>Run>cmd)
c:\> telnet www.google.co.in 80

Then u will get a blank screen (i.e there is a process waiting for request from the browser (therefore no login screen - shell without prompt) )

Enter either -

GET / HTTP/1.1
Host: www.google.co.in

or

GET http://www.google.co.in HTTP/1.1
Host: www.google.co.in

(Refer http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html for more details)

You get output as (Notice the HTTP Response header) -

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Set-Cookie: PREF=ID=768f0ec24c16778c:TM=1159508943:LM=1159508943:S=teTiYAhOOObRT
J0p; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.co.in
Server: GWS/2.1
Transfer-Encoding: chunked
Date: Fri, 29 Sep 2006 05:49:03 GMT

cf1
<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859
-1"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif}

.h{font-size:20px}
.q{color:#00c}
--></style>
<script>
<!--
function sf(){document.f.
q.focus();}
// -->
</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc
vlink=#551a8b alink=#ff0000 onLoad=sf() topmargin=3 marginheight=3><center><tab
le border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=right nowrap><f
ont size=-1><a href="/url?sa=p&pref=ig&amp;amp;pval=3&q=http://www.google.co.in/ig%3Fhl%
3Den&sig=__2FXiR2zyqvKLKznVZcY0dUpbPo8=">Personalized Home</a> | <a hr
ef="https://www.google.com/accounts/Login?continue=http://www.google.co.in/&hl=e
n">Sign in</a></font></td></tr><tr height=4><td><img alt="" width=1 height=1></t
d></tr></table><table cellpadding=0 cellspacing=0 border=0><tr><td align=right v
align=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td><td v
align=bottom><img src=images/hp1.gif width=50 height=78 alt=""></td><td valign=b
ottom><img src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=
h align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif widt
h=50 height=32 alt=""></td><td valign=top class=h><font color=#6f6f6f style=font
-size:16px><b>India</b></font></td></tr></table><br>
<form action=/search name=f>
<table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web<
/b> <a class=q href="/imghp?hl=en&ie=UTF-8&tab=wi">Images
</a> <a class=q href="http://groups.google.co.in/grphp?hl
=en&ie=UTF-8&tab=wg">Groups</a> <a class=q href="http://n
ews.google.co.in/nwshp?hl=en&ie=UTF-8&tab=wn">News</a> <b
><a href="/intl/en/options/" class=q >more »</a></b></font></td></tr>
</table><table cellspacing=0 cellpadding=0><tr><td width=25%> </td><td alig
n=center><input type=hidden name=hl value=en><input type=hidden name=ie value="I
SO-8859-1"><input maxlength=2048 size=55 name=q value="" title="Google Search"><
br><input type=submit value="Google Search" name=btnG><input type=submit value="
I'm Feeling Lucky" name=btnI></td><td valign=top nowrap width=25%><font size=-2>
<a href=/advanced_search?hl=en>Advanced Search</a><br> <a
href=/preferences?hl=en>Preferences</a><br> <a href=/language_tools?
hl=en>Language Tools</a></font></td></tr><tr><td colspan=3 align=center><font si
ze=-1>Search: <input id=all type=radio name=meta value="" checked><label for=all
> the web </label><input id=cty type=radio name=meta value="cr=countryIN" ><labe
l for=cty> pages from India </label></font></td></tr></table></form><br><font si
ze=-1>Google.co.in offered in: <a href="http://www.google.co.in/hi">Hindi</a> <
a href="http://www.google.co.in/bn">Bengali</a> <a href="http://www.google.co.i
n/te">Telugu</a> <a href="http://www.google.co.in/mr">Marathi</a> <a href="htt
p://www.google.co.in/ta">Tamil</a> </font><br><br><br><font size=-1><a href="/in
tl/en/ads/">Advertising Programs</a> - <a href=/intl/en/about.html>About Go
ogle</a> - <a href=/intl/en/jobs/>We're Hiring</a> - <a href=http://www.google.c
om/ncr>Go to Google.com</a></font><p><font size=-2>©2006 Google</font></p><
/center></body></html>

Above example shows a simple trick that you can use to get the http response header. You can get post headers also on similar lines.

Tuesday, September 05, 2006

Bug I noticed when I minimised 2 powerpoint slides

This happens only when you have 2 or more ppts minimised. However, it works for other programs (which implies machine was not hanged)







There is another bug in Visual Studio

Tuesday, August 29, 2006

Overview of C

C program is collection of translation unit combined through linking. A translation unit is also called as source file, which is collection of declarations.

Declarations are of two types:

  1. Block Declaration
  2. Function

  1. Block Declaration
    1. Specifier

i. Storage Class Specifier

It tells the compiler how to store the variables. Types of Storage Class Specifiers are

i. Extern

Extern is used to specify that object is stored with external linkage else where in program.

Generally extern declarations are put into header files that are just included.

Scope – Global, Lifetime – Lifetime of the Application.

ii. Static

Lifetime – Lifetime of the Application.

Static variables with block or function scope are called as static local variables.

Static variables with file scope are called as static global variables (ie internal linkage).

iii. Auto

All local variables are by default “auto”.

iv. Register

It tells the compiler that access to the object should be made as fast as possible.

If CPU registers are not full and object is small, then they are stored in CPU registers.

Register specifier can only be applied to local variables and formal parameters (and not to global variables).

Also, you cannot use ‘&’ operator, since they can be stored in CPU registers (which is not addressable like memory).

ii. Typedef

You can define new name for existing data type by using ‘typedef’ keyword.

Eg. typedef float BALANCE;

BALANCE a1,a2;

iii. Type Specifier

· Simple type Specifier

a. Four Basic Datatype

char, int, float, double.

Size – char is 1 byte while size of int is word length of execution environment. (ie for DOS – 16 bit, Win98- 32 bit).

void is either explicitly declared as return type of function or is used to create generic pointers.

C does not supports Boolean data type but it supports the concept through integer type.

Nonzero – true

Zero – false.

b. Modifiers

signed, unsigned, long, short.

· Class / Enum Specifier

a. Class i.e. struct, union

Semicolon separated list

b. Enum

Comma separated list.

· CV Qualifier

a. const

It tells the compiler that value cannot be changed by the programmer ie can be used only as rvalue.

In addition to basic data types, arrays, structures, unions can also be defined as const.

Pointer & const (3 situations):

1. Pointer constant

int* const ptr

2. Object constant

const int* ptr

3. Both constant

const int* const ptr

b. volatile

It tells the compiler that value of the variables can be changed in ways that is not explicitly specified by the programmer. (eg. variable can hold system clock, or port. So it tells compiler not to optimize certain expression).

Situation where both const and volatile can be used:

Value can be changed by external conditions only eg. value of the port.

const volatile char* port = (const volatile char*)0x30;

    1. Initializer-Declarator List

Can be comma separated eg. int a,b,c;

It is divide into two parts:

i. Declarator

· Identifier

Name of identifier has to follow four restrictions:

i. First character should be character or underscore. Remaining characters can be character or underscore or digit.

ii. Identifier in C is case sensitive

iii. Name of identifier cannot be a keyword.

iv. Length of identifier name:

a. Internal identifier – 63 characters

b. External identifier – 31 characters.

There are 32 keywords in C (auto, extern, static, register; char, int, float, double, void; signed, unsigned, long, short; typedef, struct, union, enum; const, volatile; case, default, if, else, switch, for, while, do, return, goto, break, continue, sizeof).

New context dependent keyword are introduced by typedef, struct, union, enum.

· Pointer Operator Declarator

Similar to Qualifier.

v. Initializer

It can be initializer list or assignment expression.

  1. Function
    1. Function Declaration

Contains only Header (which contains formal parameters)

int fn(char , int *, char []);

    1. Function Definition

i. Header

ii. Body

Is sequence of statements ie. Compont Statement.

Other types of statement:

· Labeled Statement

identifier : statement

Used for switch-

a. case const_expression : statement

b. default : statement

· Selection Statement

a. Two Way Selection

i. if, Nested else if, if else if ladder

ii. ? alternative

b. Multiway Selection

switch

(Generally has break after each case).

· Iteration statement

a. for

b. while

c. do while

· Jump Statement

a. return expression;

b. goto identifier;

c. break;

d. continue;

Difference between break and continue:

Break forces termination of loop and program control and resumes at next statement following the loop

Continue forces first statement of iteration to take place skipping all statements in between.

· Expression Statement

An expression is turned into a statement by placing a semicolon after it.

It completes any pending side effects and discards the expression value.

Null expression statement:

a; 3; ;

No value, no side effect and no compiler error

Expression:

It always reduces to single value.

It consist of :

· Variables

Variable is a named location in memory that is used to hold a value that can be modified by the program.

Information for compiler:

a. Type Qualifier (const, volatile)

It tells compiler how variables can be accessed or modified.

b. Storage Class Specifier (static, auto, register, extern)

It tells compiler how to store variables.

· Operators

a. Assignment

Variable = expression;

Multiple assignment possible (a=b=c=5;)

Compound assignment:

a+=b; x%=4;

b. Arithmetic

+ - * / % ++ --

% yields remainder of integer division (therefore cannot be used with float).

c. Relational & Logical

6 relational operator < > <= >= == !=

3 logical operator &&(AND) ||(OR) !(NOT)

d. Ternary

exp1 ? exp2 : exp3

exp1 is evaluated. If exp1 is true, exp2 is evaluated else exp2 is evaluated and that becomes the value of expression

e. Bitwise

f. Other operator

Sizeof, pointer( * , &), array ( [] ), comma, ( . ->), Parenthesis


Precedence of Operator:

Parenthesis Highest

Unary (Postfix, Prefix)

Binary (A, S, R, B, L)

Ternary

Assignment

Comma Lowest

Associativity

Only unary prefix, assignment and ternary are right associative. All other are left associative.


Other important points:

C Linkage:

  1. Internal Linkage – file scope objects declared static
  2. External Linkage – function and global variables
  3. No Linkage – Local variables (therefore are known only in block).

Declaration declares name and type of the object. Definition causes the storage to be allocated to the objects.

Generally, declaration of the object is also their definition. But if we precede the declaration with extern, we declare the variable without defining it. Therefore, a variable can have multiple declarations (using extern) but only one definition.

Thursday, August 24, 2006

Email Spoofing using SQL Server 2005

Download free SMTP server from http://www.qksoft.com/qk-smtp-server/
Run it. In settings give your IP address and use some random port no (on which some service in not running).

First start SQL Server 2005.

Under Object Explorer, Open Management tab. Right Click on Database Mail > Configure Database Mail.Then Create a user profile.

Eg. Profile name -- Someperson
someemail@gmail.com
In Server name, give ur IP address and port no is one at which QK SMTP is running.
Use Anonymous authentication.

Then in new SQL Query window, run following query:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Someperson',
@recipients = 'somepersonwhouwanttosend@somesite.com',
@body = 'Email spoof',
@subject = 'Email spoof';
GO

Disclaimer -- Above information is intended only for educational purpose and author is not responsible for any damage that results by using it.

Saturday, July 29, 2006

Vedic Maths - Squares n Cubes

1. Squares:

1.1. Squares ending in 5:

Separate >> a | 5

Answer : a(a+1) | 25

Eg 352 >> 3 | 5 >> (3 X 4) | 25 >>1225

Sly, 452 >> 4 | 5 >> 20|25 >> 2025

1.2. General case:

Use Cross-multiply method of multiplication explained in previous post.

2. Cubes: (2 digit no >> ab3)

{a + b)3 = a3 + 3a2b + 3ab2 + b3

= a3 + a3(b/a)1 + a3(b/a)2 + a3(b/a)3 ……… (1)

+ 2 a2b + 2 ab2 …….. (2)

Modus Operandi:

i. Split no as a | b

ii. Find a3 and ratio b/a

iii. From this we get eq (1) by

We get next no by multiplying current no by the ratio b/a.

Left most no is a3.

iv. We get eq (2) by multiplying middle two terms of eq (1) by 2

v. Add only corresponding terms.

Eg. 273

Here a = 2, b = 3

Therefore, a3 = 8 , b/a = 7/2 (=3.5)

Therefore eq (1) = 8 | 28 | 98 | 343

(8 X 3.5 = 28, 28 X 3.5 = 98, 98 X 3.5 = 343)

eq (2) = | 56 | 196 |

(28 X 2 = 56, 98 X 2 = 196)

Sum = 8 | 84 | 294 | 343

Since only 1 digit can be inside on bar, carry forward

8 | 84 | 294 | 343

8 | 84 | 328 | 3

8 | 116 | 8 | 3

19 | 6 | 8 | 3

Therefore, 273 = 19683

Thursday, July 27, 2006

Vedic Arithmetic Part 2: Multiplication

1. Multiplier is 9, 99, 999, 9999, ….

17 X 9 = 153, 17 X 999 = 16983

Here, we treat 17 as m (multiplicand) and 9, 999,…. (multiplier) as n

1.1. no of digits of n >= no of digits of m

Answer : (m – 1) | (n - LHS)

eg. 17 X 999

Answer: (17 - 1) | (999 - LHS) >> 16|(999 - 16) >>> 16983

Sly 17 X 99 >> 16|(99-16) >> 1683

1.2. else

Therefore we split m into p|q where no of digits of q = no of 9’s in n

Answer : (m - 1 - p) | (n + 1 - q)

Eg. 177 X 99

Split >> 1 | 77

Answer: (177 – 1 - 1) | (99 + 1 - 77) >> 175|23 >> 17523

Sly, 243 X 9 >> 24 | 3 >> (243-1-24)|(9+1-3) >> 218|7 >>2187

2. Multiplier = ca, multiplicand = cb & a+b = 10, 100, 1000, ….

ie total of last digits is 10, 100, 1000, … & whose prev part is exactly same

Answer: c(c+1) | ab

Eg. 237 X 233

Here c = 23, a = 7, b = 3

Answer: 23 X 24 | 7 X 3 >> 552 | 21 >>55221

Sly, 54 X 56 >> 30|24>>3024

3. Multiplicands & multiplier are near base

Find 2 small multipliers($) with signs

3.1. Base is 10, 100, 1000, ….

Answer: (base+ sum of 2 small multipliers) | (product of 2 small multipliers : Note base)

For, 97 X 105,

Base is 100, and $ are -3, +5

Answer: (100 + (-3+5) ) | -15 >> 102 | -15

To remove –ve, take carry :: 101 | (100 -15) >> 101|85 >> 10185

Sly, 102 X 103 >> 105|06 (Since base is 100, therefore 2 digits after |)

3.2. Else (working base (wb))

Multiply or divide only LHS of answer

(if wb is greater,multiply else divide)

I always prefer to keep wb greater.

Consider 31 X 33

Here wb is 30 (& base is 10), $ are +1, +3

Therefore, (30+1+3) | 3 >> 34 | 3

Since wb greater, multiply by 30/10 = 3

Answer: 34X3 | 3 >> 102 | 3 >> 1023

4. General case : Cross Multiplication

4.1. 2 digit multiplication

ab X cd >>> ac | ad+bc | bd

Eg. 23 X 12 >> 2 | 4+3 | 6 >> 276

4.2. 3 digit multiplication

abc X def >>> ad | ae+bd | af+dc+be | bf+ce | cf

Eg. 103 X 143 >> 1 | 4 | 6 | 12 | 9 >> 14729 (1 carried forward)

Monday, July 17, 2006

Overview of Mathematics

Click Below Mindmap to see overview of Mathematics. Most of the details are from Wikipedia.


Above mindmap classifies Maths into four field:
1. Quantity
Here we identify what number is. ie. we are dealing with real axis
This branch of Maths has to do with calculation. eg. If I buy a cake worth of Rs. 45 and give you Rs 50 note , you will have to give me Rs. 5 back .

2. Structure
This branch deals with relation between number. eg. If x=1, y=3; then x+y=4
(Assume we have 2 or more nos on same real axis interacting with each other)

3. Space
Here we bring into another axis. This branch deals with measuring land. Therefore, here basic unit is a point which is ordered pair of 2 nos.

4. Change
This relates with function that shows change.


(Please see Wikipedia for more detail)

If you want clickable imagemap-html of above mindmap, please leave your email id in comments.

Thursday, July 13, 2006

Vedic Arithmetic Part 1

Sometimes in exam after a long calculation, we worry if our answer is right or wrong. Also, going back and calculating again is waste of time. Here is faster way to verify your answer (of addition, subtraction and multiplication).

1. Digital Root

How to evaluate it --

a. Adding digits
eg. 2351068
Digital root is 2+3+5+1+0+6+8 = 25, 2+5=7

b. Casting Out nines
eg. 2351068
Cast out 3,6 ; 1,8 ; 0 (since their sum is 9) (Here 9 ~ 0)
Therefore digital root is 2+5 = 7

Use :
Used to verify addition , Subtraction and multiplication

Rule: Digital root is preserved during above operation.

eg:

Addition
981723 + 54281 = 1036004
Digital root::
of 981723 is 3
of 54281 is 2
of 1036004 is 5 (which is 3+2, therefore our answer is correct)


Multiplication
213 X 121 = 25773
Digital root ::
of 213 is 6
of 121 is 4
of 25773 is 6

6X4=24 (whose digital root is 2+4=6 , which is same as that of 25773, therefore our answer is correct)

Sunday, July 09, 2006

My Curriculum Vitae in form of Mindmap

Click on image

Mind Map -- Yoga

The eight limbs of yoga :
Yama - ethical restraints
Niyama - ethical observances
Asana - postures
Pranayama - breath and prana control.
Pratyahara - control of the senses by the withdrawal of prana from them
Dharana - single-point concentration
Dhyana - unbroken concentration (meditation)
Samadhi - superconsciousness

Mindmap
(Click on image)





Please see Wikipedia for more detail.

Saturday, July 08, 2006

Remembering Periodic Table

During my 12th, I was fascinated by Periodic Table. I spent 3 days to remember it and came up with this mnemonic (It is partly created by my IIT Sir).

You need to know Hindi to remember it. (Sorry for my non-Hindi speaking friends - u have to come up with your own mnemonic).

Also it has been 3 years that I have not revised it yet, so I don't remember La-Ac series. I should have wrote it down :-(


(Click on Image)
Periodic table


Columnwise --

Hritik aur LiNa KaRtab dekhene Circus me Fhire.
(H Li Na K Rb Cs Fr)

Beta Mange Car Scooter Baap Roaye.
(Be Mg Ca Sr Ba Ra)

Scooter Yamaha Lagao Ac.
(Sc Y La Ac)

Tiwari Zara Half Rose-falooda Lana.
(Ti Zr Hf Rf)

Valia Nimboo ne Tapad kHaya.
(V Nb Ta Ha)

Crow....Ulta M by Sugrive.
(Cr Mo Sg)

Mange Tc Railwe ticket uNse.
(Mn Tc Re Ns)

FeRuOs -- Harsh (Chemistry class -- what is iron called ???)
(Fe Ru Os Hs)

(Then Niketan went on expedition to find Copper)
In village CoRhIri (corhiri),
(Co Rh Ir)

Niketan ne Ped pe bethe Popat se pucha ???
(Ni Pd Pt )

He said Copper(Cu) Aage Aur hai.
(Cu Ag Au)

But there he only got Zinc Cds Heather graham (known for her bold scenes).
(Zn Cd Hg)

Bola Alladin Gana Inka Talo.
(B Al Ga In Tl)

Captain Siraj Gela Sanki Pabal (respelling of pagal).
(C Si Ge Sn Pb)

Nana Patekar Agnisakshi Se bana Billionaire.
(N P As Sb Bi)

O Style Se phanta Tee-shirt Polo.
(O S Se Te Po)

For Cluch and Break Install At&T. (v famous company - At&T Bell Labs)
(F Cl Br I At)

Helen Ne Arbaaz aur Kareena ka Xe-ray Roentgen(Rn) se karaya.
(He Ne Ar Kr Xe Rn)

Actually there is idiotic story associated with each line or groups of line
eg -

A son ask Dad for Car and Scooter. After hearing this Dad starts to cry. Not only this Son insist for putting AC in Yamaha Scooter :-) On this Dad ask his servant Tiwari (he was my Physics prof during college -No offense intended) to bring half Rosefalooda (since he could not afford full due to ever increasing demands of his son) . Finally Dad gets really frustrated and slaps his son (Nimboo Valia - My friend Harsh Valia, boisterous boy. His pet name is Iboo but we used to tease him as Nimboo)

Village teacher had an unusual way of teaching his student. He used to teach alphabet using names. eg A for Atmaram,.. So when he reaches alphabet O, he writes W and ask "What is this?" He didnot expect any answer since he had not taught that letter. But one person Sugrive answers "Its Mangalram but is tied upside down" :-)

So on ....

This was Mnemonic for Columns.
To remember sequence of columns (ie rows) :

Lisa and Beny Both Came to Nine instead Of Five
(Li Be B C N O F)
Sodium(Na) and Magnesium(Mg) All Sick People Sat Closely)
(Na Mg Al Si P S Cl)
KC college of Arts and Science took Tiwari Valia who was Crying for Money and Fame to teach Conic aur Zn
(K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn)


My point here is almost anything can be learnt it we have childish attitude (by this I mean Inquisitiveness, Simplicity, Playfulness,...).


Thats all folks !!!

Learning Process for Students

We can classify entire learning process into 3 parts:

1. I/P (from Books or Classes to Brain)
2. Remembering things
3. O/P (from Mindmap to appropriate format)


1. I/P (from Books or Classes to Brain)
This part deals with how to read n understand. Since most of subjects we learn are deductive, we are trained to study every thing logically or vertically.

If you are a research student, I would suggest :
1. Prepare Knowledge book/base (using techniques described in part 2).
2. Read Edward DeBono's Lateral Thinking and use techniques mentioned in that book to think creatively. Yes, Creative works are not always accidental but they can be developed if assumptions are challenged.

Remember, It takes an unusual mind to analyze the obvious. Eg, I consider Einstein to be great not because he could solve complex equations (infact in that period, there were Mathematicians and Physicist capable of solving more complex equations). I think he is great because he challenged the obvious assumption of time being non-relative wrt frame of reference.

2. Remembering things
Use following techniques:
1. Mindmap
Use Association(with real life example), Exaggeration, Sex (or probably your GF name/attribute - It difficult to not remember your spouse, and if you have associated an idea/concept with her, I think you will never forget that concept), colors, images/sketches etc... (Read Tony Buzan's book for more detail).
But most important fact is arrangement of ideas in Mindmap (It should reflect your thinking process).
2. Mnemonics
(Eg. Remembering 2nd/3rd row of Periodic table::
Lisa and Beny Both Came to Nine instead Of Five
Sodium(Na) and Magnesium(Mg) All Sick People Sat Closely)
(Neglect Ne and Ar)
IMP:: Simplicity of above two concept is its power.

3. O/P (from Mindmap to appropriate format)
Remember not to take Lisa as Lithium (Sounds funny!! But if above process was fed in Computers, Machine Learning Algorithms would do that). They are two seperate entities in real world but are associated to provide us an aid to remember them.
If you are communicating your ideas to audience/person, you might consider reading NLP books (Frankly I have not studied it in detail. I saw a NLP book in my friend's mom's Library and I read few pages while I was waiting). It suggest that your communication is successful if at the end of communication, mind map in your head is similar to mindmap in receiver's head. Therefore we use PPT during presentation (Actually, most ppts are hierarchical minmaps).
Note, I have not discussed concentration and relaxation techniques. (Pranayam, Meditation are useful) (See Megaliving by Robin Sharma)

I have assumed that most of the readers of this post are Students (especially from Rationalist/Deductive branch of studies eg. Physics, Maths, Biology, CS etc... and not Arts or Literature students).