Hacker News new | past | comments | ask | show | jobs | submit login
The Tao of Programming (1987) (textfiles.com)
245 points by ghosthamlet on Jan 29, 2019 | hide | past | favorite | 57 comments



Ha! I first came across this verse (7.2) early in my career, circa 2001 or so, and it always stuck with me.

> 7.2

In the East there is a shark which is larger than all other fish. It changes into a bird whose wings are like clouds filling the sky. When this bird moves across the land, it brings a message from Corporate Headquarters. This message it drops into the midst of the programmers, like a seagull making its mark upon the beach. Then the bird mounts on the wind and, with the blue sky at its back, returns home.

The novice programmer stares in wonder at the bird, for he understands it not. The average programmer dreads the coming of the bird, for he fears its message. The Master Programmer continues to work at his terminal, unaware that the bird has come and gone.


That feels like kind of a dangerous advice. Seems to me that means that if Google announces that they want to roll out a full cencorship in China so that they can enter the market over there, the most prominent developers will just silently continue to work on it..?


I think the context of where this came from helps explain the quote (beginning of chapter 1 of Zhuangzi):

> IN THE NORTHERN DARKNESS there is a fish and his name is K'un.1 The K'un is so huge I don't know how many thousand li he measures. He changes and becomes a bird whose name is P'eng. The back of the P'eng measures I don't know how many thousand li across and, when he rises up and flies off, his wings are like clouds all over the sky.

The big bird is so huge that it is alien to the smaller ecosystems below it. In the same way, CEOs and upper management are so "huge" (at the top of the hierarchy) that their choices seem incomprehensible from the point of e.g. a junior dev. Maybe they good or bad choices, but in any case their day-to-day choices are different from a single developer's.

> The cicada and the little dove laugh at this, saying, "When we make an effort and fly up, we can get as far as the elm or the sapanwood tree, but sometimes we don't make it and just fall down on the ground. Now how is anyone going to go ninety thousand li to the south!"

Here the small creatures make fun of the bird, not exactly understanding its world or experiences, but instead comparing the Peng's actions and natural inclinations to their own. A dove has no need to travel thousands of miles, which is a short trip for the Peng.

In the GP's comment, the novice programmer "stares in wonder at the bird" because - in the same way - his day-to-day experience is so different from the people who run Corporate Headquarters. The Master Programmer knows that CH is "doing it's thing" so to speak, or just following its own nature. Any attempt to understand the machinations and decisions of upper management from the viewpoint of a programmer simply doesn't work, so they do not bother to think about it.


Like any general teaching, you are allowed to use your judgement to adapt to context, and choose exceptions.

There is not a single thing I know that is always true.

Those sentences are applicated to themself.


They won't even start; theirs is the more important work.


Because the master can even hit the seagull with his Slingshot, that the Corp. H.Q. will not say anything to make him angry and make him think about the others H.Q.s that exist and make him wonder the salary there.


I am already loving it. "1.2

The Tao gave birth to machine language. Machine language gave birth to the assembler.

The assembler gave birth to the compiler. Now their are ten thousand languages.

Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.

But do not program in COBOL if you can avoid it. "



And without the various typos, to boot.


Said typos are (for the most part) on purpose.

https://news.ycombinator.com/item?id=19024327


If they were deliberate, then that would imply that their existence is perfection. To recognize that the typos were accidental mistakes by the human typing them is to recognize the Tao.


Much better! The OP’s version was not very mobile friendly.


The Tao of programming is Nigel Tao, long one of the main people on the Go team. Not to be confused with the Tao of mathematics, who is of course Terence Tao, Nigel's brother.


Also not to be confused with another brother - Trevor, an autist savant with double degree in mathematics and music, as well as a chessmaster.

That's what you get when a pediatrician and a mathematics/physics teacher have kids. Who would've known. (Not trivializing at all. Complimenting, if anything.)

They're so cute too. https://media.gettyimages.com/photos/brilliant-brothers-dr-t...


> Only a fool expects rational behavior from his fellow humans. Why do you expect it from a machine that humans have constructed? Computers simulate determinism; only Tao is prefect.

Spelling as plot device, so underrated.


That reminds me of a tagline I saw on a movie poster for a Sci Fi movie a long time ago. Something along the lines of: "The computer is in complete control, mistakes are impossble."

Hmm, can't recall what the name of the movie actually was.


> "Spelling as plot device"

I'm curious, what do you mean ? could you point me somewhere to learn about it ? is it something like or related to a McGuffin ?


The typo "prefect" at the end is part of the plot, that nobody id perfect.


Apparently the typo was "fixed" in the html version http://www.mit.edu/~xela/tao.html maybe whoever ported didn't catch the subtle double meaning ? Or was just a typo.


Their/there/they're confusion is also an expression of the Tao.



