Most Secure way to store Passwords is to not Store them at all

Yeah! Do not store them at el! easy! Lets look at some of the common ways of storing the passwords. Hashing Hashes are insecure. Don’t believe me check https://hashes.org. Pre computed hashes in a rainbow table that has map to the actual password. A lil bit secure way is to create a random salt string and combine that to hash the password. But in this case you have to store the salt along with the hashed password.

My Take on Monads in Scala

Recently I had to explain what a monad is to one of friend. When explaining it I realized that its probably worth writing it as post for my future self or for anyone who asks me about it. So, what makes a Monad? Bluently put a parameterized trait or a class with 2 functions unit and flatMap. trait Monade[A] { def flatMap[B](f: A => Monade[B]): Monade[B] } def unit[A](x: A): Monade[A] A Monad is an object that wraps another object in scala.

What you need to know about Slick

##Intro Slick is not an ORM. Its a FRM(Functional-Relational Mapping). Features ##Concepts Schema You can describe schema’s in 2 ways, by using code generator or by manually coding them in tables.scala file. If you already have an existing database or taking a lazy route of using something like mysql workbench to create the databases then use the method 1 code generator. If its a greenfield project go with coding them manually

Short note on MVVM

What goes where in MVVM? Model: Entities(CoreData Model, RealmDB Model) Persistence Network calls(Webservice) Maybe. View(Presentation): UI Push Data updates Event triggers ViewModel(Behavior): View state validation value transformation actions

iOS View Controller Life Cycle

Creation MVC are usually instantiated from Storyboards —- awakeFromNib() // this method is sent to all objects that come out of a storyboard. happens before outlets are set. happens before outlets are set. Outlet-setting ViewDidLoad() override func viewDidLoad(){ super.viewDidLoad() // Important to call this } NOTE: Update your UI from your model as all the outlets are set at this stage. be careful that your geometry like what your bounds are not set.

Swift 2

Value types in swift are: structs (incl. arrays and dictionaries) enumerations basic data types (boolean, integer, float, etc.) Implicit Swift doesn’t define any implicit cast between data types, even if they are conceptually almost identical (like UInt and Int). To fix the error, rather than casting, an explicit conversion is required. In the sample code, all expression operands must be converted to a common same type, which in this case is Double:

Scala Terms

Casting foo.asInstanceOf[Bar] is a type cast, which is primarily a runtime operation. It says that the compiler should be coerced into believing that foo is a Bar. This may result in an error (a ClassCastException) if and when foo is evaluated to be something other than a Bar at runtime. foo:Bar is a type ascription, which is entirely a compile-time operation. This is giving the compiler assistance in understanding the meaning of your code, without forcing it to believe anything that could possibly be untrue; no runtime failures can result from the use of type ascriptions.

Swift 2 changes

####Structs are value types classes are reference types print() Array: eg: var arr:Array<Int> = [] or var arr:[Int] = [] for mixed values you have to explicitly mention: var mixed:[Any] = [1, "str", false] var mixed:[AnyObject] = [1, "str"] mixed.append(2, atIndex:3)mixed.insert(2, atIndex:3) mixed.remoteAtIndex(2, atIndex:3) .. all the way upto … all the way upto and including ..< Array Slicing: Array enumerate() to get the index ####Dictionary 2 ways of declaring: eg:

Swift Operator

! implies “this might trap,” while ? indicates “this might be nil.”

Mysql workbench - connecting to MSSQL

Follow this link https://dev.mysql.com/doc/workbench/en/wb-migration-database-mssql.html you have to install iODBC separately as MAC doesn’t seem to port it anymore. http://www.iodbc.org/ The user has to have spl permission as shown in this video, 2:17 http://mysqlworkbench.org/2013/08/video-tutorial-setup-a-restricted-sql-server-account-for-migrations-with-mysql-workbench/ http://stackoverflow.com/questions/17038716/not-retrieving-schema-list-from-source-when-migrating-from-mssql-to-mysql-using