Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78106 > unrolled thread

Love to get some feedback on my first python app!!!

Started byNicholas Cannon <nicholascannon1@gmail.com>
First post2014-09-20 06:16 -0700
Last post2014-09-22 06:19 -0700
Articles 20 on this page of 29 — 6 participants

Back to article view | Back to comp.lang.python


Contents

  Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 06:16 -0700
    Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-21 00:58 +1000
    Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-20 16:30 +0100
    Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 18:33 -0700
      Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-21 11:48 +1000
    Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-20 20:44 -0700
    Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-21 01:53 -0700
      Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 02:00 -0700
        Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 19:23 +1000
          Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 04:47 -0700
            Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 22:09 +1000
              Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 06:35 -0700
                Re: Love to get some feedback on my first python app!!! C Smith <illusiontechniques@gmail.com> - 2014-09-22 06:48 -0700
                  Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 08:12 -0700
                Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:57 +1000
                Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:17 +0100
                Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:17 +0100
                Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 02:58 +1000
            Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:10 +0100
            Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 02:26 +1000
    Re: Love to get some feedback on my first python app!!! vek.m1234@gmail.com - 2014-09-22 05:00 -0700
      Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 22:23 +1000
      Re: Love to get some feedback on my first python app!!! Larry Martell <larry.martell@gmail.com> - 2014-09-22 09:02 -0400
      Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:21 +1000
      Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:11 +0100
    Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-22 06:17 -0700
      Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-22 23:28 +1000
      Re: Love to get some feedback on my first python app!!! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-22 17:14 +0100
    Re: Love to get some feedback on my first python app!!! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-09-22 06:19 -0700

Page 1 of 2  [1] 2  Next page →


#78106 — Love to get some feedback on my first python app!!!

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-20 06:16 -0700
SubjectLove to get some feedback on my first python app!!!
Message-ID<42e68de9-7528-46fc-8c74-c0baa1d6199e@googlegroups.com>
I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so keep that in mind. I don't think it is the best program but is a good product of 3 months of python.

link: https://github.com/nicodasiko/Article-Grab 

[toc] | [next] | [standalone]


#78109

FromChris Angelico <rosuav@gmail.com>
Date2014-09-21 00:58 +1000
Message-ID<mailman.14171.1411225133.18130.python-list@python.org>
In reply to#78106
On Sat, Sep 20, 2014 at 11:16 PM, Nicholas Cannon
<nicholascannon1@gmail.com> wrote:
> I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so keep that in mind. I don't think it is the best program but is a good product of 3 months of python.
>
> link: https://github.com/nicodasiko/Article-Grab

Sure! But first, a couple of points that aren't specifically Python...

Firstly, you're using Google Groups. Until someone gets inside Google
and fixes up the code, it will make a mess of every post made through
it. Please use something better... either subscribe to the mailing
list and do everything through email, or access the newsgroup
comp.lang.python via a better client, or something of the sort.

Secondly, a note about verb tenses in English. You have this commit
message on the (as of 20140921) latest commit:

"""Fixed some bugs and did some GUI changes"""

And these comments in the code:

    #search API
    rawData = urllib.urlopen('http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q='+encodedQuery).read()
    #loads data from API into json
    jsonData = json.loads(rawData)
    #extracts the results from API
    searchResults = jsonData['responseData']['results']

The more normal way to write these would be in present tense, in a
more imperative style: "Fix some bugs", "Load data", "Extract
results". (Although these comments are actually quite redundant - all
they do is tell you what the single next line of code does.) You may
also notice that the camelCase variable names you're using are in
stark contrast to the rest of the language. It's normal to use
lower_case_with_underscores instead.

Now, let's have a look at the code itself.

    query = queryVar.get()
... and further down ...

global queryVar
queryVar = StringVar()

You don't need to say "global" at top level. Everything at top-level
is global. However, I generally like to, as much as possible, define
things higher in the file than their usages - so that as you read the
file, the first reference to anything is the one that tells you what
it is. That may not be practical here, but it's something to keep in
mind. (This is why import statements generally go at the top of the
file, for instance.) The language doesn't require it, but it does make
the code easier for a human to read.

    links = []
    for result in searchResults:
        #loops through the searchResults data to find the title and
