<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gustavo Camargo</title>
    <description>The latest articles on DEV Community by Gustavo Camargo (@gcamargosilva).</description>
    <link>https://dev.to/gcamargosilva</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F973307%2F5ae63197-f242-48d1-9475-f3293f3c852b.png</url>
      <title>DEV Community: Gustavo Camargo</title>
      <link>https://dev.to/gcamargosilva</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gcamargosilva"/>
    <language>en</language>
    <item>
      <title>Planes and Code</title>
      <dc:creator>Gustavo Camargo</dc:creator>
      <pubDate>Wed, 02 Sep 2026 17:57:59 +0000</pubDate>
      <link>https://dev.to/gcamargosilva/planes-and-code-oc5</link>
      <guid>https://dev.to/gcamargosilva/planes-and-code-oc5</guid>
      <description>&lt;p&gt;&lt;em&gt;The original Portuguese version is available at: &lt;a href="https://gustavocamargo.com/articles/avioes-e-codigo" rel="noopener noreferrer"&gt;https://gustavocamargo.com/articles/avioes-e-codigo&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Sit down, because here comes a story!"&lt;/em&gt;&lt;br&gt;
― Lito Sousa&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;During elementary school, when computers to me were basically DDTank, Habbo Hotel, and Animes Online, I had a dream very different from what I do today: I wanted to become an airplane pilot.&lt;/p&gt;

&lt;p&gt;I even went with my mother to an aviation school in Jundiaí called Academia das Águias to get an estimate and understand what the training was like, how long it would take, and how much it would cost. I left there with a plan: when I turned 18, I would start studying for the ANAC theoretical exam.&lt;/p&gt;

&lt;p&gt;In the meantime, I found a book about the C programming language in the library that would change my perspective on what I actually wanted to do for a living.&lt;/p&gt;

&lt;p&gt;Now, more than 15 years later, I've been reflecting on how aviation is actually a great analogy for what we're going through...&lt;/p&gt;

&lt;h2&gt;
  
  
  What was flying like in the 1920s and 1930s?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpaefx7lmxcntco9l8jj5.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpaefx7lmxcntco9l8jj5.webp" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;Wind, Sand and Stars&lt;/em&gt;, an autobiographical and memoir-style book written by Antoine de Saint-Exupéry, author of &lt;em&gt;The Little Prince&lt;/em&gt;, he tells stories about what it was like to be an aviator in the 1920s and 1930s.&lt;/p&gt;

&lt;p&gt;A good aviator was someone who had already crossed and mapped extremely dangerous routes, someone who understood weather and wind, and who connected with the aircraft as if they were one, because they had to make every micro-decision involved in flying an aircraft.&lt;/p&gt;

&lt;p&gt;But above all, the book presents this as an &lt;strong&gt;identity&lt;/strong&gt;. You weren't just a pilot; you were an &lt;strong&gt;aviator&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To this day, being an aviator is still an identity. People go to flying clubs to practice, study the subject, and improve their skills, without necessarily having a career in mind or expecting financial gains from it.&lt;/p&gt;

&lt;p&gt;But if you want to transport 300 people to another continent, the training needs to be different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But aviators and programmers will always exist.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does it take to become an airplane pilot? (The big airport)
&lt;/h2&gt;

&lt;p&gt;The journey to becoming a commercial pilot is divided into a few stages. First, you pass the ANAC theoretical exam and medical examinations, and then you can start taking lessons at flying clubs with an instructor. It takes around 10 to 20 hours before you can make your first solo flight.&lt;/p&gt;

&lt;p&gt;But even then, you still can't perform paid flights.&lt;/p&gt;

&lt;p&gt;To work professionally, you need to obtain a Commercial Pilot License and meet the required flight experience requirements.&lt;/p&gt;

&lt;p&gt;And to reach airline aviation, the training and experience required are even greater, reaching 1,500 flight hours for an Airline Transport Pilot License.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A lot of studying and a lot of training.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is flying like today?
&lt;/h2&gt;

&lt;p&gt;In commercial aviation, pilots work alongside highly automated systems. Their role is no longer to continuously control every movement of the aircraft, but instead involves much more monitoring, automation management, and decision-making.&lt;/p&gt;

