Just good advice? = WAS("Re: getting system date")

David Broadwell anti-spam.dbroadwell at mindspring.com
Tue May 13 13:00:22 EDT 2003


"Alex Martelli" <aleax at aleax.it> wrote in message
> Strings are peculiarly troublesome, because they're intrinsically
> "sequences" BUT more often than not you in fact want to treat them
> as "scalars" instead.  Again, this applies to instances of str,
> unicode, UserString, and possibly other string-ish types too (such
> as mmap).  However, if you extract the bound methods you need as I
> later suggest (e.g. append and sort, or whatever it IS that you do
> need to call), you may be able to 'catch' strings just as well as
> any other stray type -- few types would have append and sort methods
> unless in a deliberate attempt to mimic lists, after all.
And if it's trying to mimic a list then treating it like a list isn't an end
of the
world thing ...

> The key is to be paranoid in clever ways -- checking what's cheap to
> check and will catch many potential problems without damaging your
> software's usefulness.  Like most programmers I've done some occasional
> amateurish stints at sysadm'ing and marveled at the way a REAL sysadm
> would often zero in on the root of a weird, "impossible" problem (on
> the basis of their experience, clever paranoia, etc)
That's called troubeshooting, and instinct and 'feel' are part of that data
to
troubshoot with.

> The skill sets aren't ALL that different, deep down, IMHO.
Data is data unless it's energy that will be data again ...

> > This dosen't totally make sence yet, but then I've more reading to do
> > about this signature thing too.
> Super!  It really IS simpler than it may sound.  I'm sure you'll
> catch up on this in no time flat.
Actually, i think that forst paragraph started the clue process on that one
...
that and i hit a grok crux ... caught myself dreaming in code last night.

Last few times that has happnened, was in the miliary doing electronics.
Then some years later troubshooting 8088 boards in a electronics class
... and thereafter i could just lay on hands pick the 'bad' chip.
(reallly annoyed the teacher, and of course i did always prove it)
Got stuck as a tcp/ip packet once in between the ODI layers ...

And so on. However ... I surmize in those dreams like that something re-maps
and enables me to think of it from a less expensive perspective and wahla.
It
becomes a kind of magic. This is the first time it wasn't something that has
a
real physical component pr even related to one.

 > > I think i could get out a paper one now, but perhaps not the plastic.
> QOTW +1 !-)
Well, like you said, the skills are all realtaed ... someone made the rather
emphatic assumtion that I was elite programmer (they were very easy to
impress), tht was the best way i could think of on the spot to break that
notion before i found my way into a job that required far more bit
tweedling skills than I had.

> > Again Alex, thanks for the food for thought ... guess it's heading on
> > time for the python nushell book.
> You're most welcome!  And, I would suggest, have a look at the Cookbook
> too, both the free online version and the printed O'Reilly one: it does
> not delve into the language rules &c all that much, but it does provide
> examples and (in the printed version) substantial explanation of how
> and why things work.  Some people FAR prefer that from the necessarily
> more concise style of the Nutshell -- where I do give rules and advice
> but rarely get the chance to explain in depth WHY a rule or guideline
> is the way it is...!-)
Actually, I have a little collection of nutshell books going, linux,
javascript...
I like the style, but have found a 'core refrence' to be very usefull too if
something isn't in the nutshell. And then, with python you have a nice code
base installed to grope (er, grep on windows).

In any case, Thank Alex.

(Correct if I'm wrong, but I hadn't realized that you were a writer ...
suppose I should have.)






More information about the Python-list mailing list