Lodash, Async & Testem

Summary

  1. Polymorphism
  2. typed languages
  3. Dynamic languages
  4. variadic function
  5. Function signature
  6. JVM bytecode
  7. Lodash (better than underscore )
  8. Async
  9. Testem

Session

######1 Polymorphism

AirCrewMentor gave a little introduction about the Polymorphism code where we can bassically summarize that the same function name can be used in several functions and depending on what arguments and types you pass to the function, one version or other is activated.


######2 typed languages

In 2000 Microsoft created C# (C sharp) to compete with Java. In this languages the every variable or agument got its type defined, so if you are passing a wrong type of argument to a function or variable, the program wouldn’t compile, so this is really good to avoid bugs but it got no flexibility.

var totalPrice = 0;
var int totalPrice = 0;
totalPrice = “foo”;
// never compile

######3 Dynamic languages

Luckly for us, the dynamic languages like JavaScript are winning the battle but this means the number of bugs that can appear are higher.


######4 variadic function

This point I didn’t get it right, we’ll come over it again. @AirCrewMentor


######5 Function signature

The function can be differenced by the arguments it accepts, this is also known as function signature.

function calculateMortgage(deposit, monthlyIncome, interest, term, expenses)
// this would be the signature:
(deposit, monthlyIncome, interest, term, expenses)
// here we would have the same function with the Javascript type defined
// (javascript init type? @AirCrewMentor) that is used at the
//["Demandware gate community"](http://codingconnect.demandware.com)
function calculateMortgage(int deposit, int monthlyIncome,
double interest, int term, int expenses)
// this would be the signature:
(int deposit, int monthlyIncome, double interest, int term, int expenses)

“Demandware gate community”


Homework.

I have to rewrite the function formatMoney with lodash to accept argument and have a default value

formatMoney(123, options)
formatMoney(number, options)

Learn a real library that I would be using with real code projects.

If I have time left, I should learn how to test the UI that is harder than the mocha test we’ve been doing.

thank’s for your time @AirCrewMentor this was a really condensed session. 🙂
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s