&lt;p&gt;It is commonly said that the pilot only takes control during takeoff, landing, and &lt;strong&gt;when something stops working.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And when something stops working, that's when training, practice, studying, and experience come into play.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because a pilot is capable of flying an airplane even when equipment fails, even when the autopilot stops working, and even if an engine fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why doesn't a commercial pilot forget procedures after years of experience, or have a "Brain Freeze" because of the autopilot?
&lt;/h2&gt;

&lt;p&gt;For this reason, airlines regularly adopt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recurrent training:&lt;/strong&gt; periodic simulator sessions covering systems, procedures, emergencies, and CRM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emergency simulations:&lt;/strong&gt; engine failures, fires, depressurization, windshear, automation failures, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proficiency evaluations:&lt;/strong&gt; pilots must demonstrate that they can execute procedures and make decisions correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation:&lt;/strong&gt; pilots are trained to use automation, but also to &lt;strong&gt;take over manually and deal with failures&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recent experience:&lt;/strong&gt; if a pilot spends too much time without flying, they need to regain proficiency before returning to normal operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, even with autopilot, it is important for companies to provide time for professionals to step out of autopilot mode, revisit the fundamentals, and not forget how to take control if something stops working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;At this point, I want to be even more explicit: It is very, very important that companies provide professionals with the means to prevent cognitive atrophy from constantly using a tool that can do everything with just one or two words.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does all of this have to do with code/development?
&lt;/h2&gt;

&lt;p&gt;You still need many hours of practice and experience to become a developer (especially at large companies).&lt;/p&gt;

&lt;p&gt;Even if 90% of the work is done by an AI, that doesn't mean anyone can do the other 10%. It doesn't even mean that anyone can simply watch those 90% being done. If something goes wrong — and it will (Murphy's Law) — the person watching must be capable of directing things toward the correct path.&lt;/p&gt;

&lt;p&gt;It is very important for companies to create mechanisms to prevent the degradation of proficiency caused by excessive use of automation.&lt;/p&gt;

&lt;p&gt;In other words: we need moments when the autopilot is turned off.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Maybe every 30 days we could have a few days where the use of AI was deliberately reduced.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We love Opus, Fable, Sonnet, Sol, GLM, KIMI...&lt;/p&gt;

&lt;p&gt;But this cannot be pushed in exchange for absolute productivity to the point where it creates the feeling that we are losing our ability — and the time — to analyze, build durable solutions, and deal with problems.&lt;/p&gt;

&lt;p&gt;Productivity will always prevail, which is why companies need to help balance this equation.&lt;/p&gt;

&lt;p&gt;And finally, programmers will always exist.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Everything I know about aviation comes from channels such as *Aviões e Músicas&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lito, you are in my prayers.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Por que deixei a “empresa dos sonhos” para voltar ao ritmo de startup</title>
      <dc:creator>Gustavo Camargo</dc:creator>
      <pubDate>Thu, 14 Aug 2025 17:43:42 +0000</pubDate>
      <link>https://dev.to/gcamargosilva/por-que-deixei-a-empresa-dos-sonhos-para-voltar-ao-ritmo-de-startup-1l3j</link>
      <guid>https://dev.to/gcamargosilva/por-que-deixei-a-empresa-dos-sonhos-para-voltar-ao-ritmo-de-startup-1l3j</guid>
      <description>&lt;p&gt;Sim, eu saí daquele banco roxinho para voltar a trabalhar em ritmo de startup.&lt;/p&gt;

&lt;p&gt;Nada contra ele — foi, disparadamente, a melhor empresa em que já trabalhei. Tinha um pacote de benefícios incrível e uma excelente compensation. Eu estava voando, amando programar em Clojure e entregar features para milhões de pessoas. Mas, ainda assim, faltava algo, sabe? No fundo, eu não me sentia protagonista. Sentia como se fosse apenas mais uma peça em meio a tantas outras. Sei que, para a grande maioria das pessoas, isso está tudo bem, mas eu não me sentia realizado.&lt;/p&gt;

&lt;p&gt;Foi então que conversei com um amigo de longa data, o Rodrigo Mendes, atualmente CTO da benup, uma HRTech. E, por mais que o nicho não me atraísse tanto — afinal, eu sempre priorizei o mercado financeiro —, a filosofia e a cultura que ele estava desenhando fizeram total sentido para o que eu estava buscando.&lt;/p&gt;

&lt;p&gt;Essa filosofia é baseada em alguns pilares:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Times enxutos:&lt;/strong&gt; poucas pessoas no time, com autonomia para construir serviços e fluxos completamente do zero, desde o desenho até o deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simplicidade:&lt;/strong&gt; nosso código é simples; não temos, e nem queremos ter, várias camadas para inserir um dado no banco de dados.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modelo ShapeUp:&lt;/strong&gt; aqui não temos backlog; temos uma mesa de apostas e um ciclo bem definido do que queremos entregar.&lt;/p&gt;

&lt;p&gt;Tudo isso fez total sentido para o que eu procurava. Se tem algo que me irrita no desenvolvimento é board e microtarefas. Em um time sênior, todos sabem o que precisa ser feito e como será feito. É uma cultura de alta responsabilidade que eu valorizo muito. Em apenas dois meses, já entreguei muito mais do que em um ano, e isso não por excesso de trabalho, mas pela realização no que faço e pela estrutura enxuta, que elimina caminhos e ritos desnecessários e foca na entrega.&lt;/p&gt;

&lt;p&gt;Não estamos fazendo nada inédito aqui: o WhatsApp processa 50 bilhões de mensagens por dia e possui apenas 32 engenheiros.&lt;/p&gt;

&lt;p&gt;Se você quer saber mais sobre a benup, pode conferir o nosso &lt;a href="https://blog.benup.io/posts/nosso-super-homem/" rel="noopener noreferrer"&gt;blog&lt;/a&gt; e fique à vontade para se &lt;a href="https://benup.inhire.app/vagas/9736c8e8-c14e-4088-a37e-8a8caa332a24/engenheiroa-de-software-sr" rel="noopener noreferrer"&gt;inscrever na nossa posição em aberto&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>career</category>
      <category>braziliandevs</category>
    </item>
    <item>
      <title>Calling Clojure from Java using a real example (Clojure + Quarkus)</title>
      <dc:creator>Gustavo Camargo</dc:creator>
      <pubDate>Tue, 01 Oct 2024 17:52:02 +0000</pubDate>
      <link>https://dev.to/gcamargosilva/calling-clojure-from-java-real-example-clojure-quarkus-3dbl</link>
      <guid>https://dev.to/gcamargosilva/calling-clojure-from-java-real-example-clojure-quarkus-3dbl</guid>
      <description>&lt;h2&gt;
  
  
  The challenge
&lt;/h2&gt;

&lt;p&gt;Last weekend, I decided to explore more about how Clojure can interact with the existent Java ecosystem, the challenge was simple: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create a simple web framework in Clojure using the Quarkus framework as a base. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Premises:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Quarkus does not know what will be executed by route, even not how many routes exist.&lt;/li&gt;
&lt;li&gt;I should be able to create routes and handlers using Clojure as simply as possible:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight clojure"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;defn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;send-hello-world&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;defn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;routes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="no"&gt;:method&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"GET"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="no"&gt;:path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"/hello"&lt;/span&gt;&lt;span class="w"&gt; 
                  &lt;/span&gt;&lt;span class="no"&gt;:handler&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;send-hello-world&lt;/span&gt;&lt;span class="p"&gt;}])&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Some definitions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quarkus&lt;/strong&gt;: Quarkus is a full-stack, Kubernetes-native Java framework made for Java virtual machines (JVMs) and native compilation, optimizing Java specifically for containers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clojure&lt;/strong&gt;: Is a dynamic, general-purpose programming language&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Creating a Quarkus app
&lt;/h2&gt;

&lt;p&gt;It is very easy to start an app in Quarkus you can follow this &lt;a href="https://quarkus.io/get-started/" rel="noopener noreferrer"&gt;tutorial&lt;/a&gt;, as you can see your last command will be &lt;code&gt;quarkus create &amp;amp;&amp;amp; cd code-with-quarkus&lt;/code&gt; after that you can open the folder code-with-quarkus with your favorite IDE, the command created the basic structure of a Quarkus app, and you can run with &lt;code&gt;quarkus dev&lt;/code&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Enable the project to recognize clj files
&lt;/h2&gt;

&lt;p&gt;You need to configure Quarkus to include .clj files in target folder (The folder with your compiled app), and you can do it by adding this configuration in &lt;code&gt;pom.xml&lt;/code&gt; inside &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;resources&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;resource&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;directory&amp;gt;&lt;/span&gt;/&lt;span class="nt"&gt;&amp;lt;/directory&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;includes&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;include&amp;gt;&lt;/span&gt;*.clj&lt;span class="nt"&gt;&amp;lt;/include&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/includes&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/resource&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/resources&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Create Clojure file
&lt;/h2&gt;

