Devin versione open source: l'AI sa programmare per davvero! 💣

Giuseppe Funicello
29 Mar 202407:06

Summary

TLDRThe video script describes the process of creating a program from scratch that converts Japanese Yen to Euros, highlighting the use of the terminal, browser, and web scraping to obtain the current exchange rate. The software engineer, Devin, not only writes the program but also adds tests, version control with Git, and even suggests future improvements like GUI creation and error handling. The project is open-source, requiring Docker, Python, and Node, and aims to demonstrate the potential of combining various functionalities and interactions in a loop, showcasing the continuous improvement possible with such projects.

Takeaways

  • 🚀 The video involves creating a program from scratch, highlighting the development process and tools used.
  • 🌐 The developer uses the terminal, browser, and other tools to build a currency converter from Yen to Euro.
  • 📈 The script emphasizes the importance of understanding current exchange rates for accurate currency conversion.
  • 🔍 The developer performs web scraping to extract the current exchange rate from a website.
  • 📝 The video showcases the use of APIs to fetch data, specifically for obtaining the exchange rate.
  • 💻 The process includes setting up a development environment, such as installing Node.js via package manager.
  • 🔧 The developer commits changes to the repository, emphasizing the practice of version control in software development.
  • 📋 The script mentions the creation of tests, demonstrating a focus on quality assurance and best development practices.
  • 🛠️ The developer improves the program by making it dynamic, allowing user input for the conversion process.
  • 🔄 The video highlights the use of Docker for sandbox testing, isolating the development environment from the user's computer.
  • 📊 The project is open-source, encouraging community involvement and collaboration.
  • 🔮 The video concludes with a discussion on future work, such as creating a GUI and improving error handling mechanisms.

Q & A

  • What task is the software engineer attempting to accomplish in the video?

    -The software engineer is trying to create a program from scratch that converts a sum of money from yen to euros.

  • How does the software engineer begin the task?

    -The engineer starts by listing the contents of the workspace and then seeks to find the current exchange rate for yen to euro conversion.

  • What method does the engineer use to obtain the exchange rate?

    -Initially, the engineer tries to scrape a website for the current exchange rate. Later, they find a site that potentially provides this information through an API call.

  • What tools and technologies are mentioned as part of the development process?

    -The script mentions the use of the terminal, a code editor, Docker for environment isolation, Python for the backend, Node.js for the frontend, and Git for version control.

  • How does the software engineer handle the dynamic input from the user?

    -The engineer changes the code to allow the user to input the amount of yen they want to convert, making the program more flexible and user-friendly.

  • What does the software engineer do after testing the program with a static example?

    -After confirming that the program works with a static example of 1000 yen, the engineer modifies the code to make it dynamic, allowing the user to input any amount for conversion.

  • Why does the software engineer perform a Git Commit during the development process?

    -The engineer performs a Git Commit to save the progress made so far and to follow good development practices, which include versioning and regular commits.

  • What additional features does the software engineer consider for future work?

    -The engineer considers adding a GUI (Graphical User Interface), improving error handling mechanisms, and possibly extending the functionality of the program.

  • How does the software engineer ensure the program's actions are executed correctly?

    -The program uses a loop that performs different actions based on the output received from the sandbox environment, browser, or command line, ensuring that the correct steps are taken at each stage.

  • What is the significance of the 'future work' section in the software engineer's documentation?

    -The 'future work' section outlines potential improvements and additional features that could be added to the program, providing a roadmap for further development.

  • How does the software engineer demonstrate the importance of testing in the development process?

    -The engineer writes tests for the program without being prompted, showing a commitment to quality and reliability in software development.

Outlines

00:00

🚀 Coding a Money Conversion Program from Scratch

The paragraph describes the process of creating a program from zero that converts Japanese Yen to Euros. The software engineer, Devin, is tasked with this project and is seen using the terminal, a planner, and a browser to achieve this. The script reveals that the audience will be shown the code and how it works, meeting their expectations. The program is intended for a trip to Japan and starts with a simple task of listing the workspace, checking the current exchange rate, and proceeding to extract this information by scraping a webpage. Devin also explores using APIs for this purpose and writes the code in a code editor. The script further details the installation of Node.js and the testing of the program. It also highlights the importance of version control with Git and the addition of tests to ensure the program's reliability.

