
A useful program, 0 bytes long - lelf
http://peetm.com/blog?p=55
======
CJefferson
Interestingly, this is the second useful empty program I have seen. The other
is /bin/true, as discussed at
[http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html](http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html)
. That file is not quite empty, due to trying to comment and copyright an
empty file!

~~~
jkn
I remember that two bugs were filed in Debian for this implementation of
/bin/true (one for the slow execution and one for the memory use IIRC) but I
cannot find them.

Two bugs for 0 lines of code...

~~~
fuzzix
That would be GNU coreutils true, which is a little more complex.

Some discussion of that over here :
[http://forums.thedailywtf.com/forums/t/3779.aspx](http://forums.thedailywtf.com/forums/t/3779.aspx)

------
hjay
A great example of how important it is for us as developers to recognize the
value we provide to businesses/users instead of measuring it all solely in
terms of algorithmic complexity and LOC.

Side note: Tatung makes some pretty amazing rice cookers. My family has used
the same one for over 40 years now, and it still cooks as well as ever.

~~~
Steko
It looks like they've switched to some less reliable technology based on
Amazon reviews:

[http://www.amazon.com/Tatung-Tac-11kn-Stainless-Steel-
Cooker...](http://www.amazon.com/Tatung-Tac-11kn-Stainless-Steel-
Cooker/product-
reviews/B004FWL3UA/ref=cm_cr_dp_see_all_btm?ie=UTF8&showViewpoints=1&sortBy=bySubmissionDateDescending)

 _I grew up with Tatung rice cookers. They used to last forever - only get
replaced when owners get tired of looking at them or they become too dirty. I
replaced mine with this stainless steel rice cooker about 1.5 years ago
thinking it will really last forever since it 's stainless steel (the old ones
were made out of aluminum). Unfortunately, it stopped working a few days ago.

I just couldn't believe it, I opened it up (I am a hand-on electrical
engineer) and found the heating element to be the culprit. Tatung no longer
uses solid metal heating element, instead, Tatung uses a much inferior heating
element made out of a sandwich of 3 to 4 layers of thin circular heat-
resistant cardboard. With metal wires (the heating element) looped around
these circular cardboard. After probing a bit, I found where the metal wire
broke.

Called Tatung customer support and was told that they can't sell heating
element because of liability issue. It'll cost $40 for them the repair it but
I will need to ship it to them. _

Side note: curse Wade and Giles for making everyone mispronounce this
company's name.

~~~
nsns
Pinyin: "Datong".

~~~
Steko
Further derail: for those who aren't familiar, datong (大同, "great harmony"),
is a idealized state of society in traditional Chinese philosophy that been
re-appropriated by just every school of thought or "-ism" from before
Confucious to Mao and beyond.

[http://en.wikipedia.org/wiki/Great_unity](http://en.wikipedia.org/wiki/Great_unity)

There's some lengthy (English) discussion on the term in this book:

[http://www.amazon.com/The-Chinese-Revolution-Historical-
Pers...](http://www.amazon.com/The-Chinese-Revolution-Historical-
Perspective/dp/0275974766)

------
fendrak
This is a perfect example of selling something for what it's worth, rather
than for what it costs to build.

~~~
BHSPitMonkey
I found it amusing that customers were annoyed with the author for charging
for "nothing". If the author didn't solve your problem, or if you could have
done it yourself with no help, why did you buy it?

~~~
StavrosK
It's because people mainly perceive marginal costs in the goods they buy, and
they don't consider fixed costs. In extreme cases like software, news, etc,
they think "this extra copy didn't cost anything to produce, therefore it
should be free", even though the initial fixed cost was substantial.

This leads to some things like perceiving less competent workers' time to be
worth more than more competent ones' (because they take longer to do a task,
therefore they should be paid more), etc.

~~~
icebraining
I don't agree this was the case here. They were perfectly happy to pay for a
copy of the software, even though making another copy - as you rightly point
out - costs nothing.

They were annoyed because nothing had actually been copied. It's like paying
for a product and getting an empty shipping box in the mail.

~~~
StavrosK
Sure, if the product you're paying for is an empty box.

~~~
icebraining
But they didn't know it was, which is why they felt cheated. It's not because
of the marginal costs.

------
dps
"(a TSR; if the reader knows what such a thing is!)"

Oh dear, I can't imagine _not_ knowing what a TSR is. Feel old.

