Writing solid code book

P

post400

Hi,

there is another famous book 'Writing solid code' but does it apply to
Python ? Or it's usable only by Microsoft C programmers ? The author
seems to be an ex-Microsoft guy !

Thanks ,
post400
 
E

Edward K. Ream

there is another famous book 'Writing solid code' but does it apply to
Python ? Or it's usable only by Microsoft C programmers ? The author
seems to be an ex-Microsoft guy !

Interesting question. This book probably makes a good indirect case for
using Python rather than C. I found it useful back when I was I C
programmer. Python makes many of the points in the book moot, and the last
chapter on attitude applies universally. For example, assertions are much
less useful in Python because the interpreter essentially asserts many
properties of each statement. In Python one wants assertions only for
conditions that the interpreter can't possibly deduce.

BTW, back when I was a C programmer the book "Code Complete" would have been
a complete answer to the question, "what do you do?" It's still relevant, I
would guess.

Edward
 
D

David M. Cook

there is another famous book 'Writing solid code' but does it apply to
Python ? Or it's usable only by Microsoft C programmers ? The author
seems to be an ex-Microsoft guy !

It mainly deals with C-specific issues.

http://tinyurl.com/m3ta

However, the Code Complete book by McConnel is quite general.

Dave Cook
 
A

Alan Gauld

there is another famous book 'Writing solid code' but does it apply to
Python ? Or it's usable only by Microsoft C programmers ? The author
seems to be an ex-Microsoft guy !

Forget this one, it wasn't as good as Code Complete when it came
out and it has aged less well. Its not even of great value to C
programmers nowadays, it spends a lot of time dealing with the
inadequacies of the compilers and other tools around at the time!

Better tools mean much of it has lost its urgency.

Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
 
J

Jules Dubois

The Python Cookbook is the first book I'd have on my list if I were
learning Python now (O'Reilly, eds. Martelli & Ascher).

That's the only Python book you think worth having? Or buying?

My "Software Engineering" class votes again tomorrow on the language we use
for our group project. Tuesday's vote was Java (8 votes), Python (5), C++
(3), and Smalltalk (1); Thursday's vote will be between Java and Python. I
get the opportunity to learn one or the other in a week.
 
R

Roy Smith

Jules Dubois said:
My "Software Engineering" class votes again tomorrow on the language we use
for our group project. Tuesday's vote was Java (8 votes), Python (5), C++
(3), and Smalltalk (1); Thursday's vote will be between Java and Python. I
get the opportunity to learn one or the other in a week.

How many votes does a language need to get to be elected Governor of
California?
 
A

Alex Martelli

Roy said:
How many votes does a language need to get to be elected Governor of
California?

Given that they vote in a sensible way (runoff between the top two
candidates, rather than "first past the post") you can't directly
compare the two elections. (You can get the same results as with a
preliminary vote + runoff by such methods as STV and Condorcet --
the whole issue was discussed in depth last spring on this group
regarding the ternary operator vote -- but that's an issue only if
arranging for voting twice is costly or inconvenient).


Alex
 
M

Mikael Olofsson

How many votes does a language need to get to be elected Governor of
California?

$ 10**7 ?

/Mikael Olofsson
Universitetslektor (Associate professor)
Linköpings universitet

-----------------------------------------------------------------------
E-Mail: (e-mail address removed)
WWW: http://www.dtr.isy.liu.se/en/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
-----------------------------------------------------------------------
Linköpings kammarkör: www.kammarkoren.com
 
A

Alex Martelli

Jules said:
That's the only Python book you think worth having? Or buying?

Speaking as both the co-editor of the Cookbook and the author of the
Nutshell, if I had to choose ONE Python book "worth having or buying"
I think I'd go for the Nutshell. Hard decision, though.

Fortunately you don't have to choose "sight unseen". You can join
O'Reilly's "Safari" online-books service: it's for-pay, but you DO
get a couple of weeks free access, giving you time to examine all
of the 15 Python books they have available for online reading -- on
the basis of how you like what you see, you may then decide to
purchase any one of them -- or even, if you don't like any of them
well enough, to purchase none of them and go with the other ones
you can access in entirely free ways off the net.

In the past, I made my choices about what books to purchase mostly
by browsing books at a bookstore. Half an hour per book might
mean a full day's worth of browsing to choose among 15 of them,
and yet not give me a solid enough basis for choosing. Now I can
spend 2 or 3 hours examining each book's contents in a more
convenient setting, and in a weekend plus a couple evenings make
my choice on a much more solid basis. Even ignoring safari's many
other advantages, just as a book-choosing device it's superb!-)


Alex
 
C

Cameron Laird

If you picked Jython you could all be happy! :)
.
.
.
I'm not sure how seriously others take this sug-
gestion. I think it's worth full consideration.
Jython is a remarkable achievement, and often
addresses requirements more fully than either
Python or Java alone.
 
P

post400

Forget this one, it wasn't as good as Code Complete when it came
out and it has aged less well. Its not even of great value to C
programmers nowadays, it spends a lot of time dealing with the
inadequacies of the compilers and other tools around at the time!

Better tools mean much of it has lost its urgency.

Actually I put these questions about books because there's an awful
lot of them out there in the bookshops and libraries and no time to
read them all.So maybe you (experienced python guys ) could make some
suggestions from time to time about the must-read books , not
necessarily on python but also on stuff about design , project
management , OOP , etc. be it new stuff or old stuff.Apparently the
python people are already experienced in some other languages and they
choose it as a language because is so much better.Of course there are
programmers who have never heard of python and I'm talking about
"real" hot java and enterprise stuff programmers.But I really wonder
how a non-programmer could get into python as a first programming
language since there's not much publicity and not many people around
to lure you to it.

Bye,
post400
 
B

Bob Gailer

[snip]
My "Software Engineering" class votes again tomorrow on the language we use
for our group project. Tuesday's vote was Java (8 votes), Python (5), C++
(3), and Smalltalk (1); Thursday's vote will be between Java and Python. I
get the opportunity to learn one or the other in a week.

Does your class want to learn Software Engineering or does it want to learn
a language. If the focus is on learning Software Engineering and the
learning of a language is to support that, the less effort you have to put
into learning (and using) the language the more time and energy you'll have
to learn and apply engineering concepts.

One of the first "productivity languages" was APL. One could solve problems
in a fraction of the time it took in FORTRAN etc. In the early 1970s a
college class was given a term project - write a program to solve something
related to the course subject. Some students wrote the APL solution and
turned it in the following day. The prof was pissed that they had done it
so easily, and forbade the use of APL for the assignment!

So beware of choosing Python. It might make the class too easy.

Bob Gailer
(e-mail address removed)
303 442 2625
 
P

post400

Alex Martelli said:
Speaking as both the co-editor of the Cookbook and the author of the
Nutshell, if I had to choose ONE Python book "worth having or buying"
I think I'd go for the Nutshell. Hard decision, though.

Fortunately you don't have to choose "sight unseen". You can join
O'Reilly's "Safari" online-books service: it's for-pay, but you DO
get a couple of weeks free access, giving you time to examine all
of the 15 Python books they have available for online reading -- on
the basis of how you like what you see, you may then decide to
purchase any one of them -- or even, if you don't like any of them
well enough, to purchase none of them and go with the other ones
you can access in entirely free ways off the net.

In the past, I made my choices about what books to purchase mostly
by browsing books at a bookstore. Half an hour per book might
mean a full day's worth of browsing to choose among 15 of them,
and yet not give me a solid enough basis for choosing. Now I can
spend 2 or 3 hours examining each book's contents in a more
convenient setting, and in a weekend plus a couple evenings make
my choice on a much more solid basis. Even ignoring safari's many
other advantages, just as a book-choosing device it's superb!-)


Alex

Hi,

yes Safari seems ok , you get a few days for free to browse but it's
not totally free.I think the electronic version should be free.Some
people offer their books for free , Bruce Eckel for example and his
Thinking in Java which seems to be a good book.Maybe more writers
should do the same !

bye,
post400
 
O

Olivier Lefevre

Alex Martelli said:
Even ignoring safari's many other advantages

Safari is definitely a useful service (I am a subscriber) but
1. its range of titles is quite limited (only best-sellers)
2. the time lag between release as hardcopy vs. on Safari can be really long

-- O.L.
 
O

Olivier Lefevre

And let us not forget
3. poor customer service (you have to try real hard to reach someone)

-- O.L.
 
J

John J. Lee

Jules Dubois said:
That's the only Python book you think worth having? Or buying?

As a general Python book, yes (having or buying). The standard
library docs are good enough that I've never had a need for anything
else. The Cookbook is good for getting a sense of good Pythonic
style.

People have said good things about some of the Python reference books,
though. In the past -- and quite possibly now -- the books by Beazley
and Lundh were two that were often recommended, and the more recent
O'Reilly Nutshell has also been praised.

My "Software Engineering" class votes again tomorrow on the language we use
for our group project. Tuesday's vote was Java (8 votes), Python (5), C++
(3), and Smalltalk (1); Thursday's vote will be between Java and Python. I
get the opportunity to learn one or the other in a week.

Why not ignore the result and dictate the language choice yourself?
(benevolently, of course ;-)


John
 
M

Michael Peuser

Alex Martelli <[email protected]> wrote in message

Safari is definitely a useful service (I am a subscriber) but
1. its range of titles is quite limited (only best-sellers)

It is *very* limited; though I think all or O'Reilly's books are in it (and
MicrosoftPress and SAMS) there is little more; they advertise Addison
Wesley, but there is only a fraction of their books.
2. the time lag between release as hardcopy vs. on Safari can be really
long

3. It *is* expensive in the long run, except you have a *very* broad
interest in multiple aspects of computer science.


Kindly
Michael P
(also a subscriber)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top