[Tutor] Is there an easy way to center the root window (Tkinter) within the display?

Dave Angel davea at davea.name
Thu Nov 27 20:26:38 CET 2014

On 11/27/2014 11:39 AM, boB Stepp wrote:
> On Thu, Nov 27, 2014 at 9:58 AM, Steven D'Aprano <steve at pearwood.info> wrote:

>> No offense intended Bob, but this scares me. I know you're trying your
>> best, but "weak programming knowledge" and "radiation therapy" is not a
>> healthy combination.
> Believe me, I think about this constantly!

I would as well.  I have been in many environments in which code 
development is less than professional, and if lives could be at stake, 
I'd evaluate the environment most carefully.

You say you're using some 3rd party package to do the heavy lifting. 
But you also say there could be as many as 1000 servers involved.  So 
the scale of things is quite large.  If it's not impertinent, I'd ask a 
number of questions about both your own development environment and that 
of the 3rd party product that runs on all those servers.

Does that package include any hooks for automating?  Do they expect you 
to run 1000 queries individually, or do they provide some way for you to 
automate them?  Are they open to requests for improving their software, 
or for validating your own front ends?

For both your organization and theirs:

Are you using source control?  That's more than version control, but the 
latter would be a start.

Do you have a formal testing environment, including a means for running 
these tests frequently and systematically.  I don't mean hand testing, I 
mean something that exercises every aspect as thoroughly as one can 
figure out, and checks that all expectations are being met.

Do you have a backup strategy, both for code and for data?

Do you have strict security policies, and someone to review whether each 
software change conforms to them?  And whether each system is restricted 
as to what software it can run, and what access can be made from outside?

Have you planned for fault tolerance, such as when there are supposed to 
be 1000 servers, but only 997 of them are alive right now?

These things and many others you cannot get from a book, at least none 
that I've ever seen.  You need someone with experience, responsibility, 
and authority to make it happen.

Or you need a lot of luck.

One thing I'd do to enhance your luck is to make sure you don't overstep 
your own capabilities.  First thing I'd do is to drop the GUI. 
Generally people trust something which is clearly complex, and has a 
pretty interface.  So don't add that interface until everything under it 
is rock solid.

I've seen people trust spreadsheets when they showed thousands of 
figures, and gave "results" at the bottom.  Even though one whole row of 
data might well have been omitted from the sums, not from maliciousness, 
but from less than careful editing.  A formula that's correct for a 
column of numbers will automatically adapt to additional rows inserted 
in the middle.  But if you add to the end, it can be missed.

For the spreadsheet there are auditing programs.  But even they are only 
as good as the person manning them.

I've seen offsite back up systems that had less than 30% of the data 
supposedly entrusted to it, and could list the flaws that one audit 
uncovered.  Data that was supposed to have been secure for years was 
just not there.

I've seen vaults full of floppies where one of 10 was unusable, due to a 
simple flaw that wasn't discovered for many months.

The actual programming of a utility is but a tiny fraction of the work 
that needs to go into such a utility.  And you don't learn that from 
books on Python (as far as I know).

Again, I don't mean anything personal, as I don't know you.  But 
something about this thread triggered my rant.


More information about the Tutor mailing list