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 9 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 2 of 2 — ← Prev page 1 [2]


#78138

Fromvek.m1234@gmail.com
Date2014-09-22 05:00 -0700
Message-ID<4e75613a-706a-4441-b94a-49dbedf3df28@googlegroups.com>
In reply to#78106
https://github.com/Veek/Python/blob/master/IRC/Hexchat/fake_ctcp.py
that's not too bad as far as readability is concerned and it's bereft of all comments {:p

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


#78141

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 22:23 +1000
Message-ID<mailman.14197.1411388582.18130.python-list@python.org>
In reply to#78138
On Mon, Sep 22, 2014 at 10:00 PM,  <vek.m1234@gmail.com> wrote:
> https://github.com/Veek/Python/blob/master/IRC/Hexchat/fake_ctcp.py
> that's not too bad as far as readability is concerned and it's bereft of all comments {:p

Sure, I can work out what it's doing without comments. Doesn't mean
comments are bad, though. Also, without comments, I have no idea *why*
it's doing what it does. For instance, this:

> def debug(msg):
>     hexchat.prnt('{}'.format(msg))

Why not just do this:
debug = hexchat.prnt

Or, better still, just use hexchat.prnt() everywhere, instead of
having a local name? (You happily use hexchat.* in other places.) Is
it meant to be monkey-patched externally? Is it meant to be a
one-place edit? What's the purpose of this one-line function?

> date = str(date_s) + ' ' + str(hour) + ':' + str(min) + ':' + str(sec)

You use .format() in places where it's completely unnecessary, but
eschew it when it would make your code more readable.

date = "%s %s:%s:%s" % (date_s, hour, min, sec)
date = "{} {}:{}:{}".format(date_s, hour, min, sec)

So, comments would definitely help. In some cases, would help a lot.

ChrisA

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


#78142

FromLarry Martell <larry.martell@gmail.com>
Date2014-09-22 09:02 -0400
Message-ID<mailman.14200.1411390970.18130.python-list@python.org>
In reply to#78138
On Mon, Sep 22, 2014 at 8:23 AM, Chris Angelico <rosuav@gmail.com> wrote:
> So, comments would definitely help. In some cases, would help a lot.

This is me:

http://xkcd.com/1421/

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


#78145

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 23:21 +1000
Message-ID<mailman.14201.1411392073.18130.python-list@python.org>
In reply to#78138
On Mon, Sep 22, 2014 at 11:02 PM, Larry Martell <larry.martell@gmail.com> wrote:
> On Mon, Sep 22, 2014 at 8:23 AM, Chris Angelico <rosuav@gmail.com> wrote:
>> So, comments would definitely help. In some cases, would help a lot.
>
> This is me:
>
> http://xkcd.com/1421/

Also me. I have apologized to my future selves on a number of
occasions. And of course, very VERY frequently, I have answered my
future selves' questions. That, I think, is the primary purpose of
code comments. It's a kind of limited-range time travel: I can travel
back in time, ask myself a question, and get an answer.

ChrisA

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


#78167

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-22 17:11 +0100
Message-ID<mailman.14222.1411405182.18130.python-list@python.org>
In reply to#78138
On 22/09/2014 13:00, vek.m1234@gmail.com wrote:
> https://github.com/Veek/Python/blob/master/IRC/Hexchat/fake_ctcp.py
> that's not too bad as far as readability is concerned and it's bereft of all comments {:p
>

Definitely googlegroups 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]


#78143

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-22 06:17 -0700
Message-ID<fe67cde2-89df-4972-ac1b-77f04fcbaf09@googlegroups.com>
In reply to#78106
Ok I'm confused. Do I need to do better comments? I know the text is not that great but that is my next obstacle I am going to tackle. I mostly need to know where I am going wrong such as what is expectable readable code and what is not and how to fix this. This is good feedback thanks to all of you guys. All I want to do is learn and become better and neater!

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


#78146

FromChris Angelico <rosuav@gmail.com>
Date2014-09-22 23:28 +1000
Message-ID<mailman.14202.1411392530.18130.python-list@python.org>
In reply to#78143
On Mon, Sep 22, 2014 at 11:17 PM, Nicholas Cannon
<nicholascannon1@gmail.com> wrote:
> Ok I'm confused. Do I need to do better comments? I know the text is not that great but that is my next obstacle I am going to tackle. I mostly need to know where I am going wrong such as what is expectable readable code and what is not and how to fix this. This is good feedback thanks to all of you guys. All I want to do is learn and become better and neater!
>

Your comments aren't terrible. Just imagine yourself reading this code
six months from now, having not touched it in between, and imagine all
the questions you'd ask yourself. Then answer them. Conversely, if
something would be patently obvious to your future self, don't bother
commenting it.

Have a read of some of the tips here. You may find them helpful.

http://www.catb.org/esr/faqs/hacker-howto.html

ChrisA

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


#78166

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-09-22 17:14 +0100
Message-ID<mailman.14221.1411405122.18130.python-list@python.org>
In reply to#78143
On 22/09/2014 14:17, Nicholas Cannon wrote:
> Ok I'm confused. Do I need to do better comments? I know the text is not that great but that is my next obstacle I am going to tackle. I mostly need to know where I am going wrong such as what is expectable readable code and what is not and how to fix this. This is good feedback thanks to all of you guys. All I want to do is learn and become better and neater!
>

So am I.  To whom are you replying and about what?  I'm not spending my 
time trying to find out just because you can't be bothered to use a 
decent tool when posting here.

-- 
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]


#78144

FromNicholas Cannon <nicholascannon1@gmail.com>
Date2014-09-22 06:19 -0700
Message-ID<d8bb0e7b-83b3-4d30-9136-28c79b65c686@googlegroups.com>
In reply to#78106
Also I have just been coding for about and hour and a half and added a lot more code to it but it is not fully finished yet so it is not on github yet.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

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


csiph-web