Skip to content

Theoretical concepts to keep in mind

How to Study:

The Feynman Learning Technique

Step 1: Pretend to teach it to a child

Take out a blank sheet of paper. At the top, write the subject you want to master. Now write out everything you know about the subject as if you were teaching it to a child or a rubber duck sitting on your desk.

Writing helps you think because it gives you nowhere to hide.

Step 2: Identify gaps in your explanation

Identifying gaps in your knowledge—where you forget something important, aren’t able to explain it, or simply have trouble thinking of how variables interact—is a critical part of the learning process.

Step 3. Organize and simplify

Now you have a set of hand-crafted notes containing a simple explanation. Organize them into a narrative that you can tell from beginning to end. Read it out loud. If the explanation sounds confusing at any point, go back to Step 2. Keep iterating.

Step 4: Transmit (optional)
Reddit, Twitter, personal blog, friend…


1. Start with a clear vision and set achievable goals.
What do you want to achieve in the next year? Once you know your big goal, break it down into smaller, more manageable goals. This will make it easier to stay on track and motivated.

2. Make a schedule.
Block out time in your calendar each day to work on your goals. This will help you stay organized and avoid procrastination.

3. Find an accountability partner or a supportive community.
Having someone to check in with and support you on your journey can make a big difference. Join a community of people who are also working towards their goals, or find a mentor who can guide you along the way.

4. Zoom out.
Consistency is about the long-term. Don't get discouraged if you have a bad day or week. Just keep going and focus on making progress over time.

5. Remember, Rome wasn't built in a day.
It takes time and effort to create lasting change. Don't expect to achieve your goals overnight. Just keep taking those small, consistent steps, and you'll eventually reach your destination.

Here are some additional tips:

- Make it easy to start. The less friction there is to getting started, the more likely you are to stick with it. Set up your environment so that you can start working on your goals as soon as possible.

- Focus on one thing at a time. It's better to do one thing well than to do ten things poorly. Choose one goal to focus on for the next 30-90 days, and give it your all.

- Track your progress. Keeping track of your progress can help you stay motivated and on track. Use a habit tracker or a journal to log your daily progress.

- Celebrate your wins. No matter how small your wins may seem, take the time to celebrate them. This will help you stay positive and motivated.

DISTRIBUTED SYSTEMS

Understanding Distributed Systems

MICROSERVICES

https://martinfowler.com/bliki/MicroservicePremium.html
The microservices approach is all about handling a complex system, but in order to do so the approach introduces its own set of complexities. When you use microservices you have to work on automated deployment, monitoring, dealing with failure, eventual consistency, and other factors that a distributed system introduces.

So my primary guideline would be don't even consider microservices unless you have a system that's too complex to manage as a monolith. The majority of software systems should be built as a single monolithic application. Do pay attention to good modularity within that monolith, but don't try to separate it into separate services.

https://paulhammant.com/2011/11/29/cookie-cutter-scaling/

Domain Driven Design

DEVOPS

https://docs.google.com/document/d/132QAiAPUa0QFtbg9uE7AufM0FcrqH6azR5ztHy3GEKo/edit?usp=sharing

The devops handbook
the phoenix project
Learning path modern devops
Devops: software architect’s perspective

  1. Principles of flow:
  2. Make work visible. Kanban boards.
  3. Limit work in process.
    better action would be to find out what is causing the delay and help fix that problem
  4. Reduce batch size. Lean Thinking: Banish Waste and Create Wealth in Your Corporation
  5. strive to reduce the number of handoffs
  6. continually identify our system’s constraints and improve its work capacity.
    1. create environments on demand
    2. automate our deployments
    3. automate our tests
    4. loosely-coupled architecture so that changes can be made safely and with more autonomy
  7. ELIMINATE HARDSHIPS AND WASTE IN THE VALUE STREAM

Phoenix project
Cap 7
Theory of constraints: qualsiasi miglioramento tra i bottleneck è inutile, dopo non accelera il flusso produttivo, generando starving, prima aumenta la coda per la bottleneck.
Il throughput della bottleneck determina la schedulazione del lavoro.

