Start reading Code Craft: The Practice of Writing Excellent Code on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.

Deliver to your Kindle or other device

 
 
 

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Read books on your computer or other mobile devices with our FREE Kindle Reading Apps.
Code Craft: The Practice of Writing Excellent Code
 
 

Code Craft: The Practice of Writing Excellent Code [Kindle Edition]

Pete Goodliffe
3.5 out of 5 stars  See all reviews (2 customer reviews)

Digital List Price: £23.64 What's this?
Print List Price: £35.49
Kindle Price: £18.91 includes VAT* & free wireless delivery via Amazon Whispernet
You Save: £16.58 (47%)
Unlike print books, digital books are subject to VAT.

Formats

Amazon Price New from Used from
Kindle Edition £18.91  
Paperback £27.68  

Product Description

Product Description

Many programmers know how to write correct code - code that works. But not all know how to craft great code - code that is well written and easy to understand. Code Craft teaches programmers how to move beyond writing correct code to writing great code. The book covers code writing concerns, including code presentation style, variable naming, error handling, and security; and the wider issues of programming in the real world, such as good teamwork, development processes, and documentation. Code Craft presents language-agnostic advice that is relevant to all developers, from an author with loads of practical experience. A Q&A section at the end of each chapter helps readers to review the material and makes the book suited for academic use as well.

About the Author

Pete Goodliffe is a senior software engineer, currently working on embedded systems in C++. He never stays at the same place in the software food chain; from bringing new systems up, writing device drivers, through OS implementation, audio codecs, JVM implementation, to MIDI sequencing applications. He writes a regular column for accu.org called Professionalism in Programming and has published articles on software development in Hardcopy, C/C++ Users Journal, and Dr Dobb's Journal.


Product details

  • Format: Kindle Edition
  • File Size: 4139 KB
  • Print Length: 624 pages
  • Publisher: No Starch Press (20 Aug 2009)
  • Sold by: Amazon Media EU S.à r.l.
  • Language English
  • ASIN: B002MZAR6S
  • Text-to-Speech: Enabled
  • Average Customer Review: 3.5 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: #321,724 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?


More About the Author

Pete Goodliffe
Discover books, learn about writers, and more.

Visit Amazon's Pete Goodliffe Page

Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organise and find favourite items.
Your tags: Add your first tag
 

Customer Reviews

4 star
0
3 star
0
1 star
0
Most Helpful Customer Reviews
10 of 13 people found the following review helpful
By G. Mead
Format:Paperback
I came across an excerpt from this book, thought it might be an interesting browse and so got hold of a copy. It turned out to be far more than that, far better than I had even anticipated.

First of all, it is an easy and enjoyable read - and that isn't a description you can give to many books that delve into technical theories and topics! The reason is that, not only is it well written in clear language, his subtle, gentle humour succeeds in turning what could so easily be a long, boring dry list of do's and dont's into a very interesting and satisfying book.

The author comes from a C language background and uses this for the examples, but - even though VB is my particular language of choice - I didn't find the use of C to be a problem at all. The examples are generally quite short and the logic or the point being made is always clear to see.

Although a huge amount of research has clearly gone into the writing of this book, it is always obvious that most of the examples are from his own personal experience. For me, this added value and credibility to the points that are being made.

