Skip to content

Commit

Permalink
Light version (#1)
Browse files Browse the repository at this point in the history
* WIP: update introduction

* make light version
  • Loading branch information
biscout42 authored Dec 11, 2019
1 parent 3272223 commit 22140a1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 30 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
[Presentation](https://github.2rioffice.com/pages/barys/ltk-props-testing/)
[Presentation](https://biscout24.github.io/ltk-props-testing/)

To run it locally [install nodejs](http://nodejs.org/) and
```bash
```shell script
cd ./docs
npm install
npm start
```

Open `http://localhost:8000` to view your presentation

You can change the port by using `npm start -- --port=8001`

Hint. In case you experience issue on mac os with `npm` try
```shell script
npm install -g npm-check-updates
npm-check-updates -u
npm install
```
Binary file added docs/img/Bender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 36 additions & 24 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,31 @@
<p data-markdown>
Barys Ilyushonak aka Boris

Lead Software Engineer @ Foundation Services / München

[Java => Erlang => Scala]

</p>
<img src="img/DI-wp-01.png" height="150px">
<img src="img/Bender.png" height="150px">
</div>
<div style="position:absolute; top: 20%; right: 10%; width: 40%;">
<p data-markdown>
```scala
/**
* DeviceIdent
* graph-based analysis
* 24x7 SaaS application
* 0-downtime deployment
* real-time device scoring
* real-time processing
*/
val techStack = Map(
"lang" -> "scala",
"reactive" -> "akka",
"web" -> "Play!",
"messaging" -> "kafka",
"frontEnd" -> "nginx",
"storage" -> "MongoDB",
"os" -> "debian"
"lang" -> "scala",
"effect" -> "cats-effect",
"web" -> "http4s",
"messaging" -> "kafka",
"frontEnd" -> "nginx",
"storage" -> "MongoDB",
"os" -> "debian",
"orchestration" -> "k8s"
)
```
</p>
Expand Down Expand Up @@ -157,20 +161,6 @@ <h3>How-to test unknown?</h3>
data-separator-vertical="^\n\n"
data-separator-notes="^Note:">
</section>
<section>
<h3>Where is the code?</h3>
</section>
<section data-background-size="840px" data-background-image="img/one-does-not-5ad72d.jpg">
<aside class="notes">
I wold like to show you how could you apply property-based testing idea to verify monads law in application to scala standard library
</aside>
</section>
<section
data-markdown="slides/monad-tests.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:">
</section>
<section>
<p data-markdown>
**Property-based testing** helps you to **find edge cases** and **understand code behaviour**
Expand Down Expand Up @@ -206,6 +196,28 @@ <h3>References</h3>
* http://www.scalatest.org/user_guide/property_based_testing
</p>
</section>
<section>
<h3>Where is the code?</h3>
<p data-markdown>
[Take a look at full presentation](https://biscout24.github.io/ltk-props-testing/)

Code examples at [[email protected]:biscout24/ltk-props-testing.git](https://github.com/biscout24/ltk-props-testing/)
</p>
<aside class="notes">
There is an example how one could use `cats-law` to test your instances according to functional laws, e.g. if Option/Try or Future obey monads laws.
</aside>
</section>
<section data-background-size="840px" data-background-image="img/one-does-not-5ad72d.jpg">
<aside class="notes">
I wold like to show you how could you apply property-based testing idea to verify monads law in application to scala standard library
</aside>
</section>
<section
data-markdown="slides/monad-tests.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:">
</section>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions docs/slides/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ aka commutative property
![](./img/property_commutative.png "commutative property")

```scala
Prop.forAll { (a: Int, b: Int) =>
a + b == b + a
Prop.forAll { (x: Int, y: Int) =>
x + y == y + x
}
```
Note:
Note: lets assume example based testing for sum function, and you deal with lazy or very funny developer. He could make all tests green just by adding match-case here :)


### "There and back again"
Expand All @@ -35,7 +35,7 @@ Prop.forAll { xs: List[Int] =>
xs.reverse.reverse == xs
}
```
Note: What is a typical example of it? Serialization/Desirialization
Note: What is a typical example of it? Serialization/Deserialization or write/read to/from DB


### "Some things never change"
Expand Down

0 comments on commit 22140a1

Please sign in to comment.