Giter VIP home page Giter VIP logo

transactionsorter's Introduction

TransactionSorter

#Project Background:

My girlfriend and I have a joint credit card. Each bill, we have to calculate who owes what. To do that, we used to go through the transactions one-by-one and add up which ones were just for her, which ones were just for me, and which ones were joint expenses. This app automates that.

##How to build:

The app can be built as follows:

  1. Get the source code from https://github.com/sgryzko/TransactionSorter.
  2. Choose the appropriate subfolder (ex. DesktopInterface), then open the Builds folder and choose your favorite IDE. If your IDE isn't shown, open the .jucer file using Projucer from JUCE.com to generate a new Builds subfolder and use that.
  3. Build the solution.

##How to get your transactions:

American Express allows exporting of transactions into a simple csv file. Assuming you're an Amex cardholder, this can be done as follows:

  1. Log in to "Cards - My Account" at americanexpress.co.uk.
  2. Go to Your Statement -> Export Statement Data.
  3. Choose CSV, choose your card, then choose the date period(s) you'd like to sort.
  4. Click Download Now.
  5. To make things easier for later, copy the path of the downloaded CSV file to the clipboard.

##How to sort your transactions:

Once you have built the project and downloaded your transactions, you're ready for sorting:

  1. Run the executable built using the How to build instructions.
  2. Follow the instructions on-screen, sorting your transactions one-by-one.
  3. Note the totals for each category.
  4. Pay your bill!

##How to test the code:

The business logic of the app can be tested as follows:

  1. Follow the instructions in the How to build section to build the UnitTests project.
  2. Run the executable that was built.
  3. View the test results in the console output. If any tests fail, an exception will be thrown.

##Future development:

For upcoming fixes and features, see github.

##Acknowledgements:

A big thank you to the following people for their feedback on my code!

transactionsorter's People

Contributors

sgryzko avatar

Watchers

James Cloos avatar  avatar

Forkers

rselk

transactionsorter's Issues

Add readme

high level overview of how to run the program, how to run the test etc. Also good place to mention if you have different compiler settings (IE a fast compile for testing, a longer and more optimized compile for production).

Multiple transactions are sorted if multiple characters are entered in command line interface

Steps to Reproduce

  1. Run CommandLineInterface.exe.
  2. Enter a valid CSV file path.
  3. Enter a single valid character such as 's'. As expected, the next transaction will be shown.
  4. Enter multiple valid characters such as 'ssssss'.

Expected Behaviour

Only the first character will be read. The others will be ignored. Maybe a warning message will appear.

Actual Behaviour

Due to the nature of std::cin, each character is interpreted as separate input for other unsorted transactions. This is quite unintuitive because the user isn't likely to know exactly which transactions are coming up next.

See screenshot.

Make it Cross-Platform

It would be really nice if I could make this cross-platform. That way, no matter where it's built and run it works properly. JUCE could help with this!

Get rid of dll-related compiler warnings

Lots of warnings for STL items in my dll interface. I should get rid of them.

For example:
Warning C4251 'CTransactionSorter::_transactions': class 'std::vectorstd::shared_ptr<CTransaction,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'CTransactionSorter' TransactionSorter c:\users\shane\documents\visual studio 2015\projects\transactionsorter\transactionsorter\transactionsorter.h 50

Support sorting credits

Sometimes the statement will include negative values (credits) such as payments to the card or refunds. For now I've removed these from my example file in order to simplify the UI but eventually it would be nice to have them back.

Allow user-specified categories

Currently the categories are hard-coded. It might be nice to allow the user to specify categories other than "Shane", "Carolyn", and "Joint".

Improve Test Instructions in readme?

It is possible to run the tests without Visual Studio. It would be nice if the readme reflected this.

http://stackoverflow.com/a/7746926/1704355

MSTest can be used without installing Visual Studio. You will need to install Visual Studio Test Agent, which is a free download from Microsoft: http://www.microsoft.com/download/en/details.aspx?id=1334.

I think this approach is better from a licensing perspective than manually copying MSTest.exe and its dependencies onto the build server.

See this blog for reference: http://blogs.msdn.com/b/anutthara/archive/2009/12/16/running-tests-in-mstest-without-installing-the-vs-ide.aspx

Remove code duplication

Currently I have two projects (the two UIs) that have copies of the core "WhoOwesWhat" module. Depending on how i fix this issue it could be three.

Instead of each project having their own copies of the modules they use I should have a higher-level JuceLibraryCode folder where the modules are copied to.

Read CSV Files

As a user, I want to be able to read a CSV file full of transactions

Incorporate JUCE

As a developer, I would like to use JUCE, especially the UI tools, in this app!

Use pointers more consistently

I think I only have one function that uses smart pointers. The rest just use raw pointers. I think my memory management is okay as is but I'm not 100% sure. It would be good to look through all the code to review my memory management.

Get rid of hard-coded CSV file

Currently a couple places in the code refer to a csv file in a particular folder on my C: drive. This needs to be removed in favor of a more flexible option.

email summary upon completion

As a user, instead of having to write down the results of sorting transactions, I would like an email to be sent (if there's an internet connection of course).

Save progress

As a user, if there are a lot of transactions to get through, I would like to be able to do them in stages. In other words, I'd like to sort some, close the app, then come back later and finish sorting them.

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.