Download Ship It A Practical Guide to Successful Softwar.. PDF

TitleShip It A Practical Guide to Successful Softwar..
LanguageEnglish
File Size1.9 MB
Total Pages203
Document Text Contents
Page 2

What readers are saying about Ship It!

This is fantastic stuff. As I started reading, I almost fell out of my seat
because the project I’m on right now is going through exactly the hurt
you describe and would benefit greatly from material just like this.

Matthew Bass
Software Engineer

A great book! The authors have done a great job in presenting the
subject in a neutral way and avoiding any methodology-oriented traps.

Roberto Gianassi
IT Consultant

What The Pragmatic Programmer brought to the individual skills and
crafts of software developers, Ship It! is to the software development
team. If you or someone you know in the software field isn’t happy,
then get them to read this book.

Guerry A. Semones
Senior Software Engineer, Appistry

It’s rare to have this much fun reading a book about software. The
ideas are smart, relevant, and fundamental. I can be a better pro-
grammer today because of the things I read today.

Joe Fair
Developer

Page 101

REVIEW ALL CODE 90

Plenty of research shows the effectiveness of code reviews at detect-
ing defects (bugs) in code. In fact, it’s the number-one technique for
finding bugs. There is none better. If you haven’t done code reviews
consistently, you may be in for a surprise at what you’ll find.

We’ve actually seen variable names like mrHashy (Mister Hashy) for a
hash table. However, after a single code review, that developer began to
use more relevant variable names to avoid being teased by co-workers.
Peer pressure can be painful yet effective.

Rubber ducking (explained previously) is a very effective way of finding
and solving problems. By describing your code to someone, you’ll sud-
denly realize things you forgot, recognize logic that just won’t work, or
find conflicts with some other area of the system. We want you to “talk”
to the duck every time you check in code.

Besides the value in rubber ducking, other developers will spot bugs
in your code. Having a fresh, second set of eyes to look over your code
will often catch issues that never even occurred to you. You’ll be getting
a completely different point of view. Finding bugs in the development
shop is always cheaper than finding them when the code is in the field.
The return on this small investment is immense.

Code reviews are great for fostering knowledge sharing among team
members. After collaborating on the review, your reviewer will have at
least a conceptual idea of what your code does and you hope a detailed
understanding of it. This has enormous mentoring benefits and helps
in code maintenance as well.

Reviews provide a perfect opportunity for experienced developers to
pass along code style and design techniques to less experienced pro-
grammers. Beyond the trivial technicalities (such as where the brack-
ets go), code reviews give the veterans a chance to advise the greener
developers on why one data structure might be better for this situation,
or to point out that a pattern is emerging. Quite often, a reviewer will
spot repeating code or functionality in these sessions, which can be
moved to common base classes or utility classes. Your code becomes
refactored before it gets checked into the source code management sys-
tem.

Reviews also facilitate cross-training on small areas of coding details as
well as big-picture concepts. Beyond “coding style,” you are learning to
“code with style.”

Here are a few guidelines to assist you with code reviews.

Page 102

REVIEW ALL CODE 91

Patterns

A pattern refers to the practice of documenting and naming
common problems (and their solutions) that occur in real-world
projects. There are several reasons to be a student of patterns.
One is to give developers a common vocabulary. After devel-
opers have worked together, they develop a common set of
terms that lets them communicate quickly and unambiguously.
Patterns can jump-start that process and allow you communi-
cate clearly with someone you’ve just met (provided they are
also familiar with the same patterns).

Another good reason to study patterns is to help you solve prob-
lems you haven’t seen before. By reading and discussing vari-
ous patterns, you learn how to solve many common problems.
The question isn’t whether you’ll encounter most patterns but
whether you’ll recognize them when they cross your path.∗ Will
you know how to cleanly solve the problem represented by
the pattern, or will you stumble through several code iterations
before you find an acceptable solution?

Design Patterns: Elements of Reusable Object-Oriented Soft-
ware by Eric Gamma, Richard Helms, Ralph Johnson, and John
Vlissides (a.k.a. the Gang of Four) is a great place to start.

∗The Humble Programmer by Edsger W. Dijkstra is a classic look
at the state of computer science (including patterns) that is still
very applicable today. The article was written in 1972! (See
�������������� �
����

� �
�������

���������������.)

Code reviews must involve at least one other developer. In practice, it
will almost always be just one other developer unless you are creating
something interesting or clever that other team members want to learn
about. Then feel free to include more developers. Don’t go overboard,
though (no more than three to four, tops); too many developers bog
down the review.

Do not make code publicly available without a review. Don’t add your
changes to the source code from which your product is built until a
review has been done. Part of the comments you include with the code’s
check-in should list your reviewer’s name. Then, if there are questions
about the reason for the code change and you’re not around, there is
a second person who should be able to explain it (at least at a basic
level).

Page 202

Facets of Ruby Series
Learn how to use the popular Ruby programming language from the Pragmatic Program-
mers: your definitive source for reference and tutorials on the Ruby language and exciting
new application development tools based on Ruby.

The Facets of Ruby series includes the definitive guide to Ruby, widely known as the
PickAxe book. Upcoming titles in this series feature the Ruby on Rails web application
framework and other exciting new technologies.

• The definitive guide for Ruby programmers. • Up-to-date
and expanded for Ruby version 1.8. • Complete docu-
mentation of all built-in classes, modules, and meth-
ods. • Complete descriptions of all ninety-eight standard
libraries. • 200+ pages of new content in this edition.
• Learn more about Ruby’s web tools, unit testing, and pro-
gramming philosophy.

Programming Ruby: The Pragmatic Programmer’s Guide,
2nd Edition
Dave Thomas with Chad Fowler and Andy Hunt
(864 pages) ISBN: 0-9745140-5-5. $44.95

• Learn all about this new open-source, full-stack
web framework. • Develop sophisticated web applications
quickly and easily. • Use incremental and iterative devel-
opment to create the web apps that users want. • Get to go
home on time.

Agile Web Development with Rails: A Pragmatic Guide
Dave Thomas and David Heinemeier Hansson
(450 pages) ISBN: 0-9766940-0-X. $34.95

Visit our store at ��������������
����������
���
������

Page 203

The Pragmatic Bookshelf
The Pragmatic Bookshelf features books written by developers for developers. The titles
continue the well-known Pragmatic Programmer style, and continue to garner awards
and rave reviews. As development gets more and more difficult, the Pragmatic Program-
mers will be there with more titles and products to help programmers stay on top of their
game.

Visit Us Online
Ship It!
����������������� �
��������
����

Source code from this book, errata, and other resources. Come give us feedback, too!

Register for Updates
����������������� �
���������

Be notified when updates and new books become available.

Join the Community
����������������� �
�������������

Read our weblogs, join our online discussions, participate in our mailing list, interact
with our wiki, and benefit from the experience of other Pragmatic Programmers.

New and Noteworthy
����������������� �
����� �

Check out the latest pragmatic developments in the news.

Buy the Book
If you liked this PDF, perhaps you’d like to have a paper copy of the book. It’s available
for purchase at our store: ����������������� �
��������
����.

Contact Us
Phone Orders: 1-800-699-PROG (+1 919 847 3884)
Online Orders: ���
����������������� �
�����������
Customer Service: ��� �
������������������ �
���
Non-English Versions: ����
������
������������������ �
���
Pragmatic Teaching: ���� ��������������������� �
���
Author Proposals: �����
��
������������������ �
���

Similer Documents