…meie igapäevast IT’d anna meile igapäev…


Quotes on programming

Filed under: Isiklikud,Programmeerimine — Sander @ 14:47:21
Tags: ,
  • There is nothing worse than a programmer who compiles the spec into the code, without asking “could the workflow be better?”, “could this be a bug in spec?” or even “does this make any sense whatsoever?”

  • Bad programmers tend to gravitate towards management. Too often they will become mediocre project managers, then bad department managers and finally horrible CTOs.

  • (on Robert Martin’s “Clean Code”) “Clean Code” doesn’t tell you how to write good code, nor maintainable code. Instead, it teaches you to write consultant code, or “cuckoo code”: you drop a nice shiny egg into the nest and fly away, leaving others to maintain the ugly monster that hatches.

  • Every programmer writes bad code sometimes. But when you have to ask "doesn’t he know better or is he trying to sabotage the project?", you’ve found a truly horrible coder.

  • If you are looking at your own code from two years ago and it looks fine, it doesn’t mean you were a good programmer two years ago. Quite the opposite, it means you haven’t grown as a programmer within these two years. You haven’t learned anything.

  • Code review is like a pair of pants. If you work at home, pants are optional. But if you are in public, you’d better make sure you have pants on, even if no one looks at you.

  • Too often the only reason teams use agile programming is to be able to say that they are using agile programming.

  • But what is there to love about the code? It is the same excitement that a poet gets from writing a poem, or a painter from painting. It is the act of creation, the “develop” part of the word “developer”. We write some lines of text, which abides to the certain rules, and suddenly ex nihilo! we have a website, a video player, a database engine or something else.

  • The point where I’m getting to is that you can be eager and write more code. Or you can be lazy and figure out a way to write less code. Being lazy is a good thing in a programmer. It forces us to find patterns and promotes code reuse. It makes us more effective. It makes us better.

  • A programmer should be smarter than his tools. Don’t expect the compiler to fix your bad code.

  • If the comment does not match the code, it is the comment that is correct and code that is wrong.


I’ll post these mostly so I would remember them and re-use when appropriate.

I think these quotes are mine, from various blog posts, presentations and discussions. If I have inadvertently picked up or rephrased someone else’s text, please let me know in the comments.


4 kommentaari »

  1. Your list made me laugh :) Could you elaborate on “cuckoo code” though. I read Robert Martin’s book a couple of years ago and thought it was pretty SOLID (pun intended) :P

    Kommentaar kirjutas Wayne — 2014-02-15 @ 16:25:05 | Vasta

    • I am glad at least someone got a chuckle out of those.

      As for the Clean Code, my issue with it that it mixes good advice with bad – and especially for a new(er) programmers, it is hard to realize what to follow, what to ignore and why. E.g. “method should do just one thing” – good, “and method should be really, really short” – unmaintainable spaghetti code (not direct quotes). Different chapters vary in quality a lot.

      Most of the book based on an anecdotal or personal evidence. What worked for Robert Martin (or the employee of his company writing that particular chapter) is served as universal, absolute truth, and not one-off solution. Compare it to Code Complete, where every claim is backed by scientific article or research.

      Also, his stance on comments just makes me want to scream at Uncle Bob, “The proper use of comments is to compensate for our failure to express yourself in code. Note that I used the word failure. I meant it. Comments are always failures.”

      No, they are not. There are bad comments, useless comments and so on… but there is nothing that makes understanding code and its purpose better than a good comment. Code Complete has a great chapter on commenting code – what to comment, why to comment, what not to comment, what types of comments are there etc. The code comments chapter in Clean Code is less than 20 pages, with one referenced source (Kerrigan and Plaughter, 1978).

      For me, Code Complete is and remains for the foreseeable future, the handbook for good and maintainable code, and programming practices. I really wish, though, that Steve McConnell would do an updated version of the book, as even the second edition is now 10 years old (gods, typing that made me feel old, too). Not that the basics of good code ever change, but the industry itself has changed a lot in ten years, and it would be nice if Code Complete would reflect that, too.

      I think the popularity of Clean Code largely stems from the fact that it is so easy to read and offers deceptively simple recipes, whereas Code Complete is not easy to read and offers you not ready-bake recipes but ideas, that the reader has to formulate into the practices themselves. However, as most of the programmers never read a book about programming after university, I guess that even Clean Code is better than nothing.

      But in the end, what do I know…

      Kommentaar kirjutas Sander — 2014-02-15 @ 18:13:26 | Vasta

  2. […] the last post had my own sayings, this one has some of my favorite programming quotes from others. Even the first […]

    Pingback-viide kirjutas Bright sayings of bright people: programming quotes | ...meie igapäevast IT'd anna meile igapäev... — 2014-02-19 @ 13:56:44 | Vasta

RSS feed for comments on this post. TrackBack URI

Lisa kommentaar

Täida nõutavad väljad või kliki ikoonile, et sisse logida:

WordPress.com Logo

Sa kommenteerid kasutades oma WordPress.com kontot. Logi välja /  Muuda )

Twitter picture

Sa kommenteerid kasutades oma Twitter kontot. Logi välja /  Muuda )

Facebook photo

Sa kommenteerid kasutades oma Facebook kontot. Logi välja /  Muuda )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: