todo: - review readme tail to finish // answer 3 questions, gofmt - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * nope, set up a UnmarshalJSON to compare each unmarshalled float vs input and it looks K * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote * which is bombing because transaction implements fmt.Stringer * nope turned out that didnt matter though it was sketchy $ curl -sS https://assets.digits.com/uploads/hiring/swift-work-sample/transactions-aa.json | jq -c .[] | grep -A 1 -B 1 73.68.*Munday {"AgencyName":"OKLAHOMA STATE UNIVERSITY","AgencyNumber":"1000","Amount":"73.68","CardholderFirstInitial":"T","CardholderLastName":"Munday","Description":"3 KA 3206 1 9 EAC","MerchantCategory":"ELECTRICAL PARTS AND EQUIPMENT","PostedDate":"07/31/2013 12:00:00 AM","TransactionDate":"07/11/2013 12:00:00 AM","Vendor":"ANIXTER INC","YearMonth":"201307"} {"AgencyName":"OKLAHOMA STATE UNIVERSITY","AgencyNumber":"1000","Amount":"73.68","CardholderFirstInitial":"T","CardholderLastName":"Munday","Description":"3 KA 0324 EAC","MerchantCategory":"ELECTRICAL PARTS AND EQUIPMENT","PostedDate":"07/31/2013 12:00:00 AM","TransactionDate":"07/11/2013 12:00:00 AM","Vendor":"ANIXTER INC","YearMonth":"201307"} * I think the answer key wrongly deduped these similar but different description transactions scheduled: [] done: - todo: hello world ts: Sun Oct 15 10:41:52 MDT 2023 - todo: start ts: Sun Oct 15 10:41:54 MDT 2023 - todo: review readme tail to finish ts: Sun Oct 15 10:45:25 MDT 2023 - todo: read readme ts: Sun Oct 15 10:45:25 MDT 2023 - todo: review readme tail to finish // answer 3 questions ts: Sun Oct 15 10:45:52 MDT 2023 - todo: read readme subtasks: - quality > quantity as designed to not be finsihed - internet ok - pls `gofmt` // vimrc handles for me - todo: setting up subtasks: - go 1.13 // i have 1.21 - more in analyzer_test.go ts: Sun Oct 15 10:45:52 MDT 2023 - todo: start 3h timer ts: Sun Oct 15 10:46:19 MDT 2023 - todo: go 1.13 // i have 1.21 ts: Sun Oct 15 10:46:19 MDT 2023 - todo: more in analyzer_test.go ts: Sun Oct 15 10:47:33 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff ts: Sun Oct 15 10:49:10 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - TestFormatUSD - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:50:37 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - comment emphasizes localization, which is minimum `-xx.yyy,zz` - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:50:51 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - comment emphasizes localization, which is minimum `-xx.yyy,zz` - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:54:21 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - todo: comment emphasizes localization, which is minimum `-xx.yyy,zz` details: | BUT no indicator of what is "local". Could use system timezone/location stuff but that's weird. https://phrase.com/blog/posts/number-localization/ english => xxx,yyy.zz arabic => non-digits azerbaijan => xxx.yyy,zz hindi => ww,xx,yyy.zz - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:54:35 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - todo: comment emphasizes localization, which is minimum `-xx.yyy,zz` details: | BUT no indicator of what is "local". Could use system timezone/location stuff but that's weird. https://phrase.com/blog/posts/number-localization/ english => xxx,yyy.zz french => xxx yyy.zz arabic => non-digits azerbaijan => xxx.yyy,zz hindi => ww,xx,yyy.zz - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:57:33 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - todo: comment emphasizes localization, which is minimum `-xx.yyy,zz` details: | BUT no indicator of what is "local". Could use system timezone/location stuff but that's weird. https://phrase.com/blog/posts/number-localization/ english => xxx,yyy.zz french => xxx yyy.zz arabic => non-digits azerbaijan => xxx.yyy,zz hindi => ww,xx,yyy.zz https://dev.to/theodesp/a-step-by-step-guide-to-go-internationalization-i18n--localization-l10n-4ig2 solved problem? * golang.org/x/text p := message.NewPrinter(language.BritishEnglish) p.Printf("There are %v flowers in our garden.", 1500) language.Greek, language.BrazilianPortuguese language.Make("el"), language.Parse("en-UK") ja, _ := language.ParseBase("ja")
 jp, _ := language.ParseRegion("JP")
 jpLngTag, _ := language.Compose(ja, jp)
 fmt.Println(jpLngTag) // prints ja-JP * reminds me of language of like C_LANG env variable I've seen... * neato all under golang.org/x/text p := message.NewPrinter(language.English) p.Printf("%d", currency.Symbol(currency.USD.Amount(0.1))) fmt.Println() p.Printf("%d", currency.NarrowSymbol(currency.JPY.Amount(1.6))) fmt.Println() p.Printf("%d", currency.ISO.Kind(currency.Cash)(currency.EUR.Amount(12.255))) fmt.Println() - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 10:59:12 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - todo: comment emphasizes localization, which is minimum `-xx.yyy,zz` details: | BUT no indicator of what is "local". Could use system timezone/location stuff but that's weird. https://phrase.com/blog/posts/number-localization/ english => xxx,yyy.zz french => xxx yyy.zz arabic => non-digits azerbaijan => xxx.yyy,zz hindi => ww,xx,yyy.zz https://dev.to/theodesp/a-step-by-step-guide-to-go-internationalization-i18n--localization-l10n-4ig2 solved problem? * golang.org/x/text p := message.NewPrinter(language.BritishEnglish) p.Printf("There are %v flowers in our garden.", 1500) language.Greek, language.BrazilianPortuguese language.Make("el"), language.Parse("en-UK") ja, _ := language.ParseBase("ja")
 jp, _ := language.ParseRegion("JP")
 jpLngTag, _ := language.Compose(ja, jp)
 fmt.Println(jpLngTag) // prints ja-JP * reminds me of language of like C_LANG env variable I've seen... * neato all under golang.org/x/text p := message.NewPrinter(language.English) p.Printf("%d", currency.Symbol(currency.USD.Amount(0.1))) fmt.Println() p.Printf("%d", currency.NarrowSymbol(currency.JPY.Amount(1.6))) fmt.Println() p.Printf("%d", currency.ISO.Kind(currency.Cash)(currency.EUR.Amount(12.255))) fmt.Println() * $ env | grep =en LANG=en_US.UTF-8 so I can try $LANG.split(.)[0].split(_) or fallback to english because gotta have some default - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent ts: Sun Oct 15 11:10:53 MDT 2023 - todo: analyzer_test.go subtasks: - tdd because cicd because no qa or ops - fix failing `go test` - fix tests in order pro tip - analyzer_test.go is OK ts: Sun Oct 15 11:10:57 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - todo: TestFormatUSD subtasks: - TestFormatUSD/zero - TestFormatUSD/positive - TestFormatUSD/negative - TestFormatUSD/large - no implementation - naive `-$xx,yyy.zz` - todo: comment emphasizes localization, which is minimum `-xx.yyy,zz` details: | BUT no indicator of what is "local". Could use system timezone/location stuff but that's weird. https://phrase.com/blog/posts/number-localization/ english => xxx,yyy.zz french => xxx yyy.zz arabic => non-digits azerbaijan => xxx.yyy,zz hindi => ww,xx,yyy.zz https://dev.to/theodesp/a-step-by-step-guide-to-go-internationalization-i18n--localization-l10n-4ig2 solved problem? * golang.org/x/text p := message.NewPrinter(language.BritishEnglish) p.Printf("There are %v flowers in our garden.", 1500) language.Greek, language.BrazilianPortuguese language.Make("el"), language.Parse("en-UK") ja, _ := language.ParseBase("ja")
 jp, _ := language.ParseRegion("JP")
 jpLngTag, _ := language.Compose(ja, jp)
 fmt.Println(jpLngTag) // prints ja-JP * reminds me of language of like C_LANG env variable I've seen... * neato all under golang.org/x/text p := message.NewPrinter(language.English) p.Printf("%d", currency.Symbol(currency.USD.Amount(0.1))) fmt.Println() p.Printf("%d", currency.NarrowSymbol(currency.JPY.Amount(1.6))) fmt.Println() p.Printf("%d", currency.ISO.Kind(currency.Cash)(currency.EUR.Amount(12.255))) fmt.Println() * $ env | grep =en LANG=en_US.UTF-8 so I can try $LANG.split(.)[0].split(_) or fallback to english because gotta have some default - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... ts: Sun Oct 15 11:19:11 MDT 2023 - todo: go test subtasks: - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... ts: Sun Oct 15 11:19:20 MDT 2023 - todo: go test subtasks: - TestTransaction_String - TestTransaction_String/MCCOLLOMS_INC - TestTransaction_String/QUANTUM_ELECTRIC_INC - TestTransaction_String/MARRIOTT_33716_NEW_ORLEAN - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff ts: Sun Oct 15 11:24:28 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff ts: Sun Oct 15 11:24:56 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is ts: Sun Oct 15 11:27:47 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransctionsSum - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift ts: Sun Oct 15 11:36:45 MDT 2023 - todo: go test subtasks: - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift ts: Sun Oct 15 11:38:22 MDT 2023 - todo: go test subtasks: - TestAnalyzer_LargestTransaction - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? ts: Sun Oct 15 11:38:46 MDT 2023 - todo: go test subtasks: - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? ts: Sun Oct 15 11:40:52 MDT 2023 - todo: go test subtasks: - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm ts: Sun Oct 15 11:44:18 MDT 2023 - todo: go test subtasks: - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) to compare each input with each existing entry - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear ts: Sun Oct 15 11:49:32 MDT 2023 - todo: go test subtasks: - TestAnalyzer_DuplicatesExcluded - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe ts: Sun Oct 15 11:49:59 MDT 2023 - todo: go test subtasks: - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe ts: Sun Oct 15 11:52:22 MDT 2023 - todo: go test subtasks: - TestAnalyzer_GroupByCategory - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. ts: Sun Oct 15 11:52:25 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. ts: Sun Oct 15 11:55:59 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum ts: Sun Oct 15 11:57:55 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:BigSpenderReport I ASSUME is spend-specific--the previous implementation of largestTransaction incldues refunds and should be ignored ts: Sun Oct 15 12:04:58 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:BigSpenderReport I ASSUME is spend-specific--the previous implementation of largestTransaction incldues refunds and should be ignored - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) ts: Sun Oct 15 12:16:17 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:BigSpenderReport I ASSUME is spend-specific--the previous implementation of largestTransaction incldues refunds and should be ignored - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders ts: Sun Oct 15 12:33:30 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:BigSpenderReport I found is NOT spend-specific - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders ts: Sun Oct 15 12:54:47 MDT 2023 - todo: go test subtasks: - TestAnalyzer_BigSpendersReport - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders ts: Sun Oct 15 12:54:50 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders ts: Sun Oct 15 13:03:33 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs retries - transactions.go:TransactionsFromURLs needs streaming json parsing ts: Sun Oct 15 13:05:33 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing ts: Sun Oct 15 13:07:12 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs asserts dedupe occurs but Transactions hasnt had that business logic yet. It wasnt required as part of newAnalyzer but perhaps that was implied? going to assume. ts: Sun Oct 15 13:08:11 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs asserts dedupe occurs but Transactions hasnt had that business logic yet. It wasnt required as part of newAnalyzer but perhaps that was implied? going to assume. nvm test calls analyzer.Add which should be deduping ts: Sun Oct 15 13:10:14 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs curl+jq reveals 983 unique transactions. My code yields 1000 and test asserts 980. My equality must be broken and test's must be flexible. ts: Sun Oct 15 13:12:56 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs curl+jq reveals 983 unique transactions. My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. ts: Sun Oct 15 13:14:15 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs curl+jq reveals 983 unique transactions. My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. May be float problems, may be time zones... ts: Sun Oct 15 13:14:58 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs curl+jq reveals 983 unique transactions. My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. May be float problems, may be time zones... or casing... ts: Sun Oct 15 13:15:37 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - transactions.go:TransactionsFromURLs curl+jq reveals 983 unique transactions. My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. May be float problems, may be time zones... or casing... strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) ts: Sun Oct 15 13:17:09 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote ts: Sun Oct 15 13:22:59 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote * which is bombing because transaction implements fmt.Stringer ts: Sun Oct 15 13:23:25 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote * which is bombing because transaction implements fmt.Stringer * nope turned out that didnt matter though it was sketchy ts: Sun Oct 15 13:30:53 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * nope, set up a UnmarshalJSON to compare each unmarshalled float vs input and it looks K * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote * which is bombing because transaction implements fmt.Stringer * nope turned out that didnt matter though it was sketchy ts: Sun Oct 15 13:42:02 MDT 2023 - todo: go test subtasks: - TestAnalyzer_TransactionsFromURLs - TestAnalyzer_TransactionsFromURLsConcurrent - amount.go:Rounded probably does NOT handle float precision well... it is float64 tho... - my `go mod tidy` actually cleared `go.mod` file, probably weird localhost backwards compatilble stuff - transaction.go:Transaction:String not clear if FormatUSD or amount currency should not be changed, or even what currency Amount is - transaction.go:Transaction:Sum again doesnt care about Amount currency or vendor/vendee drift - analyzer.go:Analyzer:LargestTransaction doesn't specify how to break ties; stable or latest? - analyzer.go:Analyzer:Add should dedupe transactions added, but transactions.go:FromFile will load duplicate transactions from json file so hmmmm - todo: analyzer.go:Analzyer:Add dedupes each transaction, which is O(n**2) details: | * BUT there's no indicator whether order of the array matters, so it's unsafe for me to sort/heapify that stuff * OR I can store a second copy of all entries in a map, but that risks drift syncing the two * SO I could create a UniqueTransactions struct { transactions []Transaction dedupes map[Transaction]struct{} } but that's just doubling RAM usage in a thing that sounds like it could scale infinitely over time SO I could do a [hash(Transaction)][]*Transaction and compare just a subset. Because it's in RAM and computed live, the hash cardinality could be changed on any release <------------------ if I have time, do this - analyzer.go:Analyzer:Add dedupes but what is a duplicate transaction? Transactions can be pending and then later disappear to have their date updated OR be like pre-charges on credit cards that later disappear - analyzer.go:Analyzer:Add is not concurrency-safe - analyzer.go:Analyzer:ByCategory probably allocates big slices out the gate and expends to way-too-big-slices by end time. Could do 2 passes (still O(n)) to pre-compute each category's size. Makes code look weird, though. Hm. - analyzer.go:Analyzer:Largest should be an anz.transactions.Max() to match Sum - analyzer.go:Analyzer:Count should be an anz.transactions.Len() to match Sum - analyzer.go:Analyzer:tranasctionsMean I ASSUME arithmetic mean (sum/count), but could be another mean not specified (ie geometric) - analyzer.go:Analyzer:BigSpendersReport assumes no overlapping FirstInitial LastName cardholders - transactions.go:TransactionsFromURLs needs streaming json parsing - todo: transactions.go:TransactionsFromURLs count details: | * curl+jq reveals 983 unique transactions. * My code yields 1000 and test asserts 980 (added to localfile of 188). My equality must be broken and test's must be flexible. curl+jq on file and remote confirm * it's 1171 transactions. Equaility must not be waht I expect. Gotta look at individual transactions to find what is specified that doesnt match. * May be float problems, * nope, set up a UnmarshalJSON to compare each unmarshalled float vs input and it looks K * may be time zones... * or casing... * strings.ToLower(fmt.Sprint(trn)) == strings.ToLower(fmt.Sprint(other)) deduped some file-based transactions but still yielded all 1000 from remote * which is bombing because transaction implements fmt.Stringer * nope turned out that didnt matter though it was sketchy $ curl -sS https://assets.digits.com/uploads/hiring/swift-work-sample/transactions-aa.json | jq -c .[] | grep -A 1 -B 1 73.68.*Munday {"AgencyName":"OKLAHOMA STATE UNIVERSITY","AgencyNumber":"1000","Amount":"73.68","CardholderFirstInitial":"T","CardholderLastName":"Munday","Description":"3 KA 3206 1 9 EAC","MerchantCategory":"ELECTRICAL PARTS AND EQUIPMENT","PostedDate":"07/31/2013 12:00:00 AM","TransactionDate":"07/11/2013 12:00:00 AM","Vendor":"ANIXTER INC","YearMonth":"201307"} {"AgencyName":"OKLAHOMA STATE UNIVERSITY","AgencyNumber":"1000","Amount":"73.68","CardholderFirstInitial":"T","CardholderLastName":"Munday","Description":"3 KA 0324 EAC","MerchantCategory":"ELECTRICAL PARTS AND EQUIPMENT","PostedDate":"07/31/2013 12:00:00 AM","TransactionDate":"07/11/2013 12:00:00 AM","Vendor":"ANIXTER INC","YearMonth":"201307"} * I think the answer key wrongly deduped these similar but different description transactions ts: Sun Oct 15 13:48:03 MDT 2023