Live coding, magic tricks you can do with your IDE, a recap of clean coding practices, and clearing up the confusion between authentication and authorization. Here’s a subjective review of Wednesday’s WarsawJS Meetup.
„Intro to Authentication and Authorization with JWT and PassportJS”
Like the title suggests, this talk was a good introduction to the topic of authentication and authorization. It helped in understanding the difference between these two terms, which are often confused – especially by beginners.
Artur Klajnerok demonstrated and explained an example of “Basic Auth” in a front-end Single-Page Application, powered by a node.js backend built upon the Express framework. To authenticate users, he made use of the PassportJS library.
The talk concluded with a simple example illustrating the use of JSON Web Token (JWT). Having years of experience dealing with authorization and authentication, I wished this was the beginning of the talk rather than the end 😉
„The Importance of Clean Code”
Tetiana Platonova reminded the attendees what constitutes clean code – based on the guidelines presented in the book “Clean Code: A Handbook of Agile Software Craftsmanship”.
In the limited time of the talk, Tetiana managed to cover the following of Uncle Bob’s (Robert Martin’s) concepts:
- Variable and method naming
Key point: Use descriptive names with verbs for methods and nouns for classes. - Code structure
Key point: Keep your structure well-organized, avoid too many (more than two) levels of indentation, Don’t Repeat Yourself by factoring out common code into separate methods. - Commenting
Key point: Avoid commenting what your code is doing – it should be readable enough to communicate that on its own.
Clean code is a huge topic and it’s no surprise that, in a short time, Tetiana was only able to present the basics.
This talk could be an eye-opener for junior developers, while for more experienced programmers like myself it was a good recap of the ideas in the book. It doesn’t hurt to revisit Uncle Bob’s guidelines every now and then, either in his book or by watching the videos available online.
„Use your IDE like the pros”
One of rare examples of live coding that could not fail 😉
In addition to a number of rather well-known tricks, Wojciech Przechodzeń shared several ideas of unconventional usage of the multiple cursors feature. I was surprised to see it used to extract e-mail addresses from a large JSON file. I knew my IDE supported multiple cursors, but would not think you could do something like that.
Thanks for this demonstration, well done!
Confusing concepts of authentication and authorization, classic concepts of clean coding, and advanced usage of your IDE. This meetup had some good content for all JavaScript enthusiasts, no matter the skill level.