Skip to content

Some feedback  #1

Description

@PKJonas

Here are some things that could be improved in your solution:

  • Instead of (Double, Double) you could have a Coordinate case class;
  • Instead of Seq[Seq[(Double, Double)]] - MultiPolygon(List(Polygon(List(Coordinate)));
  • Lack of unit tests;
  • Some unsafe places in the code (polygon.head for example can throw an exception; so could pair(0) -> pair(1)), so the solution wasn't tested with empty polygons or invalid args.
  • Code could be organized better - json, arg parsing, logic could be put into separate files.
  • isLocationInRegion looks rather scary and could use some comments, or nested methods that have descriptive names;
  • The repo contains a jar instead but does not explain how to build it;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions