Love to get some feedback on my first python app!!!
rosuav at gmail.com
Mon Sep 22 14:09:04 CEST 2014
On Mon, Sep 22, 2014 at 9:47 PM, <vek.m1234 at gmail.com> wrote:
> 1. It's feedback not a mathematical proof.
> 2. I hope the OP tries what I suggested - it's all entirely optional.
Doesn't change the fact that you need to justify your recommendations,
at least when they're not obvious. You're suggesting a number of
things which are definitely not the same as I'd recommend, and I can't
evaluate them because you haven't explained *why* you give that
> I have no idea what that program does because it's well commented. You aren't using variable and function names to good effect and are resorting to excessive comments.
Comments are not bad. His variable names aren't nearly as bad as you
imply. I can read the code *just fine*. Either you're exaggerating, or
you're trolling, or you're extremely dim. I'm not sure which.
> Additionally, I think you are mangling your display text but I'm not sure.
> textDisplay.insert should be a function that you pass args to.
> def spit_msg(text):
> spit_msg("go away doo doo bird")
> Any time you see repeated text in your program, wrap it in a single func and simplify.
Not every one-liner needs to be a function. Not all repeated text
needs to be wrapped up. You can always add another level of
indirection, and it's frequently not necessary.
> def create_root_window():
> rather than letting all your funny parts dangle around naked.
This seems incomplete. What's this try block for? What's the function
for? Will it be called from more than one place? If not, why wrap it
Again, you need to explain *why* something needs to be changed.
Telling someone "do this, this, this, and this" is almost completely
useless, because it doesn't teach any better programming practices -
in fact, it may teach a black-box programming style that's good only
for novices (like saying "always put 'from __future__ import
print_function' at the top of your Python files", which might be a
perfectly good thing to do, but at some point you need to explain
Also, you're posting on a mailing list and newsgroup. Please include
context in your posts so we know what you're talking about.
More information about the Python-list