| Quick Access to my selection Last Update: 2022-10-24 09:36:42 Ireland Time / 2022-10-24 01:36:42 PDT-0700 Unix epoch: 1666600602 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tricks to start coding with AI for beginners
Last Updated: 2026-05-22 07:50 UTC+1
Some tricks for programmers that don’t know how to use AI tools, advice, pointing errors, best solutions…
General knowledge with AI and Code
The first thing to know is that the AI makes errors. They can make silly errors, like a missing + to concatenate strings in a varnish .vcl file or a random character like | between use imports in PHP or bigger bugs, difficult to spot bugs or security bugs. My advice is to not blindly trust the code generated by IA and to review it as much as possible.



What the AI does very well, and it’s a great help, is to Review your Code. This is really helpful. Ask it to Review your Code before committing, or ask to review a colleague’s branch.
I git pull a branch and I use a prompt like this for Claude or Junie: “Do a code review for the new code in this branch respect main. Do not review files not committed“.
This way I don’t ask for a full Review of all the Code in the project, which is costly in tokens. I just ask for the new changes in this branch respect main. So normally, few tens of files. Quick and cheap.
AI it’s also very useful to determine the cause of an error. Just paste the error message, the error from the logs, or an screenshot and it’ll probably figure out what is wrong.
To be successful creating an application you have to provide detailed requirements. The most detailed, the better. The specs.
AI are very good assembling SQL queries. You can ask the AI to do SQL Queries, ALTER’s…
You can also ask for queries for specific CMS. Nowadays most AI’s are trained with the development documentation of CMS and Frameworks, so they know how to do stuff.
AI is terrible for Infrastructure. Do not give it the control of your Infrastructure, cause AI is not a clever human. It lacks common sense. If AI believes that the best way to update the infrastructure is to destroy your Production databases and redeploy them, it will do it. Even if you told it not do it. It may even delete the backups. The AI’s don’t obey always. Some times they forget the instructions that you give them.
For my new projects I always create a file named docs/promptia.md with the instructions to the AI, no matter if it’s Claude, Gemini, Junie, or another. I detail all the specs and requirements. This way I can reproduce the project again from the scratch.
There is a kind of standard AGENTS.md file, but Claude does not follow this.
Most AI use tokens as a measure of usage, to limit your usage. Is not exactly like this, but approximately one token equals one word in English. A word may take two tokens, and this may be less optimal in other languages. If you run out of tokens you cannot use the AI until you have more tokens again. Most of the subscriptions renew the tokens available monthly, weekly or daily. In some subscriptions you can pay for extra usage.
In most solutions you can choose to Plan before Executing, so to see what the AI agent will do. You can also use Ask to ask for questions about the code without modifying.
The context is the information that the agent has in memory about your project. The biggest the context is, the more tokens it will need, and the bigger probability that the AI will make errors or forget things.
The best engineer I know, working with huge code bases, limit the Claude context to a 200K window max, unless there is a specific analysis task for which they want to allow more. Otherwise the agent can spend a lot of time compacting. (Claude blog post: 1M context is now generally available for Opus 4.6 and Sonnet 4.6)
If you have to use AI, I recommend paying a subscription, as the degree of privacy of the information submitted is superior.
For security reasons I don’t recommend you installing plugins in the IDE’s, or skills in Claude (unless you read all of them and you know what you’re doing).
Claude Code
In my opinion Claude Code from Anthropic and Gemini from Google are the best IA tools, currently, to assist you in the generation and review of code.
Claude Code is an IDE available for Windows and Mac, for Linux as today you have to use the terminal application (which is quite powerful nonetheless).
If you use Linux, you can use Claude from PHPStorm, in the integrated terminal. You’ve to install the plugin. Follow the instructions from Claude’s web site. The integration with PHPStorm is very good.
From Claude in Linux (Terminal) you can also paste images. Just copy them to the clipboard and paste them. You can also drag and drop to the Claude Terminal.
![See how I pasted an image, and Claude references it as [Image #2] as it is the second one that I pasted](https://blog.carlesmateo.com/wp-content/uploads/2026/05/image-1.png)
When I create new application, I always create a file named docs/prompt.md where I detail all the requirements for the new application. Then I ask Clause to create the application based on this file.
When there is a Database involved, I always ask Claude to document the Schema in a document inside the /docs folder named docs/scheme.md.
You can type /model to select the model you want to use (some are more expensive than others, normally depending on how good they are).
You can navigate through the chat history of your requests by pressing the up or down keys in your keyboard (like in MySQL or Bash for example)
You can select if you want to work with the branch master, or another, or you want to work with Worktrees, which is very practical.
If you hit slash (/) and then hit the up arrow a few time you can see the chat.
/clear to start a new session and free the context. You can later come back to your old session.
/model to change the AI model using. Some are more clever, some consume more tokens. You can also change the effort. More effort provides better results, but also higher token consumption.

Videos:
- My very first time installing Claude Code and running it, in Windows: https://www.youtube.com/watch?v=XF6VCi-cvOM
- Before and after refactoring my simple old web with Claude Code: https://www.youtube.com/watch?v=HtTJb0zSMa4
- Claude AI hands on creating a Book Store and fixing errors. Use PHPStorm, Docker, Docker Desktop, MySQL and Windows as host, and Ubuntu 26.04 in the containers: https://www.youtube.com/watch?v=Uilx7OjikTc
Perplexity
I use it for general questions about Internet, as it presents all the sources and I like that.
I use also for questions about code, as a chat.
I pay 20€ per month approx.
ChatGPT
The most known. It hallucinates a lot. I don’t use it.
JetBrains Junie
JetBrains has their own AI agent that integrates in their IDE PHPStorm.
My company pays a $20 USD/month subscription.
Instead of tokens they use credits and this subscription provides 20.00 credits per month. In my opinion they get exhausted too fast.


Using Junie I saw it was getting confused with the dates. Not knowing when it’s today, and thinking that software already released (like Ubuntu 26.04) was not released yet (even if we were in May).
Videos:
- Using AI Junie agent to create a project from zero: https://www.youtube.com/watch?v=pYhGaafRquw
Google Antigravity 2
The agentic tool. It is very similar to other vibe coding IA tools.
It is oriented to talking to the agent.
I preferred when we had the IDE and the agentic part together in Google Antigravity.
You can still still the Antigravity IDE as a separate tool.
Videos:
- Super fast introduction to Google Antigravity 2 vibe coding – May 2026: https://youtu.be/XqcbFT51f4M
Google Antigravity
Antigravity was an IDE with support for Gemini IA agents integrated, and others.
As of 2026-05-20 Google presented Antigravity 2, which separates the IDE and the agentic tool.
It offers a great amount of usage of different models for free, however lately I see that their server are saturated often, and it’s impossible to use it for free.
As an IDE has the basic functions, integration with github, and can be a good alternative to PHPStorm if you don’t want to pay for the IDE.
It supports many languages, not just PHP like Python, Java… You can also create binaries.
Videos:
- Windows development: Docker Desktop + docker-compose.yml + multiple containers + Ubuntu 26.04 + Symfony 7.4 + Antigravity + PHPStorm: https://www.youtube.com/watch?v=IkKEu1vI6bQ
- Vibe coding with Antigravity, real time adding new features to a web Symfony 7 project: https://www.youtube.com/watch?v=oe_aY2wN_eQ
- Generant una petita aplicació en go amb Gemini Flash amb Antigravity. Primer CLI i després GUI [ca]: https://youtu.be/bmLsbN0FF-A
- Antigravity de Google amb la IA Claude Sonnet 4.5 per a crear un aplicació GUI en Python en minuts que cerca arxius log al disc dur [ca]: https://www.youtube.com/watch?v=2hcnySeVAgo
Android Studio
Android Studio is for creating Android APPs. It’s free and bring incorporated Google Gemini IA for free with some limits obviously.
I created several applications for free with Android Studio and Gemini.
Videos:
- Crear un clon del Tetris en Android amb vibe coding de manera gratuïta [ca]: https://www.youtube.com/watch?v=f__uox8a9sc
Github Copilot
It makes sense if your organization works with github, has the repos in there, and creates the issues in there, with good descriptions.
Then you can ask copilot to work on several issues, as if it was a member of your team. It will work in parallel. And you’ll receive an email when the task is completed, with a PR (Pull Request).
As I was not using Github at work, the usefulness was a bit limited for me.
Codex
The coding agent from OpenAI (ChatGPT).
Only available for MacOs and Windows. Not for Linux.
Hands on creating a book store with Claude, for beginners, showing errors generated and fixing them easily
Claude AI hands on creating a Book e-Commerce and fixing errors, PHPStorm, PHP, Docker Desktop, MySQL in Windows
I’ll show the process of a creation of a web application for a e-Commerce book store.
The most important is to define a good requirements prompt.
I created a file named docs/promptia.md
Set the quality to the max in youtube to be able to see the screen clearly.
It takes long time, so unless you want to see all the process in real time, use the chapters I added to skip to the parts you’re interested.
Chapters in the youtube video:
00:00 Tell Claude to create a web app based on docs/promptia.md
18:29 Claude asks permission to run Powershell commands
19:02 Application created
19:37 Check in PHPStorm the promptia.md
19:51 Add to git and Commit with PHPStorm
20:27 Create and launch containers
20:50 Create the containers
20:54 Launch containers
21:10 Show in Docker Desktop
21:23 Display in logs entrypoint.sh
22:04 composer install
22:19 Error: missing composer require symfony/yaml
22:32 Asking Claude to fix the error
23:50 Destroy project to ensure it is build without errors (for later in Production)
24:28 Create destroy-project.bat
25:42 Re-creating the containers
25:52 Re-creating without cache
29:20 Containers launched in Docker Desktop
30:10 composer update
30:28 Checking engine container error in a .yaml in Claude Code
31:13 Error non-existent service “doctrine system cache pool”
31:34 Inside the engine container curl http://127.0.0.1 Http Error 500
31:44 composer dump-env dev
31:57 Error a non-empty secret is required Http Error 500
32:14 Showing Claude the error, so it fixes it
33:12 Check from the engine container curl http://127.0.0.1
33:42 Error could not find the driver
33:51 Asking Claud to fix the error
34:05 Finding the error in the logs
34:27 I ask Claude, to continue with the log entry, after it finishes
35:16 Claude fixes the first problem and starts analyzing the second
35:35 Claude finds and fixes the second problem (introduced by Claude before)
37:12 Creating the Database with the Command
37:32 A new curl, and a new error found (introduced by Claude before)
37:58 Requesting to Claude to fix the error
38:25 Claude fixes the error
38:30 The new website loads correctly
39:00 Viewing register form (needs work)
39:05 Request a script to enter to mysql via CLI
40:02 I open the new script login_to_mysql.sh in PHPStorm
40:23 Trying the CLI Command to init the Database Schema
40:39 Giving chmod +x from Docker (for commiting to the repo)
40:45 login_to_mysql.sh fails (due an error introduced by Claude before)
40:58 finding extension=pdo_mysql in php.ini on the container duplicated
41:10 Asking Claude to remove the error
41:37 Claude realizes the error
41:45 Logged to MySQL with the script
42:05 DESC orders;
42:18 Asking Claude a refactor or prices from DECIMAL to Integers
43:53 Ask next questions while Claude is still working
46:56 Update the Command to reflect the new field changes
48:00 Copy the ALTER TABLE
48:05 Execute in the MySQL in Docker Desktop
48:12 Schema updated in docs/scheme.md
48:18 Add a field “public_name”
48:58 Update MySQL with the ALTER
How to disable the 4GB local LLM IA that Google installs in Chrome without asking for permission
My very first time installing Claude Code and using it
I install Claude Code for the very first time, I use a voucher provided from a friend to use it 7 days for free with the USD $18 / month, although there is a Free Subscription you can use.
I donwload and install it on Windows 11 and I start to used it immediately with an incipient Symfony PHP Docker nginx Linux project.
I show you how I combine it with PHPStorm, how I use the Working Tree and the Pull Request (PR) and the problems I find when I request functionalities.
Video showing how to start with JetBrain’s Junie IA agent
A video as an introduction to Junie, showing the creation of a web project from zero, with Junie IA agent.
The subscription I used is $20 USD per month.
A Symfony 7.4 with PHP 8.5 in a Docker Container with Ubuntu 26.04 LTS is requested.
Junie creates the solution with Ubuntu 24.04 LTS and Symfony 7.1 and PHP 8.3, so I instruct it to fix it.
The video shows some errors created by the agent, and how to make it correct them.
Showing the exploting Copy Fail CVE-2026-31431 in an Ubuntu 24.04 just launched in Google Cloud, and how to fix it
So I show here how I launched a fresh Ubuntu 24.04 in Google Cloud, on 2026-05-04, and demostrate the exploit of escalation privileges Copy Fail (CVE-2026-31431) which allows you to become root from a regular user account in almost any Linux since year 2017.
It consists in the execution of a Python 3 code, which is only 732 bytes.
I show how I fixed it by upgrading the kernel and rebooting.
Here you can see the original tweet I saw: https://x.com/DarkWebInformer/status/2049579219190165658?s=20
And access the code: https://github.com/theori-io/copy-fail-CVE-2026-31431
I also tried on a fresh deployed Ubuntu 26.04 LTS and it was not affected by the exploit.
Vibe coding with Google Antigravity, new features, to a project, in real time
This video shows real example of my workflow, in real time, on how I programmed with Google Antigravity some new features, like adding discount coupons, for my commercial web project for quickly audio conversion https://audioconverter.carlesmateo.com/
I show some problems when working with Gemini 3 Flash, and how I instructed the IA to fix them.
Google Cloud how to add a Scheduled Snapshot to an instance and set frequency
How to schedule snapshots for your instances in Google Cloud.
Be aware that snapshots may be scheduled automatically, and daily, by Google.
You may want to schedule weekly snapshots to be retained for 90 days or similar.
Resizing the disk of your Ubuntu Server in Google Cloud GCP without rebooting
If you are running your instances in Google Gloud Compute Engine and you want to increase the size of the Disk without having to reboot, this video explains step by step how you can do it.
Go to Disks in GCP, select the disk of the instance you want to increase, then press Edit.
After you increase the Disk in Google Cloud Dashboard, then ssh to you instance.
There type:
lsblk
in order to list the devices.
In my case is sda and I want to grow the partition 1.
So I proceed with:
sudo growpart /dev/sda 1
Which growing from 30GB to 40GB produces the output:
CHANGED: partition=1 start=2324480 old: size=60590047 end=62914526 new: size=81561567 end=83886046
Is you type lsblk again you’ll see the new size.
But if you type df -h you’ll see that Linux still doesn’t see the space.
To finalize and claim the additional space execute (in my case is sda1):
sudo resize2fs /dev/sda1
A bit of programming a Symfony 7.4 PHP 8.5 web application, with Windows 11, Docker Desktop, docker-compose.yml, Ubuntu 26.04 Container, Antigravity (AI Gemini 3 Flash), PHPStorm (video)
I show some tips and tricks.



