The Visual Terminator

3,573 views

Published on

My first ever keynote, given at MSR 2010 in Capetown, South Africa

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,573
On SlideShare
0
From Embeds
0
Number of Embeds
96
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

The Visual Terminator

  1. 1. the visual terminator Michele Lanza
  2. 2. Honor
  3. 3. Horror
  4. 4. Terror
  5. 5. Resolve
  6. 6. the visual terminator Michele Lanza
  7. 7. The visual Terminator Michele Lanza
  8. 8. The visual terminator Michele Lanza REVEAL @ Faculty of Informatics University of Lugano, Switzerland
  9. 9. Terminator I Terminator II the terminator judgment day Terminator III Terminator IV rise of the machines salvation
  10. 10. my self
  11. 11. change-centric immersive software evolution software visualization synchronous next-gen visual development programming software ecosystems bug analysis/prediction holistic evolution
  12. 12. romain robbes mircea lungu marco d’ambros richard wettel lile hattori fernando olivero alberto bacchelli
  13. 13. scripta manent
  14. 14. 173
  15. 15. Terminator I the terminator
  16. 16. nullius in verba
  17. 17. of making insects with cheese
  18. 18. of killing frogs, by touching their skin, with vinegar, pitch, or mercury
  19. 19. of spiders not being inchanted by a circle of unicorns-horn, or Irish earth, laid round about it
  20. 20. “Unless I see in his hands the print of the nails [..], and put my hands into his side: I will not believe.” John 20: 24 - 29
  21. 21. Software: The intangible objects inside the computer. Soft?
  22. 22. Programming is a kind of writing. Gerald M. Weinberg Psychology of Computer Programming Dorset House, 1971
  23. 23. programming ~ writing
  24. 24. programming ~ writing software ~ text
  25. 25. /***************************************************************************/ if(p<3&y==E)H=y^16; /* shift capt.sqr. H if e.p.*/ /* micro-Max, */ t=b[H];if(t&k|p<3&!(r&7)!=!t)break; /* capt. own, bad pawn mode */ /* A chess program smaller than 2KB (of non-blank source), by H.G. Muller */ i=99*w[t&7]; /* value of capt. piece t */ /***************************************************************************/ if(i<0||E-S&&b[E]&&y-E<2&E-y<2)m=I; /* K capt. or bad castling */ /* version 3.2 (2000 characters) features: */ if(m>=l)goto C; /* abort on fail high */ /* - recursive negamax search */ if(h=d-(y!=z)) /* remaining depth(-recapt.)*/ /* - quiescence search with recaptures */ {v=p<6?b[x+8]-b[y+8]:0; /* center positional pts. */ /* - recapture extensions */ b[G]=b[H]=b[x]=0;b[y]=u&31; /* do move, strip virgin-bit*/ /* - (internal) iterative deepening */ if(!(G&M)){b[F]=k+6;v+=30;} /* castling: put R & score */ /* - best-move-first 'sorting' */ if(p<3) /* pawns: */ /* - a hash table storing score and best move */ {v-=9*(((x-2)&M||b[x-2]!=u)+ /* structure, undefended */ /* - full FIDE rules (expt minor ptomotion) and move-legality checking */ ((x+2)&M||b[x+2]!=u)-1); /* squares plus bias */ if(y+r+1&S){b[y]|=7;i+=C;} /* promote p to Q, add score*/ #define F(I,S,N) for(I=S;I<N;I++) } #define W(A) while(A) v=-D(24-k,-l-(l>e),m>q?-m:-q,-e-v-i, /* recursive eval. of reply */ #define K(A,B) *(int*)(T+A+(B&8)+S*(B&7)) J+J(0),Z+J(8)+G-S,F,y,h); /* J,Z: hash keys */ #define J(A) K(y+A,b[y])-K(x+A,u)-K(H+A,t) v-=v>e; /* delayed-gain penalty */ if(z==9) /* called as move-legality */ #define U 16777224 {if(v!=-I&x==K&y==L) /* checker: if move found */ struct _ {int K,V;char X,Y,D;} A[U]; /* hash table, 16M+8 entries*/ {Q=-e-i;O=F;return l;} /* & not in check, signal */ v=m; /* (prevent fail-lows on */ int V=112,M=136,S=128,I=8e4,C=799,Q,N,i; /* V=0x70=rank mask, M=0x88 */ } /* K-capt. replies) */ b[G]=k+38;b[F]=b[y]=0;b[x]=u;b[H]=t; /* undo move,G can be dummy */ char O,K,L, if(Y&8){m=v;Y&=~8;goto A;} /* best=1st done,redo normal*/ w[]={0,1,1,3,-1,3,5,9}, /* relative piece values */ if(v>m){m=v;X=x;Y=y|S&G;} /* update max, mark with S */ o[]={-16,-15,-17,0,1,16,0,1,16,15,17,0,14,18,31,33,0, /* step-vector lists */ } /* if non castling */ 7,-1,11,6,8,3,6, /* 1st dir. in o[] per piece*/ t+=p<5; /* fake capt. for nonsliding*/ 6,3,5,7,4,5,3,6}, /* initial piece setup */ if(p<3&6*k+(y&V)==S /* pawn on 3rd/6th, or */ b[129], /* board: half of 16x8+dummy*/ ||(u&~24)==36&j==7&& /* virgin K moving sideways,*/ T[1035], /* hash translation table */ G&M&&b[G=(x|7)-(r>>1&7)]&32 /* 1st, virgin R in corner G*/ &&!(b[G^1]|b[G^2]) /* 2 empty sqrs. next to R */ n[]=".?+nkbrq?*?NKBRQ"; /* piece symbols on printout*/ ){F=y;t--;} /* unfake capt., enable e.p.*/ }W(!t); /* if not capt. continue ray*/ D(k,q,l,e,J,Z,E,z,n) /* recursive minimax search, k=moving side, n=depth*/ }}}W((x=x+9&~M)-B); /* next sqr. of board, wrap */ int k,q,l,e,J,Z,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ C:if(m>I/4|m<-I/4)d=99; /* mate is indep. of depth */ { /* e=score, z=prev.dest; J,Z=hashkeys; return score*/ m=m+I?m:-D(24-k,-I,I,0,J,Z,S,S,1)/2; /* best loses K: (stale)mate*/ int j,r,m,v,d,h,i=9,F,G; if(!a->K|(a->X&M)!=M|a->D<=d) /* if new/better type/depth:*/ char t,p,u,x,y,X,Y,H,B; {a->K=Z;a->V=m;a->D=d;A->K=0; /* store in hash,dummy stays*/ struct _*a=A; a->X=X|8*(m>q)|S*(m<l);a->Y=Y; /* empty, type (limit/exact)*/ /* lookup pos. in hash table*/ } /* encoded in X S,8 bits */ j=(k*E^J)&U-9; /* try 8 consec. locations */ /*if(z==8)printf("%2d ply, %9d searched, %6d by (%2x,%2x)n",d-1,N,m,X,Y&0x77);*/ W((h=A[++j].K)&&h-Z&&--i); /* first empty or match */ } a+=i?j:0; /* dummy A[0] if miss & full*/ if(z&8){K=X;L=Y&~M;} if(a->K) /* hit: pos. is in hash tab */ return m; {d=a->D;v=a->V;X=a->X; /* examine stored data */ } if(d>=n) /* if depth sufficient: */ {if(v>=l|X&S&&v<=q|X&8)return v; /* use if window compatible */ main() d=n-1; /* or use as iter. start */ { }X&=~M;Y=a->Y; /* with best-move hint */ int j,k=8,*p,c[9]; Y=d?Y:0; /* don't try best at d=0 */ }else d=X=Y=0; /* start iter., no best yet */ F(i,0,8) N++; /* node count (for timing) */ {b[i]=(b[i+V]=o[i+24]+40)+8;b[i+16]=18;b[i+96]=9; /* initial board setup*/ W(d++<n|z==8&N<1e7&d<98) /* iterative deepening loop */ F(j,0,8)b[16*j+i+8]=(i-4)*(i-4)+(j-3.5)*(j-3.5); /* center-pts table */ {x=B=X; /* start scan at prev. best */ } /*(in unused half b[])*/ Y|=8&Y>>4; /* request try noncastl. 1st*/ F(i,M,1035)T[i]=random()>>9; m=d>1?-I:e; /* unconsidered:static eval */ do{u=b[x]; /* scan board looking for */ W(1) /* play loop */ if(u&k) /* own piece (inefficient!)*/ {F(i,0,121)printf(" %c",i&8&&(i+=7)?10:n[b[i]&15]); /* print board */ {r=p=u&7; /* p = piece type (set r>0) */ p=c;W((*p++=getchar())>10); /* read input line */ j=o[p+16]; /* first step vector f.piece*/ N=0; W(r=p>2&r<0?-r:-o[++j]) /* loop over directions o[] */ if(*c-10){K=c[0]-16*c[1]+C;L=c[2]-16*c[3]+C;}else /* parse entered move */ {A: /* resume normal after best */ D(k,-I,I,Q,1,1,O,8,0); /* or think up one */ y=x;F=G=S; /* (x,y)=move, (F,G)=castl.R*/ F(i,0,U)A[i].K=0; /* clear hash table */ do{H=y+=r; /* y traverses ray */ if(D(k,-I,I,Q,1,1,O,9,2)==I)k^=24; /* check legality & do*/ if(Y&8)H=y=Y&~M; /* sneak in prev. best move */ } if(y&M)break; /* board edge hit */ }
  26. 26. Deciduous shrub, glabrous or nearly so, with weak, trailing sub-glaucous, often purple- tinted stems, either decumbent and forming low bushes 50 - 100 cm high, or climbing over other shrubs, rarely more erect and reaching 2 m. Prickles hooked, all +- equal. L’flets 2-3 pairs, 1-3.5 cm, ovate or ovate-elliptic, simply, rarely double serrate, glabrous on both sides or pubescent on the veins (rarely all over) beneath, rather thin; petiole usually with some stalked glands; stipules narrow, auricles straight. Flowers 1-6, white 3-5 cm diam.; pedicels 2-4 cm with stalked glands, rarely smooth; buds short... etc. etc.
  27. 27. Deciduous shrub, glabrous or nearly so, with weak, trailing sub-glaucous, often purple- tinted stems, either decumbent and forming low bushes 50 - 100 cm high, or climbing over other shrubs, rarely more erect and reaching 2 m. Prickles hooked, all +- equal. L’flets 2-3 pairs, 1-3.5 cm, ovate or ovate-elliptic, simply, rarely double serrate, glabrous on both sides or pubescent on the veins (rarely all over) beneath, rather thin; petiole usually with some stalked glands; stipules narrow, auricles straight. Flowers 1-6, white 3-5 cm diam.; pedicels 2-4 cm with stalked glands, rarely smooth; buds short... etc. etc.
  28. 28. It would be a great mistake to suppose that the dominant role of visual observation has now been overthrown by more ‘analytical’ methods. John Ziman Reliable Knowledge An Exploration of the Grounds for Belief in Science Cambridge University Press, 1978
  29. 29. old habits die hard
  30. 30. free your mind
  31. 31. Software Visualization The use of the crafts of typography, graphic design, animation, and cinematography with modern human- computer interaction and computer graphics technology to facilitate both the human understanding and effective use of computer software. Stasko, 1998
  32. 32. Software Visualization The use of the crafts of typography, graphic design, animation, and cinematography with modern human- computer interaction and computer graphics technology to facilitate both the human understanding and effective use of computer software. Lanza, 2010
  33. 33. (software) visualization myths
  34. 34. a picture is worth a thousand words
  35. 35. n g a picture is worth ro words w a thousand
  36. 36. UML is software visualization
  37. 37. g UML is software n r o w visualization
  38. 38. visual programming is software visualization
  39. 39. n g visual programming is r o w software visualization
  40. 40. static visualization software visualization dynamic visualization
  41. 41. ng ro ng w static visualization ro w software visualization ng o dynamic wr visualization
  42. 42. about software of software software visualization
  43. 43. about software software of software information visualization visualization
  44. 44. William Playfair 1759 - 1823
  45. 45. Jacques Bertin Semiology of Graphics,1967
  46. 46. visualization ~ story
  47. 47. It was the twenty-eight of November. An immense confused mass of men, horses, vehicles besieged the narrow entrances to the bridges and began to flow over them.
  48. 48. It was the twenty-eight of November. An immense confused mass of men, horses, vehicles besieged the narrow entrances to the bridges and began to flow over them. Those in front, pushed by the weight of those behind were crushed, trampled on, or forced into the ice-filled water of the Berezina. The confusion was so great that when Napoleon himself wished to cross, it was necessary to use force to clear a passage. Some there were who, determined to pass at all costs, cut a horrible way for themselves with their swords. Others opened an even crueler road for their carriages, driving them pitilessly through the helpless crowd, crushing men and women, in their odious greed sacrificing their companions in misery.
  49. 49. seeing ~ understanding
  50. 50. We acquire more information through vision than through all the other senses combined. Colin Ware Information Visualization Perception for Design Morgan Kaufmann, 2004
  51. 51. we see with the brain
  52. 52. iconic memory
  53. 53. short-term memory
  54. 54. long-term memory
  55. 55. Orientation
  56. 56. Length
  57. 57. Width
  58. 58. Position / Proximity
  59. 59. Enclosure
  60. 60. Shape / Similarity
  61. 61. Connectedness
  62. 62. about software of software software visualization
  63. 63. Stephen Few Edward Tufte Show Me the Numbers The Visual Display of Quantitative Information Analytics Press, 2004 Morgan Kaufmann, 2004
  64. 64. about software of software visualization software
  65. 65. Terminator II judgment day
  66. 66. WCRE 1999, TSE 2003
  67. 67. visualization ~ interaction
  68. 68. visualization ~ interaction interaction ~ tool
  69. 69. visualization ~ interaction interaction ~ tool tool ~ cool
  70. 70. CodeCrawler (1998 - 2005)
  71. 71. X-Ray Eclipse Plug-in xray.inf.usi.ch
  72. 72. the class blueprint
  73. 73. Initialize Interface Internal Accessor Attribute
  74. 74. Initialize Interface Internal Accessor Attribute
  75. 75. Regular Initialize Interface Internal Accessor Attribute Overriding Extending Abstract Constant Delegating Setter Getter OOPSLA 2001, TSE 2005
  76. 76. Regular Overriding Extending Abstract Constant Delegating Setter Getter
  77. 77. Regular Overriding Extending Abstract Constant Delegating Setter Getter
  78. 78. Regular Overriding Extending Abstract Constant Delegating Setter Getter
  79. 79. the unbearable lightness of being visual
  80. 80. make weapons out of imperfections
  81. 81. Software is intangible, having no physical shape or size. Thomas Ball, Stephen Eick Software Visualization in the Large In Computer, vol. 29, no. 4, pp. 33-43, IEEE Computer Society Press, 1996
  82. 82. The programmer, like the poet, works only slightly removed from thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Frederick P. Brooks, Jr. The Mythical Man-Month Addison-Wesley, 1975
  83. 83. metaphors..
  84. 84. Habitability is the characteristic of source code that enables programmers [..] to understand its construction and intentions and to change it comfortably and confidently. Richard P. Gabriel Patterns of Software Oxford University Press, 1998
  85. 85. software cities
  86. 86. VISSOFT 2007, ICPC 2007, Softvis 2008, WCRE 2008
  87. 87. ArgoUML
  88. 88. Apache Cocoon version Aug 27 2009 lines 173,436 classes 4,008 packages 784
  89. 89. Frostwire version r 1,223 lines 275,910 classes 5,798 packages 391
  90. 90. Jitterbit version r 31,527 lines 263,645 classes 10,412 packages 945
  91. 91. OpenSwing version r 296 lines 112,495 classes 1,754 packages 268
  92. 92. HSQLDB version r 3,154 lines 158,208 classes 1,209 packages 103
  93. 93. ScumVM language C++ lines ~105,000 classes 1,331 packages 18
  94. 94. Jun language Smalltalk lines ~351,000 classes 2,236 packages 288
  95. 95. 10 systems language Java/Smalltalk/C++ lines ~1,272,000 classes 17,090 packages 1,777
  96. 96. Ver. 0.10.1 Ver. 0.12 Ver. 0.14 ModelFacade 9/10/2002 18/08/2003 5/12/2003 ModelFacade FacadeMDRImpl NSUMLModelFacade Facade Ver. 0.16 NSUMLModelFacade 19/07/2004 Facade Ver. 0.18.1 Ver. 0.20 FacadeMDRImpl 30/04/2005 9/02/2006 Facade Ver. 0.22 Ver. 0.23.4 Ver. 0.24 8/08/2006 10/12/2006 12/02/2007
  97. 97. org.argouml.language.cpp STDCTokenTypes FacadeMDRImpl NOA 152, NOM 0, AGE 4 Facade NOA 3, NOM 351, AGE 4 org.argouml.language.php NOA 1, NOM 339, AGE 5 org.argouml.language.csharp CPPParser NOA 85, NOM 204, AGE 4 org.argouml.language.java org.argouml.model JavaRecognizer NOA 24, NOM 91, AGE 9 JavaTokenTypes NOA 146, NOM 0, AGE 9 org.argouml.uml.reveng.java JavaTokenTypes NOA 175, NOM 0, AGE 9 JavaRecognizer NOA 79, NOM 176, AGE 9
  98. 98. JHotDraw
  99. 99. Oct 2000
  100. 100. Mar 2001
  101. 101. Sep 2001
  102. 102. Mar 2002
  103. 103. Aug 2002
  104. 104. Jan 2003
  105. 105. Jul 2003
  106. 106. Jan 2004
  107. 107. JDK 1.5 god classes
  108. 108. JMol Feature Envy
  109. 109. CodeCity codecity.inf.usi.ch
  110. 110. useful?
  111. 111. empirical visualization..
  112. 112. get ready to rumble..
  113. 113. 42 subjects
  114. 114. 8 7 6 5 4 3 2 Medium System (Findbugs, 93 kLOC) Large System (Azureus, 454 kLOC) Correctness CodeCity Eclipse
  115. 115. 55m 50m 45m 40m 35m 30m 25m 20m Medium System (Findbugs, 93 kLOC) Large System (Azureus, 454 kLOC) Time CodeCity Eclipse
  116. 116. significant!
  117. 117. significant..
  118. 118. significant my a..!
  119. 119. in the valley of Elah..
  120. 120. Courtesy of Adrian Kuhn & Oscar Nierstrasz (Univ. of Bern, Switzerland)
  121. 121. Courtesy of Claus Lewerentz & Frank Steinbrückner (TU Cottbus, Germany)
  122. 122. Eclipse
  123. 123. back to reality
  124. 124. Terminator III rise of the machines
  125. 125. edit run compile
  126. 126. review diff rearchitect edit Facebook version recommend tasks refactor design navigate reuse visualize RSS blog document run compile IRC e-mail Twitter test reengineer debug Skype
  127. 127. MSR
  128. 128. which way?
  129. 129. quality quality quality (repeat with me) quality quality quality ...
  130. 130. developers developers developers
  131. 131. software ecosystems
  132. 132. it’s time..
  133. 133. Terminator IV salvation
  134. 134. ..time to grow up
  135. 135. benchmark glasnost
  136. 136. ..time for new IDEas
  137. 137. software > text..
  138. 138. ..time to rethink software
  139. 139. academic research
  140. 140. industrial reality
  141. 141. ..time to change
  142. 142. visualization
  143. 143. For we are like tree trunks in the snow. In appearance they lie sleekly and a little push should be enough to set them rolling. No, it can't be done, for they are firmly wedded to the ground. But see, even that is only appearance. Franz Kafka, “Contemplation”, 1913
  144. 144. No bullet points were harmed during this presentation --- tln
  145. 145. The visual terminator Michele Lanza REVEAL @ Faculty of Informatics University of Lugano, Switzerland

×