URL of the pages
        #and then add the links to the links list
        title = result['title']
        link = result['url']
        links.append(link)
    print links

You're not doing anything with the title, so what you have here is a
loop that builds up a list from empty, by repeated appends. That's a
perfect job  for a list comprehension:

    links = [result['url'] for result in searchResults]

I'm not sure why you print the links to stdout there - is that some
left-over debugging code?

Although, the only thing you do with the list of URLs is to iterate
over it, once. You could simply merge the two loops into one:

    for result in searchResults:
        url = result['url']
        pageData = urllib.urlopen(url).read()
        ... etc ...

Your text insertion is a little inconsistent: you put the URL and
title at the cursor position, then the body at the end. Is that
intentional? If so, that deserves a comment - which would be much more
useful than the comments that say what we can read in the code
already.

textDisplay.insert(INSERT, 'This spider searches for information on
your query and will display it here!')

You haven't written a spider here :) You're just calling on Google's
spider and showing some information. Similarly, the verb "CRAWL" on
your button isn't really accurate - and isn't particularly helpful to
the user either. I'd just word it in terms of how the user will value
it, and say "Search" on the button. Keep it simple.

queryWidgit = Entry(frame, textvariable=queryVar, fg='Blue', bd=5, width=50)

It's normally "Widget", not "Widgit". Not significant, but you seem to
have consistently used two i's, including in your comments.

Well, you asked for feedback. That's normally going to consist of
people pointing out where they think you did badly. But ultimately,
this is all relatively minor, so if the program works, consider
yourself to have broadly succeeded.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78110

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-20 16:30 +0100
Message-ID<mailman.14172.1411227079.18130.python-list@python.org>
In reply to#78106
On 20/09/2014 15:58, Chris Angelico wrote:
> On Sat, Sep 20, 2014 at 11:16 PM, Nicholas Cannon
> <nicholascannon1@gmail.com> wrote:
>
> You may
> also notice that the camelCase variable names you're using are in
> stark contrast to the rest of the language. It's normal to use
> lower_case_with_underscores instead.

That may be the PEP 8 guideline but I don't regard it as normal, I find 
camelCase far easier to read.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#78113

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-20 18:33 -0700
Message-ID<c6eb04d7-5ba4-422b-bcfd-54fbab401a25@googlegroups.com>
In reply to#78106
On Saturday, September 20, 2014 9:17:27 PM UTC+8, Nicholas Cannon wrote:
> I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so keep that in mind. I don't think it is the best program but is a good product of 3 months of python.
> 
> 
> 
> link: https://github.com/nicodasiko/Article-Grab

Yeah this is exactly what I was looking for I know the comments are horrible and I had no idea about the camelCase stuff. Should I use 
'''
Use this commenting on my functions or not. I think they are called docStrings or something
'''
I have a free day today and I am going to fix up some GUI stuff and try and slim down the processing and amount of variables because it doesnt really run as fast. Thanks for the help Chris Angelico!

[toc] | [prev] | [next] | [standalone]


#78114

FromChris Angelico <rosuav@gmail.com>
Date2014-09-21 11:48 +1000
Message-ID<mailman.14174.1411264101.18130.python-list@python.org>
In reply to#78113
On Sun, Sep 21, 2014 at 11:33 AM, Nicholas Cannon
<nicholascannon1@gmail.com> wrote:
> Yeah this is exactly what I was looking for I know the comments are horrible and I had no idea about the camelCase stuff. Should I use
> '''
> Use this commenting on my functions or not. I think they are called docStrings or something
> '''

Yes, they're called docstrings (without the capital S - again, Python
doesn't tend to work that way). You can find info and advice all over
the web about how to write good, useful docstrings.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78116

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-20 20:44 -0700
Message-ID<ff970511-5903-4cc2-9106-234569747aae@googlegroups.com>
In reply to#78106
I have just committed a new main.py file on github. I added alot more comments and slimmed down the getinfo() function. 

[toc] | [prev] | [next] | [standalone]


#78117

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-21 01:53 -0700
Message-ID<f6b164d3-9a86-4487-ad71-35773353b3e2@googlegroups.com>
In reply to#78106
On Saturday, September 20, 2014 9:17:27 PM UTC+8, Nicholas Cannon wrote:
> I have created my first python program and I have learnt a lot about python from this group and wanted some feedback. I am still improving it and trying to tackle some performance and GUI stuff so keep that in mind. I don't think it is the best program but is a good product of 3 months of python.
> 
> 
> 
> link: https://github.com/nicodasiko/Article-Grab

I just updated the whole app to include a scroll bar, loading bar and I used multi threading to update the scroll bar whilst scraping the data from the web. I need to work on performance though but I have defiantly improved it now!

[toc] | [prev] | [next] | [standalone]


#78129

Fromvek.m1234@gmail.com
Date2014-09-22 02:00 -0700
Message-ID<9bed8e07-9e22-4131-92e8-f950cb5c0d18@googlegroups.com>
In reply to#78117
One thing I noticed with that code was the size of your function, and excessive comments. It reminds me of my bubble_sort.c program in school/college - everything plonked into 'main'.

Try writing it like this:

1. #!/usr/bin/python or #!/usr/bin/env python

The leading #! is read by the kernel when it has to start the interpreter (exec), so don't stick your comment in there.

2. Try to align the imports so they look pretty

3. Don't use whacking big functions and then stick endless explanatory comments
Use the function name as a comment instead - divide your program up into little tasks. Try to make the stuff generic - def url_extract(content, pattern): 

def extract_url

def extract_title

def tk_init

Use
#-------------------------------------------------------------------
to demarcate sections, very common functions go into a utility-library,
not so common functions at the section at start of the file, and so on..

4. Don't skimp on the sys.exit() or def debug (which should be in your utilities lib)

5. Don't do :x = foo('.................................')
instead:
var_name = '..........................' # make it global
x = foo(var_name)

6. To build a string do:

param1 = xyz1 + xyz2
x = foo(param1)

[toc] | [prev] | [next] | [standalone]


#78131

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 19:23 +1000
Message-ID<mailman.14187.1411377804.18130.python-list@python.org>
In reply to#78129
On Mon, Sep 22, 2014 at 7:00 PM,  <vek.m1234@gmail.com> wrote:
> One thing I noticed with that code was the size of your function, and excessive comments. It reminds me of my bubble_sort.c program in school/college - everything plonked into 'main'.
>
> Try writing it like this:

I'd like to see justifications for some of the advice you're giving
here. Quite a bit of it I disagree with :)