05:01

🤖 Understanding Agent's Actions and Future Work

This paragraph delves into the workings of an agent that performs various actions in a loop. These actions can range from executing commands in the command line, browsing URLs, to reading files. The decision-making process of the agent is based on analyzing outputs from the sandbox or browser. The paragraph also discusses the concept of scraping using an LLM and the integration of different functionalities to perform complex tasks. The project is an open-source initiative that aims to push the boundaries of what's possible with models like Devin. It emphasizes the importance of continuous improvement and testing, suggesting that the agent's capabilities can be enhanced by community contributions. The paragraph concludes with a call to action for the audience to share their ideas and experiences with the project.

Mindmap

Keywords

💡Open Source

Open Source refers to a software or project where the source code is made publicly available, allowing anyone to view, use, modify, and distribute the software without restrictions. In the context of the video, the software engineer is working on an Open Source version of Devin, which implies a collaborative and transparent development process. This is exemplified by the creation of a repository where the community can contribute and improve the project.

💡API

API, or Application Programming Interface, is a set of protocols and tools for building software applications. It allows different software systems to communicate with each other, enabling the exchange of data or functionality. In the video, the software engineer is looking for an API to fetch the current exchange rate for converting Yen to Euros. This highlights the importance of APIs in accessing and utilizing data from external sources within a program.

💡Terminal

The terminal is a command-line interface that allows users to interact with the operating system by typing commands. It is a powerful tool for developers as it provides direct control over the system and its processes. In the video, the software engineer uses the terminal to execute various tasks, such as listing files in the workspace, installing Node.js, and running the program, demonstrating the terminal's versatility and efficiency in software development.

💡Version Control

Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. It is an essential tool for developers to track the history of their code, collaborate with others, and manage different stages of development. In the video, the software engineer uses Git for version control, which is evident when he makes a commit to the repository, highlighting the importance of version control in maintaining and organizing code changes.

💡Docker

Docker is a platform that enables developers to develop, deploy, and run applications inside containers. Containers are lightweight, portable, and self-sufficient, allowing the same application to run on any system regardless of the underlying architecture. In the video, the software engineer uses Docker to create a sandbox environment for testing the program without affecting the host machine, demonstrating Docker's utility in isolating the development environment and ensuring consistency across different systems.

💡Node.js

Node.js is a cross-platform, open-source JavaScript runtime environment that allows developers to run JavaScript code outside of a web browser. It uses an event-driven, non-blocking I/O model, making it ideal for building scalable and efficient network applications. In the video, the software engineer installs Node.js to execute the program, showcasing Node.js's role in running server-side JavaScript applications.

💡Conversion Rate

The conversion rate refers to the ratio at which one currency can be exchanged for another. It is a crucial factor in international transactions and travel, as it determines the amount of money received or paid in a different currency. In the video, the main objective is to create a program that converts a sum of money from Yen to Euros, making the concept of the conversion rate central to the project's purpose.

💡Web Scraping

Web scraping is the process of extracting data from websites. It involves using software tools to navigate through a website, locate the required information, and extract it in a readable format. In the video, the software engineer initially attempts to perform web scraping to extract the current exchange rate from a website, demonstrating a common technique for gathering data from online sources.

💡Programming

Programming is the process of creating and maintaining software by writing code in a programming language. It involves designing, coding, testing, and debugging software to achieve specific functionality. In the video, the software engineer is engaged in programming tasks, such as writing code to create a program that converts currencies, highlighting the core activities involved in software development.

💡Testing

Testing in software development refers to the process of evaluating the program or its components to detect defects or errors. It is a critical step to ensure the software's functionality, reliability, and performance. In the video, the software engineer writes tests for the program, indicating a proactive approach to quality assurance and the importance of testing in maintaining software integrity.

💡Repository

A repository, often shortened to 'repo', is a storage location for a collection of source code, documentation, and other files related to a software project. It is a central place where developers can collaborate, track changes, and manage the project's evolution. In the video, the software engineer's work is saved in a repository, which is essential for version control and collaborative development.

Highlights

The creation of a program from scratch to convert Yen to Euro is discussed, showcasing the development process.

The importance of understanding the current exchange rate for accurate currency conversion is emphasized.

The use of web scraping to extract real-time exchange rates from a website is demonstrated.

The developer's approach to finding and utilizing APIs for fetching exchange rates is highlighted.

The process of setting up a development environment, including installing Node.js, is detailed.

The program's functionality is tested with a sample amount of 1000 Yen.

The developer's attention to version control using Git is showcased, including committing changes and initializing the repository.

The creation of tests for the program is discussed, highlighting the developer's proactive approach to quality assurance.

The use of a sandbox environment for testing and development is explained, emphasizing its benefits for isolation and safety.

The integration of a Python engine and a Node.js front-end for the program is mentioned, highlighting the technical stack.

Instructions for installing and running the program using Docker are provided.

The open-source nature of the project is stressed, encouraging community involvement and contribution.

The potential for future work, such as creating a GUI and improving error handling, is discussed.

The developer's iterative process of adding features and refining the program is described.

The video's educational value for programming and development practices is highlighted.

The importance of studying and experimenting with new technologies for personal and professional growth is emphasized.

Transcripts

play00:00

dunque gli chiediamo di creare un

play00:02

programma Oh sì Ha scritto anche i test

play00:05

ragazzi Attenzione sta facendo anche un

play00:06

Commit Oh wow ragazzi Questa cosa è

play00:09

senza senso quello che vedete è Open

play00:11

Devin la versione Open Source di Devin

play00:13

software engineer ai ora insieme andremo

play00:15

a chiedergli di creare un programma da

play00:17

zero e vedremo come usa il terminale il

play00:19

planner il browser e vi spoilero che

play00:21

vedremo il codice ed esattamente come mi

play00:23

aspettavo che funzionasse Se vi va

play00:25

mettete un like E iscrivetevi perché

play00:27

parleremo ancora molto di come

play00:28

funzionano sotto il cof queste soluzioni

play00:30

con II io come sempre sono Gippi

play00:32

Bentornati dunque gli chiediamo di

play00:34

creare un programma che dato una somma

play00:38

di denaro in yen converte in euro che mi

play00:43

servirà visto che sto per andare in

play00:45

Giappone Vediamo cosa succede Dunque

play00:47

Starting New Task prima cosa fa un LS

play00:49

nel workspace credo e non c'è niente Mi

play00:52

serve sapere il l'exchange corrente rate

play00:55

corrente per sapere come convertire

play00:57

vediamo cosa fa va a visitare un sito

play01:00

per cercare di di estrarre il appunto il

play01:03

cambio attuale e deve leggere la webpage

play01:05

che ha aperto quindi sta faccendo

play01:07

scrapping in automatico l'output era

play01:09

vuoto cercato delle api a caso l'ha

play01:11

cercato e dice che dovrebbe usare queste

play01:14

api di questo di questo sito vediamo E

play01:18

allora forse sta scrivendo qualcosa Dice

play01:21

che devo devo usare appunto devo creare

play01:22

delle api per andare vedete fa tutto da

play01:24

solo Sta cercando di step by step le

play01:27

cose ha cercato quindi il il tasto di

play01:29

cambio adesso ho trovato un sito dove in

play01:31

teoria potrebbe raggiungere questa

play01:33

informazione con una chiamata apepi e ha

play01:36

scritto adesso questo codice questo nel

play01:38

Cod editor se vado nel Cod editor vedo

play01:40

il codice vedo che fa una chiamata a

play01:42

Quest api e praticamente gli restituisce

play01:45

la il rate Boh vediamo se funziona Dice

play01:48

che non ha trovato Node perché crea un

play01:50

Sandbox lo vediamo dopo in cui non c'è

play01:52

niente Quindi Installa Node e sta

play01:54

facendo APT Get Install di Node qua Nel

play01:57

terminale Si vede che sta scaricando

play01:58

Node quindi fa sta facendo APT Install

play02:01

no js tutto da solo Ovviamente questo

play02:04

nel docker c'è un docker in cui lui può

play02:05

fare quello che gli pare non è né sulla

play02:08

mia macchina né da nessuna parte Ok

play02:11

adesso gli sta sta facendo la prova con

play02:12

1000 di esempio vedere se funziona ok Ha

play02:16

funzionato Non lo so e ha cambiato per

play02:17

renderlo dinamico in modo che sia

play02:19

l'utente a scrivere fa tutto lui se la

play02:21

canta se la suona quindi fa un Red Line

play02:23

Question gli metto gli metto l' Mount di

play02:27

di Yen poi lui converte e chiude vediamo

play02:30

che qua lo prova Eccolo qua Node e lo

play02:33

lancia 1000 l'aveva convertito in €6

play02:36

Adesso invece l'ha provato a mano ma non

play02:38

l'ho eseguito Adesso sto facendo un Git

play02:40

Commit Attenzione sta facendo anche un

play02:42

Commit perché gli mancava l' init Oh wow

play02:46

wow ha capito che doveva prima iniziare

play02:49

repository ragazzi pazzesca sta cosa e

play02:51

vediamo che ha scritto anche un file

play02:54

redmi per spiegare che cosa doveva fare

play02:56

adesso appunto c'è anche il versioning

play02:58

perché ha installato Git e però dice che

play03:00

ogni tanto bisognerebbe fare dei check

play03:02

mi sta dando dei consigli su l'usabilità

play03:04

la manit Ma fatti fatti tuoi fai tutto

play03:07

tu lo farai tu a tempo debito Ok Adesso

play03:09

invece ci sta davvero pensando lui

play03:11

perché sta cercando un framework per

play03:14

fare test Oh sì Ha scritto anche i test

play03:16

ragazzi sta diventando migliore di

play03:19

tantissimi sviluppatori non si fermerà

play03:21

mai quindi quindi ha scritto da solo

play03:23

anche i test senza che io abbia chiesto

play03:24

nulla Io ho detto solo di fare un

play03:25

programma è assurdo ragazzi tutto ciò è

play03:28

Comunque assurdo No vabbè Cioè quindi ha

play03:30

aggiunto i test Giustamente è andato a

play03:34

ad aggiungere nel redmi che ha aggiunto

play03:36

i test Ma il bello è che c'è anche la

play03:38

sezione future work lavori da fare

play03:40

quindi creare una Gui non è che ci

play03:43

possiamo fare Ci dà anche i suggerimenti

play03:44

su cosa servirebbe fare adesso dice che

play03:46

vuole migliorare la gestione degli

play03:48

errori quindi deve creare un nuovo

play03:50

meccanismo per gestirli bello perché ad

play03:52

ogni step mi spiega esattamente che cosa

play03:55

servirebbe fare e cosa va a fare per

play03:57

cercare di raggiungere l'obiettivo

play03:59

Questa è la repository Ovviamente vi

play04:01

metto il link in descrizione è un

play04:03

progetto Open Source che cerca di

play04:05

ricalcare Appunto quello che Devin ci ha

play04:07

fatto vedere di saper fare appunto

play04:09

richiede docker Python e Node Se volete

play04:11

provarlo perché è ha tutto un motore in

play04:13

Python e poi ha un front-end in Node

play04:15

invece per la parte invece che avete

play04:16

visto di interfaccia grafica per

play04:18

installarlo Basta seguire le istruzioni

play04:20

appunto installarsi Python avere

play04:22

l'immagine per la sendbox quello che gli

play04:24

serve per tirare su un ambiente docker

play04:26

sul vostro computer e poter fare i suoi

play04:29

giochi senza andare a toccare cose del

play04:31

vostro computer quindi la Sandbox lascia

play04:33

tutto molto isolato Alla fine però Avete

play04:35

accesso al codice perché lo mette in una

play04:36

cartella del della vostra Repo qua fa

play04:39

vedere il frontend Potete utilizzare

play04:40

anche altri modelli Quindi anche questo

play04:43

è interessante ed è ovviamente in super

play04:45

Beta è un work in progress ma è molto

play04:47

figo e andiamo a vedere un po' di codice

play04:49

in realtà è molto complesso ovviamente

play04:51

non l'ho studiato alla perfezione ma se

play04:54

andiamo a vedere l'agent appunto questo

play04:56

agente il nostro Open davin ha questo

play04:58

Start loop che fa vedere appunto esegue

play05:01

degli step in loop e ogni volta fa delle

play05:04

azioni diverse le azioni appunto possono

play05:07

essere di diverso tipo vedete qua

play05:09

abbiamo diverse azioni c'è appunto

play05:10

lanciare qualcosa nel CMD fare il Brows

play05:13

di in URL leggere dei file e quindi lui

play05:16

ad ogni step in questo loop decide che

play05:18

cosa fare e come fa a deciderlo è una

play05:21

questione di leggere l'output o di un

play05:23

comando sulla Sandbox oppure sul browser

play05:26

Come fare scraping Tra l'altro in un

play05:28

altro video vedremo anche come fare

play05:30

scraping utilizzando un llm ma il gioco

play05:33

è mettere insieme diverse funzionalità

play05:36

quindi è in grado di eseguire su una

play05:38

macchina docker dei comandi in grado di

play05:40

lanciare l'applicazione di base leggere

play05:42

gli output dare degli input e vedere

play05:44

cos'è l'output l'output che gli arriva

play05:47

che alla fine è una serie di di parole

play05:49

lo analizza grazie a un motore

play05:52

linguistico quindi il gioco è mettere

play05:54

insieme tante interazioni come appunto

play05:56

nel video di Devin avevo detto mi

play05:58

sembrava solo un una una continua

play06:00

interazione con azioni diverse questo

play06:01

progetto Open Source fa esattamente

play06:03

questo e quindi questo vuol dire che

play06:04

tutti i limiti di un modello le

play06:07

allucinazioni non c'è una vera e propria

play06:09

intelligenza poi si può migliorare

play06:11

questo è molto interessante perché è un

play06:12

progetto Open Source lo vedremo ancora

play06:14

ci giocherò e proverò a spingerlo al

play06:16

limite vedendo un po' di cose

play06:18

interessante Fatemi sapere nei commenti

play06:20

se avete delle idee dei test o se lo

play06:22

avete provato volete provarlo come vi

play06:24

sembra perché devo dire che quando mi ha

play06:27

fatto il redmi a Commit sono rimasto un

play06:30

pochettino così un pochettino scioccato

play06:32

dal dall'azione ed è qua Sta

play06:35

l'importanza poi di provare queste cose

play06:36

a studiarci perché così si possono

play06:39

implementare come ho fatto io nel mio

play06:41

sito www.jd Dev dove insegno

play06:43

programmazione Adesso anche grazie

play06:44

all'aiuto di jpt la mia versione II Se

play06:46

vi interessa link in descrizione quindi

play06:48

ragazzi Fatemi sapere nei commenti se

play06:50

siete scioccati come me quindi

play06:52

parzialmente ovviamente iscrivetevi

play06:54

perché parleremo ancora faremo altri

play06:56

test con questo ma ce n'è tanti Ce n'è

play06:58

tanti quindi vedremo un po' Come si

play06:59

gioca con l' ai E cosa si fa poi

play07:02

fondamentalmente sotto Grazie per aver

play07:04

visto il video come sempre alla prossima

Rate This

5.0 / 5 (0 votes)

Related Tags
Currency ConversionAPI IntegrationVersion ControlProgramming TutorialWeb ScrapingNode.jsDocker SandboxOpen SourceSoftware EngineeringTechnical Innovation