Three ways of devops:

  1. Accelera flusso tra development e operations
  2. Amplifica e velocizza cicli di feedback
  3. Cultura sperimentale e del fallimento

INTEGRATION

Enterprise Integration Patterns
Distributed Systems

BLOCKCHAIN AND CRYPTOCURRENCIES

Mastering bitcoin 2
Mastering blockchain

DESIGN PATTERNS

OBJECT ORIENTED

http://www.cs.rmit.edu.au/online/blackboard/chapter/05/documents/contribute/chapter/02/design-fundamentals.html

Cohesion
.

Coupling
The measure of dependence of a class on others is known as coupling. The general aim of object programming is to have objects as independent as practically possible.
Bad: classes depending on global vars
Good: coupling through interfaces

Encapsulation
Encapsulation is one of the most basic foundations of good object-oriented design. It is the process of developing an object that is fully self-contained - all the information needed to represent the object is a property of that object. Not only is the information encapsulated in the object, but it is also hidden from outside view - any external objects that wish to communicate with the object must use the object's programming interface.
Information hiding relates to controlling the accessibility of an object's properties. A well-defined object will have its items available to other objects only on a "need to know basis". Generally speaking, any item that is intended for public use is declared as such, and any internal items are protected from outside access.

DATA STRUCTURES

Big-O Cheat Sheet

HASHMAP / map / hash table
HASH-SET(K) implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.

HASH-MAP(K,V)
compute a hash of a value to generate a KEY to populate a dictionary where we will access throuh it in a constant time
the hash functions are not perfect so it is always possible to have collisions in the value domain
to reduce this probability we can increase the dimension

more efficient than search trees or any other table lookup structure. For this reason, they are widely used in many kinds of computer software, particularly for associative arrays, database indexing, caches, and sets.

the function should provide a uniform distribution of hash values. A non-uniform distribution increases the number of collisions and the cost of resolving them  
              avg worse  
search        O1   On  
insert/delete O1   On

Array VS ARRAY List VS Linked List
https://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist-in-java?rq=1
The principal benefit of a linked list over a conventional array is that the list elements can be easily inserted or removed without reallocation or reorganization of the entire structure because the data items need not be stored contiguously in memory or on disk, while restructuring an array at run-time is a much more expensive operation.
Linked lists allow insertion and removal of nodes at any point in the list, and allow doing so with a constant number of operations by keeping the link previous to the link being added or removed in memory during list traversal.

ArrayList with ArrayDeque are preferable in much more use-cases than LinkedList. If you're not sure — just start with ArrayList.

LinkedList and ArrayList are two different implementations of the List interface. LinkedList implements it with a doubly-linked list. ArrayList implements it with a dynamically re-sizing array.

As with standard linked list and array operations, the various methods will have different algorithmic runtimes.

For LinkedList\<E>
get(int index) is O(n) (with n/4 steps on average)
add(E element) is O(1)
add(int index, E element) is O(n) (with n/4 steps on average), but O(1) when index = 0 ← Main benefit of LinkedList\<E>
remove(int index) is O(n) (with n/4 steps on average)
Iterator.remove() is O(1). \<--- main benefit of LinkedList\<E>
ListIterator.add(E element) is O(1) This is one of the main benefits of LinkedList\<E>

Note: Many of the operations need n/4 steps on average, constant number of steps in the best case (e.g. index = 0), and n/2 steps in worst case (middle of list)

For ArrayList\<E>
get(int index) is O(1) \<--- main benefit of ArrayList\<E>
add(E element) is O(1) amortized, but O(n) worst-case since the array must be resized and copied
add(int index, E element) is O(n) (with n/2 steps on average)
remove(int index) is O(n) (with n/2 steps on average)
Iterator.remove() is O(n) (with n/2 steps on average)
ListIterator.add(E element) is O(n) (with n/2 steps on average)

