Dependency injection

Enable a class to be generic by making it disown the responsibility of defining an object in itself. Make other classes define the input object for it.

If you want to change the input object , you dont need to change the original class with dependency injection.

dependency injection

A spring container contains a set of objects or beans.

Essence of Rich Dad Poor Dad

Identify what are assets and what are liabilities.

Increase asset column.

Don’t work for money, make money work for you.

Rich buy luxuries late.

Rich guys income statement and balance sheet.


How corporations help rich with taxes.


Corporations earn, spend and then pay taxes on the rest.

Individuals earn, get taxed and then spend.

Listing some assets:

  1. Businesses that do not require my presence.
  2. Stocks – Fortunes are made in new stock issues(new stocks are tax-free).
  3. Bonds.
  4. Income generating real estate.
  5. Notes (IOUs).
  6. Royalties from intellectual property.

Dimensions of financial literacy:

  1. Accounting:
  2. Investing:
  3. Understanding markets:
  4. The law:

Random number Generator

The ideal random number generator is impossible. So, we usually have a pseudo-random generator which will be seeded by a number initially and then calculated subsequent random numbers using elements like current system time etc. For debugging stochastic programs, we have random.seed() in python which will generate the same sequence of random numbers again and again as we seed it with the same number.

Hash tables


  1. Random access.
  2. Fixed size.

Linked list:

  1. Not Random access.
  2. Not fixed size.

What we need is something that has random access and not fixed size.

Solution: Hash table


Uses a hash function to determine where to store a given key value.

Same hash function is used later to search for where a given key value is stored.


If the hash output of two keys point to the same location.

Solution: each location has a linked list of values.

Jeff Hawkins On intelligence

There are some basic principles by which the neo-cortex operates in Brain. These principles are responsible for all different kinds of cognition like vision, audition, touch etc.

The Brain is not a computing machine, it doesn’t compute the movement of the arm when it needs to move its arm. It just remembers the pattern it has acquired in its experience.

The Brain is very sparse in the sense that only very few cells are active at any point of time.

Sensory data invokes models we have previously developed about or related to them.

It’s not a computational problem, it’s a memory problem. Its a complex memory system involving hierarchies, sparse distributions etc.

If you want to capture intelligence, you don’t necessarily have to implement other activities of Brain like emotions(amygdala)

Creativity is pretty much analogy of patterns.