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.

Fiverr redesigns the site for version 3

fiverr-v3

Fiverr is introducing a new, redesigned website, which is now at version 3.  It’s slicker and simpler.  There are more categories and subcategories.  And overall it seems more focused.  I think Fiverr spent some time thinking over the direction they want to go, and they figured it out:

Since our founding, Fiverr aims to make buying a service as easy as buying a product on Amazon. Our goal is to provide an “e-commerce experience” that empowers our creative community to package their skills as products, enabling the buying and selling of services in just a few clicks, while eliminating unnecessary sales friction. We call this concept SaaP (Services-as-a-Product).

I like this new look.  Much more than the old one.  And I’ve tried to stay away from the old one, because Fiverr is addictive.  Once you buy something, all you want to do is keep buying.  This the 21st century shopping mall.  I don’t just want products.  I want products built specifically for me.  And I want them cheap.  And that’s Fiverr for you.

Am I Responsive? Preview!

Am I Responsive? – this is a brilliant tool!  You can type the URL you are interested in, click “Go!” button and see the preview of the URL on four different screen sizes – large desktop, medium desktop, tablet, and smartphone.  No waiting in queue, no screenshots – all is live, scrollable and instant.  There is also a bookmarklet which you can add to your browser and then preview any page with a single click.  You can even rearrange the preview screens by dragging them around.  And on top of all of that, even the localhost URLs work – the killer feature for any web developer!