E-R model
an abstract data model, that defines a data or information structure which can be implemented in a database, typically a relational database. A relationship captures how entities are related to one another. Relationships can be thought of as verbs

QUEUE - FIFO

STACK - LIFO

SORTING

QUICKSORT

 on average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case, it makes O(n2)   
 divides a large array into two smaller sub-arrays: the low elements and the high elements. Quicksort can then recursively sort the sub-arrays.

The steps are:  
Pick an element, called a pivot, from the array.  
Partitioning: reorder the array so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.  
Recursively apply the above steps to the sub-array of elements with smaller values and separately to the sub-array of elements with greater values.

the leftmost element of the partition would often be chosen as the pivot element. Unfortunately, this causes worst-case behavior on already sorted arrays, which is a rather common use-case. The problem was easily solved by choosing either a random index for the pivot

NETWORKING

SSH

private key authentication works cryptographically secured connection between two parties, authenticating each side to the other, and passing commands and output back and forth.

Symmetrical encryption is a type of encryption where one key can be used to encrypt messages to the opposite party, and also to decrypt the messages received from the other participant. This means that anyone who holds the key can encrypt and decrypt messages to anyone else holding the key. (AES)

Asymmetrical encryption is different from symmetrical encryption in that to send data in a single direction, two associated keys are needed. One of these keys is known as the private key, while the other is called the public key.

The public key can be freely shared with any party. It is associated with its paired key, but the private key cannot be derived from the public key. The mathematical relationship between the public key and the private key allows the public key to encrypt messages that can only be decrypted by the private key. This is a one-way ability, meaning that the public key has no ability to decrypt the messages it writes, nor can it decrypt anything the private key may send it.

The private key should be kept entirely secret and should never be shared with another party. This is a key requirement for the public key paradigm to work. The private key is the only component capable of decrypting messages that were encrypted using the associated public key. By virtue of this fact, any entity capable decrypting these messages has demonstrated that they are in control of the private key.

JAVA

WEB SERVICES

http://cabibbo.inf.uniroma3.it/asw-2014-2015/pdf/asw860-servizi-middleware.pdf
Un servizio nello stile REST operazioni riferite a una collection URI
GET – restituisce tutti gli elementi della collezione
PUT – sostituisce la collezione con un’altra collezione
POST – crea un nuovo elemento della collezione e gli assegna una nuova URI
DELETE – cancella l’intera collezione
operazioni riferite a un’element URI
GET – restituisce uno specifico elemento della collezione
PUT – crea un nuovo elemento della collezione, oppure lo aggiorna
POST – considera l’elemento della collezione come un’altra collezione, e ne aggiunge un elemento
DELETE – cancella l’elemento della collezione

CLOUD

https://12factor.net

  1. Codebase: unique if it’s not a distributed system
  2. Dependencies: isolated locally, explicitly declared in a manifest. Don’t use global wide dep.
  3. Config: should be per environment. Out of the code, better in Env Var, read at runtime
  4. Backing services acceded as internal resources
  5. Build separated by runs
  6. Processes: stateless and shared-nothing architecture (none of the nodes share disk or memory → no single point of contention → allows self healing).
    Storing is allowed only in backing services.
  7. Port Binding: the app expose the service through a port and does not rely on runtime webserver injection
  8. Concurrency: processes should follow the Unix daemon model, they should be of different types to have different workloads associated
  9. Disposability: fast startup and graceful shutdown in any moment. After a SIGTERM a job should return to the original poll. (reentrancy)
  10. Dev-Prod parity: continuous deployment. Env. should be as similar as possible. Backing services should be the same.
  11. LOGS: should be written in the standard output. The environment should then collect them in one or more files.
  12. Admin: Twelve-factor strongly favors languages which provide a REPL shell out of the box, and which make it easy to run one-off scripts. In a local deploy, developers invoke one-off admin processes by a direct shell command inside the app’s checkout directory.

MULTI THREADING AND CONCURRENCY

- Master Go Programming With These Concurrency Patterns (in 40 minutes)