[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] wxGlade - First Post :-)
From: |
richard terry |
Subject: |
Re: [Gnumed-devel] wxGlade - First Post :-) |
Date: |
Thu, 8 Aug 2002 00:03:28 +1000 |
User-agent: |
KMail/1.4.1 |
Good one David, see you can design things in wxPython!
A few comments on code styles. I cut my programming teeth on FORTH, a
brilliant little language. Like all langages it had the ability to be totally
ambiguous if you wanted it to be. e.g the forth term for emptying buffers was
simpy EB. I remember one of the extremely good authors on FORTH programming
style commenting that one should redefine this, ie:
:EB EMPTYBUFFERS;
And that one should be 'proud to type EMPTYBUFFERS. I guess what he was saying
that there is sufficient flexibility in these languages to keep your code
readable.
If you check out some (not all) of my modules, I often use quite long names
eg self.interactiontext_subheading insead of lbl1 or statictext1.
That way, when another user is reading your code they at least have some
chance of understanding it. I note many others don't do this, I'd encourage
everyone to try and write names for things so that they make sense in
english.
In your example self.button_S would become self.button_sendbugreport, or
self.btn_sendbugreport or self.btn_send_bug_report. Amongst programming
languages there seems to be a similarity in abbreviations eg:
txt insead of text (why would you bother)
btn instead of button
lbl instead of label
If I followed my own advice, which I sometimes don't I wouldn't use these
abbreviations I guess, but after years of doing so it's hard to break the
habit. At least if the overall thing conveys in english what it does you have
done ok.
Keep up the good work.
Regards
On Wednesday 07 August 2002 9:10 pm, you wrote:
> On Sun, 2002-08-04 at 19:38, Karsten Hilbert wrote:
> > This would be invoked if the user specifies --talkback on the
> > command line.
> >
> > That would be really helpful and maybe a more rewarding
> > learning experience ?
>
> Yeah, that was fun.
>
> I am open to comments on style and syntax. I gather I should have been
> more descriptive in my naming of text boxes and controls.
>
> David