> 1. #!/usr/bin/python or #!/usr/bin/env python
>
> The leading #! is read by the kernel when it has to start the interpreter (exec), so don't stick your comment in there.

Very much optional. Even on Unix systems, it's not necessary unless
you want it to be executable.

> 2. Try to align the imports so they look pretty

You mean adding extra spaces? Not advised. Or something else?
Definitely needs more explanation (maybe an example) and justification
(why do it?).

> 3. Don't use whacking big functions and then stick endless explanatory comments
> Use the function name as a comment instead - divide your program up into little tasks. Try to make the stuff generic - def url_extract(content, pattern):
>
> def extract_url
>
> def extract_title
>
> def tk_init
>
> Use
> #-------------------------------------------------------------------
> to demarcate sections, very common functions go into a utility-library,
> not so common functions at the section at start of the file, and so on..

If functions are defined and then called from exactly one place,
there's no need to put them anywhere else. Just inline them. It's not
as if the indentation is getting out of hand here - getinfo() tops out
at just three tabs in, which is nothing. I've gone to seven a number
of times, and there's one particular piece of code I have that goes as
far as nine - though that's not something I'd recommend! Different
people will put the limit at different points, but three is never
going to be excessive. (Cue someone pointing out to me a situation in
which three really is excessive, but sure, that'll be a fun spin-off
thread.)

> 4. Don't skimp on the sys.exit() or def debug (which should be in your utilities lib)

More explanation needed, please. What are you trying to do here? What
would be different?

> 5. Don't do :x = foo('.................................')
> instead:
> var_name = '..........................' # make it global
> x = foo(var_name)

Uhhh, why??!?

> 6. To build a string do:
>
> param1 = xyz1 + xyz2
> x = foo(param1)

Ditto. Why?!?

ChrisA

[toc] | [prev] | [next] | [standalone]


#78136

Fromvek.m1234@gmail.com
Date2014-09-22 04:47 -0700
Message-ID<da461783-6fbb-464c-be69-104a8d35c58e@googlegroups.com>
In reply to#78131
1. It's feedback not a mathematical proof.
2. I hope the OP tries what I suggested - it's all entirely optional.

@OP
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.

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):
    textDisplay.insert(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.

try: 
def create_root_window():
 rather than letting all your funny parts dangle around naked.

[toc] | [prev] | [next] | [standalone]


#78139

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 22:09 +1000
Message-ID<mailman.14195.1411387747.18130.python-list@python.org>
In reply to#78136
On Mon, Sep 22, 2014 at 9:47 PM,  <vek.m1234@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
advice.

> @OP
> 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):
>     textDisplay.insert(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.

> try:
> 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
up?

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
why).

Also, you're posting on a mailing list and newsgroup. Please include
context in your posts so we know what you're talking about.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78147

Fromvek.m1234@gmail.com
Date2014-09-22 06:35 -0700
Message-ID<f1ebac4b-67ea-4066-953c-4c61508ad6f4@googlegroups.com>
In reply to#78139
@Chris, Hi, I don't like your style of posting - please kill file me.

@Everybody else - I don't like Chris and his style of posting (overuse of the 'troll' word and perceived aggression). I shall be ignoring him for a year (barring an emergency). Good communication demands that I announce this. Please don't misconstrue this as rudeness on my part. If you feel that he is asking something of pertinence, feel free to include it in your posts for a reply.

[toc] | [prev] | [next] | [standalone]


#78148

FromC Smith <illusiontechniques@gmail.com>
Date2014-09-22 06:48 -0700
Message-ID<mailman.14203.1411393763.18130.python-list@python.org>
In reply to#78147
I wouldn't take it personally, just defend your position. I think that
is what he is looking for. We are all adults here (maybe?). You guys
should be able to work it out. A tangential skill to programming is
being able to give and take criticism well, even if you think it
crosses the line.

On Mon, Sep 22, 2014 at 6:35 AM,  <vek.m1234@gmail.com> wrote:
> @Chris, Hi, I don't like your style of posting - please kill file me.
>
> @Everybody else - I don't like Chris and his style of posting (overuse of the 'troll' word and perceived aggression). I shall be ignoring him for a year (barring an emergency). Good communication demands that I announce this. Please don't misconstrue this as rudeness on my part. If you feel that he is asking something of pertinence, feel free to include it in your posts for a reply.
> --
> https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#78155

Fromvek.m1234@gmail.com
Date2014-09-22 08:12 -0700
Message-ID<cae85725-86f5-4d3a-a211-1d968ff14982@googlegroups.com>
In reply to#78148
@CSmith
Hi, I'm sorry, I wish I could acquiesce but I think it's better for me to stay clear. There's criticism, and there's name calling ('dim' 'troll').

Reiterating what I said earlier, if the OP wants clarification he can ask for it.

[toc] | [prev] | [next] | [standalone]


#78149

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 23:57 +1000
Message-ID<mailman.14204.1411394262.18130.python-list@python.org>
In reply to#78147
On Mon, Sep 22, 2014 at 11:48 PM, C Smith <illusiontechniques@gmail.com> wrote:
> I wouldn't take it personally, just defend your position. I think that
> is what he is looking for. We are all adults here (maybe?). You guys
> should be able to work it out. A tangential skill to programming is
> being able to give and take criticism well, even if you think it
> crosses the line.

