What is the shortest and most effective code ever written?

Quora runs the question, that by now has plenty of awesome answers.  But this one is my favorite so far:

The ‘true’ program in Unix from the 1970s was an empty file. The shell interpreted that as a shell script which ran and resulted in no error status, so the result was zero. Zero is the shell exit code value that represents ‘success’ or ‘true’ within if and while clauses.

So, no program can be shorter than that. And it was entirely effective at meeting its specification.

False was much longer, being

exit 1

Once lawers got in, both programs were sullied with plenty of copyrights. BSD also eventually established a format for identifying shell scripts explicitly, and those codes got added to the file too. Eventually, ‘true’ stretched to hundreds of bytes of copyrights on top of the shell script format intro code. Now, annoyingly, Linux and Mac OS have made it a compiled binary program. In Ubuntu, it is a 22K binary with an 18K code size. Ugh.

At least writing a correct C program for true can be very short. It is one of the few C programs that should require no #include files, and can be simply:

int main(void){return 0;}

Of course make sure to add lots of copyright notices.

Battle scars: How the first world war changed the world

Geography changed too. After the war the Treaty of Versailles carved out new countries from what remained of the old pre-war empires. Independence was granted to the Baltic states, which had been handed to Germany in 1918 as part of the Treaty of Brest-Litovsk, which ended Russian involvement in the first world war. Poland was reconstituted from former Russian, German and Austro-Hungarian territories, and Czechoslovakia, Yugoslavia and a larger Romania were created.

Check the link for the cool swipe map overlay.

Time in China follows a single standard time of UTC+08:00, which is 8 hours ahead of Greenwich Mean Time. China geographically spans five time zones and there were five time zones in use during the Republic of China (1912–1949). Since 1949 all of China has only had a single standard time, but UTC+06:00 is also used unofficially in Xinjiang and Tibet.


Only 90s Web Developers Remember This

Have you ever shoved a <blink> into a <marquee> tag? Pixar gets all the accolades today, but in the 90s this was a serious feat of computer animation. By combining these two tags, you were a trailblazer. A person capable of great innovation. A human being that all other human beings could aspire to.

You were a web developer in the 1990s.

There are more nostalgic examples of how we used to do things back in the day …