├── .gitignore ├── GildedRoseProblemStatement.md ├── pom.xml ├── presentation.pdf ├── presentation ├── 00-presentation.html ├── Gruntfile.js ├── LICENSE ├── bower.json ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal-override.css │ ├── reveal.css │ ├── reveal.scss │ ├── reviews.css │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css ├── images │ ├── 00-icons │ │ ├── azure.png │ │ ├── client.png │ │ ├── database.png │ │ ├── datacenter.png │ │ ├── disk.png │ │ ├── internet.png │ │ ├── master.png │ │ ├── mobile.png │ │ ├── readreplica.png │ │ ├── server.png │ │ ├── standby.png │ │ ├── tape.png │ │ ├── user.png │ │ ├── users.png │ │ └── volume.png │ ├── 02-architecture │ │ ├── application-transport-layers.drawio │ │ ├── application-transport-layers.png │ │ ├── cloud-0-IAAS.png │ │ ├── cloud-2-PAAS.png │ │ ├── container-orchestration.png │ │ ├── containers-docker-overview.png │ │ ├── containers-docker.png │ │ ├── database-columnar-storage-2.png │ │ ├── database-columnar-storage.png │ │ ├── database-document.png │ │ ├── database-fundamentals-1-single-db.drawio │ │ ├── database-fundamentals-1-single-db.png │ │ ├── database-fundamentals-2-single-db-snapshot.drawio │ │ ├── database-fundamentals-2-single-db-snapshot.png │ │ ├── database-fundamentals-3-single-db-snapshot-transaction.drawio │ │ ├── database-fundamentals-3-single-db-snapshot-transaction.png │ │ ├── database-fundamentals-4-standby-database.drawio │ │ ├── database-fundamentals-4-standby-database.png │ │ ├── database-fundamentals-5-reporting-database-application.drawio │ │ ├── database-fundamentals-5-reporting-database-application.png │ │ ├── database-fundamentals-6-sep-reporting-database-application.drawio │ │ ├── database-fundamentals-6-sep-reporting-database-application.png │ │ ├── database-fundamentals-document-database-example.png │ │ ├── database-fundamentals-graph-databases.png │ │ ├── database-fundamentals-relational-schema.png │ │ ├── database-key-value.png │ │ ├── database-relational-icon.png │ │ ├── database-session-store.png │ │ ├── databases.drawio │ │ ├── datastream.png │ │ ├── devops-05-continuous-delivery.png │ │ ├── devops-06-iaac-2-overview.png │ │ ├── devops-06-teams.png │ │ ├── dns-record-types.png │ │ ├── encryption-Asymmetric_encryption.png │ │ ├── encryption-symetrickey.drawio │ │ ├── encryption-symetrickey.png │ │ ├── horizontal-scaling.png │ │ ├── kubernetes.png │ │ ├── microservices.png │ │ ├── operational-continuum.png │ │ ├── private-network-1-SingleDataCenter.png │ │ ├── private-network-1-SingleDataCenterWithDB.drawio │ │ ├── private-network-1-SingleDataCenterWithDB.png │ │ ├── private-network-2-2-datacenters-london.drawio │ │ ├── private-network-2-2-datacenters-london.png │ │ ├── private-network-3-2-datacenters-london-mumbai.drawio │ │ ├── private-network-3-2-datacenters-london-mumbai.png │ │ ├── queueing-01.drawio │ │ ├── queuing-00.drawio │ │ ├── queuing-00.png │ │ ├── queuing-01.png │ │ ├── queuing-02.png │ │ ├── storage-block-storage.png │ │ ├── storage-file-storage.png │ │ ├── storage-raid.drawio │ │ ├── storage-raid.png │ │ ├── storage-types-01.drawio │ │ ├── storage-types-02.drawio │ │ ├── storage-types.png │ │ └── vertical-scaling.png │ ├── 03-clean-code │ │ ├── bad-code.png │ │ ├── clean-code.png │ │ ├── good-code.png │ │ ├── practice.png │ │ ├── principles.png │ │ ├── refactoring.png │ │ ├── tdd.png │ │ └── unit-test.png │ ├── In28MinutesLogo-300X50.png │ ├── arrow.png │ ├── arrowbi.png │ ├── arrowdot.png │ ├── arrowdotrev.png │ ├── arrowrev.png │ ├── arrows.drawio │ ├── arrowtd.png │ ├── arrowtdbi.png │ ├── arrowtdsmall.png │ ├── aws-cloud.png │ ├── aws.png │ ├── border.png │ ├── cloud.png │ ├── forgettting-curve.png │ ├── in28minutes-courses.png │ ├── in28minutes-logo-small.png │ ├── in28minutes-logo.png │ ├── in28minutes.png │ ├── load-variations.png │ ├── remember.png │ └── remembering-curve.png ├── js │ └── reveal.js ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js ├── package.json ├── plugin │ ├── highlight │ │ └── highlight.js │ ├── markdown │ │ ├── example.html │ │ ├── example.md │ │ ├── markdown.js │ │ └── marked.js │ ├── math │ │ └── math.js │ ├── multiplex │ │ ├── client.js │ │ ├── index.js │ │ ├── master.js │ │ └── package.json │ ├── notes-server │ │ ├── client.js │ │ ├── index.js │ │ └── notes.html │ ├── notes │ │ ├── notes.html │ │ └── notes.js │ ├── print-pdf │ │ └── print-pdf.js │ ├── search │ │ └── search.js │ └── zoom-js │ │ └── zoom.js └── test │ ├── examples │ ├── assets │ │ ├── image1.png │ │ └── image2.png │ ├── barebones.html │ ├── embedded-media.html │ ├── math.html │ ├── slide-backgrounds.html │ └── slide-transitions.html │ ├── qunit-1.12.0.css │ ├── qunit-1.12.0.js │ ├── simple.md │ ├── test-markdown-element-attributes.html │ ├── test-markdown-element-attributes.js │ ├── test-markdown-external.html │ ├── test-markdown-external.js │ ├── test-markdown-options.html │ ├── test-markdown-options.js │ ├── test-markdown-slide-attributes.html │ ├── test-markdown-slide-attributes.js │ ├── test-markdown.html │ ├── test-markdown.js │ ├── test-pdf.html │ ├── test-pdf.js │ ├── test.html │ └── test.js ├── readme.md ├── src ├── .svn │ ├── all-wcprops │ ├── entries │ └── format ├── main │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── format │ └── java │ │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── format │ │ └── com │ │ ├── a │ │ └── introduction │ │ │ └── gildedrose │ │ │ ├── GildedRose.java │ │ │ └── Item.java │ │ ├── b │ │ └── simple │ │ │ └── design │ │ │ ├── business │ │ │ ├── customer │ │ │ │ ├── CustomerBO.java │ │ │ │ ├── CustomerBOImpl.java │ │ │ │ └── CustomerBOImplRefactored.java │ │ │ ├── exception │ │ │ │ └── DifferentCurrenciesException.java │ │ │ ├── student │ │ │ │ ├── StudentHelper.java │ │ │ │ └── StudentHelperRefactored.java │ │ │ └── text │ │ │ │ ├── TextHelper.java │ │ │ │ └── TextHelperRefactored.java │ │ │ └── model │ │ │ └── customer │ │ │ ├── Amount.java │ │ │ ├── AmountImpl.java │ │ │ ├── Collateral.java │ │ │ ├── CollateralImpl.java │ │ │ ├── CollateralType.java │ │ │ ├── Currency.java │ │ │ ├── Customer.java │ │ │ ├── CustomerImpl.java │ │ │ ├── CustomerType.java │ │ │ ├── Product.java │ │ │ ├── ProductImpl.java │ │ │ └── ProductType.java │ │ ├── c │ │ └── refactoring │ │ │ ├── Log.java │ │ │ ├── StringUtils.java │ │ │ ├── allowance │ │ │ ├── Allowance.java │ │ │ ├── Constants.java │ │ │ ├── File.java │ │ │ └── LevelDecider.java │ │ │ ├── lock │ │ │ ├── Constants.java │ │ │ ├── Lock.java │ │ │ ├── User.java │ │ │ ├── UserLoginChecker.java │ │ │ └── UserLoginCheckerRefactored.java │ │ │ ├── menuexamples │ │ │ ├── Constants.java │ │ │ ├── MenuAccess.java │ │ │ ├── MenuAccessRefactored.java │ │ │ ├── MenuItem.java │ │ │ └── Role.java │ │ │ └── movie │ │ │ ├── Movie.java │ │ │ └── MovieRefactored.java │ │ └── d │ │ └── tdd │ │ ├── Game.java │ │ └── StringHelper.java └── test │ ├── .svn │ ├── all-wcprops │ ├── entries │ └── format │ ├── java │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ └── format │ └── com │ │ ├── a │ │ └── introduction │ │ │ └── gildedrose │ │ │ ├── GildedRoseADefaultItemTest.java │ │ │ ├── GildedRoseBAgedBrieTest.java │ │ │ ├── GildedRoseCBackstagePassesTest.java │ │ │ └── GildedRoseRefactoredTest.java │ │ ├── b │ │ └── simple │ │ │ └── design │ │ │ └── business │ │ │ ├── customer │ │ │ ├── CustomerBORefactoredTest.java │ │ │ └── CustomerBOTest.java │ │ │ ├── student │ │ │ └── StudentHelperTest.java │ │ │ └── text │ │ │ └── TextHelperTest.java │ │ ├── c │ │ └── refactoring │ │ │ ├── allowance │ │ │ └── LevelDeciderTest.java │ │ │ ├── lock │ │ │ ├── UserLoginCheckerTest.java │ │ │ └── UserLoginCheckerTestRefactored.java │ │ │ ├── menuexamples │ │ │ ├── MenuAccessTest.java │ │ │ └── MenuAccessTestRefactored.java │ │ │ └── movie │ │ │ └── MovieTest.java │ │ └── d │ │ └── tdd │ │ ├── GameTest.java │ │ └── StringHelperTest.java │ └── resources │ └── .svn │ ├── all-wcprops │ ├── entries │ ├── format │ └── text-base │ ├── ReportBusinessIntegerationTestData.sql.svn-base │ ├── reportBusinessIntegrationTest-config.xml.svn-base │ └── reportBusinessTest-config.xml.svn-base ├── tdd.md └── zztemp.md /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | 41 | # Compiled class file 42 | *.class 43 | 44 | # Log file 45 | *.log 46 | 47 | # BlueJ files 48 | *.ctxt 49 | 50 | # Mobile Tools for Java (J2ME) 51 | .mtj.tmp/ 52 | 53 | # Package Files # 54 | *.ear 55 | *.tar.gz 56 | *.rar 57 | *.cmd 58 | *.classpath 59 | *.settings 60 | *.project 61 | *.mvn 62 | mvnw 63 | target 64 | *.DS_Store 65 | 66 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 67 | hs_err_pid* 68 | -------------------------------------------------------------------------------- /GildedRoseProblemStatement.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | Gilded Rose Refactoring Kata was originally created by Terry Hughes (http://twitter.com/TerryHughes). 4 | 5 | ## Problem Statement 6 | 7 | The Gilded Rose buys and sells only the finest goods. Unfortunately, most goods are constantly degrading in quality as they approach their sell by date. 8 | 9 | ### Current System Behavior 10 | 11 | - All items have a 12 | - **SellIn** value which denotes the number of days till the sell by date 13 | - **Quality** value which denotes how valuable the item is 14 | - At the end of each day our system changes both values for every item as defined by the rules 15 | 16 | ### Rules 17 | 18 | #### Default Item Rules: 19 | - Quality decreases by 1 before (and including) the sell by date. 20 | - After sell by date, quality degrades twice as fast 21 | - The Quality of an item is never negative and never more than 50 22 | 23 | #### Rules for Specific Items - Specific Exceptions: 24 | - "Aged Brie" actually increases in Quality the older it gets 25 | - "Backstage passes", like aged brie, increases in Quality as it's SellIn value approaches; 26 | - increases by 2 when there are 10 days or less 27 | - increases by 3 when there are 5 days or less 28 | - drops to 0 after the concert 29 | 30 | ## Exercises 31 | - Step I : Improve clarity of GildedRoseADefaultItemTest.java 32 | - Step II : Improve clarity of GildedRoseBAgedBrieTest.java 33 | - Step III: Improve clarity of GildedRoseCBackstagePassesTest.java 34 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 4.0.0 7 | 8 | com.in28minutes 9 | clean-code 10 | 0.0.1-SNAPSHOT 11 | 12 | 13 | 1.8 14 | 5.6.2 15 | 3.0.0-M4 16 | 17 | 18 | 19 | 20 | org.junit.jupiter 21 | junit-jupiter 22 | ${junit.jupiter.version} 23 | test 24 | 25 | 26 | 27 | 28 | 29 | 30 | maven-compiler-plugin 31 | 32 | ${java.version} 33 | ${java.version} 34 | 35 | 36 | 37 | maven-surefire-plugin 38 | ${maven.maven-surefire-plugin.version} 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation.pdf -------------------------------------------------------------------------------- /presentation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /presentation/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal.js", 3 | "version": "3.5.0", 4 | "main": [ 5 | "js/reveal.js", 6 | "css/reveal.css" 7 | ], 8 | "homepage": "http://lab.hakim.se/reveal-js/", 9 | "license": "MIT", 10 | "description": "The HTML Presentation Framework", 11 | "authors": [ 12 | "Hakim El Hattab " 13 | ], 14 | "dependencies": { 15 | "headjs": "~1.0.3" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/hakimel/reveal.js.git" 20 | }, 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test" 26 | ] 27 | } -------------------------------------------------------------------------------- /presentation/css/reveal-override.css: -------------------------------------------------------------------------------- 1 | body { 2 | height: 86%; 3 | } 4 | 5 | body:after { 6 | content: url(../images/in28minutes-logo-small.png); 7 | position: fixed; 8 | top: 1em; 9 | right: 1em; 10 | } 11 | 12 | .reveal h2 { 13 | color: brown; 14 | } 15 | 16 | .reveal h1 { 17 | color: #1BA84A; 18 | } 19 | 20 | .reveal h3 { 21 | color: #59C8DE; 22 | } 23 | 24 | .reveal h5 { 25 | margin-top: 20px; 26 | } 27 | 28 | .reveal .slides { 29 | text-align: left; 30 | } -------------------------------------------------------------------------------- /presentation/css/reviews.css: -------------------------------------------------------------------------------- 1 | .mb-style-3 { 2 | width: 1000px; 3 | } 4 | 5 | .mb-style-3 blockquote{ 6 | background: #fff; 7 | padding: 30px; 8 | border-radius: 5px; 9 | box-shadow: 10 | inset 0 2px 0 rgba(188, 147, 200, 0.7), 11 | -5px -4px 25px rgba(0, 0, 0, 0.3); 12 | } 13 | 14 | .mb-style-3 blockquote:after, 15 | .mb-style-3 blockquote:before { 16 | top: 100%; 17 | border: solid transparent; 18 | content: " "; 19 | height: 0; 20 | width: 0; 21 | position: absolute; 22 | pointer-events: none; 23 | } 24 | 25 | .mb-style-3 blockquote:after { 26 | border-top-color: #ffffff; 27 | border-width: 10px; 28 | left: 65%; 29 | margin-left: -10px; 30 | } 31 | 32 | .mb-style-3 blockquote:before { 33 | border-top-color: rgba(0,0,0,0.01); 34 | border-width: 11px; 35 | left: 65%; 36 | margin-left: -11px; 37 | } 38 | 39 | .mb-style-3 blockquote p { 40 | font-family: 'Alegreya', serif; 41 | font-size: 24px; 42 | color: #b4b4b4; 43 | font-weight: 400; 44 | line-height: 40px; 45 | font-style: italic; 46 | text-indent: 100px; 47 | position: relative; 48 | } 49 | 50 | .mb-style-3 blockquote p:before{ 51 | content: '\201C'; 52 | font-family: serif; 53 | font-style: normal; 54 | font-weight: 700; 55 | position: absolute; 56 | font-size: 175px; 57 | top: 0px; 58 | left: -105px; 59 | color: rgba(188, 147, 200, 1); 60 | text-shadow: 7px 14px 10px rgba(0, 0, 0, 0.1); 61 | } 62 | 63 | .mb-style-3 .mb-attribution { 64 | text-align: right; 65 | padding: 20px 100px 20px 20px; 66 | position: relative; 67 | } 68 | 69 | .mb-style-3 .mb-thumb { 70 | display: block; 71 | width: 70px; 72 | height: 70px; 73 | border: 5px solid #fff; 74 | border-radius: 50%; 75 | background: url(../images/bronte.jpg) no-repeat center center; 76 | position: absolute; 77 | right: 10px; 78 | bottom: 5px; 79 | box-shadow: 80 | inset 1px 1px 4px rgba(0,0,0,0.5), 81 | 0 2px 3px rgba(0,0,0,0.6); 82 | } 83 | 84 | .mb-style-3 .mb-author{ 85 | font-family: 'Alegreya SC', serif; 86 | font-weight: 700; 87 | font-size: 18px; 88 | color: rgba(188, 147, 200, 1); 89 | text-shadow: 0 1px 1px rgba(255,255,255,0.7); 90 | } 91 | 92 | .mb-style-3 cite a{ 93 | font-family: 'Alegreya', serif; 94 | font-weight: 700; 95 | font-style: italic; 96 | color: #fff; 97 | text-shadow: 0 1px 1px rgba(0,0,0,0.3); 98 | } 99 | 100 | .mb-style-3 cite a:hover{ 101 | color: rgba(188, 147, 200, 1); 102 | text-shadow: 0 1px 1px rgba(255,255,255,0.7); 103 | } -------------------------------------------------------------------------------- /presentation/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`. 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | -------------------------------------------------------------------------------- /presentation/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainColor: #eee; 32 | 33 | // Headings 34 | $headingFont: Ubuntu, 'sans-serif'; 35 | $headingTextShadow: 2px 2px 2px $coal; 36 | 37 | // h1 shadow, borrowed humbly from 38 | // (c) Default theme by Hakim El Hattab 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Links 42 | $linkColor: $blood; 43 | $linkColorHover: lighten( $linkColor, 20% ); 44 | 45 | // Text selection 46 | $selectionBackgroundColor: $blood; 47 | $selectionColor: #fff; 48 | 49 | 50 | // Theme template ------------------------------ 51 | @import "../template/theme"; 52 | // --------------------------------------------- 53 | 54 | // some overrides after theme template import 55 | 56 | .reveal p { 57 | font-weight: 300; 58 | text-shadow: 1px 1px $coal; 59 | } 60 | 61 | .reveal h1, 62 | .reveal h2, 63 | .reveal h3, 64 | .reveal h4, 65 | .reveal h5, 66 | .reveal h6 { 67 | font-weight: 700; 68 | } 69 | 70 | .reveal p code { 71 | background-color: $codeBackground; 72 | display: inline-block; 73 | border-radius: 7px; 74 | } 75 | 76 | .reveal small code { 77 | vertical-align: baseline; 78 | } -------------------------------------------------------------------------------- /presentation/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /presentation/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /presentation/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | section.has-dark-background { 35 | &, h1, h2, h3, h4, h5, h6 { 36 | color: #fff; 37 | } 38 | } 39 | 40 | 41 | // Theme template ------------------------------ 42 | @import "../template/theme"; 43 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /presentation/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /presentation/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * By Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 42px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /presentation/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /presentation/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /presentation/images/00-icons/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/azure.png -------------------------------------------------------------------------------- /presentation/images/00-icons/client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/client.png -------------------------------------------------------------------------------- /presentation/images/00-icons/database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/database.png -------------------------------------------------------------------------------- /presentation/images/00-icons/datacenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/datacenter.png -------------------------------------------------------------------------------- /presentation/images/00-icons/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/disk.png -------------------------------------------------------------------------------- /presentation/images/00-icons/internet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/internet.png -------------------------------------------------------------------------------- /presentation/images/00-icons/master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/master.png -------------------------------------------------------------------------------- /presentation/images/00-icons/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/mobile.png -------------------------------------------------------------------------------- /presentation/images/00-icons/readreplica.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/readreplica.png -------------------------------------------------------------------------------- /presentation/images/00-icons/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/server.png -------------------------------------------------------------------------------- /presentation/images/00-icons/standby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/standby.png -------------------------------------------------------------------------------- /presentation/images/00-icons/tape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/tape.png -------------------------------------------------------------------------------- /presentation/images/00-icons/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/user.png -------------------------------------------------------------------------------- /presentation/images/00-icons/users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/users.png -------------------------------------------------------------------------------- /presentation/images/00-icons/volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/00-icons/volume.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/application-transport-layers.drawio: -------------------------------------------------------------------------------- 1 | 7Zjfb5swEMf/GqTtoRFgIMljQ9KlUrN1Sqo9Ri444MVgZJxf++t3BhOgpF0rZV2ljAewv3dw+D5nx8RAfrL/InAWz3hImGGb4d5AY8O2+30Tzko4lIJj2qUQCRqWklkLc/qLlKJVqRsaklxrpSQ5Z5JmbTHgaUoC2dKwEHzXdltxFraEDEekI8wDzCq159b6DxrKWOuWN6wNU0KjWAcf2P3S8IiDdST4JtURDRutiqM0J7h6lh5qHuOQ7xoSmhjIF5zLspXsfcJUctuJu3nGehyPIKl8zQ23NJttp2I3mlz318n0++xbdnXlDcrHbDHb6JRcZxmjAZaUp2C4wwci4PqpavQ/6+HIQ5XEIglEhbEMNFpRxnzOuCiMaOw6QxteaJRLwdeksqQ8JUqskqLujAQOKYzmic+Kp3Kuo1m63whwUxyVX1lhlgN9PTIiJNk/mzPrSAJKnPCESHEAl6q+dXXo6vYGblUvu7pWbFMTjhtl4mkN6wKNjs+uEUFDU3oLsWGH2ELgNM+4kKd4ORfMq+/+e17VCtng9ZXIHRfrU7TQBdMa2B+AltWhNV0s7kFRl7nh28Y1xDbnMyW+hZTj+/74bKTQE1KPDH6N/g4le4hesQha3rtisruLoK8oLe7mcH4YXyqc0yveO8NBHTi3l8rj9Jr2zjycDo8ODRLCtlh3YSMR84inmE1qdVTzMqFX+9xxnmkUP4mUB51QvJEcpFgmTFvLmCrQy7mF9+IbEZCXRqRTKrGIiHzJ0TtNSxAGG9xt+03On3j3z4nPOE1lEdgdGe4Y8oTzrPzSWdG9ynczh5jRKIV2ACmD/UJjKigoIc7jIyGaFJ8+1XVMkwgGwegjnDFjlIRLSRjJaQ5CwJNsA09c4lTJIqFAVhnuicgV5aVfeeyojJdzImCa9PJtdK6dQM9sHlZrErmDYWcKeXbPad3inZhRz/icH7T3H/TrQKMB6n1I0NCtP8ULW+MPDzT5DQ== -------------------------------------------------------------------------------- /presentation/images/02-architecture/application-transport-layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/application-transport-layers.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/cloud-0-IAAS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/cloud-0-IAAS.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/cloud-2-PAAS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/cloud-2-PAAS.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/container-orchestration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/container-orchestration.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/containers-docker-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/containers-docker-overview.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/containers-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/containers-docker.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-columnar-storage-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-columnar-storage-2.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-columnar-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-columnar-storage.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-document.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-1-single-db.drawio: -------------------------------------------------------------------------------- 1 | 3Zjbcps6FIafxpfJAOJgLmM7NNPpnmbqzvRwk5GRAqoFwkIOdp6+khE2IDXJ3rVn9sQ3Rksn9P1rLUlMwLzYfeCwyv9hCNOJ56DdBCwmnuc6QSD/lGXfWqbOtDVknCDd6GRYkmfc9dTWLUG4HjQUjFFBqqExZWWJUzGwQc5ZM2z2yOhw1gpm2DAsU0hN6zeCRK6tYeCfKu4wyfJuajeM25oCdq31UuocItb0TOB2AuacMdE+Fbs5popeB6btl/yh9vhmHJfiLR0cb7mK4drZFIuEhEkwu5l9u9KjPEG61SvWLyv2HQLOtiXCahBnAmZNTgReVjBVtY0UXdpyUVBZcuVjLThb4zmjjB96gyRJbpO5rDFft5sbc4F3PZN+/Q+YFVjwvWyia31fo9TO5IW63Jyk8QJty3uqAEcboXaH7Dj2CZh80Mzs/OJntvH8n/vV5mtzV119BvHm7vL8/CiOkuRM/MIRv8jCz7Xwk2H79/xQE5ab9eyn+2Ppb8UV+f4x+PXv+ClAkKc6S7gKJ4J1fmT7SCjt0JWslI1mGYeISGIjc4u5i2jvTHijIV7gmnjd2Ib3HO5pxeu9jndAsO+JOaxUk2KXqdR+DZsaXKeMV4xDgR8QFPAhlbAwH5GXTvsIw6ljyGP49jwCwaHZIzsppLoffmcSZTry+dgUBVg08b0LSQIMSeYdVGleSKzyb96C9UJYqARRrurqiKOnnWQgXsof2tstcQEpyUpZPCqoiBK5793oioIgpKaxJqxhSjuDSoEzVCnwLKHjW0PnQjL5r0cO2wpKSgm7O3oYHt9B/QRXmN6zmgjCFNwVE4IVFuqCVTZxXgtLobKcGhvShxrzJ1tMhg6M3cgWht4iCi8dhoE7yo1geh0YEtsUji6lcGgofFNVVKpxEOn9htp4lwrBG5U4R6xZD1HmLvWJlUiJ4HzB2btW4y1HMvuR4e+1aKqP280yuP9VC/S8XK/r22j6lhPD/yfvZbjEnKSHw8gK1mPJVQ5zIHCgLevNFpFz8aznBNdeMBD4eIfpB1vcRWBf4tDvrGcX2TyDGCLjEt2o+7OSg8K6JulQD7wj4ruSW75kW/rRq1nstCccCvte4V4KJheh5H05hmq25Wl3Rn1hhxaQZ1i87tEYDW76pmY9QWx3yM7GMZU7xNPw+4BNIT3DPSNyZSeXGN1h/XEkt+vWvfrX+fFA8SiPjzfKFowx0MFhjsv+7z5kHpAWXRS+22w93jv90DvG9/k3T1k8fR1qZTt9ZAO3vwE= -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-1-single-db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-1-single-db.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-2-single-db-snapshot.drawio: -------------------------------------------------------------------------------- 1 | 7Zpbc9o4GIZ/DZfJ2JYP+DKB0Gw27WZKt5v0JiNsxajYlpFFgPz6lbAMtiUO6WBmyyY3oE/y6X2+kxw6oJcsPlGYjT+TEMUdywgXHdDvWJZpOA7/EJZlYeka3cIQURzKRRvDEL+h8khpneEQ5bWFjJCY4axuDEiaooDVbJBSMq8veyFx/aoZjJBiGAYwVq3/4JCNpdV17M3ELcLRuLy06frFTALL1fJR8jEMybxiAjcd0KOEsOJbsuihWKhXClMcN9gyu74zilJ2yAF/kpA9/kGDv5f3gy+jwP5uh18v5FleYTyTTyxvli1LCSiZpSESJzE64Ho+xgwNMxiI2TmHzm1jlsR8ZPKvOaNkgnokJnR1NBgMBjeDHp9Rb7e8NqIMLSomefufEEkQo0u+RM7ajpRSOpPlyvF8gwZ40jauULF8aYTSHaL1uTeC8S9SM71+/huZWvaP5Wj6bX6bXfwF/Olt+/rZnu8NBkfSz23o52n0s3X6eUfQL5y76XRy/cN8GtozdoEf75yf79NPCARpILOEKeQMYT5ea/uC47iULiUpX3QdURhirljDXMhcRrR1JHn9urzAVOU1tfIabclr7Ze3pmDVE8cwE0uSRSRS+yWc5+AyIDQjFDL0HEIGnwMuFqIN5bnTvkC3ayh4FN/uecBZLXshG0Li8NXfsaA4dZ/3TdXnNUxsqyUkQEHSK0Xl5j6XlX/0VsKK6HBhIlJEOsqztSAVelwFtiuDSH/XRAaMcZTy4Zqh0BTzynclJxIchuIy2pRVT2otcHIOD56WQNn7Y4fMWIxTLnbZfCg+X4p6D0cofiA5ZpgIcUeEMZJoVGck08HZF5hM5Dlxbhg/54i+6qLSNaBverpAtPqe23YgroGW2RF0Lx0FsY5wa8XHVQhfZVnMaawgnW2oOV6DhAsOJHGMWNO2UWqduidpKCAYX1F01jQOacr8lljMs7vZdOg8/MxZ+DacTPIbr3tIz/DfyXsRShHFwaodGcG8iVzkMAMCA+qy3nXfM1rPeoZzadUrm22rgG2/jMAqYtcurUeHrHYhCmSUhldiBy1wxDDPcVDngRaYPQrc/CaL0VNlpr+QnrAaLCuDBw6MP4TAuzuGcjKjQdml7qjQDNIIsf0ejcLaXl9lVgHiaCKutFEU8wrxWn9DoCMkr/BAMH+yjUvY9YC3m5FcPLc8qrqhb56oud9oFspCGOVEK4dZP/av+5DaIPXLKDzbbN2snbbnruP7BMVTy8HZH8u/zR7abfYmprpdM82uTt225FW7REXeM99D8xuptygn3ENrkXgKku17aOv/s4d2G63kSffQWlCm2kxuaoQxTGGWjwnLzxeJZ3iXjfbP8E+429JTUeNHIbCv+9uqTbVr29WN7e3aTKnSR9v2y21bwlwjMt6SvDckXz4/fb/F4O6QV+4Rj4Nsi6uv/9cGR+VyY4sz7CgooBkVtlpSupoy3+KWyPytXviFOJ9oXvHxfrSrfcUHTBs49rv6hJ3esz8DVki65om3t+YBPfEHy3dXM9PSlK7Twz2gI/+A+264ltsuXD7c/NihKGab34yAm38B -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-2-single-db-snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-2-single-db-snapshot.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-3-single-db-snapshot-transaction.drawio: -------------------------------------------------------------------------------- 1 | 5VpdU6s4GP41vbQDhM9LbXXP7LhznOPOnD1XTgoRWIEwIbXt/vpNIHwmWByLdrteaPOShOR53u+6AKt0/xuBefQHDlCyMLRgvwDrhWF4usZ+c8GhEpiuXglCEgeVqCN4jP9BQijWhds4QEVvIsU4oXHeF/o4y5BPezJICN71pz3jpP/WHIZIEjz6MJGlP+OARpXUNZxW/g3FYVS/Wbe96kkK68niJkUEA7zriMDtAqwIxrT6lO5XKOHY1bhU6+5GnjYHIyijUxbQzVVxnf74/TaxvmVXuzT8mYdXYpdXmGzFhcVh6aFGgOBtFiC+ibYAN7sopugxhz5/umOUM1lE04SNdPZRbIcIRfvRc+rN7ZnWIJwiSg5sSr0ACMCExrhiuGvhNy0hizrQA00IoaA8bLZuUWEfBDDvAMk4MUgFJfgFrXCCSbkamI7n3N2dCD6zD5+ngA8o4GtwPjl84D3wcXwg8YUj0DmaASyiBtrnOElq5DKcsUk3IYFBzNAZiCuUa6M1ToSu1Ue3UdYOvLqngnc27TSPw9tDsKuIEcz5lHQfcue9hLsCLH1MckwgRU8BpPDJZ8ggMkCe6ewztF1NokdS7ZUDrHLaM24Z4svLnxORYg9I0WVSVCpvGjNRYkmUrGpQmXjNYGV/ViWw3APbMOUeItsUeQNIhz0GDH3LgQh9V1gGTOIwY8OGQw5zzILbtXiQxkHAX6P0WH2fdgqe3D5PwFQYj6k0npmIso/bDt7SJM4Y2HV+Iel8Deo93KDkARcxjTEHd4MpxakCdYpzFTnHDJNyP8f3hslTgciryiptDXq6ozJEY+3YsxuiNzBEy11acvhRMOzMxbAjMXyd5wljoyTpYk3NGMYpF0xkYjZbcyUm7nEWcBK0Hyi8aDZ001w61rG0TJ02zMSG91/yfCHKEIn9MiHZwGJIOvdiGgQaVPm9m7Wjze73XGtp9Pk1LE82N6+2wS7FtllLT05ynQe9xTLKgmteJ3M+ElgUsd8nBO1j+hfnm52yGv3qPFnvhSqUg0Nn8MAYY7fg/HbMCAVSuT0AmR0Ob4mP3riWiNoUkhDRYzouk9ZhRFVH1jKCEhYkXvvHVVEk3vCAY3aR1gMbfQ/cONt6i+qaYlW3bh9u5AxcuTfYqMJB2qjUmObaH1AiuUewru3wYj02y02HHttQZKufGkD1d/UhzryQBkOt/vpCWp/QqLjwShq4Z1ZJ63J3Y7yUNv4/pbSpnVsprctNjzZMaI8ZzIsI0+KSKbGlkKFNrX/no2VCi4MnZY9iiAmNcMh7DLetdABWO+ce84S+ZO1vROlBRBu4pXgki+zkkE3ayAE06uyyTCL1ejRjFtl8nXQsjdRH8siPJoiDRj3QBmXASILIsnV46EzL+YRi/D1At5TvabWq2vG0SaPcd5HU7nzqyyAuXuS47Ni25iprShMYa8uZORR7dt+XKDy8rX92QSk3cWRvcqSgnG7Cxy3TUUP4SRWeokZwjKYR8OE6zxmcaO46b0JLqLaeDNOxuNphegP9l7AMHd8rUxfyAJKX72xVTMuGwVKzFEmx6yPfVxnfxrX4978nMTJLHxTprjMpXAN7NhMz5J5NJ4/6k8CsgH7VvNbucXjBCZU1yHEbu/2qXMqQOyEXbyGGd34WMqFO/4SUdnocO5qKehPj3RhXX5SJShsN3am00UgIG09ppwc5Nmz/l6qa3v5DGrj9Fw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-3-single-db-snapshot-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-3-single-db-snapshot-transaction.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-4-standby-database.drawio: -------------------------------------------------------------------------------- 1 | 7VrbcuI4EP0aHkP5fnlMuCSVyu6mlt3ambykhC1sBWM5sgiQr18JyxhZmsDsGGaGWV5ArYutc/q0ulX07MFifUtAkf6GY5j1LCNe9+xhz7JMw3XZF7dsKktgBJUhISgWgxrDBL3DeqawLlEMS2kgxTijqJCNEc5zGFHJBgjBK3nYDGfyUwuQQMUwiUCmWv9BMU2F1XOdpuMOoiStH216YdWzAPVosZUyBTFe7ZnsUc8eEIxp9WuxHsCMo1cDU80bf6F392YE5vSYCSX4Ox08PN2D5PdbbzlGMxwYV2KVN5AtxY7Fy9JNDQHByzyGfBGjZ9+sUkThpAAR710x0pktpYuMtUz2s6QEz+EAZ5hsZ9vj0Xg8vmY96uvWz4aEwvWeSbz+LcQLSMmGDRG9jiugFM5keaK9aqhxDWFL91ixayMQ7pDs1m4AYz8EZnr8wnf8ajlPm+nrX6u74uoPO3y9Oz1+jh/643FH+Hkt/HwVPyfQ4GcFHeAXr7z8dX7zZH6eOEt6hT7duy9fhx8HCJBIRAmTwxmDMt1hO0NZVkOX45wNukkIiBFDrGWuYK4VbXUEry/Da5sqvGaog7cL99TCax2GV0Jw3xNTUPAhi3XCQ3sfrEq7H2FSYAIofI4BBc8RAwuSFvLMaWfACwyFHsW3B77tbofNcMMQn779dERK0PL5UCXF1nDiWCeixFYoGdSgMvOQwcq+BltguTo8sOAhIp+WxQ6QPfYYCvSjCCL8XaMMkKEkZ80dhxxTxE6+a9GxQHHMH6MNWXJQ64CnXdwWPLmWRjyOVjwnIso5rB28pBnKGdh18qH4fA3qA5jC7BGXiCLMwZ1iSvFCgzrFhY6cQ8KkPM7xtUH2XELyplOlZ4DQ9HVCtIa+d2ohumYrOlpe31WPHw3D/qkY9hSGr4siY2xsSbpcqbXPKdc8kokutKZNo9Rz6gHnMSfB+BMmF83GMUmZPmn4di5Wxf3ydeI+vpQ0fp/M5+XID47JGX6cuJfAHBIUbdORKSjblPMYZgDbALqodzP0jZNHPcOT2HUsox8EqtjCWoH7FHtObe2cZDULUUiGeXzNK2hORwbKEkUyH3CN6CdON3vJqvV5r2e4Fp6wbWz2Go+MMLYJTu/HGirxkkR1lvrBCU0BSSA97NEwlmp9lTOpjFTpqG0EZuyEeJNvCHQMiSc8YsR21riEY7RdQl6i2reYtV/QtxcKW3G8fVBWwCgLbR1mt+3/7kNqgjSsVXix0do1nb7vyvwFmir6nAHbPazln6aG9m1L9umz1tBaeNUsUYH3wmto35FJOWcNraXEVyj5cg1t/To1tO/JPJ21htYSZapMfXWecVR+8NG5fzg/uNAEwXcDeSHf6lutjPLEOYKlXvBOKMjj6UYI9bLThcA0W7mC17c16f9Z67sjDjSuhIloYkJTnPCbpVFjbUHVjHnAvJDbcvYCKd2IRAMsKe5M1kfr2j1S10cL9tuA/7+y7jApCQxHHyX3g7S5S9alutrdibB7ktWqaLLJo5TgHC/L7X3WL3DF6NWuXZNjm985E7GOqJJ+HPHFqJyrggOGy2oNneC8oTk+eRUQhhKntkZwnnnmeyxLTTAnOSjKFNPLVVfQvsB3mryu+6yCNZs/qVR5YfNfH3v0Lw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-4-standby-database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-4-standby-database.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-5-reporting-database-application.drawio: -------------------------------------------------------------------------------- 1 | 5Vlbc5s4FP41fowHENdHx5dmOtndTL0zafqSkUEGNYCwkIOdX7+SETYgbeLtmDbN+gV0dP++cz4d4RGYZrtPFBbJHyRC6cgyot0IzEaWZRqOwx/Csq8tvuHXhpjiSDY6GZb4BTU9pXWLI1R2GjJCUoaLrjEkeY5C1rFBSknVbbYmaXfWAsZIMSxDmKrWexyxRFpdxz5V3CAcJ83UphvUNRlsWsutlAmMSNUygfkITCkhrH7LdlOUCvQaYOp+i3+pPa6Mopyd04H96eQTcH9rP6zL+3TOyMNLcCVHeYbpVu5YLpbtGwgo2eYREoMYI3BdJZihZQFDUVtx0rktYVnKSyZ/LRklT2hKUkIPvcFivlgsJrxGXW4zN6IM7VomufxPiGSI0T1vImttIKGUzmQ5slydqAG+tCUtVkDjTlC6Q3wc+wQYf5GY6fELXsjGsr/tV5u/q5vi6i8QbG6Gx8/2Am+xuBB+Tg8/T4OfrcHP8i+AX1S5+ebp+pv5sLS37Ap//ex8/2/4CYAgDaVKmALOCJbJEds1TtMGupzkvNF1TGGEOWI9cw1zE9HWheD1uvAeva4Nr6GD1xgKXutteDsItj0xgYVoku1iIe1jWJVgHBJaEAoZeowgg48hBwvRHvLcadfQ9Q2FHsW3px5wDs3W5MSQ6H74XYgUv+fzgY4UlRPbGogSoFAybUDl5hmHlT+mB2BFdLgwExKRr8riCEiLPY4Ce01BpL9rIgOmOM558cihwBTzk28iKzIcRWIarWR1Re0CPDmONfacDlWOpVJlauVpqPCx3w4fsmUpzjneTf6huH2D6y1cofSOlJhhIvBdEcZIpgGekULHz1uxyYTUibFh+lgi+qwLTNeAgenpYtGaee7QseiYPYG03LGjUKxj2BuKYVdheFIUKWfjQNLHjTajy4StOaqGijRtHqUeVLckjwQFxhcUf2guzsnKgoG4qIrP283Suftesuhl+fRUzj3/nKTh/ahejHJEcXjIR1aw7FMuFMyAwIA6zbueecbQmucaZjfSgCbSgkYG2/y6dmO9OMNqDqIwjPJoIu7PgosUliUOu2SgHWZfBdd8kXXpoVUz20k3OBT2rcIdZ4tvQnD7egCVZEvDJkd95XBmkMaIve3OKOrc9FXCWoQ4mnBrbBSl/HB47n4f0DEkZ7gjmO/spLx2T3n7YVzvW/ZqX+f7AwW9w7R/RtbAKAMdHOa47R/3ITU3mjUh+GGl2jWUJNXW3CeGOjn17u3/TnL9/pNUz/iVSapers/4SvKu9PpVR/3dBdtw++fyuZLt9rNuB4wN23c9y3Fd4JnuTxVwoOZ5X1BBeJjnMTf/L+5BnvnT7kG8ePrWX3N4+ssEzP8B -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-5-reporting-database-application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-5-reporting-database-application.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-6-sep-reporting-database-application.drawio: -------------------------------------------------------------------------------- 1 | 5Vpdc9o4FP01PIaxLX/gRwKhmU53NhN2Ztu+ZISt2GqMZWQRIL9+JVvGH9IC2+CWsHkBXUm2dc49R1cmAzBZbj9RmMV/kBAlA8sItwMwHViWaTgO/xCRXRkZGaMyEFEcykF1YI7fUDVTRtc4RHlrICMkYThrBwOSpihgrRiklGzaw55J0r5rBiOkBOYBTNTo3zhksYy6jl133CMcxdWtTdcve5awGi2XkscwJJtGCNwNwIQSwspvy+0EJQK9Cphy3uxfevdPRlHKTpmwyT6vV3Pn4UfOwrf5y0t+541ugHzaV5is5ZLl07JdhQEl6zRE4irGANxuYszQPIOB6N1w1nksZsuEt0z+NWeUvKAJSQgtZoPZ3Ww2G/Me9XnlEl4RZWjbCMnn/4TIEjG640Nkrw0kljKbLFe2NzU3oIrFDVqAIYNQ5kO0v3aNGP8iQdMD6L+RlWV/3y1Wf23us5s/gb+6vzH7xs/2fG82OxN+dgc/T4OfrcGP6/b9+IUbN1293H43v83tNbvBXz87P/4bfgIgSANpE6aAM4R5vMf2GSdJBV1KUj7oNqIwxByxTriEuZK0dSZ4vTa8wNTAa+jgtfqC1zoObwvBZibGMBNDlttIePsQbnIwDAjNCIUMPYWQwaeAg4VoB3metM/QHRkKPUpuTzzgFMOeSc2QmF78nYmUUSfnfR0pKie21RMlQKFkUoHKw1MOK/+YFMAKdbhwKSwiXeTZHpAGexwFdshBZL5rlAETHKW8uedQYIr51jeWHUschuI2Wstqm9oZeHKqLVXy5ACVJ1PrTX1pxz6uHbJmCU452FX1oeR8BeoXuEDJA8kxw0SAuyCMkaUGdUYyHTnHhMmEz4lrw+QpR/RVp0rXgL7p6YRoTT23byE6ZscdLXfoKBTrGPb6YthVGB5nWcLZKEi6XqkZbSZszT7Vl9K0RZS6S30haSgoMB5RdNVcnFKS+T1xoT0RnFAxXI7rRShFFAdFMbKAeZdy4WAGBAbUed7t1DN69zzDGVpOW2y2Rmx+5YRNil27ip6dZLUGUUhGaTgWB2hBRwLzHAdtPtAWs6+Cbv6QZetbo2e6lZlQNHaNxgMnjC9C0HtYQzlZ06CqUQ/szwzSCLHjGY3C1lFf5axBiKNRXBWjKOH7w2v7BYGOIXmHB4L5yuqU6Aje7iq5XLec1TzPdy/kd/bT7jZZAqNcqEiY/bJ/PofU8mhaqfBq3dox/BbmjmGfWMP059ejj2TYl1+mun77HPJry1S9W5/wkuSi7Ppgoh71awAu27ANt7svn2rZbrfwdsDQsEeuZzmuCzzT/aUGDtRS7xFlhOs8jXj4f3EU8szfdxQ6mPwfw84vvf52fWN4ieW3Wjs9IhgWx91CdFcsuI4FXkAFBZz3b6979Znv2yOvZIv8qGcaoBbT43yXBjGhKVnntUCve1fsvou3RzqRnuttPG/Wv4KXTNb/TADu/gE= -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-6-sep-reporting-database-application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-6-sep-reporting-database-application.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-document-database-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-document-database-example.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-graph-databases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-graph-databases.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-fundamentals-relational-schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-fundamentals-relational-schema.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-key-value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-key-value.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-relational-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-relational-icon.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/database-session-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/database-session-store.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/databases.drawio: -------------------------------------------------------------------------------- 1 | 7V3ZcqM4FP0aP8YFEpsfs/VMVU9XpSazdPdLSgbZZhojN+DE6a8fCSQWAQ5OsI1tJQ+BK4GWc3V0tKCM4O1y81uEVosvxMPBCGjeZgTvRgDommbQP8zymlksTcsM88j3eKTC8Oj/wuJJbl37Ho4rERNCgsRfVY0uCUPsJhUbiiLyUo02I0E11RWa45rh0UWBsI7Nwv6v7yULbtetSRHwO/bnC564A6wsYIrcH/OIrEOe4gjAWfqTBS+ReBcvarxAHnkpmeD9CN5GhCTZ1XJziwNWu6LixHPJq8jtCN4skmVAb3R6mQZ/anlY7/IwLVyEw6ScXNv7vv74+6+fdvj0aj6R14df5uf7q+9XPJFnFKxFIsAK6PtuEjSl6dJKIpGHozTM+rlmRb3Ri0sa4SWv8zycuZBZieTSvKyQ5/nhvBLVqMQqyiqM/OXXNFC8VcviLjiiDUFZlq9cEgRoFeMsTn5XStCa879ZiaeENgLZGDXmq3AdlgyJsjSoAyHbnRggz0o1UHhXJZ+8CKsNS4gEFK407sSZzoC+JbcL1oACfx5WMhbgWdL4EFqu6EU4jVdZ4vs1ZXmkzsiyqTJ+3IwzY9TVsT/kk55smdbSZZmpRTv8gzvVSVtjx2gGPNhTe27MYocCH7FeLq28l+4HzNjUSTJ7JheEXVIuCd4we0m9xElEfuDbrBppFOhq7JeGzPwgKNk/pT/UTp5xNAtS/cWiUEsKBWbyRssTpZFoYpJgLCSSnss2KogxWeIkoqXRxAMOV2xcCwMNZveFxqHykcdZlCSlbnEj4mp2nr+7UGT0gouy9JZM/2N6GGgBmuJAia9zFl/9iYotbfig7z4B3jwt7bEbt85ib4bifNwK3hrngRLv8XHh6dOzIaYq3qJnsDs701tO0DuMpqEaTV8SoQ+AhgdD8b1R9z6HyK1D5i3c/k/amIEGdowPd+8CTrz7FCU3d4xv9VdTA6kBZ8f4k1P3lY7l1PVdH9je6i5ykGoCeZCq11SQ0dMYtZvsMZTsUbJHyR4le5TsUbJHyR4le0b7kD320GSPqWSPkj1K9ijZo2SPkj1K9ijZM9qD7LEOONujdiRcmKS5XAFzIp3soR48wo6EyVnuSIAH25GgyFqRtSJrRdYHIWtdO0u2thRbK7ZWbK3Y+szYWj9Ltp4MbLev3r7dd2EJBP+kdQS0x4RE7DvmAuYiRtvMVBWUkIR4Cx4lMGckTPhn2sAQ9/ztLJyB4rsouOZcsfQ9jwXeCPJwKUCsZfYBIpBW7UzdrIGoaw0gGruD2BG1pmU7CYF4gVbschbgzTX7Rp1WBg49fnnnBiiOfbda7aJAOsgicwissWmkBpr3r7xxpDff2M3Y0ifCcLcpB9+9lu8ecOTT4qfqoGhe2Kt9Gi/hArQERXOcbKkP2IxfCR+zAR5hi3CAEv+5mo0mzHgKD8QPk8I9DEuvuAfUJNhjso5czJ8qkK+9yNS17S/K6qH2otSF8mJ/wKus/XgV3vhJ6jZjk999K4UULsNuKh5Teij3tjc8rbtTZahsq46OzgeO6nwSN+WTNzs7nzRHD50DO5/doSOivcZ6GaLoknsj05DoxrKP3BsJzylB9xmzHNdP/yj3NQs/wY8rlLbBlwixBW6XLBl5lPScOAwF8Gr/hJZ+wEp+m0alfoDCmP758tiASxu0PaBgG9Xm0rSkZTeAACf7AqF+Ckq+JHm+MDjm0GDo0Id27S/F9bdK3/lWf1nVZnnnuf/+UtDA2x1mC6aH6TEdTXIZ+509Zs335DHbnntMUO8xM9qte9zZtPca7Zr18fRh27vTSrtnDEPN9Y8Ow+RyadfuSrvOkGgX6pIvvJt2LelFe6Zd2KZ24fm2d5l2YcOhBQdt77Bd7Z4xDLLrHx8GcLG0C7uqXTgotQtltnwv7db4e9+022WhIiNiwQR3KEFTFF/gHJE9kcBq0GeHnSOCHVYsULzKDted+Ru2CHezYs6Eo/tnWuxYMLQ4v5a1Zw/Fi3y5rnUtkIOY7lp4ILGf+KRS4QKaP6QIU5IkZNmAXUJWTcBJXqJpuuPcZVlO58yXmzk7vniMfq0jPHaJh5/oI7iPjkHqn5uWGZtWGR1zrG+hlI8h3mEmRCHeF+LmEBBvmsJXiPeEuKzBB4F4ffZDIb43xAfB6k0TLbIMuyPueolT9XjBGkza+mM5x9ZgRn3mooYAWSeBH9K6F//oQOP1WKp6vi+xBonlObZl1PCjIfDaNKAuN+2+WmizB+hA8gCWZFcyqrbsl9gYL7xZ/OQG67g3B7FkPrdq/pF+lyn7R27s30Ha/5NCaQ2e18HFNWhdNyqAOQ3fyRy4QTdJbLUfu2yMGvN1ovuxB7CLejA7tNXpDVJ8dXpD1/jq9AZ1ekPbA9tb3UWe3gChNJABdd1z4LM62/eKKt2jdM+pvVvpHqV7lO5RukfpnmHpHnkC1z667mlablG65wOtVekepXuU7lG6R+meYfuK0j2H0z3G8OZ7umw6UN8GU8kqfQ1+/CVKsfG0jx3iV9pYA+UjBLQxzI6eaN8oTm/ef+7Em5vAswXYY+3thtL+IMuUUOy6t1s+4MSSW/Ke93abTfsO3ukkWsU/wPbvCPp0haN+XWXIY1X5W9T3uoItnyexb1cAvfJF9aMSx7SOyhb2UdlC7hvezRbSJyWOZvfkIvQ2IkwRFtHZBqwvxGPHDd7/Dw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/datastream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/datastream.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/devops-05-continuous-delivery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/devops-05-continuous-delivery.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/devops-06-iaac-2-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/devops-06-iaac-2-overview.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/devops-06-teams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/devops-06-teams.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/dns-record-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/dns-record-types.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/encryption-Asymmetric_encryption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/encryption-Asymmetric_encryption.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/encryption-symetrickey.drawio: -------------------------------------------------------------------------------- 1 | 7VlNc+I4EP01HKFsyzbmGAgkmcrWzla2djZzSQlb2JoIy5FFwPn1K2H5U0C8CTCZqcABq9US0nuv2y27BybLzRWDSfQHDRDpWUaw6YHLnmWZhuOIH2nJcotneLkhZDhQTpXhDr+gYqSyrnCA0oYjp5RwnDSNPo1j5POGDTJG1023BSXNf01giDTDnQ+Jbv2GAx4pq+vYVcc1wmFU/LXpjvKeJSy81VbSCAZ0XTOBaQ9MGKU8v1puJohI9Apg8nGzPb3lyhiKeZcBoxf6ZNnfs/nT3+vrpP8nGD1d9x03n+YZkpXaslotzwoMGF3FAZKzGD0wXkeYo7sE+rJ3LVgXtogviWiZ4jLljD6iCSWUbUeD2XQ2mzmiR1+v2sIzYhxtaia1/itEl4izTLgUvSOFpVKTq5rrihrXVraoxkrpCJUcwnLqCjBxoTDbjV/I4qt7+g9dmX4//eu78+XmftTvAB8KhKJUkzIe0ZDGkEwr67gJcOVzS2miYP2BOM9UeMAVp03QFzTmqtN0D0HNIQsRP7AfFa5yzQcJYYhAjp+bUbILXTX0K8ViKSWRoEWkRlBKV8xHalSLo3IZb6fNep02mCZ5QlngjeRmnMjFIDZ9FqCmhdqLmJbEBTCNShb3hkRMY8k5gXNEvtIUc0xjYfaRnFx0yGjAIgHdthzmlHO6rDlcEBzKDi5FMoaqVc6zwITUwtAwTM+7zJecyC0uN6FM2QP4smJoILzR/xFS95gtU3lBtaUH7dAZWHrUeqcK2tFvFrTeeYLWHf7coHU+g/ZcQWu7Hy5ovU/2z8X+0P5w7JumRv8l5LBniQIMmJI9FPssS7bIV8ZHlGkqoStOcCzILU4MhkKxBr34zuTqxgLwAKOqT0lBq3LLAS0OF9tPW2nHEsyeu4lVtNWm5V9qsaGJap3aA4byHH7jy/WMRTO/anoFAvmHCu8HifJx0o7XFN5wR32/o7w/WXVvgteTzjHk1BLNZGgCc7YvDX04Je3Jsrq6lGRQ8CAVdBzJOK3ysjwi1jQDRoOhrcvGOZlshscoMGuUoDi4kA8zJLGE+o/SRObbdsHvVi2Q8cJPiUWMnGGy93Du2M7YtbVqtn1PEfSw7F/ZOXCK5r3y3TYuN41Wplp7+c2zTId8X699ydPQuH28Gxk3GyeLrl+iyXzaBx1r35ocTEMR/856uC092+xWD+uFtdO637aVmaNwssLa7FBbfer1OHq1fqJeWzIz36pX0D4dnFuvv9gB/lX1dBXFOwVgeaJoN2ofp0ljx/O8rod2/mpPdGI9FMeT30YPZ3oK64DyEPdeCbjgbBI4lFZrCpjWzoPGBQkpwzxaarqoWDff8HLDvJDfkmutbN1B/95KFrQhBHolWxS3xz79HCqt6kdu9Ith6rYfPp8OU9Gs3uXlsq5eiYLpfw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/encryption-symetrickey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/encryption-symetrickey.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/horizontal-scaling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/horizontal-scaling.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/kubernetes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/kubernetes.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/microservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/microservices.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/operational-continuum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/operational-continuum.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-1-SingleDataCenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/private-network-1-SingleDataCenter.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-1-SingleDataCenterWithDB.drawio: -------------------------------------------------------------------------------- 1 | 3ZjRcqIwFIafxst2gADqZbXaTutOu+vOdNcbJ5IIaQPBEEX79JtIUIG0dme1s1NvJCcJge8/+XO0Bfrx+obDNPrGEKYtx0LrFrhuOY5teZ78UpFNEelYnSIQcoL0oH1gTF5xOVNHlwThrDJQMEYFSavBgCUJDkQlBjlneXXYnNHqqikMcSMwDiBtRp8IEpGO+p6777jFJIzKpW2/W/TEsBytXyWLIGL5QQgMWqDPGRPFVbzuY6rolWCKecM3endPxnEiPjJh8N0S8849Gk/vOk/BfbpaThcX+i4rSJf6jfXDik2JgLNlgrC6idUCvTwiAo9TGKjeXIouY5GIqWzZ8jITnL3gPqOMb2eD4WA4HF7JnubjlmtjLvD6IKQf/wazGAu+kUN0r+tqlDqZZDYV7XwvDShxRweq7AZCnQ7h7t57YPJCMzPz676yheNONrPFz/w2vXgA3cXt+fm57W57ODwRP7/Gr9vkt0NV4eefgB/K/WTx0pvYv8fuUlyQX3fe89/xU4AgD7RL2Aonglm0YzsnlJboEpbIQb2QQ0QksVq4wFzuaOdEeDtVvAAY8HoGvPYp0tOI1zmOt0LwMBMjmKoh8TpU1n4J8wxcBoynjEOBpwgKOA0kLMxr5GXSzqHfsRryNHK73wbedtic7RVS07efE4nSrYliG0QxaALOJQloSNIvocrwtcQqv/oFWMeHsTKIZJalOxwH2kkG4j3/0Nlu2BeQkjCRzZ2CiiiR596V7ogJQmoZo2FVLe0EKnk1Z/ecpkq2a3KmE8i0ynr27eTemazyl+fZ1J2MgseP7ByMZKmgm4yLiIUsgXSwj9Y47ceMGEu1YM9YiI12NLgUrCpnsaZa6M1DX4cytuQBfifvdMEiIA+xeOfF3xCKYwoFWVWf4+Sbwz1OnS0FJYlM8bLga/hMmcojOMP0kWVEEKZSesaEYLEh14VSo7kljpmhUGeLujek0wzzlckJfQt27bbJ/Jzrtn9u8/Psmvl5zW3VNh1IZ3M/vyHwVZpSKcZWo6/rb6AqhGuoXM9lb8a6tWlvI5YgJYH1A4dfWouPVMHdzzxqPlADl/4TbKT3oS3EIz8kZgW20WwXgMFLuIX5UDioUUVpQL3rtmXVy2llTBYEFjxqWA0hDHK9qY1f0wb4TW18k2HZ5xKnWa6pEm0GM/xf75B/U6H9aW4lm/t/QLZ9B38kgcEf -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-1-SingleDataCenterWithDB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/private-network-1-SingleDataCenterWithDB.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-2-2-datacenters-london.drawio: -------------------------------------------------------------------------------- 1 | 7ZhdU6MwFIZ/TS91gAAtl4rtdtR13e067nrjpJBCFAiGVFp//SYl0NLEr90ynXHtDeXkizzvOScHesBPF18ozOOvJERJzzLCRQ+c9CzLNByHX4RlWVkGxqAyRBSHstPaMMFPqB4prXMcoqLVkRGSMJy3jQHJMhSwlg1SSsp2txlJ2qvmMEKKYRLARLVe45DF0uo69rphjHAU10ubrle1pLDuLbdSxDAk5YYJDHvAp4Sw6l+68FEi6NVgqnGjZ1qbJ6MoY28ZcHfhz50ABldXxnd7cn11uiTsQM7yCJO53LF8WLasEVAyz0IkJjF74LiMMUOTHAaiteSic1vM0kQ2F4ySe+SThNDVaDAajkajI94iF0KUocWzOzAbLtyjEEkRo0veRQ6wbYlSOhP3puq+XEsD+tIWb6jSdITSHaJm7jUw/kcy0/PznsiDZd8spw8/y3F+8A14D+P38TP+gp/d9/qjUcNPgaVB+jw/Z4ufp+Hn6Pi5O+AXlm72cH98Y/6e2HN2gH+dOnfv9z9IA5klTIEzhEXcsJ3hJKnRZSTjnY4jCkPMiW2ZK8x1RFs7wjto4wVAxWvaGrzmLtxTi9d6HW+L4KYnxjAXXdJFJFL7ISwLcBgQmhMKGboNIYO3AYeF6BZ57rQz6A4MRR7Ft/0+97aVcGStkBi++u1IFG9LFFMVxdJoArqSBCiS+DVUbj7hWPnFr8BaBt+cC1ORJLJpkTdINvTjHNhLOUR6vCY2YIKjjN82KgqqmJ99R7IhxWEoltEmrXZa6yB8HOuN4WN1JZX9evSQOUtwxmHX5Yfi9TXUczhFySUpMMNEwJ0Sxkiqoc5IrhPntdBkItOJuWFyWyD6qItL14Ce2deFonXSd7sORcfcCkVHFXigS4+dxaKrCHyU5wkXY6XRh400B7SFsDV1VFeBpq2i1GPqnGShkMD4gaIPrcVbajKvIy3oWVHY3pmH6eV1MBubF+Xw6UNVZK69z4pMi/ezInOd/VVkWknUiuzzmP8Xfft7POa1Aqt13H9xzLve/o55rQ6OosNLrz7W//Pqs31Odfnqw2/X3xxXbRufbsHwDw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-2-2-datacenters-london.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/private-network-2-2-datacenters-london.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-3-2-datacenters-london-mumbai.drawio: -------------------------------------------------------------------------------- 1 | 7Zpdc6IwFIZ/jZfdIXxz2VpdZ9vudtad6W5vOlGiZAsEQyzaX79Bgx8krXaVorbeKCcB5Hlzct5EG0YzmnylMAluiI/Chq75k4Zx2dB1oFkWf8sj03nE1dx5YEixLzotA138jIozRXSMfZSudWSEhAwn68E+iWPUZ2sxSCnJ1rsNSLh+1wQOkRTo9mEoR++wzwIRtS1z2dBBeBgUtwa2N2+JYNFbPEoaQJ9kKyGj1TCalBA2/xRNmijM6RVg5ue1X2hdfDOKYrbNCfQqTU3vysP09q4/6IDvWev5DAg5nmA4Fo8svi2bFgwoGcc+yq8CGsZFFmCGugns560ZV53HAhaFojlllDyiJgkJnZ1ttFvtdvuct4gbIcrQ5MVHAAswfEghEiFGp7yLOME0BEsxmnRHHGdLbZwiFqzIonsiCMV4GC6uvSTGPwhoaoDeMxnp5v20N/qVdZKzH4Y36pyBt/DT/oOf6XhOu73gJ8FSIH2Zn1Xi58n8DEvFz94DPz+z49HjxT340zXH7Az//mb9fRu/HBCkfTFNgBynD9NgwXaAw7BAF5OYd7oYUuhjTqwUnmMuUlrfE153Ha9hyHiBqcAL3Krw6pvxrhFcHYkBTPIu0WSYz+1fYJYaX/qEJoRChh58yOBDn8NCtESeD9oBtF1Nkkca202Hj7aZcGSpUH767LUnUbySKEAWRVdoYlQliSFJ0iyg8vAlx8rfmnOwusYfzoZRPknEvTRZIFnRj3Ngr80hYsQrcgOGeBjzw4WKOVXMi9+5aIiw7+e3UU5a69NaBelj6Vumj16VVObm7CFjFuKYwy78hzTqC6jXsIfCW5JihkkOt0cYI5GCOiOJSpxNqcnymS6/NgwfUkSfVHlpa9ADjioV9UvHrjoVLVBKRUsW2FVNj5Xloi0JfJ4kIRdjptHJZppV8lGLzFsRoqpEU7oouUxdk9jPJdB+ouFJa7GNJ/Mq0kK9JDgsR7bTgsE263RkSrwn4ch2E8Wqz5EpJZEd2Ucv87vp69RY5pUCyz7uWMr8bkJ49ZV5pQ6WpMNrSx/9qJY+e61T77r0UUolO+NXXMAe9rV2wufqmz1UdftaSn7OCbkot1yw63dRW2xbn7iLcu0Dc1Hemyb349rX2mv61D+5F0Pl0/HuSeHyxn/tjhfIq/gPYXk97cAsL5DX+zfjqAfxcWxtVW7L3ndra4uV/tG4MqCVt9Prt2Vgi19MTtyXAU0/MGMG5GX3Z7XfSeHyrnL95f54f8jaUQr70Oq9vPD/3ONS16sq10H8cPnPulnbyh8UjdY/ -------------------------------------------------------------------------------- /presentation/images/02-architecture/private-network-3-2-datacenters-london-mumbai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/private-network-3-2-datacenters-london-mumbai.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/queueing-01.drawio: -------------------------------------------------------------------------------- 1 | 7VrJbtswEP0aH2OI2n2sl6QoWjSFGzQ5MhIjsaFEgaK3fn1Ji9ptRGlsS0Fzima4v5l5HI4zMmbR9obBJPxGfURGuuZvR8Z8pOsAaLb4IzW7TOO4IFMEDPuqU6lY4j9IKTWlXWEfpbWOnFLCcVJXejSOkcdrOsgY3dS7PVFSXzWBAWoplh4kbe0v7PNQaW3LLBs+IxyE+dLAnmQtEcx7q6OkIfTppqIyFiNjxijl2Ve0nSEi0cuBycZdH2ktdsZQzLsMuL6funfB3Q9KtBl//oJv7h6CK3WMNSQrdWK1Wb7LIWB0FftITqKNjOkmxBwtE+jJ1o0wutCFPCJCAuJTTYcYR9uj+wTF6YXfIBohznaiixpQAKZcRjeVvCkNYOa6sIp9roTK6EExdwmL+FDIvAIl0ELpO/MRE6olYmsssDgOGrgMaFYDNLcNGtAPgGafCzO9hdkcp5zhxxUXuOjaTwY9HAe9I2eBoSFnvByTKPY/SXYTkkdgmmKvjgvaYn5f+X6Q0Tu2lDTfqmDeC7tciMXm76tCZZQUy2F7KR+XbQ75LSJtWEAcgK6Yh16OMw5ZgPhLvtW2aMVi1gGD5TqGCOR4Xd/uISuqFW4pFgcpHcasO4ypNxwhO6YaVSXk5kST+kSG05gow6E10d6pimP/u59Zw+d+0+id++13x/2m0zeDOS3MFhHEZECYNVm/f8zc/5b17Y6s7wyJ9W1wIta3mh51ZtafDJ/1bb0djNYh256P9QvnrUSf8PWlEinjIQ1oDMmi1E7ruJV9vlKaKLR+I8536pkLV5yeMIDB6wJ4L90ihgVg4jo7fS6ndQxrcCSuOwfs25522ru7322777sKtB/Ew3zc2U3W7h26Q9f65YhFew2xCKHJDwPIFoDTlVeOuMaFeKWdA7cMD9Mkq1k+4a207jSRlz5ii7VAJVWmK8qGEkcfpmHhBxX7itijz2hGCZWWimksvYbAR0RuaYo5prHMGVG8t+RUhhT2hPs0OjxSzmlU6fCJ4EA2cOlmU6ikYp4nTEi+5kg3NA247jzbciKPGG0DWRUeR6kH0ThAMWKQjPkqjhHZezWHauUr4GqniXizGfGOOwbtmDf0cW6Qatjrxtg9V+B3KOv0nXg5k/4TL/Mj8XobQepWR4LU3T4JUm+Xn4aeeLkHqlEXzh7a1aihVVaaKdcAQHM+Uq63MYrblVHsXhmlQwntI+U6f8rlmmdPuYRY/nCeVcbK/z8wFn8B -------------------------------------------------------------------------------- /presentation/images/02-architecture/queuing-00.drawio: -------------------------------------------------------------------------------- 1 | 7Vpbc5s6EP41fqwHJK6PzqXnTCfnjGfSmeY8KqCAGoxcIcd2f/2RjDAI0ZrWNqFO8pCxVhek/fZb7S5M4PVi8xdDy/QfGuNsAqx4M4E3EwBC2xL/pWBbCpzALgUJI3EpsmrBPfmOS2E1L1mRGBdKVoo4pRknS10Y0TzHEddkiDG61oc90SzWBEuUYENwH6HMlH4hMU+V1HOduuNvTJK0erTthWXPAlWj1VGKFMV03RDB2wm8ZpTy8tdic40zqTxdMR9/0LvfGcM57zNhNs8+B6uHp6//3n749JwnSw/MP4BylReUrdSJv+BHIbjH7AUztXG+rdTB6CqPsVzQnsCrdUo4vl+iSPauBf5ClvJFprqfSJZd04yy3VzoWSi0fSEvOKPPuNEDbnzPsuQMmvOG/Gn3J+Rqk5hxvPnh6e29ToUxYrrAnG3FEDUBQAXDtgLKLdvrBqwVVGkDUU/JkLKkZL90rWvxQ6n7F1RfbaChe0PfOBbWqJqU8ZQmNEfZbS29qhGRCqzH3FG6VDh8xZxvFbXQilMdpfKZ8kE/16zYF12xCP/kRLAbAYYzxMmLvn6XOtXUOSXiyXvkXLeFnOPqS3DEEszVrBYo+238Pk7QgOmOJgnJE0UTInRyUp7Ege85XTyBM9eB9nl5AsOx8cTpQZM8nklnL1pRhoqCRLqG8Ybwh8bv/yRdpq5q3WwUe3aNbdXIxeYfmo3GLNmsp+1a1bwT8kkdtLTvX+ddAzG3A7BKdiw9gW4wgq/6EuUxDXqaC/mthaxheW7bl+aP3Z72Ex7pt4+it3kLXmoE0iZKYL2yZ/Xe1M3mOmPTv21G33+4xwl7ehzvNT1OeFjrdMUzkgsLrbJKqdoYFelez9IUicgT79Ajzua0IJzQXPQ9Us7pojFglpFEdnCJxhVSrUioVng3DQeRIC7l8xebRObSU7Qu4PTbCstdtql0E858R04SQ2OCa9LkNMen4YtjHeZLOChdzEjcAK6hzoMIGVhkcuQVip6THae6/FA3qqU/qwoEoMvDWVZgfbRKlMsygGFSbfwJLfwpiWheTGPE0Ym8YDubsv2pGeFXKZYWL7rnwtW8h8bsBk+e4HqeDgm0WwzqG0F74YGFzh1B++8EPZqgbRBB8Nr07HFfjoieffJqq2eYAo6taB2l+GqbbyA1skLN5l3rtYtOwCwGXHRuBEYHwMXlRgD29TrHhhlHKR72iLIHUPwYyq+9ATs2ne0O5xzoaKT0hn7xMY64/I+yBH8QS3DAsJYAeviE95KJSLiCw9fooCUT0Ofl2Xhu0dOn1k4LEPibL6c8/8BC52Zgj48F3lPrQ6l1G0TbrGgOmlrDYBT0rG/YqSNUpN2yYQgP3LO71hwzInQiTenkl6/X9/J1z+JDfAj0MMwemPpv7DVdS91uR/1r4A9QzDrMmC/RPpQ6T5jqW7AV/gTDMsWsP180U1pFG6cK08/AFNGsv1Qt8aq/94W3/wM= -------------------------------------------------------------------------------- /presentation/images/02-architecture/queuing-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/queuing-00.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/queuing-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/queuing-01.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/queuing-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/queuing-02.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-block-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/storage-block-storage.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-file-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/storage-file-storage.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-raid.drawio: -------------------------------------------------------------------------------- 1 | 7Zzdc5s4EMD/Gj/2BhAG/Ei+rp3p111mLu2jAgpoIiMXy7V9f/0JEAYknNBrsZiKvBithBD7k7TW7sYLcL0+/JnDTfqBxogsHCs+LMDNwnFs2/L4RyE5VpLACipBkuNYNGoE9/hfJISWkO5wjLadhoxSwvCmK4xolqGIdWQwz+m+2+yJku5TNzBBiuA+gkSVPuCYpULqLd2m4i3CSVo/2vZWVc0a1q3Fq2xTGNN9SwRuF+A6p5RVV+vDNSKF9mrFVPfdnak9jSxHGRtyA/n2z7v1/T7Zs28fd+mbh7/eh3dvHPEe3yHZiVcWo2XHWgc53WUxKnqxF+Bqn2KG7jcwKmr3nDqXpWxNRPWW5fQZXVNC8/JucFf+8ZonmjEB2HZ5WTwY5Qwdzr6SfVIUn2KIrhHLj7yJuGEZCN2K2WW7orxvWLmekKUtTMAXQijmR3Lqu9EgvxBK/AGF2q/rk0+ETXEZHQnmis1fV+pjReD940kAo+ek5PJpx3gv6Jz2r258y7J6tP+ECWm1e7IgsKBo15aXf7+Glmd1aZ1WRotWHyxvLFbOzGowK08zKzCzGsoKWJpZDbApMyvBqsdiXZTVcmZ1jpVvT8xeeTOrwax02yt/ZjWUlXZ7FcysBrPSba9Wr7NCMT/CiyLNWUoTmkFy20jbmFAWh4WfgBcfCY2eCxF5LMuF4nAESckI5kxuVwrvMGl11SopWJfu8sorMDbn6T7I6IDZl6Luj6UofRUti+ubQ7twFIVKBcV7v4yZq4nu8gi9oN8z06GF266Xa44IZPh795l9wEV3nynmo2mmFuhOLdeW5kw1VnFX27Ehd+RKez+QOuKcEsSUjjhPeGw12xQNtucH7EkDtn3rh8YltecX1QiaxXBS+E/4HyxlgfwdvuMfNbXWQuHbAnvJe5PRYpPqbDtCBAlOsmI75POr3AzrtRKKijWO43Kp9e2SLy+AX7BreZ6k+YG7ljPWrmWrbqHQNoiH/O2sz093UR6qOyEEBvMIdPNQXQbh0lweoOekeVkeqlsg9A3m4dmaeahH/1D94vvb8vCdqdkP9Xgfugbz0G4/1CN86JnLQ7/9UI/pYWAwjx5v5EV51B1PxcUVWqG9uh3JeMshlp7Nqe/wF4ym/InlBIypfMVfqF35jqL8G7x9NswfIi0J1x9GZbz9SD1/CyoGeUXktaKfyhwMPgsrkJ3MuoPBzhwNHg5LdzTYmcPBg2FpDwc7czx4OCzd8WBnQEDYVFir5cRsVh1AnWENgKXbZoGJHVunDEu7zQLqMXeGdQ6WbpsFBiSzz0lMP5HEVB1kL5LFtPK7k+t/ZzGtpP9lGiuLKZAG/FoWkzyui2QxATUfQGQxGeQfWkleO+1ZTKAnK8AgHoH8DU13FBqYnRWg8NAdhQY9WQEGZZXJPLRHoUFPVoBBWRoKD91ZTKAnK8Ag+7HyJmY/6ocZaj8UHrrth9uTJW6Q/ZB5aLcfrupUMcl+KDx0ZzG5E/sRgDETaZRAi+5EGndi/9U/pvIVj6F25asnb/OymOQloT1fxlXP3+ZlMclrZUQqvNj8XFblamx+dQzc/gc= -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-raid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/storage-raid.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-types-01.drawio: -------------------------------------------------------------------------------- 1 | 7VpRd9ogFP41Pq4nQBLNo9XanbPtbDuedd0jJqicxuBBrLpfPzCgCaRLbNW6dn0pXALJ/b4P7gVsod5sfcvxfPqFJSRtQS9Zt1C/BSHwgkD+U5ZNbul4ndww4TTRD+0NQ/qbmJ7auqQJWZQeFIylgs7LxphlGYlFyYY5Z6vyY2OWlt86xxPiGIYxTl3rT5qIqbaGgb9v+EjoZGpeDcIob5lh87R2ZTHFCVsVTOimhXqcMZGXZuseSRV6Bpi83+CJ1t2XcZKJJh2+sM+/P+HubfIDp8u778v7QR98gPprH6VNu6y/VmwMBpwts4SoUbwWul5NqSDDOY5V60qyLm1TMUtlDcjimGVC0wh8WV8Izh5Ij6WMb0dDg5vBYNCVLe73a5ceCRdkXTBpf24JmxHBN/IR0xppbLW6dliv9lyFnrZNCzTtHsRaH5Pd2HsEZUGDeACg4BA8QT2eR0AJQQsl5KKEUAVKoHMqlKCD0h3lYolVxyHh0jdZ6L4MuTFN04LuQg9HoF2lSNhvK5Hk2i3Yx9u/I3HQsTjwXQ52oixyEJ6KAtSEgus3TAGqmAbnpQD4l7dYQK9+sYjOulaAoB4lGVvnqhhvUirh4vVQjXJcP492Bhw/TLZof10KOQqp1nCCSWccV2k4jDtkdCStQuO0YSFyWQjOKtV2PQkkS7oq5VI8pHixoDlMmAvXXGCCrKm418mFKv9S5atA1/rrQlN/YyqZdOreDKAqhV6quu+2rZl+T1KzYEsek/rlUnozIaKBWklSSixdpmuYNDZOUizoYzkdraJXv+Ebo9K1nZACvzydfd9SSO647lXMHu2BrFQLRdZAOTLOQFu17dx+gQA7pxOgEZN3mJiMcMEBwn2+AI2wahUIL0qAsG3pxs68/xkBHrRTOk+wDu2ssiJYg6r9zwkze++SovV4TMK4Mlon7Wjk/XVGNqeh7VnROnBp8AOXBXstPh4JDXahb50E5L02Ce4m9zVTpudHHoguKqIEgZXSgGdGlNDa6iA7ez5xRIHuFvz9zdLwtWdpgz34S/PKAzcpZ57d5li9Lq+8sFXgrWxsYIPjjTe9sYEN9Wcyy/8CPLIAQ0eAAyqVB72hYFzdj9lylGu9KCutHDMypoJMKcBoE07pJFNylSrZBjMVOWiM065umNEkUa+pjHLliyj7pukI0QlE8Kocn/yKG6WoIj6d7D4JugdvH9lCyafHZvOlQvHd0OODdgN6QNUZ/un4cc+lrlMWP7zH6RNaZz2nZEdW91fn+VK4/wUCuvkD -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-types-02.drawio: -------------------------------------------------------------------------------- 1 | 7Zpbc5s4FMc/jR/jAQlh+9H1Jd1pOpuOZzfZR9kotqaAWJBju59+pSAwSKovKb7Um8lkgo4uoP/v6HAk0oKDaH2f4mTxlQUkbAEnWLfgsAWA6yAk/kjLJrd0nW5umKc0UI22hgn9QYqeyrqkAclqDTljIadJ3ThjcUxmvGbDacpW9WYvLKzfNcFzYhgmMxya1ica8IWy+sjbVnwmdL4obu36vbwmwkVrNZVsgQO2qpjgqAUHKWM8v4rWAxJK9Qph8n7jn9SWT5aSmB/S4St7+PEF9++Dv3C4/Pvb8nk8dO+AetpXYVNTVk/LN4UGKVvGAZGjOC34abWgnEwSPJO1K0Fd2BY8CkXJFZcvLOYKo+uJcsZT9p0MWMjSt9HgeDQej/uixnx+NaVXknKyrpjUfO4JiwhPN6KJqoVQaau8q3Sb1ZYVLGyLCiboKyNW/jEvx94qKC6UiEcI6h6jp7tfzyZU8jSVoKmS69lUck6lkneFKvmdmkoeMFXqWUTqnUojtF8jEVISeTnbhFSIle4Xapqr+jAtDXj2ff6m9Z9LLkYhxTqmYVhZtQEi3cC6nrtgCn2/IQZdjYHFU5GFwclWc9dg8EeccRwLdYEz4SwlBhMxVV7XvC5ZzKTGNX2VCYd0HkuaQsA3llI4Kt5FfVUR0SCQt7FCrkfpZhZEG9VwIEt47SETBzgVDvNlRZIFiUiKZVfnlll4Gguvd2EWLtgfn0gc9GUSJoUMcZbR2RsCnHLTXIFE1pQ/K/Hk9T/yWsw/Lw3XlarhpijEYlLP1ULeq1MUt93eSpvKII8kpUIUyXk3sIwt05ma25enZYI7999C+vDUX2T/jl9mg+LtL2Y4J3x/bCdBLfs08e+Je4UtJSHm9LWes9qIqzs8MipmVgm7WoLQ0Zwmn7fqVU0xtYFQrz4Q1F+OuTDGQMIb8KbSLJENsh0PjLT7dGqpr7jIR9x6d6npLzj8UanyeZIWBA5I7ZyzpnbgSuOCW48LaF9ckCU9MDQbLOxBoB49rB3BJYMF8rQXkYveFyx8R1vEehb3k2DR1HoGB2xC3uuoTTrd+x3MO8afruZtpDsYRL+rgx2wg/tVB3OOdDAVQd1jIqgl6DXsqIcGPnhVjqr71/vTJs3jQddtaz5/alftGK76mWXyEQcsSpaS8XXurfTjxgZyqjLeFLtez5JTAYtbnWyrBcxjiNGnyf+HSHnucAkiuwLWrsjO8uO0QflhQooT4GxRKlWI/ICnJHxkGeWUSbGnjHMWWShwlthgVYGrA8FoPZffY9p4lcE2LY6sjFO9MeoiKCGJ1gEV42l+YRz2eUP5U1I1EFpA7zjs08InMqn6Fqg+PBHUAzYuH1CPhAotS/WsUOHvBPWVhcvIgnTkIODBCyFFnt/udrWlCosEpcJVtAOWE0jknwjtAfu3D7T70dY/uUDPuzjYA/ZNH2CPBetBcHGwvpnHDqThTvy6BuPryGebeCn6QPt6A11owDjV1xsrCXO/tyVhrrYbJuE5ZoJyVhLWvd3dDa8GBLS14PQsycRZGZhfdiSDG14HOoOLrwLX3FFLBPCWEYC216tTKNLs5imI4vY/DfNTw+0/bMLRfw== -------------------------------------------------------------------------------- /presentation/images/02-architecture/storage-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/storage-types.png -------------------------------------------------------------------------------- /presentation/images/02-architecture/vertical-scaling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/02-architecture/vertical-scaling.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/bad-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/bad-code.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/clean-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/clean-code.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/good-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/good-code.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/practice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/practice.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/principles.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/refactoring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/refactoring.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/tdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/tdd.png -------------------------------------------------------------------------------- /presentation/images/03-clean-code/unit-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/03-clean-code/unit-test.png -------------------------------------------------------------------------------- /presentation/images/In28MinutesLogo-300X50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/In28MinutesLogo-300X50.png -------------------------------------------------------------------------------- /presentation/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrow.png -------------------------------------------------------------------------------- /presentation/images/arrowbi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowbi.png -------------------------------------------------------------------------------- /presentation/images/arrowdot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowdot.png -------------------------------------------------------------------------------- /presentation/images/arrowdotrev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowdotrev.png -------------------------------------------------------------------------------- /presentation/images/arrowrev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowrev.png -------------------------------------------------------------------------------- /presentation/images/arrows.drawio: -------------------------------------------------------------------------------- 1 | 5ZhNj5swEIZ/Dce1bI8/j900bVV11ZX2UKk3BC4gERyBs0n219cpED6i3TYomyjpJYEXMwPv4xkMAcwWm89luEwfbGzygOJ4E8DHgFJBsP/dCdtWkLWQlFlcS7gTnrIXU4vteckqi03VaLXkrM1dthyKkS0KE7mBFpalXQ+H/bJ5PBCWYWIOhKcozA/VH1ns0lpVVHb6F5MlaZuZCF0fWYTt4OZOqjSM7bonwTyAWWmtq7cWm5nJd94Nffn0ytH9hZWmcP9ywurx4efL4/wu/r5J4Ou3dGPS6K6J8hzmq+aGm4t129YBU8Qfdkb6vSgPqyqLArivXFi6Qzl1i9wLxG/WcUx8YG93vWTvgp89xi6MK7d+yLrzmTfepT2LW600eeiy52H4sMGd7MPtMzzazCemuJmZABoxKrQQVFMCTNUBmmlKuUSaKaIEp4ppyYbhK7sqI9NE7Hs+SsKwQKCBclWngmOSeIsT4w6S+I2eXZ30B/cR6NlE9FfEmDGBuAQMILHcuTyyX0yjyrFCnAjFG7RjquKsHPntc+SavwtHANRWPxAmLopRHIWxsIUX7+OwSk3cULwioIICIl3rhRMB9SWJCMOMaQaKYnrZwpS3X5hCakQVVlopKbzx/EQcNbkoOXX75BjDSLaNDws56n5cYQS+43Kh6xXKNJB/ySLawj8TVz2R6/WvdjkBxPsr0REHjDAnypOShGM69Xn6ZhLuewVopUU7r86Kvn2f/D+er5RJ1Ks6wsdvNwpp/ye11NQXJZnGG7Dv/t3yCYvxCurNLO8NfOqr7TVh5ty3V00wIRT8Inn8+D0JZd/Ez4LV73YfQ+rh3RclmP8G -------------------------------------------------------------------------------- /presentation/images/arrowtd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowtd.png -------------------------------------------------------------------------------- /presentation/images/arrowtdbi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowtdbi.png -------------------------------------------------------------------------------- /presentation/images/arrowtdsmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/arrowtdsmall.png -------------------------------------------------------------------------------- /presentation/images/aws-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/aws-cloud.png -------------------------------------------------------------------------------- /presentation/images/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/aws.png -------------------------------------------------------------------------------- /presentation/images/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/border.png -------------------------------------------------------------------------------- /presentation/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/cloud.png -------------------------------------------------------------------------------- /presentation/images/forgettting-curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/forgettting-curve.png -------------------------------------------------------------------------------- /presentation/images/in28minutes-courses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/in28minutes-courses.png -------------------------------------------------------------------------------- /presentation/images/in28minutes-logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/in28minutes-logo-small.png -------------------------------------------------------------------------------- /presentation/images/in28minutes-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/in28minutes-logo.png -------------------------------------------------------------------------------- /presentation/images/in28minutes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/in28minutes.png -------------------------------------------------------------------------------- /presentation/images/load-variations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/load-variations.png -------------------------------------------------------------------------------- /presentation/images/remember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/remember.png -------------------------------------------------------------------------------- /presentation/images/remembering-curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/images/remembering-curve.png -------------------------------------------------------------------------------- /presentation/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } -------------------------------------------------------------------------------- /presentation/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /presentation/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /presentation/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /presentation/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /presentation/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /presentation/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p=4.0.0" 24 | }, 25 | "devDependencies": { 26 | "express": "~4.14.0", 27 | "grunt": "~1.0.1", 28 | "grunt-autoprefixer": "~3.0.3", 29 | "grunt-cli": "~1.2.0", 30 | "grunt-contrib-connect": "~0.11.2", 31 | "grunt-contrib-cssmin": "~0.14.0", 32 | "grunt-contrib-jshint": "~0.11.3", 33 | "grunt-contrib-qunit": "~1.2.0", 34 | "grunt-contrib-uglify": "~0.9.2", 35 | "grunt-contrib-watch": "~1.0.0", 36 | "grunt-sass": "~1.2.0", 37 | "grunt-retire": "~0.3.10", 38 | "grunt-zip": "~0.17.1", 39 | "mustache": "~2.2.1", 40 | "node-sass": "~3.13.0", 41 | "socket.io": "^1.4.8" 42 | }, 43 | "license": "MIT" 44 | } 45 | -------------------------------------------------------------------------------- /presentation/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /presentation/plugin/math/math.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A plugin which enables rendering of math equations inside 3 | * of reveal.js slides. Essentially a thin wrapper for MathJax. 4 | * 5 | * @author Hakim El Hattab 6 | */ 7 | var RevealMath = window.RevealMath || (function(){ 8 | 9 | var options = Reveal.getConfig().math || {}; 10 | options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; 11 | options.config = options.config || 'TeX-AMS_HTML-full'; 12 | 13 | loadScript( options.mathjax + '?config=' + options.config, function() { 14 | 15 | MathJax.Hub.Config({ 16 | messageStyle: 'none', 17 | tex2jax: { 18 | inlineMath: [['$','$'],['\\(','\\)']] , 19 | skipTags: ['script','noscript','style','textarea','pre'] 20 | }, 21 | skipStartupTypeset: true 22 | }); 23 | 24 | // Typeset followed by an immediate reveal.js layout since 25 | // the typesetting process could affect slide height 26 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] ); 27 | MathJax.Hub.Queue( Reveal.layout ); 28 | 29 | // Reprocess equations in slides when they turn visible 30 | Reveal.addEventListener( 'slidechanged', function( event ) { 31 | 32 | MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] ); 33 | 34 | } ); 35 | 36 | } ); 37 | 38 | function loadScript( url, callback ) { 39 | 40 | var head = document.querySelector( 'head' ); 41 | var script = document.createElement( 'script' ); 42 | script.type = 'text/javascript'; 43 | script.src = url; 44 | 45 | // Wrapper for callback to make sure it only fires once 46 | var finish = function() { 47 | if( typeof callback === 'function' ) { 48 | callback.call(); 49 | callback = null; 50 | } 51 | } 52 | 53 | script.onload = finish; 54 | 55 | // IE 56 | script.onreadystatechange = function() { 57 | if ( this.readyState === 'loaded' ) { 58 | finish(); 59 | } 60 | } 61 | 62 | // Normal browsers 63 | head.appendChild( script ); 64 | 65 | } 66 | 67 | })(); 68 | -------------------------------------------------------------------------------- /presentation/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /presentation/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var crypto = require('crypto'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port: process.env.PORT || 1948, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | socket.on('multiplex-statechanged', function(data) { 20 | if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; 21 | if (createHash(data.secret) === data.socketId) { 22 | data.secret = null; 23 | socket.broadcast.emit(data.socketId, data); 24 | }; 25 | }); 26 | }); 27 | 28 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 29 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | res.writeHead(200, {'Content-Type': 'text/html'}); 34 | 35 | var stream = fs.createReadStream(opts.baseDir + '/index.html'); 36 | stream.on('error', function( error ) { 37 | res.write('

