<?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>Forem: Deividas Strole</title>
    <description>The latest articles on Forem by Deividas Strole (@deividas-strole).</description>
    <link>https://forem.com/deividas-strole</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%2F3067263%2F64047d76-3d5f-4d0e-a6c4-0552b9451d4f.jpg</url>
      <title>Forem: Deividas Strole</title>
      <link>https://forem.com/deividas-strole</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/deividas-strole"/>
    <language>en</language>
    <item>
      <title>Build a Node.js HTTP Server From Scratch (No Frameworks Needed and Less Then 30 Lines!)</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 16 Mar 2026 23:08:42 +0000</pubDate>
      <link>https://forem.com/deividas-strole/build-a-nodejs-http-server-from-scratch-no-frameworks-needed-and-less-then-30-lines-2gc6</link>
      <guid>https://forem.com/deividas-strole/build-a-nodejs-http-server-from-scratch-no-frameworks-needed-and-less-then-30-lines-2gc6</guid>
      <description>&lt;p&gt;Most Node.js tutorials jump straight to Express. But before you reach for a framework, it's worth understanding what's happening underneath — because once you do, everything else clicks.&lt;/p&gt;

&lt;p&gt;In this tutorial, Deividas Strole walks you through building a simple HTTP server using only Node's built-in modules. No Express, no npm install, no dependencies of any kind. Just the runtime doing its thing.&lt;/p&gt;

&lt;p&gt;By the end, you'll have a working local server that serves a static HTML file — and a much clearer mental model of how the web actually works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What You'll Learn&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How the Node.js http module handles requests and responses&lt;/li&gt;
&lt;li&gt;How to read files from disk using the fs module&lt;/li&gt;
&lt;li&gt;How to serve a static HTML page&lt;/li&gt;
&lt;li&gt;How to handle 404 routes cleanly&lt;/li&gt;
&lt;li&gt;How to run everything locally in under a minute&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js installed (nodejs.org)&lt;/li&gt;
&lt;li&gt;Basic JavaScript knowledge&lt;/li&gt;
&lt;li&gt;A text editor (VS Code, Vim, anything works)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No package manager needed. We're going fully built-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create the HTML File
&lt;/h2&gt;

&lt;p&gt;First, create index.html. This is what your server will send to the browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My Node Server&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;monospace&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0d1117&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#e6edf3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#3fb950&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;p&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#8b949e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;✓ Server is running&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Served by Node.js — no frameworks needed.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple, clean, and it'll look great in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create the Server
&lt;/h2&gt;

