alexdoff.hashnode.devList of Dictionary Transformation in PythonPython have this feature called list comprehension, it allow to create new list using a more concise syntax than for loop. Without list comprehension: num = [1,2,3,4,5] squared = [] for n in num: squared.append(n**2) print(squared) # [1,4,9,16,25...Nov 19, 2025·1 min read
alexdoff.hashnode.devHow to protect route in ExpressJS using PassportMaking certain route to be accessible only to authenticated user is one thing I almost always do in express. However, I usually cobble them together from multiple blog, stack overflow, and and Gen AI. And I forget about it and had to do it all over a...Jul 11, 2025·14 min read
alexdoff.hashnode.devBeginner Guide to PHP NamespaceBackground When I started using PHP (back when when I use it, it was PHP 7), there was a peculiar feature called namespace. Usually it's used this way <?php namespace App\Http\Controller; use Carbon\Carbon; class PostController { // some code.....May 1, 2024·5 min read
alexdoff.hashnode.devHugo "Hello World"When you make a Hugo quickstart, you were suggested to download a theme, but you don't have to. So this is how to create a simple bare Hugo site. Here's how to do it. create a new site with hugo new site quickstart command (you can change the quicks...Feb 14, 2023·1 min read