Additional Converter for Betterment

Jan 5, 2013 at 5:17 PM
Edited Jan 5, 2013 at 5:19 PM

Hello chris32,

If you're interested, added a converter to your project for betterment.com csv files.  The BettermentConverter files can be found here:

https://www.dropbox.com/sh/87swf18akmyii3z/0dyDeYR3Oq

I ran into an issue with the amount values using the "de" culture.  So I used 

Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName

 instead.

I also added a taskbar icon for the x:Class="YnabCsvConverter.MainWindow"

Icon="AppIcon48.png"

Finally adding a new dropdown option:

new ConverterListItem { Name = "Betterment", Converter = new BettermentConverter()},   

Thanks for putting out a great foundation to get this started.  Your interface, csv helpers, and coding was awesome.

Joel

Coordinator
Jan 6, 2013 at 11:13 AM

Hello Joel,

Nice to hear that you liked the tool. Thanks a lot for your contribution and feedback. 

I have already updated the source code.

The issue with application icon for the task bar is fixed. 

The culture topic is not so simple. I prefer to separate the culture of the source csv file from the application culture (current thread). Because if someone is running the OS with EN language, but with other date and currency format, the Betterment Converter will break, because of the $ sign in the amount.

So I changed your CurrentThread.CurrentCulture to use a "EN-US" culture and the easybank converter to a "DE" culture.

Look at this:

http://...../YnabCsvConverter.Core/Converters/Betterment/BettermentConverter.cs

What do you think about this?

I refactored the ReadRecords method and moved it to the BaseConverter. This makes all converters smaller and easier.

Your Sample.Betterment.csv does somehow not reflect exactly your Converter Implementation and the  YNAB csv file Sample.Betterment.ynab.csv.
I used your Converter Implementation as a reference and I also added some unit tests.

http://...../YnabCsvConverter.Core.Tests/Converters/BettermentTests.cs 

Please have a look at it, if this implementation is what you wanted.

After your feedback I will release a new Version 1.2.0 with the Betterment Converter.

Thank you for all your help!


Chris 

Jan 6, 2013 at 11:54 PM

Hi Chris,

Thanks for your response.  I'm sorry about the sample CSV files, the result of sloppiness on my part.  I've updated the files in the Dropbox link. 

The newly re-factored converter works great, I like the new ReadRecords and the fact it is in the BaseConverter using <T>.  I also like the idea of having the culture information tied to the converter as oppose to the environment as well.  Your arguments are sound and they are something that I didn't think about.

I not really a real programmer, I usually just work with SDKs, Consoles, and Windows Forms, so your willingness to let me contribute and have a small part in your project is much appreciated! 

Joel

 

Coordinator
Feb 3, 2013 at 11:25 AM
Hi Joel,

After some time I finished a new version, this also contains your "Betterment" converter.

Thank you very much for sharing your code.

BR,
Chris