<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6475476178388133651</id><updated>2012-01-22T13:56:35.765-08:00</updated><title type='text'>Engineering Log -- ICS 613 -- Brian Jaress</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-619786914629798190</id><published>2007-12-09T16:55:00.000-08:00</published><updated>2007-12-09T16:51:06.734-08:00</updated><title type='text'>Prime Directives Redux</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/33-primedirectivesredux"&gt;PrimeDirectivesRedux&lt;/a&gt;, where we reexamine    some of our past assignments in terms of the    &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/01.Intro.pdf"&gt;Three Prime Directives&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;   &lt;h2&gt;The Three Prime Directives&lt;/h2&gt; &lt;ol&gt;  &lt;li&gt;      The system accomplishes a useful task.  &lt;/li&gt;   &lt;li&gt;      An external user can successfully install and use the system.  &lt;/li&gt;   &lt;li&gt;      An external developer can successfully understand and enhance the system.  &lt;/li&gt; &lt;/ol&gt; &lt;p&gt;One thing that's not included in the prime directives, but which several    of the tools help support, is the ability of an external developer to    join the project and become an internal developer. &lt;/p&gt;  &lt;h3&gt;Interactive Development Environments (Eclipse, VisualStudio, etc.)&lt;/h3&gt; &lt;p&gt;An IDE is mostly focused on helping you create any system at all.  Since    the system needs to exist before it can satisfy any of the directives,    it helps in that sense. &lt;/p&gt; &lt;p&gt;More directly, it can help satisfy Prime Directive Three by encouraging    consistent structure and idioms.  IDEs automate a lot of common tasks,    and the results are usually very consistent, making the code easier for    an outside developer to understand and extend. &lt;/p&gt;  &lt;h3&gt;Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)&lt;/h3&gt; &lt;p&gt;Coding standards and compliance tools also provide consistency, though    of a different type.  Again, consistent style helps external developers    understand the code. &lt;/p&gt; &lt;p&gt;There's no direct effect on the first two Prime Directives, because the    coding standards aren't going to directly make the system easy to    install or change what it does. &lt;/p&gt;  &lt;h3&gt;Build Systems (Ant, Make, etc.)&lt;/h3&gt; &lt;p&gt;A build system can output a single file for external users to download    and install from, so that's quite helpful for Prime Directive Two. &lt;/p&gt; &lt;p&gt;By automating some important development tasks (building, of course, but    also testing) a build system makes the development environment easier to    learn and use, which helps with Prime Directive Three. &lt;/p&gt; &lt;p&gt;A build system also makes it easier to run tests on the system.  That's    helpful for Prime Directive One because it helps check that the task is    being successfully accomplished. &lt;/p&gt;  &lt;h3&gt;Automated Quality Assurance Tools (PMD and FindBugs, etc.)&lt;/h3&gt; &lt;p&gt;These tools help ensure that the system successfully accomplishes    whatever task it is designed to accomplish, which can help with Prime    Directive One. &lt;/p&gt; &lt;p&gt;They also help with Prime Directive Three by making it easier for    external developers to successfully integrate their changes into the    system.  A system that passes quality assurance tests is also usually    easier to understand. &lt;/p&gt; &lt;p&gt;There's no direct effect on installation, but preventing bugs with    quality assurance can make the system easier to use. &lt;/p&gt;  &lt;h3&gt;Black and White Box Testing&lt;/h3&gt; &lt;p&gt;Testing supports Prime Directive One by helping ensure that the system    successfully accomplishes whatever task it's designed to accomplish. &lt;/p&gt; &lt;p&gt;It also helps with Prime Directive Three by giving external developers a    &amp;quot;safety net&amp;quot; when making changes.  They can see right away whether their    change broke something. &lt;/p&gt; &lt;p&gt;Again, there's an effect on Prime Directive Two, in the sense that a    system with fewer bugs tends to be easier to use. &lt;/p&gt;  &lt;h3&gt;Automated Testing Tools (JUnit, HttpUnit, etc.)&lt;/h3&gt; &lt;p&gt;Automated testing tools make black and white box testing easier, so all    the same effects apply.  The tools are especially helpful for Prime    Directive Three because they simplify an development task (running the    tests) that could otherwise be much harder to learn. &lt;/p&gt;  &lt;h3&gt;Configuration Management (CVS, SVN, etc.)&lt;/h3&gt; &lt;p&gt;Configuration management is focused on how the internal developers store    and track the code, so here's no direct effect on the Prime Directives,    except maybe Prime Directive Three if you make your commit logs    available to external developers. &lt;/p&gt; &lt;p&gt;There is a strong, indirect effect on all three Prime Directives because    configuration management makes it much easier for internal developers to    work together and get things done. &lt;/p&gt;  &lt;h3&gt;Issue Driven Project Management&lt;/h3&gt; &lt;p&gt;Like configuration management, issue driven project management is mostly    about how internal developers run the project.  If the issues are made    public, they can sometimes be helpful to external developers and users,    but mainly it helps the internal developers work more effectively, which    might mean they do a better job of satisfying all three Prime    Directives. &lt;/p&gt;  &lt;h3&gt;Use Cases&lt;/h3&gt; &lt;p&gt;Use cases help define the tasks that the system is supposed to    accomplish, which helps with Prime Directive One. &lt;/p&gt; &lt;p&gt;They can also make the system easier to use by getting the developers to    think about what the experience of using the system is supposed to be    like.  Things like the number of mouse clicks needed for a common task    can show up in the use cases. &lt;/p&gt; &lt;p&gt;It can also be helpful for an external developer to read the use cases.    Understanding what a system is supposed to do is an important part of    understanding it in general. &lt;/p&gt;  &lt;h3&gt;Software Review&lt;/h3&gt; &lt;p&gt;Software review is particularly important because the Three Prime    Directives are defined in terms of other people.  In a software review,    some external person can check that the system is useful, installable,    usable, understandable, and enhanceable. &lt;/p&gt; &lt;p&gt;When they find places that it isn't, the internal developers can work on    fixing the system to better satisfy the Prime Directives. &lt;/p&gt;  &lt;h3&gt;Agile Methods (XP, Scrum, etc.)&lt;/h3&gt; &lt;p&gt;Agile methods emphasize communication with users, which helps with Prime    Directives One and Two.  Users can tell the internal developers what's    needed to satisfy the Prime Directives, and the developers can make    adjustments. &lt;/p&gt; &lt;p&gt;The effect on Prime Directive Three probably depends a lot on which    particular method you are using and the particular developer.  The agile    method itself won't include external developers, but it can lead to    things that are helpful to them, like good unit tests or simple    implementations. &lt;/p&gt;  &lt;h3&gt;Open Source Licenses (GPL, CPL, etc.)&lt;/h3&gt; &lt;p&gt;An open license has no real direct effect on Prime Directives One and Two    because it doesn't directly affect the behavior of the program. &lt;/p&gt; &lt;p&gt;It will make a big difference for Prime Directive Three.  If an external    developer is not allowed to read the source code and modify it, then    Prime Directive Three is clearly not being met. &lt;/p&gt;  &lt;h3&gt;Online Hosting Services (Google Project Hosting, SourceForge, etc.)&lt;/h3&gt; &lt;p&gt;An online hosting service helps with Prime Directives Two and Three by    giving external users and developers a place to get the system and    information about it. &lt;/p&gt; &lt;p&gt;It also helps in a general way by making it easier for internal    developers to get things done, which hopefully brings them closer to    satisfying all three Prime Directives. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-619786914629798190?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/619786914629798190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=619786914629798190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/619786914629798190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/619786914629798190'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/12/prime-directives-redux.html' title='Prime Directives Redux'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3381830967771525873</id><published>2007-11-16T00:45:00.000-08:00</published><updated>2007-11-16T00:41:20.693-08:00</updated><title type='text'>MyISERN 1.3 review</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/29-myisern-1-3-review"&gt;MyIsern-1.3-review&lt;/a&gt;.  I'm reviewing the    &lt;a href="http://code.google.com/p/myisern-1-orange/"&gt;team orange&lt;/a&gt; code, which is &lt;a href="http://myisern-1-orange.googlecode.com/files/myisern-orange-1.3-1.0.1114.zip"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;   &lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt;The package I downloaded was &lt;a href="http://myisern-1-orange.googlecode.com/files/myisern-orange-1.3-1.0.1114.zip"&gt;myisern-orange-1.3-1.0.1114.zip&lt;/a&gt;.    There was no installation guide, but it installed fine using the    installation process we're all using.  I had to look up a few things    that would have been in the installation guide, but the installation    worked. &lt;/p&gt; &lt;p&gt;JUnit, Checkstyle, PMD, and FindBugs tasks all ran cleanly. &lt;/p&gt;  &lt;h2&gt;Code Format and Conventions&lt;/h2&gt; &lt;p&gt;Nothing really leapt out at me as far as coding conventions, except that    some of the comments are out of date. &lt;/p&gt; &lt;p&gt;I would recommend that they split things up into multiple ActionBeans    rather than just expanding the ActionBean from StackStripes to do    everything, but that's not really a coding convention. &lt;/p&gt;  &lt;h2&gt;Test Cases&lt;/h2&gt; &lt;p&gt;Emma Coverage summary    &lt;table&gt;    &lt;tr&gt;&lt;td&gt;class:&lt;/td&gt;&lt;td&gt;14%&lt;/td&gt;&lt;td&gt;(3/22)&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;method:&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;(3/215)&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;block:&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;(16/3032)&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;line:&lt;/td&gt;&lt;td&gt;1%&lt;/td&gt;&lt;td&gt;(7/773)&lt;/td&gt;&lt;/tr&gt;    &lt;/table&gt; &lt;/p&gt;  &lt;h3&gt;White Box &amp;amp; Black Box&lt;/h3&gt; &lt;p&gt;There are two tests: a test that the welcome page can be retrieved and a    test that is turned off and prints out the number of records loaded from    XML. &lt;/p&gt; &lt;p&gt;From both a white box and a black box perspective, this is rather    limited testing. &lt;/p&gt;  &lt;h3&gt;Breaking&lt;/h3&gt; &lt;ul&gt;  &lt;li&gt;      Trying to list or edit anything causes a null pointer exception  &lt;/li&gt;   &lt;li&gt;      Trying to add a record causes a file not found exception.  I think      this one is caused by looking for the files in the wrong place.  The      directory is supposed to named &lt;code&gt;.myisern&lt;/code&gt;, not &lt;code&gt;myisern&lt;/code&gt;. (It's supposed to have a period at the beginning.)  &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;User Interface&lt;/h2&gt; &lt;p&gt;I was able to use the interface. &lt;/p&gt; &lt;p&gt;It uses very little screen space and works fine with only a quarter of    my (small) screen. &lt;/p&gt; &lt;p&gt;The one thing I would improve is the labeling of the links on the main    page.  The links should probably contain the name of what they do    (&amp;quot;edit&amp;quot; or &amp;quot;add&amp;quot;), so you don't have to look up at the table headers to    figure it out.  It seems like a small thing, but it threw me off at    first. &lt;/p&gt;  &lt;h2&gt;Summary and Lessons Learned&lt;/h2&gt; &lt;p&gt;This version of MyISERN doesn't do any of the things it's supposed to,    but it's a pleasant improvement over the last piece of software I    reviewed. &lt;/p&gt; &lt;p&gt;It compiles, installs, and runs.  It doesn't run correctly, but that    didn't get in the way of writing a review. &lt;/p&gt; &lt;p&gt;It will, however, need to run correctly by Monday. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3381830967771525873?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3381830967771525873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3381830967771525873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3381830967771525873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3381830967771525873'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/11/myisern-13-review.html' title='MyISERN 1.3 review'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-5997365740292463619</id><published>2007-11-14T04:17:00.000-08:00</published><updated>2007-11-14T04:13:56.346-08:00</updated><title type='text'>MyIsern 1-3</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/27-myisern-1-3"&gt;MyISERN-1.3&lt;/a&gt;. &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;      &lt;a href="http://myisern-1-brown.googlecode.com/files/myisern-brown-1.3.1114.zip"&gt;project distribution&lt;/a&gt;.  &lt;/li&gt;   &lt;li&gt;      &lt;a href="http://code.google.com/p/myisern-1-brown/"&gt;project page&lt;/a&gt;  &lt;/li&gt;   &lt;li&gt;      &lt;a href="http://code.google.com/p/myisern-1-brown/wiki/InstallationGuide"&gt;InstallationGuide&lt;/a&gt;  &lt;/li&gt; &lt;/ul&gt; &lt;hr /&gt;  &lt;p&gt;This assignment doesn't actually say that we're supposed to do a log    entry, but I thought I'd give the reviewers an easy place to download it    from. &lt;/p&gt; &lt;p&gt;Unfortunately, not all tasks were fully completed. &lt;/p&gt;  &lt;h2&gt;The New Group&lt;/h2&gt; &lt;p&gt;My new partner is &lt;a href="http://cox-engineering-log.blogspot.com/"&gt;Randy Cox&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;I was the member who had been working on the same codebase from before,    and I had been working on the model (which was the part we were keeping    as we switched to a Stripes webapp) so I again worked on the model in    this increment and Randy handled the view and controller. &lt;/p&gt;  &lt;h2&gt;The Work&lt;/h2&gt; &lt;p&gt;The model changes were more extensive than I had originally hoped,    mostly because of the concurrency issues.  In the single user version,    the model was just returning a reference to an object that it continued    to hold onto and give out to.  Even if the methods returning the    references were synchronized, the lock would be released by the time the    caller started actually using the object, which could then change out    from under it. &lt;/p&gt; &lt;p&gt;I suppose I made that part of it harder than it should have been by    trying to have a solution that I liked rather than one that just did the    job.  I ended up with something that worked and only sort of pleased me. &lt;/p&gt; &lt;p&gt;I also did the installation guide and the&amp;quot;sanity check&amp;quot; report, which    technically means that I did a little of the view and controller, but    not really.  That part was just a thin wrapper around a report generated    in the model.  Randy did all the username/password, ActionBeans, etc. &lt;/p&gt;  &lt;h2&gt;The Result&lt;/h2&gt; &lt;p&gt;There are still two unfinished parts of the program: &lt;/p&gt; &lt;ol&gt;  &lt;li&gt;      Test coverage is poor  &lt;/li&gt;   &lt;li&gt;      There's some kind of problem with displaying list values  &lt;/li&gt; &lt;/ol&gt; &lt;p&gt;The poor test coverage is largely from try-catch blocks that never catch    and a large method we're not calling because we're not sure if we want    to keep it or not. &lt;/p&gt; &lt;p&gt;The list problem has something to do with list data (years,    affiliatedResearchers, and other things where you can have more than    one) not showing up on the page. &lt;/p&gt; &lt;p&gt;Randy mentioned it while I was finishing up the &amp;quot;sanity check&amp;quot; report,    and I ran a few tests.  The data was getting from the model into the    ActionBean but not from there to the page.  At the time, the problem    looked (to me) like the JSP code wasn't making any calls to retrieve the    data.  I'm not sure where he went from there, but I think it was left    unresolved.  It's definitely something we should talk about in person    and try to sort out by Monday. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-5997365740292463619?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/5997365740292463619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=5997365740292463619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5997365740292463619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5997365740292463619'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/11/myisern-1-3.html' title='MyIsern 1-3'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-5352696612455771095</id><published>2007-11-05T02:56:00.000-08:00</published><updated>2008-12-11T23:43:48.466-08:00</updated><title type='text'>Web App Questions</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;p&gt;Explain in your own words the meaning of the web "request-response cycle". &lt;/p&gt; &lt;p&gt;The client sends a request to the server, the server processes the request,    the server sends a response, the client figures out what it wants next and    sends another request, and the cycle repeats. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;Explain how servlets facilitate processing of the request-response cycle. &lt;/p&gt; &lt;p&gt;Servlets to the server-side processing of the cycle.  There's a    framework that handles receiving the request and sending the    response, so you can complete the server side by creating servlets. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;How do you login to the Tomcat Manager? &lt;/p&gt; &lt;p&gt;Go to the top level page on the server and click the link. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What is the Tomcat Manager used for in the StackStripes application? &lt;/p&gt; &lt;p&gt;It's not really used inside the application, but the build system    uses it to deploy and undeploy the application (and check that it    has access to deploy and undeploy). &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What is the directory and file layout of an installed web application like    StackStripes?  (This is NOT the same as the directory and file    layout of the StackStripes distribution!) &lt;/p&gt; &lt;p&gt;At the top level, there are JSP pages and the &lt;code&gt;WEB-INF&lt;/code&gt; directory.    &lt;code&gt;WEB-INF&lt;/code&gt; contains &lt;code&gt;web.xml&lt;/code&gt; and the directories &lt;code&gt;classes&lt;/code&gt; and    &lt;code&gt;lib&lt;/code&gt;. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;How do you build a war directory structure in Ant? Where is this    accomplished in the StackStripes application? &lt;/p&gt; &lt;p&gt;The directory structure is built by creating a WEB-INF sub-directory    and putting &lt;code&gt;web.xml&lt;/code&gt;, &lt;code&gt;classes&lt;/code&gt;, and &lt;code&gt;lib&lt;/code&gt;.  In StackStripes,    there's a &lt;code&gt;web&lt;/code&gt; directory that already contains the complete    structure and the build system copies it to create the directory    used to make the war file. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;How do you install a war directory in a running Tomcat server? What    information does the Ant task need to accomplish this? &lt;/p&gt; &lt;p&gt;GET &lt;code&gt;http://server:port/manager/deploy?path=servpath&amp;amp;war=fullpath&lt;/code&gt;    where &lt;code&gt;servpath&lt;/code&gt; is the path of the installed application within the    server (e.g. &lt;code&gt;/stackstripes&lt;/code&gt;) and &lt;code&gt;fullpath&lt;/code&gt; is the full path of the    war directory to install. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What is the "Model2" architecture?  What are its advantages? &lt;/p&gt; &lt;p&gt;The design is split into a model, view, and controller.  The view is    what the user directly interacts with, the model stores the data,    and the controller responds to what what the user does to the view    by doing things to the model and view. &lt;/p&gt; &lt;p&gt;The advantages are that it's fairly easy to understand and it    separates three types of things that are different, allowing you to    do things with just one of them at a time.  For example, you can    create the view using JSTL, and the controller by writing Java. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What are JSP pages?  How are they related to servlets? &lt;/p&gt; &lt;p&gt;JSP pages are web page servlets (or parts of servlets) written in a    way that directly includes the static parts of the page. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;Why is there a delay when retrieving a JSP page for the first time?  Where    is the Java code for that page stored? &lt;/p&gt; &lt;p&gt;It has to be converted to Java and compiled.  The Java code is    stored under a long, complicated path inside the directory where    Tomcat is installed. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What are JSTL tags?  Why are they useful?  What is an example JSTL tag    from the StackStripes system? &lt;/p&gt; &lt;p&gt;JSTL is an extension to JSP that adds a lot of tags to take the    place of inline Java, making it more of a templating system.  For    example, the forEach tag is used to iterate through the stack. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What are Stripes tags? Why are they useful?  What is an example Stripes tag    from the StackStripes system? &lt;/p&gt; &lt;p&gt;Additional tags defined by Stripes.  They're useful because they    hook in to Stripes.  For example the stripes form tag sets up a form    that is also connected to an "action bean" by Stripes. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What is HttpUnit?  How is it different from JUnit? Why is it useful?  What    is an example use of HttpUnit from the StackStripes system? &lt;/p&gt; &lt;p&gt;HttpUnit is a library for doing HTTP requests and responses.  JUnit    is a unit testing framework.  HttpUnit is useful because it lets you    do HTTP requests and responses from inside the JUnit tests, so that    that the tests pass or fail based on the HTTP results.  For example,    some of our JUnit tests use HttpUnit to retrieve pages and check    the contents of the table which displays the stack. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What needed to be changed in order to implement the Double It button? What    didn't need to be changed? What did you learn about the MVC design pattern    from this exercise? &lt;/p&gt; &lt;p&gt;Added &lt;code&gt;doubleIt&lt;/code&gt; to the model, &lt;code&gt;doubleIt&lt;/code&gt; to the controller (action    bean), and added &lt;code&gt;DoubleItForm&lt;/code&gt; to the view (JSP).  If your    framework isn't very smart, you can find yourself doing everything    three times. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What are the equivalence classes that need to be tested for the Double It    button? &lt;/p&gt; &lt;p&gt;Empty stack and non-empty stack.  You might also divide non-empty    stack into one element and many elements. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;Provide two screen images of your new StackStripes application with    the Double It button, one showing the page before and one showing    the page after hitting the "Double It" button. &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_QXFBQv9pyJU/Ry74lipiRgI/AAAAAAAAAAc/tzam7GWItfs/s1600-h/before.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_QXFBQv9pyJU/Ry74lipiRgI/AAAAAAAAAAc/tzam7GWItfs/s400/before.png" alt="" id="BLOGGER_PHOTO_ID_5129310349461440002" border="0" /&gt;&lt;/a&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_QXFBQv9pyJU/Ry74mCpiRhI/AAAAAAAAAAk/qfWNXWiF6KU/s1600-h/after.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_QXFBQv9pyJU/Ry74mCpiRhI/AAAAAAAAAAk/qfWNXWiF6KU/s400/after.png" alt="" id="BLOGGER_PHOTO_ID_5129310358051374610" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;What is the singleton design pattern?  What is an example of its use in    StackStripes?  Why is it needed? &lt;/p&gt; &lt;p&gt;Only one instance of a class can ever be created.  The StackStripes    model is a singleton because we want all users to share one stack. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;Some of the StackStripes tests exercise code on the "server side", while    others exercise code on the "client" side. Which test classes    exercise code on the "server", and which exercise code on the    "client"? How does Emma deal with this to create appropriate    coverage data? &lt;/p&gt; &lt;p&gt;&lt;code&gt;TestStackActionBean&lt;/code&gt; tests code while it is deployed, and    &lt;code&gt;TestStackModel&lt;/code&gt; tests code while it is not deployed.  Emma records    the results in two files and then combines them. &lt;/p&gt;   &lt;/li&gt;&lt;li&gt;&lt;p&gt;Running 'ant -f junit.build.xml' results in the following target    invocations: tomcat.check, tomcat.undeploy, compile, war,    tomcat.deploy, junit.tool, junit.report, junit.  Explain what each    of these targets do. &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      &lt;code&gt;tomcat.check&lt;/code&gt; checks that the server is up and we can log in  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;tomcat.undeploy&lt;/code&gt; undeploys the application  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;compile&lt;/code&gt; runs &lt;code&gt;javac&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;war&lt;/code&gt; creates a war file  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;tomcat.deploy&lt;/code&gt; deploys the application to the server  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;junit.tool&lt;/code&gt; runs the JUnit tests  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;junit.report&lt;/code&gt; generates a report on the JUnit tests  &lt;/li&gt;&lt;li&gt;      &lt;code&gt;junit&lt;/code&gt; depends on &lt;code&gt;junit.tool&lt;/code&gt; and &lt;code&gt;junit.report&lt;/code&gt; (rather pointless if you ask me -- &lt;code&gt;junit.report&lt;/code&gt; could, and probably should, depend on &lt;code&gt;junit.tool&lt;/code&gt; and be the default)  &lt;/li&gt;&lt;/ul&gt;   &lt;/li&gt;&lt;/ol&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-5352696612455771095?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/5352696612455771095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=5352696612455771095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5352696612455771095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5352696612455771095'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/11/web-app-questions.html' title='Web App Questions'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_QXFBQv9pyJU/Ry74lipiRgI/AAAAAAAAAAc/tzam7GWItfs/s72-c/before.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3557569750762649578</id><published>2007-11-04T22:03:00.000-08:00</published><updated>2007-11-04T22:04:59.335-08:00</updated><title type='text'>Stack Stripes Extension</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/26-stackstripesextension"&gt;StackStripesExtension&lt;/a&gt;.  My extended    stack is &lt;a href="http://www2.hawaii.edu/%7Ejaress/613/ass26/stackstripes-1.0.1104.zip"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt;All tasks completed. &lt;/p&gt;  &lt;h2&gt;Difficulties&lt;/h2&gt; &lt;p&gt;Nothing was particularly difficult.  I ran into the problem that John    Hauge &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/msg/ca942489e39b3fca"&gt;brought up&lt;/a&gt;, but I had already seen Shaoxuan Zhang's    &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/msg/102dc5b8c8a8b1a8"&gt;reply&lt;/a&gt;, so I just started tomcat from the project directory. &lt;/p&gt; &lt;p&gt;I also had to add &lt;code&gt;$CATALINA_HOME/bin&lt;/code&gt; to my &lt;code&gt;PATH&lt;/code&gt; so that    &lt;code&gt;emma.build.xml&lt;/code&gt; could find it. &lt;/p&gt;  &lt;h2&gt;Coverage&lt;/h2&gt; &lt;pre&gt;&lt;code&gt;Emma Coverage summary
class:   100% (2/2)
method:  100% (18/18)
block:   97%  (142/146)
line:    94%  (39.6/42)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When I did Task 4, adding an HTTPUnit test, I noticed that the &lt;code&gt;isEmpty&lt;/code&gt;    model method wasn't being called anywhere in the controller.  That    pretty much ruled out 100% method coverage via HTTPUnit, so I settled    for ninety-something. &lt;/p&gt; &lt;p&gt;In Task 5, I added tests of &lt;code&gt;isEmpty&lt;/code&gt; to the non-HTTPUnit tests at the    same time that I added tests for my new &lt;code&gt;doubleIt&lt;/code&gt; method, so method    coverage did end up at 100%. &lt;/p&gt;  &lt;h2&gt;Lessons Learned&lt;/h2&gt; &lt;p&gt;Being told to shoot for 100% method coverage kills any desire to do    black box testing.  The tests we did for &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/21-myisern-1-2"&gt;MyISERN-1.2&lt;/a&gt; were much    better, even though Emma reported less coverage. &lt;/p&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3557569750762649578?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3557569750762649578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3557569750762649578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3557569750762649578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3557569750762649578'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/11/stack-stripes-extension_04.html' title='Stack Stripes Extension'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3193812711179909442</id><published>2007-10-22T07:18:00.000-07:00</published><updated>2007-10-22T07:15:29.084-07:00</updated><title type='text'>MyIsern-1.2</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/21-myisern-1-2"&gt;MyISERN-1.2&lt;/a&gt;. &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;      &lt;a href="http://myisern-1-brown.googlecode.com/files/myisern-1.2.1022.zip"&gt;project distribution&lt;/a&gt;.  &lt;/li&gt;   &lt;li&gt;      &lt;a href="http://code.google.com/p/myisern-1-brown/"&gt;project page&lt;/a&gt;  &lt;/li&gt; &lt;/ul&gt; &lt;hr /&gt;  &lt;p&gt;All tasks completed. &lt;/p&gt;  &lt;h2&gt;Group Process&lt;/h2&gt; &lt;p&gt;My partner &lt;a href="http://kenglishhi.blogspot.com/2007/10/21myisern-12.html"&gt;Kevin English&lt;/a&gt; really got into the text interface on this    assignment.  We had already divided it up on a previous assignment so    that he was doing the interface, but on this one he really seemed to    have a vision of how it should work.  He volunteered to do all the data    inputting, so he was writing code for himself to use. &lt;/p&gt; &lt;p&gt;I tried it out a little, and it is a nice interface.  It's actually    menu-driven rather than command-driven and pretty intuitive&lt;sup id="fnr1-839577574"&gt;&lt;a name="fnr1-839577574" href="#fn1-839577574"&gt;1&lt;/a&gt;&lt;/sup&gt;. &lt;/p&gt; &lt;p&gt;As far as working together, we mostly did what we've done on past    assignments: meet as often as we can, kick some ideas around, and then    decide what we'll do until the next meeting.  Since I'm writing the    model, a lot of the group interaction has been about what methods my    partner needed me to implement. &lt;/p&gt;  &lt;h2&gt;Difficulties&lt;/h2&gt; &lt;p&gt;The main difficulty we had was with JAXB and Java.  Every time we've    used it, we've thought about wrapping JAXB somehow, but we never did.    The problem is that we couldn't find a way of wrapping it that would    solve the problems we were having without being more work than the    problems themselves. &lt;/p&gt; &lt;p&gt;For me, working on the model, the problem manifests as doing things    three times.  For Kevin, it was probably different. &lt;/p&gt; &lt;p&gt;When we first started using JAXB, I thought maybe we could just wrap or    convert the three JAXB objects into things that formed an inheritance    tree.  But there was really only one method they had in common.  The    problem was that they had many repeated methods which were analogous but    not identical in type or number. &lt;/p&gt; &lt;p&gt;Kevin has his own take on the problem, but I look at it this way: &lt;/p&gt; &lt;p&gt;Java doesn't let you merge, or even blur the line between, object    structure and metadata.  Objects can't easily inspect each other's    structure and interact based on what they discover.  It's also very    rigid about types.  JAXB, on the other hand, converts XML entities with    children to classes with fields.  The sum is that you lose the ability    to treat the structure of the data as data that can direct the code.    Instead, it's an invisible (to the objects) structure that you must    hard-code the objects to synchronize with. &lt;/p&gt; &lt;p&gt;To really get around that, as far as I can see, the wrapper would have    to be a sort of reverse-JAXB that turns the JAXB objects back into some    type of self-describing data structure like a DOM tree or nested maps of    strings. &lt;/p&gt; &lt;p&gt;That never seemed worth the effort, so we would always sort of daydream    about having a solution and then keep going without it&lt;sup id="fnr2-839577574"&gt;&lt;a name="fnr2-839577574" href="#fn2-839577574"&gt;2&lt;/a&gt;&lt;/sup&gt;. &lt;/p&gt; &lt;p&gt;I'm interested to see what other groups have to say about JAXB.  I keep    going back and forth between thinking there must be wonderful way around    it that I just haven't figured out yet and thinking that Java and JAXB    are just hopeless. &lt;/p&gt; &lt;p&gt;Another minor thing is that our code coverage suddenly dropped right    near the end.  From the reports, it looks like everything has pretty    good coverage except for some enums and our old command-line interface,    which is coming in at under 60%.  I knew that my partner was still using    parts of the command-line interface to work with the new interface,    so I figured he had merged or moved the test code in some way that    caused it to only test the things we're actually still using. &lt;/p&gt; &lt;p&gt;In any case, the sudden drop didn't seem to be caused by a whole bunch    of new, untested code. I also didn't notice it till my parter was    asleep, so I didn't hold up the release for it. &lt;/p&gt;  &lt;h2&gt;Next Time&lt;/h2&gt; &lt;p&gt;Next time, we might want to do a little more of the &amp;quot;skeleton&amp;quot; of the    project earlier: things like issues, unit test, and wiki pages.  We sort    of lost track of where we were and what was left to do, and I think that    would've helped. &lt;/p&gt;  &lt;div class="footnote"&gt;&lt;hr/&gt;&lt;ol&gt;  &lt;li id="fn1-839577574"&gt;&lt;a name="fn1-839577574"&gt; &lt;/a&gt;&lt;p&gt;It has a little bit of old code that I wrote in the first    iteration for displaying tables.  Right at the last minute, that old    code started choking on nulls.&lt;a href="#fnr1-839577574" class="footnoteBackLink" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt; &lt;/p&gt;   &lt;/li&gt;   &lt;li id="fn2-839577574"&gt;&lt;a name="fn2-839577574"&gt; &lt;/a&gt;&lt;p&gt;We didn't realize it until the very tail end of this assignment,    but there's also a problem with JAXB and null.  JAXB uses null in a    lot of places where an empty collection would make more sense.  If    I'd known how pervasive that was, I might have gone ahead and    written a wrapper even if that was the only thing it fixed.&lt;a href="#fnr2-839577574" class="footnoteBackLink" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt; &lt;/p&gt;   &lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3193812711179909442?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3193812711179909442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3193812711179909442' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3193812711179909442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3193812711179909442'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/myisern-12.html' title='MyIsern-1.2'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-4678621087883452326</id><published>2007-10-22T05:23:00.000-07:00</published><updated>2007-10-22T05:20:17.832-07:00</updated><title type='text'>Use Case Specification</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/19-usecasespecification"&gt;UseCaseSpecification&lt;/a&gt;.  Our use cases are    &lt;a href="http://code.google.com/p/myisern-1-brown/w/list?q=label:usecase"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt;Our team drew up a list of the use cases we wanted, then divided them up    to work on them.  I expected that would lead to two different styles of    use case at the end, but I was surprised at how different they turned    out to be.  My partner, &lt;a href="http://kenglishhi.blogspot.com/2007/10/21myisern-12.html"&gt;Kevin English&lt;/a&gt;, took a much more formal    approach.  For example, his alternates always go back to the beginning    and start from scratch, while mine often fork off in the middle of the typical    case.  Also, my mock-ups look like napkin doodles. &lt;/p&gt; &lt;p&gt;We actually cut out a lot of use cases because there were so many.    Finding, adding, and editing each of the three types of things    (collaboration, organization, and researcher) would already be nine and    our target was six to twelve.  We ended up not having separate use cases    for finding things, and just including that as a step in editing.  We    also combined all the analysis into one use case. &lt;/p&gt; &lt;p&gt;We mostly followed the tips on how to write good use cases, but I think    mine might have been a little on the terse side.  It's very easy to come    up with use cases, but it's hard to remember all the rules and it's easy    to do too many. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-4678621087883452326?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/4678621087883452326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=4678621087883452326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4678621087883452326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4678621087883452326'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/use-case-specification.html' title='Use Case Specification'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-7554509867976818684</id><published>2007-10-17T02:58:00.000-07:00</published><updated>2007-10-17T03:48:06.421-07:00</updated><title type='text'>MyISERN Review 1.1</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/22-myisern-1-1-review"&gt;MyIsernReview-1.1&lt;/a&gt;.  I'm reviewing the code of    &lt;a href="http://djs-ics413.blogspot.com/"&gt;Marcius Bagwan&lt;/a&gt; (&lt;a href="http://code.google.com/p/myisern-1-blue/"&gt;team blue&lt;/a&gt;).  The team blue code is &lt;a href="http://myisern-1-blue.googlecode.com/files/myisern-xml-1.1.1015.zip"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;   &lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt;The project downloaded and unpacked fine, but when I tried to build the    jar file, I got an error message: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;BUILD FAILED
/tmp/myisern-xml-1.1.1015/build.xml:45: This package requires SWT_HOME
to be defined and /tmp/myisern-xml-1.1.1015/${env.SWT_HOME}/swt.jar
available
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I didn't know what SWT stood for.  The acronym wasn't expanded in any of    the build.xml comments, and there was nothing in the &lt;a href="http://code.google.com/p/myisern-1-blue/wiki/DeveloperGuide"&gt;developer guide&lt;/a&gt;    about it.  It turned out to be a graphical interface toolkit called    &lt;a href="http://www.eclipse.org/swt/"&gt;Standard Widget Toolkit&lt;/a&gt;.  I downloaded it and set &lt;code&gt;SWT_HOME&lt;/code&gt;, and    the jar built. &lt;/p&gt; &lt;p&gt;But then it didn't run: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ java -jar myisern-1-blue.jar -describe -all Researchers
Exception in thread "main" java.lang.NoSuchMethodError: main
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I fixed build.xml to look for "main" in a class that actually had it,    but it still wouldn't run: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ java -jar myisern-1-blue.jar -describe -all Researchers
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/swt/graphics/Drawable
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And it didn't verify either: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;[checkstyle]
/tmp/myisern-xml-1.1.1015/src/edu/hawaii/myisern/example/TestMyIsernXmlLoader.java:7:1:
Redundant import from the same package -
edu.hawaii.myisern.example.MyIsernXmlLoader.

BUILD FAILED
/tmp/myisern-xml-1.1.1015/checkstyle.build.xml:30: Got 1 errors and 0
warnings.
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Coding Conventions&lt;/h2&gt; &lt;p&gt;After all that, I didn't look very hard for coding violations.  One    thing I noticed is that a lot of code is commented out using &lt;code&gt;//&lt;/code&gt;    instead of &lt;code&gt;/* */&lt;/code&gt; (EJS-36). &lt;/p&gt;  &lt;h2&gt;Test Cases&lt;/h2&gt;  &lt;h3&gt;Black Box&lt;/h3&gt; &lt;p&gt;Nearly all the tests are black box tests of the checkArguments method,    which accepts the command-line arguments and prints out the results.  It    also returns a boolean flag that is true if the arguments are valid and    false if they are not.  With a few exceptions, the tests are all of this    flag. &lt;/p&gt; &lt;p&gt;Some tests that could be added: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      query for an object that isn't there (and verify that the program        handles not finding it, not just that the arguments were well-formed)  &lt;/li&gt;&lt;li&gt;      invalid xml (blank name, out-of-range year, dangling reference)  &lt;/li&gt;&lt;li&gt;      check correctness of output (before printing)  &lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;White Box&lt;/h3&gt; &lt;p&gt;There were only two tests that seemed to be white box: One reaches into    the XML loader and checks that the &lt;code&gt;Collaborations&lt;/code&gt; XML tag is    present, and the other tests an &lt;code&gt;isLinkValid&lt;/code&gt; method (for URLs) that    doesn't seem to be called outside the object itself. &lt;/p&gt; &lt;p&gt;The code is hard to follow, and I don't think I understand it well    enough to recommend many white box tests.  I can recommend: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      test whatever it's doing with SWT  &lt;/li&gt;&lt;li&gt;      test the main method  &lt;/li&gt;&lt;/ul&gt;  &lt;h2&gt;Breaking&lt;/h2&gt; &lt;p&gt;It's already broken.  Running it, with any arguments, is a test that    causes it to crash. &lt;/p&gt;  &lt;h2&gt;Summary&lt;/h2&gt; &lt;p&gt;Right after I posted this and sent the email, I realized I forgot this    section. It's not actually due yet, so I'll add it now. &lt;/p&gt; &lt;p&gt;In summary, the program doesn't run. &lt;/p&gt; &lt;p&gt;The lesson I learned is how hard it is to evaluate a program that    doesn't work at all. (By "evaluate," I mean that it's hard to examine.    It's very easy to form an opinion.) &lt;/p&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-7554509867976818684?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/7554509867976818684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=7554509867976818684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/7554509867976818684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/7554509867976818684'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/myisern-review-11.html' title='MyISERN Review 1.1'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-1494395588291541290</id><published>2007-10-15T04:30:00.000-07:00</published><updated>2007-10-15T04:27:34.407-07:00</updated><title type='text'>MyISERN-1.1</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/18-myisern-1-1"&gt;MyISERN-1.1&lt;/a&gt;. &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;      &lt;a href="http://myisern-1-brown.googlecode.com/files/myisern-xml-1.0.1014.zip"&gt;project distribution&lt;/a&gt;.  &lt;/li&gt;   &lt;li&gt;      &lt;a href="http://code.google.com/p/myisern-1-brown/"&gt;project page&lt;/a&gt;  &lt;/li&gt; &lt;/ul&gt; &lt;hr /&gt;  &lt;p&gt;All assigned tasks completed. &lt;/p&gt;  &lt;h2&gt;Difficulties&lt;/h2&gt; &lt;p&gt;The main difficulty was figuring out how to design the program and    organize ourselves.  My parter &lt;a href="http://kenglishhi.blogspot.com/"&gt;Kevin English&lt;/a&gt; has a lot of    experience with &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller" title="Model-View-Controller"&gt;MVC&lt;/a&gt; using Ruby on Rails, so we decided to use an MVC    design.  Kevin worked on the controller and the view, and I worked on    the model. &lt;/p&gt; &lt;p&gt;We were also a little unsure about how the model should look.  We    started writing out method calls showing how it would be used, and then    we though maybe we should try test-driven design.  So, for the model at    least, I was using TDD. &lt;/p&gt; &lt;p&gt;I came up with a technique of commenting out the @Test annotation (as    &lt;code&gt;//TODO @Test&lt;/code&gt;) and using Eclipse to generate stub implementations so    that I could check in the unit tests before the &amp;quot;real&amp;quot; code without    breaking verify.  It worked fairly well -- writing the code seemed to go    a lot faster with the tests in place&lt;sup id="fnr1-103685768"&gt;&lt;a name="fnr1-103685768" href="#fn1-103685768"&gt;1&lt;/a&gt;&lt;/sup&gt;. &lt;/p&gt; &lt;p&gt;The biggest problem as far as organizing the group was the model    interface.  I think we spent most of two meetings talking about what the    method signatures would be.  Finally, it was all settled.  Then right    after the last meeting before release, I got an email from my partner    telling me I had done it wrong. &lt;/p&gt;  &lt;h2&gt;Next Time&lt;/h2&gt; &lt;p&gt;Next time, I'd like to nail down all the interfaces between code that    will be written by different people before anything else is done.  It    might help to print out the Javadoc HTML and bring it to the meetings. &lt;/p&gt; &lt;p&gt;We seemed to be meeting more as time went on.  I guess it helps more    than we expected. &lt;/p&gt; &lt;p&gt;I wouldn't mind using TDD again, but I really think it's time to add a    web interface and a database.  It gets harder and harder to add those as    the project gets on.  I don't care how agile you think you are, this is    a huge risk.  It's like we're deliberately simulating the type of insane    requirements flux that kills projects&lt;sup id="fnr2-103685768"&gt;&lt;a name="fnr2-103685768" href="#fn2-103685768"&gt;2&lt;/a&gt;&lt;/sup&gt;. &lt;/p&gt; &lt;p&gt;I wrote our current data model, and I know that it will have to be    thrown away when we go from JAXB objects to a database.  Obviously, the    same is true for my partner's command-line and text table code when we    go to the web. &lt;/p&gt; &lt;p&gt;Why didn't we write an abstraction layer so that we can easily switch?    Doing that so it actually works is a &lt;em&gt;lot&lt;/em&gt; harder than it sounds.  I    doubt anyone has had enough time to even come close. &lt;/p&gt; &lt;p&gt;(I just saw Kevin's entry.  I agree, it's also time to ditch Java.) &lt;/p&gt;  &lt;div class="footnote"&gt;&lt;hr/&gt;&lt;ol&gt;  &lt;li id="fn1-103685768"&gt;&lt;a name="fn1-103685768"/&gt;&lt;p&gt;However, it failed at the purpose I originally adopted it for.    Showing my partner the tests did not make it easy for him to see how    I expected the methods to be called.&lt;a href="#fnr1-103685768" class="footnoteBackLink" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt; &lt;/p&gt;   &lt;/li&gt;   &lt;li id="fn2-103685768"&gt;&lt;a name="fn2-103685768"/&gt;&lt;p&gt;Is this deliberate?  I hope not.  That would be even worse.&lt;a href="#fnr2-103685768" class="footnoteBackLink" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt; &lt;/p&gt;   &lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-1494395588291541290?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/1494395588291541290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=1494395588291541290' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/1494395588291541290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/1494395588291541290'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/myisern-11_15.html' title='MyISERN-1.1'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-4479784222161498549</id><published>2007-10-10T02:49:00.000-07:00</published><updated>2007-10-10T02:41:36.865-07:00</updated><title type='text'>MyIsernReview</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/16-myisernreview"&gt;MyIsernReview&lt;/a&gt;.  I'm reviewing the code of    &lt;a href="http://codingandrew.blogspot.com/"&gt;Andrew Wong&lt;/a&gt; (&lt;a href="http://code.google.com/p/myisern-1-silver/"&gt;team silver&lt;/a&gt;).  The team silver code is &lt;a href="http://myisern-1-silver.googlecode.com/files/myisern-xml-1.0.1007.zip"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;   &lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt;Downloading, unpacking, verifying, and building the distribution all    went fine.  When I ran the jarfile, it printed out a nice help message,    telling me to use -tabs or -console to choose the type of output.  Both    ways worked as advertised. &lt;/p&gt;  &lt;h2&gt;Code Format and Conventions&lt;/h2&gt; &lt;p&gt;Per our instructions, I spent only a few minutes looking for violations,    and none leapt out at me. &lt;/p&gt;  &lt;h2&gt;Test Cases&lt;/h2&gt;  &lt;h3&gt;Black Box&lt;/h3&gt; &lt;p&gt;The unit tests included these black box tests: &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;      Test that the number of records printed is the same as the number of      records given.  &lt;/li&gt;   &lt;li&gt;      Check that no records are printed when no records exist.  &lt;/li&gt;   &lt;li&gt;      Test that the program runs.  &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;The box couldn't be completely black because a lot of the methods being    tested print their results.  The tests mostly went by status flags in    the return values.  (For example, the method that prints out records    returns the number of records printed and the test checks that return    value.) &lt;/p&gt; &lt;p&gt;The problem of testing printed output doesn't have any perfect solution    (that I know of) but it might be better to have methods that return the    complete output and test that.  It would also be good to test the    contents of the output and the number of columns. &lt;/p&gt;  &lt;h3&gt;White Box&lt;/h3&gt; &lt;p&gt;Emma reports 100% coverage. &lt;/p&gt; &lt;p&gt;The white box test were geared toward testing the column formatting in    console mode.  There's a method called &lt;code&gt;getColumnSize&lt;/code&gt; that takes an    array of strings representing a column and figures out what the width of    the column should be.  The method actually takes the length of the    longest string in the column and uses the next multiple of ten after    that, so there are several white box tests using string lengths chosen    to test the rounding logic. &lt;/p&gt; &lt;p&gt;There are also tests that the program runs in the right &amp;quot;mode&amp;quot; based on    the command-line arguments. &lt;/p&gt; &lt;p&gt;The table structure is basically hard-coded, so a lot of the code is a    bunch of method calls that have to be in the right order to put things    in the right column.  It would be good to test that things are actually    going in the right columns. &lt;/p&gt;  &lt;h3&gt;Breaking&lt;/h3&gt; &lt;p&gt;With the XML input given in the specs, there are really only two cases    for the program to cover, and it basically goes straight through and    does them.  The only way I can see to break the program is to drop the    assumption in the spec and give it other data, which I think doesn't    count. &lt;/p&gt; &lt;p&gt;There is one thing I noticed.  It's not technically &amp;quot;incorrect output&amp;quot;    but some of the columns in console mode are much wider than they need to    be.  The data is trimmed of whitespace before it's put in the table, but    the &lt;code&gt;getColumnSize&lt;/code&gt; method is passed an array of the untrimmed data.    That's pretty easy to fix. &lt;/p&gt;  &lt;h2&gt;Lessons Learned&lt;/h2&gt; &lt;p&gt;The main thing I learned is that System.out has a &lt;code&gt;format&lt;/code&gt; method that's    good for printing columns. &lt;/p&gt; &lt;p&gt;Testing a program like this is a little odd.  The input is fixed, so you    could just have a test that does a giant string comparison on a string    that's printed out as the entire output.  In fact, you could have a    program that just prints out a hard-coded string. &lt;/p&gt; &lt;p&gt;It's kind of silly, but now that I think of it, I wish I had done that.    It would have been a lot easier. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-4479784222161498549?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/4479784222161498549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=4479784222161498549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4479784222161498549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4479784222161498549'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/myisernreview.html' title='MyIsernReview'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3119817049828979256</id><published>2007-10-08T04:13:00.000-07:00</published><updated>2007-10-08T04:06:02.954-07:00</updated><title type='text'>15.MyISERN-1.0</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/5-myisern-1-0"&gt;MyISERN-1.0&lt;/a&gt;. &lt;/p&gt; &lt;ul&gt;  &lt;li&gt;      &lt;a href="http://myisern-1-brown.googlecode.com/files/myisern-xml-1.0.1007.zip"&gt;project distribution&lt;/a&gt;.  &lt;/li&gt;   &lt;li&gt;      &lt;a href="http://code.google.com/p/myisern-1-brown/"&gt;project page&lt;/a&gt;  &lt;/li&gt; &lt;/ul&gt; &lt;hr /&gt;   &lt;h2&gt;Lessons Learned&lt;/h2&gt;  &lt;h3&gt;Group Work&lt;/h3&gt; &lt;p&gt;My partner on this project was &lt;a href="http://kenglishhi.blogspot.com/"&gt;Kevin English&lt;/a&gt;.  He had to be on the    mainland from Friday until Monday, so we probably did things a little    differently than other groups. &lt;/p&gt; &lt;p&gt;Kevin set up the project on Google and did as much of the code as he    could before he left.  While he was gone, he could get email and a web    browser, but didn't have his development environment.  So from that    point on, he worked on the wiki and I worked on the code. &lt;/p&gt; &lt;p&gt;We ended up not really using the &amp;quot;discuss&amp;quot; Google group and just sending    each other email directly.  With more people that might have been bad,    but with just two it was not a problem. &lt;/p&gt; &lt;p&gt;The main lesson for me was that if you can divide up the work very    clearly, by area or time or both, it helps lessen the effect of physical    separation. &lt;/p&gt;  &lt;h3&gt;JAXB and XML&lt;/h3&gt; &lt;p&gt;I didn't really learn anything about JAXB or XML, except some basic    background on what JAXB is for.  We only used it a little, and the    method calls were already in place by the time I started working on it. &lt;/p&gt;  &lt;h2&gt;The Code&lt;/h2&gt; &lt;p&gt;When I started, the first thing I was going to do was add unit tests for    the code that Kevin had written.  I immediately ran into that same    problem we've had before with unit testing code that prints out its    results.  That really seems like a flaw in Java because it gives you an    easy, obvious way to write your program and then makes that way    impossible to test. &lt;/p&gt; &lt;p&gt;I'm still not completely satisfied with the output.  It prints out a    table, but the &amp;quot;description&amp;quot; fields are so long that they often wrap    around and mess up the display of the table on the screen.  It looks    okay in the Eclipse console, which doesn't wrap, but when you run it    from the command line, it looks messy. &lt;/p&gt; &lt;p&gt;In the end, I figured it was better to have the output literally be a    table than a non-table that looks nice when you wrap it. &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3119817049828979256?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3119817049828979256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3119817049828979256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3119817049828979256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3119817049828979256'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/15myisern-10.html' title='15.MyISERN-1.0'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-642161501508985422</id><published>2007-10-02T14:21:00.000-07:00</published><updated>2007-10-02T14:22:46.618-07:00</updated><title type='text'>14 CM Practice</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/14-cm-practice"&gt;CM Practice&lt;/a&gt;, where we practice setting up    a project on Google according to the class conventions. &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      &lt;a href="http://code.google.com/p/webspider-jaress/"&gt;project&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;      &lt;a href="http://groups.google.com/group/webspider-jaress-discuss"&gt;discussion group&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;      &lt;a href="http://groups.google.com/group/webspider-jaress-svn"&gt;svn commit group&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;hr /&gt;  &lt;p&gt;All three tasks accomplished successfully. &lt;/p&gt;  &lt;h2&gt;Subversion Client&lt;/h2&gt; &lt;p&gt;I already had the command-line client installed, so I decided to use    that.  One benefit is that I can just paste my command lines into this    entry. &lt;/p&gt;  &lt;h2&gt;Improving Stack-Johnson&lt;/h2&gt; &lt;p&gt;Every time I use svn with a new server, there are a few rough spots.  No    two servers are set up in quite the same way, and I always seem to want    to use some feature of svn that I haven't needed in a while, like    reading only the log message of the change I just committed.  It took a    little reading of the docs, but went fairly well: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ svn --username brian.jaress checkout \
https://stack-johnson.googlecode.com/svn/trunk stack-johnson
$ cd stack-johnson
$ ant -f verify.build.xml
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(At this point, I made my change.) &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ svn diff
Index: src/edu/hawaii/stack/EmptyStackException.java
===================================================================
--- src/edu/hawaii/stack/EmptyStackException.java       (revision 34)
+++ src/edu/hawaii/stack/EmptyStackException.java       (working copy)
@@ -1,7 +1,8 @@
package edu.hawaii.stack;

/**
- * EmptyStackException is thrown when an attempt is made to pop an empty stack.
+ * EmptyStackException is thrown when an attempt is made to pop an empty
+ * stack or check its top element.
 *
 * @author Philip M. Johnson
 */

$ ant -f verify.build.xml
$ svn commit
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(Filled in the log message.) &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ svn update
$ svn log -r HEAD
------------------------------------------------------------------------
r35 | brian.jaress | 2007-10-02 09:19:18 -1000 (Tue, 02 Oct 2007) | 4 lines

Expanded EmptyStackException class comment to mention that it's thrown
when checking the top of an empty stack.

------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Creating a New Project&lt;/h2&gt; &lt;p&gt;This task was mostly about setting up a Google project in exactly the    class-approved way.  The biggest difficulty was that the instructions    were in the form of a slide show full of screenshots that I couldn't    really make out.  I spent a lot of time squinting at pictures that were    either tiny or blurry, depending on how much I zoomed in. &lt;/p&gt; &lt;p&gt;Once the Google side was all set up, I just had to bring the files in: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ svn --username brian.jaress checkout \
https://webspider-jaress.googlecode.com/svn/trunk
$ cp -R webspider-jaress/* trunk
$ cd trunk
$ svn add *
$ ant -f verify.build.xml
$ svn commit
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then I checked my email and confirmed that I had gotten a message    containing the change. &lt;/p&gt;  &lt;h2&gt;Lessons Learned&lt;/h2&gt; &lt;p&gt;I learned a few quirks of Google Code and Google Groups and puzzled out    our class conventions for how they should be used.  I also discovered a    few quirks of Subversion that I hadn't known about, like having to do an    update before you can see your own commit in the log. &lt;/p&gt;&lt;hints id="hah_hints"&gt;&lt;/hints&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-642161501508985422?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/642161501508985422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=642161501508985422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/642161501508985422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/642161501508985422'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/10/14-cm-practice.html' title='14 CM Practice'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3296619095913944762</id><published>2007-09-29T14:44:00.000-07:00</published><updated>2007-09-29T14:45:53.241-07:00</updated><title type='text'>WebSpider Review</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/12-webspiderreview"&gt;WebSpider Review&lt;/a&gt;.  I'm reviewing    &lt;a href="http://bkarsin.blogspot.com/2007/09/11webspider.html"&gt;Ben Karsin's spider&lt;/a&gt;. &lt;/p&gt; &lt;hr /&gt;   &lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt;The package installed fine, including all the ant files.  Everything    verified and &lt;code&gt;ant jar&lt;/code&gt; worked. &lt;/p&gt; &lt;p&gt;The one thing that gave me a little trouble was the logging.  Running    the program with &lt;code&gt;-logging&lt;/code&gt; at the end of the command line didn't log    anything.  I was pretty confused by that until I checked the source    code.  All the logging code was just commented out. &lt;/p&gt; &lt;p&gt;Aside from that minor snag, all was well. &lt;/p&gt;  &lt;h2&gt;Code Format Fixes&lt;/h2&gt; &lt;p&gt;All in WebSpider.java: &lt;/p&gt; &lt;p&gt;&lt;table&gt;    &lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Line&lt;/th&gt;&lt;th&gt;Rule&lt;/th&gt;&lt;td&gt;Rule Description&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;ICS-SE-Java-4&lt;/td&gt;&lt;td&gt;Do not include // comments at the top of the file.&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;EJS-27&lt;/td&gt;&lt;td&gt;Pluralize the names of collection references.&lt;/td&gt;&lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;152&lt;/td&gt;&lt;td&gt;EJS-36&lt;/td&gt;&lt;td&gt;Use standard comments to hide code without removing it.&lt;/td&gt;&lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;h2&gt;Test Cases&lt;/h2&gt;  &lt;h3&gt;Black Box&lt;/h3&gt; &lt;p&gt;The testing wasn't really being done from a black box perspective.  I    think there was just a decision to go with white box. &lt;/p&gt; &lt;p&gt;Because of that, there isn't much partitioning into equivalence classes.    The JUnit tests cover a typical case (starting at    &lt;a href="http://www.hackystat.org/"&gt;http://www.hackystat.org&lt;/a&gt;) and the case of a bad URL for the starting    page (&lt;code&gt;http://&lt;/code&gt;).  They also cover both of the command line arguments. &lt;/p&gt; &lt;p&gt;Some equivalence classes that could be added: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      Pages that link to themselves.  &lt;/li&gt;&lt;li&gt;      Cycles of more than one page.  &lt;/li&gt;&lt;li&gt;      "Diamond" linking (A links to B and C, B and C both link to D).  &lt;/li&gt;&lt;li&gt;      Pages with links to missing pages.  &lt;/li&gt;&lt;li&gt;      Pages with bad URLs in their links.  &lt;/li&gt;&lt;li&gt;      Pages with no links.  &lt;/li&gt;&lt;li&gt;      Running out of pages before the maximum.  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;These would be tested mostly for the result rather than whether or not    they throw an exception.  The hackystat.org test probably already has    several of these, but it's only being tested for exceptions. &lt;/p&gt;  &lt;h3&gt;White Box&lt;/h3&gt; &lt;p&gt;Test coverage is much better from a white box perspective. &lt;/p&gt; &lt;p&gt;Emma reports code coverage of: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;Emma Coverage summary
class:   100% (2/2)
method:  100% (7/7)
block:   95%  (346/364)
line:    94%  (68/72)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A couple of white box tests that could be added: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      Relative links.  &lt;/li&gt;&lt;li&gt;      Duplicate links on the same page.  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Some of the things listed under black box could also be seen as white    box tests because there's specific code to  handle them. &lt;/p&gt;  &lt;h3&gt;Breaking&lt;/h3&gt; &lt;p&gt;Page with no links: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ java -jar *jar -mostpopular 'http://www2.hawaii.edu/~jaress' 10
Exception in thread "main" java.lang.NullPointerException
       at edu.hawaii.webspider.WebSpider.main(WebSpider.java:133)
&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Lessons Learned&lt;/h2&gt; &lt;p&gt;My spider actually has a very similar flaw: &lt;/p&gt; &lt;pre&gt;&lt;code&gt;$ java -jar *jar -mostpopular 'http://www2.hawaii.edu/~jaress' 10
Most Popular: http://www2.hawaii.edu/~jaress/ with null
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;(It should say "0" instead of "null".) &lt;/p&gt; &lt;p&gt;Probably the best way to fix that would be initialize the count for the    start page to zero. &lt;/p&gt; &lt;p&gt;Seeing Ben's approach also helped me decide what I should have done    differently.  There were parts of my spider that I wasn't happy with,    and I was thinking about how I should have done it.  After seeing Ben's    code I decided that the root problem was over-generalizing. &lt;/p&gt; &lt;p&gt;I had created a helper class that was designed as if I had no clue what    it was actually going to be used for.  For example, it would return    objects defined in HttpUnit -- with all their error-prone methods -- in    case the calling code wanted to do something wacky with it like analyze    the text.  It also forced the calling code to decide when it had seen    enough pages, in case the decision needed to be based on some    complicated logic. &lt;/p&gt; &lt;p&gt;That was a Bad Idea, and my helper should have: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;      Pulled the link data out of the HttpUnit object, put it into a simpler      object, and returned that.  &lt;/li&gt;&lt;li&gt;      Kept track of the maximum number of pages.  &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3296619095913944762?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3296619095913944762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3296619095913944762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3296619095913944762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3296619095913944762'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/09/webspider-review_29.html' title='WebSpider Review'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-6539966768083169491</id><published>2007-09-24T05:11:00.000-07:00</published><updated>2007-09-24T05:04:33.362-07:00</updated><title type='text'>WebSpider</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/11-webspider"&gt;WebSpider&lt;/a&gt;.  My spider is &lt;a href="http://www2.hawaii.edu/~jaress/613/ass11/webspider-jaress-1.0.924.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;All three tasks accomplished.&lt;/p&gt;  &lt;h2&gt;HttpUnit&lt;/h2&gt;  &lt;p&gt;I used HttpUnit to create fake servers for testing my spider, so I learned about the server parts of it as well as the client parts.  It's a actually nicer on the server end, and I wouldn't mind using it for that again.  (But it's terrible on the client side.)&lt;/p&gt;  &lt;h2&gt;Logging&lt;/h2&gt;  &lt;p&gt;I didn't spend very much time on logging.  I just grabbed something from &lt;code&gt;Logger.getLogger&lt;/code&gt; and used &lt;code&gt;setUseParentHandlers&lt;/code&gt; to turn it on and off.  That seems a bit crude, but it works.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://kenglishhi.blogspot.com/"&gt;Kevin English&lt;/a&gt; posted some nice code to suppress all those HttpUnit stack traces.  It's not really a part of logging, but it cleared away the screen so I could see my log.&lt;/p&gt;  &lt;h2&gt;Java&lt;/h2&gt;  &lt;p&gt;I had a very interesting time with Java on this project.  HttpUnit (on the client side) has a bad habit of declaring checked exceptions that it never throws, then throwing many different unchecked exceptions that crash the program.&lt;/p&gt;  &lt;p&gt;At the same time, I was trying to wrap part of the program in an &lt;code&gt;Iterator&lt;/code&gt; for the silly reason that it made logical sense.  Java won't let you add checked exceptions when you're implementing an interface, so I couldn't just propagate the checked exceptions knowing they didn't actually happen.&lt;/p&gt;  &lt;p&gt;I ended up with some dead code to satisfy the compiler, a lot of try/catch blocks covering different levels of nesting (if it fails in the outer loop, continue the outer loop; if it fails in the inner loop . . .) and pre-fetching to make sure that &lt;code&gt;next&lt;/code&gt; always worked when &lt;code&gt;hasNext&lt;/code&gt; was true.&lt;/p&gt;  &lt;p&gt;Basically, several rules of Java that are supposed to stop things from going wrong actually helped them go wrong and then got in the way of fixing them.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-6539966768083169491?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/6539966768083169491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=6539966768083169491' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/6539966768083169491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/6539966768083169491'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/09/webspider.html' title='WebSpider'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-5162878638328798743</id><published>2007-09-16T18:58:00.000-07:00</published><updated>2007-09-16T18:52:04.225-07:00</updated><title type='text'>Stack</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/10-stack"&gt;stack&lt;/a&gt;.  My stack is &lt;a href="http://www2.hawaii.edu/~jaress/613/ass10/stack-jaress-5.0.916.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Results&lt;/h2&gt;  &lt;p&gt;All five tasks completed successfully.&lt;/p&gt;  &lt;h2&gt;Problems&lt;/h2&gt;  &lt;p&gt;I had the same problem that &lt;a href="http://cox-engineering-log.blogspot.com/2007/09/10stack.html" title="RCox Engineering Log: 10.Stack"&gt;Randy had&lt;/a&gt; with eclipse not finding classes.  Thanks to Randy, it was easy to fix.&lt;/p&gt;  &lt;p&gt;Thanks also to &lt;a href="http://fei-engineering-blog.blogspot.com/" title="Fei's Engineering Blog"&gt;Jianfei Liao&lt;/a&gt; for pointing out that we might be expected to explicitly check for an install of JavaNCSS, even though a proper check is redundant to trying to use it.&lt;/p&gt;  &lt;p&gt;I added the check in case it's required, but I still think it's bad. That kind of redundant checking can confuse people.&lt;/p&gt;  &lt;p&gt;The most interesting thing I did was for the code coverage.  I did add unit tests, but I also changed some of the non-test code.&lt;/p&gt;  &lt;p&gt;&lt;code&gt;ClearStack&lt;/code&gt; had a method called &lt;code&gt;getTop&lt;/code&gt; that did nothing except call the method &lt;code&gt;top&lt;/code&gt; inherited from &lt;code&gt;Stack&lt;/code&gt;.  So I changed it to be a single method defined in &lt;code&gt;Stack&lt;/code&gt; and used directly without re-definition in &lt;code&gt;ClearStack&lt;/code&gt; (just like &lt;code&gt;push&lt;/code&gt; and &lt;code&gt;pop&lt;/code&gt;).  I wasn't sure whether the combined function should be called &lt;code&gt;top&lt;/code&gt; or &lt;code&gt;getTop&lt;/code&gt;, but I decided that &lt;code&gt;getTop&lt;/code&gt; was more conventional.  Coverage improved significantly.&lt;/p&gt;  &lt;p&gt;Then I added a test to make sure that &lt;code&gt;getTop&lt;/code&gt; throws an exception if the stack is empty.  I also expanded the "normal" test to check &lt;code&gt;getTop&lt;/code&gt; on a one-item stack and &lt;code&gt;Stack.toString&lt;/code&gt; on empty and three-item stacks. That brought it to 100%.&lt;/p&gt;  &lt;h2&gt;Ant&lt;/h2&gt;  &lt;p&gt;Ant is a nice tool, but I think it sometimes tries to do too much.&lt;/p&gt;  &lt;p&gt;It also has few rough edges.  For example, if you try to expand a property it doesn't recognize, it silently uses the unexpanded form. That gives you things like:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;[echo] PMD found ${pmd.failure.count} problem(s). &lt;/code&gt;&lt;/pre&gt;  &lt;h2&gt;Standards&lt;/h2&gt;  &lt;p&gt;I understand the motivation for the build file structuring, but I'm not pleased with it.  What I'd like to do (but didn't) is:&lt;/p&gt;  &lt;ol&gt; &lt;li&gt;Rename &lt;code&gt;build.xml&lt;/code&gt; to &lt;code&gt;compile.build.xml&lt;/code&gt; (and update all the import references).&lt;/li&gt; &lt;li&gt;Rename &lt;code&gt;verify.build.xml&lt;/code&gt; to &lt;code&gt;build.xml&lt;/code&gt;.&lt;/li&gt; &lt;li&gt;Import dist into the new &lt;code&gt;build.xml&lt;/code&gt;.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;That wouldn't make any of the files harder to understand.  In fact, the new &lt;code&gt;build.xml&lt;/code&gt; would be easier to understand than the old one.  But it would make everything a lot easier.  You'd do &lt;code&gt;ant&lt;/code&gt; to verify, &lt;code&gt;ant dist&lt;/code&gt; to make a distribution, &lt;code&gt;ant pmd&lt;/code&gt; to run just PMD, etc.&lt;/p&gt;  &lt;h2&gt;JavaNCSS vs. SCLC&lt;/h2&gt;  &lt;p&gt;I prefer JavaNCSS.  It was easier to get useful information out of the JavaNCSS output.  It only looks at the Java code, but it looks at it in much greater depth.  The SCLC output left me wondering "OK, what do I do with that?"  It's also nice to have the cyclomatic complexity.&lt;/p&gt;  &lt;p&gt;The non-comment line counts don't match, and I think that JavaNCSS might be excluding blank lines while SCLC is including them.  That would be another plus for JavaNCSS.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-5162878638328798743?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/5162878638328798743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=5162878638328798743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5162878638328798743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/5162878638328798743'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/09/stack.html' title='Stack'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-3412647891902335128</id><published>2007-09-04T02:15:00.000-07:00</published><updated>2007-09-04T02:10:18.870-07:00</updated><title type='text'>Code Ruler Redux</title><content type='html'>&lt;p&gt;Today, we have &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/08-coderulerredux"&gt;Code Ruler Redux&lt;/a&gt;.  My ruler was &lt;a href="http://cox-engineering-log.blogspot.com/2007/08/file-lines-violation-comments.html"&gt;reviewed&lt;/a&gt; by &lt;a href="http://cox-engineering-log.blogspot.com/"&gt;Randy Cox&lt;/a&gt;, and I have a revised ruler &lt;a href="http://www2.hawaii.edu/~jaress/redux/jaress.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Team Member&lt;/h2&gt;  &lt;p&gt;Brian Jaress&lt;/p&gt;  &lt;h2&gt;Style Changes&lt;/h2&gt;  &lt;p&gt;First, of course, I fixed the class coding standards violations that Randy found.&lt;/p&gt;  &lt;p&gt;I also changed some of the code to make better use of Java 5 features. In a couple places I'd been looping over an array and adding every element to a Set, and I changed it to a one-liner using &lt;code&gt;Arrays.asList()&lt;/code&gt; and &lt;code&gt;addAll()&lt;/code&gt;.&lt;/p&gt;  &lt;h2&gt;Strategy Changes&lt;/h2&gt;  &lt;p&gt;I also made some adjustments to the strategy, adding a target minimum number of peasants and always attacking enemy knights when there are no other enemy pieces.  That took care of two edge cases that came up surprisingly often.&lt;/p&gt;  &lt;p&gt;Here are the updated test results against built-in rulers:&lt;/p&gt;  &lt;table&gt;&lt;tr&gt;&lt;td&gt;Migrating&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;773&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;781&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;783&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;  &lt;table&gt;&lt;tr&gt;&lt;td&gt;Gang-up&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;176&lt;/td&gt;&lt;td&gt;668&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;162&lt;/td&gt;&lt;td&gt;701&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;732&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;  &lt;table&gt;&lt;tr&gt;&lt;td&gt;Split-up&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;180&lt;/td&gt;&lt;td&gt;654&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;148&lt;/td&gt;&lt;td&gt;653&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;202&lt;/td&gt;&lt;td&gt;610&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;  &lt;p&gt;&lt;a href="http://zsx-engineering-log.blogspot.com/"&gt;Shaoxuan Zhang&lt;/a&gt;, whose ruler I &lt;a href="http://bpj-613.blogspot.com/2007/09/code-ruler-review.html"&gt;reviewed&lt;/a&gt;, checked the code of successful rulers from another school and &lt;a href="http://zsx-engineering-log.blogspot.com/2007/09/coderuler-update.html"&gt;adapted&lt;/a&gt; them into something that sounds similar in spirit to my strategy: figure out what types of targets you want to attack and have each knight attack the closest one.&lt;/p&gt;  &lt;p&gt;It's not quite the same, though.  His ruler attacks castles first, then attacks knights and peasants once it has all castles.  My ruler attacks castles, peasants, and weak knights first.  When all of those are gone, it attacks strong knights.&lt;/p&gt;  &lt;h2&gt;Lessons Learned&lt;/h2&gt;  &lt;p&gt;&lt;code&gt;Arrays.asList()&lt;/code&gt; is a very handy &lt;strike&gt;function&lt;/strike&gt; static method, and Eclipse is a lot easier now that I've hooked up my mouse.&lt;/p&gt;  &lt;p&gt;I also realized that my ruler is evil.&lt;/p&gt;  &lt;p&gt;Of course, all the rulers try to kill off enemy pieces and squeeze out other rulers, and my ruler isn't the most aggressive or effective. If, however, you think of the strategy as representing the behavior of an actual person, my ruler is the worst thug.&lt;/p&gt;  &lt;p&gt;The other rulers seem to have either sophisticated strategies that optimize the local behavior of their pieces (&lt;a href="http://bkarsin.blogspot.com/2007/08/coderuler-may-best-bot-win.html"&gt;Ben Karsin's ruler&lt;/a&gt; is a good example) or simple strategies like "capture the castles" or "split up into groups."  My ruler's simple strategies are "target the weak" and "don't let anyone have a bigger army."  Even the peasant strategy, which I think is quite effective, leads to a creepy "peasant Matrix' effect.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-3412647891902335128?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/3412647891902335128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=3412647891902335128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3412647891902335128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/3412647891902335128'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/09/code-ruler-redux.html' title='Code Ruler Redux'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-7775652339924415906</id><published>2007-09-01T00:27:00.000-07:00</published><updated>2007-09-01T00:22:15.694-07:00</updated><title type='text'>Code Ruler Review</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/07-coderulerreview"&gt;Code Ruler Review&lt;/a&gt;.  I'm reviewing the &lt;a href="http://www2.hawaii.edu/~sz/ics613/sz.zip"&gt;code&lt;/a&gt; of &lt;a href="http://zsx-engineering-log.blogspot.com/"&gt;Shaoxuan Zhang&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Overall Impressions&lt;/h2&gt;  &lt;p&gt;A little dense in places, but generally well written.  The strategy was clear and sensibly implemented.&lt;/p&gt;  &lt;p&gt;I noticed that English does not seem to be Shaoxuan's first language.  I had no problem understanding the comments, but the type of grammar tweaking that the rules insist on seemed rather pointless.  I think maybe those rules should be relaxed in this case (but I listed them anyway).&lt;/p&gt;  &lt;p&gt;The number of things to fix was surprisingly low, considering it was written before we got the rules.&lt;/p&gt;  &lt;h2&gt;Standards Check&lt;/h2&gt;  &lt;p&gt;Entries in the "Lines" column refer to the MyRuler.java file.&lt;/p&gt;  &lt;table&gt;&lt;tr&gt;&lt;th&gt;Lines&lt;/th&gt;&lt;th&gt;Rule&lt;/th&gt;&lt;th&gt;Rule Description&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-0&lt;/td&gt;&lt;td&gt;Follow EJS standards.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;ICS-SE-Java-1&lt;/td&gt;&lt;td&gt;All code is within the package hierarchy "edu.hawaii".&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;ICS-SE-Java-2&lt;/td&gt;&lt;td&gt;Do not use the wildcard "*" in import statements.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-3&lt;/td&gt;&lt;td&gt;Only one Java statement per line.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-4&lt;/td&gt;&lt;td&gt;Do not include // comments at the top of the file.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-5&lt;/td&gt;&lt;td&gt;Rewrite default Eclipse template JavaDocs to be useful.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-6&lt;/td&gt;&lt;td&gt;Format JavaDoc summary lines correctly&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-7&lt;/td&gt;&lt;td&gt;Do not use Vector and Hashtable classes.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-8&lt;/td&gt;&lt;td&gt;Do not use "raw" Collections classes&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-9&lt;/td&gt;&lt;td&gt;Prefer the for-each control structure to the for control structure.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Java-10&lt;/td&gt;&lt;td&gt;Use the @Override annotation when overriding equals() and hashCode&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Eclipse-1&lt;/td&gt;&lt;td&gt;Use Eclipse Europa 3.3&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;*&lt;/td&gt;&lt;td&gt;ICS-SE-Eclipse-2&lt;/td&gt;&lt;td&gt;Import and use the Eclipse Java Code formatting template.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;ICS-SE-Eclipse-3&lt;/td&gt;&lt;td&gt;Configure Text Editor.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-1&lt;/td&gt;&lt;td&gt;Adhere to the style of the original.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-2&lt;/td&gt;&lt;td&gt;Adhere to the Principle of Least Astonishment.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-3&lt;/td&gt;&lt;td&gt;Do it right the first time.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-4&lt;/td&gt;&lt;td&gt;Document any deviations.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-5&lt;/td&gt;&lt;td&gt;Indent nested code.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-6&lt;/td&gt;&lt;td&gt;Break up long lines.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-7&lt;/td&gt;&lt;td&gt;Include whitespace&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;22,23,24,*&lt;/td&gt;&lt;td&gt;EJS-8&lt;/td&gt;&lt;td&gt;Do not use "hard" tabs&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-9&lt;/td&gt;&lt;td&gt;Use meaningful names.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-10&lt;/td&gt;&lt;td&gt;Use familiar names.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-11&lt;/td&gt;&lt;td&gt;Question excessively long names.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-12&lt;/td&gt;&lt;td&gt;Join the vowel generation.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-13&lt;/td&gt;&lt;td&gt;Capitalize only the first letter in acronyms.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-14&lt;/td&gt;&lt;td&gt;Do not use names that differ only in case.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-15&lt;/td&gt;&lt;td&gt;Use the reversed, lowercase name of your organization's Internet domain name as the root qualifier for your package names.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-16&lt;/td&gt;&lt;td&gt;Use a single, lowercase word as the root name of each package.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-17&lt;/td&gt;&lt;td&gt;NOT USED&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-18&lt;/td&gt;&lt;td&gt;Capitalize the first letter of each word that appears in a class or interface name.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-19&lt;/td&gt;&lt;td&gt;Use nouns when naming classes.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-20&lt;/td&gt;&lt;td&gt;Pluralize the names of classes that group related attributes, static services or constants.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-21&lt;/td&gt;&lt;td&gt;Use nouns or adjectives when naming interfaces.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-22&lt;/td&gt;&lt;td&gt;Use lowercase for the first word and capitalize only the first letter of each subsequent word that appears in a method name.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;157&lt;/td&gt;&lt;td&gt;EJS-23&lt;/td&gt;&lt;td&gt;Use verbs when naming methods.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-24&lt;/td&gt;&lt;td&gt;Follow the JavaBeans&amp;trade; conventions for naming property and accessor methods.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-25&lt;/td&gt;&lt;td&gt;Use lowercase for the first word and capitalize only the first letter of each subsequent word that appears in a variable name.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-26&lt;/td&gt;&lt;td&gt;Use nouns to name fields.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-27&lt;/td&gt;&lt;td&gt;Pluralize the names of collection references.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-28&lt;/td&gt;&lt;td&gt;Establish and use a set of names for trivial "throwaway" variables.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;92,96,100,*&lt;/td&gt;&lt;td&gt;EJS-29&lt;/td&gt;&lt;td&gt;Qualify field names with "&lt;code&gt;this&lt;/code&gt;" to distinguish them from local variables.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-30&lt;/td&gt;&lt;td&gt;When a constructor or "set" assigns a parameter to a field, give that parameter the same name as the field.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-31&lt;/td&gt;&lt;td&gt;Use uppercase letters for each word and separate each pair of words with an underscore when naming constants.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-32&lt;/td&gt;&lt;td&gt;Write documentation for those who must use your code and those who must maintain it.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-33&lt;/td&gt;&lt;td&gt;Keep comments and code in sync.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;EJS-34&lt;/td&gt;&lt;td&gt;Use the active voice and omit needless words.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;22,28&lt;/td&gt;&lt;td&gt;EJS-35&lt;/td&gt;&lt;td&gt;Use documentation comments to describe the programming interface.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-36&lt;/td&gt;&lt;td&gt;Use standard comments to hide code without removing it.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;32,36,40,*&lt;/td&gt;&lt;td&gt;EJS-37&lt;/td&gt;&lt;td&gt;Use one-line comments to explain implementation details.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-38&lt;/td&gt;&lt;td&gt;Describe the programming interface before you write the code.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;EJS-39&lt;/td&gt;&lt;td&gt;Document public, protected, package, and private members.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-40&lt;/td&gt;&lt;td&gt;Provide a summary description and overview for each package.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-41&lt;/td&gt;&lt;td&gt;Provide a summary description and overview for each application or group of packages.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-42&lt;/td&gt;&lt;td&gt;Use a single consistent format and organization for all documentation comments.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-43&lt;/td&gt;&lt;td&gt;NOT USED&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-44&lt;/td&gt;&lt;td&gt;Wrap code with &lt;code&gt;&amp;lt;pre&amp;gt;...&amp;lt;/pre&amp;gt;&lt;/code&gt; tags.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-45&lt;/td&gt;&lt;td&gt;Consider marking the first occurrence of an identifier with a &lt;code&gt;{@link}&lt;/code&gt; tag.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-46&lt;/td&gt;&lt;td&gt;Establish and use a fixed ordering for Javadoc tags.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;125,150,198,*&lt;/td&gt;&lt;td&gt;EJS-47&lt;/td&gt;&lt;td&gt;Write in the third-person narrative form.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;8,124,149&lt;/td&gt;&lt;td&gt;EJS-48&lt;/td&gt;&lt;td&gt;Write summary descriptions that stand alone.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;124,149&lt;/td&gt;&lt;td&gt;EJS-49&lt;/td&gt;&lt;td&gt;Omit the subject in summary descriptions of actions or services.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;EJS-50&lt;/td&gt;&lt;td&gt;Omit the subject and the verb in summary descriptions of things.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;10,152&lt;/td&gt;&lt;td&gt;EJS-51&lt;/td&gt;&lt;td&gt;Use "this" rather than "the" when referring to instances of the current class.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-52&lt;/td&gt;&lt;td&gt;Do not add parentheses to a method or constructor name unless you want to specify a particular signature.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-53&lt;/td&gt;&lt;td&gt;Provide a summary description for each class, interface, field and method.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;EJS-54&lt;/td&gt;&lt;td&gt;Fully describe the signature of each method.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-55&lt;/td&gt;&lt;td&gt;Include examples.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-56&lt;/td&gt;&lt;td&gt;Document preconditions, postconditions, and invariant conditions.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-57&lt;/td&gt;&lt;td&gt;Document known defects and deficiencies.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-58&lt;/td&gt;&lt;td&gt;Document synchronization semantics.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-59&lt;/td&gt;&lt;td&gt;Add internal comments only if they will aid others in understanding your code.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-60&lt;/td&gt;&lt;td&gt;Describe &lt;em&gt;why&lt;/em&gt; the code is doing what it does, not &lt;em&gt;what&lt;/em&gt; the code is doing.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;172,187,205,*&lt;/td&gt;&lt;td&gt;EJS-61&lt;/td&gt;&lt;td&gt;Avoid the use of end-line comments.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-62&lt;/td&gt;&lt;td&gt;Explain local variable creations with an end-line comment.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-63&lt;/td&gt;&lt;td&gt;Establish and use a set of keywords to flag unresolved issues.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-64&lt;/td&gt;&lt;td&gt;Label closing braces in highly nested control structures.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-65&lt;/td&gt;&lt;td&gt;Add a "fall-through" comment between two &lt;code&gt;case&lt;/code&gt; labels, if no &lt;code&gt;break&lt;/code&gt; statement separates those labels.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-66&lt;/td&gt;&lt;td&gt;Label empty statements.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-67&lt;/td&gt;&lt;td&gt;Consider declaring classes representing fundamental data types as &lt;code&gt;final&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-68&lt;/td&gt;&lt;td&gt;Build concrete types from native types and other concrete types.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-69&lt;/td&gt;&lt;td&gt;Define small classes and methods.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-70&lt;/td&gt;&lt;td&gt;Define subclasses so they may be used anywhere there superclass may be used.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;55,59,63,*&lt;/td&gt;&lt;td&gt;EJS-71&lt;/td&gt;&lt;td&gt;Make all fields private.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-72&lt;/td&gt;&lt;td&gt;Use polymorphism instead of &lt;code&gt;instanceof&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-73&lt;/td&gt;&lt;td&gt;NOT USED?&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-74&lt;/td&gt;&lt;td&gt;NOT USED&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-75&lt;/td&gt;&lt;td&gt;Replace nontrivial expressions with equivalent methods.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;105,109,132,*&lt;/td&gt;&lt;td&gt;EJS-76&lt;/td&gt;&lt;td&gt;Use block statements instead of expression statements in control flow constructs.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-77&lt;/td&gt;&lt;td&gt;Clarify the order of operations with parentheses.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-78&lt;/td&gt;&lt;td&gt;Always code a &lt;code&gt;break&lt;/code&gt; statement in the last case of a switch statements.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-79&lt;/td&gt;&lt;td&gt;Use &lt;code&gt;equals()&lt;/code&gt;, not &lt;code&gt;==&lt;/code&gt;, to test for equality of objects.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-80&lt;/td&gt;&lt;td&gt;Always construct objects in a valid state.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-81&lt;/td&gt;&lt;td&gt;Do not call nonfinal methods from within a constructor.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-82&lt;/td&gt;&lt;td&gt;Use nested constructors to eliminate redundant code.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-83&lt;/td&gt;&lt;td&gt;Use unchecked, run-time errors to report serious unexpected errors that may indicate an error in the program's logic.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-84&lt;/td&gt;&lt;td&gt;Use checked exceptions to report errors that may occur, however rarely, under normal program operation.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-85&lt;/td&gt;&lt;td&gt;Use return codes to report expected state changes.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-86&lt;/td&gt;&lt;td&gt;Only convert exceptions to add information.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-87&lt;/td&gt;&lt;td&gt;Do not silently absorb a run-time error exception.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-88&lt;/td&gt;&lt;td&gt;Use a &lt;code&gt;finally&lt;/code&gt; block to release resources.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-89&lt;/td&gt;&lt;td&gt;Program by contract.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-90&lt;/td&gt;&lt;td&gt;NOT USED&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-91&lt;/td&gt;&lt;td&gt;Use assertions to catch logic errors in your code.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-92&lt;/td&gt;&lt;td&gt;Use assertions to test pre- and post-conditions of a method.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-93&lt;/td&gt;&lt;td&gt;Use threads only where appropriate.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-94&lt;/td&gt;&lt;td&gt;Avoid synchronization.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-95&lt;/td&gt;&lt;td&gt;Use synchronized wrappers to provide synchronized interfaces.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-96&lt;/td&gt;&lt;td&gt;Do not synchronize an entire method if the method contains significant operations that do not need to be synchronized.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-97&lt;/td&gt;&lt;td&gt;Avoid unnecessary synchronization when reading or writing instance variables.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-98&lt;/td&gt;&lt;td&gt;Consider using &lt;code&gt;notify()&lt;/code&gt; instead of &lt;code&gt;notifyAll()&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-99&lt;/td&gt;&lt;td&gt;Use the double-check pattern for synchronized initialization.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-100&lt;/td&gt;&lt;td&gt;Use lazy initialization.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-101&lt;/td&gt;&lt;td&gt;Avoid creating unnecessary objects.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-102&lt;/td&gt;&lt;td&gt;Reinitialize and reuse objects to avoid new object construction.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-103&lt;/td&gt;&lt;td&gt;Leave optimization for last.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-104&lt;/td&gt;&lt;td&gt;Place types that are commonly used, changed, and released together, or mutually dependent on each other into the same package.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-105&lt;/td&gt;&lt;td&gt;Isolate volatile classes and interfaces in a separates packages.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-106&lt;/td&gt;&lt;td&gt;Avoid making packages that are difficult to change dependent on packages that are easy to change.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-107&lt;/td&gt;&lt;td&gt;Maximize abstraction to maximize stability.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;EJS-108&lt;/td&gt;&lt;td&gt;Capture high-level design and architecture as stable abstractions organized into stable packages.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-7775652339924415906?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/7775652339924415906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=7775652339924415906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/7775652339924415906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/7775652339924415906'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/09/code-ruler-review.html' title='Code Ruler Review'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-1200253057042354346</id><published>2007-08-29T03:25:00.000-07:00</published><updated>2007-08-29T03:21:02.059-07:00</updated><title type='text'>Code Ruler Results</title><content type='html'>&lt;p&gt;Today's assignment is &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/05-coderuler"&gt;Code Ruler&lt;/a&gt;.  My code is &lt;a href="http://www2.hawaii.edu/~jaress/jaress.zip"&gt;here&lt;/a&gt;. (The zip file contains the entire project, plus &lt;code&gt;javadoc&lt;/code&gt; documentation. I had to change Code Ruler's default project settings to get the Java 5 features to compile.)&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Group Member&lt;/h2&gt;  &lt;p&gt;Brian Jaress&lt;/p&gt;  &lt;h2&gt;Evaluation Results&lt;/h2&gt;  &lt;table&gt; &lt;tr&gt;&lt;td&gt;Migrating&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;733&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;717&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;792&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;&lt;table&gt; &lt;tr&gt;&lt;td&gt;Gang-Up&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;382&lt;/td&gt;&lt;td&gt;583&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;245&lt;/td&gt;&lt;td&gt;592&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;291&lt;/td&gt;&lt;td&gt;543&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;&lt;table&gt; &lt;tr&gt;&lt;td&gt;Split-Up&lt;/td&gt;&lt;td&gt;jaress&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;318&lt;/td&gt;&lt;td&gt;328&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;349&lt;/td&gt;&lt;td&gt;502&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;440&lt;/td&gt;&lt;td&gt;269&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;  &lt;h2&gt;Lessons Learned&lt;/h2&gt;  &lt;p&gt;I learned a bit more about Java, especially Java 5.  Mostly I re-learned the lesson that code should only be written when you know you need it.&lt;/p&gt;  &lt;p&gt;I'm also slowly getting used to the tools -- forcing myself to only edit the code in Eclipse and learning a few &lt;code&gt;javadoc&lt;/code&gt; quirks.  I managed to download and import our &lt;a href="http://ics-software-engineering-fall-2007.googlegroups.com/web/ics-se.eclipse.format.xml"&gt;formatting rules&lt;/a&gt; for Eclipse, so my code should be nice and standard (except that I edited the rules to change the line width from 100 to 72 characters.  There are standards, and there are standards.)&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-1200253057042354346?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/1200253057042354346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=1200253057042354346' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/1200253057042354346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/1200253057042354346'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/08/code-ruler-results_29.html' title='Code Ruler Results'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-6934834874999681530</id><published>2007-08-26T21:58:00.000-07:00</published><updated>2007-08-26T21:59:23.927-07:00</updated><title type='text'>Assignment 02: ConsultComm</title><content type='html'>&lt;p&gt;Today's &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/a-02-oss-experience" title="02. OSS Experience"&gt;assignment&lt;/a&gt; is to evaluate an open-source Java project on &lt;a href="http://www.sourceforge.net/"&gt;Sourceforge&lt;/a&gt; according to our &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/prime-directives"&gt;Three Prime Directives&lt;/a&gt;.&lt;/p&gt;  &lt;hr /&gt;  &lt;h2&gt;Overview&lt;/h2&gt;  &lt;p&gt;ConsultComm is timekeeping program.  It helps you keep track of what you have been doing and how long each thing took.  From its website:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;ConsultComm is a small, lightweight, platform-independent program   written in Java that allows anyone managing multiple projects, clients   or tasks to effectively keep track of exactly how long they've worked on   each project.&lt;/p&gt;      &lt;p&gt;-- &lt;a href="http://consultcomm.sourceforge.net/"&gt;http://consultcomm.sourceforge.net/&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;ConsultComm does a good job of satisfying Prime Directive 1, but it is less successful with Prime Directives 2 and 3.&lt;/p&gt;  &lt;h2&gt;Useful Task&lt;/h2&gt;  &lt;p&gt;Keeping track of time spent is a useful task, and ConsultComm does that successfully.  You can have several tasks in groups, each listed with the time spent so far.  There's a built-in timer that you can start and stop which credits time to the currently selected task.&lt;/p&gt;  &lt;h2&gt;Installation and Use&lt;/h2&gt;  &lt;p&gt;A typical user could install this program successfully.&lt;/p&gt;  &lt;p&gt;An installer is &lt;a href="http://sourceforge.net/project/mirror_picker.php?height=350&amp;amp;width=300&amp;group_id=34622&amp;amp;use_mirror=umn&amp;amp;filename=ConsultComm-3.1.1_Installer.jar"&gt;available&lt;/a&gt; as a jar file, created using &lt;a href="http://izpack.org/"&gt;IzPack&lt;/a&gt;.  It is a typical wizard-style installer, though there is a slightly confusing option at the end about "targets."  (It can be ignored.)&lt;/p&gt;  &lt;p&gt;Some users might not be able to successfully use ConsultComm.  The interface is simple but a little tricky, and there is no user documentation.&lt;/p&gt;  &lt;p&gt;The easiest, most prominent feature is a button which starts and stops a timer.  If you use that feature first, it will appear to be doing something while actually doing nothing.  Before you use the counter, you have to create a project so that the time elapsed will be recorded somewhere rather than thrown away.&lt;/p&gt;  &lt;p&gt;You can create projects using a menu or a keyboard shortcut.  It's fairly easy once you know that it's what you need to do.  If you've used the default install, it also asks about JDBC exports.  You can ignore that and hit "save."&lt;/p&gt;  &lt;h2&gt;Improvable&lt;/h2&gt;  &lt;p&gt;A determined outside developer could probably contribute to ConsultComm.&lt;/p&gt;  &lt;p&gt;The current development branch is in the &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; repository at &lt;a href="https://consultcomm.svn.sourceforge.net/svnroot/consultcomm/trunk"&gt;https://consultcomm.svn.sourceforge.net/svnroot/consultcomm/trunk&lt;/a&gt;, and the developer documentation is in the form of &lt;code&gt;javadoc&lt;/code&gt; comments.&lt;/p&gt;  &lt;p&gt;It takes a little while to figure out how the program is organized.  For example, everything &lt;em&gt;except&lt;/em&gt; the updating of the current project's time on a clock tick is done through JavaBean event listeners.  (The main window registers as a listener for the clock and responds to the event by finding the currently selected project and directly changing its time.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-6934834874999681530?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/6934834874999681530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=6934834874999681530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/6934834874999681530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/6934834874999681530'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/08/assignment-02-consultcomm.html' title='Assignment 02: ConsultComm'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-8134048532295700492</id><published>2007-08-22T01:38:00.000-07:00</published><updated>2007-08-22T02:01:53.723-07:00</updated><title type='text'>Assignment 04</title><content type='html'>&lt;p&gt;Today's assignment was &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/04-fizzbuzz"&gt;FizzBuzz&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;The Experience&lt;/h2&gt;  &lt;p&gt;It took a total of eleven minutes from the time I launched Eclipse to the time I was satisfied that the program produced the right output.&lt;/p&gt;  &lt;p&gt;The single biggest step was checking the output (and I didn't check all of it). As a category, figuring out how to do things in Eclipse took the most time.  I spent some time walking slowly through the wizards for starting a project and class, reading it all to figure out what information I was supposed to give it.&lt;/p&gt;  &lt;p&gt;Then I spent a big chunk of time figuring out how to run a program from inside Eclipse to test it.  Once I got it to run, I could run it again by clicking the "run" button or the &lt;code&gt;Run -&amp;gt; Run..&lt;/code&gt; menu item, but the first time I had to try a couple different things before Eclipse realized that my class was a program.&lt;/p&gt;  &lt;p&gt;The time for actually writing the code was probably shortened by the fact that we wrote out the program on paper in class yesterday.&lt;/p&gt;  &lt;h2&gt;The Code&lt;/h2&gt;  &lt;p&gt;This is with Eclipse's default indentation.  I gathered from class that we will use a different One True Way, but we haven't learned it yet.&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;public class FizzBuzz {
        public static void main(String[] args) {
                for (int i=1; i&amp;lt;101; i++) {
                        if (i % 5 == 0 &amp;&amp;amp; i % 3 == 0) {
                                System.out.println("FizzBuzz");
                        } else if (i % 3 == 0) {
                                System.out.println("Fizz");                       
                        } else if (i % 5 == 0) {
                                System.out.println("Buzz");                       
                        } else {
                                System.out.println(i);                                                 
                        }
                }
        }
} &lt;/code&gt;&lt;/pre&gt;  &lt;h2&gt;The Lesson&lt;/h2&gt;  &lt;p&gt;Anything we learn, we're going to learn the Java way.&lt;/p&gt;  &lt;p&gt;I'm a little worried that this class will turn into "Java for Enterprise Development" with actual software engineering taking a back seat.&lt;/p&gt;  &lt;p&gt;I still have my undergraduate software engineering textbook.  Chapter sixteen covers object oriented design, including a brief introduction to Java.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-8134048532295700492?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/8134048532295700492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=8134048532295700492' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/8134048532295700492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/8134048532295700492'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/08/assignment-04.html' title='Assignment 04'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6475476178388133651.post-4243163087077450210</id><published>2007-08-21T18:06:00.000-07:00</published><updated>2007-08-21T18:21:48.175-07:00</updated><title type='text'>Engineering Log</title><content type='html'>&lt;p&gt;This is a special-purpose blog.  It will serve as my required &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007/web/engineering-logs"&gt;engineering log&lt;/a&gt; for &lt;a href="http://groups.google.com/group/ics-software-engineering-fall-2007"&gt;ICS 613&lt;/a&gt; in Fall 2007.  (Creating a blog on Blogger is one of our assignments.)&lt;/p&gt;  &lt;p&gt;For anything not related to that class, you can find me at my &lt;a href="http://brian-jaress.livejournal.com/"&gt;personal blog&lt;/a&gt;.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6475476178388133651-4243163087077450210?l=bpj-613.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bpj-613.blogspot.com/feeds/4243163087077450210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6475476178388133651&amp;postID=4243163087077450210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4243163087077450210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6475476178388133651/posts/default/4243163087077450210'/><link rel='alternate' type='text/html' href='http://bpj-613.blogspot.com/2007/08/engineering-log.html' title='Engineering Log'/><author><name>Brian Jaress</name><uri>http://www.blogger.com/profile/07210719497091333222</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