I read this book from cover to cover, (and that's not something I usually do) and have already taken many of his suggestions on board. I know that I will go back to it again and again in the future.

This is a really first class book that fully delivers on its promise (again an achievement not shared by all technical books!). If you take the time and trouble to read it and assimilate the guidance it will certainly help you to write excellent code.
Comment | 
Was this review helpful to you?
3 of 5 people found the following review helpful
Format:Paperback
Most of the stuff here is obvious, so only for a neophyte. There's stuff which as a programmer of 30+ years experience, I simply disagree with - maximising the number of source files in a project for instance.

Some of the examples are just bad - take a look at the following code: (it's in c and I've had to change the layout slightly)

1 #include <stdio.h>
2
3 int main(int argc,char **argv)
4 {
5 int low, high, div, gcd =0 ;
6 low =atoi(argv[1]);
7 high =atoi(argv[2]);
8
9 printf("Finding GCD for %d and %d\n",low,high);
10
11 for (div=low; div > 0; --div)
12 {
13 if ((low % div == 0) && (high %div == 0))
14 if (gcd < div)
15 gcd=div;
16 }
17 printf("gcd=%d\n", gcd);
18 }

The author says that there's a mistake, and he's right, but it's not the mistake he thinks it is!
In fact, I can see at least 2 mistakes, in such a small piece of code. The author thinks that the problem is input validation - ie what do you do if a zero is entered? Well actually, that's not really a problem - the program will run OK, and simply decide that zero is the GCD. What I'd see as a problem is that the return is in the wrong place - if you're looking for the _greatest_ common divisor, then you'd exit after finding the first occurrence. With largeish numbers, that could save a lot of effort. As it is, the program will find the lowest common divisor, but ignore it as it will be > gcd. In a book about coding style to put in such an awful piece of code is stunning. What about the case of no common divisor (other than 1 - ie the numbers are coprime)? I suppose returning 1 is acceptable - this is only a trivial example, after all.

It should read:
13: if ((low % div==0) && (high %div ==0))
14: return div ;

PS Ignore my formatting as amazon cuts tabs.

Write his code for me and you're fired!
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com:  16 reviews
67 of 72 people found the following review helpful
Not worth it 31 Mar 2007
By zepto - Published on Amazon.com
Format:Paperback
After reading the good, despite few, amazon reviews of this book i decided to pick it up. I'm a big fan of books that teach one how to become a better programmer. Unfortunately, i wasn't too impressed by this one. The author didn't seem to have anything super insightful or groundbreaking to share with us. He gave a description of what he considers to be good code/coders along with a really brief description of a lot of software related tools, paradigms, and 'types' of programmers.

Unfortunately he doesn't really say anything that hasn't been said. His code examples are notably poor. In Steve McConnels book, "Code Complete" he criticizes programming books for using fibonacci as an example of recursion. He criticizes it because it's not something that software developers find themselves doing often. I have the same complaint with most of the code examples in this book (so maybe it is good there are so few). It felt like my high school java teacher (who had neither a CS degree or programming experience) wrote up the code samples. You'll quickly be annoyed by the simplicity of the mistakes and concepts that he is trying to express.

As you read this book you'll find things you agree and disagree with, and you'll just want to say OK. you won't run to your computer wanting to implement them. You also won't run to your friends telling them you've found a new way to do something. I guess that is my major problem with this book, there's nothing really special about it. I also found myself wondering 'why is this important?' throughout the book quite a bit.

I found another thing in this book to be insulting, the Good Programmers Bad Programmers section after each chapter. If i didn't know the difference between a good programmer and a bad programmer i wouldn't have bought the book. They are all very similar and obvious.

I would definitely recommend the following books over it:

Code Complete

Refactoring

Pragmatic Programmer

while this book does cover some things these books say, not enough to replace any one of them, and reading any of these will provide insights this book cannot.
21 of 26 people found the following review helpful
Doesn't read like it was written by an actual software engineer, and has a annoying/insulting tone 28 July 2007
By A. Chu - Published on Amazon.com
Format:Paperback
I was at the library and this happened to be next to another book that I wanted, so I picked it up too.

And wow, it's rare that I am this disappointed in a book. The content is very thin. It sounds like it was completely gathered from secondary sources, e.g. reading other books about software engineering. It doesn't sound like the result of actual experience.

Every page is filled with platitudes without any examples of real experience backing it up. I'll grant that he has assembled an extraordinarly wide range of *terms* and terminology. It looks like he has tried to shove 3 sentences about every topic in software into a single book. Unfortunately, this ultimately makes for a book with little use.

Another sticking point is the writing style. It comes off like the author is an annoying guy trying to be funny and trying to be your friend. The first sentence irritated me: "What's in it for me? Programming is your passion. It's sad, but it's true."

Huh? Why is it sad that programming is one's passion??? There are similar head-scratchers elsewhere in the book. He also devotes a section to talking about the various types of "code monkeys". And the last type is "You. In the interest of politeness, we'll say no more about this curious beast. Sadly, some people are beyond help..." What? The reader is beyond help? If I pretend for a minute that he's not insulting me, then I still don't know what he's trying to say. This book is incoherent.

And what's with all the reviews below that read like advertisements? Give me a break. It looks like a lot of the author's friends are spamming Amazon's reviews.

I recommend reading Joel Spolsky's books for real, specific insights on programming and the software development process, earned from experience, written in a much clearer and more entertaining style.

I'm also reading Jon Bentley's "Programming Pearls" now.
9 of 11 people found the following review helpful
There is nothing new here! 14 Nov 2007
By Marc Magrans De Abril - Published on Amazon.com
Format:Paperback
I have two comments.
First, do not expect technical details on this book. There isn't. Second, the only paragraph that is really good is on page 461 and it says: "Find the classic books of the field". This is not one of those. He recommends and I agree almost completely:
* Code Complete
* Design Patterns: Elements of reusable object-oriented software
* The mythical man-month
* The psychology of computer programming
* The practice of programming
* Peopleware
* The pragmatic programmer
* refactoring

I do not thing that "Code Craft" is one of those.
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Look for similar items by category


Look for similar items by subject


Amazon Media EU S.à r.l. GB Privacy Statement Amazon Media EU S.à r.l. GB Delivery Information Amazon Media EU S.à r.l. GB Returns & Exchanges