The wikipedia page is pretty good
[http://en.wikipedia.org/wiki/Terminate_and_Stay_Resident](http://en.wikipedia.org/wiki/Terminate_and_Stay_Resident)

~~~
mgkimsal
I've mentioned before something like "Yeah, I feel old, cause I know what a
TSR is (was?)" and some younger kid in the room said "oh, my uncle used to
have a TRS80, yeah, those were crap.".

The LOL was strong with that one, but not for the reasons he thought.

~~~
D9u
One of my favorite TSR programs was Qedit, by SemWare. I have yet to find
another editor that I like better, and wish that I could find something
similar which runs on unix-like operating systems. Qedit had the ability to
drop to a command prompt to execute external commands and then return to the
editor just as "GO.COM" does and I wonder if any of the author's code found
its way into the SemWare editor.

I also got a kick out of the .com filename extension reference and wondered
how many HN readers remember that .com used to stand for "COMMAND" instead of
today's "Commercial." Judging by the amount of comments here the number is
fairly small.

Thanks for the trip down memory lane!

~~~
philsnow
Could you get what you want with Unix job control? From inside e.g. emacs, hit
control-z, and it should suspend the emacs process and you'll be back at the
shell you started emacs from. When youre ready for more emacs (woo!), tell
bash to "fg" and you'll be back in emacs.

~~~
D9u
The features of Qedit that I liked had more to do with editing functions and
keybindings than suspending any processes, and running concurrent applications
is sort of a non issue in BSD/Linux.

The default Qedit settings made columnar editing as easy as linear editing...
You could copy/paste in a vertical manner, as well as the more normally seen
horizontal method. This facilitates ease of copying/pasting/deleting blocks of
code without picking up, or affecting, other portions of code, whereas
horizontal oriented block editing does not allow multi-line editing within set
columns. You get every column within a set of copied lines even though you
only want a smaller block of text.

Perhaps emacs can do column based edits, or some other editor?

~~~
tincholio
Both Emacs and Vim can do column and arbitrary rectangular area manipulations.
Another old and popular editor in the DOS days was Brief, which could also do
them.

------
js2
Tangent: just to give an idea how popular WordStar was, my Apple ][ had a CP/M
coprocessor card [1] just so we could run WordStar.

[1] manufactured by Microsoft -
[http://en.wikipedia.org/wiki/Z-80_SoftCard](http://en.wikipedia.org/wiki/Z-80_SoftCard)

~~~
zwieback
Me too, the other CP/M programs I ran a lot on my (knockoff) Z80 card were
TurboPascal and f80, the Microsoft Fortan compiler. It always felt like a tiny
betrayal running Z80 code, though, I was a 6502 man through and through.

------
mixedbit
Wow, not only was this program infinitely profitable, it could also be
transmitted over the network infinitely fast, and even without a network
connection.

~~~
lifeformed
"Installation instructions:

\- No download necessary

\- Create a file called GO.COM

\- Done!"

------
dorfsmay
Ha! That's hilarious! I'm sure a lot of people remember the old joke:

-can you assume that any program out there can be reduce by one line?

-can you assume that any program out there has a least one bug?

If yes, it means that, by mathematical induction, every program can be reduce
to one zero byte, and it's buggy!

~~~
anonymous
Which means that the first two assumptions are wrong, leading us to conclude
that there exist minimal perfect programs for every specification.

~~~
dmoney
There's a bug in this zero-byte program: the other program might not leave its
memory in a correctly runnable state when it shuts down.

~~~
dorfsmay
Q.E.D.!!!

------
mef
Seems to be down. Mirror:
[http://web.archive.org/web/20121017013957/http://peetm.com/b...](http://web.archive.org/web/20121017013957/http://peetm.com/blog/?p=55)

~~~
JeremyMorgan
It's not down, it's Cloudflare. I used to get tons of false positives from
that service. Junk.

~~~
Semaphor
Cloudflare is starting to get annoying. So often they want me to solve
captchas to open a site -.-

------
Stratoscope
Best hack ever! Infinitely better than any other hack.

------
anigbrowl
It's not really infinitely profitable, because cost isn't measured in bytes.
His cost was the time to conceive of, test, and implement the idea as a
product. I can't say I've ever thought about the value of a program how much
storage space it takes up.

------
lubujackson
That is kind of genius.

------
leephillips
I love this story. It gives a strong impression of having interesting
philosophical implications, but I have no idea what they are.

I hope I can offer a little advice without being too annoying: if you are
going to use justified text, especially with narrow columns, you need to
implement some kind of hyphenation. There are JS libraries that do this now, I
think.

~~~
rhengles
Better yet, just use soft hyphens!
[http://en.wikipedia.org/wiki/Soft_hyphen](http://en.wikipedia.org/wiki/Soft_hyphen)

~~~
leephillips
I suggested the JS library approach as an alternative to manually inserting
soft hyphens. Do you know of an automated way to do this?

~~~
evincarofautumn
Perl and a hyphenation dictionary?

------
rbanffy
The old "SAVE 0 X.COM" trick... Brings back good memories.

------
tricolon
Previous discussion:
[https://news.ycombinator.com/item?id=1025294](https://news.ycombinator.com/item?id=1025294)

------
sage_joch
I thought he was going to say a Flashlight app.

------
simula67
x/0 is not equal to infinity in ordinary arithmetic (which is what author
attempts here) :).

[http://en.wikipedia.org/wiki/Division_by_zero](http://en.wikipedia.org/wiki/Division_by_zero)

------
zht
division by zero is undefined. c/x as x approaches 0 from the right is
infinity.

~~~
derleth
Just for fun, what is 0/0?

Mathematicians often assign definitions to things that are undefined in other
contexts to make things more self-consistent. The fact there is a good case to
be made that c/0 is undefined for all c doesn't mean it must always be so in
every possible instance.

~~~
dantillberg
You could look at it as `limit of x/x as x approaches 0`, which would be 1.

Or you could look at it as `limit of -x/x as x approaches 0`, which would be
-1.

Or you could look at it as `limit of x/0 as x approaches 0`, which would be
+/\- infinity, depending on which side you approach 0 from.

Or you could look at it as `limit of 0/x as x approaches 0`, which would be 0.

~~~
joesb
I think the third case is `limit of c/x as x approaches 0`. It can only
approach 0, c/0 is still undefined.

~~~
Noughmad
Not exactly, as c also has to approach 0. So you have two limits, and their
order matters.

------
raymondh
Python's __init__.py files are useful and can be zero bytes long.

~~~
icebraining
They're hardly "programs" though, just components of a larger one.

------
Qantourisc
Marvellous idea ! :)

------
gliter
cooool!

