Category: Tech Learnings
Just a random collection of my tech learning notes
-
Java Memory Management
All local variables/primitives go on the stack. Every thread has its own stack. Heap Heap stores all Objects. So String, Integer etc are created on this. The references to these are given to the Stack. JAVA is Pass by Value. Every primitive variable created on stack is separate for each function and has a different…
-
Java 8
Lambda Expressions They are nameless functions. Use To enable functional programming Write concise and readable code Use API effectively Parallel programming How to write them No return type No modifier No name Public String lengthOfString(String s) { return s.length; } (s) -> {s.length;} s -> s.length; Functional Interface An Interface that contains just one abstract…
-
Angular 2+
Html – JS Dev vs Angular Dev Earlier we would keep these separate. We will manage the DOM via JS. So on click of a button, we will invoke a particular JS –which might validate form inputs. Angular works in component based approach, we think in terms of components. So page is divided into components…
-
Design Principles & Design patterns
SOLID Design Principles Single Responsibility Pattern – class has a single responsibility like Class Sort won’t have functions to add or delete from the list. ex Microservices Open – Closed Principle – Open for extension and closed for modification. It tells you to write your code so that you will be able to add new…