Skip to main content

Posts

When Should Developers Use AI to Plan vs Just Start Coding?

When and How Should Developers Use AI — Plan First or Start Generating Code? Last week, a developer on our team opened an AI tool before writing a single line of code. The task? Change a button label. A few minutes later, the AI had suggested architecture improvements, refactoring strategies, testing layers, and performance considerations… for a one-line change. We laughed. But it revealed something important: Using AI isn’t the challenge anymore. Knowing  when and how  to use it is. The Real Decision: Generate Code or Think First? Today, developers face a new daily choice: Should I ask AI to generate code right away… or should I use AI to help me plan first? Starting with code feels fast. It gives you that dopamine hit of "done." But without clarity, rapid generation often leads to rework, hidden bugs, and "spaghetti code" that just happens to be syntax-perfect. Great developers use AI differently. They decide  whether the problem needs thinking or typing . A memor...

Fixing Cloud Build / Cloud Run Error: argument --set-env-vars: Bad syntax for dict arg

Here is hot you can Fix Cloud Build / Cloud Run Error:  argument --set-env-vars: Bad syntax for dict arg While deploying a service to  Google Cloud Run  through  Cloud Build , I ran into this error: ERROR: (gcloud.run.deploy) argument --set-env-vars: Bad syntax for dict arg: [http://localhost:3000]. At first glance, the deployment config looked fine. I was passing multiple allowed origins like this: ALLOWED_ORIGINS=https://example-app.run.app,http://localhost:3000,http://localhost:3001 ✅ What caused the error? Cloud Run’s  --set-env-vars  flag  splits values using commas . Since the environment variable itself contained commas, Cloud Run thought I was trying to define new variables: https://example-app.run.app http://localhost:3000 http://localhost:3001 So it broke parsing and threw the error.  The first try: wrap the value in quotes Just add quotes around the value: ALLOWED_ORIGINS="https://example-app.run.app,http://localhost:3000,http://localh...

Securing Your Emails: A Simple Guide to Email Authentication and Best Practices

Email security is crucial in today's digital landscape, and implementing authentication measures like DMARC, SPF, and DKIM can go a long way in safeguarding your domain. Here's an easy-to-follow guide to ensure your emails are authenticated and delivered securely: 1. Implement DMARC, SPF, and DKIM: Follow these steps for popular email services: Postmark Refer to the instructions provided in this link SendGrid Check the relevant information on their platform. Mailchimp Follow the recommended steps on their platform. 2. Validate Forward and Reverse DNS Records: Make sure your sending domains or IPs have valid forward and reverse DNS records (PTR records). Check resources for each service: Postmark Provides coverage for this aspect. SendGrid  Find the necessary information here Mailchimp Follow the guidelines specified by Mailchimp. 3. Maintain Low Spam Rates: Keep spam rates below 0.3% in Postmaster Tools and consider configuring Google Postmaster for additional insights into...

New Email policy gmail and yahoo

Why Google and Yahoo are modifying the guidelines for email senders Ensuring the proper authentication of your emails has consistently been regarded as a best practice; however, not all senders leverage the available tools to safeguard their emails. This poses a significant challenge, as inadequate email authentication makes it remarkably easy for malicious entities to mimic domains and execute phishing attacks, thereby harming the sender's reputation. Gmail and Yahoo are actively working to shield their users from spam and unwarranted emails. Nevertheless, if senders neglect to adequately secure their systems, leaving them vulnerable to exploitation, it complicates the task of these platforms in maintaining email security. Consequently, Gmail and Yahoo have decided that proper email authentication and adherence to deliverability best practices are no longer optional.  To ensure emails consistently reach the inbox, senders must now comply with key practices for email authentication...

Complete guide: integrating POSTGIS with Laravel

PostGIS - It is an open-source software extension for the PostgreSQL relational database management system. It enables support for geographic objects and spatial queries, making it a powerful tool for working with geographic information systems (GIS) data. PostGIS allows you to store, manipulate, and analyze spatial data, such as points, lines, polygons, and other geometric objects. How to Setup PostGIS with Laravel To set up PostGIS with Laravel, you'll need to follow a few steps. PostGIS is an extension for PostgreSQL that allows you to work with geospatial data, and Laravel is a popular PHP framework. Before proceeding, ensure you have PostgreSQL installed on your server or local development environment. Here's a step-by-step guide to setting up PostGIS with Laravel: 1. Install Laravel: If you haven't already, install Laravel using Composer. Open your terminal and run the following command: composer create-project --prefer-dist laravel/laravel project-name 2. Configure...

Complete guide to use Google NLP with laravel

 What is NLP? NLP stands for Natural Language Processing. It is a subfield of artificial intelligence and computational linguistics that focuses on the interaction between computers and human language. NLP involves the study, analysis, and understanding of natural language text or speech by machines. The goal of NLP is to enable computers to understand, interpret, and generate human language in a way that is meaningful and useful. It involves a range of techniques and algorithms to process and analyze text data, including tasks such as text classification, sentiment analysis, named entity recognition, machine translation, question answering, and more. NLP techniques often involve linguistic rules, statistical models, machine learning algorithms, and deep learning approaches to extract meaning from text and enable various language-related tasks. NLP finds applications in various domains, including chatbots, information retrieval, sentiment analysis,...

PHP FPM

PHP FastCGI Process Manager (FPM) is a FastCGI daemon for PHP that provides a simple and efficient way to manage the PHP processing requests on a web server. PHP FPM is an alternative PHP handler that can be used with Nginx or Apache web servers, and it is often used to improve PHP performance on high-traffic websites. In this blog post, we'll explore the benefits of using PHP FPM and how to set it up on your web server. Why use PHP FPM? Performance: PHP FPM provides faster performance than traditional PHP processing because it runs as a separate daemon, allowing it to handle multiple requests simultaneously. This results in faster processing times and improved overall website performance. Scalability: PHP FPM is designed to handle high traffic websites, making it easier to scale your PHP environment as your website grows. It provides a simple way to manage multiple worker processes, allowing you to handle more requests and provide a better user experience. Reliability: PHP FPM pro...

Heroku

 What is Heroku? Heroku is a cloud application platform for building and deploying web apps. Heroku provides better UI for cloud application as cloud platform setup is done through CLI . Heroku lets app developers spend their time on their application code, not managing servers . Heroku is a multi-language cloud application platform that enables developers to deploy, scale, and manage their applications. History Heroku was initially developed by James Lindenbaum, Adam Wiggins,and Orion Henry for supporting projects that were compatible with the Ruby programming platform known as Rack. The prototype development took around six months. Heroku was acquired by Salesforce.com in 2010 for $212 million. Heroku Working model Heroku lets you deploy, run and manage applications written in Ruby, Node.js, Java, Python, Clojure, Scala, Go and PHP. An application is a collection of source code written in one of these languages, perhaps a framework, and some dependency description that instr...

Setup Intercom help over HTTPS with a custom domain

 A year ago we setup a help center on hubspot which worked well but for some reason team decided to switch it over to Intercom. Everything was setup and we were only left with pointing subdomain to Intercom, I feel setting custom domain is very simple and explained clearly here (https://developers.intercom.com/installing-intercom/docs/set-up-your-custom-domain). Pointing the custom domain to your intercom help page is pretty easy using a CNAME in your DNS record. The only thing which i found bit tricky is that by default it won’t work on https (that's not good).but this post will help you to get SSL with the help of AWS cloudFont. Let's start 1. Login to your AWS account here( https://console.aws.amazon.com), you have to create in case you don't have. 2. Go to Cloudfront console (https://console.aws.amazon.com/cloudfront) 3. Click Create Distribution 4. Click **Get Started under Web** 5. Under Origin Settings > Origin Domain Name, enter Intercom host domain i.e. *custom....

How to Point site via pointdns on heroku

Pointing site via PointDNS Why PointDNS ? By Default Heroku supports CNAME records only. CNAME record does not require hard-coded IP addresses and allows Heroku to manage the set of IPs associated with your domain. However, CNAME records are not available at the zone apex and can’t be used to configure root domains Heroku doesn’t support DNS A-records and does not provide hard-coded IP addresses which are required for A-records DNS. This prevents your infrastructure provider from assigning your app a new IP address on your behalf when adverse conditions arise and can have a serious impact on your app’s uptime. PointDNS add-on provide us the facility to add A-records DNS on Heroku app Step 1 Export Zone records from DNS panel (just for reference) : In Godaddy we have the option to export Zone records for unix / windows , export in either way so that we can save it for case if we need to revert those records. Step 2 Add domain to be pointed to production app via CLI run heroku logi...

NGROK for Laravel

Share Your Local PHP/Laravel  using Ngrok This post shows how to share your Laravel Framework Installation on Ubuntu but you can perform the same with other operating systems as well. What is Ngrok ngrok is a simplified API-first ingress-as-a-service that adds connectivity,security, and observability to your apps in one line.It allows you to create a tunnel very fast for free and Laravel has an internal webserver that can be used without configuration. Why Ngrok Ngrok allows developers to expose their locally hosted applications to the internet, which is useful for testing and debugging purposes. It eliminates the need to deploy the application to a remote server for testing, saving time and effort.Mostly Ngrok is used where we need to test webhook locally.Ngrok enables developers to receive these webhooks on their local machine, facilitating the development and testing of webhook-based functionality. How to use Ngrok Assuming you have Laravel installed correctly, you can fo...

How to configure godaddy domain on heroku via cloudflare

Here is how I did it from scratch. Step 1: Setting Up Heroku and Godaddy The first step is adding the GoDaddy domain to the Heroku app. Login to heroku and navigate to the app settings, under domain section click on "Add domain" then type "www.yourdomain.com" & "yourdomain.com". The domain name is the one purchased from GoDaddy. Step 2: Setup cloudflare Go to cloudflare, add a domain you want to point via cloudflare (domain added in  step 1).When you add domain cloudflare will automatically fetch all the sever records and provide you with  NS.Addiotnally point heroku via CNAME/ANAME to heroku app. Step 2: Copy NS from godaddy to cloudflare Log into GoDaddy account and go to your domain detail page.The domains details page will show all the DNS related to the domain name.Copy NS from step 2 (cloudflare) &  paste it in godaddy under custom NS option. That's all.

Sending Emails in Laravel with Gmail SMTP

This post will help you to fix issue like  Error : Swift_TransportException in StreamBuffer . php line 268 : Connection could not be established with host smtp . gmail . com [ Connection refused #111] Sending emails is crucial for any web application. Usually, an email is sent to notify the user of some kind of activity.Here are the steps to send email in laravel using Gmail SMTP. Generally Gmail is not recommended to send emails on live server, but if you just using it for testing purpose then follow these steps: 1. Visit   https://myaccount.google.com/security   make sure you have allowed  less secure app  to YES. 2. Unlock captcha on  https://accounts.google.com/b/0/DisplayUnlockCaptcha . 3. Generate APP password  Turn on 2-Step Verification for your account  https://myaccount.google.com/security. Your app might not support the latest security standards. Try changing a few settings to allow less secure...

Sensitive data in github

What is it? As one is committing the code to github , the developers must be aware that no credentials should be pushed with github .Even the repository is private but still it is not recommended to put your keys/password on github.The following reasons explain the reasons : This is very risky, exposing those credentials on a 3rd-party service that you don't control and manage then you are increasing the risk. There are lots of ways your credentials could be exposed: service compromise, compromised service accounts, authorization failure in the service, network eavesdropping, you granting access to the wrong person, etc.This leads huge risk to your company and it's reputation. How to find the suspected information As there are certain way of keys being exposed in the code statically , but simply search for parameters such as “KEY”,”API KEY”,”Password”,”credentials”,”phpinfo” etc , here we need to identify which files contain these information as static content .most...

How to Upgrade PostgreSQL from 9.6 to 10.0 on Ubuntu 16

A Step-by-Step Guide to upgrade postgresql from 9-6 to 10 on ubuntu 16 1.Make a backup. Make sure that your database is not being updated.   pg_dumpall > outputfile  2. Install Postgres 10.             a) Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository                     deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main                       b) Import the repository signing key, and update the package lists                    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update 3. Run sudo apt-get install postgresql-10 . A newer version will be installed side-by-side with the earlier version. 4. Run pg_lsclusters: Ver  Cluster   Port     S...

How to copy data from one ubuntu machine to another

How can I copy folder from one computer to another in ubuntu? If you want to transfer some files from Ubuntu to Windows or Ubuntu to Ubuntu , you can transfer via smba or sftp using below steps : Steps to share from ubuntu To get started, right-click on the folder you wish to share and select ‘Sharing Options’ When prompted to install Samba services, do it. Then click ‘Create Share’ to complete the process. Access it from Windows On the Windows machine, go to Start –> All Programs –> Accessories –> run and type the command: \\computer_name\share_name computer name can be ip address of ubuntu machine , to check ip of ubuntu machine , go to ubuntu machine & open terminal & type ifconfig Type the Ubuntu computer name and the share name of the resource. You will get a prompted to enter your credentials. Type your Ubuntu username and password and click ‘OK’ Access it from ubuntu on same network sftp://192.168.x.x Username = Ubuntu Machine Username from whe...