Jul 27, 2017

RePost: Working from home

https://blog.trello.com/tips-for-tackling-remote-work-challenges?utm_source=newsletter&utm_campaign=july2017_newsletter2&utm_medium=email

https://blog.trello.com/organize-workspace-maximum-productivity

SQL, .NET, C#, ASP.NET refreshing memory

Just refreshing my mind :

(1) ICollection vs (2) IEnumerable - (2) - iterating !    (1) modifying

(1)Class vs (2) Structure - (2) Value type, lives on Stack, can't assign NULL, no need for (De)Constructor

Can't access non-parameter-less base constructor -> constructor chaining in derived class required

OOP :
  •  Abstraction - 
The abstract person is defined by the operations that can be performed on it, and the information we can get from it and give to it. 
An abstraction denotes the essential characteristics of an object that distinguish it from all
other kinds of object
  • Inheritance -
Each of these library’s assets should be represented by its own
class definition.  Without inheritance though, each class must
independently implement the characteristics that are common to all
loanable assets.
  • Polymorphism
Overriding + overloading
  • Encapsulation

switch - NO FALLTHROUGH;  break is mandatory OR empty case

value types - struct(1) & enumarations(2) - (1) numbers + bool + char

reference types - class, interface, delegate + built in - object, dynamic, string

ASP.NET Page life cycle

InitComplete - changes to ViewState will be persisted since controls start tracking them

Load

Control events

LoadComplete - all controls finished loading

PreRender - the very last moment before rendering affect controls

Unload


SQL

Normalization forms:
1NF - each field must contain smallest atomic information 

  • Full Name = "Bob Dylan" - wrong !
  • Name = "Bob", LastName = "Dylan"
each row must contain same number of fields

2NF - Only relevant for composite keys!
1NF must be implemented.
Non-key field should not describe or relate to field contained in composite key. New table should be created.
  • PK(EmployeeId + DepartmentID) + DepartmentAddress   - 2NF violated ! New table Department must be created and related.

3NF - Non-key fields must not describe fields not part of PK. Each non-key field must relate only to PK.
2NF must be implemented

  • PK(EmployeeId) + Name + DepartmentCity + DepartmentAddress
  • Calculated fields !   Price + Quantity + Amount(relates to price and quantity !)