Precisely. Asking for justification isn't meant to imply that there is
none. But it's like back in my high school maths lessons: if you don't
show your working, there's no way to discuss the details, and if the
conclusion is wrong (or in this case, is disagreed with), you can't do
anything with it. With the intermediate steps given, we can discuss,
explain, and maybe find that we mostly agree.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78162

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-22 17:17 +0100
Message-ID<mailman.14218.1411404831.18130.python-list@python.org>
In reply to#78147
On 22/09/2014 14:35, vek.m1234@gmail.com wrote:
> @Chris, Hi, I don't like your style of posting - please kill file me.
>
> @Everybody else - I don't like Chris and his style of posting (overuse of the 'troll' word and perceived aggression). I shall be ignoring him for a year (barring an emergency). Good communication demands that I announce this. Please don't misconstrue this as rudeness on my part. If you feel that he is asking something of pertinence, feel free to include it in your posts for a reply.
>

Laughable as you never give any context.  Please equip yourself with a 
decent tool, there are plenty to choose from.

And ignore Chris at your peril, he knows a fair bit about Python.  Sure 
he gets things wrong, but the only person who never gets things wrong is 
the person who never does anything.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#78163

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-22 17:17 +0100
Message-ID<mailman.14219.1411404932.18130.python-list@python.org>
In reply to#78147
On 22/09/2014 14:48, C Smith wrote:
> I wouldn't take it personally, just defend your position. I think that
> is what he is looking for. We are all adults here (maybe?). You guys
> should be able to work it out. A tangential skill to programming is
> being able to give and take criticism well, even if you think it
> crosses the line.
>
> On Mon, Sep 22, 2014 at 6:35 AM,  <vek.m1234@gmail.com> wrote:
>> @Chris, Hi, I don't like your style of posting - please kill file me.
>>
>> @Everybody else - I don't like Chris and his style of posting (overuse of the 'troll' word and perceived aggression). I shall be ignoring him for a year (barring an emergency). Good communication demands that I announce this. Please don't misconstrue this as rudeness on my part. If you feel that he is asking something of pertinence, feel free to include it in your posts for a reply.
>> --
>> https://mail.python.org/mailman/listinfo/python-list

Hells bells if it's not googlegroups it's top posting.  What did I do in 
a past life to deserve this?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#78165

FromChris Angelico <rosuav@gmail.com>
Date2014-09-23 02:58 +1000
Message-ID<mailman.14220.1411405094.18130.python-list@python.org>
In reply to#78147
On Tue, Sep 23, 2014 at 2:17 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> And ignore Chris at your peril, he knows a fair bit about Python.  Sure he
> gets things wrong, but the only person who never gets things wrong is the
> person who never does anything.

Thanks :)

I don't mind being wrong, or being told I'm wrong. Those are some of
the best threads we've ever had - lengthy debates by intelligent
people who start out with different views, figuring out exactly what
the differences are and why there are those differences. Those are the
threads that differentiate c.l.p/python-list from Facebook - there's
solid content, serious discussion, and stuff that's worth going back
to.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78159

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-22 17:10 +0100
Message-ID<mailman.14216.1411402454.18130.python-list@python.org>
In reply to#78136
On 22/09/2014 12:47, vek.m1234@gmail.com wrote:
> 1. It's feedback not a mathematical proof.

What is?

> 2. I hope the OP tries what I suggested - it's all entirely optional.

Which is?

>
> @OP
> 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.
>
> 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):
>      textDisplay.insert(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.
>
> try:
> def create_root_window():
>   rather than letting all your funny parts dangle around naked.
>

Google groups rides again?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#78161

FromChris Angelico <rosuav@gmail.com>
Date2014-09-23 02:26 +1000
Message-ID<mailman.14217.1411403203.18130.python-list@python.org>
In reply to#78136
On Tue, Sep 23, 2014 at 2:10 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> Google groups rides again?

Yeah. And now someone from Google Groups has killfiled me. So it's up
to you to request/recommend alternatives, s/he won't see me saying so.

ChrisA

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.python


csiph-web