HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
The Clean Coder: A Code of Conduct for Professional Programmers

Robert Martin · 3 HN points · 14 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "The Clean Coder: A Code of Conduct for Professional Programmers" by Robert Martin.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Programmers who endure and succeed amidst swirling uncertainty and nonstop pressure share a common attribute: They care deeply about the practice of creating software. They treat it as a craft. They are professionals. In The Clean Coder: A Code of Conduct for Professional Programmers, legendary software expert Robert C. Martin introduces the disciplines, techniques, tools, and practices of true software craftsmanship. This book is packed with practical advice–about everything from estimating and coding to refactoring and testing. It covers much more than technique: It is about attitude. Martin shows how to approach software development with honor, self-respect, and pride; work well and work clean; communicate and estimate faithfully; face difficult decisions with clarity and honesty; and understand that deep knowledge comes with a responsibility to act. Readers will learn What it means to behave as a true software craftsman How to deal with conflict, tight schedules, and unreasonable managers How to get into the flow of coding, and get past writer’s block How to handle unrelenting pressure and avoid burnout How to combine enduring attitudes with new development paradigms How to manage your time, and avoid blind alleys, marshes, bogs, and swamps How to foster environments where programmers and teams can thrive When to say “No”–and how to say it When to say “Yes”–and what yes really means Great software is something to marvel at: powerful, elegant, functional, a pleasure to work with as both a developer and as a user. Great software isn’t written by machines. It is written by professionals with an unshakable commitment to craftsmanship. The Clean Coder will help you become one of them–and earn the pride and fulfillment that they alone possess.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I have a feeling you are selling yourself short (and being overly hard on yourself, something I'm well acquainted with but more easily recognize in others).

Based on your technical focus, you're clearly (in my opinion) way above the "average" developer in technical ambition and appreciation for computer science.

A bit of unsolicited advice: If you organize your preparations around the concept of providing value to a prospective employer, rather than merely getting hired to write code, then I bet your outlook will change. One book (and definitely not the only one) that can help with that is Bob Martin's The Clean Coder: A Code of Conduct for Professional Programmers:

https://www.amazon.com/Clean-Coder-Conduct-Professional-Prog...

- don't only worry about code or getting features shipped, but about the process, how to deliver quality.

- behind any given reason, there is a complex network of real reasons. You don't need to second-guess any decision/order/suggestion, but it helps understanding.

- most user stories / user requests are raw diamonds waiting to be polished. ("What do they really want me to solve")

Essential reading list:

- Clean Coder and Clean Code https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma... https://www.amazon.com/Clean-Coder-Conduct-Professional-Prog...

- Test Driven Development by Kent Beck https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/...

yn37
Yes, yes and yes.

It's funny because technically, none of these three things are part of an engineer's job.

But once you do them, you start noticing how you eventually get to: - save yourself time - save your customer money - avoid unnecessary complications down the road - offer useful comments / feedback / critiques / alternatives, when need be (because you better understand the decisions made around you) - help your customer or team better understand what they really want - find yourself in a better position to transition to other roles, if you choose to

Btw, I wrote a blog article a few days ago about exactly this: http://claudiu.dragulin.com/2016/12/02/dont-just-code-solve-...

cwisecarver
This: most user stories / user requests are raw diamonds waiting to be polished. ("What do they really want me to solve")
Sumaso
I really didn't enjoy the clean coder. There was a strong feeling of "Management is trying to screw you over, this is how to protect yourself from them". If your really working in that environment, you should probably just leave rather than having to resort to tricks and techniques to manage management. There seemed to be some other silly advice (I.E. I used to listen to music and code until 4AM and then not remember what I wrote. Clearly the music was to blame.)

I'm sure that Rob is a great employee, and the book does have a few good points, but I'm not sure I took away a whole lot from it.

data_hope
interesting, reading your comment, I would never guess that we are speaking about the same book. I found it to be more of a guidebook to precise communication with colleagues and management.
read clean code https://www.amazon.com/Clean-Code-Handbook-Software-Craftsma...

and clean coder https://www.amazon.com/exec/obidos/ASIN/0137081073/metafilte...

If you follow the (admittedly pretty extreme) advice in these books you will be in the top 10% at least.

That's fair. I think the vague approach of "they were clearly lacking skills" was what triggered my response.

Understandable. My comment was already getting to long, and I didn't have space to explain every detail.

BTW, if you feel members on your development team aren't capable of self-managing, this book is really good to help you develop those skills: http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

Self-management is something every programmer should have in their skill-set.

jdmichal
Surprisingly, never heard of that book. I'll definitely be taking a look, thanks.
ktRolster
Here's another good book I recommend while we're at it: http://www.amazon.com/dp/0996193308

(disclaimer: I wrote it :)

When you start looking for jobs, only join a company that does TDD and pair programming. Ask about this in interviews.

TDD helps you break down tasks and, when you lose focus, you can regain it by re-running your test suite and seeing which test fails.

Pair programming help you because:

- They'll tend to have closer to a 10-6 schedule rather than encouraging you to stay up late.

- When talking through the problem with a colleague, you break the task down more easily and get through whatever mental block you have.

- You can't get distracted when someone else is right there.

It may be harder to find a company that does this because many folks think that they can move faster if they build something the "quick and dirty" way. "Quick and dirty" doesn't exist for you. "Quick and dirty" means that the project either fails outright or is one that you start procrastinating on until you get fired.

Take a look at the book The Clean Coder (http://www.amazon.com/The-Clean-Coder-Professional-Programme...). It talks about procrastination and how to overcome it.

For a practical introduction to TDD, I'm a fan of Test-Driven Web Development with Python. It is Free. http://chimera.labs.oreilly.com/books/1234000000754

tedmiston
Re: pair programming

The Pragmatic Bookshelf published a neat related book that's a light ~100-page read called Remote Pairing: Collaborative Tools for Distributed Development [0]. It also mentions a few companies that do pair programming exclusively. Pivotal Labs is one that comes to mind.

0: https://pragprog.com/book/jkrp/remote-pairing

You need to respect yourself to get that. If you're willing to work more than 8 hours, managers will take it from you.

There's a good book about how to prevent managers from walking all over you: http://www.amazon.com/The-Clean-Coder-Professional-Programme...

The opening chapters describe programmers in crunch time, and compare them with the lawyers at the same company who leave promptly on time. The rest of the book discusses how to achieve that for yourself.

BuckRogers
Interesting perspective. I've found that certain places I've worked, they overload you and do everything they can to keep you over time.

Usually the scenario that other people lay out is that you have to stay late and put in that time your first year or two. Then you can go back to being a 9-5 (though in many orgs this shifts from 11-7 or 10-6 to give the illusion you're working later rather than walking out at 5PM).

I disagree with this because then you set a standard that you'll stay late, but on the other hand you can't be let go if you have mouths to feed.

I'm more than strong enough to walk out the door, but the thing I think you're missing is that it's usually NOT the manager at fault here. It's the other employees. They encourage this culture, either brainwashed or hoping it will get them ahead.

American work culture is completely upside down. Bottom line is that the org and laws shouldn't force you to stand for yourself in this regard. Every 1 minute of overtime should result in severe penalties for anyone who has any employee go over. So much that they're hustling you out the door at 5PM. That's how it is in other places, like France. A place I've both lived and worked.

ktRolster
but the thing I think you're missing is that it's usually NOT the manager at fault here. It's the other employees. They encourage this culture, either brainwashed or hoping it will get them ahead

tbh it doesn't really matter to me who gets the blame....the only thing I care about is what I can do to fix the situation.

BuckRogers
Yeah you're right. I'm going to check into that book and see what it has to say. I'm in a good work situation myself right now, but mostly due to a manager who is pretty easy going. I worked in an office for 2 years and 3 years from home now, and I'm very responsible and always get everything done, so he has no worries.. it just works. But with a new workplace I'd be back in the furnace.
The Clean Coder is a good read for starting programmers. It goes beyond code to what it takes to be a software professional.

http://www.amazon.com/The-Clean-Coder-Professional-Programme...

atsaloli
Excellent. I'd also recommend "Code Simplicity: The Fundamentals of Software"

http://www.amazon.com/gp/aw/d/B007NZU848?ie=UTF8&redirectFro...

codyb
As well as the extensively reviewed, recommended, and appraised "Code Complete" [0] by Steve McConnell

I'm working my way through it now (1+ year of professional experience) and it is a magnificent way to improve the quality of your code. I read it off and on, my goal is only 40 pages a week so that I'll make sure to find the time to do it (I'm doing a masters program and enjoy living in NYC too so setting huge goals doesn't work well for me).

Every time I crack it open, I find myself inspired to write better, clearer, and more concise code. Sometimes you just need a nudge to get back into doing things you already know you should be doing.

Finally, constantly learning, I think, is the best way to become a proficient, and then skillful professional software engineer. Many programmers become proficient and then level off. And that's good enough. But if you truly wanted to become one of the top 5% in your field you need to do something called deliberate practice. Reading 'Talent is Overrated' [1] really exposed me to the theory of constantly challenging yourself in order to grow. I really recommend it, I find myself trying to apply the theories to all areas of my life.

[0] - http://www.amazon.com/Code-Complete-Practical-Handbook-Const...

[1] - http://www.amazon.com/Talent-Overrated-Separates-World-Class...

Check out the guys over at 8th light: http://blog.8thlight.com/

Uncle Bob in particular (the author of Clean Code[0], The Clean Coder[1], and the Clean Coders videos[2]) is a lot like Wozniak.

[0] http://www.amazon.com/Clean-Code-Handbook-Software-Craftsman...

[1] http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

[2] http://cleancoders.com/

raverbashing
Yeah, what's missing is a software build by Robert Martin that is used and admired by several people.

Considering software is much more easily distributable than hardware makes the fact that there is none works against him.

Robert Martin may be good at Marketing, but I've never seen something from him that I liked.

Closer to Woz would be people who ACTUALLY shipped working code (Linus Torvalds as an example) then people who like to complain about code not having enough test coverage

So yeah, I hold no respect for this "Uncle Bob" guy

oblique63
I was responding to the parent who said:

I wish there were (more?) people who feel about software like Steve Wozniak feels about hardware. Because it is an art, a pursuit of perfection.

Didn't mention anything about shipping popular software, so I'm not sure where you're getting that metric from, but it's completely irrelevant to what OP was describing, and uncle bob fits OP's description perfectly. His talks show how passionate he is about code as a craft, and how he wants to strive for perfection. The popularity of his code doesn't take away from that (not to mention that Jobs played a significant role on Woz's end for that, so it's not exactly an apples-to-apples comparison either). The fact that Martin has good rationales to support his ideas is just an added bonus in that regard. I get the impression that he's disliked more just because people have a fear of falling into the 'java culture' than because of his actual arguments.

Also, Linus is nothing like Woz other than their shipping of popular products. Nothing against the guy, I'm sure we're all grateful for his work, but he doesn't seem to display the same kind of childlike wonderment of his craft like woz does.

Any chance I get I make an effort to suggest this book. There is also another book by Robert C. Martin which I suggest called The Clean Coder[2].

[2]http://amzn.com/0137081073

May 13, 2014 · ChrisGaudreau on The DHH Problem
> Because DHH is just one person. And he only has DHH's experiences.

Yep. Uncle Bob is one person, too. tl;dr Think for yourself and don't listen to somebody just because they hurt your feelings.

> To pick a topical example: Is TDD hard in Rails apps because TDD is dead or because Rails makes TDD hard?

This is a misrepresentation of what DHH has said [1], which is that strict adherence to TDD can make your designs worse:

> Over the years, the test-first rhetoric got louder and angrier, though. More mean-spirited. And at times I got sucked into that fundamentalist vortex, feeling bad about not following the true gospel. Then I'd try test-first for a few weeks, only to drop it again when it started hurting my designs.

> Used as a hammer to beat down the nonbelievers, declare them unprofessional and unfit for writing software. A litmus test.

If you watch the conversations between DHH, Martin Fowler, and Kent Beck, it seems to me that they all agree: testing is good, test-driven design can be bad, and mocking everything is bad [2][3].

I took some time last week to re-read Uncle Bob's book, Agile Software Development, Principles, Patterns, and Practices [4], and Kent Beck's book on TDD [5]. There was a huge difference: Uncle Bob focuses on test-driven design, while Kent Beck focuses on test-driven development. Uncle Bob claims that test-driven development (especially through mocks) universally improves your design, because it reduces coupling and enables refactoring. Kent Beck talks about productivity, certainty, refactoring, and documentation. Uncle Bob says most of those things are just a side-benefit: the real point of TDD is decoupled design.

Uncle Bob's other book, The Clean Coder [6], berates people who do not strictly adhere to test-driven design: if you don't do it, you are unprofessional (he mentions this repeatedly). He says that TDD being universally good is a fact, and anybody who says otherwise is just ranting.

> Nowadays, however, they are just rants. The bottom line is that TDD works, and everybody needs to get over it.

> TDD is the professional option.

> It could be considered unprofessional not to use it.

The bottom line is that developers should listen to each opinion and use their head. Don't be hurt when somebody calls you unprofessional for not following the One True Gospel™ and mindlessly adopt practices. Don't be hurt when somebody says that mindlessly following those practices is counterproductive. Using your head is about the most professional thing you can do.

[1] TDD is dead. Long live testing. http://david.heinemeierhansson.com/2014/tdd-is-dead-long-liv... [2] Mockists Are Dead. Long Live Classicists. http://www.thoughtworks.com/insights/blog/mockists-are-dead-... [3] Is TDD Dead? https://www.youtube.com/watch?v=z9quxZsLcfo [4] Agile Software Development: Principles, Patterns, and Practices. http://www.amazon.com/Software-Development-Principles-Patter... [5] Test Driven Development By Example. http://www.amazon.com/Test-Driven-Development-By-Example/dp/... [6] The Clean Coder. http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

Super interesting post! I'd have mentioned Unit tests as another measure to tackle uncertainty. Simple, boring unit tests (reminds me of this post[1]). Maybe he just assumes those will exist when professional engineers write code. [2]

[1] http://robertheaton.com/2013/04/01/check-youre-wearing-trous... [2] http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

nathanmarz
Yes, that's absolutely true. Unit tests are super important in order to guard against future mistakes. Or put another way, they guard against the uncertainty of the code maintaining its current functionality in the future.
lorewarden
Unit tests are of course important, but they don't test for higher level failures like network issues, high latency, increased load, etc. Your components must be designed to be isolated from incidents as much as possible, possibly using the techniques implemented in Hystrix [1], an open source library from Netflix.

[1] https://github.com/Netflix/Hystrix

You shoudl read Robert C Martin's, "A clean coder". http://www.amazon.co.uk/Clean-Coder-Conduct-Professional-Pro...
Aug 28, 2012 · koko775 on I'm Doing It Wrong
I suggest you read this book: http://www.amazon.com/The-Clean-Coder-Professional-Programme...

There's a social factor to being a professional too; it's not just raw programming skill or experience.

A couple of book suggestions:

Fowler's "Passionate Programmer"[1] and Uncle Bob Martin's "Clean Coder"[2] are both excellent books on making a career out of writing software. Not specific to a particular tech, but both quick interesting reads that contain lots of nuggets of great advice.

Good luck on your journey. I'm sending this link to my 13yr old son. He's been exploring Ruby and Processing.

[1] http://pragprog.com/titles/cfcar2/the-passionate-programmer [2] http://www.amazon.com/Clean-Coder-Conduct-Professional-Progr...

Jun 05, 2011 · 3 points, 0 comments · submitted by mrleinad
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.