This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Preface: This isn't my primary role where I work but it does take a lot of my time where allowed.
This is some older code(written by myself) that I'm entirely unhappy with. Beside the lack of comments, I'm disappointed with it's complexity. it's pulling data from a lot of places and doing calculations that I think should be handle in separate classes. I think for example, that there should be a class for getting data from the databases and return a standard output regardless of whether we return 1 or more users(a dict or tuple)
I've honestly never had my Python code reviewed by anyone else as I'm completely self taught and where I work I have a lot of freedom an autonomy in terms of development.
I'd appreciate any feedback ranging from the class structure and anything I should be using from the Python and Django libraries.
Models CRMData = CRM log data, contains basic header information TeamMember = My add on class to django users TbldataAgentperformancebyperiod, TbldataAgentevents, TbldataAgentbydevice = Tables from an external commercial application where I have little control over the data, these tables all share similar data but in these cases have info I need that the others don't. Additionally, all data in these tables is broken into 15 minute intervals ranging from 0-96 to represent the time of the day.
There's quite a lot I'm not happy with across the entire project which spans many apps including this one but being one of the more substantial pieces of logic any feedback would be appreciated.
If you need any clarification on the code or any of the imports let me know. I'm pretty tired right now so hopefully this post makes sense.
Subreddit
Post Details
- Posted
- 9 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/codereview/...