

How does my Python code look? - marclave
https://github.com/marclave/Jasper-Google-Calendar/blob/master/Calendar.py

======
dozzie
1\. badly indented monthDict content (and not only because the four spaces in
place of a tab; ending brace should occur in a separate line, if you format
like this)

2\. trailing whitespaces in many lines (including, but not limited to, empty
lines with whitespaces)

3\. too long lines

4\. bad command line arguments processing (should be optparse or argparse)

5\. bad operation separation (addEvent() being the first example -- too
complex, too many things being done on the same level)

6\. string formatting done badly (you should use printf-like formatting
instead of string concatenation)

7\. code duplication (getEventsToday() vs. getEventsTomorrow())

~~~
marclave
Thanks for the feedback, i wrote this a month ago over a weekend and looking
back now i could have done a lot of things differently..

------
nocturnalgeek
It's not about how it looks, it's about what and how fast it does!

~~~
marclave
Its for an open-source project called Jasper, a voice controlled platform
built on the raspberry pi. It allows you to check your google calendar for
events and allows you to add an event to your calendar!

