<?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: darjus</title>
    <description>The latest articles on DEV Community by darjus (@darjus_dev).</description>
    <link>https://dev.to/darjus_dev</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1466126%2F66b3f51d-5ef0-41f0-9a8c-fb7f48918057.png</url>
      <title>DEV Community: darjus</title>
      <link>https://dev.to/darjus_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darjus_dev"/>
    <language>en</language>
    <item>
      <title>Power of Agent assisted coding and learning to achieve goals faster and cheaper</title>
      <dc:creator>darjus</dc:creator>
      <pubDate>Sat, 14 Feb 2026 14:09:29 +0000</pubDate>
      <link>https://dev.to/darjus_dev/power-of-agent-assisted-coding-and-learning-to-achieve-goals-faster-and-cheaper-2oin</link>
      <guid>https://dev.to/darjus_dev/power-of-agent-assisted-coding-and-learning-to-achieve-goals-faster-and-cheaper-2oin</guid>
      <description>&lt;p&gt;Today in tech there are a lot of AI skeptics saying that AI is opening Pandora’s box for security, performance, and maintainability issues because engineers rely on agent-assisted (a.k.a. vibe) coding.&lt;/p&gt;

&lt;p&gt;Partially this makes sense, but the blame is often misplaced. Good engineers know how to benefit from new technologies and how to adapt to a changing technology market.&lt;/p&gt;

&lt;p&gt;In this post, I will show you how I used AI to design a solution that helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Achieve my goal in a very short time&lt;/li&gt;
&lt;li&gt;Work with limited resources&lt;/li&gt;
&lt;li&gt;Move forward despite limited domain knowledge&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Goal and Background
&lt;/h2&gt;

&lt;p&gt;I already knew about open data from OpenStreetMap.&lt;br&gt;&lt;br&gt;
I also knew about the tool &lt;a href="https://osm2pgsql.org" rel="noopener noreferrer"&gt;https://osm2pgsql.org&lt;/a&gt;, which can import OSM data into PostgreSQL with PostGIS.&lt;/p&gt;

&lt;p&gt;Even before LLMs were popular, I tried to run such imports on a cheap VPS with limitations like importing only one country or one continent.&lt;/p&gt;

&lt;p&gt;I always ended up with out-of-memory errors, even when importing a single large country. The VPS had around 16 GB RAM plus NVMe swap.&lt;/p&gt;

&lt;p&gt;After researching, I discovered that importing the whole world usually requires &lt;strong&gt;64–128 GB RAM&lt;/strong&gt;,which is extremely expensive for a VPS.&lt;/p&gt;

&lt;p&gt;But my goal was never to store everything.&lt;/p&gt;

&lt;p&gt;I only needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hotel/accommodation data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - Nearby POIs
&lt;/h2&gt;

&lt;p&gt;So I could build tools to help me choose vacation destinations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Original Architecture Idea (That Demotivated Me)
&lt;/h2&gt;

&lt;p&gt;My initial idea was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One server with PostGIS + osm2pgsql&lt;/li&gt;
&lt;li&gt;Import one country&lt;/li&gt;
&lt;li&gt;A second server with a final relational database&lt;/li&gt;
&lt;li&gt;A service that extracts only hotels + POIs into the final DB&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, this required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lua scripting&lt;/li&gt;
&lt;li&gt;Advanced SQL&lt;/li&gt;
&lt;li&gt;Deep PostGIS knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is impossible, but the amount of work felt huge compared to my simple goal.&lt;br&gt;
So I abandoned the idea.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enter AI
&lt;/h2&gt;

&lt;p&gt;Everything changed when I started using AI for coding and learning.I revived my idea with AI-assisted development. I started with the cheapest Claude Code subscription, but quickly upgraded once I saw how fast I was progressing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Infrastructure
&lt;/h2&gt;

&lt;p&gt;I rented a VPS with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;24 GB RAM&lt;/li&gt;
&lt;li&gt;8 vCPU cores&lt;/li&gt;
&lt;li&gt;200 GB NVMe disk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cost: &lt;strong&gt;&amp;lt; 20 EUR/month&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In hindsight, even 16 GB would probably be enough.&lt;/p&gt;

