"Though a program be but three lines long, someday it will have to be maintained."
I am instantly reminded of /bin/true which originally was a 0 byte length file with the execute bits set. Then the edict came down that all programs were to bear an AT&T copyright...
On my machine it's on version 8.32. But it's a program that run many more commands than just true. It's a good reminder that things are always more complicated than they seem.
The source for GNU's true (from coreutils [1]) seems to be 80 lines which is ... infinitely more than 0 of course, but still quite manageable especially for a core utility.
Oh, and I "love" how the coreutils code considers string comparison to be hard enough to warrant a macro (in system.h [2]):
Apart from the enjoyment of revisiting the classics (not too often), these reposts play the important role of brining junior cohorts of users up to speed with the HN culture (which, whatever it is, is one continuation of the lineage of internet lore).
(oh, and in case it isn't clear, the reason I post those 'related' lists is not to point out dupeness (we do that in other ways) but to just give curious readers other things to look at.)
I think because it often means repeating the same points over again. People who contributed to the previous/earlier mentions may feel too exhausted to repeat their view, provide the same useful references again, or fight the same old misconceptions about the topic.
An interesting related example came up this week, when many people posted submissions about the same news story (anti-matter & gravity). However, all the source links were different. Some commenters may want to make the same comment in all the threads. But there may also be different facts or views in the different articles, so they might each provoke different discussions. [FYI: In that case, an authoritative source Nature appears to have 'won', even though it was not the first one posted. It has the most upvotes and comments, compared to wire-blurbing sci-tech news sites just summarizing the raw CERN PR - which was also submitted. The Let 1,000 Flowers Bloom approach worked well in this case].
However, that's really a disjoint case from what we're talking about here, because once enough time has gone by to clear the hivemind caches, an "old" topic becomes "fresh" again for most readers—especially, of course, the ones who never saw the article before, but also for ones who know it as a classic, and so on.
The FAQ defines "enough time" as "a year or so"—we leave some wiggle room there because sometimes it seems to need a bit longer than a year, and sometimes a bit less is ok. This has been the rule on HN for a long time, well over a decade, and it has held up well over time - I think it strikes a great balance.
Nope but someone could certainly build it (which includes us of course). It would be particularly useful to distinguish interesting threads from posts with zero comments or uninteresting comments.
Related-ish, http://www.thecodelesscode.com/contents, "An illustrated collection of (sometimes violent) fables concerning the Art and Philosophy of software development, written in the spirit of Zen kōans.
I was thinking of sharing this with some younger colleagues on slack and paused. Is this a little culturally insensitive by today's standards? I work with someone from China and have no idea what their thoughts on using the Tao like this would be. On the other hand, maybe I'm being overly sensitive.
I'm Korean and if I were to write an article titled "Program like the cowboys of old west" (I've no clue what that article will be about but), would Americans be offended?
Within Korean culture, Doh (도) is a same concept as Tao but I'm not offended.
The big difference is that Tao has religious overtones to it, while cowboys of the Old West, doesn’t. I think OP was more concerned about the fact that this is grabbing something out of another culture and potentially misusing it or using it in a way that others might not approve. A perhaps more apropos analogy might be The Ten Commandments of Programming, which would be OK with most people, although the Torah of Programming, which employed Jewish stereotypes in its telling would be more problematic. And having typed that, this is where the potential issue with the article could lie: less in the title and more in the body and whether it employs stereotypes or culturally insensitive appropriations.
Seems all harmless enough, but I suppose the risk is that when you use imagery of a different culture, you don't know what is held near and dear to people from within that culture, that you might twist out of context in a hurtful way.
> Even as we speak, systems programmers are doing pointer arithmetic so that children and artists can pretend that their x86 chips do not expose an architecture designed by Sauron.
> You might ask, “Why would someone write code in a grotesque
language that exposes raw memory addresses? Why not use
a modern language with garbage collection and functional
programming and free massages after lunch?” Here’s the
answer: Pointers are real. They’re what the hardware understands. Somebody has to deal with them. You can’t just place
a LISP book on top of an x86 chip and hope that the hardware
learns about lambda calculus by osmosis.
> "Program like the cowboys of old west" (I've no clue what that article will be about but)
Probably about doing things without modern sensibilities of safety precautions, skipping normal testing procedures to fix an issue quickly, editing the live production server, stuff like that.
You're overthinking it by a lot. Tao is not an inherently religous concept, at least for most people. Actually the use of "The Tao of..." (...之道) is somewhat common in modern writing.
Source: as a native speaker.
Edit: that being said you might not want to share this book with junior programmers. Not because it's offensive, but that they might think you're a snob.
I don't think it would be culturally insensitive. It's not really a widely practiced religion, and the word is a generic word in chinese that applies to other religions. Jesus said 'i am the way truth and life', they use Tao to translate Way in the chinese bible.
Eh, I probably wouldn't bat an eye, unless if you had a reputation of being culturally insensitive. If you wanna play it safe, you can postmark "... and yes, I agree, it is a bit gimmicky."
Not knowing enough about the thing to know if it's culturally-insensitive is largely what makes it culturally insensitive. You could fix that, but it's easier to stoke random coals on message boards.
This is not a fair take. To know enough about something like a different religion is not something you just go fix. It's not like reading the Wikipedia page on Taoism will give me the cultural context to evaluate how a joke about Taoism will make people feel. Give how often otherwise smart people make insensitive remarks about classes of people they should be familiar with (at least in the US, like women, native Americans, Mexicans, etc) I suspect "fixing it" is harder that you realize and an easier way is to simply ask (which I did).
Making people feel bad is what makes something culturally insensitive. Gaining the perspective necessary to tell when that might be the case isn't so simple that you should sum it up as 'you could fix that'. As you well know it can be nuanced.
Worse, it just occurred to me that you're chastising some one for asking questions in order to 'fix that'. This isn't a 'just asking questions' guy topic so there is really no reason to doubt motives.
> But do not program in COBOL if you can avoid it.
lol
I don't know anything about COBOL but I can feel all of the people that must have triggered. Which is surely why the author included it. Probably like if today that said PHP or Lisp.
COBOL is just a different "styled" language than the Algol family of languages. It is fashionable to dunk on it because of its english-like verbosity which is quite alien to Programmers who initially came from a mathematical background and hence were used to succinct notation. You just have to get used to it. My first job (decades ago on a mainframe) was in COBOL-85 and i found it fine particularly in its strong File handling capabilities which i used to build a simple RDBMS-like system.
Not Lisp, no. COBOL was like picking your nose with boxing gloves on (h/t Michael Pavlinch). It was appallingly clumsy to use. Lisp was like programming directly in the compiler's abstract syntax tree, with both the plusses and the minuses of that. It was almost the opposite extreme from COBOL.
Or to put it a different way: I don't program in Lisp because that language isn't a good fit for how my brain works and the kind of problems I work on. I don't program in COBOL because I don't like reading things that take that long to come to the point.
They're not wrong. I actually tried learning COBOL at some point and it really is pretty bad. On the other hand, ALGOL turned out to be a surprisingly elegant language and I certainly understand how it influenced pretty much everything that we use today. I actually wish C had more of ALGOL in it.
Lisps were never on the same tier as COBOL or PHP.
And those who wrote in Assembly would dunk on those C programmers. And those who wrote in binary would dunk on the Assembly devs. And those that only had 0's would dunk on those binary devs.
Ah ha... :) I wouldn't see division as exact opposite (or symmetrical inverse) of multiplication. Multiplication is both left-distributive and right-distributive, and thus distributive. Unlike multiplication and addition, division is not commutative, neither associative in general.
It seems as my logic holds in the sense and case that it is “an inversion of meaning in some way” - whether that can be argued as an opposite, inversion, chiral disposition towards 0 or away from 0, who knows!
But most intriguingly it applies that subtraction and division don’t have the properties you mention which is a symmetric “anti” feature of these operators and seemingly can be reduced to the primitive function of addition or subtraction as multiplication and division are just meta operators acting as a loop.
At least this is how I’m viewing it.
There’s an intuitive sense that symmetry breaks when you take away (reduce) compared to add which is in parts of a whole.
And then to realize you can use addition to implement subtraction is where my brain starts to melt even though it’s relatively straight forward. Everything is just addition, the holy monad, the primordial dimensionless unit.
I similarly went down that route and found the answer to be at least plausibly more definitive than undefined.
It also still reaches an intuition on what dividing by zero means, and it is not that it equals zero, but that the amount of cycles to do are 0. As in index is still 0 in the array.
Exactly. In fact, there will always be some element a in a field¹ for which there is no multiplicative inverse. This is why with boolean algebra, both ⋀ and ⋁ are multiplication operators (for ⋀, T has no inverse; for ⋁, F has no inverse).
⸻
1. To be clear for readers, when KMag and I say, “field,” we’re referring to a specific mathematical construct in which there are + and × operators and symbols 0 and 1, the former being the additive identity and the latter the multiplicative identity.
At the time of writing there is exactly one question about copyright and one question if this might be culturally insensitive.
Regarding if it's culturally insensitive, the majority that replied disagreed that it was. Maybe something like 2 comments saying it is. There's 1 that says it is, which got downvoted, and the other seems to be making a case as to why it could possibly be.
Java, C#, JavaScript, TypeScript, Python, PHP, Go, Rust, C, C++ come to mind.
The Tao (sometimes) opposes rituals and tradition, and that is exactly what these languages excel in. It is probably wiser to continue unfolding the landscape of programming languages.
There was a period in hacker history when hackers thought they were reviving some kind of ancient zen and dao traditions, but in a very light and not really very appreciative way
I am instantly reminded of /bin/true which originally was a 0 byte length file with the execute bits set. Then the edict came down that all programs were to bear an AT&T copyright...