Pete Goodliffe

author
+ Follow
since Feb 02, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pete Goodliffe

"Code smells" are a powerful metaphor found in Fowler's classic Refactoring book.


Code Craft does talk about refactoring (in the chapter about code evolution, naturally) but doesn't repeat all of Fowler's book!
Yeah, the advice you'll find in Code Craft is always pragmatic and balanced. You won't find me blindly prescribing how you should write any piece of code - it's always about the context the code will "live" in.

Again, this goes back to the book's central theme - good code is crafted by programmers with the correct attitude. They care about writing the right code the right way, rather than just using buzzword-laden technology for its own sake.
Frisode,

I guess the answer to your question is that each chapter has the "appropriate" amount of code examples to explain clearly what is being discussed. Depending on the chapter contents, some chapters have more code than others!
Thanks for the kind words, I hope you'll enjoy reading the book, and will find it genuinely useful!

Is software development an art form? Is it a science? Is it a craft? It is engineering? It's all of them and none of them! Google will quickly show you countless debates and opinions about this topic.

We talk about "computer science", about "software engineering" and now... about "Code Craft".

These are all metaphors that are useful to help you think about what you do when you craft pieces of code. But none of them tell you exactly what programming is.
What an interesting question!

Software development is still a relatively new (and immature?) field, and so is clearly constantly evolving. New languages are sprinnging up all the time providing new facilities and idioms to help us write better code.

Existing languages are also growing rapdily (for example, Java, C++, and C# are all NOT standing still!). Each revision of these languages provides more facilities to express your code's intent more clearly, so yes - programming style, even in a given language, naturally changes over time.

An example from C++ - the "boost" library (www.boost.org) has provided a number of well known almost "foundational" classes, many of which are being adopted in the next revision of the C++ standard. Modern C++ style favours using these classes, where a few years ago their use was "specialist" and not at all commonplace. They now form a common vocabulary in standard C++ code designs. They are pretty much now the definition of the modern C++ idiom.

Many things discussed in Code Craft are "timeless" techniques that have been around a while but are still pertinent today. I'm sure in the future new useful techniques and idioms will evolve that the book does not describe. It's inevitable - and I'd need a time machine to do anything about that (or a second revision of the book).

But the core theme of Code Craft - that good programmers are set appart by their attitude to the task of programming is definitely universal and timeless. Well, until we manage to create machines that will write code for us :-)
Hi Prithiraj,

Code Craft dicsusses both object oriented design techniques and procedural techniques. Where appropriate, it makes very clear the advantages of certain OO idioms in your code design.

Hope that answers your question.
Hi George,

I'm glad you enjoyed the chapter.

Your question is actually a very deep one, and a thread that could run and run! Perhaps the best advice I can give you is to take a look at a great discussion by Hubert matthews on this that was published in the most recent Overload magazine.

It's available at http://www.accu.org/index.php/journals/1303 and would be a good starting point to gain an understanding of the most appropriate way to raise and handle exceptions.

I hope this helps!

Pete
Hiya,

I don't think I entirely follow your question!

A desire to improve yourself as a programmer is important no matter what development methodology you adopt (although a desire to write the best code might affect the kind of methodology you chose to use).
I think that you'd kinda expect me to say "Yes, it does" wouldn't you?.

I'm not aware of another book in the field that covers the set of topics that Code Craft does. That's why I wrote it.

I've taken a particularly fresh approach. The book is very readable, and very practical. I defy anyone to read it (properly!) and not to find some new ways to improve their coding technique. *Improving* yourself is entirely what this book is about.
Yeah, Lasse is spot on.

Code Craft is far, far more than just "how to write lines of code.". Check out the contents for a good idea of what's covered (http://www.nostarch.com/codecraft_toc.htm).

I work out from the codeface (how to write good code - covering things like naming, writing comments, handling errors, and much more) through construction techniques (covering programming tools, how to test, how to debug, how to "build code", coinsidering security, and much more). I talk about the "shape" of code (design, architecture and code evolution). Then the book zooms out to look at programming in the Real World: how to work in teams, review code, write specs and documentation (and when not to!) how to estimate how long it will take to write code. And more.

Phew!
Think of Code Craft as "Effective Programming".

It's not just about a programming language - it's about programming well.
Some areas of Code Craft overlap with Code Complete. But the book takes a different angle and approach to the material, and presents it an an easier-top-digest form.

The book also covers a lot of ground that McConnell does not.

I'd say that it's a worthy complement. For example, here's a quote from one of the Amazon reviews:

"The book will inevitibly suffer from comparisons to McConnell's Code Complete, Second Edition -- that's a very, very tough shadow to try and get out from. Code Craft seems to me to stand up to that tough comparison. Goodliffe's writing style is easy to read, and the points he makes are critical to folks who give a hoot about writing good software. The book's topics are well thought out, running from defensive coding practices, through the importance of coding standards, solid design, good processes, and a high-level view of methodologies and practices. "

Hope that answers the question!
The concept of "Code Craft" is just a neat and catchy way to summarise the idea of crafting code in a careful, thoughtful, pragmatic way. To code with the correct *attitude*.

As for what "methodology" it is, it isn't a methodology. The stuff in this book is as suited to a RUP-programmer as it is to an agile programmer.

Having said that, I personally lean towards agile development. I'm currently doing XP and can't adequately describe the benefits that the process brings.
Heh - a lot of questions:

Which kind of user is the book written for:
It's actually got a pretty broad audience.
- It's ideal for "new recruits" fresh to the glamour of programming
in the Real World - say up to five years in programming employment.
- It's great for students learning to program - it'll really show
what "good" programming is - the kind of stuff you learn "up close"
when working with exceptional programmers.
- It's great for really experienced guys to refresh knowledge, to
inspire them once more to write great code, and to use as a mentoring
aid.

What the reader is supposed to know in order to follow up the book?
- The user is expected to understand basic programming topics.
- They are not expected to be a coding God, or to know any particular
language.
- The book will NOT teach them how to program
- It will teach them how to program "properly"!

Which kind of methodology does your book apply (recommend) to achieve code crafting?
- I do not favour any one technique or methodology, nor would it be
right for me to do so. Different techniques are applicable in
different circumstances. If you read the book you'll find out why :-)
- The book covers different programming language styles (imperative,
declarative, logic, structured, procedural, object-oriented, and so on)
- The book discusses development methodologies like agile, waterfall,
RUP, V model, etc.
- The book discusses various approaches to software documentation, and
approaches to code design.
Probably best to check out the details on www.nostarch.com/codecraft.htm and take a look at the sample chapter. That should give you a good idea of what the book's about.