Coder Social home page Coder Social logo

postcode's Introduction

Postcode Validator

Total number of days to implement the project: 3 days (with brakes in between and research work involved)

This program is built on Java 8 and is dependant on Stream API. It also requires maven 3.3.9+

Reason to choose Java:

I was recently working on Java platform and have more number of years of experience (4 years) compare to Python. Well aware of standard Java APIs.

Other benefits include:
  • It is flexible, portable, widely used, can run on remote machines
  • Latest Java 8 uses lambda functions and has capability of using filters

Running the Project

The code can be compiled and executed using maven via commandline or latest java supported IDE.

Following line is used to compile the code (using command-line):

$ cd PostCode 
$ mvn clean install

To run the tests:

$ mvn test

To run the main program to read csv file and create respective valid/invalid files:

$ mvn exec:java

You would need to enter number '1' or '2' to perform the task

Note:

  • import_data.csv file needs to be in resources dir at (file needs to be untared):
$ src/main/resources/import_data.csv
or
$ src/test/resources/import_data.csv
  • sample data for test import_data.csv file:
row_id,postcode
905529,LE14 3QB
1064397,MK12 5EY
1995262,W6 8EX
803671,IP20 9DL
122334,XXX XXXX

postcode's People

Contributors

gshah9 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.