6

Interesting start to what seems a very useful utility. Future improvements could include console calendar-style formatting for much easier reading, or a desktop or web UI. Your YYYY,MM,DD format is unusual. A slight adjustment to use hyphens instead of commas will bring it in line with ISO 8601 which will be more familiar, I think, to users. Or if you don't ...


4

modular: use if __name__ == "__main__" guard to execute code, to allow imports use functions to encapsulate the logic and prevent unnecessary globals use class(es) to encapsulate the state - use constants as globals or class variables - the whole # Starting variables block consider naming the file __main__.py and adding a setup.py thus after ...


2

General comments This code looks well-written and after playing with it a few times I feel I grok it. Initially it seemed counter-intuitive to use the constant for free to denote timeslots that were NOT open but the comments next to the constants make it clearer. The algorithm I haven't been able to come up with any simpler algorithm for determining the ...


1

Your SQL function would only covers 1-day holiday, how about multi-day holidays like Memorial Day, Thanksgiving ..etc.? To cover them, you will need to get the maximum total holidays in your company, and use that number to your query. For example, say your company's holidays are usually 1-3 days, and only one holiday that is 9-day holiday. Then, what you can ...


Only top voted, non community-wiki answers of a minimum length are eligible