reveal.js multiplex server.

Generate token'); 38 | res.end(); 39 | }); 40 | stream.on('readable', function() { 41 | stream.pipe(res); 42 | }); 43 | }); 44 | 45 | app.get("/token", function(req,res) { 46 | var ts = new Date().getTime(); 47 | var rand = Math.floor(Math.random()*9999999); 48 | var secret = ts.toString() + rand.toString(); 49 | res.send({secret: secret, socketId: createHash(secret)}); 50 | }); 51 | 52 | var createHash = function(secret) { 53 | var cipher = crypto.createCipher('blowfish', secret); 54 | return(cipher.final('hex')); 55 | }; 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /presentation/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // Monitor events that trigger a change in state 23 | Reveal.addEventListener( 'slidechanged', post ); 24 | Reveal.addEventListener( 'fragmentshown', post ); 25 | Reveal.addEventListener( 'fragmenthidden', post ); 26 | Reveal.addEventListener( 'overviewhidden', post ); 27 | Reveal.addEventListener( 'overviewshown', post ); 28 | Reveal.addEventListener( 'paused', post ); 29 | Reveal.addEventListener( 'resumed', post ); 30 | 31 | }()); -------------------------------------------------------------------------------- /presentation/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://lab.hakim.se/reveal-js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /presentation/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // don't emit events from inside the previews themselves 4 | if( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var socket = io.connect( window.location.origin ), 7 | socketId = Math.random().toString().slice( 2 ); 8 | 9 | console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId ); 10 | 11 | window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId ); 12 | 13 | /** 14 | * Posts the current slide data to the notes window 15 | */ 16 | function post() { 17 | 18 | var slideElement = Reveal.getCurrentSlide(), 19 | notesElement = slideElement.querySelector( 'aside.notes' ); 20 | 21 | var messageData = { 22 | notes: '', 23 | markdown: false, 24 | socketId: socketId, 25 | state: Reveal.getState() 26 | }; 27 | 28 | // Look for notes defined in a slide attribute 29 | if( slideElement.hasAttribute( 'data-notes' ) ) { 30 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 31 | } 32 | 33 | // Look for notes defined in an aside element 34 | if( notesElement ) { 35 | messageData.notes = notesElement.innerHTML; 36 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 37 | } 38 | 39 | socket.emit( 'statechanged', messageData ); 40 | 41 | } 42 | 43 | // When a new notes window connects, post our current state 44 | socket.on( 'new-subscriber', function( data ) { 45 | post(); 46 | } ); 47 | 48 | // When the state changes from inside of the speaker view 49 | socket.on( 'statechanged-speaker', function( data ) { 50 | Reveal.setState( data.state ); 51 | } ); 52 | 53 | // Monitor events that trigger a change in state 54 | Reveal.addEventListener( 'slidechanged', post ); 55 | Reveal.addEventListener( 'fragmentshown', post ); 56 | Reveal.addEventListener( 'fragmenthidden', post ); 57 | Reveal.addEventListener( 'overviewhidden', post ); 58 | Reveal.addEventListener( 'overviewshown', post ); 59 | Reveal.addEventListener( 'paused', post ); 60 | Reveal.addEventListener( 'resumed', post ); 61 | 62 | // Post the initial state 63 | post(); 64 | 65 | }()); 66 | -------------------------------------------------------------------------------- /presentation/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var express = require('express'); 3 | var fs = require('fs'); 4 | var io = require('socket.io'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express(); 8 | var staticDir = express.static; 9 | var server = http.createServer(app); 10 | 11 | io = io(server); 12 | 13 | var opts = { 14 | port : 1947, 15 | baseDir : __dirname + '/../../' 16 | }; 17 | 18 | io.on( 'connection', function( socket ) { 19 | 20 | socket.on( 'new-subscriber', function( data ) { 21 | socket.broadcast.emit( 'new-subscriber', data ); 22 | }); 23 | 24 | socket.on( 'statechanged', function( data ) { 25 | delete data.state.overview; 26 | socket.broadcast.emit( 'statechanged', data ); 27 | }); 28 | 29 | socket.on( 'statechanged-speaker', function( data ) { 30 | delete data.state.overview; 31 | socket.broadcast.emit( 'statechanged-speaker', data ); 32 | }); 33 | 34 | }); 35 | 36 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { 37 | app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); 38 | }); 39 | 40 | app.get('/', function( req, res ) { 41 | 42 | res.writeHead( 200, { 'Content-Type': 'text/html' } ); 43 | fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res ); 44 | 45 | }); 46 | 47 | app.get( '/notes/:socketId', function( req, res ) { 48 | 49 | fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) { 50 | res.send( Mustache.to_html( data.toString(), { 51 | socketId : req.params.socketId 52 | })); 53 | }); 54 | 55 | }); 56 | 57 | // Actually listen 58 | server.listen( opts.port || null ); 59 | 60 | var brown = '\033[33m', 61 | green = '\033[32m', 62 | reset = '\033[0m'; 63 | 64 | var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' ); 65 | 66 | console.log( brown + 'reveal.js - Speaker Notes' + reset ); 67 | console.log( '1. Open the slides at ' + green + slidesLocation + reset ); 68 | console.log( '2. Click on the link in your JS console to go to the notes page' ); 69 | console.log( '3. Advance through your slides and your notes will advance automatically' ); 70 | -------------------------------------------------------------------------------- /presentation/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * @author Manuel Bieh (https://github.com/manuelbieh) 8 | * @author Hakim El Hattab (https://github.com/hakimel) 9 | * @author Manuel Riezebosch (https://github.com/riezebosch) 10 | */ 11 | 12 | // html2pdf.js 13 | var system = require( 'system' ); 14 | 15 | var probePage = new WebPage(); 16 | var printPage = new WebPage(); 17 | 18 | var inputFile = system.args[1] || 'index.html?print-pdf'; 19 | var outputFile = system.args[2] || 'slides.pdf'; 20 | 21 | if( outputFile.match( /\.pdf$/gi ) === null ) { 22 | outputFile += '.pdf'; 23 | } 24 | 25 | console.log( 'Export PDF: Reading reveal.js config [1/4]' ); 26 | 27 | probePage.open( inputFile, function( status ) { 28 | 29 | console.log( 'Export PDF: Preparing print layout [2/4]' ); 30 | 31 | var config = probePage.evaluate( function() { 32 | return Reveal.getConfig(); 33 | } ); 34 | 35 | if( config ) { 36 | 37 | printPage.paperSize = { 38 | width: Math.floor( config.width * ( 1 + config.margin ) ), 39 | height: Math.floor( config.height * ( 1 + config.margin ) ), 40 | border: 0 41 | }; 42 | 43 | printPage.open( inputFile, function( status ) { 44 | console.log( 'Export PDF: Preparing pdf [3/4]') 45 | printPage.evaluate(function() { 46 | Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); 47 | }); 48 | } ); 49 | 50 | printPage.onCallback = function(data) { 51 | // For some reason we need to "jump the queue" for syntax highlighting to work. 52 | // See: http://stackoverflow.com/a/3580132/129269 53 | setTimeout(function() { 54 | console.log( 'Export PDF: Writing file [4/4]' ); 55 | printPage.render( outputFile ); 56 | console.log( 'Export PDF: Finished successfully!' ); 57 | phantom.exit(); 58 | }, 0); 59 | }; 60 | } 61 | else { 62 | 63 | console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); 64 | phantom.exit(1); 65 | 66 | } 67 | } ); 68 | 69 | 70 | -------------------------------------------------------------------------------- /presentation/test/examples/assets/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/test/examples/assets/image1.png -------------------------------------------------------------------------------- /presentation/test/examples/assets/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/clean-code/9a55768b26988766e4413019ed4cd23055a66709/presentation/test/examples/assets/image2.png -------------------------------------------------------------------------------- /presentation/test/examples/barebones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Barebones 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 |
17 | 18 |
19 |

Barebones Presentation

20 |

This example contains the bare minimum includes and markup required to run a reveal.js presentation.

21 |
22 | 23 |
24 |

No Theme

25 |

There's no theme included, so it will fall back on browser defaults.

26 |
27 | 28 |
29 | 30 |
31 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /presentation/test/examples/embedded-media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Embedded Media 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 |

Embedded Media Test

23 |
24 | 25 |
26 | 27 |
28 | 29 |
30 |

Empty Slide

31 |
32 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 40 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /presentation/test/examples/slide-transitions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Slide Transitions 8 | 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |

Default

31 |
32 | 33 |
34 |

Default

35 |
36 | 37 |
38 |

data-transition: zoom

39 |
40 | 41 |
42 |

data-transition: zoom-in fade-out

43 |
44 | 45 |
46 |

Default

47 |
48 | 49 |
50 |

data-transition: convex

51 |
52 | 53 |
54 |

data-transition: convex-in concave-out

55 |
56 | 57 |
58 |
59 |

Default

60 |
61 |
62 |

data-transition: concave

63 |
64 |
65 |

data-transition: convex-in fade-out

66 |
67 |
68 |

Default

69 |
70 |
71 | 72 |
73 |

data-transition: none

74 |
75 | 76 |
77 |

Default

78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | 86 | 87 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /presentation/test/simple.md: -------------------------------------------------------------------------------- 1 | ## Slide 1.1 2 | 3 | ```js 4 | var a = 1; 5 | ``` 6 | 7 | 8 | ## Slide 1.2 9 | 10 | 11 | 12 | ## Slide 2 13 | -------------------------------------------------------------------------------- /presentation/test/test-markdown-element-attributes.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' ); 9 | }); 10 | 11 | 12 | test( 'Attributes on element header in vertical slides', function() { 13 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' ); 14 | strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' ); 15 | }); 16 | 17 | test( 'Attributes on element paragraphs in vertical slides', function() { 18 | strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' ); 19 | }); 20 | 21 | test( 'Attributes on element list items in vertical slides', function() { 22 | strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' ); 23 | }); 24 | 25 | test( 'Attributes on element paragraphs in horizontal slides', function() { 26 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' ); 27 | }); 28 | test( 'Attributes on element list items in horizontal slides', function() { 29 | strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' ); 30 | }); 31 | test( 'Attributes on element list items in horizontal slides', function() { 32 | strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' ); 33 | }); 34 | 35 | test( 'Attributes on elements in vertical slides with default element attribute separator', function() { 36 | strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' ); 37 | }); 38 | 39 | test( 'Attributes on elements in single slides with default element attribute separator', function() { 40 | strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' ); 41 | }); 42 | 43 | } ); 44 | 45 | Reveal.initialize(); 46 | 47 | -------------------------------------------------------------------------------- /presentation/test/test-markdown-external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /presentation/test/test-markdown-external.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 9 | }); 10 | 11 | test( 'Horizontal separator', function() { 12 | strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' ); 13 | }); 14 | 15 | test( 'Language highlighter', function() { 16 | strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' ); 17 | strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' ); 18 | }); 19 | 20 | 21 | } ); 22 | 23 | Reveal.initialize(); 24 | 25 | -------------------------------------------------------------------------------- /presentation/test/test-markdown-options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown Options 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /presentation/test/test-markdown-options.js: -------------------------------------------------------------------------------- 1 | Reveal.addEventListener( 'ready', function() { 2 | 3 | QUnit.module( 'Markdown' ); 4 | 5 | test( 'Options are set', function() { 6 | strictEqual( marked.defaults.smartypants, true ); 7 | }); 8 | 9 | test( 'Smart quotes are activated', function() { 10 | var text = document.querySelector( '.reveal .slides>section>p' ).textContent; 11 | 12 | strictEqual( /['"]/.test( text ), false ); 13 | strictEqual( /[“”‘’]/.test( text ), true ); 14 | }); 15 | 16 | } ); 17 | 18 | Reveal.initialize({ 19 | dependencies: [ 20 | { src: '../plugin/markdown/marked.js' }, 21 | { src: '../plugin/markdown/markdown.js' }, 22 | ], 23 | markdown: { 24 | smartypants: true 25 | } 26 | }); 27 | -------------------------------------------------------------------------------- /presentation/test/test-markdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test Markdown 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /presentation/test/test-markdown.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Reveal.addEventListener( 'ready', function() { 4 | 5 | QUnit.module( 'Markdown' ); 6 | 7 | test( 'Vertical separator', function() { 8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize(); 15 | 16 | -------------------------------------------------------------------------------- /presentation/test/test-pdf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Test PDF exports 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /presentation/test/test-pdf.js: -------------------------------------------------------------------------------- 1 | 2 | Reveal.addEventListener( 'ready', function() { 3 | 4 | // Only one test for now, we're mainly ensuring that there 5 | // are no execution errors when running PDF mode 6 | 7 | test( 'Reveal.isReady', function() { 8 | strictEqual( Reveal.isReady(), true, 'returns true' ); 9 | }); 10 | 11 | 12 | } ); 13 | 14 | Reveal.initialize({ pdf: true }); 15 | 16 | -------------------------------------------------------------------------------- /presentation/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Tests 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 73 4 | /svn/fb/!svn/ver/12439/projects/reports/access/database/bbs/trunk/api/src 5 | END 6 | -------------------------------------------------------------------------------- /src/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/access/database/bbs/trunk/api/src 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-26T10:28:11.464168Z 11 | 12439 12 | ThangarajaS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | main 30 | dir 31 | 32 | -------------------------------------------------------------------------------- /src/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/main/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 78 4 | /svn/fb/!svn/ver/12439/projects/reports/access/database/bbs/trunk/api/src/main 5 | END 6 | -------------------------------------------------------------------------------- /src/main/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/access/database/bbs/trunk/api/src/main 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-26T10:28:11.464168Z 11 | 12439 12 | ThangarajaS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | java 30 | dir 31 | 32 | resources 33 | dir 34 | 35 | -------------------------------------------------------------------------------- /src/main/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/main/java/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 83 4 | /svn/fb/!svn/ver/12299/projects/reports/access/database/bbs/trunk/api/src/main/java 5 | END 6 | -------------------------------------------------------------------------------- /src/main/java/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/access/database/bbs/trunk/api/src/main/java 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-22T23:11:47.562808Z 11 | 12299 12 | KanagarajS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | nl 30 | dir 31 | 32 | -------------------------------------------------------------------------------- /src/main/java/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/main/java/com/a/introduction/gildedrose/GildedRose.java: -------------------------------------------------------------------------------- 1 | package com.a.introduction.gildedrose; 2 | 3 | import java.util.Arrays; 4 | 5 | class GildedRose { 6 | 7 | Item[] items; 8 | 9 | public GildedRose(Item[] items) { 10 | this.items = items; 11 | } 12 | 13 | public static void main(String[] args) { 14 | 15 | Item[] items = new Item[] { 16 | new Item("Default Item", 10, 20) 17 | }; 18 | 19 | GildedRose app = new GildedRose(items); 20 | 21 | app.updateQuality(); 22 | 23 | System.out.println(app); 24 | 25 | } 26 | 27 | public void updateQuality() { 28 | for (int i = 0; i < items.length; i++) { 29 | if (items[i].name != "Aged Brie" && items[i].name != "Backstage passes to a TAFKAL80ETC concert") { 30 | if (items[i].quality > 0) { 31 | if (items[i].name != "Sulfuras, Hand of Ragnaros") { 32 | items[i].quality = items[i].quality - 1; 33 | } 34 | } 35 | } else { 36 | // This part handles the items for which quality can increase 37 | // "Backstage passes to a TAFKAL80ETC concert" and "Aged Brie" 38 | 39 | if (items[i].quality < 50) { 40 | items[i].quality = items[i].quality + 1; 41 | 42 | if (items[i].name == "Backstage passes to a TAFKAL80ETC concert") { 43 | if (items[i].sellIn < 11) { 44 | if (items[i].quality < 50) { 45 | items[i].quality = items[i].quality + 1; 46 | } 47 | } 48 | 49 | if (items[i].sellIn < 6) { 50 | if (items[i].quality < 50) { 51 | items[i].quality = items[i].quality + 1; 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | // Everything except for Sulfuras the sellIn Decreases 59 | if (items[i].name != "Sulfuras, Hand of Ragnaros") { 60 | items[i].sellIn = items[i].sellIn - 1; 61 | } 62 | 63 | if (items[i].sellIn < 0) { 64 | if (items[i].name != "Aged Brie") { 65 | 66 | if (items[i].name != "Backstage passes to a TAFKAL80ETC concert") { 67 | if (items[i].quality > 0) { 68 | if (items[i].name != "Sulfuras, Hand of Ragnaros") { 69 | items[i].quality = items[i].quality - 1; 70 | } 71 | } 72 | } else { 73 | // For Backstage passes with sellin less than zero 74 | // quality is set to zero 75 | items[i].quality = 0; 76 | } 77 | } else { 78 | // For Aged Brie below 50 quality increases actually by 2 79 | // In the previous line 80 | if (items[i].quality < 50) { 81 | items[i].quality = items[i].quality + 1; 82 | } 83 | } 84 | } 85 | } 86 | } 87 | 88 | @Override 89 | public String toString() { 90 | return Arrays.toString(items); 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /src/main/java/com/a/introduction/gildedrose/Item.java: -------------------------------------------------------------------------------- 1 | package com.a.introduction.gildedrose; 2 | 3 | public class Item { 4 | 5 | public String name; 6 | 7 | public int sellIn; 8 | 9 | public int quality; 10 | 11 | public Item(String name, int sellIn, int quality) { 12 | this.name = name; 13 | this.sellIn = sellIn; 14 | this.quality = quality; 15 | } 16 | 17 | @Override 18 | public String toString() { 19 | return "\n name=" + name + ", " + sellIn + ", " + quality + "\n" ; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/customer/CustomerBO.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.customer; 2 | 3 | import java.util.List; 4 | 5 | import com.b.simple.design.business.exception.DifferentCurrenciesException; 6 | import com.b.simple.design.model.customer.Amount; 7 | import com.b.simple.design.model.customer.Product; 8 | 9 | public interface CustomerBO { 10 | 11 | Amount getCustomerProductsSum(List products) 12 | throws DifferentCurrenciesException; 13 | 14 | } -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/customer/CustomerBOImpl.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.customer; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | import com.b.simple.design.business.exception.DifferentCurrenciesException; 7 | import com.b.simple.design.model.customer.Amount; 8 | import com.b.simple.design.model.customer.AmountImpl; 9 | import com.b.simple.design.model.customer.Currency; 10 | import com.b.simple.design.model.customer.Product; 11 | 12 | public class CustomerBOImpl implements CustomerBO { 13 | 14 | @Override 15 | public Amount getCustomerProductsSum(List products) 16 | throws DifferentCurrenciesException { 17 | BigDecimal temp = BigDecimal.ZERO; 18 | 19 | if (products.size() == 0) 20 | return new AmountImpl(temp, Currency.EURO); 21 | 22 | // Throw Exception If Any of the product has a currency different from 23 | // the first product 24 | Currency firstProductCurrency = products.get(0).getAmount() 25 | .getCurrency(); 26 | 27 | for (Product product : products) { 28 | boolean currencySameAsFirstProduct = product.getAmount() 29 | .getCurrency().equals(firstProductCurrency); 30 | if (!currencySameAsFirstProduct) { 31 | throw new DifferentCurrenciesException(); 32 | } 33 | } 34 | 35 | // Calculate Sum of Products 36 | for (Product product : products) { 37 | temp = temp.add(product.getAmount().getValue()); 38 | } 39 | 40 | // Create new product 41 | return new AmountImpl(temp, firstProductCurrency); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/customer/CustomerBOImplRefactored.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.customer; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | import com.b.simple.design.business.exception.DifferentCurrenciesException; 7 | import com.b.simple.design.model.customer.Amount; 8 | import com.b.simple.design.model.customer.AmountImpl; 9 | import com.b.simple.design.model.customer.Currency; 10 | import com.b.simple.design.model.customer.Product; 11 | 12 | public class CustomerBOImplRefactored implements CustomerBO { 13 | 14 | @Override 15 | public Amount getCustomerProductsSum(List products) 16 | throws DifferentCurrenciesException { 17 | 18 | if (products.size() == 0) 19 | return new AmountImpl(BigDecimal.ZERO, Currency.EURO); 20 | 21 | if(!doAllProductsHaveSameCurrency(products)) { 22 | throw new DifferentCurrenciesException(); 23 | } 24 | 25 | return calculateSumOfProducts(products); 26 | } 27 | 28 | private Amount calculateSumOfProducts(List products) { 29 | 30 | Currency firstProductCurrency = products.get(0).getAmount() 31 | .getCurrency(); 32 | 33 | BigDecimal sum = products.stream() 34 | .map(product -> product.getAmount().getValue()) 35 | .reduce(BigDecimal.ZERO, BigDecimal::add); 36 | 37 | return new AmountImpl(sum, firstProductCurrency); 38 | } 39 | 40 | private boolean doAllProductsHaveSameCurrency(List products) throws DifferentCurrenciesException { 41 | 42 | Currency firstProductCurrency = products.get(0).getAmount() 43 | .getCurrency(); 44 | 45 | return products.stream() 46 | .map(product -> product.getAmount().getCurrency()) 47 | .allMatch(currency -> currency.equals(firstProductCurrency)); 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/exception/DifferentCurrenciesException.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.exception; 2 | 3 | public class DifferentCurrenciesException extends Exception { 4 | 5 | /** 6 | * 7 | */ 8 | private static final long serialVersionUID = 1L; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/student/StudentHelper.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.student; 2 | public class StudentHelper { 3 | 4 | /* PROBLEM 1 */ 5 | /* 6 | * You get a grade B if marks are between 51 and 80 (both inclusive). Except for Maths where the upper limit is increased by 10. 7 | */ 8 | public boolean isGradeB(int marks, boolean isMaths) { 9 | return isMaths ? marks>=51 && marks<=90 : marks>=51 && marks<=80; 10 | } 11 | 12 | /* PROBLEM 2 */ 13 | /* 14 | You are awarded a grade based on your marks. 15 | Grade A = 91 to 100, Grade B = 51 to 90, Otherwise Grade C 16 | Except for Maths where marks to get a Grade are 5 higher than required for other subjects. 17 | */ 18 | 19 | public String getGrade(int mark, boolean isMaths) { 20 | String grade = "C"; 21 | 22 | if (isGradeA(mark, isMaths)) 23 | grade = "A"; 24 | else if (isBGrade(mark, isMaths)) { 25 | grade = "B"; 26 | } 27 | return grade; 28 | } 29 | 30 | private boolean isGradeA(int mark, boolean isMaths) { 31 | int lowerLimitForAGrade = isMaths ? 95 32 | : 90; 33 | return mark > lowerLimitForAGrade; 34 | } 35 | 36 | private boolean isBGrade(int mark, boolean isMaths) { 37 | int lowerLimitGradeB = isMaths ? 55 38 | : 50; 39 | return mark > lowerLimitGradeB && mark < 90; 40 | } 41 | 42 | /* PROBLEM 3 43 | * You and your Friend are planning to enter a Subject Quiz. 44 | * However, there is a marks requirement that you should attain to qualify. 45 | * 46 | * Return value can be YES, NO or MAYBE. 47 | * 48 | * YES If either of you are very good at the subject(has 80 or more marks) 49 | * However, there is an exception that if either of you is not good in the subject(20 or less marks), it is NO. 50 | * In all other conditions, return MAYBE. 51 | * 52 | * However, the definition for good and not good are 5 marks higher if the subject is Mathematics. 53 | * 54 | * marks1 - your marks 55 | * marks2 - your friends marks 56 | */ 57 | 58 | public String willQualifyForQuiz(int marks1, int marks2, boolean isMaths) { 59 | if ((isMaths ? marks1 <= 25 : marks1 <= 20) 60 | || (isMaths ? marks2 <= 25 : marks2 <= 20)) return "NO"; 61 | if ((isMaths ? marks1 >= 85 : marks1 >= 80) 62 | || (isMaths ? marks2 >= 85 : marks2 >= 80)) return "YES"; 63 | return "MAYBE"; 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/student/StudentHelperRefactored.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.student; 2 | 3 | public class StudentHelperRefactored { 4 | 5 | private static final int EXTRA_FOR_MATHS = 10; 6 | private static final int GRADE_B_UPPER_LIMIT = 80; 7 | private static final int GRADE_B_LOWER_LIMIT = 51; 8 | 9 | /* PROBLEM 1 */ 10 | /* 11 | * You get a grade B if marks are between 51 and 80 (both inclusive). 12 | * Except for Maths where the upper limit is increased by 10. 13 | */ 14 | public boolean isGradeB(int marks, boolean isMaths) { 15 | 16 | int extraLimit = isMaths ? EXTRA_FOR_MATHS : 0; 17 | 18 | int upperLimit = GRADE_B_UPPER_LIMIT + extraLimit; 19 | 20 | return marks>=GRADE_B_LOWER_LIMIT && marks<=upperLimit; 21 | } 22 | 23 | /* PROBLEM 2 */ 24 | /* 25 | You are awarded a grade based on your marks. 26 | Grade A = 91 to 100, Grade B = 51 to 90, Otherwise Grade C 27 | Except for Maths where marks to get a Grade are 5 higher than required for other subjects. 28 | */ 29 | 30 | public String getGrade(int mark, boolean isMaths) { 31 | 32 | int extraLimit = isMaths? 5 : 0; 33 | 34 | if (mark >= 91 + extraLimit) 35 | return "A"; 36 | 37 | if (mark >= 51 + extraLimit) 38 | return "B"; 39 | 40 | return "C"; 41 | } 42 | 43 | /* PROBLEM 3 44 | * You and your Friend are planning to enter a Subject Quiz. 45 | * However, there is a marks requirement that you should attain to qualify. 46 | * 47 | * Return value can be YES, NO or MAYBE. 48 | * 49 | * YES If either of you are very good at the subject(has 80 or more marks) 50 | * However, there is an exception that if either of you is not good in the subject(20 or less marks), it is NO. 51 | * In all other conditions, return MAYBE. 52 | * 53 | * However, the definition for good and not good are 5 marks higher if the subject is Mathematics. 54 | * 55 | * marks1 - your marks 56 | * marks2 - your friends marks 57 | */ 58 | 59 | public String willQualifyForQuiz(int marks1, int marks2, boolean isMaths) { 60 | 61 | if (isNotGood(marks1, isMaths) || isNotGood(marks2, isMaths)) 62 | return "NO"; 63 | 64 | if (isGood(marks1, isMaths) || isGood(marks2, isMaths)) 65 | return "YES"; 66 | 67 | return "MAYBE"; 68 | } 69 | 70 | private boolean isGood(int marks, boolean isMaths) { 71 | int extraLimit = isMaths ? 5 : 0; 72 | return marks >= 80 + extraLimit; 73 | } 74 | 75 | private boolean isNotGood(int marks, boolean isMaths) { 76 | int extraLimit = isMaths ? 5 : 0; 77 | return marks <= 20 + extraLimit; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/text/TextHelper.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.text; 2 | 3 | public class TextHelper { 4 | 5 | public String swapLastTwoCharacters(String str) { 6 | return null; 7 | } 8 | 9 | public String truncateAInFirst2Positions(String str) { 10 | return null; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/business/text/TextHelperRefactored.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.text; 2 | 3 | public class TextHelperRefactored { 4 | public String swapLastTwoCharacters(String str) { 5 | 6 | int length = str.length(); 7 | 8 | if(length < 2) return str; 9 | 10 | char lastChar = str.charAt(length - 1); 11 | 12 | char secondLastChar = str.charAt(length - 2); 13 | 14 | String restOfTheString = str.substring(0, length - 2); 15 | 16 | return restOfTheString + lastChar + secondLastChar; 17 | 18 | } 19 | 20 | public String truncateAInFirst2Positions(String str) { 21 | 22 | if(str.length()<2) 23 | return str.replaceAll("A", ""); 24 | 25 | String first2Characters = str.substring(0, 2); 26 | 27 | String first2CharactersUpdated = first2Characters.replaceAll("A", ""); 28 | 29 | String restOfTheString = str.substring(2); 30 | 31 | return first2CharactersUpdated + restOfTheString; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/Amount.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public interface Amount { 6 | BigDecimal getValue(); 7 | 8 | Currency getCurrency(); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/AmountImpl.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class AmountImpl implements Amount { 6 | 7 | BigDecimal value; 8 | Currency currency; 9 | 10 | public AmountImpl(BigDecimal value, Currency currency) { 11 | super(); 12 | this.value = value; 13 | this.currency = currency; 14 | } 15 | 16 | public void setValue(BigDecimal value) { 17 | this.value = value; 18 | } 19 | 20 | @Override 21 | public BigDecimal getValue() { 22 | return value; 23 | } 24 | 25 | public void setCurrency(Currency currency) { 26 | this.currency = currency; 27 | } 28 | 29 | @Override 30 | public Currency getCurrency() { 31 | return currency; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/Collateral.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | /** 4 | * Collateral Model API. 5 | */ 6 | public interface Collateral { 7 | 8 | long getId(); 9 | 10 | String getName(); 11 | 12 | CollateralType getType(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/CollateralImpl.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | /** 4 | * Collateral Model Object. 5 | */ 6 | public class CollateralImpl implements Collateral { 7 | 8 | private long id; 9 | 10 | private String name; 11 | 12 | private CollateralType type; 13 | 14 | public CollateralImpl(long id, String name, CollateralType type) { 15 | super(); 16 | this.id = id; 17 | this.name = name; 18 | this.type = type; 19 | } 20 | 21 | public long getId() { 22 | return id; 23 | } 24 | 25 | public void setId(long id) { 26 | this.id = id; 27 | } 28 | 29 | @Override 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | public void setName(String name) { 35 | this.name = name; 36 | } 37 | 38 | @Override 39 | public CollateralType getType() { 40 | return type; 41 | } 42 | 43 | public void setType(CollateralType type) { 44 | this.type = type; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/CollateralType.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | /** 7 | * Available types of customers 8 | */ 9 | public enum CollateralType { 10 | REAL_ESTATE("REA"), BONDS("BND"), MUTUAL_FUNDS("MFD"), STOCKS("STK"); 11 | 12 | private final String textValue; 13 | 14 | /** 15 | * All collateral types classified as securities. 16 | */ 17 | public static final List SECURITIES = Arrays.asList(BONDS, 18 | MUTUAL_FUNDS, STOCKS); 19 | 20 | CollateralType(final String textValue) { 21 | this.textValue = textValue; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return textValue; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/Currency.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | public enum Currency { 4 | 5 | EURO("EUR"), UNITED_STATES_DOLLAR("USD"), INDIAN_RUPEE("INR"); 6 | 7 | private final String textValue; 8 | 9 | Currency(final String textValue) { 10 | this.textValue = textValue; 11 | } 12 | 13 | @Override 14 | public String toString() { 15 | return textValue; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/Customer.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | /** 7 | * Client Model API. 8 | */ 9 | public interface Customer { 10 | 11 | long getId(); 12 | 13 | String getName(); 14 | 15 | Enum getType(); 16 | 17 | List getCollaterals(); 18 | 19 | List getProducts(); 20 | 21 | void setProductAmount(BigDecimal productAmount); 22 | 23 | BigDecimal getProductAmount(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/CustomerImpl.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.List; 5 | 6 | /** 7 | * Client Model API. 8 | */ 9 | public class CustomerImpl implements Customer { 10 | 11 | private long id; 12 | 13 | private String name; 14 | 15 | private CustomerType type; 16 | 17 | private List collaterals; 18 | 19 | private List products; 20 | 21 | private BigDecimal productAmount; 22 | 23 | public CustomerImpl(long id, String name, CustomerType type, 24 | List collaterals, List products) { 25 | super(); 26 | this.id = id; 27 | this.name = name; 28 | this.type = type; 29 | this.collaterals = collaterals; 30 | this.products = products; 31 | } 32 | 33 | public long getId() { 34 | return id; 35 | } 36 | 37 | public void setId(long id) { 38 | this.id = id; 39 | } 40 | 41 | @Override 42 | public String getName() { 43 | return name; 44 | } 45 | 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | 50 | @Override 51 | public CustomerType getType() { 52 | return type; 53 | } 54 | 55 | public void setType(CustomerType type) { 56 | this.type = type; 57 | } 58 | 59 | @Override 60 | public List getCollaterals() { 61 | return collaterals; 62 | } 63 | 64 | public void setCollaterals(List collaterals) { 65 | this.collaterals = collaterals; 66 | } 67 | 68 | @Override 69 | public List getProducts() { 70 | return products; 71 | } 72 | 73 | public void setProducts(List products) { 74 | this.products = products; 75 | } 76 | 77 | @Override 78 | public BigDecimal getProductAmount() { 79 | return productAmount; 80 | } 81 | 82 | @Override 83 | public void setProductAmount(BigDecimal productAmount) { 84 | this.productAmount = productAmount; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/CustomerType.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | /** 7 | * Available types of customers 8 | */ 9 | public enum CustomerType { 10 | /** 11 | * 12 | */ 13 | PRIVATE("P"), 14 | /** 15 | * 16 | */ 17 | BUSINESS("Z"); 18 | 19 | private final String textValue; 20 | 21 | /** 22 | * List of natural person types. 23 | */ 24 | public static final List NATURAL_PERSON_TYPES = Arrays 25 | .asList(CustomerType.PRIVATE.toString()); 26 | 27 | /** 28 | * List of corporate types. 29 | */ 30 | public static final List CORPORATE_TYPES = Arrays 31 | .asList(CustomerType.BUSINESS.toString()); 32 | 33 | CustomerType(final String textValue) { 34 | this.textValue = textValue; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return textValue; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/Product.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | /** 4 | * Product Model API. 5 | */ 6 | public interface Product { 7 | 8 | long getId(); 9 | 10 | String getName(); 11 | 12 | ProductType getType(); 13 | 14 | Amount getAmount(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/ProductImpl.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | /** 4 | * Collateral Model Object. 5 | */ 6 | public class ProductImpl implements Product { 7 | 8 | private long id; 9 | 10 | private String name; 11 | 12 | private ProductType type; 13 | 14 | private Amount amount; 15 | 16 | public ProductImpl(long id, String name, ProductType type, Amount amount) { 17 | super(); 18 | this.id = id; 19 | this.name = name; 20 | this.type = type; 21 | this.amount = amount; 22 | } 23 | 24 | @Override 25 | public long getId() { 26 | return id; 27 | } 28 | 29 | public void setId(long id) { 30 | this.id = id; 31 | } 32 | 33 | @Override 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | @Override 43 | public ProductType getType() { 44 | return type; 45 | } 46 | 47 | public void setType(ProductType type) { 48 | this.type = type; 49 | } 50 | 51 | @Override 52 | public Amount getAmount() { 53 | return amount; 54 | } 55 | 56 | public void setAmount(Amount amount) { 57 | this.amount = amount; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/b/simple/design/model/customer/ProductType.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.model.customer; 2 | 3 | /** 4 | * Available types of customers 5 | */ 6 | public enum ProductType { 7 | LOAN("LN"), KREDIT("KRD"), BANK_GUARANTEE("BG"); 8 | 9 | private final String textValue; 10 | 11 | ProductType(final String textValue) { 12 | this.textValue = textValue; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return textValue; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/Log.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class Log { 6 | 7 | public static void debug(String string, Object... val) { 8 | // TODO Auto-generated method stub 9 | 10 | } 11 | 12 | public static void logApplicationDebug(String string, 13 | Class class1) { 14 | // TODO Auto-generated method stub 15 | 16 | } 17 | 18 | public static void logApplicationInfo(String string, 19 | BigDecimal allowanceDiff, Class class1) { 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/StringUtils.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring; 2 | 3 | public class StringUtils { 4 | 5 | public static boolean isNumeric(String substring) { 6 | try { 7 | Integer.parseInt(substring); 8 | } catch (NumberFormatException nfe) { 9 | return false; 10 | } 11 | return true; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/allowance/Allowance.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.allowance; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class Allowance { 6 | 7 | int allowanceId; 8 | 9 | BigDecimal allowanceValue; 10 | 11 | public Allowance(int allowanceId , BigDecimal allowanceValue) { 12 | super(); 13 | this.allowanceId = allowanceId; 14 | this.allowanceValue = allowanceValue; 15 | } 16 | 17 | public int getAllowanceId() { 18 | return allowanceId; 19 | } 20 | 21 | public BigDecimal getAllowanceValue() { 22 | return allowanceValue; 23 | } 24 | 25 | public void setAllowanceId(int allowanceId) { 26 | this.allowanceId = allowanceId; 27 | } 28 | 29 | public void setAllowanceValue(BigDecimal allowanceValue) { 30 | this.allowanceValue = allowanceValue; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/allowance/Constants.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.allowance; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class Constants { 6 | 7 | public static final BigDecimal BIG_DECIMAL_HUNDRED = new BigDecimal(100.00); 8 | public static final BigDecimal BIG_DECIMAL_ZERO = new BigDecimal(0.00); 9 | public static final double CONFIGURATION_ALLOWANCE_LIMIT = 50000.00; 10 | public static final double CONFIGURATION_ALLOWANCE_PERCENT = 10.00; 11 | public static final String LEVEL_D1 = "D1"; 12 | public static final String LEVEL_D2 = "D2"; 13 | public static final String FILE_STATUS_CLOSED = "CLOSED"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/allowance/File.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.allowance; 2 | 3 | public class File { 4 | 5 | String prevFileVersionStatus; 6 | 7 | public String getPrevFileVersionStatus() { 8 | return prevFileVersionStatus; 9 | } 10 | 11 | public void setPrevFileVersionStatus(String prevFileVersionStatus) { 12 | this.prevFileVersionStatus = prevFileVersionStatus; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/allowance/LevelDecider.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.allowance; 2 | 3 | import java.math.BigDecimal; 4 | 5 | import com.c.refactoring.Log; 6 | 7 | public class LevelDecider { 8 | 9 | public String determineLevel(File fileVersion, 10 | long fileVersionIdPrev, 11 | Allowance allowance, BigDecimal allowanceVal) { 12 | String Level = ""; 13 | boolean isAllowanceDiffPercLessConfig = false; 14 | if (fileVersion.getPrevFileVersionStatus().equals( 15 | Constants.FILE_STATUS_CLOSED)) { 16 | Level = Constants.LEVEL_D2; 17 | } else if (allowanceVal != null && fileVersionIdPrev != 0 18 | && allowance.getAllowanceId() != 0) { 19 | BigDecimal allowancePrevVal = allowance.getAllowanceValue(); 20 | Log.debug("Previous Allowance value = # {0}", allowancePrevVal); 21 | // calculate Allowance Diff 22 | BigDecimal allowanceDiff = allowanceVal.subtract(allowancePrevVal); 23 | Log.debug("Allowance Difference value = # {0}", allowanceDiff); 24 | Log.logApplicationDebug(" Level :" + Level, 25 | getClass()); 26 | BigDecimal allowanceDiffPerc = Constants.BIG_DECIMAL_ZERO; 27 | // Get configured Allowance limit value & allowance difference percentage 28 | BigDecimal configuredDiffPerc = new BigDecimal( 29 | Constants.CONFIGURATION_ALLOWANCE_PERCENT); 30 | BigDecimal configuredDiffAmt = new BigDecimal( 31 | Constants.CONFIGURATION_ALLOWANCE_LIMIT); 32 | // calculate Allowance Diff Percentage 33 | if (allowancePrevVal != null && allowancePrevVal.doubleValue() != 0) { 34 | allowanceDiffPerc = allowanceDiff.abs() 35 | .divide(allowancePrevVal, 2, BigDecimal.ROUND_HALF_UP) 36 | .multiply(Constants.BIG_DECIMAL_HUNDRED); 37 | isAllowanceDiffPercLessConfig = allowanceDiffPerc 38 | .compareTo(configuredDiffPerc) < 1; 39 | } 40 | 41 | Log.logApplicationInfo( 42 | "Allowance Diff : " + allowanceDiff.doubleValue(), 43 | allowanceDiff, getClass()); 44 | Log.logApplicationInfo("Allowance Diff Perc : " 45 | + allowanceDiffPerc.doubleValue(), allowanceDiffPerc, 46 | getClass()); 47 | if (allowanceDiff.abs().compareTo(configuredDiffAmt) < 1 48 | || isAllowanceDiffPercLessConfig) { 49 | Level = Constants.LEVEL_D1; 50 | } else { 51 | Level = Constants.LEVEL_D2; 52 | } 53 | } else { 54 | // if prev file or allowance for previous file 55 | // does not exsits 56 | // then level is D2 57 | Level = Constants.LEVEL_D2; 58 | } 59 | return Level; 60 | } 61 | } -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/lock/Constants.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | public class Constants { 4 | 5 | public static final String LOCK_TEXT = "Locked by @@USER@@"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/lock/Lock.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | public class Lock { 4 | 5 | String lockReason; 6 | boolean readAccess; 7 | 8 | public String getLockReason() { 9 | return lockReason; 10 | } 11 | 12 | public boolean isReadAccess() { 13 | return readAccess; 14 | } 15 | 16 | public void setLockReason(String lockReason) { 17 | this.lockReason = lockReason; 18 | } 19 | 20 | public void setRead(boolean readAccess) { 21 | this.readAccess = readAccess; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/lock/User.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | public class User { 4 | 5 | String userId; 6 | 7 | public User(String userId) { 8 | super(); 9 | this.userId = userId; 10 | } 11 | 12 | public String getUserId() { 13 | return userId; 14 | } 15 | 16 | public void setUserId(String userId) { 17 | this.userId = userId; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/lock/UserLoginChecker.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class UserLoginChecker { 7 | 8 | /** 9 | * {@inheritDoc}. 10 | */ 11 | public Lock isUserAllowedToLogin(long id, String status, 12 | boolean firstScreen, User user, List list) { 13 | Date time = new Date(); 14 | Lock lck = new Lock(); 15 | if (list.size() > 0 && list.get(0) != null) { 16 | Object[] object = (Object[]) list.get(0); 17 | String userId = (String) object[0]; 18 | Date lockTimestamp = (Date) object[1]; 19 | if (userId != null) { 20 | // message which is shown to the user 21 | String lockMsg = Constants.LOCK_TEXT.replaceAll("@@USER@@", 22 | userId); 23 | //if userID is present, the Lock time stamp will also be present 24 | //4800000 milliseconds equals to 1 1/2 hours. 25 | if (time.getTime() - lockTimestamp.getTime() > 3600000) { 26 | //New user gets lock only on first screen 27 | //If 1 1/2 hours expires when user is not on 1st screen then for same user lock can be refreshed. 28 | if (firstScreen 29 | || userId.equalsIgnoreCase(user.getUserId())) { 30 | //to set the access to write mode 31 | lck.setRead(false); 32 | return lck; 33 | } 34 | lck.setRead(true); 35 | //Only read access is permitted to other user 36 | lck.setLockReason(lockMsg); 37 | return lck; 38 | } else if (userId.equalsIgnoreCase(user.getUserId())) { 39 | // Locked By Same User, Write access 40 | lck.setRead(false); 41 | return lck; 42 | } else { 43 | lck.setRead(true); 44 | //Only Read Access is Permitted 45 | lck.setLockReason(lockMsg); 46 | return lck; 47 | } 48 | } 49 | } 50 | lck.setRead(false); 51 | return lck; 52 | } 53 | } -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/lock/UserLoginCheckerRefactored.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class UserLoginCheckerRefactored { 7 | 8 | private static final int MAXIMUM_LOCK_PERIOD_IN_MS = 60 * 60 * 1000; 9 | 10 | /** 11 | * {@inheritDoc}. 12 | */ 13 | public Lock isUserAllowedToLogin(long id, String status, 14 | boolean isFirstScreen, User userTryingToLogin, 15 | List existingLocks) { 16 | 17 | if (existingLocks.size() == 0 || existingLocks.get(0) == null) { 18 | return createWriteLock(); 19 | } 20 | 21 | Object[] existingLock = (Object[]) existingLocks.get(0); 22 | String userIdWithLock = (String) existingLock[0]; 23 | Date lockTimestamp = (Date) existingLock[1]; 24 | 25 | if (userIdWithLock == null) { 26 | return createWriteLock(); 27 | } 28 | 29 | if (userIdWithLock.equalsIgnoreCase(userTryingToLogin.getUserId())) { 30 | return createWriteLock(); 31 | } 32 | 33 | long timeElapsedSinceLock = new Date().getTime() - lockTimestamp.getTime(); 34 | if (isFirstScreen && timeElapsedSinceLock > MAXIMUM_LOCK_PERIOD_IN_MS) { 35 | return createWriteLock(); 36 | } 37 | 38 | return createReadLockWithMessage(userIdWithLock); 39 | 40 | } 41 | 42 | private Lock createReadLockWithMessage(String userIdWithLock) { 43 | String lockMsg = Constants.LOCK_TEXT.replaceAll("@@USER@@", userIdWithLock); 44 | Lock lock = new Lock(); 45 | lock.setRead(true); 46 | // Only read access is permitted to other user 47 | lock.setLockReason(lockMsg); 48 | return lock; 49 | } 50 | 51 | private Lock createWriteLock() { 52 | Lock lock = new Lock(); 53 | lock.setRead(false); 54 | return lock; 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/menuexamples/Constants.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | public class Constants { 4 | 5 | public static final String READ = "READ"; 6 | public static final String WRITE = "WRITE"; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/menuexamples/MenuAccess.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | import java.util.List; 4 | 5 | public class MenuAccess { 6 | 7 | public void setAuthorizationsInEachMenus( 8 | List menuItemsList, Role[] roles) { 9 | for (int i = 0; i < menuItemsList.size(); i++) { 10 | MenuItem menuItem = menuItemsList.get(i); 11 | if (roles != null) { 12 | for (int j = 0; j < roles.length; j++) { 13 | if (roles[j].getName().equals(menuItem 14 | .getReadAccessRole()) 15 | && !Constants.WRITE.equals( 16 | menuItem 17 | .getAccess())) { 18 | menuItem.setAccess(Constants.READ); 19 | menuItem.setVisible(true); 20 | } else if (roles[j].getName().equals( 21 | menuItem 22 | .getWriteAccessRole())) { 23 | menuItem.setAccess(Constants.WRITE); 24 | menuItem.setVisible(true); 25 | } 26 | } 27 | 28 | } 29 | 30 | } 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/menuexamples/MenuAccessRefactored.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MenuAccessRefactored { 7 | 8 | public void setAuthorizationsInEachMenus( 9 | List menuItems, Role[] roles) { 10 | if(roles == null) 11 | return; 12 | 13 | menuItems.stream().forEach( 14 | menuItem -> setAccessForMenuItem(menuItem, roles)); 15 | } 16 | 17 | private void setAccessForMenuItem(MenuItem menuItem, Role[] roles) { 18 | if (doesUserHaveTheRole(roles, menuItem.getReadAccessRole())) { 19 | menuItem.setAccess(Constants.READ); 20 | menuItem.setVisible(true); 21 | } 22 | 23 | if(doesUserHaveTheRole(roles, menuItem.getWriteAccessRole())) { 24 | menuItem.setAccess(Constants.WRITE); 25 | menuItem.setVisible(true); 26 | } 27 | } 28 | 29 | private boolean doesUserHaveTheRole(Role[] roles, String roleToCheckFor) { 30 | return Arrays.stream(roles) 31 | .anyMatch(role -> role.getName().equals(roleToCheckFor)); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/menuexamples/MenuItem.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | import java.util.List; 4 | 5 | public class MenuItem { 6 | 7 | String access; 8 | List childMenus; 9 | String name; 10 | //Other fields which are not needed for this example.. 11 | String readAccessRole; 12 | boolean visible; 13 | String writeAccessRole; 14 | 15 | public MenuItem(String name , 16 | boolean visible , List childMenus) { 17 | super(); 18 | this.name = name; 19 | this.visible = visible; 20 | this.childMenus = childMenus; 21 | } 22 | 23 | public MenuItem(String name , String readAccessRole , String writeAccessRole) { 24 | super(); 25 | this.name = name; 26 | this.readAccessRole = readAccessRole; 27 | this.writeAccessRole = writeAccessRole; 28 | } 29 | 30 | public String getAccess() { 31 | return access; 32 | } 33 | 34 | public List getChildMenus() { 35 | return childMenus; 36 | } 37 | 38 | public String getName() { 39 | return name; 40 | } 41 | 42 | public String getReadAccessRole() { 43 | return readAccessRole; 44 | } 45 | 46 | public String getWriteAccessRole() { 47 | return writeAccessRole; 48 | } 49 | 50 | public boolean isVisible() { 51 | return visible; 52 | } 53 | 54 | public void setAccess(String access) { 55 | this.access = access; 56 | } 57 | 58 | public void setChildMenus(List childMenus) { 59 | this.childMenus = childMenus; 60 | } 61 | 62 | public void setName(String name) { 63 | this.name = name; 64 | } 65 | 66 | public void setReadAccessRole(String readAccessRole) { 67 | this.readAccessRole = readAccessRole; 68 | } 69 | 70 | public void setVisible(boolean visible) { 71 | this.visible = visible; 72 | } 73 | 74 | public void setWriteAccessRole(String writeAccessRole) { 75 | this.writeAccessRole = writeAccessRole; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | StringBuilder builder = new StringBuilder(); 81 | builder.append("MenuItem [readAccessRole=").append(readAccessRole) 82 | .append(", writeAccessRole=").append(writeAccessRole) 83 | .append(", access=").append(access).append(", visible=") 84 | .append(visible).append(", childMenus=").append(childMenus) 85 | .append("]"); 86 | return builder.toString(); 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/menuexamples/Role.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | public class Role { 4 | 5 | String name; 6 | 7 | public Role(String name) { 8 | super(); 9 | this.name = name; 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/movie/Movie.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.movie; 2 | 3 | import com.c.refactoring.StringUtils; 4 | 5 | public class Movie { 6 | 7 | String rating; 8 | 9 | public Movie(String rating) { 10 | super(); 11 | this.rating = rating; 12 | } 13 | 14 | public String getRating() { 15 | return rating; 16 | } 17 | 18 | /*Axx or By 19 | Where x represents any digit between 0 and 9, and y represents 20 | any digit between 1 and 4*/ 21 | public boolean isValidRating() { 22 | if (this.getRating() != null) { 23 | if (this.getRating().substring(0, 1).equalsIgnoreCase("B") 24 | && this.getRating().length() == 2) { 25 | if (StringUtils.isNumeric(this.getRating().substring(1, 2)) 26 | && Integer.parseInt(this.getRating().substring(1, 2)) > 0 27 | && Integer.parseInt(this.getRating().substring(1, 2)) < 5) 28 | return true; 29 | 30 | } else if (this.getRating().substring(0, 1).equalsIgnoreCase("A") 31 | && this.getRating().length() == 3 32 | && StringUtils.isNumeric(this.getRating().substring(1, 3))) 33 | return true; 34 | 35 | } 36 | return false; 37 | } 38 | 39 | public void setRating(String rating) { 40 | this.rating = rating; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/c/refactoring/movie/MovieRefactored.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.movie; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import com.c.refactoring.StringUtils; 7 | 8 | public class MovieRefactored { 9 | 10 | private static final List VALID_B_RATINGS_LIST 11 | = Arrays.asList("B1","B2","B3","B4"); 12 | 13 | String rating; 14 | 15 | public MovieRefactored(String rating) { 16 | super(); 17 | this.rating = rating; 18 | } 19 | 20 | public String getRating() { 21 | return rating; 22 | } 23 | 24 | /*Axx or By 25 | Where x represents any digit between 0 and 9, and y represents 26 | any digit between 1 and 4*/ 27 | public boolean isValidRating() { 28 | 29 | if (rating == null) { 30 | return false; 31 | } 32 | 33 | if (isValidARating()) 34 | return true; 35 | 36 | if (isValidBRating()) 37 | return true; 38 | 39 | return false; 40 | } 41 | 42 | private boolean isValidARating() { 43 | String firstChar = rating.substring(0, 1); 44 | 45 | return firstChar.equalsIgnoreCase("A") 46 | && rating.length() == 3 47 | && StringUtils.isNumeric(rating.substring(1, 3)); 48 | } 49 | 50 | private boolean isValidBRating() { 51 | return VALID_B_RATINGS_LIST.contains(rating); 52 | } 53 | 54 | public void setRating(String rating) { 55 | this.rating = rating; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/d/tdd/Game.java: -------------------------------------------------------------------------------- 1 | package com.d.tdd; 2 | public class Game { 3 | 4 | int[] rolls = new int[21]; 5 | int rollIndex = 0; 6 | 7 | public void roll(int pinsKnockedDown) { 8 | rolls[rollIndex++] = pinsKnockedDown; 9 | } 10 | 11 | public int score() { 12 | int sum = 0; 13 | int rollsIndex = 0; 14 | 15 | for (int frame = 0; frame < 10; frame++) { 16 | if(isStrike(rollsIndex)) { 17 | sum += 10 + bonusForStrike(rollsIndex); 18 | rollsIndex += 1; 19 | } 20 | else if (isSpare(rollsIndex)) { 21 | sum += 10 + bonusForSpare(rollsIndex); 22 | rollsIndex += 2; 23 | } else { 24 | sum += rolls[rollsIndex] + rolls[rollsIndex + 1]; 25 | rollsIndex += 2; 26 | } 27 | 28 | } 29 | 30 | return sum; 31 | } 32 | 33 | private int bonusForSpare(int rollsIndex) { 34 | return rolls[rollsIndex + 2]; 35 | } 36 | 37 | private int bonusForStrike(int rollsIndex) { 38 | return rolls[rollsIndex + 1] + bonusForSpare(rollsIndex); 39 | } 40 | 41 | private boolean isStrike(int rollsIndex) { 42 | return rolls[rollsIndex] == 10; 43 | } 44 | 45 | private boolean isSpare(int rollsIndex) { 46 | return rolls[rollsIndex] + rolls[rollsIndex + 1] == 10; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/d/tdd/StringHelper.java: -------------------------------------------------------------------------------- 1 | package com.d.tdd; 2 | 3 | public class StringHelper { 4 | 5 | public String replaceAInFirst2Positions(String str) { 6 | 7 | if(str.length()<2) 8 | return str.replaceAll("A", ""); 9 | 10 | String first2Chars = str.substring(0, 2); 11 | String restOfTheString = str.substring(2); 12 | 13 | return first2Chars.replaceAll("A", "") + restOfTheString; 14 | } 15 | 16 | public boolean areFirstTwoAndLastTwoCharsTheSame(String str) { 17 | 18 | int length = str.length(); 19 | 20 | if(length<2) 21 | return false; 22 | 23 | String first2Chars = str.substring(0, 2); 24 | String last2Chars = str.substring(length - 2); 25 | 26 | return first2Chars.equals(last2Chars); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/test/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 98 4 | /svn/fb/!svn/ver/12548/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test 5 | END 6 | -------------------------------------------------------------------------------- /src/test/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-28T06:47:27.487366Z 11 | 12548 12 | KanagarajS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | java 30 | dir 31 | 32 | resources 33 | dir 34 | 35 | -------------------------------------------------------------------------------- /src/test/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/test/java/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 103 4 | /svn/fb/!svn/ver/12548/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/java 5 | END 6 | -------------------------------------------------------------------------------- /src/test/java/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/java 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-28T06:47:27.487366Z 11 | 12548 12 | KanagarajS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | nl 30 | dir 31 | 32 | -------------------------------------------------------------------------------- /src/test/java/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/test/java/com/a/introduction/gildedrose/GildedRoseADefaultItemTest.java: -------------------------------------------------------------------------------- 1 | package com.a.introduction.gildedrose; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | public class GildedRoseADefaultItemTest { 8 | /** 9 | * Method to test the variation in quality of the item for the non expired 10 | * Item. 11 | * 12 | * The quality should decrease by 1 when the item is not expired 13 | * and sell in should decrease by 1. 14 | * 15 | */ 16 | @Test 17 | public void testUpdateQualityDefault1() { 18 | Item item = new Item("DEFAULT_ITEM", 15, 3); 19 | Item[] items = new Item[] { item }; 20 | GildedRose app = new GildedRose(items); 21 | app.updateQuality(); 22 | assertEquals("DEFAULT_ITEM", app.items[0].name); 23 | assertEquals(14, app.items[0].sellIn); 24 | assertEquals(2, app.items[0].quality); 25 | } 26 | 27 | /** 28 | * Method to test the variation in quality of the item for the non expired 29 | * Item. 30 | * 31 | * The quality should decrease by 2 when the item is expired(Sell in < 0) and sell in should decrease by 1. 32 | * 33 | */ 34 | @Test 35 | public void testUpdateQualityForExpiredItem() { 36 | Item item = new Item("DEFAULT_ITEM", -1, 3); 37 | Item[] items = new Item[] { item }; 38 | GildedRose app = new GildedRose(items); 39 | app.updateQuality(); 40 | assertEquals("DEFAULT_ITEM", app.items[0].name); 41 | assertEquals(-2, app.items[0].sellIn); 42 | assertEquals(1, app.items[0].quality); 43 | } 44 | } -------------------------------------------------------------------------------- /src/test/java/com/a/introduction/gildedrose/GildedRoseBAgedBrieTest.java: -------------------------------------------------------------------------------- 1 | package com.a.introduction.gildedrose; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | public class GildedRoseBAgedBrieTest { 8 | 9 | @Test 10 | public void testUpdateQualityAgedBrie1() { 11 | Item item = new Item("Aged Brie", 4, 3); 12 | Item[] items = new Item[] { item }; 13 | GildedRose app = new GildedRose(items); 14 | app.updateQuality(); 15 | assertEquals("Aged Brie", app.items[0].name); 16 | assertEquals(3, app.items[0].sellIn); 17 | assertEquals(4, app.items[0].quality); 18 | } 19 | 20 | @Test 21 | public void testUpdateQualityAgedBrie2() { 22 | Item item = new Item("Aged Brie", -1, 3); 23 | Item[] items = new Item[] { item }; 24 | GildedRose app = new GildedRose(items); 25 | app.updateQuality(); 26 | assertEquals("Aged Brie", app.items[0].name); 27 | assertEquals(-2, app.items[0].sellIn); 28 | assertEquals(5, app.items[0].quality); 29 | } 30 | 31 | @Test 32 | public void testUpdateQualityAgedBrie3() { 33 | Item item = new Item("Aged Brie", 4, 50); 34 | Item[] items = new Item[] { item }; 35 | GildedRose app = new GildedRose(items); 36 | app.updateQuality(); 37 | assertEquals("Aged Brie", app.items[0].name); 38 | assertEquals(3, app.items[0].sellIn); 39 | assertEquals(50, app.items[0].quality); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/test/java/com/a/introduction/gildedrose/GildedRoseCBackstagePassesTest.java: -------------------------------------------------------------------------------- 1 | package com.a.introduction.gildedrose; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | public class GildedRoseCBackstagePassesTest { 8 | 9 | @Test 10 | public void testUpdateQualityBackstagePasses1() { 11 | Item item = new Item("Backstage passes to a TAFKAL80ETC concert", 15, 3); 12 | Item[] items = new Item[] { item }; 13 | GildedRose app = new GildedRose(items); 14 | app.updateQuality(); 15 | assertEquals("Backstage passes to a TAFKAL80ETC concert", 16 | app.items[0].name); 17 | assertEquals(14, app.items[0].sellIn); 18 | assertEquals(4, app.items[0].quality); 19 | } 20 | 21 | @Test 22 | public void testUpdateQualityBackstagePasses2() { 23 | Item item = new Item("Backstage passes to a TAFKAL80ETC concert", 7, 3); 24 | Item[] items = new Item[] { item }; 25 | GildedRose app = new GildedRose(items); 26 | app.updateQuality(); 27 | assertEquals("Backstage passes to a TAFKAL80ETC concert", 28 | app.items[0].name); 29 | assertEquals(6, app.items[0].sellIn); 30 | assertEquals(5, app.items[0].quality); 31 | } 32 | 33 | @Test 34 | public void testUpdateQualityBackstagePasses3() { 35 | Item item = new Item("Backstage passes to a TAFKAL80ETC concert", 4, 3); 36 | Item[] items = new Item[] { item }; 37 | GildedRose app = new GildedRose(items); 38 | app.updateQuality(); 39 | assertEquals("Backstage passes to a TAFKAL80ETC concert", 40 | app.items[0].name); 41 | assertEquals(3, app.items[0].sellIn); 42 | assertEquals(6, app.items[0].quality); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/test/java/com/b/simple/design/business/customer/CustomerBOTest.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.customer; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.fail; 5 | 6 | import java.math.BigDecimal; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | import org.junit.jupiter.api.Test; 11 | 12 | import com.b.simple.design.business.exception.DifferentCurrenciesException; 13 | import com.b.simple.design.model.customer.Amount; 14 | import com.b.simple.design.model.customer.AmountImpl; 15 | import com.b.simple.design.model.customer.Currency; 16 | import com.b.simple.design.model.customer.Product; 17 | import com.b.simple.design.model.customer.ProductImpl; 18 | import com.b.simple.design.model.customer.ProductType; 19 | 20 | public class CustomerBOTest { 21 | 22 | private CustomerBO customerBO = new CustomerBOImpl(); 23 | 24 | @Test 25 | public void testCustomerProductSum_TwoProductsSameCurrencies() 26 | throws DifferentCurrenciesException { 27 | 28 | List products = new ArrayList(); 29 | 30 | products.add( 31 | new ProductImpl(100, "Product 15", ProductType.BANK_GUARANTEE, 32 | new AmountImpl(new BigDecimal("5.0"), Currency.EURO))); 33 | 34 | products.add( 35 | new ProductImpl(120, "Product 20", ProductType.BANK_GUARANTEE, 36 | new AmountImpl(new BigDecimal("6.0"), Currency.EURO))); 37 | 38 | Amount temp = customerBO.getCustomerProductsSum(products); 39 | 40 | assertEquals(Currency.EURO, temp.getCurrency()); 41 | assertEquals(new BigDecimal("11.0"), temp.getValue()); 42 | } 43 | 44 | @Test 45 | public void testCustomerProductSum1() { 46 | 47 | List products = new ArrayList(); 48 | 49 | products.add(new ProductImpl(100, "Product 15", 50 | ProductType.BANK_GUARANTEE, 51 | new AmountImpl(new BigDecimal("5.0"), Currency.INDIAN_RUPEE))); 52 | 53 | products.add( 54 | new ProductImpl(120, "Product 20", ProductType.BANK_GUARANTEE, 55 | new AmountImpl(new BigDecimal("6.0"), Currency.EURO))); 56 | 57 | @SuppressWarnings("unused") 58 | Amount temp = null; 59 | 60 | try { 61 | temp = customerBO.getCustomerProductsSum(products); 62 | fail("DifferentCurrenciesException is expected"); 63 | } catch (DifferentCurrenciesException e) { 64 | } 65 | } 66 | 67 | @Test 68 | public void testCustomerProductSum2() { 69 | 70 | List products = new ArrayList(); 71 | 72 | Amount temp = null; 73 | 74 | try { 75 | temp = customerBO.getCustomerProductsSum(products); 76 | } catch (DifferentCurrenciesException e) { 77 | } 78 | assertEquals(Currency.EURO, temp.getCurrency()); 79 | assertEquals(BigDecimal.ZERO, temp.getValue()); 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /src/test/java/com/b/simple/design/business/text/TextHelperTest.java: -------------------------------------------------------------------------------- 1 | package com.b.simple.design.business.text; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Disabled; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import com.b.simple.design.business.text.TextHelper; 9 | 10 | public class TextHelperTest { 11 | 12 | TextHelper helper = new TextHelper(); 13 | 14 | @Test 15 | @Disabled 16 | public void testSwapLastTwoCharacters() { 17 | assertEquals("",helper.swapLastTwoCharacters("")); 18 | assertEquals("A",helper.swapLastTwoCharacters("A")); 19 | assertEquals("BA",helper.swapLastTwoCharacters("AB")); 20 | assertEquals("RANI",helper.swapLastTwoCharacters("RAIN")); 21 | } 22 | 23 | @Test 24 | @Disabled 25 | public void testTruncateAInFirst2Positions() { 26 | assertEquals("",helper.truncateAInFirst2Positions("")); 27 | assertEquals("BCD",helper.truncateAInFirst2Positions("ABCD")); 28 | assertEquals("CD",helper.truncateAInFirst2Positions("AACD")); 29 | assertEquals("BCD",helper.truncateAInFirst2Positions("BACD")); 30 | assertEquals("BBAA",helper.truncateAInFirst2Positions("BBAA")); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/com/c/refactoring/allowance/LevelDeciderTest.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.allowance; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.math.BigDecimal; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class LevelDeciderTest { 10 | 11 | LevelDecider levelDecider = new LevelDecider(); 12 | 13 | @Test 14 | public void testDetermineDecisionLevel_NotAFKAllowanceDiffLessThanConfigured() { 15 | File file = new File(); 16 | file.setPrevFileVersionStatus("TEST_VALUE_NOT_CLOSED"); 17 | assertEquals(Constants.LEVEL_D1, levelDecider.determineLevel( 18 | file, 10, new Allowance(10, new BigDecimal(1000.00)), 19 | new BigDecimal(1100.00))); 20 | } 21 | 22 | @Test 23 | public void testDetermineDecisionLevel_NotAFKAllowanceDiffPercGreaterThanConfigured() { 24 | File file = new File(); 25 | file.setPrevFileVersionStatus("TEST_VALUE_NOT_AFK"); 26 | assertEquals(Constants.LEVEL_D2, levelDecider.determineLevel( 27 | file, 10, new Allowance(10, new BigDecimal(4200000.00)), 28 | new BigDecimal(5000000.00))); 29 | } 30 | 31 | @Test 32 | public void testDetermineDecisionLevel_NotAFKAllowanceDiffPercLessThanConfigured() { 33 | File file = new File(); 34 | file.setPrevFileVersionStatus("TEST_VALUE_NOT_CLOSED"); 35 | assertEquals(Constants.LEVEL_D1, levelDecider.determineLevel( 36 | file, 10, new Allowance(10, new BigDecimal(4600000.00)), 37 | new BigDecimal(5000000.00))); 38 | } 39 | 40 | @Test 41 | public void testDetermineDecisionLevel_NotAFKAllowanceDiffZero() { 42 | File file = new File(); 43 | file.setPrevFileVersionStatus("TEST_VALUE_NOT_CLOSED"); 44 | assertEquals(Constants.LEVEL_D1, levelDecider.determineLevel( 45 | file, 10, new Allowance(10, new BigDecimal(1000.00)), 46 | new BigDecimal(1000.00))); 47 | 48 | } 49 | 50 | @Test 51 | public void testDetermineDecisionLevel_PreviousFileVerisonAFK() { 52 | File file = new File(); 53 | file.setPrevFileVersionStatus(Constants.FILE_STATUS_CLOSED); 54 | assertEquals(Constants.LEVEL_D2, 55 | levelDecider.determineLevel(file, 10, 56 | null, null)); 57 | } 58 | 59 | @Test 60 | public void testDetermineDecisionLevel_PreviousFileVerisonNotAFKAndAllowancesNull() { 61 | File file = new File(); 62 | file.setPrevFileVersionStatus("TEST_VALUE_NOT_CLOSED"); 63 | assertEquals(Constants.LEVEL_D2, 64 | levelDecider.determineLevel(file, 10, null, null)); 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /src/test/java/com/c/refactoring/lock/UserLoginCheckerTest.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.lock; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertFalse; 4 | import static org.junit.jupiter.api.Assertions.assertNotNull; 5 | import static org.junit.jupiter.api.Assertions.assertNull; 6 | import static org.junit.jupiter.api.Assertions.assertTrue; 7 | 8 | import java.util.Arrays; 9 | import java.util.Date; 10 | 11 | import org.junit.jupiter.api.Test; 12 | 13 | public class UserLoginCheckerTest { 14 | UserLoginChecker userLoginChecker = new UserLoginChecker(); 15 | 16 | @Test 17 | public void testisUserAllowedToLogin_DifferentUserTriesImmediatelyAfter() { 18 | Object[] access = new Object[] { "TEST_USER_ID_1", new Date() }; 19 | Lock lock = userLoginChecker.isUserAllowedToLogin(10, "NOT_USED", true, new User( 20 | "TEST_USER_ID_2"), Arrays.asList(new Object[][] { access })); 21 | assertTrue(lock.isReadAccess()); 22 | assertNotNull(lock.getLockReason()); 23 | } 24 | 25 | @Test 26 | public void testisUserAllowedToLogin_SameUserReturnsToFirstScreen() { 27 | Object[] access = new Object[] { "TEST_USER_ID", new Date() }; 28 | Lock lock = userLoginChecker.isUserAllowedToLogin(10, "NOT_USED", true, new User( 29 | "TEST_USER_ID"), Arrays.asList(new Object[][] { access })); 30 | assertFalse(lock.isReadAccess()); 31 | assertNull(lock.getLockReason()); 32 | } 33 | 34 | @Test 35 | public void testisUserAllowedToLogin_SameUserReturnsToSecondScreen() { 36 | Object[] access = new Object[] { "TEST_USER_ID", new Date() }; 37 | Lock lock = userLoginChecker.isUserAllowedToLogin(10, "NOT_USED", false, new User( 38 | "TEST_USER_ID"), Arrays.asList(new Object[][] { access })); 39 | assertFalse(lock.isReadAccess()); 40 | assertNull(lock.getLockReason()); 41 | } 42 | 43 | @Test 44 | public void testisUserAllowedToLogin_User2TriesToLoginToFirstScreen3hoursAfterUser1() { 45 | Object[] access = new Object[] { "TEST_USER_ID_1", threeHoursBefore() }; 46 | Lock lock = userLoginChecker.isUserAllowedToLogin(10, "NOT_USED", true, new User( 47 | "TEST_USER_ID_2"), Arrays.asList(new Object[][] { access })); 48 | assertFalse(lock.isReadAccess()); 49 | assertNull(lock.getLockReason()); 50 | } 51 | 52 | @Test 53 | public void testisUserAllowedToLogin_User2TriesToLoginToSecondScreen3hoursAfterUser1() { 54 | Object[] access = new Object[] { "TEST_USER_ID_1", threeHoursBefore() }; 55 | Lock lock = userLoginChecker.isUserAllowedToLogin(10, "NOT_USED", false, new User( 56 | "TEST_USER_ID_2"), Arrays.asList(new Object[][] { access })); 57 | assertTrue(lock.isReadAccess()); 58 | assertNotNull(lock.getLockReason()); 59 | } 60 | 61 | public Date threeHoursBefore() { 62 | Date now = new Date(); 63 | return new Date(now.getTime() - 3 * 60 * 60 * 1000); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/com/c/refactoring/menuexamples/MenuAccessTest.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | public class MenuAccessTest { 11 | 12 | @Test 13 | public void testSetAuthorizationsInEachMenus() { 14 | 15 | Role[] userRoles = { new Role("MenuARead"), new Role("MenuBWrite"), 16 | new Role("MenuCRead"), new Role("MenuCWrite") }; 17 | 18 | MenuItem[] menuItemsArray = { 19 | new MenuItem("A", "MenuARead", "MenuAWrite"), 20 | new MenuItem("B", "MenuBRead", "MenuBWrite"), 21 | new MenuItem("C", "MenuCRead", "MenuCWrite"), 22 | new MenuItem("D", "MenuDRead", "MenuDWrite") 23 | }; 24 | 25 | List menuItems = Arrays.asList(menuItemsArray); 26 | 27 | MenuAccess menuAccess = new MenuAccess(); 28 | 29 | menuAccess.setAuthorizationsInEachMenus(menuItems, userRoles); 30 | 31 | MenuItem menuItemA = menuItems.get(0); 32 | assertEquals(Constants.READ, menuItemA.getAccess()); 33 | assertEquals(true, menuItemA.isVisible()); 34 | 35 | MenuItem menuItemB = menuItems.get(1); 36 | assertEquals(Constants.WRITE, menuItemB.getAccess()); 37 | assertEquals(true, menuItemB.isVisible()); 38 | 39 | MenuItem menuItemC = menuItems.get(2); 40 | assertEquals(Constants.WRITE, menuItemC.getAccess()); 41 | assertEquals(true, menuItemC.isVisible()); 42 | 43 | MenuItem menuItemD = menuItems.get(3); 44 | assertEquals(null, menuItemD.getAccess()); 45 | assertEquals(false, menuItemD.isVisible()); 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/test/java/com/c/refactoring/menuexamples/MenuAccessTestRefactored.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.menuexamples; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import org.junit.jupiter.api.Test; 9 | 10 | public class MenuAccessTestRefactored { 11 | 12 | private static final MenuItem MENU_A = new MenuItem("A", "MenuARead", "MenuAWrite"); 13 | private static final Role MENU_A_WRITE_ROLE = new Role("MenuAWrite"); 14 | private static final Role MENU_A_READ_ROLE = new Role("MenuARead"); 15 | 16 | MenuAccess menuAccess = new MenuAccess(); 17 | 18 | @Test 19 | public void testSetAuthorizationsInEachMenus_UserHasReadAndWriteRoles() { 20 | 21 | Role[] userRoles = { MENU_A_READ_ROLE, MENU_A_WRITE_ROLE }; 22 | 23 | List menuItems = Arrays.asList(MENU_A); 24 | 25 | menuAccess.setAuthorizationsInEachMenus(menuItems, userRoles); 26 | 27 | assertMenuItemIsWritable(menuItems.get(0)); 28 | } 29 | 30 | @Test 31 | public void testSetAuthorizationsInEachMenus_UserHasOnlyReadRole() { 32 | 33 | Role[] userRoles = { MENU_A_READ_ROLE }; 34 | 35 | List menuItems = Arrays.asList(MENU_A); 36 | 37 | menuAccess.setAuthorizationsInEachMenus(menuItems, userRoles); 38 | 39 | assertMenuItemIsReadable(menuItems.get(0)); 40 | } 41 | 42 | @Test 43 | public void testSetAuthorizationsInEachMenus_UserHasOnlyWriteRole() { 44 | 45 | Role[] userRoles = { MENU_A_WRITE_ROLE }; 46 | 47 | List menuItems = Arrays.asList(MENU_A); 48 | 49 | menuAccess.setAuthorizationsInEachMenus(menuItems, userRoles); 50 | 51 | MenuItem actual = menuItems.get(0); 52 | assertMenuItemIsWritable(actual); 53 | } 54 | 55 | private void assertMenuItemIsWritable(MenuItem actual) { 56 | assertEquals(Constants.WRITE, actual.getAccess()); 57 | assertEquals(true, actual.isVisible()); 58 | } 59 | 60 | private void assertMenuItemIsReadable(MenuItem actual) { 61 | assertEquals(Constants.READ, actual.getAccess()); 62 | assertEquals(true, actual.isVisible()); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/test/java/com/c/refactoring/movie/MovieTest.java: -------------------------------------------------------------------------------- 1 | package com.c.refactoring.movie; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertFalse; 4 | import static org.junit.jupiter.api.Assertions.assertTrue; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | public class MovieTest { 9 | @Test 10 | public void testIsValidRating() { 11 | assertTrue(new Movie("B1").isValidRating()); 12 | assertTrue(new Movie("B2").isValidRating()); 13 | assertTrue(new Movie("B3").isValidRating()); 14 | assertTrue(new Movie("B4").isValidRating()); 15 | assertFalse(new Movie("B5").isValidRating()); 16 | assertFalse(new Movie("B10").isValidRating()); 17 | 18 | assertTrue(new Movie("A10").isValidRating()); 19 | assertTrue(new Movie("A11").isValidRating()); 20 | assertTrue(new Movie("A99").isValidRating()); 21 | 22 | assertFalse(new Movie("A1").isValidRating()); 23 | assertFalse(new Movie("A2").isValidRating()); 24 | assertFalse(new Movie("A100").isValidRating()); 25 | assertFalse(new Movie("A786").isValidRating()); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/test/java/com/d/tdd/GameTest.java: -------------------------------------------------------------------------------- 1 | package com.d.tdd; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | //0 20 8 | //1 20 9 | //1 10 2 10 10 | // spare 5,5 1 18 11 | 12 | class GameTest { 13 | 14 | Game game = new Game(); 15 | 16 | @Test 17 | void testAll0s() { 18 | 19 | rollMultipleTimes(0, 20); 20 | 21 | assertEquals(0, game.score()); 22 | } 23 | 24 | @Test 25 | void testAll1s() { 26 | 27 | rollMultipleTimes(1, 20); 28 | 29 | assertEquals(20, game.score()); 30 | } 31 | 32 | @Test 33 | void testHalf1sAndHalf2s() { 34 | 35 | rollMultipleTimes(1, 10); 36 | rollMultipleTimes(2, 10); 37 | 38 | assertEquals(30, game.score()); 39 | } 40 | 41 | @Test 42 | void testSpare() { 43 | 44 | rollASpare(); 45 | rollMultipleTimes(1, 18); 46 | 47 | assertEquals(29, game.score()); 48 | } 49 | 50 | @Test 51 | void testTwoSpares() { 52 | 53 | rollASpare(); 54 | rollASpare(); 55 | rollMultipleTimes(1, 16); 56 | 57 | assertEquals(42, game.score()); 58 | } 59 | 60 | @Test 61 | void testStrike() { 62 | game.roll(10); 63 | rollMultipleTimes(1, 18); 64 | assertEquals(30, game.score()); 65 | } 66 | 67 | 68 | private void rollASpare() { 69 | rollMultipleTimes(5, 2); 70 | } 71 | 72 | private void rollMultipleTimes(int pinsKnockedDown, int noOfTimes) { 73 | for (int i = 1; i <= noOfTimes; i++) 74 | game.roll(pinsKnockedDown); 75 | } 76 | 77 | } 78 | 79 | //Red 80 | //Green 81 | //Refactor 82 | -------------------------------------------------------------------------------- /src/test/java/com/d/tdd/StringHelperTest.java: -------------------------------------------------------------------------------- 1 | package com.d.tdd; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.assertFalse; 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | class StringHelperTest { 10 | //"", "A", "AA", "B", "BC" 11 | StringHelper helper = new StringHelper(); 12 | 13 | @Test 14 | void testReplaceAInFirst2Positions() { 15 | assertEquals("BCD", helper.replaceAInFirst2Positions("ABCD")); 16 | assertEquals("CD", helper.replaceAInFirst2Positions("AACD")); 17 | assertEquals("BCD", helper.replaceAInFirst2Positions("BACD")); 18 | assertEquals("AA", helper.replaceAInFirst2Positions("AAAA")); 19 | assertEquals("MNAA", helper.replaceAInFirst2Positions("MNAA")); 20 | assertEquals("", helper.replaceAInFirst2Positions("")); 21 | assertEquals("", helper.replaceAInFirst2Positions("A")); 22 | assertEquals("", helper.replaceAInFirst2Positions("AA")); 23 | assertEquals("B", helper.replaceAInFirst2Positions("B")); 24 | assertEquals("BC", helper.replaceAInFirst2Positions("BC")); 25 | } 26 | 27 | //""=>false, "A"=>false, "AB"=>true, "ABC"=>false, "AAA"=>true, "ABCAB"=>true, "ABCDEBA"=>false 28 | //Red 29 | //Green 30 | //Refactor 31 | 32 | @Test 33 | void testAreFirstTwoAndLastTwoCharsTheSame() { 34 | assertFalse(helper.areFirstTwoAndLastTwoCharsTheSame("")); 35 | assertFalse(helper.areFirstTwoAndLastTwoCharsTheSame("A")); 36 | assertTrue(helper.areFirstTwoAndLastTwoCharsTheSame("AB")); 37 | assertFalse(helper.areFirstTwoAndLastTwoCharsTheSame("ABC")); 38 | assertTrue(helper.areFirstTwoAndLastTwoCharsTheSame("AAA")); 39 | assertTrue(helper.areFirstTwoAndLastTwoCharsTheSame("ABCAB")); 40 | assertFalse(helper.areFirstTwoAndLastTwoCharsTheSame("ABCDEBA")); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/test/resources/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 108 4 | /svn/fb/!svn/ver/12323/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/resources 5 | END 6 | ReportBusinessIntegerationTestData.sql 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 146 10 | /svn/fb/!svn/ver/8729/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/resources/ReportBusinessIntegerationTestData.sql 11 | END 12 | reportBusinessTest-config.xml 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 138 16 | /svn/fb/!svn/ver/12323/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/resources/reportBusinessTest-config.xml 17 | END 18 | reportBusinessIntegrationTest-config.xml 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 149 22 | /svn/fb/!svn/ver/12323/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/resources/reportBusinessIntegrationTest-config.xml 23 | END 24 | -------------------------------------------------------------------------------- /src/test/resources/.svn/entries: -------------------------------------------------------------------------------- 1 | 9 2 | 3 | dir 4 | 13005 5 | http://wsrv0983.rabobank.corp:8081/svn/fb/projects/reports/corporate/proposal/proposal-letter/trunk/business/src/test/resources 6 | http://wsrv0983.rabobank.corp:8081/svn/fb 7 | 8 | 9 | 10 | 2012-03-23T10:37:25.701801Z 11 | 12323 12 | KanagarajS 13 | 14 | 15 | svn:special svn:externals svn:needs-lock 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | d059e6cc-126c-8044-a285-c00e0610bbda 28 | 29 | ReportBusinessIntegerationTestData.sql 30 | file 31 | 32 | 33 | 34 | 35 | 2012-04-05T15:39:08.743497Z 36 | c889b888f5239feac572272bcce2cf65 37 | 2011-12-21T13:39:06.952161Z 38 | 8729 39 | ThangarajaS 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 49889 62 | 63 | reportBusinessTest-config.xml 64 | file 65 | 66 | 67 | 68 | 69 | 2012-04-05T15:39:08.752498Z 70 | 3966cbdca4b3c896dafb3ab8c0b4fc50 71 | 2012-03-23T10:37:25.701801Z 72 | 12323 73 | KanagarajS 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 1689 96 | 97 | reportBusinessIntegrationTest-config.xml 98 | file 99 | 100 | 101 | 102 | 103 | 2012-04-05T15:39:08.758498Z 104 | 3d0bdec84f07305502b690b2ecf37222 105 | 2012-03-23T10:37:25.701801Z 106 | 12323 107 | KanagarajS 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 3113 130 | 131 | -------------------------------------------------------------------------------- /src/test/resources/.svn/format: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /src/test/resources/.svn/text-base/reportBusinessTest-config.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tdd.md: -------------------------------------------------------------------------------- 1 | 2 | ## Problems 3 | 4 | ### Truncate A in first 2 positions of a String 5 | 6 | - "ABCD" => "BCD", "AACD"=> "CD", "BACD"=>"BCD", "AAAA" => "AA", "MNAA"=>"MNAA" 7 | 8 | ### Check if first two and last two characters in the string are the same. 9 | 10 | - ""=>false, "A"=>false, "AB"=>true, "ABC"=>false, "AAA"=>true, "ABCAB"=>true, "ABCDEBA"=>false 11 | 12 | Hint : substring method. 13 | 14 | ### Bowling Kata 15 | 16 | Popular kata popularized by Uncle Bob 17 | - http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata 18 | 19 | - 10 Bowling Pins 20 | - Each Game has 10 frames 21 | - Each frame has upto 2 rolls 22 | - Base score is sum of pins knocked down in 2 rolls 23 | - Bonus Points 24 | - Spare 25 | - You knock down all 10 pins in your 2 rolls 26 | - You get double points for your next roll 27 | - Strike 28 | - You knock all 10 pins in your first roll 29 | - You get double points for your next two rolls 30 | - In 10th frame, you can have three rolls if you roll a Spare or a Strike 31 | 32 | - Example 1 : 2,2|4,5|4,5|4,5|2,5 33 | - Score = 2+2+4+5+4+5+4+5+2+5 34 | - Example 2 : 5,5|4,6|3, 7|6,4|1,1 35 | - Score = 5+9+4+9+3+13+6+5+1+1 36 | - Example 3 : 10|10|10|10|1,1 37 | - Score = 30+30+21+12+2 38 | 39 | #### Design 40 | - Create a class Game with methods `void roll(int pins)` and `int score()` 41 | -------------------------------------------------------------------------------- /zztemp.md: -------------------------------------------------------------------------------- 1 | 2 | ```java 3 | package com.b.simple.design.business.customer; 4 | 5 | import static org.junit.jupiter.api.Assertions.assertEquals; 6 | 7 | import java.math.BigDecimal; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | import org.junit.jupiter.api.Assertions; 12 | import org.junit.jupiter.api.Test; 13 | 14 | import com.b.simple.design.business.customer.CustomerBO; 15 | import com.b.simple.design.business.customer.CustomerBOImplRefactored; 16 | import com.b.simple.design.business.exception.DifferentCurrenciesException; 17 | import com.b.simple.design.model.customer.Amount; 18 | import com.b.simple.design.model.customer.AmountImpl; 19 | import com.b.simple.design.model.customer.Currency; 20 | import com.b.simple.design.model.customer.Product; 21 | import com.b.simple.design.model.customer.ProductImpl; 22 | import com.b.simple.design.model.customer.ProductType; 23 | 24 | public class CustomerBOTestRefactored { 25 | 26 | private CustomerBO clientBO = new CustomerBOImplRefactored(); 27 | 28 | @Test 29 | public void testCustomerProductSum_AllProductsSameCurrency() 30 | throws DifferentCurrenciesException { 31 | 32 | Amount[] amounts = { 33 | new AmountImpl(new BigDecimal("5.0"), Currency.EURO), 34 | new AmountImpl(new BigDecimal("6.0"), Currency.EURO) }; 35 | 36 | Amount expected = new AmountImpl(new BigDecimal("11.0"), Currency.EURO); 37 | 38 | List products = createProductListWithAmounts(amounts); 39 | 40 | Amount actual = clientBO.getCustomerProductsSum(products); 41 | 42 | assertAmount(actual, expected); 43 | } 44 | 45 | @Test 46 | public void testCustomerProductSum_DifferentCurrencies_ThrowsException() 47 | throws DifferentCurrenciesException { 48 | 49 | Amount[] amounts = { 50 | new AmountImpl(new BigDecimal("5.0"), Currency.EURO), 51 | new AmountImpl(new BigDecimal("6.0"), Currency.INDIAN_RUPEE) }; 52 | 53 | List products = createProductListWithAmounts(amounts); 54 | 55 | Assertions.assertThrows(DifferentCurrenciesException.class, () -> { 56 | @SuppressWarnings("unused") 57 | Amount actual = clientBO.getCustomerProductsSum(products); 58 | }); 59 | } 60 | 61 | @Test 62 | public void testCustomerProductSum_NoProducts() 63 | throws DifferentCurrenciesException { 64 | 65 | Amount[] amounts = {}; 66 | Amount expected = new AmountImpl(BigDecimal.ZERO, Currency.EURO); 67 | 68 | List products = createProductListWithAmounts(amounts); 69 | 70 | Amount actual = clientBO.getCustomerProductsSum(products); 71 | 72 | 73 | assertAmount(actual, expected); 74 | } 75 | 76 | private void assertAmount(Amount actual, Amount expected) { 77 | assertEquals(expected.getCurrency(), actual.getCurrency()); 78 | assertEquals(expected.getValue(), actual.getValue()); 79 | } 80 | 81 | private List createProductListWithAmounts(Amount[] amounts) { 82 | List products = new ArrayList(); 83 | for (Amount amount : amounts) { 84 | products.add(new ProductImpl(100, "Product 15", 85 | ProductType.BANK_GUARANTEE, amount)); 86 | } 87 | return products; 88 | } 89 | 90 | } 91 | ``` --------------------------------------------------------------------------------