Smalltalk Volume 1 Issue 9
Total Page:16
File Type:pdf, Size:1020Kb
The International Newsletter for Smalltalk Programmers July/August 1992 Volume I Number 9 malltalk programmers routinely read more code than they write. One of the IMPLEMENTING more difficult things in mastering Smalltalk is mastering the underlying class libraries. The act of programming consists of “hunting” for the appro- priate protocols in the appropriate classes. The hallmark of a good PEER CODE SmalltalkerElis the ability to efficiently navigate the increasingly vast landscape of the class libraries. It is very likely that a well-written class will be read many times over. Typicidly, these classes serve as role models for people who aspire to be good Smalltalkers. In the REVEVVSIN same vein, badly written classes that have to be used all the time serve as poor role mcxlels and tend to propagate poor programming practices. Code reviews are a critical software engineering activity. Research studies have shown SMALLTALK that code inspection alone can catch 75–%)% of the errors. Code reviews serve as a cri- tique of a software component by someone other than the author of the component. Typi- cally, reviewers are peers in the same organization who may or may not be on the deveh]P- ment team. Different organizations employ different practices for implementing code reviews. In traditional software organizations, rhe author prints out a listing of the modules m be reviewed and circulates it to the review team. The reviewers mark it up using guide- By S. Sridhar lines. They meet with the author in a face-to-face meeting a few days later where they pre- sent and discuss the review comments page by page, The author is then left with the Contents: daunting task of collating and integrating the comments of all the reviewers. h is quite possible that more than one person has caught the same programming infraction; that Features/Articles means multiple reviewers have spem time documenting the same problem and possibly I Implementing Peer Code suggesting the same fixes. This is an unnecessary duplication of effort, Reviews in Smalltalk This article describes a code review process that is specifically geared to reviewing small by S. Sridhar or large chunks of Smalltalk code. I’ll discuss extensive guidelines for effective code cri- 3 Quality assurance issues for tique and review, and describe a rigorous process that we have adopted in our organization Smalltalk-based applications to execute a comprehensive review, by Ed Klimas Columns THE PROCESS I 4 The13estof Chp.Lang.Srna/hallc My work group, like most Smalltalk work groups, uses a team software engineering tool to What’s wrong with 00P? manage the software development process. The tool we use is the ENVY/Developer envi- by A/an Knight ronment (hereinafter referred to as ENVY). This tool provides the facilities required for 18 Smalltalk Idioms Abstract the development and maintenance of large software systems. It provides sophisticated ver- control idioms sioning, configuration and release management capabilities as well as mechanisms for co- by Kent Oeck ordinating and integrating the software development activities of multiple developers. All 2 I Getting Real:Creating subclasses of the program development information including source code, compiled methods, mod- byjuanita Ew”ng ule dependency gtaphs, component ownership, versioning and configuration details are Departments stored in a shared repository. This repository is accessible to all members of the techniral 24 LabReportSmalltalk research at team. We use ENVY as a practical tool to aid in our code review process. It would be feasi- the University of Florida ble to adapt this approach to code reviews in the context of other team development envi- by@tin O. Graver ronments as well. 25 ProductAnnouncemenfi At the outset of a project, we typically partition the tasks among the developers along 26 Highlights functional lines. For example, one developer may be working on specific domain abstrac- cuminudm NC 8 EDITORS’ me SnlamamRepofi Editon CORNER J.hnPughand hd Whiu5 Cuban Lhlverdq& ThQOb@t W@. John Pugh Paul white SIGS Punuamoiw ~- euse is the name of the game. Headlines shout. Marketing literature trumpets. Salesmen Torn Anvood, ObIacrDaaiso ooze. Objects will solve your reuse problems. Not true, of course. Programmers solve Grady M, sadond reuse problems.” So says Kent Beck in the prelude to his Smalltalk Idioms column in this George Boawoti, oigkdk mad co%1~ Aga Comuidng issue. Kent knows, as do most experienced Smalltalk programmers, only too well that chuckDuff,Syn’Unw 1reuse does not come for free and is far from easy to attain. Developing truly reusable Adele Gold- l?idace Systetm components adds an extra dimension to the design and programming process, and addi- Tom bvq o@vwa, InC tional time and skill is required. BarcmndMeyer, ISE Mallir %gt+~ W@aod _ What if we had access to a quality set of reusable components for objects for some ap- Shesl PrW+, Cc~ne SOftmra plication domain? Would it now be easy to “assemble” new applications from these com- P. Mkhael Sesshols, Vamam ponents? Unless a great deal of thought has gone into the design and implementation of El@me-avup, AThT Ball @ the components (probably not), we will still need a Smalltalk guru to wire the pieces to- Dave Thamas, x Tech- karnadotul gether. Here is a sample list of questions for which we would need affirmative answers. ~ SMAUTALK ~ Do we have the right components? Do the components have the required functionality? Editorial Board Have they been fully tested? Do we have prefabricated components that model common J. Andarwn, _ processes within the domain, or do we simply have a collection of low-level building Adala GoHbew hrwaea sprain, blocks? Have the components been designed with standard interfaces? Have they been need Phlni-pa,KnOwrer&spwntrCorp. designed to work together? Mike Taylor, OI@I hW~Talw+ykmmdand Clearly, a number of things have to be in place before we can use a software-by- assembly approach to application development. However, there are low of analogous Columnists real-world examples where the benefits of this approach can be clearly seen such as the JuanItsEwlrig,OIglnlk Greg tlendiey, KnOwi+ SystUmcarp assembly of personal computers or the manufacture of automobiles. EdKHnlas,LlnaaEr@mari~Inc It’s this software-by-assembly approach to application development that Parts (formerly SmarmeSkubHc&oqecr Tachmlq lnd. LAFKit-Look and Feel Kit), a product currently under development at Digitalk, is at- Eric Smii, hwiedga SFWJUcorp. tempting to address. In his keynote address at Object Expo in New York City, Digimlk CEO RebeccavvHa-ElrOck Olghanl Jim Anderson teased the audience with a preview of the notions of software construction SiGS Publhtions Group, lraG from parts. Watch for more information on Parts in future issues of The Sma!hdk Report, RichardP. Friedman This issue features two significant contributions from recognized members of the Fwndar& GmuPFWlsher Smalltalk community that deal with the delivery of quality software. First, S. Sridhar re- A#Productlon turns to The Snudhzd.kRe@rt with a description of a mechanism for carrying out peer KrisdnaJwkhadar, MamgiIIsE&or code reviews on Smallralk projects. As is the case with all software development, PilgrimRd. Lzd. CreatheDIracdon Karen Te+rgiah,WOdwdOnE&Or whether done using Smalltalk or any other language and environment, code reviews are JennifarEngbndw, ~. -hamr a vital to ensuring the quality of deliverables. As Sridhar points out, “code reviews Ciawhtion should be viewed as a rigorous software enginering activity.” His discussion focuses on Km Mercadq ~- two aspects of code reviews, namely the process by which they should be carried out and oiana Bs&vay,ctwhdmlaudn8ssr-lma@r a set of guidelines to be followed by reviewers, Second, Ed Klimas’ article discusses many VW Mo* CbUdmwlAsskRna JohnSehreibaf, ClrcuhrhnAsbmnt issues that make testing Smalltalk systems unique and puts forward a number of guide- M~n~AdvewWng lines and strategies for planning for and documenting the development of test suites. Diana MOrMde, Aawm EuaCLKw Also in this issue, Juanita Ewing addresses many of the problems involved in carrying HollyMeii, kam Ex6adva out proper subclassing within Smalltalk applications. Always a confusing issue for people Gerakheschafm, kdrraaxszks new to Smalltalk, she describes the differing goals subclassing is used to satisfy and pro- SamhHamsron,Pnsnmbm-r Carwl Pmhler.RwmdarBGr@eti poses hueristics for making decisions concerning subclassing decisions. Alan Knight Adminlatmtion brings us up to date on a thread of discussion on USENET dealing with the hype sur- David Chterp4, timw rounding object technology. And finally, Justin Graver describes the activities of the cbh’eJOha@Ul,caOi%maf%rU& Smalltalk research group at the University of Florida. Cindy ROppeJ.Cahwr.a Cadlnamr Amysv PlqSSlal’4aqar JwllfarFkher,PUblkMatlOnS Helen NevriIng,wkninkmmwhkrmt Narghelim n Melnck GananlMwm@r ❑ SIGS The ShndhslkRqnm (15SN* 1056-7976) is published9 rimes. rem, cvmymonth cxcepIfor the Mar/Apr, J.ly/Aus, and NmdDec cmnbinedissues. PUBLICATICSNS Publishmiby SIGS PublicmionsOIUIp, 588 BrmchvHy,New YndI, NY IKI12 (212)274-0640 Q @right 1992by SIGS Publications,II-C All righs rewved. &Iim of this materialbyelemrcmictrmmnisicm,Xerox or my othermethcdwill k tremrd us. wdlhl .ml.riom 04rhe LX Copyrght PJblmnm Orfuwmd Ofotjtd-orkmd FnQnm LEWand isSEdypmhibirml.M.rcrid IMY k reprducd with expres Ferrnissionhorn the phlishers. M.iled FirsI Clam.%b=riwion rumsI ye.., (!J mhE~M~Htdham~ iwm) .dmneSiq$65, Fmcign md Gnmch, $$+3,%@ cqy price, $8.00. POSTMASTER: Sad w2dre. +w.ges .nd ,.b=riptio. mdem t,. THE redmda#,lb?c++~rhcsnaia7ksqk@ SMAUTALKREMRT, Subsmik Srrvim, !&p[.SML, PO, Sm. K@ Lknvillc, NJ 07S34. Submit mticl= to the Editorsa! 91 SecondAvw..,, 7’balnmmMWd00PWeUcq, and17m X@wnd Otmwa,Onti KIS 1H4,Ciinak THE SMALLTALK REPORT QUALITY Code development phase _ Unit testing ASSURANCE ● Integration testing . Validation testing The benefits of pre-implementation code reviews and in- ISSUES FOR spections should not be underestimated.