Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GW SDAB Dev Tools 2012

294 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

GW SDAB Dev Tools 2012

  1. 1. GW SDAB | DEV TOOLS Hervé Vũ Roussel September, 12th 2012 1
  2. 2. Point of views
  3. 3. Questions? Ask as they come to you!
  4. 4. Agenda  SVN  ANT  JUnit  Ticketing system 4
  5. 5. 5
  6. 6. France
  7. 7. Vietnam
  8. 8. Hervé Vũ Roussel Unusual name
  9. 9. Career choice
  10. 10. Brain surgeon
  11. 11. Engineer
  12. 12. Astronaut
  13. 13. B.S.,GWU
  14. 14. Honors Scholarship
  15. 15. Gelman Library
  16. 16. CS department
  17. 17. Civil Engineering department
  18. 18. Weekends
  19. 19. Web dev at French consulate
  20. 20. M. Eng., Cornell University
  21. 21. Going to classes
  22. 22. ME Siemens Medical Solutions, 3.5k emp.
  23. 23. ME CA (Computer Associates), 15k emp.
  24. 24. Unstoppable
  25. 25. Day 0 | Linked Senior
  26. 26. Day 1 | Linked Senior
  27. 27. Day 2 | Linked Senior
  28. 28. Day 3 | Linked Senior
  29. 29. Day 4 | Linked Senior
  30. 30. Day 5 | Linked Senior
  31. 31. Day 6 | Linked Senior
  32. 32. Day 7 | Linked Senior
  33. 33. Day 8: Happy seniors | Linked Senior
  34. 34. Day 9: More happy seniors | Linked Senior
  35. 35. Today | Linked Senior
  36. 36. Office | Linked Senior
  37. 37. ME Team | Linked Senior
  38. 38. More team | Linked Senior
  39. 39. Amazing adventure | Linked Senior
  40. 40. 40
  41. 41. School VS Real world
  42. 42. Team size
  43. 43. Team location
  44. 44. Project life
  45. 45. Complexity
  46. 46. Customers
  47. 47. 47
  48. 48. 48
  49. 49. Where will you store your SD code? To: hroussel@gmail.com Attachment: 2003-02-01-post-simha-pres.zip 49
  50. 50. Storage
  51. 51. Concurrent access
  52. 52. Version tracking
  53. 53. History
  54. 54. Architecture 54
  55. 55. Hands on | Project  Project: ZooZooPet  Educational game for kids  Web & Android version  API team  Company 55
  56. 56. Hands on 1 /3  Development stage  Teams  Team #1: Make the Lion speak  Team #2: Make the Tiger speak  Goal: 1.0 release 56
  57. 57. Initial download: svn checkout 57
  58. 58. Code
  59. 59. Submit code: svn commit 59
  60. 60. Submit code: svn commit 60
  61. 61. Submit code commit History view on repo 61
  62. 62. svn log
  63. 63. svn log [path] com/linkedsenior games video audio tic-tac-toe sudoku word-search 63
  64. 64. svn diff
  65. 65. svn diff
  66. 66. What was I working on?
  67. 67. Synchronize: svn update 67
  68. 68. 68
  69. 69. 2-way merge 69
  70. 70. 2-way merge GUI 70
  71. 71. 71
  72. 72. SVN | Workflow Synchronize • svn checkout • svn update Publish Work • svn commit • svn add • svn mkdir • svn del Resolve (optional) Review changes • svn resolve • svn merge • svn diff • svn status • svn revert 72
  73. 73. Hands on 1/3 | Outcome 73
  74. 74. ZooZooPet | Best game ever  1.0 released (1 billion download)  Thinking about 2.0 features  More animals  Team#2 assigned  Bug found in public release of 1.0! 74
  75. 75. Hands on 2/3  1.0 released  Bug #1 filed  Bug fix on 1.0, release 1.1  2.0 release 75
  76. 76. Release management
  77. 77. Fix version 1.0 in the wild
  78. 78. Tagging
  79. 79. Tagging 1.0
  80. 80. svn switch [rev] [path]
  81. 81. Creeped up bug
  82. 82. 20 sec. Time to switch revision
  83. 83. 30 sec. Time to clean re-build app
  84. 84. 5 min. Time to find if bug exists
  85. 85. 2 sec. Wiping sweat
  86. 86. <-- 150 rev. --> Num of rev between v1.0 and v1.8
  87. 87. (20+30+5*60) * log2(150) Calculating…
  88. 88. 42 min 6 sec Time to find guilty rev
  89. 89. Branching
  90. 90. Hands on 2/3 | Outcome 90
  91. 91. svn copy  Tagging svn copy -r {rev} http://.../trunk http://.../branches/1.x  Branching svn copy -r {rev} http://.../trunk http://.../tags/1.0 91
  92. 92. svn copy ZooZooPet trunk tags branches 1.0 1.x 92
  93. 93. Problem with evolution of code 93
  94. 94. SVN: 3-way merge 94
  95. 95. Best practices  What to version control?  When to commit?  What to say?  Trunk policy 95
  96. 96. 96
  97. 97. 97
  98. 98. 98
  99. 99. Runnable
  100. 100. Deliverable
  101. 101. Release early, release often
  102. 102. Versatile build
  103. 103. Complex builds
  104. 104. Overview  Scripting language  XML based  Written in Java 104
  105. 105. Hands on 3/3  Write a build file for our application  Follow instructions on SetupAnt wiki page  Follow instructions on HandsOn3 wiki page 105
  106. 106. Sample build file 106
  107. 107. Target (order) <target name="init">… <target name="compile" depends="init“… <target name="dist" depends="compile“… 107
  108. 108. Target (function body) <target name="compile" depends="init" description="compile the source " > <javac srcdir="${src}" destdir="${build}"/> </target> 108
  109. 109. Some built-in ANT tasks (API) <mkdir dir="${dist}/lib"/> <delete dir="${dist}"/> <javac srcdir="${src}" destdir="${build}"/> <jar jarfile="${dist}/lib/MyProject${DSTAMP}.jar" basedir="${build}"/> 109
  110. 110. Variables <property name=“compile.debug" value=“true"/> <javac srcdir="src" destdir="build" debug="${compile.debug}" /> 110
  111. 111. Running 111
  112. 112. Advanced ANT
  113. 113. 113
  114. 114. 114
  115. 115. YAY!!
  116. 116. WHY? | TESTING
  117. 117. WHY? | TESTING
  118. 118. What is it?| Test Initial state Scenario Verification 118
  119. 119. What’s JUnit?
  120. 120. JUnit sample code @Test public void simpleAdd() { Money m12CHF= new Money(12, "CHF"); Money m14CHF= new Money(14, "CHF"); Money expected= new Money(26, "CHF"); Money result= m12CHF.add(m14CHF); assertTrue(expected.equals(result)); } 120
  121. 121. JUnit | Running
  122. 122. JUnit | Reporting
  123. 123. Test driven development 1. Create a new test 4. Repeat steps 2 & 3 until test pass. 2. Run test 3. Code 123
  124. 124. TDD example #1 TicTacToe t = new TicTacToe(); t.makeMove(Position.TOP_LEFT); t.makeMove(Position.TOP_RIGHT); t.makeMove(Position.MIDDLE_LEFT); t.makeMove(Position.MIDDLE_RIGHT); t.makeMove(Position.BOTTOM_LEFT); assertTrue(t.getWinnerId(), 1); 124
  125. 125. TDD example #2 TicTacToe t = new TicTacToe("John", "Jim"); t.set(Token.X, t.set(Token.Y, t.set(Token.X, t.set(Token.Y, 0, 2, 0, 2, 0); 0); 1); 1); t.set(Token.X, 0, 2); assertEquals(t.getWinner(), "John"); 125
  126. 126. Test as living documentation
  127. 127. 127
  128. 128. Bust or Budget
  129. 129. Bust or Budget
  130. 130. Bust or Budget
  131. 131. Bust or Budget
  132. 132. Bust or Budget
  133. 133. Bust or Budget
  134. 134. Bust or Budget
  135. 135. Bust or Budget
  136. 136. Bust or Budget
  137. 137. Bust or Budget
  138. 138. Bust or Budget game rule class BustOrBudgetGameTest { @Test void itShouldEndWhenThereIsOnlyOnePlayingTeam() { // Given ... bobGameDriver.startGame(team1, team2); // ... // When ... bobGameDriver.endTurn(team2, true); assert bobGameDriver.teamInPlay.size == 1; // Then assert bobGameDriver.matchOver == true; } } 138
  139. 139. Poll: When to run tests? 1. Before a major deadline 2. After major code change 3. When Prof. Simha looks over your shoulder 4. When Prof. Parmer looks over your shoulder 5. All of the above 6. None of the above 139
  140. 140. Fixing a bug
  141. 141. Finding the culprit
  142. 142. 7 stages of debugging
  143. 143. println “Hello world :)” StageI: Denial
  144. 144. println “Before call” println “After call” Stage II: Acceptance
  145. 145. println “test” println “bla” println “here” Stage III: Depression
  146. 146. println “1” println “2” Stage IV: Acceptance
  147. 147. println “a” println “aa” println “aaa” Stage V: Fatigue
  148. 148. println “!)(@&#$!!!” Stage VI: Anger
  149. 149. println “why” println “god” println “oh” println “why” Stage VII: Despair
  150. 150. Deliverance
  151. 151. The bottleneck
  152. 152. When to test?
  153. 153. Rethinking testing
  154. 154. Build tools | Continuous integration
  155. 155. Build tools | CI Report 155
  156. 156. 156
  157. 157. 157
  158. 158. Bug submission
  159. 159. Bug lifecycle
  160. 160. Bug search
  161. 161. Organization tool
  162. 162. Collaboration tool
  163. 163. Context | Ticket
  164. 164. Velocity
  165. 165. 165
  166. 166. 166

×