Posts

Showing posts with the label correct-code

Sprint 4 Retrospective

Sprint 4 is over. It was somewhat of a disaster. I completely and utterly underestimated the amount of time it would take me to rewrite the data access layer, application layer, and presentation layer. In retrospect it was insane to think it'd go that fast; this is a rewrite of almost the entire project, which I originally created over the course of 3 months. Whoops. Anyway I got through parts of the data access layer rewrite, and that's about it. I've increased performance in a lot of areas and improved the code overall. I'm now taking advantage of Java 7's try-with-resources statement, which is AWESOME and makes JDBC code much less hideous, and I'm no longer doing any catch (Exception e) but rather actually specifying the exceptions e.g. catch (SQLException e). I did also tweak my database tables, which necessitated rewriting my database creation and fake data creation code. I also wrote a test class to make sure the code I wrote is actually functioning pro...

Sprint 4 Planning

The goal for sprint 4 is to improve the database access code and the JSPs, as well as move Objects from the Session to the Request. The sprint backlog items are: Priority Description Points 200 Move properties out of the session so that users can do things like have multiple browser windows open and bookmark pages 6 190 Improve database access code so that pages load faster 6 180 Refactor JSPs to use JSTL 8 170 Make all JavaScript and HTML fully standards compliant 8 I essentially split what I had been thinking of for the old "Move properties out of the session so that users can do things like have multiple browser windows open and bookmark pages" item into 2, with the other half being "Improve database access code so that pages load faster". This makes things more clear as to what exactly I intend to do. This is 28 ideal man hours; the next two weeks look less busy for me so I think I've got a good chance at making it this time. And so it goes.

Walking a Fine Line Between Correctness and Absurdity

One of the issues for this sprint was improving my code's correctness. I installed and used the Eclipse plugins FindBugs , PMD , and CheckStyle . While these did point out some very valid issues, including not properly closing database resources, doing really bad things in an override of equals, etc., they also pointed out some things that completely flummoxed me. The biggest example is that apparently in Java one can declare virtually anything as final, including method parameters. I had known that methods and classes could be declared final though I had never used such functionality (nor had it explained or recommended either during my Bachelors degree or during my Masters degree, despite MANY Java-centric classes), but parameters was a new one. Some claim parameters should be declared final, while others say it clutters code for very little benefit. Additionally if you do, in fact, reassign a value to a parameter, the very same tools will mark it as an error. So there's qu...

Sprint 3 Planning

The goal for sprint 3 will be to make the project usable for my adviser and start making it more user friendly and start making the code more correct. There are several small tweaks I need to do so that everything will work correctly for my prof, so I need to do that, plus the FindBugs item from the last sprint. Code correctness and user-friendliness are very long-term goals, but this will be their beginning. The sprint backlog items are: Priority Description Points 300 Run automated tools e.g. FindBugs to ensure code is correct and clean 6 253 Write a shell script or similar to start the database server and tomcat 3 252 Fix the build.xml to only copy the correct jars to the web app's lib directory 2 251 Restrict the login page to only allow access via SSL 2 250 Fix the email notification system so that it works with the CS department email settings 4 200 Move properties out of the session so that users can do things like have multiple browser windows open and bookmark...