&lt;p&gt;Now create server.js. This is where the magic happens.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PORT&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;HTML_FILE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;index.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createServer&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Only serve the root route&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/index.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;HTML_FILE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text/plain&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;500 Internal Server Error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text/html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Everything else gets a 404&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text/plain&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404 Not Found&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`✅ Server running at http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. 30 lines. Let's break down what each part does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Run It
&lt;/h2&gt;

&lt;p&gt;In your terminal, navigate to your project folder and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your browser and go to &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;. You'll see your HTML page served by your own server.&lt;br&gt;
Try visiting &lt;a href="http://localhost:3000/anything-else" rel="noopener noreferrer"&gt;http://localhost:3000/anything-else&lt;/a&gt; — you'll get the 404 response.&lt;br&gt;
To stop the server, press Ctrl + C.&lt;/p&gt;

&lt;h2&gt;
  
  
  Full Source Code
&lt;/h2&gt;

&lt;p&gt;The complete project is on GitHub:&lt;br&gt;
👉 github.com/deividas-strole/node-js-server&lt;br&gt;
Drop a ⭐ if you found it useful.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>server</category>
    </item>
    <item>
      <title>Super Simple Web Scraping in Java (Jsoup)</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 16 Feb 2026 00:51:43 +0000</pubDate>
      <link>https://forem.com/deividas-strole/super-simple-web-scraping-in-java-jsoup-5cmn</link>
      <guid>https://forem.com/deividas-strole/super-simple-web-scraping-in-java-jsoup-5cmn</guid>
      <description>&lt;p&gt;Lets create a super-duper simple web scraper with Java! For that we will need Java, Jsoup, 5 minutes and a good mood!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add Jsoup&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependency&amp;gt; 
    &amp;lt;groupId&amp;gt;org.jsoup&amp;lt;/groupId&amp;gt; 
    &amp;lt;artifactId&amp;gt;jsoup&amp;lt;/artifactId&amp;gt; 
    &amp;lt;version&amp;gt;1.17.2&amp;lt;/version&amp;gt; 
&amp;lt;/dependency&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create super-duper minimal scraper&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this our example we will print all links (text and URL) from a page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

public class SimpleScraper {
    public static void main(String[] args) throws Exception {
        String url = "https://example.com"; // change this 

        Document doc = Jsoup.connect(url).get(); 

        for (Element link : doc.select("a[href]")) {            
            System.out .println(link.text() + " -&amp;gt; " + link.absUrl("href")); 
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thats it!!!! You are done! No models, No JSON, and no extra libraries!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extra credit:&lt;/strong&gt; If you want something spacific - change the selector.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Article titles: h1, h2, h3&lt;/li&gt;
&lt;li&gt;Product cards: .product&lt;/li&gt;
&lt;li&gt;Price: .price&lt;/li&gt;
&lt;li&gt;Any element by id: #price&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: print all &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; titles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (Element h : doc.select("h2")) {
  System.out.println(h.text());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;More extra credit:&lt;/strong&gt; In this code, the request originates from a Java client, which many websites will identify as a bot. As a result, they may block your access. To make your scraper appear as though it is coming from a real user, include this line before &lt;code&gt;.get()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Happy Coding!!!&lt;/p&gt;

&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, React, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Personal Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>webscraping</category>
      <category>intranet</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Complete Java Tutorial: From Zero to Building Real Applications</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Sun, 01 Feb 2026 18:53:14 +0000</pubDate>
      <link>https://forem.com/deividas-strole/complete-java-tutorial-from-zero-to-building-real-applications-5o0</link>
      <guid>https://forem.com/deividas-strole/complete-java-tutorial-from-zero-to-building-real-applications-5o0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Java is one of the oldest and most popular programming languages in the world. It is a general-purpose programming language, which means you can do with it everything... well, maybe not everything, but almost everything :)&lt;br&gt;
With Java, you can do Android Mobile Development, Enterprise Applications, Web Applications, Big Data Technologies, Cloud-Based Applications, Financial Services, Scientific Applications, Game Development, Internet of Things (IoT), and other stuff... In this tutorial, you'll learn Java fundamentals and build practical projects along the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you'll learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java basics and syntax&lt;/li&gt;
&lt;li&gt;Object-Oriented Programming concepts&lt;/li&gt;
&lt;li&gt;Working with collections and data structures&lt;/li&gt;
&lt;li&gt;File handling and exception management&lt;/li&gt;
&lt;li&gt;Building a real-world console application&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prerequisites: Basic computer literacy. No prior programming experience required!&lt;/p&gt;
&lt;h2&gt;
  
  
  Part 1: Setting Up Your Java Environment
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Installing Java Development Kit (JDK)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the latest JDK from Oracle or OpenJDK&lt;/li&gt;
&lt;li&gt;Install and verify by opening terminal/command prompt:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java -version
javac -version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Choosing an IDE&lt;/strong&gt;&lt;br&gt;
Go with one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IntelliJ IDEA Community Edition (beginner-friendly and my favorite!)&lt;/li&gt;
&lt;li&gt;Eclipse (lightweight)&lt;/li&gt;
&lt;li&gt;VS Code with Java extensions (if you're already familiar with VS Code)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Part 2: Your First Java Program
&lt;/h2&gt;

&lt;p&gt;Let's start now with the classic "Hello, World!" program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Breaking it down:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;public class HelloWorld&lt;/code&gt; - Defines a class named HelloWorld&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;public static void main(String[] args)&lt;/code&gt; - The entry point of every Java program&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;System.out.println()&lt;/code&gt; - Prints text to the console&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To run:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save as &lt;code&gt;HelloWorld.java&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Compile: &lt;code&gt;javac HelloWorld.java&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run: &lt;code&gt;java HelloWorld&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Part 3: Java Fundamentals
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Variables and Data Types&lt;/strong&gt;&lt;br&gt;
Java is statically typed, meaning you must declare variable types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class DataTypes {
    public static void main(String[] args) {
        // Primitive types
        int age = 25;
        double price = 19.99;
        boolean isActive = true;
        char grade = 'A';

        // String (reference type)
        String name = "Alice";

        // Printing variables
        System.out.println("Name: " + name);
        System.out.println("Age: " + age);
        System.out.println("Price: $" + price);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Common data types:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int&lt;/code&gt; - integers (whole numbers)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;double&lt;/code&gt; - decimal numbers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;boolean&lt;/code&gt; - true/false&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;char&lt;/code&gt; - single character&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;String&lt;/code&gt; - text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operators&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Operators {
    public static void main(String[] args) {
        int a = 10, b = 3;

        // Arithmetic operators
        System.out.println("Addition: " + (a + b));       // 13
        System.out.println("Subtraction: " + (a - b));    // 7
        System.out.println("Multiplication: " + (a * b)); // 30
        System.out.println("Division: " + (a / b));       // 3
        System.out.println("Modulus: " + (a % b));        // 1

        // Comparison operators
        System.out.println("Is equal: " + (a == b));      // false
        System.out.println("Is greater: " + (a &amp;gt; b));     // true

        // Logical operators
        boolean x = true, y = false;
        System.out.println("AND: " + (x &amp;amp;&amp;amp; y));           // false
        System.out.println("OR: " + (x || y));            // true
        System.out.println("NOT: " + (!x));               // false
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 4: Control Flow
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If-Else Statements&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ControlFlow {
    public static void main(String[] args) {
        int score = 85;

        if (score &amp;gt;= 90) {
            System.out.println("Grade: A");
        } else if (score &amp;gt;= 80) {
            System.out.println("Grade: B");
        } else if (score &amp;gt;= 70) {
            System.out.println("Grade: C");
        } else {
            System.out.println("Grade: F");
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Loops&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Loops {
    public static void main(String[] args) {
        // For loop
        System.out.println("For loop:");
        for (int i = 1; i &amp;lt;= 5; i++) {
            System.out.println("Count: " + i);
        }

        // While loop
        System.out.println("\nWhile loop:");
        int j = 1;
        while (j &amp;lt;= 5) {
            System.out.println("Count: " + j);
            j++;
        }

        // Enhanced for loop (for arrays)
        System.out.println("\nEnhanced for loop:");
        String[] fruits = {"Apple", "Banana", "Orange"};
        for (String fruit : fruits) {
            System.out.println(fruit);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Switch Statement&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class SwitchExample {
    public static void main(String[] args) {
        String day = "Monday";

        switch (day) {
            case "Monday":
                System.out.println("Start of the work week!");
                break;
            case "Friday":
                System.out.println("Almost weekend!");
                break;
            case "Saturday":
            case "Sunday":
                System.out.println("Weekend!");
                break;
            default:
                System.out.println("Midweek day");
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 5: Methods and Functions
&lt;/h2&gt;

&lt;p&gt;Methods help organize code into reusable blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Methods {
    // Method with no parameters and no return value
    public static void greet() {
        System.out.println("Hello!");
    }

    // Method with parameters
    public static void greetUser(String name) {
        System.out.println("Hello, " + name + "!");
    }

    // Method with return value
    public static int add(int a, int b) {
        return a + b;
    }

    // Method with multiple parameters and return value
    public static double calculateArea(double length, double width) {
        return length * width;
    }

    public static void main(String[] args) {
        greet();
        greetUser("Alice");

        int sum = add(5, 3);
        System.out.println("Sum: " + sum);

        double area = calculateArea(5.5, 3.2);
        System.out.println("Area: " + area);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 6: Object-Oriented Programming (OOP)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Classes and Objects&lt;/strong&gt;&lt;br&gt;
Java is an object-oriented language. Everything revolves around objects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Define a class
class Car {
    // Properties (fields)
    String brand;
    String model;
    int year;

    // Constructor
    public Car(String brand, String model, int year) {
        this.brand = brand;
        this.model = model;
        this.year = year;
    }

    // Method
    public void displayInfo() {
        System.out.println(year + " " + brand + " " + model);
    }

    public void honk() {
        System.out.println("Beep beep!");
    }
}

public class OOPExample {
    public static void main(String[] args) {
        // Create objects
        Car car1 = new Car("Toyota", "Camry", 2023);
        Car car2 = new Car("Honda", "Civic", 2022);

        // Use objects
        car1.displayInfo();
        car1.honk();

        car2.displayInfo();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Encapsulation (Getters and Setters)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BankAccount {
    // Private fields (encapsulated)
    private String accountNumber;
    private double balance;

    public BankAccount(String accountNumber, double initialBalance) {
        this.accountNumber = accountNumber;
        this.balance = initialBalance;
    }

    // Getter methods
    public String getAccountNumber() {
        return accountNumber;
    }

    public double getBalance() {
        return balance;
    }

    // Setter with validation
    public void deposit(double amount) {
        if (amount &amp;gt; 0) {
            balance += amount;
            System.out.println("Deposited: $" + amount);
        } else {
            System.out.println("Invalid deposit amount");
        }
    }

    public void withdraw(double amount) {
        if (amount &amp;gt; 0 &amp;amp;&amp;amp; amount &amp;lt;= balance) {
            balance -= amount;
            System.out.println("Withdrawn: $" + amount);
        } else {
            System.out.println("Invalid withdrawal amount");
        }
    }
}

public class EncapsulationDemo {
    public static void main(String[] args) {
        BankAccount account = new BankAccount("123456", 1000.0);

        System.out.println("Balance: $" + account.getBalance());
        account.deposit(500);
        account.withdraw(200);
        System.out.println("Final balance: $" + account.getBalance());
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Parent class
class Animal {
    protected String name;

    public Animal(String name) {
        this.name = name;
    }

    public void eat() {
        System.out.println(name + " is eating");
    }

    public void sleep() {
        System.out.println(name + " is sleeping");
    }
}

// Child class
class Dog extends Animal {
    public Dog(String name) {
        super(name);  // Call parent constructor
    }

    public void bark() {
        System.out.println(name + " says: Woof!");
    }
}

class Cat extends Animal {
    public Cat(String name) {
        super(name);
    }

    public void meow() {
        System.out.println(name + " says: Meow!");
    }
}

public class InheritanceDemo {
    public static void main(String[] args) {
        Dog dog = new Dog("Buddy");
        dog.eat();
        dog.bark();

        Cat cat = new Cat("Whiskers");
        cat.sleep();
        cat.meow();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Shape {
    public void draw() {
        System.out.println("Drawing a shape");
    }

    public double getArea() {
        return 0;
    }
}

class Circle extends Shape {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public void draw() {
        System.out.println("Drawing a circle");
    }

    @Override
    public double getArea() {
        return Math.PI * radius * radius;
    }
}

class Rectangle extends Shape {
    private double width;
    private double height;

    public Rectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }

    @Override
    public void draw() {
        System.out.println("Drawing a rectangle");
    }

    @Override
    public double getArea() {
        return width * height;
    }
}

public class PolymorphismDemo {
    public static void main(String[] args) {
        // Polymorphism: treating different objects through same interface
        Shape[] shapes = {
            new Circle(5),
            new Rectangle(4, 6),
            new Circle(3)
        };

        for (Shape shape : shapes) {
            shape.draw();
            System.out.println("Area: " + shape.getArea());
            System.out.println();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 7: Arrays and Collections
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Arrays&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ArraysDemo {
    public static void main(String[] args) {
        // Declare and initialize array
        int[] numbers = {1, 2, 3, 4, 5};

        // Access elements
        System.out.println("First element: " + numbers[0]);

        // Array length
        System.out.println("Length: " + numbers.length);

        // Iterate through array
        for (int i = 0; i &amp;lt; numbers.length; i++) {
            System.out.println("numbers[" + i + "] = " + numbers[i]);
        }

        // 2D array
        int[][] matrix = {
            {1, 2, 3},
            {4, 5, 6},
            {7, 8, 9}
        };

        System.out.println("Element at [1][2]: " + matrix[1][2]); // 6
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ArrayList&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.ArrayList;

public class ArrayListDemo {
    public static void main(String[] args) {
        // Create ArrayList
        ArrayList&amp;lt;String&amp;gt; fruits = new ArrayList&amp;lt;&amp;gt;();

        // Add elements
        fruits.add("Apple");
        fruits.add("Banana");
        fruits.add("Orange");

        // Access elements
        System.out.println("First fruit: " + fruits.get(0));

        // Size
        System.out.println("Size: " + fruits.size());

        // Iterate
        for (String fruit : fruits) {
            System.out.println(fruit);
        }

        // Remove element
        fruits.remove("Banana");

        // Check if contains
        if (fruits.contains("Apple")) {
            System.out.println("We have apples!");
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HashMap&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.HashMap;

public class HashMapDemo {
    public static void main(String[] args) {
        // Create HashMap
        HashMap&amp;lt;String, Integer&amp;gt; scores = new HashMap&amp;lt;&amp;gt;();

        // Add key-value pairs
        scores.put("Alice", 95);
        scores.put("Bob", 87);
        scores.put("Charlie", 92);

        // Get value by key
        System.out.println("Alice's score: " + scores.get("Alice"));

        // Iterate through HashMap
        for (String name : scores.keySet()) {
            System.out.println(name + ": " + scores.get(name));
        }

        // Check if key exists
        if (scores.containsKey("Bob")) {
            System.out.println("Bob is in the system");
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 8: Exception Handling
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class ExceptionHandling {
    public static void main(String[] args) {
        // Try-catch block
        try {
            int result = divide(10, 0);
            System.out.println("Result: " + result);
        } catch (ArithmeticException e) {
            System.out.println("Error: Cannot divide by zero!");
        }

        // Multiple catch blocks
        try {
            String text = null;
            System.out.println(text.length());
        } catch (NullPointerException e) {
            System.out.println("Error: Null reference!");
        } catch (Exception e) {
            System.out.println("Some other error occurred");
        } finally {
            System.out.println("This always executes");
        }
    }

    public static int divide(int a, int b) {
        return a / b;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Custom Exceptions&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Custom exception class
class InsufficientFundsException extends Exception {
    public InsufficientFundsException(String message) {
        super(message);
    }
}

class BankAccountAdvanced {
    private double balance;

    public BankAccountAdvanced(double balance) {
        this.balance = balance;
    }

    public void withdraw(double amount) throws InsufficientFundsException {
        if (amount &amp;gt; balance) {
            throw new InsufficientFundsException(
                "Insufficient funds. Balance: $" + balance + ", Requested: $" + amount
            );
        }
        balance -= amount;
        System.out.println("Withdrawn: $" + amount);
    }

    public double getBalance() {
        return balance;
    }
}

public class CustomExceptionDemo {
    public static void main(String[] args) {
        BankAccountAdvanced account = new BankAccountAdvanced(100);

        try {
            account.withdraw(150);
        } catch (InsufficientFundsException e) {
            System.out.println("Transaction failed: " + e.getMessage());
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 9: File Handling
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.io.*;
import java.util.Scanner;

public class FileHandling {

    // Writing to a file
    public static void writeToFile(String filename, String content) {
        try {
            FileWriter writer = new FileWriter(filename);
            writer.write(content);
            writer.close();
            System.out.println("Successfully wrote to file");
        } catch (IOException e) {
            System.out.println("Error writing to file: " + e.getMessage());
        }
    }

    // Reading from a file
    public static void readFromFile(String filename) {
        try {
            File file = new File(filename);
            Scanner reader = new Scanner(file);

            while (reader.hasNextLine()) {
                String line = reader.nextLine();
                System.out.println(line);
            }
            reader.close();
        } catch (FileNotFoundException e) {
            System.out.println("File not found: " + e.getMessage());
        }
    }

    public static void main(String[] args) {
        String filename = "example.txt";

        // Write to file
        writeToFile(filename, "Hello, Java!\nThis is file handling in action.");

        // Read from file
        System.out.println("Reading from file:");
        readFromFile(filename);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Part 10: Real-World Project - Task Manager Application
&lt;/h2&gt;

&lt;p&gt;Let's build a complete console-based task manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.ArrayList;
import java.util.Scanner;

class Task {
    private String title;
    private String description;
    private boolean completed;

    public Task(String title, String description) {
        this.title = title;
        this.description = description;
        this.completed = false;
    }

    public String getTitle() { return title; }
    public String getDescription() { return description; }
    public boolean isCompleted() { return completed; }

    public void setCompleted(boolean completed) {
        this.completed = completed;
    }

    @Override
    public String toString() {
        String status = completed ? "[✓]" : "[ ]";
        return status + " " + title + " - " + description;
    }
}

class TaskManager {
    private ArrayList&amp;lt;Task&amp;gt; tasks;

    public TaskManager() {
        tasks = new ArrayList&amp;lt;&amp;gt;();
    }

    public void addTask(String title, String description) {
        tasks.add(new Task(title, description));
        System.out.println("Task added successfully!");
    }

    public void listTasks() {
        if (tasks.isEmpty()) {
            System.out.println("No tasks found.");
            return;
        }

        System.out.println("\n===== YOUR TASKS =====");
        for (int i = 0; i &amp;lt; tasks.size(); i++) {
            System.out.println((i + 1) + ". " + tasks.get(i));
        }
        System.out.println("======================\n");
    }

    public void completeTask(int index) {
        if (index &amp;gt;= 0 &amp;amp;&amp;amp; index &amp;lt; tasks.size()) {
            tasks.get(index).setCompleted(true);
            System.out.println("Task marked as complete!");
        } else {
            System.out.println("Invalid task number.");
        }
    }

    public void deleteTask(int index) {
        if (index &amp;gt;= 0 &amp;amp;&amp;amp; index &amp;lt; tasks.size()) {
            tasks.remove(index);
            System.out.println("Task deleted!");
        } else {
            System.out.println("Invalid task number.");
        }
    }
}

public class TaskManagerApp {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        TaskManager manager = new TaskManager();
        boolean running = true;

        System.out.println("===== TASK MANAGER =====");

        while (running) {
            System.out.println("\nOptions:");
            System.out.println("1. Add Task");
            System.out.println("2. List Tasks");
            System.out.println("3. Complete Task");
            System.out.println("4. Delete Task");
            System.out.println("5. Exit");
            System.out.print("Choose an option: ");

            int choice = scanner.nextInt();
            scanner.nextLine(); // Consume newline

            switch (choice) {
                case 1:
                    System.out.print("Enter task title: ");
                    String title = scanner.nextLine();
                    System.out.print("Enter task description: ");
                    String description = scanner.nextLine();
                    manager.addTask(title, description);
                    break;

                case 2:
                    manager.listTasks();
                    break;

                case 3:
                    manager.listTasks();
                    System.out.print("Enter task number to complete: ");
                    int completeIndex = scanner.nextInt() - 1;
                    manager.completeTask(completeIndex);
                    break;

                case 4:
                    manager.listTasks();
                    System.out.print("Enter task number to delete: ");
                    int deleteIndex = scanner.nextInt() - 1;
                    manager.deleteTask(deleteIndex);
                    break;

                case 5:
                    System.out.println("Goodbye!");
                    running = false;
                    break;

                default:
                    System.out.println("Invalid option. Try again.");
            }
        }

        scanner.close();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practices and Tips
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Naming Conventions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Classes: Use PascalCase (e.g., MyClass, BankAccount)&lt;/li&gt;
&lt;li&gt;Methods and variables: Use camelCase (e.g., calculateTotal, userName)&lt;/li&gt;
&lt;li&gt;Constants: Use UPPER_SNAKE_CASE (e.g., MAX_SIZE, DEFAULT_VALUE)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Code Organization&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One public class per file&lt;/li&gt;
&lt;li&gt;File name must match the public class name&lt;/li&gt;
&lt;li&gt;Use packages to organize related classes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Comments and Documentation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * Calculates the factorial of a number
 * @param n the number to calculate factorial for
 * @return the factorial of n
 */
public static long factorial(int n) {
    if (n &amp;lt;= 1) return 1;
    return n * factorial(n - 1);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Always Use Try-With-Resources&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Good practice - automatically closes resources
try (Scanner scanner = new Scanner(new File("data.txt"))) {
    while (scanner.hasNextLine()) {
        System.out.println(scanner.nextLine());
    }
} catch (FileNotFoundException e) {
    e.printStackTrace();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What's Next?&lt;/strong&gt;&lt;br&gt;
Now that you've learned Java fundamentals, here are some paths to explore:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Web Development:&lt;/strong&gt; Learn Spring Boot for building web applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android Development:&lt;/strong&gt; Create mobile apps with Android Studio&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Structures &amp;amp; Algorithms:&lt;/strong&gt; Deepen your problem-solving skills&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design Patterns:&lt;/strong&gt; Learn common solutions to recurring problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing:&lt;/strong&gt; Explore JUnit for unit testing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Recommended Resources&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Official Java Documentation: docs.oracle.com/javase&lt;/li&gt;
&lt;li&gt;Practice coding: LeetCode, HackerRank, Codewars&lt;/li&gt;
&lt;li&gt;Java communities: r/learnjava, Stack Overflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Congratulations! You've learned Java from the basics to building a real application. The key to mastering Java is practice, practice, practice, and practice. Try building your own projects. Start with small ones and go up in size. Also, open an account on GitHub (Free!) and put all your learning and projects there for everybody to see! Don't forget to contribute to open-source, and keep coding every day.&lt;br&gt;
What will you build with Java? Drop a comment below and share your projects!&lt;br&gt;
Happy coding! ☕&lt;/p&gt;

&lt;p&gt;If you found this tutorial helpful, please give it a ❤️ and follow for more programming tutorials!&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>java</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building Your First AI Client in Java (Cerebras AI)</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Sun, 18 Jan 2026 20:48:51 +0000</pubDate>
      <link>https://forem.com/deividas-strole/building-your-first-ai-client-in-java-cerebras-ai-2e34</link>
      <guid>https://forem.com/deividas-strole/building-your-first-ai-client-in-java-cerebras-ai-2e34</guid>
      <description>&lt;p&gt;In this tutorial, you'll learn how to build a very simple AI chat client in Java. Because of the free tier and the speed, we will be using Cerebras AI here. The same principles though apply to other AI providers like OpenAI (ChatGPT), Claude, or Gemini. If you decide to use other AI models — just adjust the API endpoint and model names.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/5rTu2AONOWk"&gt;
  &lt;/iframe&gt;


&lt;br&gt;
&lt;strong&gt;Prefer video?&lt;/strong&gt; You can watch the full tutorial on YouTube above.&lt;/p&gt;
&lt;h2&gt;
  
  
  What You'll Need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Java 11 or higher (we'll use the modern HttpClient API)&lt;/li&gt;
&lt;li&gt;A Cerebras AI API key&lt;/li&gt;
&lt;li&gt;Your favorite IDE or text editor&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Step 1: Get Your Cerebras API Key
&lt;/h2&gt;

&lt;p&gt;First, you'll need to get an API key from Cerebras:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visit &lt;a href="https://cloud.cerebras.ai/" rel="noopener noreferrer"&gt;Cerebras AI&lt;/a&gt; and sign up for an account&lt;/li&gt;
&lt;li&gt;Navigate to the API section or developer dashboard&lt;/li&gt;
&lt;li&gt;Generate a new API key&lt;/li&gt;
&lt;li&gt;Copy the key—you'll need it in the next step&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;... and of course - keep your API key secure and never commit it to version control!&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: Set Up Your API Key as an Environment Variable
&lt;/h2&gt;

&lt;p&gt;Instead of hardcoding your API key in your source code, store it as an environment variable. This keeps your key secure and makes your code more portable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On Windows&lt;/strong&gt;&lt;br&gt;
Open Command Prompt or PowerShell and run:&lt;br&gt;
&lt;code&gt;SETX CEREBRAS_API_KEY "your-api-key-here"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Replace &lt;code&gt;your-api-key-here&lt;/code&gt; with your actual API key. You'll need to restart your IDE or terminal for the changes to take effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On macOS/Linux&lt;/strong&gt;&lt;br&gt;
Add this line to your &lt;code&gt;~/.bashrc&lt;/code&gt;, &lt;code&gt;~/.zshrc&lt;/code&gt;, or &lt;code&gt;~/.bash_profile&lt;/code&gt;:&lt;br&gt;
&lt;code&gt;export CEREBRAS_API_KEY="your-api-key-here"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then reload your configuration:&lt;br&gt;
&lt;code&gt;bashsource ~/.bashrc  # or ~/.zshrc&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Create Your Java Project
&lt;/h2&gt;

&lt;p&gt;Create a new Java file called &lt;code&gt;AIChat.java&lt;/code&gt; and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javaimport java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class AIChat {
    public static void main(String[] args) throws IOException, InterruptedException {
        String apiKey = System.getenv("CEREBRAS_API_KEY");

        String requestBody = """
        {
            "model": "llama3.1-8b",
            "messages": [
                {"role": "user", "content": "How to win a lotto?"}
            ],
            "temperature": 0.2
        }
        """;

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://api.cerebras.ai/v1/chat/completions"))
                .header("Content-Type", "application/json")
                .header("Authorization", "Bearer " + apiKey)
                .POST(HttpRequest.BodyPublishers.ofString(requestBody))
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse&amp;lt;String&amp;gt; response = client.send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Understanding the Code
&lt;/h2&gt;

&lt;p&gt;Let's break down what this code does:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Reading the API Key&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;String apiKey = System.getenv("CEREBRAS_API_KEY");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This retrieves your API key from the environment variable you set earlier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Building the Request Body&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String requestBody = """
{
    "model": "llama3.1-8b",
    "messages": [
        {"role": "user", "content": "How to win a lotto?"}
    ],
    "temperature": 0.2
}
""";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request body is a JSON object containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;model&lt;/code&gt;: The AI model to use (Cerebras offers various Llama models)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;messages&lt;/code&gt;: An array of message objects with roles and content&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;temperature&lt;/code&gt;: Controls randomness (0.0 = deterministic, 1.0 = creative)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Creating the HTTP Request&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.cerebras.ai/v1/chat/completions"))
    .header("Content-Type", "application/json")
    .header("Authorization", "Bearer " + apiKey)
    .POST(HttpRequest.BodyPublishers.ofString(requestBody))
    .build();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This builds an HTTP POST request with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Cerebras API endpoint&lt;/li&gt;
&lt;li&gt;JSON content type header&lt;/li&gt;
&lt;li&gt;Authorization header with your API key&lt;/li&gt;
&lt;li&gt;The request body we created&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Sending the Request&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HttpClient client = HttpClient.newHttpClient();
HttpResponse&amp;lt;String&amp;gt; response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates an HTTP client, sends the request, and prints the JSON response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Run Your Application&lt;/strong&gt;&lt;br&gt;
Compile and run your program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javac AIChat.java
java AIChat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a JSON response containing the AI's answer!&lt;/p&gt;

&lt;h2&gt;
  
  
  Parsing the JSON Response
&lt;/h2&gt;

&lt;p&gt;The raw JSON response isn't very user-friendly. Let's improve our code to extract just the AI's message. You can use a JSON library like Gson or Jackson, or parse it manually for simple cases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Add this method to extract the content
private static String extractContent(String jsonResponse) {
    int contentStart = jsonResponse.indexOf("\"content\":\"") + 11;
    int contentEnd = jsonResponse.indexOf("\"", contentStart);
    return jsonResponse.substring(contentStart, contentEnd)
        .replace("\\n", "\n");
}

// In main, replace the println with:
String aiResponse = extractContent(response.body());
System.out.println("AI Response: " + aiResponse);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adapting to Other AI Providers
&lt;/h2&gt;

&lt;p&gt;Want to use a different AI provider? Here's what you need to change:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenAI (ChatGPT)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint: &lt;a href="https://api.openai.com/v1/chat/completions" rel="noopener noreferrer"&gt;https://api.openai.com/v1/chat/completions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Model: gpt-4 or gpt-3.5-turbo&lt;/li&gt;
&lt;li&gt;API Key env var: OPENAI_API_KEY&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Anthropic (Claude)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint: &lt;a href="https://api.anthropic.com/v1/messages" rel="noopener noreferrer"&gt;https://api.anthropic.com/v1/messages&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Model: claude-sonnet-4-5-20250929&lt;/li&gt;
&lt;li&gt;Headers: Add "x-api-key" instead of "Authorization"&lt;/li&gt;
&lt;li&gt;API Version: Add header "anthropic-version": "2023-06-01"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Google (Gemini)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Endpoint: &lt;a href="https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent?key=YOUR_KEY" rel="noopener noreferrer"&gt;https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent?key=YOUR_KEY&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Different request format (check Google's documentation)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Now that you have a working AI client, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add user input to make it interactive&lt;/li&gt;
&lt;li&gt;Implement conversation history by maintaining a messages array&lt;/li&gt;
&lt;li&gt;Add error handling for network issues and API errors&lt;/li&gt;
&lt;li&gt;Parse JSON responses properly using Gson or Jackson&lt;/li&gt;
&lt;li&gt;Create a command-line chat interface&lt;/li&gt;
&lt;li&gt;Experiment with different models and temperature settings&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Congratulations - you have successfully built your first AI client in Java! Yahoo! This simple example demonstrates the core concepts you'll use regardless of which AI provider you choose. The key takeaways are understanding HTTP requests, JSON formatting, and secure API key management.&lt;/p&gt;

&lt;p&gt;Happy coding, and enjoy exploring the world of AI integration!&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>AI-Powered Commit Message Generator with Sring Boot &amp; Cerebras</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 12 Jan 2026 04:29:32 +0000</pubDate>
      <link>https://forem.com/deividas-strole/ai-powered-commit-message-generator-with-sring-boot-cerebras-3141</link>
      <guid>https://forem.com/deividas-strole/ai-powered-commit-message-generator-with-sring-boot-cerebras-3141</guid>
      <description>&lt;p&gt;I don't know anyone who likes writing proper commit messages. Everyone knows they have to write them, but most are too lazy to think a good message and compose one. I, for example, am so lazy that even for 'work in progress' I just type 'wip'... In this tutorial we will create a REST API which will take your git diff (differences between versions of your code) and automatically generate a professional commit message. Magic!&lt;/p&gt;

&lt;h2&gt;
  
  
  Our battle plan:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A simple Spring Boot REST API&lt;/li&gt;
&lt;li&gt;Integration with Cerebras Cloud API&lt;/li&gt;
&lt;li&gt;One endpoint: send a diff, get a formatted commit message&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Cerebras?
&lt;/h2&gt;

&lt;p&gt;They give free API keys if you ask nicely! Shhh... it's a secret! Also—their API is OpenAI-compatible! ;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Java 17+&lt;/li&gt;
&lt;li&gt;Maven&lt;/li&gt;
&lt;li&gt;A Cerebras API key (get free credits at &lt;a href="https://cloud.cerebras.ai" rel="noopener noreferrer"&gt;https://cloud.cerebras.ai&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Basic Spring Boot knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Project Setup
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Create Spring Boot Project&lt;/strong&gt;&lt;br&gt;
Using Spring Initializr, create a project with these dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring Web&lt;/li&gt;
&lt;li&gt;Spring WebFlux&lt;/li&gt;
&lt;li&gt;Lombok&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or use this &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 plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
         https://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;parent&amp;gt;
        &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;3.2.0&amp;lt;/version&amp;gt;
    &amp;lt;/parent&amp;gt;

    &amp;lt;groupId&amp;gt;com.example&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;commit-message-generator&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;

    &amp;lt;properties&amp;gt;
        &amp;lt;java.version&amp;gt;17&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-webflux&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.projectlombok&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;lombok&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;spring-boot-starter-validation&amp;lt;/artifactId&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;spring-boot-maven-plugin&amp;lt;/artifactId&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Application Configuration&lt;/strong&gt;&lt;br&gt;
Create &lt;code&gt;src/main/resources/application.properties&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Cerebras API Configuration
cerebras.api-key=${CEREBRAS_API_KEY}
cerebras.api-url=https://api.cerebras.ai/v1/chat/completions
cerebras.model=llama3.1-70b

# Server Configuration
server.port=8080

# Logging
logging.level.com.example.commitgen=INFO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Building the Application
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Configuration Class&lt;/strong&gt;&lt;br&gt;
Create &lt;code&gt;src/main/java/com/example/commitgen/config/CerebrasConfig.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import lombok.Data;

@Configuration
@ConfigurationProperties(prefix = "cerebras")
@Data
public class CerebrasConfig {
    private String apiKey;
    private String apiUrl;
    private String model;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. DTOs (Data Transfer Objects)
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/dto/CommitRequest.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.dto;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class CommitRequest {
    @NotBlank(message = "Diff cannot be empty")
    private String diff;

    private String type; // feat, fix, docs, etc. (optional)
    private String scope; // Optional scope
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/dto/CommitResponse.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommitResponse {
    private String message;
    private String type;
    private String scope;
    private String description;
    private String body;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create Cerebras API DTOs in &lt;code&gt;src/main/java/com/example/commitgen/dto/CerebrasRequest.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;

@Data
@AllArgsConstructor
public class CerebrasRequest {
    private String model;
    private List&amp;lt;Message&amp;gt; messages;

    @JsonProperty("max_tokens")
    private Integer maxTokens;

    private Double temperature;

    @Data
    @AllArgsConstructor
    public static class Message {
        private String role;
        private String content;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/dto/CerebrasResponse.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.dto;

import lombok.Data;
import java.util.List;

@Data
public class CerebrasResponse {
    private List&amp;lt;Choice&amp;gt; choices;

    @Data
    public static class Choice {
        private Message message;

        @Data
        public static class Message {
            private String role;
            private String content;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Cerebras API Service
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/service/CerebrasService.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.service;

import com.example.commitgen.config.CerebrasConfig;
import com.example.commitgen.dto.CerebrasRequest;
import com.example.commitgen.dto.CerebrasResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;

import java.util.List;

@Service
@RequiredArgsConstructor
@Slf4j
public class CerebrasService {

    private final CerebrasConfig config;
    private final WebClient.Builder webClientBuilder;

    public Mono&amp;lt;String&amp;gt; generateCompletion(String prompt) {
        WebClient webClient = webClientBuilder
            .baseUrl(config.getApiUrl())
            .defaultHeader("Authorization", "Bearer " + config.getApiKey())
            .defaultHeader("Content-Type", "application/json")
            .build();

        CerebrasRequest request = new CerebrasRequest(
            config.getModel(),
            List.of(
                new CerebrasRequest.Message("system", 
                    "You are a helpful assistant that generates conventional commit messages."),
                new CerebrasRequest.Message("user", prompt)
            ),
            500,
            0.3
        );

        return webClient.post()
            .bodyValue(request)
            .retrieve()
            .bodyToMono(CerebrasResponse.class)
            .map(response -&amp;gt; {
                if (response.getChoices() != null &amp;amp;&amp;amp; !response.getChoices().isEmpty()) {
                    return response.getChoices().get(0).getMessage().getContent();
                }
                throw new RuntimeException("No response from Cerebras API");
            })
            .doOnError(error -&amp;gt; log.error("Error calling Cerebras API", error));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Commit Message Service
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/service/CommitMessageService.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.service;

import com.example.commitgen.dto.CommitRequest;
import com.example.commitgen.dto.CommitResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono;

@Service
@RequiredArgsConstructor
@Slf4j
public class CommitMessageService {

    private final CerebrasService cerebrasService;

    public Mono&amp;lt;CommitResponse&amp;gt; generateCommitMessage(CommitRequest request) {
        String prompt = buildPrompt(request);

        return cerebrasService.generateCompletion(prompt)
            .map(this::parseResponse)
            .onErrorResume(error -&amp;gt; {
                log.error("Error generating commit message", error);
                return Mono.just(createErrorResponse());
            });
    }

    private String buildPrompt(CommitRequest request) {
        StringBuilder prompt = new StringBuilder();

        prompt.append("Based on the following git diff, generate a conventional commit message.\n\n");
        prompt.append("Format:\n");
        prompt.append("&amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;): &amp;lt;description&amp;gt;\n\n");
        prompt.append("&amp;lt;body&amp;gt;\n\n");
        prompt.append("Where:\n");
        prompt.append("- type: feat, fix, docs, style, refactor, test, chore\n");
        prompt.append("- scope: optional, component/file affected\n");
        prompt.append("- description: brief summary (50 chars max)\n");
        prompt.append("- body: detailed explanation (optional)\n\n");

        if (request.getType() != null) {
            prompt.append("Preferred type: ").append(request.getType()).append("\n");
        }
        if (request.getScope() != null) {
            prompt.append("Scope: ").append(request.getScope()).append("\n");
        }

        prompt.append("\nDiff:\n");
        prompt.append(request.getDiff());
        prompt.append("\n\n");
        prompt.append("Return ONLY the commit message in the format specified above. ");
        prompt.append("Do not include any explanations or additional text.");

        return prompt.toString();
    }

    private CommitResponse parseResponse(String response) {
        // Clean up the response
        String cleaned = response.trim();

        // Parse conventional commit format
        String[] lines = cleaned.split("\n", 2);
        String firstLine = lines[0].trim();
        String body = lines.length &amp;gt; 1 ? lines[1].trim() : "";

        // Extract type, scope, and description
        String type = "";
        String scope = "";
        String description = firstLine;

        // Parse: type(scope): description
        if (firstLine.contains(":")) {
            String[] parts = firstLine.split(":", 2);
            String prefix = parts[0].trim();
            description = parts.length &amp;gt; 1 ? parts[1].trim() : "";

            if (prefix.contains("(") &amp;amp;&amp;amp; prefix.contains(")")) {
                int scopeStart = prefix.indexOf("(");
                int scopeEnd = prefix.indexOf(")");
                type = prefix.substring(0, scopeStart).trim();
                scope = prefix.substring(scopeStart + 1, scopeEnd).trim();
            } else {
                type = prefix;
            }
        }

        return new CommitResponse(
            cleaned,
            type,
            scope,
            description,
            body
        );
    }

    private CommitResponse createErrorResponse() {
        return new CommitResponse(
            "chore: update files",
            "chore",
            "",
            "update files",
            "Failed to generate AI-powered commit message. Using default."
        );
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. REST Controller
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/controller/CommitController.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen.controller;

import com.example.commitgen.dto.CommitRequest;
import com.example.commitgen.dto.CommitResponse;
import com.example.commitgen.service.CommitMessageService;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("/api/v1/commit")
@RequiredArgsConstructor
@CrossOrigin(origins = "*")
public class CommitController {

    private final CommitMessageService commitMessageService;

    @PostMapping("/generate")
    public Mono&amp;lt;ResponseEntity&amp;lt;CommitResponse&amp;gt;&amp;gt; generateCommitMessage(
            @Valid @RequestBody CommitRequest request) {
        return commitMessageService.generateCommitMessage(request)
            .map(ResponseEntity::ok);
    }

    @GetMapping("/health")
    public ResponseEntity&amp;lt;String&amp;gt; health() {
        return ResponseEntity.ok("Commit Message Generator is running!");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Main Application
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;src/main/java/com/example/commitgen/CommitMessageGeneratorApplication.java&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.commitgen;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.reactive.function.client.WebClient;

@SpringBootApplication
public class CommitMessageGeneratorApplication {

    public static void main(String[] args) {
        SpringApplication.run(CommitMessageGeneratorApplication.class, args);
    }

    @Bean
    public WebClient.Builder webClientBuilder() {
        return WebClient.builder();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running the Application
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Set Your API Key&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;export CEREBRAS_API_KEY=your-api-key-here&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Start the Application&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;bashmvn spring-boot:run&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;You have built functional AI commit message generator in under 200 lines!!! Et voilà !&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>github</category>
      <category>springboot</category>
    </item>
    <item>
      <title>How to Optimize Your Personal Website for Keywords: A Simple Guide</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 05 Jan 2026 00:09:54 +0000</pubDate>
      <link>https://forem.com/deividas-strole/how-to-optimize-your-personal-website-for-keywords-a-practical-guide-2k6p</link>
      <guid>https://forem.com/deividas-strole/how-to-optimize-your-personal-website-for-keywords-a-practical-guide-2k6p</guid>
      <description>&lt;h1&gt;
  
  
  How to Optimize Your Personal Website for Keywords: A Simple Guide
&lt;/h1&gt;

&lt;p&gt;When you are building a website, you want it to be not only visually nice, but also discoverable by other people. To achieve that you need to adjust the code and text for keywords - words that people will look for. I created this guide using my name as an example. You can freely copy and use the code for your own keywords though.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Keyword Optimization Matters
&lt;/h2&gt;

&lt;p&gt;When someone searches for your name, or professional identity your personal website should appear in the top results. This is especially important for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building your professional brand&lt;/li&gt;
&lt;li&gt;Getting found by clients and recruiters&lt;/li&gt;
&lt;li&gt;Establishing credibility in your field&lt;/li&gt;
&lt;li&gt;Controlling your online narrative&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The techniques in this guide not only work for classical Search Engine Optimization, but also are a must have for Artificial Intelligence Optimization in 2026. We will use SEO and AIO interchangeably in this guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Foundation: Semantic HTML Structure
&lt;/h2&gt;

&lt;p&gt;Search engines and AI love well-structured HTML. Start with proper semantic elements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Deividas Strole - Web Developer&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;&lt;span class="c"&gt;&amp;lt;!-- Navigation --&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;&lt;span class="c"&gt;&amp;lt;!-- Content --&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;&lt;span class="c"&gt;&amp;lt;!-- Footer --&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Critical Meta Tags for SEO/AIO
&lt;/h2&gt;

&lt;p&gt;Your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section is prime real estate for SEO and AIO. Here are the essential meta tags:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Title Tag
&lt;/h3&gt;

&lt;p&gt;The title tag is the most important on-page SEO/AIO element. It appears in search results and browser tabs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Deividas Strole - Web Developer&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best practices:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep it under 60 characters&lt;/li&gt;
&lt;li&gt;Include your primary keyword (your name or your product) at the beginning&lt;/li&gt;
&lt;li&gt;Add a secondary keyword or descriptor&lt;/li&gt;
&lt;li&gt;Make it compelling and click-worthy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Meta Description
&lt;/h3&gt;

&lt;p&gt;While not a direct ranking factor, the meta description influences click-through rates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole is a web developer specializing in Java, JavaScript, and SQL. Explore my portfolio, projects, and get in touch for collaborations."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best practices:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep it between 150-160 characters&lt;/li&gt;
&lt;li&gt;Include your keyword naturally&lt;/li&gt;
&lt;li&gt;Write for humans, not just search engines&lt;/li&gt;
&lt;li&gt;Include a call-to-action&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Open Graph Tags
&lt;/h3&gt;

&lt;p&gt;These tags control how your site appears when shared on social media:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole - Web Developer Portfolio"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Explore the portfolio and projects of Deividas Strole, a web developer specializing in modern web technologies."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://deividasstrole.com/images/deividas-strole-lawander-sc.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:url"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://deividasstrole.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:type"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"website"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Twitter Card Tags
&lt;/h3&gt;

&lt;p&gt;Similar to Open Graph, but for X (Twitter) - this is what is shown if your website is shared on X (Twitter):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:card"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"summary_large_image"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole - Web Developer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Web developer specializing in modern applications and user experiences."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://yourwebsite.com/images/twitter-card.jpg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Strategic Keyword Placement
&lt;/h2&gt;

&lt;p&gt;Now that the foundation is set, let's strategically place your keyword throughout the page:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. H1 Heading
&lt;/h3&gt;

&lt;p&gt;Your H1 should contain your primary keyword and appear only once per page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Subheadings (H2, H3)
&lt;/h3&gt;

&lt;p&gt;Use related keywords and variations in subheadings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;About Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Projects by Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Contact Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. First Paragraph
&lt;/h3&gt;

&lt;p&gt;Include your keyword in the opening paragraph naturally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Hello! I'm &lt;span class="nt"&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;Deividas Strole&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt;, a web developer passionate about creating elegant solutions to complex problems. With expertise in modern web technologies, I help businesses build exceptional digital experiences.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Image Alt Text
&lt;/h3&gt;

&lt;p&gt;Search engines can't "see" images, but they read alt text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"profile.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole - Web Developer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"project1.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"E-commerce website designed by Deividas Strole"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Internal Links
&lt;/h3&gt;

&lt;p&gt;Create descriptive anchor text with your keyword:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Learn more about Deividas Strole&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#portfolio"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;View Deividas Strole's portfolio&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Structured Data (Schema.org)
&lt;/h2&gt;

&lt;p&gt;Help search engines understand your content better with JSON-LD structured data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"application/ld+json"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@context&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://schema.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Person&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Deividas Strole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;url&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://deividasstrole.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;jobTitle&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Web Developer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Web developer specializing in modern web applications&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sameAs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://linkedin.com/in/deividas-strole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://github.com/deividas-strole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://youtube.com/@deividas-strole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://x.com/deividasstrole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a "Knowledge Graph" that can appear in search results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical SEO Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. URL Structure
&lt;/h3&gt;

&lt;p&gt;Keep your URLs clean and keyword-rich:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✅ yourwebsite.com/deividas-strole
✅ deividasstrole.com
❌ yourwebsite.com/page?id=12345
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Canonical Tag
&lt;/h3&gt;

&lt;p&gt;Prevent duplicate content issues:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"canonical"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://yourwebsite.com/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Favicon
&lt;/h3&gt;

&lt;p&gt;While not directly impacting SEO, a favicon improves brand recognition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"image/png"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/favicon.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Mobile Optimization
&lt;/h3&gt;

&lt;p&gt;Google uses mobile-first indexing, so ensure your viewport meta tag is set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Content Strategy for Personal Brands
&lt;/h2&gt;

&lt;p&gt;Beyond technical optimization, create content that naturally incorporates your keyword:&lt;/p&gt;

&lt;h3&gt;
  
  
  About Section
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;About Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Deividas Strole is a web developer with 5+ years of experience building scalable applications. Specializing in Java, JavaScript, Spring Boot, React, SQL, and AI, Deividas helps startups and enterprises transform their digital presence.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Portfolio/Projects
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"portfolio"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Projects by Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;E-commerce Platform&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Deividas Strole designed and developed a full-stack e-commerce solution processing 10,000+ daily transactions.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Avoiding Keyword Stuffing
&lt;/h2&gt;

&lt;p&gt;While you want to include your keyword, don't overdo it. Aim for a keyword density of 1-2%. For a 500-word page, that's 5-10 mentions. Focus on natural language and user experience first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad example (keyword stuffing):&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Deividas Strole is the best developer. Deividas Strole builds websites. If you need Deividas Strole, contact Deividas Strole today."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Good example:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"As a web developer, I help clients to solve all their web related problems. My approach is hard work, no sleep, and hundred cups of coffee. All this combined deliver unseen and unheard incredible results... :D"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Performance Optimization
&lt;/h2&gt;

&lt;p&gt;Page speed is a ranking factor. Optimize your &lt;code&gt;index.html&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Minimize HTML:&lt;/strong&gt; Remove unnecessary whitespace and comments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize images:&lt;/strong&gt; Use WebP format and appropriate dimensions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy load:&lt;/strong&gt; Load images below the fold lazily&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inline critical CSS:&lt;/strong&gt; Include above-the-fold styles in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defer JavaScript:&lt;/strong&gt; Use &lt;code&gt;defer&lt;/code&gt; or &lt;code&gt;async&lt;/code&gt; attributes
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"script.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Complete Example
&lt;/h2&gt;

&lt;p&gt;Here's a simplified but optimized &lt;code&gt;index.html&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Deividas Strole - Web Developer &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Designer&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole is a web developer specializing in modern web applications. Explore projects, skills, and get in touch for collaborations."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"canonical"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://deividasstrole.com/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Open Graph --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole - Web Developer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Portfolio and projects of web developer Deividas Strole."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://deividasstrole.com/images/deividas-strole-lawander-sc.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:url"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https://deividasstrole.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Structured Data --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"application/ld+json"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@context&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://schema.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Person&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Deividas Strole&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;url&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://deividasstrole.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;jobTitle&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Web Developer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#portfolio"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Portfolio&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"hero"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Web Developer &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; Designer&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Hello! I'm &lt;span class="nt"&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;Deividas Strole&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt;, a passionate developer creating modern web experiences.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;About Deividas Strole&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"profile.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Deividas Strole profile photo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;With expertise in modern web technologies, I help businesses build exceptional digital products that users love.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"portfolio"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Featured Projects&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Project Name&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"project.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Web application by Deividas Strole"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;A responsive web application built with React and Node.js.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Get in Touch&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Interested in working together? &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"mailto:hello@example.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact Deividas Strole&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;copy;&lt;/span&gt; 2024 Deividas Strole. All rights reserved.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Monitoring and Iteration
&lt;/h2&gt;

&lt;p&gt;After implementing these optimizations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Submit to Google Search Console:&lt;/strong&gt; Monitor how your site appears in search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Google Analytics:&lt;/strong&gt; Track organic traffic and user behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test with PageSpeed Insights:&lt;/strong&gt; Ensure fast loading times&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor rankings:&lt;/strong&gt; Use tools like Ahrefs or SEMrush to track keyword positions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update regularly:&lt;/strong&gt; Fresh content signals to search engines and AI that your site is active and not forgotten.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Optimizing your personal website for keywords is interesting but tedious job. You need to start with the code and finish with the content of your website itself. This guide is a good start and will give you nice fundament on which you can build your brand and strong online presence.&lt;/p&gt;

&lt;p&gt;Remember, SEO and AIO is a marathon, not sprint. To see results, you need weeks if not months. But it is doable and rewarding.&lt;/p&gt;

&lt;p&gt;Now go and optimize your index.html - Internet is waiting for you!&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>html</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>💡 How to Install Gemini CLI on Your Computer</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 29 Dec 2025 01:43:24 +0000</pubDate>
      <link>https://forem.com/deividas-strole/how-to-install-gemini-cli-on-your-computer-30hg</link>
      <guid>https://forem.com/deividas-strole/how-to-install-gemini-cli-on-your-computer-30hg</guid>
      <description>&lt;p&gt;Gemini CLI is a great open source command line tool that lets you use Google's Gemini on your computer right in the terminal. You can install and use it on Windows, Mac, or Linux. It can help you with code development, file and project management, and AI-powered assistance. Why I like and use it is also not only because it is a very powerful tool, but also because of its cost - or in reality - no cost! For individuals, it has a 1000 requests per day limit, which is way too much for the average user (60 requests per minute). So, try it, see if you like it, and comment under the article. Now, let's install it:&lt;/p&gt;

&lt;p&gt;🛠 Prerequisites&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js (v20 or higher) — this provides the runtime environment Gemini CLI needs.&lt;/li&gt;
&lt;li&gt;A working terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🚀 Step 1 — Install Gemini CLI&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install -g @google/gemini-cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;▶️ Step 2 — Launch Gemini CLI&lt;/p&gt;

&lt;p&gt;In your command-line shell type:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gemini&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;🔑 Step 3 — Authenticate&lt;/p&gt;

&lt;p&gt;You will need to log in with your Google account - that is how Google will track how many requests you make. But don't worry, they are giving more than needed for an average user.&lt;/p&gt;

&lt;p&gt;🧪 Step 4 — Try a Command!&lt;/p&gt;

&lt;p&gt;Enter a prompt and wait for an answer. My question about why the sky is blue—it took 9 seconds to answer :)&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gemini</category>
      <category>cli</category>
      <category>node</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Buying Web Traffic (Part 2): Targeting Mistakes and How to Spot Fake Traffic</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Sun, 21 Dec 2025 21:24:23 +0000</pubDate>
      <link>https://forem.com/deividas-strole/buying-web-traffic-part-2-targeting-mistakes-and-how-to-spot-fake-traffic-43ic</link>
      <guid>https://forem.com/deividas-strole/buying-web-traffic-part-2-targeting-mistakes-and-how-to-spot-fake-traffic-43ic</guid>
      <description>&lt;p&gt;In Part 1, I covered why people buy web traffic and when it can make sense as a growth tool. In this follow-up, I want to focus on what actually determines whether paid traffic helps—or quietly drains your budget: proper targeting and the ability to recognize fake traffic before it causes damage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Category Selection Is Not Optional
&lt;/h2&gt;

&lt;p&gt;One of the easiest ways to waste money on traffic is choosing the wrong audience category.&lt;/p&gt;

&lt;p&gt;Traffic providers often let you select interests or verticals. If those don’t align with your site, conversions won’t happen—no matter how “high quality” the traffic claims to be.&lt;/p&gt;

&lt;p&gt;For example, sending automotive-focused users to a gardening website won’t produce engagement. Even real people won’t take action if the content doesn’t match their intent. Relevance always comes first.&lt;/p&gt;

&lt;p&gt;Before buying traffic, be clear about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What problem your site solves&lt;/li&gt;
&lt;li&gt;Who is actively looking for that solution&lt;/li&gt;
&lt;li&gt;Which categories naturally overlap with your content&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Geography Matters More Than People Expect
&lt;/h2&gt;

&lt;p&gt;Geographic targeting mistakes are another common failure point.&lt;/p&gt;

&lt;p&gt;If your product is only available in specific countries, traffic from outside those regions has zero business value. Selling UK-only products to visitors from Southeast Asia won’t lead to conversions, even if the traffic is real.&lt;/p&gt;

&lt;p&gt;When setting location targeting, think through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where you can actually ship or operate&lt;/li&gt;
&lt;li&gt;Which languages your site supports&lt;/li&gt;
&lt;li&gt;Regional legal or compliance restrictions&lt;/li&gt;
&lt;li&gt;Payment methods available in each country&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Getting this right takes a few minutes, but getting it wrong can invalidate an entire campaign.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Risk: Fake Traffic
&lt;/h2&gt;

&lt;p&gt;The biggest danger when buying traffic isn’t poor targeting—it’s fake traffic.&lt;/p&gt;

&lt;p&gt;Fake traffic (often called “ghost” traffic) is generated by automated systems, not real people. These systems simulate visits well enough that many analytics tools treat them like normal users.&lt;/p&gt;

&lt;p&gt;That’s why fake traffic is hard to detect at first glance. Bots don’t announce themselves; they just quietly inflate numbers while producing no real engagement.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Tell If Traffic Is Real
&lt;/h2&gt;

&lt;p&gt;You won’t identify fake traffic by looking at surface-level metrics. Instead, focus on behavior patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Average Session Duration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Session duration shows how long visitors stay on your page.&lt;/p&gt;

&lt;p&gt;Organic traffic from search engines typically averages around 40–60 seconds for informational pages. Fake traffic, on the other hand, often results in session durations close to zero because bots don’t interact with content.&lt;/p&gt;

&lt;p&gt;If you see sudden spikes in traffic paired with near-instant exits, that’s a strong warning sign.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bounce Rate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Bounce rate measures how many users leave after viewing just one page.&lt;/p&gt;

&lt;p&gt;While bounce rate varies by site type (blogs and news sites naturally have higher rates), fake traffic often pushes bounce rate close to 100%. That indicates visitors are arriving and leaving without any interaction at all.&lt;/p&gt;

&lt;p&gt;A consistently extreme bounce rate combined with low session duration is rarely normal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pageviews per Session&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Real users behave differently: some read one page and leave, others click deeper into the site.&lt;/p&gt;

&lt;p&gt;With fake traffic, pageviews per session are usually flat—often stuck at exactly one. Bots don’t browse; they hit a URL and disappear.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Percent of New Sessions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy traffic, it’s expected that most visitors are new at first. Seeing close to 100% new sessions initially is normal.&lt;/p&gt;

&lt;p&gt;What matters is what happens afterward. Over time, real users return. If weeks go by and every visitor is still “new,” that suggests the traffic isn’t human.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics That Don’t Help Much
&lt;/h2&gt;

&lt;p&gt;Some commonly referenced metrics aren’t useful for detecting fake traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sessions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A session simply records a visit—human or bot. Automated traffic can generate sessions that look perfectly valid in analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Users&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similarly, the “users” metric counts anything that has at least one session. It doesn’t reliably distinguish real people from automated signals.&lt;/p&gt;

&lt;p&gt;These metrics are fine for volume tracking, but they won’t help you assess traffic quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Avoid Fake Traffic Providers
&lt;/h2&gt;

&lt;p&gt;You can often spot low-quality or scam providers before spending any money.&lt;/p&gt;

&lt;p&gt;Things to check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website quality: Poor design, broken English, or vague explanations are red flags.&lt;/li&gt;
&lt;li&gt;Business details: Legitimate providers list real addresses and company information.&lt;/li&gt;
&lt;li&gt;Google Maps presence: A verified listing with reviews adds credibility.&lt;/li&gt;
&lt;li&gt;External reviews: Look beyond testimonials hosted on the provider’s own site.&lt;/li&gt;
&lt;li&gt;Small test orders: Always test with minimal spend before scaling.&lt;/li&gt;
&lt;li&gt;Refund policy: Clear replacement or refund terms indicate confidence in traffic quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a provider avoids transparency or guarantees “instant conversions,” that’s usually a bad sign.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Buying web traffic isn’t inherently good or bad—it’s a tool. Used carefully, it can help validate content, test funnels, or accelerate visibility. Used carelessly, it can inflate metrics while delivering no real value.&lt;/p&gt;

&lt;p&gt;The basics matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target the right audience category&lt;/li&gt;
&lt;li&gt;Match traffic to your geographic reality&lt;/li&gt;
&lt;li&gt;Monitor behavioral metrics, not just volume&lt;/li&gt;
&lt;li&gt;Test small before committing&lt;/li&gt;
&lt;li&gt;Avoid providers that hide details or overpromise&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, React, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personal Website: &lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;https://DeividasStrole.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;LinkedIn: &lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;https://linkedin.com/in/deividas-strole&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;https://github.com/deividas-strole&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;YouTube: &lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;https://youtube.com/@deividas-strole&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webtraffic</category>
      <category>onlinemarketing</category>
      <category>online</category>
      <category>onlinescams</category>
    </item>
    <item>
      <title>How to Buy Web Traffic: A Technical Guide for Developers and Online Businesses</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 15 Dec 2025 00:25:19 +0000</pubDate>
      <link>https://forem.com/deividas-strole/how-to-buy-web-traffic-a-technical-guide-for-developers-and-online-businesses-4dp4</link>
      <guid>https://forem.com/deividas-strole/how-to-buy-web-traffic-a-technical-guide-for-developers-and-online-businesses-4dp4</guid>
      <description>&lt;p&gt;There are plenty of tutorials on building web applications, but there's surprisingly little reliable information on how to actually get users to visit them. In this article, I'll explain how to acquire visitors and convert them into users through the process of buying internet traffic. I'll cover the technical aspects, analytics, and implementation details. After reading this, you'll know enough to make an informed decision about whether traffic buying makes sense for your project.&lt;/p&gt;

&lt;p&gt;If you're thinking about buying web traffic, you're making a practical choice. Targeted web traffic is affordable, you have full control of the entire process, it has a clear payment model, robust monitoring tools, and measurable financial and SEO benefits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Traffic Buying Works Technically&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy web traffic from a reputable provider, you control exactly how many visitors you get when you place an order. Unlike other digital advertising models, you pay only for a certain number of visitors that will be directed to your website. There's no guessing here. If you're running an e-commerce site and need to stress-test your infrastructure or increase conversions this month, you can order 10,000 potential customers to be delivered to your application. 10,000 visitors will be delivered and your metrics will increase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payment and Delivery Process&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Reputable web traffic providers use straightforward payment models. You pay for traffic first, then your payment and website are approved, and finally you get the agreed amount of visitors delivered to your site. The entire process can take a couple of hours, but sometimes up to 24 hours. The more visitors you order, the more potential users you'll get. It's up to you how much traffic to order. For a modest increase in user numbers, you can order 5,000 to 10,000, but for a bigger spike you can get up to 250,000 visitors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Campaign Duration Control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy web traffic, you decide how long your traffic campaigns should last. In other words, you decide over how many days you should receive all the visitors. To boost your numbers quickly, some site owners order their entire inventory to be delivered in a few days. If you're looking for slower, more sustainable growth, you can order inventory to be delivered over 30 or 60 days. High concentrations of traffic are not recommended for sites hosted on weaker servers or shared hosting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Geographical Targeting via IP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Web traffic gives you the ability to decide which geographical location your traffic should come from. For example, some applications serve only certain regions, so they're not interested in global traffic (and vice versa). Reputable web traffic providers cover almost all major geographical areas. Visitor providers determine the location of a visitor from their IP address—similar to how you might implement geolocation in your own application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost Comparison with PPC&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Targeted web traffic prices are very stable and low. They're much lower than the popular Pay-Per-Click model. The reason is that traffic recipients (customers) don't have to compete with each other like in some other digital advertising models. Also, there are no keyword auctions, which makes the business environment more predictable. You can still find reputable web traffic providers (VisitorMaker.com, for example) who can send you 5,000 quality visitors for less than $10.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Category Targeting Implementation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy web traffic, you choose a category that best describes your website. How does a website traffic provider know which visitor is interested in which category? The provider places advertisements on various websites and domains. If a visitor likes an advertisement displaying women's shoes, for example, and clicks on it, they'll be redirected to a website that selected women's shoes as its category. It's essentially a retargeting mechanism. When you buy traffic, you can select only one category per order. Those who want to receive traffic for multiple categories will need to place separate traffic orders for each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analytics and Monitoring Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy web traffic, you get monitoring tools to track your incoming visitors. Although Google Analytics is a great tool for analyzing website data, it's not optimal for tracking incoming targeted traffic. Most web traffic providers use third-party cookies which aren't readable by Google Analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alternative tracking solutions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Goo.gl (Google's URL shortener): Excellent for tracking and verifying incoming web traffic&lt;/li&gt;
&lt;li&gt;StatCounter.com: Third-party web statistics tracker&lt;/li&gt;
&lt;li&gt;HitStats.com: Another viable third-party tracking option&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tools can give you more accurate data about your purchased traffic than GA alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SEO Impact (Yes, It Actually Helps)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Contrary to what some developers think, buying web traffic doesn't harm a website's SEO. Moreover, it helps SEO! The more visitors a website gets, the more SEO points are given by Google to improve the website's authority. Google tracks a website's popularity using data from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Analytics&lt;/li&gt;
&lt;li&gt;Google Search Console (Webmaster Tools)&lt;/li&gt;
&lt;li&gt;Chrome Browser telemetry&lt;/li&gt;
&lt;li&gt;Google Toolbar&lt;/li&gt;
&lt;li&gt;Google Search itself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this very competitive internet landscape, for an online business to succeed, you need all the SEO benefits you can get.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Development and Operations Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The process of buying web traffic drastically decreases workload. Just imagine how much time you can save by eliminating manual marketing work? Instead of spending time on SEO optimization, content marketing, and social media management, you can focus on what you do best: building and improving your application.&lt;/p&gt;

&lt;p&gt;Many successful businesses operate by using web traffic buying as their primary marketing strategy, allowing their development teams to focus on product rather than promotion. Don't forget that the visitors you're getting from a provider aren't only your potential users, but also your potential advocates who might share your site with others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability and Testing Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you buy web traffic from a reputable provider, you'll be serviced by a professional who knows their niche. The advantage of specialization is clear: better results with less effort on your part. Instead of maintaining the business, updating the website, and doing marketing, a website owner should outsource less familiar areas to other professionals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost perspective:&lt;/strong&gt; You can get 5,000 quality targeted visitors for less than $10. Compare that to the hourly rate of a developer or marketer working on organic growth strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No Long-Term Commitments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The majority of web visitor providers don't use contracts with their clients. You pay as you go and you won't have to sign any contracts. This is particularly useful for developers and startups because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Business goals and advertising strategies change&lt;/li&gt;
&lt;li&gt;You can pivot quickly without contractual obligations&lt;/li&gt;
&lt;li&gt;You can easily test different business categories&lt;/li&gt;
&lt;li&gt;You can adjust geographical targeting on the fly&lt;/li&gt;
&lt;li&gt;No contract helps you A/B test the service with minimal risk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can buy only a small amount of visitors and see if it works for your project before scaling up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conversion Rate Metrics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although conversion rate is never guaranteed, when you buy web traffic from reputable providers, you can expect reasonable numbers. Conversion rate is the percentage of users who become paying customers (or take any desired action). The average conversion rate for a landing page is about 2.35%, while the highest is up to 11.5%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conversion rate has three main factors:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Landing page design - UX/UI quality, load time, mobile responsiveness&lt;/li&gt;
&lt;li&gt;Attractiveness of the product or service - Value proposition, pricing, features&lt;/li&gt;
&lt;li&gt;Web traffic quality - How well-targeted the visitors are&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To achieve a good conversion rate, all three factors must be present. If any of these factors is missing, achieving good conversion rates will be difficult. So every developer must make sure that their application is ready to accept web traffic: clean design, natural navigation, optimized performance, and competitive pricing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Effects and Viral Potential&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By buying web traffic, you not only acquire potential users, but you also get potential advocates. Every visitor who comes to your site can become a free spokesperson if they really like your product or service. In today's viral society, it's really easy to share useful content with countless social media connections. Make your application that useful resource and the number of your visitors will skyrocket organically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load Testing Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An often overlooked benefit: purchased traffic can serve as a real-world load test for your infrastructure. Unlike synthetic load testing tools, you're getting actual HTTP requests from real browsers and devices distributed geographically. This can help you identify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server bottlenecks under realistic traffic patterns&lt;/li&gt;
&lt;li&gt;CDN configuration issues&lt;/li&gt;
&lt;li&gt;Database query optimization opportunities&lt;/li&gt;
&lt;li&gt;Frontend performance problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just make sure your hosting can handle the traffic volume you're ordering, especially if you're on shared hosting or lower-tier VPS plans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Part 2, we'll dive into the technical details of identifying and avoiding fake traffic providers, analyzing traffic quality through metrics, and how to verify you're getting real human visitors rather than bot traffic.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>seo</category>
      <category>webtrafffic</category>
      <category>webmarketing</category>
      <category>advertising</category>
    </item>
    <item>
      <title>Building Your First REST API with Spring Boot</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Mon, 08 Dec 2025 04:14:42 +0000</pubDate>
      <link>https://forem.com/deividas-strole/building-your-first-rest-api-with-spring-boot-1be3</link>
      <guid>https://forem.com/deividas-strole/building-your-first-rest-api-with-spring-boot-1be3</guid>
      <description>&lt;p&gt;&lt;strong&gt;By Deividas Strole — Full-Stack Developer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're a developer, you definitely know Spring Boot. Just last year we celebrated the 10-year anniversary of this super Java framework. And like the Java programming language itself, Spring Boot doesn't show its age and keeps going strong. It's still the most popular framework for building production REST APIs in Java.&lt;/p&gt;

&lt;p&gt;In this tutorial, I'll walk you through building a simple REST API with Spring Boot for managing books—and you'll learn along the way. Great for beginners and those who already forgot! :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What We'll Build&lt;/strong&gt;&lt;br&gt;
A Book API where you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a book&lt;/li&gt;
&lt;li&gt;Get all books&lt;/li&gt;
&lt;li&gt;Get a book by ID&lt;/li&gt;
&lt;li&gt;Delete a book&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create Project&lt;/strong&gt;&lt;br&gt;
Go to &lt;a href="https://dev.tourl"&gt;start.spring.io&lt;/a&gt; and select:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project:&lt;/strong&gt; Maven&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language:&lt;/strong&gt; Java&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spring Boot:&lt;/strong&gt; 3.2.0 or latest&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependencies:&lt;/strong&gt; Spring Web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click "Generate" and unzip the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Create Book Class&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;File:&lt;/strong&gt; src/main/java/com/example/demo/Book.java&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javapackage com.example.demo;

public class Book {
    private Long id;
    private String title;
    private String author;

    // Constructor
    public Book(Long id, String title, String author) {
        this.id = id;
        this.title = title;
        this.author = author;
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Create Controller&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;File:&lt;/strong&gt; src/main/java/com/example/demo/BookController.java&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;javapackage com.example.demo;

import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/api/books")
public class BookController {

    private List&amp;lt;Book&amp;gt; books = new ArrayList&amp;lt;&amp;gt;();
    private Long nextId = 1L;

    // Get all books
    @GetMapping
    public List&amp;lt;Book&amp;gt; getAllBooks() {
        return books;
    }

    // Get book by ID
    @GetMapping("/{id}")
    public Book getBookById(@PathVariable Long id) {
        return books.stream()
                .filter(book -&amp;gt; book.getId().equals(id))
                .findFirst()
                .orElse(null);
    }

    // Add a new book
    @PostMapping
    public Book addBook(@RequestBody Book book) {
        book.setId(nextId++);
        books.add(book);
        return book;
    }

    // Delete a book
    @DeleteMapping("/{id}")
    public String deleteBook(@PathVariable Long id) {
        books.removeIf(book -&amp;gt; book.getId().equals(id));
        return "Book deleted";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Run the Application&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;File:&lt;/strong&gt; src/main/java/com/example/demo/DemoApplication.java (already exists)&lt;/p&gt;

&lt;p&gt;Just run this file. Your API will start on &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Test Your API&lt;/strong&gt;&lt;br&gt;
Open a new terminal and try these commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a book:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
curl -X POST http://localhost:8080/api/books \
  -H "Content-Type: application/json" \
  -d '{"title":"Harry Potter","author":"J.K. Rowling"}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Get all books:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
curl http://localhost:8080/api/books
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Get book by ID:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
curl http://localhost:8080/api/books/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Delete a book:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
curl -X DELETE http://localhost:8080/api/books/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;@RestController - tells Spring this class handles web requests&lt;/li&gt;
&lt;li&gt;@RequestMapping("/api/books") - all endpoints start with /api/books&lt;/li&gt;
&lt;li&gt;@GetMapping - handles GET requests (retrieve data)&lt;/li&gt;
&lt;li&gt;@PostMapping - handles POST requests (create data)&lt;/li&gt;
&lt;li&gt;@DeleteMapping - handles DELETE requests (remove data)&lt;/li&gt;
&lt;li&gt;@RequestBody - converts JSON to Java object&lt;/li&gt;
&lt;li&gt;@PathVariable - gets the ID from URL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And, you are finished!!! You have a working REST API with just 2 files (well, maybe 3 including the main application file :) ).&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>api</category>
      <category>springboot</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Three reasons why computer science is no longer sexy - for now</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Tue, 09 Sep 2025 22:13:35 +0000</pubDate>
      <link>https://forem.com/deividas-strole/three-reasons-why-computer-science-is-no-longer-sexy-for-now-1dal</link>
      <guid>https://forem.com/deividas-strole/three-reasons-why-computer-science-is-no-longer-sexy-for-now-1dal</guid>
      <description>&lt;p&gt;For many decades a computer science degree meant job security, high salary and different employer perks. Sometimes students even before graduation were fished out by companies for junior roles. The IT job market was so thin that the US started "importing" a lot of specialists from Asia and Eastern Europe. Just after the Covid pandemic ended, something weird and unexpected happened. Many big companies, such as Microsoft, Oracle, Google and Meta started massive layoffs. At the same time various AI models were released and started being used by companies. The last nail in the IT job market coffin was the amount of new graduates that US schools graduated into a very crippled IT job market.&lt;/p&gt;

&lt;p&gt;Why the massive layoffs in the first place? During covid, the US economy suddenly changed to a work from home model. The usage of various software that made living and working at home without leaving for days increased drastically and many companies started unprecedented hiring campaigns. The boom suddenly ended when people realized that the Covid pandemic is over and that going outside and doing things the "old-fashioned way" makes more sense. The companies realized that they do not need those thousands of "extra workers" they hired, and with the prediction of slower economic growth they started reducing their workforce. Over 100,000 IT workers lost jobs in 2025.&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%2Fkloq08t3lrg6w770kdue.png" 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%2Fkloq08t3lrg6w770kdue.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
At the same time the A.I. miracle happened. A.I. made it possible to create software faster, more or less semi-eliminating the need for junior programmers. If a piece of boilerplate code is already on the Internet, the A.I. can copy it and spit it out for a programmer in a few seconds. That, in theory, gives the impression that productivity increases and eliminates the need for junior roles. Almost all software companies started using AI code editors such as Cursor or GitHub Copilot. Although the "on paper" productivity increased, new issues with code security, limited testing, and unpredictable app behavior arose. In the beginning, that did not alarm many companies and they continued the AI over programmer preference business model.&lt;/p&gt;

&lt;p&gt;The third reason for IT job challenges that we have these days is the amount of new computer science graduates. In less than a decade the graduating students with computer science degrees more than doubled. With the laid off experienced programmers taking sometimes even junior level jobs and AI improved code creation, many of the newly graduated professionals are left without a job.&lt;/p&gt;

&lt;p&gt;It seems that computer science and tech employment dips are kind of cyclical. The dot-com bust of the 2000's and Great Recession 2008-2009 kind of predicted this 2020-2025 IT job volatility. Although AI changed how we write code, it did not replace engineers but more expanded their capabilities. Hopefully, we will emerge from all of this stronger and more productive.&lt;/p&gt;

&lt;p&gt;Deividas Strole - navigating the world of AI&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>computerscience</category>
      <category>itjobs</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Truth Behind Cheap Website Traffic</title>
      <dc:creator>Deividas Strole</dc:creator>
      <pubDate>Tue, 29 Apr 2025 19:57:38 +0000</pubDate>
      <link>https://forem.com/deividas-strole/the-truth-behind-cheap-traffic-470k</link>
      <guid>https://forem.com/deividas-strole/the-truth-behind-cheap-traffic-470k</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are many myths about cheap traffic buying. Some people swear by it and others avoid it. This article is the in-depth explanation what the cheap traffic is and its comparison with other digital marketing models such as Cost-Per-Click (CPC), Cost-Per-Mill (CPM), and Cost-Per-Acquisition (CPA). &lt;/p&gt;

&lt;p&gt;To prosper online a website has to have a traffic flow... and lots of it. Website traffic can be obtained for free or can be bought. &lt;br&gt;
Free traffic can be acquired by using search engine optimization (SEO) - a process of increasing visibility of a website in search engine result pages. Paid traffic can be obtained by using various internet marketing techniques that cost money. Cheap traffic is one of paid traffic models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cheap Traffic Bought in Bulk&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cheap traffic buying, also known as targeted traffic or bulk traffic buying,  is an online marketing model where a website owner buys visitors in bulk. Traffic providers collect bulk traffic and redirect it to client’s website. They place ads on various websites and when visitors click on those advertisements they are re-directed to a client’s website. Usually, cheap traffic providers own a lot of websites, domains, and mobile apps and if needed can provide a lot of traffic. Traffic providers determine what a visitor is interested in by an advertisement that the visitor clicks on. If an individual clicks on an advertisement related to weight loss pills, for example, she will be redirected to a traffic buyer’s website who chose “Diet Supplements” as their category. The geographical location of a visitor is determined by his IP address. Cheap traffic is a quick way to increase potential customers to your site. It is also beneficial to website’s SEO and Alexa rankings. Read here for more information on how to buy website trafic. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Price: Cheap traffic is really cheap, you can buy 5000 quality visitors for under $10. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Good Targeting: Website visitors are presorted by advertisements that they click on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: Traffic campaigns can be started and stopped in less than 24 hours.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control over the budget: You pay only for visitors that you want to receive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing capability: You can buy just a little number of traffic for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quick results: You get potential customers to your website quickly. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Possibility of fake traffic: There are websites selling fake traffic which doesn't work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-Click (CPC) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-Click (CPC), also known as Pay-Per-Click (PPC), is a branch of digital marketing payment model where a website’s or app’s owner places someone's ad on his or her site and charges the advertiser when a visitor clicks on it. There is no charge if a visitor sees the advertisement, but does not click on it. Cost-Per-Click model is implemented a lot by search engines and social networking sites. CPC has better targeting than cheap traffic bought in bulk, but it is much more expensive. Like in cheap traffic model, visitor's location is determined by his or her ip address. Also, like cheap traffic, CPC is good for testing, brings quick results, and has pretty good control over budget.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Excellent Targeting: Ads created for the advertiser with his keywords and products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: Traffic campaigns can be started and stopped quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control over the budget: You decide how much you want to spend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing capability: You can spend minimum for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quick results: You get potential customers to your website quickly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cost: CPC costs much more then cheap traffic and prices fluctuate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bidding wars: If several websites want the same keyword, ad prices rise.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Fraud: Competitor or even traffic provider might abuse CPC model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CPC requires skills: It is not so easy to conduct a successful CPC campaign.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-Mill (CPM) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-Mill (CPM), also called cost per thousand (CPT), is an online advertising pricing model where a website’s owner charges advertiser for each visitor the advertisement is shown to. Differently then in Cheap Traffic and CPC, in Cost-Per-Mill model a visitor doesn't have to click on an advertisement to be counted as a successful visitor. TV, Radio, and Newspapers use Cost-Per-Mill model for a long time. The best example of internet company who uses CPM model is YouTube. It charges per average $2 per 1000 views. In comparison, the prices of Cheap Traffic providers (for example VisitorMaker.Com) and Youtube is really similar. Both charge around $10 for 5000 visitors. The difference is that in Cheap Traffic, a website owner gets visitors interested in his products or services delivered to his site, and in CPM model, only theoretically seeing his advertisements. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Customisable: Ads created for the advertiser with his keywords and products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: Traffic campaigns can be started and stopped quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control over the budget: You decide how much you want to spend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing capability: You can spend minimum for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Expensive: You pay for ads showed not for real visitors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unclear Conversion Rate: Hard to calculate how many visitors saw the ad and converted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ad Fraud: Fraudulent ad placer might abuse CPM model.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-Acquisition (CPA) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-Acquisition (CPA), also called Pay-Per-Acquisition (PPA) or Cost-Per-Action (CPA), is an online advertising pricing model where the advertiser pays website’s owner where his ad is placed for each product or service acquired. Advertiser pays only if his service or product was bought, he doesn’t pay if his ad was seen or if a visitor visited his site but did not buy anything. CPA model is very popular in affiliate marketing. It enshures advertisers that they will spend money only on real leads - leads that convert to real customers who spend money. The cost of CPA depends on a company you are doing business with. For example, Amazon pays 4% - 8% to its affiliates, depending on the amount of products or services they sell. Google though, conducts auctions where advertisers can bid for certain keywords. Differently than in PPC, in CPA Google charges certain percentage of product or service sold. In comparison to Cheap Traffic, CPA is much more expensive. CPA is good for manufacturers who can eat additional “tax” on each product sold with help of CPA. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Advertiser pays only if product sells: No payment is due if no product is sold.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customisable: Ads created for the advertiser with his keywords and products.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expensive: You pay for each conversion. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-Engagement (CPE) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-Engagement (CPE) is an online advertising pricing model where the advertiser pays website’s owner where his ad is placed for advertisement if a visitor somehow engages with that ad. CPE is very similar to CPM. The only difference is that in CPM an advertiser is charged for display of an advertisement and in CPE a visitor has to show that he or she noticed the advertisement. An example of CPE is a Lightbox ad. Differently than cheap traffic, in CPE a visitor is not directed to advertisers website.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Customisable: Ads created for the advertiser with his keywords and products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: Traffic campaigns can be started and stopped quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control over the budget: You decide how much you want to spend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing capability: You can spend minimum for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Expensive: You pay for ads showed not for real visitors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ad Fraud: Fraudulent ad placer might abuse CPE model.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-View (CPV) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-View (CPV), also called Pay-Per-Video-View (PPVV), is an online advertising pricing model where an advertiser pays for number of views his advertisement receives. CPV is a version of CPM where the only difference is that in CPV an advertisement is shown in video format. Also, usually in CPV ad gets more visitor engagement than in CPM. For example, in Google’s AdWords, an advertiser is charged for an ad if a viewer watches his or her ad for at least 30 seconds or clicks on it. The most famous Cost-Per-View advertiser is YouTube. YouTube uses two ways to place ads:&lt;br&gt;
In-Display -  ads presented next to videos on YouTube. A visitor can ignore them and go straight to requested video.&lt;br&gt;
In-Stream - ads presented in the beginning, in the middle, or at the end of video requested. In-Stream ads have to be watched from 5 seconds to entire ad length depending of YouTube algorithm and cannot be skipped entirely. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pros:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Customisable: Ads created for the advertiser with his keywords and products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexibility: Traffic campaigns can be started and stopped quickly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Control over the budget: You decide how much you want to spend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing capability: You can spend minimum for testing purposes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Expensive: You pay for ads showed not for real visitors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bidding wars: If several websites want the same keyword, ad prices rise.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Questionable targeting: Ad might be not be relevant to visitor. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ad Fraud: Fraudulent ad placer might abuse CPE model.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost-Per-Install (CPI) vs Cheap Traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost-Per-Install (CPI) is an online advertising pricing model specific to mobile applications. In CPI an advertiser pays for each application installed. There is no charge if a visitor sees an application or engages it. The advertiser is charged only if the application is installed on visitors device. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article explains what is the cheap traffic and compares it to other online advertising models, such as Cost-Per-Click, Cost-Per-Mill, Cost-Per-Acquisition, Cost-Per-Engagement, Cost-Per-View, and Cost-Per-Install. Although, each model has it unique strengths and weaknesses, in most cases cheap traffic wins in terms of price and effectiveness to advertiser. &lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Deividas Strole is a Full-Stack Developer based in California, specializing in Java, Spring Boot, JavaScript, React, SQL, and AI-driven development. He writes about software engineering, modern full-stack development, and digital marketing strategies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://DeividasStrole.com" rel="noopener noreferrer"&gt;Portfolio Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/deividas-strole" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/deividas-strole" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/@deividas-strole" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://national.academia.edu/DeividasStrole" rel="noopener noreferrer"&gt;Academia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/deividasstrole" rel="noopener noreferrer"&gt;X (Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/users/28634012/deividas-strole" rel="noopener noreferrer"&gt;Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/user/deividas-strole/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>traffic</category>
      <category>seo</category>
      <category>marketing</category>
    </item>
  </channel>
</rss>
