q – tool for making and composing asynchronous promises in JavaScript

q – tool for making and composing asynchronous promises in JavaScript

If a function cannot return a value or throw an exception without blocking, it can return a promise instead. A promise is an object that represents the return value or the thrown exception that the function may eventually provide. A promise can also be used as a proxy for a remote object to overcome latency.

p5.js – a JavaScript drawing library

p5.js – a JavaScript drawing library.

p5.js is a JavaScript library that starts with the original goal of Processing, to make coding accessible for artists, designers, educators, and beginners, and reinterprets this for today’s web.

Using the original metaphor of a software sketchbook, p5.js has a full set of drawing functionality. However, you’re not limited to your drawing canvas, you can think of your whole browser page as your sketch! For this, p5.js has addon libraries that make it easy to interact with other HTML5 objects, including text, input, video, webcam, and sound.

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.