This Week I Learned - 2016 Week 26

Last week post or the whole series.

What the difference for the Git config option of 'push.default'? To prevent yourself from committing and overriding local branches to remote branches, stick with 'simple' way of 'git push'.

Why you need to support Perl's PSGI?

One of the dilemma faced by any programmer, what should I program? (via Slashdot) Someone if the forum joked that "I know how to post a comment, but I don't know what to say." Funny indeed but true as well. Yes, you can learn one programming language per year, but in the end, it will be quite a waste if nothing is created.

12 years of web programming (via Reddit). Sad but true. Layer of layer of layer of abstraction which in the end, just to produce HTML.


Another approach of subroutine parameters validation in Perl. This is from REST::Client. "Tim Toady" at work here using Carp module.
croak "REST::Client exception: First argument to request must be one of GET, PUT, POST, DELETE, OPTIONS, HEAD" unless $method =~ /^(get|put|post|delete|options|head)$/i;
croak "REST::Client exception: Must provide a url to $method" unless $url;
croak "REST::Client exception: headers must be presented as a hashref" if $headers && ref $headers ne 'HASH';

No comments:

Post a Comment