Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ticker" is used both as id and name for the Stock #5

Open
alboteanud opened this issue Jul 30, 2019 · 0 comments
Open

"ticker" is used both as id and name for the Stock #5

alboteanud opened this issue Jul 30, 2019 · 0 comments

Comments

@alboteanud
Copy link

I had some confusions

data class StockPrice(
val ticker: String,
val price: Float,
val time: Date
)
"ticker" is to be used as a name for the stock.

abstract class BaseStockRepository : StockRepository {
override val allTickers: SortedSet = sortedSetOf(
"HSTK", "FBAS", "QIX", "GORF"... )
}
"allTickers" are to be used as ids

In my opinion, "ticker" could be renamed to "stockName" (in the model class).
Also "allTickers" could be renamed to "allStockIds". Other places also to be replaced with this names.

Overall, this repo and the video (droidcon NYC 2018) helped me a lot - it took like 2-3 days to me to get a grip on the code. I think this is a good pattern: a repo + a video.

I build an android app "GroupMap".

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant