Software Developer| Andrea Grandi
If you own a website and you don’t want AI bots to crawl it and you are already using Cloudflare, you are in luck. Cloudflare has recently added a new feature that allows people to easily block AI bots from crawling their website. Setup To enable this feature, you need to login to your Cloudflare account, select the website and once you are in the dashboard, go to the “Security” section and finally click on the “Bots” link. From there you need to enable both “Bot Fight Mode” and...| Posts on Andrea Grandi
The robots.txt file is a simple text file that tells web robots (like search engine crawlers) which pages on your site to crawl and which not to crawl. It’s a standard that has been around for a long time and it’s still used today. Some examples of rules you can put in a robots.txt file are: 1 2 User-agent: * Disallow: /private/ This rule tells all web robots to not crawl the /private/ directory. 1 2 User-agent: Googlebot Disallow: /users/ This rule tells Googlebot to not crawl the /users...| Posts on Andrea Grandi
Reading news and blog posts can be quite time consuming if we manually go to news websites to check if something new is out or if we spend all day checking social media, waiting for people we follow to post their latest article. An efficient way to fetch new content is to follow the news sites and the blogs we want, using their RSS feed. What is the best way to do this for iOS and MacOS? There is no “best” way, since there are plenty of RSS clients and combinations of services, but I will...| Posts on Andrea Grandi
When you have to compare dates in a SQL query, you often want to ignore the time part. For example if you have two very common fields like created_at and updated_at and you want to know if they are the same day, you have to truncate the time part. How to do this depends on the database you are using. Here is how you can do it in PostgreSQL. 1 2 3 4 SELECT*FROMusersWHEREDATE(created_at)<>DATE(updated_at)ORDERBYcreated_atDESC; This query will return all the users where the created_at and update...| Posts on Andrea Grandi
In the last 3 days I had the opportunity to participate to an internal hackathon organised by the company I work for. We had to build a project based on an SDK and the needed skills to build it were those of a frontend developer. Being a backend developer and having very basic (almost none) frontend skills, I was suggested to use ChatGPT to write some of the code. Challenge accepted Of course I accepted and I worked on the project with another colleague (also backend developer) who also used ...| Posts on Andrea Grandi
Every now and then, my Mastodon or LinkedIn timelines are full of messages either praising or condemning the use of AI tools for coding. Are they good or bad then? As usual I think the truth is in the middle, or to be more precise: it depends on how you use them. Context In the last couple of years, thanks to the advancements in the field of Large Language Models (also known as Generative AI) a few “AI tools” have been made available, to help developers with coding tasks. Tools like GitHu...| Posts on Andrea Grandi
I recently started using iA Writer to edit my MarkDown files on iPad and I’m honestly quite impressed by its simplicity. With the latest version they introduced a feature called Authorship which basically helps you to keep track of external contributors. For example, suppose you asked a friend (or even ChatGPT) to write a conclusion for one of your articles, you copy-paste the text on your article and you start editing it. How do you keep track of what you or the other source wrote? With th...| Posts on Andrea Grandi
For my job (Software Developer) I make a daily use of tools like GitHub Copilot and ChatGPT. I want to explore alternative solutions which can be hosted autonomusly, without relying on an external service. Disclaimer Before I continue, let me clarify that these are tools which makes my job faster, they don’t do the job for me: a wrong assumption made by so many people is that AI tools will do the work for you. This is quite not true. You are still responsible of knowing what to do, understa...| Posts on Andrea Grandi
A curated list of indie blogs that I follow and recommend. These blogs are written by individuals who share their thoughts, experiences, and knowledge on a variety of topics.| Andrea Grandi