I suck at math, And Khan Academy saved me.

As i’m progressing in the Machine Learning course by Andrew Ng, I felt lost with the math of the Regression. Not after too long on google i decided to watch the Regression videos on Khan Academy. It took me less than two hours to put me back on track :-).

Thank to the guy “I couldn’t find your name one the website” who made the regression videos, i owe you a lot :-),

Thanks Mr. Khan, Mr. Ng and thanks to everyone contributing to the free MOOC movement.

RIP Aaron Swartz

AaronSwartzPIPA

He is one of the most inspirational people “to me, at least”, I’m not exaggerating if i said he’s been a superhero of mine since I knew him in early 2012 when the whole SOPA thing came up, He started  http://demandprogress.org, I contacted him, asking how to support the campaign from Egypt.

Aaron has committed suicide yesterday after falling into depression for waiting a 35 years jail sentence for believing knowledge should be free and available for everybody.

I’m not a good writer so I’m referring you to @ggreenwald’s article at the Guardian to know more about him and what he did to the Internet community.

The inspiring heroism of Aaron Swartz

TIL Command and Query Responsibility Segregation

When most people talk about CQRS they are really speaking about applying the CQRS pattern to the object that represents the service boundary of the application. Consider the following pseudo-code service definition.

CustomerService


void MakeCustomerPreferred(CustomerId)
 Customer GetCustomer(CustomerId)
 CustomerSet GetCustomersWithName(Name)
 CustomerSet GetPreferredCustomers()
 void ChangeCustomerLocale(CustomerId, NewLocale)
 void CreateCustomer(Customer)
 void EditCustomerDetails(CustomerDetails)

Applying CQRS on this would result in two services

CustomerWriteService


void MakeCustomerPreferred(CustomerId)
 void ChangeCustomerLocale(CustomerId, NewLocale)
 void CreateCustomer(Customer)
 void EditCustomerDetails(CustomerDetails)

CustomerReadService


Customer GetCustomer(CustomerId)
 CustomerSet GetCustomersWithName(Name)
 CustomerSet GetPreferredCustomers()

That is it. That is the entirety of the CQRS pattern. There is nothing more to it than that… Doesn’t seem nearly as interesting when we explain it this way does it? This separation however enables us to do many interesting things architecturally, the largest is that it forces a break of the mental retardation that because the two use the same data they should also use the same data model.

Source, Wikipeida