w3st-io / trading-bot

Coinbase Trading Bot
0 stars 1 forks source link

"algo" function needs refactoring #4

Open jkahanec opened 4 years ago

jkahanec commented 4 years ago

https://github.com/aleem-ahmed/eccentric-trader/blob/0691dce6c969561bb316a21b45a4296e3b030437/client/Algo.js#L13

This function does too much, it needs to be split up. Try to stick to the paradigm that every function should have one job. It will make your code more re-usable, testable, and readable.

Also, 'algo' is a poor name for the function and doesn't really tell me anything. It's a loaded term and not a good choice for a function name. Following the advice above, this problem will most likely work itself out as long as you put in a little effort to name properly.

aleem-ahmed commented 4 years ago

i was thinking about this earlier today. i will work on it asap.