Skip to content

Commit

Permalink
Added images that were copy and pasted into GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Oct 7, 2018
1 parent a999857 commit 264a648
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Repo for the 'Generation Z Developer' book content that can be bought from https://leanpub.com/generation-z

[![image](https://user-images.githubusercontent.com/656739/36372107-f0fd05c0-155b-11e8-938b-ed6c7a67b7dc.png)](https://leanpub.com/generation-z)
[![](images/36372107-f0fd05c0-155b-11e8-938b-ed6c7a67b7dc.png)](https://leanpub.com/generation-z)

14 changes: 7 additions & 7 deletions content/2.mvp-for-gen-z-dev/content/dot-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ digraph G {

Which looks like this when rendered (try this online at https://dreampuf.github.io/GraphvizOnline/)

![](https://user-images.githubusercontent.com/656739/46248785-ed561880-c415-11e8-8f07-6f5c83b4b03b.png)
![](images/dot-language/46248785-ed561880-c415-11e8-8f07-6f5c83b4b03b.png)

What I'm talking about is 'Diagrams as code', which is a major paradigm shift that very few developers and professionals have been able to make.

Expand Down Expand Up @@ -178,7 +178,7 @@ For a great introduction to this kind of maps see [Wardley Mapping](http://wardl

#### Explore Vis.js Javascript engine

If you are looking for a great javascript-based DOT language visualization engine, then _[vis.js network](http://visjs.org/docs/network/)_ is the one I recommen you spend a lot of time learning and customizing (see my [neovis fork](https://github.com/pbx-gs/neovis.js) for an example of what those customization can look like)
If you are looking for a great javascript-based DOT language visualization engine, then _[vis.js network](http://visjs.org/docs/network/)_ is the one I recommend you spend a lot of time learning and customizing (see my [neovis fork](https://github.com/pbx-gs/neovis.js) for an example of what those customization can look like)

#### Mermaid and WebSequenceDiagrams.com

Expand All @@ -202,9 +202,9 @@ sequenceDiagram

Which looks like this when rendered:

![](https://user-images.githubusercontent.com/656739/46255423-a22f1a80-c494-11e8-8eb3-5c9c992e162c.png)
![](images/dot-language/46255423-a22f1a80-c494-11e8-8eb3-5c9c992e162c.png)

An alternative is the propriatary https://www.websequencediagrams.com service, which more feature rich that mermaid and has a nicer design (the free version is already very usable and practical):
An alternative is the proprietary https://www.websequencediagrams.com service, which more feature rich that mermaid and has a nicer design (the free version is already very usable and practical):

```
title Authentication Sequence
Expand All @@ -216,19 +216,19 @@ Bob->Alice: Authentication Response

Will look like this

![](https://user-images.githubusercontent.com/656739/46255585-abb98200-c496-11e8-93a7-7ac3abeaf535.png)
![](images/dot-language/46255585-abb98200-c496-11e8-93a7-7ac3abeaf535.png)


The [Diagram in R](http://rich-iannone.github.io/DiagrammeR/index.html) integration page contains a great video of DOT in action:

![](https://user-images.githubusercontent.com/656739/46255638-41551180-c497-11e8-88b8-26ab35aacedf.png)
![](images/dot-language/46255638-41551180-c497-11e8-88b8-26ab35aacedf.png)

Btw, if you have not learned how to code in [R](https://en.wikipedia.org/wiki/R_(programming_language)), you definitely should, since it is a great way to manipulate and visualise data).

#### Try it! (learn DOT and Mermaid with real-time preview)

A good tech stack to learn DOT Language (and mermaid) is the [Atom editor](https://atom.io/) with the [Markdown Preview Enhanced](https://atom.io/packages/markdown-preview-enhanced) package installed.

This is create an [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) environment where you have an highly effective amd productive split screen (on the left you have the markdown page, and on the right the rended page/diagram). Once you make a code change, you will see the rended diagram in less than a second. This workflow makes it really easy to learn and to create diagrams in real-time.
This is create an [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) environment where you have an highly effective and productive split screen (on the left you have the markdown page, and on the right the rendered page/diagram). Once you make a code change, you will see the rendered diagram in less than a second. This workflow makes it really easy to learn and to create diagrams in real-time.

I have done Threat Modeling sessions in the past, where we have the UI described above projected on a wall, which allow us to create the diagrams in real-time, based on the information provided by the meeting attendees.
10 changes: 5 additions & 5 deletions content/3.technologies/content/AST.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ status: content
weight: 40
---

[AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree) is a graph representation of source code primarly used by compilers to read code and generate the target binaries.
[AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree) is a graph representation of source code primarily used by compilers to read code and generate the target binaries.

For example, the AST of this code sample:
```
Expand All @@ -17,7 +17,7 @@ while b ≠ 0
```
Will look like this:

![](https://raw.githubusercontent.com/DinisCruz/Book_Generation_Z_Developer/master/static/images/800px-Abstract_syntax_tree_for_Euclidean_algorithm.svg.png)
![](images/ast-abstract-syntax-tree/800px-Abstract_syntax_tree_for_Euclidean_algorithm.svg.png)


The transformation from source code to an AST, is a very common pattern when processing any type of structured data. The typical workflow is based on _"Creating a parser that converts raw data into an graph-based format, that can then be consumed by an rendering engine"_.
Expand All @@ -26,7 +26,7 @@ This is basically the process of converting raw data into in strongly typed in-m

Here is a another example from the really cool online tool [astexplorer.net](https://astexplorer.net/):

![](https://user-images.githubusercontent.com/656739/46580312-4c212080-ca1a-11e8-8426-26335bd7d9d9.png)
![](images/ast-abstract-syntax-tree/46580312-4c212080-ca1a-11e8-8426-26335bd7d9d9.png)

Note how in the image above the [DOT](https://github.com/DinisCruz/Book_Generation_Z_Developer/blob/master/content/2.mvp-for-gen-z-dev/content/dot-language.md) language raw text was converted into a object tree (which can also be consumed/saved as a json file).

Expand Down Expand Up @@ -121,11 +121,11 @@ Another really cool example of the power of AST manipulation is the PoC I wrote

Here is what the UI looked like, where the code on the left, was transformed programmatically to the code on the right (by adding the extra ```AntiXSS.HtmlEncode``` wrapper method)

![](https://user-images.githubusercontent.com/656739/46583057-a933cb00-ca48-11e8-8525-122acf63bf81.png)
![](images/ast-abstract-syntax-tree/46583057-a933cb00-ca48-11e8-8525-122acf63bf81.png)

Here is the source code that does the transformation and code fix (note the round-trip of code):

![image](https://user-images.githubusercontent.com/656739/46583215-fc0e8200-ca4a-11e8-94b6-c7d3a59e6d9d.png)
![](images/ast-abstract-syntax-tree/46583215-fc0e8200-ca4a-11e8-94b6-c7d3a59e6d9d.png)

In 2018, the way to implement this workflow in a developer friendly way, is to automatically create a Pull Request with those extra changes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The way to do this is to reverse-engineer how somebody behaves and think, and ap
- Thinking vs Feeling
- Judging vs Perceiving

![myersbriggstypes](https://user-images.githubusercontent.com/656739/46584081-fd45ac00-ca56-11e8-980c-a5bd7c4e7639.png)
![](images/being-criticized-is-a-privilege/46584081-fd45ac00-ca56-11e8-980c-a5bd7c4e7639.png)

Another related framework is the _[Big Five Personality Traits](https://en.wikipedia.org/wiki/Big_Five_personality_traits) which maps five factors:

Expand All @@ -68,15 +68,15 @@ Another related framework is the _[Big Five Personality Traits](https://en.wikip
- Agreeableness (friendly/compassionate vs. challenging/detached)
- Neuroticism (sensitive/nervous vs. secure/confident)

![image](https://user-images.githubusercontent.com/656739/46584313-cae97e00-ca59-11e8-91ee-10e17fb81612.png)
![](images/being-criticized-is-a-privilege/46584313-cae97e00-ca59-11e8-91ee-10e17fb81612.png)

To see both of these frameworks in action see the [16personalities.com](https://www.16personalities.com) website who have [merged these two frameworks](https://www.16personalities.com/articles/our-theory) and come up with with 16 different personalities:

![image](https://user-images.githubusercontent.com/656739/46584306-a5f50b00-ca59-11e8-8f6d-4e5cddabbf0c.png)
![](images/being-criticized-is-a-privilege/46584306-a5f50b00-ca59-11e8-8f6d-4e5cddabbf0c.png)

For reference here is mine :)

![image](https://user-images.githubusercontent.com/656739/46584346-e9e81000-ca59-11e8-9fd6-88acc7d8cfd3.png)
![](images/being-criticized-is-a-privilege/46584346-e9e81000-ca59-11e8-9fd6-88acc7d8cfd3.png)

Note that although these frameworks might not be 100% accurate, I found the results I've seen to be quite exact in practice.

Expand All @@ -101,7 +101,7 @@ Being aware of the team members personalities is a great way to ensure that the

As a framework to think about feedback I really like the ideas presented in the _[Radical Candor](https://www.amazon.com/Radical-Candor-Kickass-Without-Humanity/dp/1250103509)_ book, which provide a mental model based on two main axis of behavior: Care Personally and Challenge directly:

![](https://user-images.githubusercontent.com/656739/46583619-b608ec80-ca51-11e8-997b-d55b10c6174d.png)
![](images/being-criticized-is-a-privilege/46583619-b608ec80-ca51-11e8-997b-d55b10c6174d.png)

- When you _Care Personally_, but Don't _Challenge directly_: you have _Ruinous Empathy_ (meaning that real feedback is not provided until it is usually too late)
- When you Don't _Care Personally_ and Don't _Challenge directly_: you have _Manipulative Insincerity_ (which is really something you don't want to be involved in)
Expand Down Expand Up @@ -156,7 +156,7 @@ Finally the positive feedback that is really, really, really valuable is the fee

THAT is usually all that you should be looking for.

THAT moment when one of your heros (or individuals you really respect) gives you a gentle nod of 'well done , that was good!'.
THAT moment when one of your heroes (or individuals you really respect) gives you a gentle nod of 'well done , that was good!'.

In your life, you will be on the receiving end of many magic moments like this. Unfortunately most miss it and fail to appreciate them. Make sure you celebrate them as they occur, since nothing else matters (money, success, fame).

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 264a648

Please sign in to comment.