Azure multi-region deployments

The customers demand the highest performance in availability and their expectation is that the application will run even if even a data center may be down.

We can deploy publish the application into a second region that can be even on another continent.

Azure Traffic Manager will route clients to the one of the region where we deployed. It can be configured:

  • to route the clients to the lowest latency region for that specific customer
  • use geographic routing, for example, a customer from Europe will use a data center from Europe.
  • add a standby region –  route clients to the standby region where it is something wrong with the primary region.

Geo-replication for our data – Azure SQL and Document DB replicate data around the world. For example, you can have a primary database in the first region and a secondary database in the second region. All the operations committed to the primary database will be replicated (asynchronously) to the second database.

Aristotle’s philosophy

  • What makes people happy? – the table of virtues and vices
  • What are friends for?
    • friends – the interest in pleasure and the opportunity of the moment
    • friends as strategic acquintances
    • true friend –  someone not like you but about whom you care as much as you care about yourself.
  • How can ideas cut through in a busy world?
    • soothe people’s fears
    • see the emotional part of the issue

How to raise mentally tough children

  • Don’t condone a victim mentality – it is OK that sometimes bad things happen, that people won’t treat you fairly – he can choose to try again
  • Don’t prevent them to make mistakes – to make mistakes is OK, you have to learn him how to bounce back – How do we deal with that mistake? How can we do better next time? Learn from mistakes
  • Let them assume responsibility

Web application + App Service

When an Web application or an API needs to be published to Azure => App Service – Platform as a Service – no need to take care of the virtual machine or the OS. The deployments will be nearly instantaneous because all the infrastructure is already in the place so we can publish directly from the source code.

An App Service plan can be used to scale vertically to add/remove cores or to scale horizontally to add/remove instances. Or use auto-scale.

Use diagnostic tools, metrics tools, debugging tools (even a remote debug session and step through code running inside an App Service) instead of connecting remotely and inspect the environment.

Deployment slots associated with an app service (Staging, QA, Production).

Storage account (BLOB Storage) – store log and diagnostic files, user uploads, application static content (images, videos, script and CSS files) – this way the content will be pushed into Azure Content Delivery Network

Database – Azure SQL (relational model) or Document DB (storing documents) or both. The details (patches, logs)  are handled by Azure (database as a service).

To talk about – Azure Resource Group – encapsulates all these resources (App Service, App Service Plan, Storage Account, Azure SQL) – a logical container for resources – grouping all the application resources into a single group will make it easier to manage the Azure services.

 

Clean code #2 Naming

We are doing a lot of naming so we should do it well.
The name should tell why it exists, what it does and how it is used.

Some rules for a good naming:

  • use intention revealing names
  • avoid disinformation (using inconsistent spelling is also disinformation)
  • make meangful distinction
  • use pronounceable names (programming is a social activity)
  • use searcheable names
  • no hungarian notation
  • no member prefixes
  • pick one word per concept
  • don’t use funny names

Clarity is the king – professional programmers understand that, smart programmers may not.

School of life #1

How to be an entrepreneur – a different route

  • an accurate insight into the causes of the human unhappiness – become an expert in the things that make life difficult to people.

How to start a business – another path, a business of love

  • a majority of businesses don’t love what they do (pragmatic business).
  • Business of love (a total commitment to excellence, a focus on the long term, a meaning of life). Offer the world something you love a little more intensely than most people do.

 

La robotisation

Un robot et la robotisation, c’est quoi?

Le mot robot vient des langues slaves et signifie travail.

Un robot est une machine conçue pour accomplir automatiquement des tâches imitant ou reproduisant des actions humaines. Le robot peut accomplir des tâches simples mieux que ce que ferait un être humain.  Le robot peut aussi accomplir des tâches dangereuses, répétitives ou impossibles à effectuer par les humains.

La robotisation ou se robotiser signifie d’équiper un lieu, en particulier un espace industriel ou commercial avec des robots. Une autre definition pour la robotisation est le remplacement de l’homme par une machine entièrement automatique.

Les avantages de la robotisation ou pourquoi se robotiser?

Le plus grand bénéfice de la robotisation est la rentabilité. Un robot est capable de travailler plus sans dégradation des performances, donc il va augmenter le volume de production.

Les coûts de main d’oeuvre sont aussi réduits et l’entreprise gagne en compétitivité.

Un autre bénéfice est l’optimisation constante du niveau de qualité et une gestion des tâches plus agile.

La robotisation, une menace pour l’emploi?

A première vue s’accompagne d’une destruction d’emplois. Les emplois les moins créatifs et les plus répétitifs sont les plus exposés à l’automatisation. Mais la robotisation ne s’arrête pas là: les voitures sans chauffeur, les drones effectuant des livraisons ou les robots-infirmiers feront disparaître la moitié des emplois des secteurs des transports et de la santé 2030.

Il est donc clair que la robotisation détruit des emplois mais elle en crée d’autres et il y a encore beaucoup de métiers qui n’ont pas encore inventés. Il ne faut pas aussi perdre de vue qu’il faudra toujours des humains pour créer des robots, ainsi que pour les entretenir. 40% des jeunes diplômés sont directement embauchés dans l’industrie.

Les défenseurs de la robotisation affirment que le robot n’est plus destiné à remplacer l’homme mais à l’assister. L’objectif sera de travailler en symbiose. Les atouts des humains sont une meilleure créativité, une capacité à l’adaptation sans limite et une plus grande autonomie.

La conclusion est complexe mais il ne fait pas avoir peur de la transformation. L’évolution de la société a toujours fait que l’emploie change.

Qu’est-ce qu’il nous reste à faire?

Aujourd’hui on ne peut plus envisager une société dans laquelle les robots ne seraient pas intégrés dans notre quotidien. Donc, on doit commencer à définir les règles d’une robotique plus responsable, au service de l’humain et à réaliser que notre employabilité et la capacité à trouver notre place sur le marché du travail de demain est une responsabilité individuelle.

On ne doit pas détester le progrès technologique mais l’accompagner.

Clean code #1

In the days of Scrum and agile the focus is on quickly bringing product to market.

In software 80% of what to we is called  maintenance – the act of repair. Such care and ongoing refinement never come to an end.

I read doing major softer chunks from scratch every seven years or so

Name a variable using the same care with which you name the first born child

Be honest to the code, to your colleagues about the state of your code and be with yourself about your code.

Learning to write clean code is hard work.

Code will never end because code represents the details of the requirements and specifying requirements in such details a machine can execute is called programming. There always will be code.

Arrogant peer code reviewer

Sometimes, code review can become an adversarial activity so you must think in terms of your goals. Code review is supposed to help with quality code and sharing knowledge. Some people like to mentor and teach and others wield. This is what you can do when the feedback is poorly delivered:

  • If the feedback was helpful go ahead and improve yourself.
  • If the feedback doesn’t bring any improvement ask the reviewer to behave differently but don’t involve management directly about these interpersonal differences. Indirectly, ask other code reviewers, work on a different project, transfer.
  • Demonstrate him he is wrong by citing industry expert quotes, bringing books, websites, case studies.

Being « passionate » is not an excuse to treat you poorly, writing software should be fun.

Sapiens

Big Bang – the moment when the matter, energy time and space came together 13.5 billion years ago.

Humans evolved in East Africa about 2.5 million years ago from an earlier genus of apes.

Our closest living relatives include chimpanzees, gorillas and orang-utans.

From about 2 million years ago until around 10.000 years ago the worlds was home to several human species.

Use of fire – 800.000 years ago, it changed the human biology.

The rise of Home sapiens, the last human species, – most of scientists agree that by 150.000 years ago East Africa was populated by Sapiens that looked just like us.

The interbreeding theory and the Replacement Theory.

The biological relatedness of Sapiens, Neanderthals and Denisovans: they were not completely different species.

There is a possibility that Home Sapiens drove the other human species to extinction because they were more proficient hunters and gatherers thanks to better technology  and superior social skills. Also, for Sapiens they were too familiar to ignore but too different to tolerate.

Home Sapiens conquered the world thanks above all to the unique language.