Git Product home page Git Product logo

parser_test's Introduction

parser_test

About

I've created this is two broad sections. The index.php file which acts as a public interface to the application itself, and an Application folder which contains the main class for the csv writer. I've also added some tests. In the interests of sticking to the three hour time-limit, I haven't added a full suite of tests, but I wanted to show that I have some knowledge of TDD and PHP unit testing.

The script is run through the index.php file, and takes a single argument - the directory to scan for log files and will output a CSV with a date stamp to ensure that a historic record of runs is completed.

I wasn't sure, in the cotext of this test, what to do with the filtered tags, as I noted that you wanted to have a record kept of them. I do break them down into an array for processing, so I did consider adding an extra field to the csv that held the original tag string, although that would have been out of specification.

I've based this broadly on the idea that this would be a one-off operation, so everything is built upon a single class. Given more time, and had this been an operation that would have been worked into core functionality, I would have made provision for that by breaking up the code into smaller, more self-contained classes, to deal with the individual processes (directory scanning, csv writing, cli processing, etc) to create a more maintainable and extensible codebase.

parser_test's People

Watchers

James Cloos avatar James Filby 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.