And for the best of both worlds: http://www.catb.org/jargon/html/koans.html

The first one's my favorite:

    A novice was trying to fix a broken Lisp machine by turning the power
    off and on.

    Knight, seeing what the student was doing, spoke sternly: “You cannot
    fix a machine by just power-cycling it with no understanding of what
    is going wrong.”

    Knight turned the machine off and on.

    The machine worked.


Another of my favorites.


When the specification is defined by the program, it cannot have bugs.


Did he know Python already in the 80s?


Yes, because Python is just a small subset of CommonLisp with bad syntax.



I prefer "The UNIX Koans of Master Foo" http://catb.org/esr/writings/unix-koans/


Those are actually pretty terrible, probably written after reading GEB. ESR is trying to emulate Hofstadter but isn't clever enough, so they are all based on a one-trick pony, search-and-replace joke that wears thin quickly.

2/10, would have preferred bobcat?


The housecat may mock the tiger, but it will not turn his purr into a roar.


I was not until many years after I read this until I realized it was an actual book:

https://en.wikipedia.org/wiki/The_Tao_of_Programming

I now own a copy, and it is glorious.


I really get 4.4 for some reason:

> True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke.

I've started to debug like this. Sure, I also actively debug by adding print statements and manipulating my code. But there's something to be said about just thinking and waiting for the answer.


Interesting. Generally, what I do as the first step is immediatelly connect a remote debugger and debug the piece of code that I think is problematic (which is correct in around 90% of the times for me). Then, the answer is generally trivial. I started doing this because it felt way more time efficient than staring into the code and trying to think what goes wrong over there.


I've found that sometimes there's additional benefit to the "take a step back and think about what the code is actually doing" step, in the sense that doing so helps gain better knowledge about how the code actually works and often reveals opportunities to simplify the design (sometimes in such a way that ends up inadvertently fixing the problem, though admittedly it'll more often just introduce more bugs ;) ).


I’ve stuggled with 7.1.

The shelter a massive enterprise with a sane middle-manager provides can be a beautiful place for innovation and creative freedom.

However, the older I’ve become the less corporate bs and re-orgs I’m prepared to live through.

Maybe my Tao is slipping...


The trick is to ignore the corporate BS and re-orgs, since they matter not in the grand scheme of things.

In the now-more-prescient-than-ever words of Grace Slick:

    Someone's always playing corporation games
    Who cares, they're always changing corporation names


Lots of previous discussions: https://hn.algolia.com/?query=The%20Tao%20of%20Programming%2...

(Edit: I mention links like this just in case people are interested. If we were treating the post as a duplicate it would be marked [dupe].)


I used to own the book but left it at my desk when I quit a job in the hope that it would help the next poor victim for the same position.

Reading the whole thing, I'm again surprised at how much wisdom is hidden in there.

Shouldn't that be:

"Time for you to return."

though?


I'm not sure whether you're aware that "time for you to leave" is a reference to the old Kung Fu TV show[0].

I also don't know enough about systems programming to be sure whether RET or LEAVE is the right instruction there :P

[0]: https://www.youtube.com/watch?v=wQBVYko_uhQ#t=46s


> The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages.

Heh, nothing changed.


You left out the most important line in the whole treatise :)

> But do not program in COBOL if you can avoid it.


Cobol does not look that bad given the mess we are in today.


nice, I haven't seen this in years.

I really laughed at the bit about 'structured programming.' As it turns out, long ago, structured programming was a thing.


I remember a story about a professor: one student of his turned in a program neatly divided in functions for each bit of functionality, and ‘main’ consisted only of function calls. The professor was aghast at this waste of resources and sent the student back to rework the program.

This was related much later by the professor himself, and he was fully aware of how prescient the student was.


It still is a thing. Today we just call it "programming".


And how do you call it if is Not structured nowadays?


Javascript.


spaghetti.


Install the fortune package on Linux, and add "fortune" to your .bashrc file. You'll see them occasionally.


I really enjoy the synthesis of Eastern and Western, Ancient and Modern. Pulling up something from before I was born makes this post that much better.


4.1 is like wtf/min https://www.osnews.com/story/19266/wtfsm/ (not xkcd)

It's not the law of no astonishment.


I bought a physical copy of this (still have it around somewhere) after reading many of the koans from /usr/bin/fortune


When i dreamed the code, Maybe it is the code dreamed me.

When Worlds end, The Rest Is Silence of Code.


sheesh - wandered around the site and found angela.txt, an ascii nude (which i now know was/is a thing and wish i didn't). and people wonder why other people think on-line culture is a cesspool.


I first read that on POTS with my '486 . Just now, rocked and laughed just like Chris Griffin when he noticed the Jingled keys. Thanks.


like


awesome!!!




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

Search: