The Funhouse Mirror of Perl Criticism

Circus infograhpic.

Last week's article got a great response on Hacker News, and this particular comment caught my eye:

I think this is the real point about Perl code readability: it gives you enough flexibility to do things however you like, and as a result many programmers are faced with a mirror that reflects their own bad practices back at them.

-orev, Hacker News

This is why Damian Conway's Perl Best Practices (2005) is one of my favorite books and perlcritic, the code analyzer is one of my favorite tools. Although, the former could do with an update and the latter includes policies that contradict Conway. Point perlcritic at your code, maybe add some other policies that agree with your house style, and gradually ratchet up the severity level from "gentle" to "brutal." All kinds of bad juju will come to light, from wastefully using grep to having too many subroutine arguments to catching private variable use from other packages. perlcritic offers a useful baseline of conduct and you can always customize its configuration to your own tastes.

JWT Token: Lightweight, Token-Based Authentication

Securing your website is the goal of every developer. As of now, there are many possible ways to deal with website security. With the HTTP protocol, it is a bit challenging since it is stateless.

What Is Stateless?

When a sender sends a request to the server, the server processes it and sends back a response to the sender. Then, the cycle is over and the state is closed. The next request, even from the same sender, is considered a new request, or a new state. In short, every request is new to the server.