Author: Sergio Lema
-

How to Handle AttributeError: ‘NoneType’ Object Has No Attribute X’ Like a Pro
The AttributeError: ‘NoneType’ object error in Python indicates an attempt to access a non-existent attribute. Instead of applying quick fixes, it’s essential to address the root cause, ensuring data integrity. Enforcing data rules prevents errors, while clear communication about optional attributes assists in handling them appropriately across the application.
-

Forgot Password Feature with Python and Flask
The article discusses user authentication options, highlighting the “Forgot Password” feature implementation using JWT in Python and Flask. It outlines a secure workflow for resetting passwords via email, emphasizing the importance of short-lived JWTs for security. Proper authentication procedures enhance user trust and experience in applications.
-

Shut Down GCP Instance Groups at Nights
The article discusses strategies to reduce infrastructure costs in Google Cloud Platform (GCP) during non-working hours by automating the management of Instance Groups. It outlines a workflow that involves using a Cron Job to trigger a Cloud Function, which identifies and starts or stops Instance Groups based on specific labels in Instance Templates.
-

Create a GCP Instance Group using Docker
This post outlines the process of creating scalable applications on Google Cloud Platform using Docker. It discusses setting up an Artifact Registry for Docker images, creating instance templates with necessary environment variables, and forming instance groups. The article emphasizes automating CI/CD pipelines to ensure effective application deployment.
-

How to Create A GCP Instance Group Easily
The article discusses building microservices on Google Cloud Platform (GCP) without Kubernetes using Instance Groups for high availability and effective management. It outlines two methods: the Template-First Approach for effortless infrastructure setup, and the Hands-On Approach for customized configurations. Both options support CI/CD integration, enhancing application uptime and developer efficiency.
-

Optional vs Null
The article discusses the limitations and proper use of Optional in Java to prevent NullPointerExceptions. While Optional offers a way to avoid nulls, it doesn’t eliminate the need for thoughtful design. It emphasizes functional programming techniques to handle empty values effectively without excessive null checks, advocating for clearer code over mere null avoidance.
-

Create a GCP Bucket with a Custom Domain
This article explains how to deploy a Single-Page Application (SPA) using Google Cloud Platform (GCP) Bucket Storage with a custom domain. It outlines essential steps like DNS verification, GCP bucket configuration, setting permissions, and creating CNAME records, while also mentioning limitations such as HTTPS support and complex redirect rules.
-

3 Steps to Estimate a Task with Precision
The article addresses the challenges of estimating complex tasks, offering a structured approach. It highlights three key steps: splitting tasks into manageable sub-tasks, using a reference task for comparisons, and estimating each sub-task using the Fibonacci sequence. This method promotes clarity and reduces anxiety when providing task estimates.
-

How to Create a Singleton with Java Enums
The Singleton Design Pattern ensures a class has only one instance, facilitating global access. Traditional implementation can lead to issues in multi-threaded environments. A more efficient approach using enums guarantees thread-safety, with built-in properties resembling a Singleton. While useful, overusing this pattern complicates testing and should be approached cautiously.
-

How to Solve the CORS error with Flask
This article addresses the common CORS error faced by web developers when connecting a front-end application to a Flask API. It explains the security reasons behind CORS policies, the role of preflight requests, and provides solutions using Flask-CORS.
