Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Programmers' Proverbs (I'd love some input) (github.com/antjanus)
36 points by antjanus on April 18, 2014 | hide | past | favorite | 54 comments


Variations on a theme:

  The best code is the code never written.
  The most secure code is the code never written.
  The most reliable code is the code never written.
  The fastest code is the code never written.
  Less is more.
Related to the classic quote:

"It seems that perfection is attained, not when there is nothing more to add, but when there is nothing more to take away." -Antoine de Saint-Exupery

And some others:

  Days of development can save hours of planning.
  Your real problem is that you don't understand your problem.
  Reading code is harder than writing code.
Could get a LOT based on this: Frequently Forgotten Facts about Software Engineering http://www.eng.auburn.edu/~hendrix/comp6710/readings/Forgott... [PDF]

(Also in book form, "Facts and Fallacies of Software Engineering" Robert Glass)


Great theme. I'm reminded of a Gordon Bell quote found in Jon Bentley's 'Programming Pearls': 'The cheapest, fastest and most reliable components of a computer system are those that aren't there.'


I've heard variations on them for some time, It's possible I or others got them from there. Thanks much for the citation.


From Clojure/Emacs cider-words-of-inspiration...

"The best way to predict the future is to invent it. -Alan Kay"

"A point of view is worth 80 IQ points. -Alan Kay"

"Lisp isn't a language, it's a building material. -Alan Kay"

"Simple things should be simple, complex things should be possible. -Alan Kay"

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight. -Bill Gates"

"Controlling complexity is the essence of computer programming. -Brian Kernighan"

"The unavoidable price of reliability is simplicity. -C.A.R. Hoare"

"You're bound to be unhappy if you optimize everything. -Donald Knuth"

"Simplicity is prerequisite for reliability. -Edsger W. Dijkstra"

"Deleted code is debugged code. -Jeff Sickel"

"The key to performance is elegance, not battalions of special cases. -Jon Bentley and Doug McIlroy"

"First, solve the problem. Then, write the code. -John Johnson"

"Simplicity is the ultimate sophistication. -Leonardo da Vinci"

"Programming is not about typing... it's about thinking. -Rich Hickey"

"Design is about pulling things apart. -Rich Hickey"

"Programmers know the benefits of everything and the tradeoffs of nothing. -Rich Hickey"

"Code never lies, comments sometimes do. -Ron Jeffries"

"The true delight is in the finding out rather than in the knowing. -Isaac Asimov"

Source: https://github.com/clojure-emacs/cider/blob/master/cider-cli...


A few more:

* Read whitepapers, not blog posts

* "Just ship" is no substitute for design

* Attempt personal projects that are big enough to scare you

* Today's fashion is tomorrow's legacy

* Learn weird languages to broaden your horizons

* Industry focuses on technologies at the expense of practice and discipline


“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” ― C.A.R. Hoare

http://www.goodreads.com/author/quotes/266154.C_A_R_Hoare


Here's mine, doubtless it's not original but it is born from my experience:

"The better the job you do, the more they discount the level of difficulty"


"It takes a lot of work to make it look easy."


Added! I updated it to fit the style of the others a little better.


Hey thanks! Probably the first time I've been quoted anywhere!


You're welcome to make a pull request so that the quote is associated with you.


"Spell-check is your friend."

I prefer koans to proverbs. Proverbs strike me as code without tests; they may seem superficially correct, but where's the proof?

Koans get you to think though a situation and (hopefully) arrive at an understanding.

http://en.wikipedia.org/wiki/Hacker_koan


I never knew about those but I like proverbs better, simply because of how short they are and how one can easily connect with them.


I love this one (saw it in one of the pull requests)

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan


Show me you algorithm and I will remain puzzled, but show me your data structure and I will be enlightened.

-- Old programming proverb

You should totally read codelesscode too - http://thecodelesscode.com/


"If the documentation is clear, concise, and easy to understand it is out of date." -- Me

This is a corollary of the much more general law: "All documentation is out of date."


Selections from Paul Graham's quotes page...

"Programs must be written for people to read, and only incidentally for machines to execute." - Abelson & Sussman, SICP, preface to the first edition

"That language is an instrument of human reason, and not merely a medium for the expression of thought, is a truth generally admitted." - George Boole, quoted in Iverson's Turing Award Lecture

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay

"Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You've solved the wrong problem. Work hard to improve." - Alan Perlis

"Premature optimization is the root of all evil (or at least most of it) in programming." - Donald Knuth

"Lisp has jokingly been called "the most intelligent way to misuse a computer". I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts." - Edsger Dijkstra, CACM, 15:10

"The key to performance is elegance, not battalions of special cases." - Jon Bentley and Doug McIlroy

"Change breaks the brittle." - Jan Houtema

"Your twenties are always an apprenticeship, but you don't always know what for." - Jan Houtema

"Focusing is about saying no." - Steve Jobs

Source: http://paulgraham.com/quo.html


Not sure it 100% fits here, but one that's stuck with me for years was said my my P.E. teacher:

"Practice doesn't make perfect, practice makes permanent"


Love it! Same in music: hours spend mangling a piece makes you good at mangling that piece. Much better to do deliberate practice - slowly move through nailing every phrase, every note. Then speed up.


Variation on the theme - "Perfect practice makes perfect".


Selections from Paul Graham's Lisp quotes page...

"Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp." - Philip Greenspun

"Lisp isn't a language, it's a building material."- Alan Kay

"The greatest single programming language ever designed" - Alan Kay, on Lisp