&lt;p&gt;As I mentioned earlier, I defined one structure to declare my routes, in the same location of the folder &lt;code&gt;main&lt;/code&gt;. Then I created a folder named &lt;code&gt;quarkus_clj&lt;/code&gt; with a file called &lt;code&gt;core&lt;/code&gt; with the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight clojure"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;quarkus-clj.core&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;defn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;send-hello-world&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;defn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;routes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="no"&gt;:method&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"GET"&lt;/span&gt;&lt;span class="w"&gt;
                  &lt;/span&gt;&lt;span class="no"&gt;:path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"/hello"&lt;/span&gt;&lt;span class="w"&gt; 
                  &lt;/span&gt;&lt;span class="no"&gt;:handler&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;send-hello-world&lt;/span&gt;&lt;span class="p"&gt;}])&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Enabling Quarkus to handle my Clojure program
&lt;/h2&gt;

&lt;p&gt;Here is where the magic happens 🎩🪄! &lt;/p&gt;

&lt;p&gt;First of all, you should install the Clojure inside your Quarkus app; you can do it by adding a dependency in &lt;code&gt;pom.xml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.clojure&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;clojure&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;1.11.1&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt; 
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you can delete the file &lt;code&gt;GreetingResource.java&lt;/code&gt; and its tests. In the same place, create a file &lt;code&gt;Starting.java&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I write some comments explaining how it works&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@ApplicationScoped&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Starting&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Setup app routes&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setupRouter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;@Observes&lt;/span&gt; &lt;span class="nc"&gt;Router&lt;/span&gt; &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Load Clojure core;&lt;/span&gt;
        &lt;span class="nc"&gt;IFn&lt;/span&gt; &lt;span class="n"&gt;require&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"clojure.core"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"require"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="c1"&gt;// Load quarkus-clj.core namespace&lt;/span&gt;
        &lt;span class="n"&gt;require&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"quarkus-clj.core"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt; 

        &lt;span class="c1"&gt;// Load the route list function&lt;/span&gt;
        &lt;span class="nc"&gt;IFn&lt;/span&gt; &lt;span class="n"&gt;routesFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"quarkus-clj.core"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"routes"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Invoke the function with no parameters&lt;/span&gt;
        &lt;span class="nc"&gt;PersistentVector&lt;/span&gt; &lt;span class="n"&gt;routesVector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;PersistentVector&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;routesFn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

        &lt;span class="c1"&gt;//For each route in routes vector &lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;routesVector&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="cm"&gt;/**Get the route map, example
            {:method "GET"
             :path "/hello" 
             :handler send-hello-world}
             */&lt;/span&gt;
            &lt;span class="nc"&gt;PersistentArrayMap&lt;/span&gt; &lt;span class="n"&gt;routeMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;PersistentArrayMap&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

            &lt;span class="c1"&gt;//Get :path value&lt;/span&gt;
            &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;routeMap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;valAt&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":path"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
            &lt;span class="c1"&gt;//Get :handler function&lt;/span&gt;
            &lt;span class="nc"&gt;IFn&lt;/span&gt; &lt;span class="n"&gt;handlerRoute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;IFn&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;routeMap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;valAt&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":handler"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
            &lt;span class="c1"&gt;//Get :method value&lt;/span&gt;
            &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;routeMap&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;valAt&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Clojure&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":method"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
            &lt;span class="c1"&gt;//Create a handler to exec handler function&lt;/span&gt;
            &lt;span class="nc"&gt;Handler&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RoutingContext&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;handlerFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;RoutingContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;handlerRoute&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;  
            &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;};&lt;/span&gt;
            &lt;span class="c1"&gt;//Config the route in quarkus&lt;/span&gt;
            &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;route&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpMethod&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;valueOf&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handlerFn&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can just run: &lt;code&gt;quarkus dev&lt;/code&gt; open your declared route and see the result! &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This was a quick example of how to use Clojure inside a Quarkus app to create dynamic routes. With just a few steps, we connected the two ecosystems and set up a basic routing system. Feel free to expand on this foundation and explore other possibilities with Clojure and Quarkus!&lt;/p&gt;

</description>
      <category>clojure</category>
      <category>programming</category>
      <category>quarkus</category>
      <category>java</category>
    </item>
  </channel>
</rss>
