GithubHelp home page GithubHelp logo

quod-ai-challenge-minhkhoa.hcmus-gmail.com's Introduction

HealthScoreCalculator

Dependencies

While developing project, I used some external libraries, include:

  • gson: used to convert object to json and from json to object.
  • org.json: used to parse json from gharchive.org to object.
  • sqlite: a simple database store data.

Compile and run

  • git clone https://github.com/ktncktnc/[email protected]
  • cd [email protected]
  • Check health score last hour: gradle run
  • Check health score in a range: gradle run --args="2021-11-12T00:00:00Z 2021-11-13T06:00:00Z"

Technical decisions

What frameworks/libraries did you use? What are the benefits of those libraries?

  • I choose gson and org.json because they simplify json handling and easy to use.
  • Sqlite is chosen to store, insert and get data easily. Moreover, it can run immediately without external installation.

How would you improve your code for performance?

  • At the first sight, I stored all the data in a hash map instead of a database. The program ran fastly if the data isn't too large.
  • When the data become larger, hash map became a bad choice and moreover, the data will be clean out when program is close. I decide to use gson library and convert all object to json and store each object in a file. Quickly, I realise that there are too many files (more than 100000).
  • I decide to use database last because I haven't developed any program in Java with sql database. At my last job, I store data using gson and an internal framework.
  • Using SQLite, it's easier to manage data. But I store all my data in a table, which makes program too slow to run even for one-hour data. To improve performance, I would like to redesign my database with reasonable data structure.
  • Google BigQuery is a great solution to improve speed because we mustn't download and unzip, parse data.

What code would you refactor for readability and maintainability?

  • To make my code readability and maintainability, I would like to split type of object (Event.Type, IssuePayload.Type,...) to a new folder. Moreover, I want to rearrange my class.

quod-ai-challenge-minhkhoa.hcmus-gmail.com's People

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.