"Lisp is a programmable programming language." - John Foderaro, CACM, September 1991

"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot." - Eric Raymond, "How to Become a Hacker"

"Lisp is a programmer amplifier." - Martin Rodgers (first said by Chuck Moore about Forth)

Most papers in computer science describe how their author learned what someone else already knew. - Peter Landin (This is a paraphrase. I'd appreciate it if anyone can tell me the exact quote. - pg)

"The only way to learn a new programming language is by writing programs in it." - Kernighan and Ritchie

"SQL, Lisp, and Haskell are the only programming languages that I've seen where one spends more time thinking than typing." - Philip Greenspun

"The continuation that obeys only obvious stack semantics, O grasshopper, is not the true continuation." - Guy Steele

Source: http://www.paulgraham.com/quotes.html


Coding, committing, pushing. Pick two (when drinking).


Jon Bentley [1] had a whole chapter in More Programming Pearls: Confessions of a Coder [2], called Bumper-Sticker Computer Science, which was of this sort. There seems to be a copy of it online [3].

[1] http://en.wikipedia.org/wiki/Jon_Bentley

[2] http://www.amazon.com/More-Programming-Pearls-Confessions-Co...

[3] http://quotes.cat-v.org/programming/bumper-sticker-computer-...


Is having a beard something that all programmers should strive for? Or just the men?


as a man with little to no beard I think that greybeard is just a reference to wise old people ala Gandlaf. I guess grey hair could work too?


OP here, I can't grow a beard, but yeah, that's pretty much what it is.

It's a reference to how "beards" have become a symbol in popular culture associated with wisdom. The highest level of such beardage is the "greybeard" while the lowest is "neckbeard" (associated with people who don't know anything but pretend to).

Anyways. Here's more info on it:

* http://www.wired.com/wp-content/uploads/blogs/wiredenterpris...

* http://24.media.tumblr.com/727eff26ad15978277db9525c354f75d/...

* http://www.diebenow.com/sites/default/files/Web-Developer-Em...

And a guide to Beard of Silicon Valley: http://www.wired.com/2012/11/20-12-st_beardtaxonomy/


It's been around for a long time. Think of the stereotypical medieval wizard or Greek philosopher. What does he always have? Bingo.

For most of human existence, listening to the people with grey hair (male and female) was the most reliable way of learning how to survive. They'd been there, done that, and lived to tell the tale.

It's only in recent history that things have started changing so fast that age==wisdom is no longer always true (though I think it still is more often true than some of the younger folks would like to believe).

Edit: a previous poster mentioned Gandalf. The Gandalf character wouldn't work nearly as well if he had a nose ring and a bunch of trendy facial tats, right?


Deprecated is a synonym for correct.


"Learning obscure and strange languages, yields better understanding and broader horizons" does not, need a comma.


The timeless Epigrams on Programming: http://www.cs.yale.edu/homes/perlis-alan/quotes.html

There's a few dated references that show its origins in 1982 but most of the fundamentals still stand.


A wise old Chinese man once said : To understand recursion, you must first understand recursion.


"It needs more hammock time", a la Rich Hickey's "Hammock Driven Development" (https://www.youtube.com/watch?v=f84n5oFoZBc).


Not really programmer related, but I find these truthy:

- (Flight instructor's mantra): Fly the plane.

- When you find yourself in a hole, stop digging.

- Measure twice, cut once.

- (Paraphrasing Senator Moynihan): Show me the data. You're entitled to your own opinion, but not your own facts.


"The buggiest code is that which has had the most bugs fixed."

or

"Buggy code is buggy."

(That is, having had bugs fixed is an indicator that the code is either complex or poorly written, and is likely to harbor further undiscovered (or newly introduced) bugs.)


Could the first also imply towards that all code is buggy, absence of proof doesn't equal proof of absence. As in, if you don't find bugs yet, it doesn't mean they don't exist.


Au contraire – the evidence of absence of bugs is that the code works. (i.e., to some degree, programs find their own bugs simply by being used.)

Code that has been humming along issue-free is likely either simple, or well-written, and harbors few, if any, bugs. Otherwise, they would have evinced themselves by now.


I believe openSSL has been humming along issue free for quite a while before a somewhat famous bug popped up for some anecdotal evidence at a refutation.


"A framework is an understanding of how things could fit together. When designing these things, it's important to remember that your understanding is incomplete."


Not specific to programming - With excellence comes understanding. With understanding comes excellence. Practice both.


A rule of three: write it the first time, copy it the second time, extract it to a common routine the third time.


Always mount a scratch monkey.

http://edp.org/monkey.htm


"Whatever can be done FOR you automatically can be done TO you automatically." --David Wyland


I personally love "Facebook wasn't built in a day"

gonna start saying it in real life


Thanks! :) It reminds me of the craigslist posts about how an "idea guy" wants to build a site "just like facebook but better" and they're offering a few hundred dollars. "You can build that in less than a week, right?"


If you make it "better" by removing features, you might get closer than you expect...


Don't warn programmers because they will ignore them anyway.


Automate Everything/Automate at the First Sign of Resistance


There's nothing more permanent than a temporary solution.


- When all else fails, RTFC

Also, for TDD enthusiasts:

- Test first, ask questions later


For performance: measure once, cut twice.


you got one wrong. i think it is supposed to read:

"ONLY commit on master when drunk."


And that's when I'd say: "Drinking may cost you your job, no matter what profession"


"Nothing good happens after your second drink at work functions."


Simple isn't easy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: