Learning : How do we learn new words ?

Hello Everyone , Its been a while I made a blog post as I have been busy , but while I am preparing for GRE , I have noticed a lot of patterns as well as problems in learning new words .

I want to enumerate some of my observations below

1. Conceptual Models : Conceptual model is again borrowed from the design world , for more information you can read my previous blog post regarding (,d.c2I )

But We have conceptual models for every words that know in our brain , consider a simple word like apple , Try saying it one time , do you see a visual image ( conceptual model ) in your brain ? This basically provides evidence to my first observation . However , there are a lots of words for which we have hard time retrieving a good mental image , or perhaps we cant associate them with images .

2. We Strive for patterns in world , and words are no different , We naturally try to relate new words with ones we are already quite familiar with , a simple and obvious example is that , when my brain already knows the word audacity quite well and I havnt used or heard the word audacious , I know by my natural instincts that it is related to audacity.

3. STM ( Short Term Memory ) is quite limited and not be stressed too much , We have a capacity of introducing new words to our brain everyday which varies from a person to person , but we shouldnt put too much load on STM.
storing words on LTM ( Long Term Memory ) requires quite effort , but once done is quite effective , This can be achieved if you learn a word thoroughly , see various examples associated with it , learn it to use in different contexts.

4. It can be very useful to associate few chars of word to something we can extract meaning of the word from ,
for example I came across this word bucolic, which I havnt heard but when I read its meaning which is relating to country , village , rural area. I somehow associated bu prefix of word with the word buffalo , and It basically created an association of the following kind

bucolic -> buffalo -> rural area, village

So we see that these forced mappings can actually be very useful .

There is one more design concept hidden in this observation , Knowledge from the word and knowledge from the head .
Knowledge in head requires a lot of effort in extraction , whereas knowledge from external world is relatively easy to identify , but both have advantages and limitations , the ideal case is carefully making use of them both , in the above example we identify bu prefix from external world and then retrieve buffalo from brain and then further retrieve true meaning of the word .

5. We learn by actually doing things ( Constructionism ) : This might seem very simple , but is very powerful , if you write words manually youself by your hand , you are in a way using this principle, It can be used in a more powerful way by creating a virtual simulating environment , lets say you are learning a new word , if we can design a system that can give us a task/activity to do and in that activity we mimic the true meaning of the newly seen word , and then we use it in a sentence . Its hard to actually find a suitable example here , I might update this post soon

6. We learn more quickly and can have a better conceptual models if we can associate images that capture the meaning of the word partially or completely .
Maybe if we are learning the word swiftly , and we are provided with a speedy car moving on a street , we can get a better meaning.

7. Frequent rehearsal of newly learnt words is very essential to save the words permanently in LTM.

Naive String Matching algo implementation in c++

using namespace std;

#include <iostream>
#include <conio.h>
#include <stdio.h>

string T = "this is awesome";
string M = "is";

