• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Code complexity

Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I have some questions about codeing for the asignment.

1.) Do you think al lot of boilerplate code affects the score, since it could be interpreted as unecessary nesting depth increasement?
2.) All this Exception handling seems to be poluting methods and constructors signatures. For example, the constructor for my hotel room DTO:

Since there is a lot of parsing from strings a lot can go wrong. Are all those exceptions an overkill?

Any help will be appreciated
Posts: 11604
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1/ having a lot of boilerplate code is never a good thing

2/ Only the ParseException is a checked exception, all other exceptions should not occur in a well-developed application (and thus should not be caught anywhere). I decided not to parse dates and just handle them as string (which removes the need of handling/declaring the ParseException)
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic