Beyond the Blog: Effective Programming: More Than Writing Code

Jeff Atwood (author Of Coding Horror Blog)

Language: English

Published: Jul 4, 2012

Description:

ABOUT THE BOOK

Jeff Atwood began the Coding Horror blog in 2004, and is convinced that it changed his life. He needed a way to keep track of software development over time - whatever he was thinking about or working on. He researched subjects he found interesting, then documented his research with a public blog post, which he could easily find and refer to later. Over time, increasing numbers of blog visitors found the posts helpful, relevant and interesting. Now, approximately 100,000 readers visit the blog per day and nearly as many comment and interact on the site.

Effective Programming: More Than Writing Code is your one-stop shop for all things programming. Jeff writes with humor and understanding, allowing for both seasoned programmers and newbies to appreciate the depth of his research. From such posts as "The Programmer's Bill of Rights" and "Why Cant Programmers... Program?" to "Working With the Chaos Monkey," this book introduces the importance of writing responsible code, the logistics involved, and how people should view it more as a lifestyle than a career.

ABOUT THE AUTHOR

Jeff Atwood lives in Berkeley, CA with his wife, two cats, three children and a whole lot of computers. He was weaned as a software developer on various implementations of Microsoft BASIC in the '80s, starting with his first microcomputer, the Texas Instruments TI-99/4a. Atwood continued on the PC with Visual Basic 3.0 and Windows 3.1 in the early '90s, although he also spent significant time writing Pascal code in the first versions of Delphi. He is now quite comfortable in VB.NET or C#, despite the evils of case sensitivity. He's currently learning Ruby.

Atwood considers himself a reasonably experienced web software developer with a particular interest in the human side of software development, as represented in his recommended developer reading list. As he avers, computers are fascinating machines, but they're mostly a reflection of the people using them. In the art of software development, studying code isn't enough; you have to study the people behind the software, too.

EXCERPT FROM THE BOOK

As a software developer, you are your own worst enemy. The sooner you realize that, the better off you'll be.I know you have the best of intentions. We all do. We're software developers; we love writing code. It's what we do. We never met a problem we couldn't solve with some duct tape, a jury-rigged coat hanger and a pinch of code. But Wil Shipley argues that we should rein in our natural tendencies to write lots of code:

The fundamental nature of coding is that our task, as programmers, is to recognize that every decision we make is a trade-off. To be a master programmer is to understand the nature of these trade-offs, and be conscious of them in everything we write.In coding, you have many dimensions in which you can rate code: Brevity of codeFeaturefulnessSpeed of executionTime spent codingRobustnessFlexibility

Now, remember, these dimensions are all in opposition to one another. You can spend three days writing a routine which is really beautiful and fast, so you've gotten two of your dimensions up, but you've spent three days, so the "time spent coding" dimension is way down.So, when is this worth it? How do we make these decisions? The answer turns out to be very sane, very simple, and also the one nobody, ever, listens to: Start with brevity. Increase the other dimensions as required by testing.

I couldn't agree more. I've given similar advice when I exhorted developers to Code Smaller. And I'm not talking about a reductio ad absurdum contest where we use up all the clever tricks in our books to make the code fit into less physical space. I'm talking about practical, sensible strategies to reduce the volume of code an individual programmer has to read to understand how a program works. Here's a trivial little example of what I'm talking about:

if (s == String.Empty)if (s == "")

It seems obvious to me that the latter case is