int match() {
int flag=0;

for(int i=0; i <T.length() -M.length(); i++) {
if (T[i] == M[0]) {
flag =1;
for (int j=1; j<M.length(); j++) {

if(T[(i+j)] == M[j]) {

// flag=0;

else {
cout << "failure";
return -1;

cout << "success , value of shift is : " << i ;

if (flag == 0) {

cout << "failure";


int main() {

return 0;

< }

Rod Cutting Problem Implementation in c++


I am practicing Dynamic Programming problems from my textbook Cormen ,I though it would be a great idea to post its implementation code in c++ .

If anyone needs any help regarding it shoot me an email or leave a comment .

Few Observations :

Translating psudocode from cormen to c++ is not that simple , you might underestimate the complexity involved in for example I had a lot of trouble with array indexes, But I finally solved it by drawing a rough recursion tree on my white board .

I was earlier scared looking at the nested and complex structure of bottom – up algo , memoized version seemed so straightforward but when I drew recursion tree and coded the solution , the intuition behind the code became perfectly clear

I have observed that dynamic programming implementation from scratch involves quite a few steps (4 typically ) , So to make things simple and self motivation I have created a 4 items checklist , everytime Isolve any dynamic problem I make sure I follow checklist of items / steps in chronological order .

4 steps are obviously

  1. Optimal Structure
  2.  Recursive Implementation
  3. Memoized / Bottom up Version
  4. Complete Solution

Here is the code :


Ionic2 Review

Ionic2 Review

So its been about 2-3 Months of me playing with ionic2 . I want to write some of my thoughts about the framework.

Why I like Ionic framework ?

Tons of UI Components based on commonly used design patterns which are optimized for target platforms.

Vibrant and Active community ( I really like the ionic forums, and Slack channel)

Ionic Resource Generator is simply awesome


Where I faced most of the problems ?

So I realized that when we are working with Open source software like Ionic , Angular there are a lot of dependencies , And What might be working right now may not be working in the future after you update something . I was really frustrated while updating ionic CLI or ionic-angular component because there were really weird errors that I encountered . I always feel really scared while updating stuff on an important project .

Thats probably because I am not doing any unit testing , Well I have never done unit testing before , I plan to do it but there isnt any good official doc regarding the same , besides even angular unit testing docs are not updated.


Testing on real device is really important and I spend a lot of time with that , Even though I had wild problems with adb , It stopped detecting my phone for some reason , So now I manually build the apk and transfer via USB.

I actually found this to be more convenient than ionic run android .


When creating production version of an ionic app, There are like 4-5 steps which are very important , and I often make some stupid mistake in one of the steps .


Elearning : Introduction to “Toolkit Concept”

Elearning : Introduction to “Toolkit Concept”

Please note this will be a very long post with many examples and references , and I will keep updating it .

So I want to talk about a new idea, That I discovered after realizing the limitations of books , Lets Start this by first defining what a book is xp

I know you are wondering why do we need a definition of a book? Well I just want to emphasize on few key points and limtations .

Books are Published content that authors write to communicate with their target audience which are based on certain assumptions .

That assumptions word is very important here

  1. Book Doesnt Teach How to “use/read” a book ? Why is this important? Well it might sounds very simple and stupid but every book has certain basic assumptions that they expect from readers/users. Imagine Starting over  with chapter 5 from a algebra book , which has a chapter on quadratic eqations, while most books will mention the dependencies of that chapter some badly designed books wont .

2.   Books assume readers have good memories (especially maths textbooks) , Open up a chapter on Trigonometry or Properties of Triangles and just look at the “Ocean” of formulas they expect us to “remember” , While some brave souls might remember all of them , most of like me dont .

3. Books Dont check if what you have “read” you have actually practiced that when did you practice that, Books Dont provide you powerful analytics .

4. Books dont help you realize patterns and dependencies among different entities.

5. Books dont give you the intuition that is very human friendly (they are very static ) , It can be the case that ever since the book was published or even before it was published there were other intuitive explanations of a particular concept that were way simpler that what book provided but the author never cared to research over those before writing the book.

Even though we have a lot of limitations Books still remain one of the widely used resource to “learn” concepts . They are cheap and widely available.


Alrightly , In this post I want to specifically magnify upon the 4th point and why I have realized its so important (atleast from mathematical perspective ) .

Imagine how hard it is to just rote learn all those hard formulae, but thats we are trained to do , I reject this way of learning things because of the following reasons :

  1. Not every student/person has a capacity to store a large number of formulae in his/her LTM (Long Term Memory)
  2. Jumping directly to formulae can eliminate intuition and reasoning
  3. Formulae are limited and most often we need to chain them in order to solve a problem , remembering the exact sequence is also challenging.

So How Can we solve this problem ? I introduce ” The Toolkit ” , It’s a very simple abstract model which you can think of as “virtual memory” .

Toolkit enumerates all the rules (not necessarily formulae ) that a student has learnt . But here is the catch , It also includes “Patterns” that books fail to realize.  Each Rule/ Pattern has a Index number , Title , Description , Date Added Fields

We can either make use of a diary to make our “Toolkit” or just use any text editing software like notepad, Thats what toolkit model really is , Its just text .

Why are patterns so useful , Lets take up an example in properties of triangles unit.

My Book has 3 formulae :

sin(A) = area / 2bc , and similarily quivalent versions for sin(B) and sin(C)

Now , I am sure most of you must have simply “learnt” it and stored it in your LTM ( Thats what we assume ) . Imagine that after 1 year you changed your major and started learning “Cooking” , and around that time I give you a problem that heavily depends on these formulae , will you able to solve it ?

Here is How Our Toolkit Model solves this problem , We first proof this to convince our selves and notice that the proof takes less than 1 minute . We realize a pattern/rule of the following form :

SNo. 1

Description :  For relating Sine < A > to area of triangle => Consider general triangle => Draw perpendicular => Apply law of sines in the subtriangle .

Thats It.  You know whats nice ? The first time you did this on your own , It provided you confidence that It is not that hard and simpler that directly rote learning the formula. Try the same problem after 1 year referring to your “Toolkit” I am sure you will solve it.

Some things related to Patterns/Rules :

The “Toolkit” doesnt enforce any constraints on writing style/form of productions , they depend on the person who is going to “use” his/her “toolkit”

The entries/rules in your toolkit cannot be proved but are based on your “assumptions” , Thats why you should only add entries when you first make sure you are confident deriving them. The whole point of introducing toolkit is to remove burden of memorizing “everything” .

The Toolkit is dynamic in nature and you must expand entries , You can even generalize rules/patterns.

Here is one practical use case of toolkit concept , So I was solving some problems, I noticed that many problems were strikingly similar in nature, and there was a “pattern” in them that seemed recursive, I couldnt find any specific formulae to solve these kinds of problems that were simple .

So Here is What I did I solved the first problem , It gave me the confidence , I continued solving similar problems and identified the pattern , You can watch these in this videos ->

Then I added another entry in my toolkit , which looks something like this :

SNo. 2

Description: Relating Sides of a triangle with tan/cot of half angle -> Law of Sines ->Trig Transformations -> Result 🙂

Just look at the above entry that I added in my toolkit , It is so personal , It is so informal , and It gives me the confidence to solve any problem of similar nature. In fact I solved more problems by applying rule 2 of my toolkit and reached out at a correct solutions.

User have to firmly believe in the entries added in their toolkit .It may rarely occur that you added a slightly misleading / incorrect rule , You must first challenge the toolkit , If you fail , you must modify/remove your entry.

The feature image of this post shows one example of my toolkit entry

Toolkit Model Directly Endorses / Appreciates The wonderful concept of Constructionism because Users must solve the problems on their own , Get the confidence , Identify Patterns and Store that very confidence permanently in form of Toolkit entry .


Perfect-Todo just got featured on Ionic Showcase :)

Perfect-Todo just got featured on Ionic Showcase :)

Just got an email few minutes ago that my app perfect-todo got accepted (wow what a perfect birthday gift )

If you dont know about it, Its a simple experiment with ionic2 , What I have learned over a month or two browsing ionic2 docs and forums . It requires min android version 5.1 though

Some of the things I have learned so far :

1. Being a part of the “community” is important . This is something you will realize soon . Take a look at Leading Bloggers who blog about ionic like Josh Morony ,They are actively involved in community (like forums , slack channel etc).

2. Testing is important from the very beginning , Testing should be done on real device because sometimes stuff produces unexpected results.

3. Ionic Forums are really helpful , they have an ocean of knowledge(Also the slack channel)

4. If you learn something , Share your knowledge , Not only you would feel confident , you are indirectly contributing to the community.

5. Never Underestimate simple things , because even simple things can go wrong.

How I Used HCD on the simplest app ?

Okay let me tell you a secret that you probably already know, Its called the Human Centered Design . It says understand the needs of people first and then develop technologies. It started with a long observation that even a simple thing like a notepad could be very “powerful” and “useful” to me. and I didnt have it all the time. So I decided to start with a todo app. Soon When I created the FWP(First Working Prototype) I noticed my early user in their “natural” environment , Noticing their difficulties which led to rapid changing. Yes The app still lacks a lot of features but I now understand that when you create a software you dont just create it in one go , Its a continual process just like designing.


I have made a decision , I am going to open source it so other beginners can have a look , take inspiration and provide me inspiration. The Open Source ecosystem is awesome , it just takes a little while to adjust 🙂

Here you go

My future plans :

Invest in UI
Integrate Push Notifications
Make it more user friendly
Integrate Reminders

Using JSONP Service in angular2

Using JSONP Service in angular2

Hi Guys , It seems this is my first angular2 post, even though I am using it in my ionic2 but I dont think it should matter since everything is the same .

So here is the plan : I want to use github api ( you can also use jsonplaceholder api ) and fetch json object of all jobs using http.

But There is a problem , Since browsers have same origin policy , meaning that http request from a server to a different server are not possible , so we cannot use HTTP , Instead we can use JSONP, I never used JSONP API Before , but its actually pretty simple

So Let’s Get started!

Create a blank new angular2 project

Create a new provider called data ( This will serve as our data service )

So few comments regarding the code below , First we will import required “stuff” In this case JSONP,Response,Headers etc. Also notice we are importing Observables because thats how we are going to handle our async responses.
You can find the basic boilerplate code at angular2 website.

Now notice that I have created a new member variable url of the class and in its original url value I have appended callback=JSON_CALLBACK , well this is because we are dealing with JSONP and when we get our response back our JSONP_CALLBACK will be fired.

We are also making use of rxjs map and catch operator. map will basically map our chunk of data to json . So thats it for the service , nothing very groundbreaking here

import { Http,Jsonp, Response } from '@angular/http';
import { Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';

import 'rxjs/add/observable/throw';

import {Injectable} from '@angular/core';

export class DataService {

private url :any ="";

constructor(private jsonp:Jsonp){


getdata() : Observable {

return this.jsonp.get(this.url)


private extractData(res: Response) {
let body = res.json();

console.log('extracting data');

return body ;


private handleError (error: any) {
// In a real world app, we might use a remote logging infrastructure
// We'd also dig deeper into the error to get a better message
let errMsg = (error.message) ? error.message :
error.status ? `${error.status} - ${error.statusText}` : 'Server error';
console.error('err' + errMsg); // log to console instead
return Observable.throw(errMsg);


Okay So now lets “consume” our data service , So Either can use your current component, or create a new one and import the Service.

So my homepage.ts file looks something like this :

import {DataService} from '../../providers/data/data';

templateUrl: 'build/pages/home/home.html',

export class HomePage {

public data:any;
private errorMessage:any;

constructor(private dataService:DataService) {

data => = data,
error => this.errorMessage = error);



So since we now have the data we can actually use this by interpolation and using the json pipe for clarity .


{{data | json }}

That should be it , You should see the resulting json 🙂