&lt;p&gt;I installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;Dokploy&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 2: osm2pgsql + Lua Schema
&lt;/h2&gt;

&lt;p&gt;Claude Code helped me generate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Docker Compose setup for osm2pgsql&lt;/li&gt;
&lt;li&gt;Lua scripts that define only the tables I care about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example table definition:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-- Accommodations (hotels, hostels, guest houses, etc.) local accommodations = osm2pgsql.define_table({     name = 'accommodations',     ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },     columns = {         { column = 'name', type = 'text' },         { column = 'tourism', type = 'text' },         { column = 'stars', type = 'int4' },         { column = 'rooms', type = 'int4' },         { column = 'website', type = 'text' },         { column = 'phone', type = 'text' },         { column = 'email', type = 'text' },         { column = 'wheelchair', type = 'text' },         { column = 'internet_access', type = 'text' },         { column = 'swimming_pool', type = 'text' },         { column = 'sauna', type = 'text' },         { column = 'country', type = 'text' },         { column = 'tags', type = 'jsonb' },         { column = 'geom', type = 'geometry', projection = 4326 }     } })&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This drastically simplified the PostGIS schema.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Use &lt;code&gt;--create&lt;/code&gt; Mode
&lt;/h2&gt;

&lt;p&gt;osm2pgsql is always started with &lt;code&gt;--create&lt;/code&gt; mode.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each run wipes the PostGIS database&lt;/li&gt;
&lt;li&gt;Imports exactly one country&lt;/li&gt;
&lt;li&gt;The container stops after finishing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why?&lt;br&gt;
Because PostGIS here is just a &lt;strong&gt;temporary staging database&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Second Server (Final Relational DB)
&lt;/h2&gt;

&lt;p&gt;On another VPS I run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;A simple schema with tables like &lt;code&gt;hotels&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fields like &lt;code&gt;distance_to_beach&lt;/code&gt;, &lt;code&gt;beach_type&lt;/code&gt;, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This database is optimized for my application queries.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Webhook-Based Automation
&lt;/h2&gt;

&lt;p&gt;Flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;osm2pgsql finishes importing a country&lt;/li&gt;
&lt;li&gt;Docker Compose runs a small &lt;code&gt;curl&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;A webhook is sent to the second server with the country code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On the second server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Bun.js controller receives the webhook&lt;/li&gt;
&lt;li&gt;It triggers a CLI script on worker&lt;/li&gt;
&lt;li&gt;The script queries PostGIS tables&lt;/li&gt;
&lt;li&gt;Inserts normalized hotel data into the final PostgreSQL database&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire script was generated by AI and works great.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Automatic Loop
&lt;/h2&gt;

&lt;p&gt;After the CLI import finishes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I call the Dokploy REST API&lt;/li&gt;
&lt;li&gt;Start the osm2pgsql container again&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude Code built the Compose file in an &lt;strong&gt;idempotent&lt;/strong&gt; way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It tracks already imported countries&lt;/li&gt;
&lt;li&gt;Automatically picks the next one&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result:&lt;/p&gt;

&lt;p&gt;A fully automatic country-by-country pipeline.&lt;/p&gt;

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




&lt;h2&gt;
  
  
  Final Result
&lt;/h2&gt;

&lt;p&gt;I now have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No monster servers&lt;/li&gt;
&lt;li&gt;No 128 GB RAM&lt;/li&gt;
&lt;li&gt;Fully automatic imports&lt;/li&gt;
&lt;li&gt;A clean relational hotel database&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Time to build: &lt;strong&gt;~2 days&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Monthly cost: &lt;strong&gt;~30 EUR&lt;/strong&gt; (2 VPS + Claude Code subscription)&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;AI did not replace engineering it just gives you superpowers and you have to learn how to control it. And don't forget that you still have to: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design the architecture&lt;/li&gt;
&lt;li&gt;Validate assumptions&lt;/li&gt;
&lt;li&gt;Debug issues&lt;/li&gt;
&lt;li&gt;And the most important - have interesting ideas.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
