Hi, 10 details I forgot in my first response...
* John Posner:
[...] Chapter 2, which current runs 98 pages!
The chapter 2 PDF I posted on
http://tinyurl.com/programmingbookP3>
was and is (it's not been updated) 101 pages, with an "-EOT-" at page 102.
I suspect you may have read the previ
On Sun, 20 Dec 2009 08:29:43 +0100, Alf P. Steinbach wrote:
> I recently (just weeks
> ago) was astounded to see that a C++ "expert" thought that Java had pass
> by reference, apparently because in Java only references are passed
> around.
The Java community, for some bizarre reason, has a tenden
* John Posner:
On Fri, 18 Dec 2009 13:00:48 -0500, Alf P. Steinbach
wrote:
Chapter 2 is about Basic Concepts (of programming). It's the usual:
variables, ...
1. Overall suggestion
You have a tendency to include non-pertinent asides [1]. But then,
rambling a bit endows a manuscript with
On Fri, 18 Dec 2009 13:00:48 -0500, Alf P. Steinbach
wrote:
Chapter 2 is about Basic Concepts (of programming). It's the usual:
variables, ...
1. Overall suggestion
You have a tendency to include non-pertinent asides [1]. But then,
rambling a bit endows a manuscript with the author's
* Steven D'Aprano:
On Sat, 19 Dec 2009 04:29:22 +0100, Alf P. Steinbach wrote:
* Steven D'Aprano:
On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote:
That said, and a bit off-tangent to your comment's main thrust, the
time spent on coding that repeated-division-by-2 optimization woul
* Steven D'Aprano:
On Sat, 19 Dec 2009 04:04:51 +0100, Alf P. Steinbach wrote:
* Steven D'Aprano:
On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote:
In fact almost no Python
code does, but then it seems that people are not aware of how many of
their names are constants and think tha
On Sat, 19 Dec 2009 04:29:22 +0100, Alf P. Steinbach wrote:
> * Steven D'Aprano:
>> On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote:
>>
>>> That said, and a bit off-tangent to your comment's main thrust, the
>>> time spent on coding that repeated-division-by-2 optimization would, I
>>>
On Dec 19, 12:21 am, "Alf P. Steinbach" wrote:
> * Mensanator:
>
>
>
> >> That said, and a bit off-tangent to your comment's main thrust, the time
> >> spent
> >> on coding that repeated-division-by-2 optimization would, I think, be
> >> better
> >> spent googling "Collatz Conjecture" -- avoid
* Mensanator:
That said, and a bit off-tangent to your comment's main thrust, the time spent
on coding that repeated-division-by-2 optimization would, I think, be better
spent googling "Collatz Conjecture" -- avoiding writing /any/ code. ;-)
Ha! I know more about Collatz than you can ever fi
On Dec 18, 6:25 pm, "Alf P. Steinbach" wrote:
> * Mensanator:
>
> >> The second deviation is that since most names are constants,
>
> > Really? Does that mean you don't use literals, to save the time
> > required to convert them to integers? Isn't that done at compile
> > time?
>
> > So, instead o
On Sat, 19 Dec 2009 04:04:51 +0100, Alf P. Steinbach wrote:
> * Steven D'Aprano:
>> On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote:
>>
>>> In fact almost no Python
>>> code does, but then it seems that people are not aware of how many of
>>> their names are constants and think that th
On Fri, 18 Dec 2009 21:29:27 -0600, John Bokma wrote:
> Steven D'Aprano writes:
>
>> CPython 2.5 and on has a keyhole optimizer that replaces many constant
> ^^^
> Shouldn't that be peephole?
Alternate names for the same thing.
>> expressions with pre-computed va
Mensanator wrote:
Really? Does that mean you don't use literals, to save the time
required to convert them to integers?
I think all he means is that when he *does* use a named
constant, he spells it in lower case rather than upper
case, e.g. 'twopi' rather than 'TWOPI'.
I don't think there's a
On Fri, 18 Dec 2009 15:26:05 -0800, Mensanator wrote:
>> The second deviation is that since most names are constants,
>
> Really? Does that mean you don't use literals, to save the time required
> to convert them to integers? Isn't that done at compile time?
>
> So, instead of doing the Collatz
* Steven D'Aprano:
On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote:
That said, and a bit off-tangent to your comment's main thrust, the time
spent on coding that repeated-division-by-2 optimization would, I think,
be better spent googling "Collatz Conjecture" -- avoiding writing
/a
Steven D'Aprano writes:
> CPython 2.5 and on has a keyhole optimizer that replaces many constant
^^^
Shouldn't that be peephole?
> expressions with pre-computed values.
And that's called constant folding.
Unless I misread your post (or have been out of touch wit
* Steven D'Aprano:
On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote:
In fact almost no Python
code does, but then it seems that people are not aware of how many of
their names are constants and think that they're uppercasing constants
when in fact they're not. E.g. routine arguments
On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote:
> That said, and a bit off-tangent to your comment's main thrust, the time
> spent on coding that repeated-division-by-2 optimization would, I think,
> be better spent googling "Collatz Conjecture" -- avoiding writing
> /any/ code. ;-)
On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote:
> In fact almost no Python
> code does, but then it seems that people are not aware of how many of
> their names are constants and think that they're uppercasing constants
> when in fact they're not. E.g. routine arguments
Routine argum
* Mensanator:
The second deviation is that since most names are constants,
Really? Does that mean you don't use literals, to save the time
required to convert them to integers? Isn't that done at compile
time?
So, instead of doing the Collatz Conjecture as
while a>1:
f = gmpy.scan1(a,0)
i
> The second deviation is that since most names are constants,
Really? Does that mean you don't use literals, to save the time
required to convert them to integers? Isn't that done at compile
time?
So, instead of doing the Collatz Conjecture as
while a>1:
f = gmpy.scan1(a,0)
if f>0:
a =
I finally finished (draft), I believe!, chapter 2...
Chapter 1 gets the reader up & running, i.e. it's "Hello, world!", basic tool
usage, without discussing anything about programming really. One reaction to
this chapter, based on the two example programs in it, was that it wasn't
gradual and
22 matches
Mail list logo