Skip to content

arijusg/AddressProcessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Summary
-------

Please complete the two coding exercise steps; a brief code review and then a
refactor of a class.

We do not expect you to spend more than two to three hours on this exercise.

Exercise
--------

A junior developer was tasked with writing a reusable implementation for a 
mass mailing application to read and write text files that hold tab separated 
data. They implemented the CSVReaderWriter class as part of this project.
The implementation, although it works and meets the needs of the application, 
is of very low quality.

Your task:
   1) Review the CSVReaderWriterForAnnotation.cs file and using comments at the
   top of this class list three to five key areas of concern that you would 
   discuss with the junior developer. This is a quick review so please don't
   spend more than 15 minutes on this task.

   2) Refactor the CSVReaderWriter.cs file implementation into clean, elegant, 
   rock-solid & well performing code, without over-engineering. You are not
   required to update the AddressFileProcessor as part of this task.
   Assume this code is a small part of a larger production system and 
   backwards compatibility of the CSVReaderWriter must be maintained.

  - Where you make trade offs, comment & explain why. 
  - You'll notice there are some other files in the AddressProcessing project
  that aren't relevant. These will come into play in the next stage in the 
  interview process and can be ignored for now.
  - You may introduce nuget based references.
  - Git is integral to our process but we understand that not everyone has
  previous experience with the tool. If you're not yet familiar with Git we
  recommend that you read some online tutorials and use the SmartGit client to
  get started or visit http://git-scm.com/ for the official git client.  
  - If you need a copy of visual studio you can use the free edition available
  to download from: http://www.visualstudio.com/downloads/


Trade offs/comments
--------

  - I have not implemented my own csv reader, it would have been wasteful. CsvHelper is high quality open source library.
  - I tested CSVReaderWriter functionality, not implementation.
  - "Unknown file mode for check and throws exception" - not relevant as we passing in a enum. If enum gets more values, tests should be written around it. We do not code defensively..
  - Method Read(string column, string column2) is redundant, string is immutable type
  - Reading returns two columns only - not flexible implementation. Should return column array or be mapped to objects
  - Exception handling is left for AddressFileProcessor.

	

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published