<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vedant Gajbhiye</title>
    <description>The latest articles on DEV Community by Vedant Gajbhiye (@vedant_gajbhiye_7f50c4279).</description>
    <link>https://dev.to/vedant_gajbhiye_7f50c4279</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4174264%2F295df39b-54e2-4149-ad21-b601848c8ba4.png</url>
      <title>DEV Community: Vedant Gajbhiye</title>
      <link>https://dev.to/vedant_gajbhiye_7f50c4279</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vedant_gajbhiye_7f50c4279"/>
    <language>en</language>
    <item>
      <title>Queue the next turn: a tiny Snake game in vanilla canvas JS</title>
      <dc:creator>Vedant Gajbhiye</dc:creator>
      <pubDate>Thu, 15 Oct 2026 15:42:59 +0000</pubDate>
      <link>https://dev.to/vedant_gajbhiye_7f50c4279/queue-the-next-turn-a-tiny-snake-game-in-vanilla-canvas-js-3h8b</link>
      <guid>https://dev.to/vedant_gajbhiye_7f50c4279/queue-the-next-turn-a-tiny-snake-game-in-vanilla-canvas-js-3h8b</guid>
      <description>&lt;p&gt;I wanted a snake game for GHW and here's what cursor did for me withing 5 min. Cursor is fast, gives great results and kind of COOL I assume.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/vee-1745" rel="noopener noreferrer"&gt;
        vee-1745
      &lt;/a&gt; / &lt;a href="https://github.com/vee-1745/snake-game" rel="noopener noreferrer"&gt;
        snake-game
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Snake&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;Browser Snake game. Move with arrow keys or WASD, eat food, and avoid walls and your own tail.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Play&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Open &lt;code&gt;index.html&lt;/code&gt; in a browser, or from this folder run:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;python -m http.server 8080&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Then visit &lt;a href="http://localhost:8080" rel="nofollow noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Controls&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arrows&lt;/strong&gt; or &lt;strong&gt;WASD&lt;/strong&gt;: move&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Space&lt;/strong&gt;: pause / resume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enter&lt;/strong&gt;: restart after game over&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/vee-1745/snake-game" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>canvas</category>
    </item>
    <item>
      <title>Grass Coach: a local Gemma agent that gets you off the screen in 10 seconds</title>
      <dc:creator>Vedant Gajbhiye</dc:creator>
      <pubDate>Mon, 12 Oct 2026 05:58:35 +0000</pubDate>
      <link>https://dev.to/vedant_gajbhiye_7f50c4279/grass-coach-a-local-gemma-agent-that-gets-you-off-the-screen-in-10-seconds-1e12</link>
      <guid>https://dev.to/vedant_gajbhiye_7f50c4279/grass-coach-a-local-gemma-agent-that-gets-you-off-the-screen-in-10-seconds-1e12</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Grass Coach is a tiny agent whose only job is to make the screen the shortest part of your day.&lt;/p&gt;

&lt;p&gt;Most "go outside" apps have the same flaw: they're another app that wants your attention. So I built the opposite. You run one command, spend about ten seconds reading one card, and leave. The card tells you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;When&lt;/strong&gt; to go: the best free window in the next 24 hours, scored from forecast, air quality, UV, wind and daylight, routed around your calendar, with a bonus for golden hour and sunrise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why&lt;/strong&gt; that window: written by a local open-weight model, in a voice you pick (park ranger, anime training-arc sensei, worried grandma, pirate, or deadpan British naturalist).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A rule&lt;/strong&gt; to play by, which turns a walk into a side-quest: "Count flower colours; stop at 7." / "No headphones. Name 3 distinct sounds before you turn back." / "Photograph nothing. Memorise one thing and describe it to someone later."&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Touch-Grass Ledger&lt;/strong&gt; (&lt;code&gt;grass done&lt;/code&gt;, &lt;code&gt;grass stats&lt;/code&gt;) with streaks and levels, from Seedling up to Ancient Banyan.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the weather is bad or your calendar is a wall, it doesn't pretend. It prescribes a five-minute "doorstep reset" at an open window instead.&lt;/p&gt;

&lt;p&gt;It's for anyone who knows they should go outside and keeps not doing it. Me included.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;This is a real run on my laptop at 4:35 AM in Nagpur, Gemma 3 4B via Ollama, live Open-Meteo data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🌿 GRASS COACH · Mon 12 Oct · Nagpur
──────────────────────────────────────────────────────────
  CHASE THE DAWN IN NAGPUR!
  The sunrise is painting the sky with beautiful hues, and
  it's the perfect time to witness it before the day gets
  busy. We've got a lovely 30 minutes to enjoy!

  WHEN   6:00 AM – 6:30 AM  (today, in 89 min)  🌅 sunrise
  SCORE  67/100 ███████░░░ good
  SKY    27°C feels-like · rain 0% · UV 0 · wind 5 km/h
  AIR    AQI 105 (unhealthy for sensitive groups)
  RULE   Let's count seven different flower colors – a
         delightful little challenge!
  BRING  A light jacket, A water bottle, A small notebook
  ALSO   today 8:00 AM (52/100)
  ALSO   today 4:30 PM (29/100, golden hour)

  — Get out there and soak it up, friend!
──────────────────────────────────────────────────────────
Screen time for this card: ~10 seconds. Now close the laptop. 🚪
[model: gemma3:4b · forecast: live (Open-Meteo) · calendar: no calendar loaded]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Anyone can try it with no internet and no model:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/vee-1745/grass-coach
&lt;span class="nb"&gt;cd &lt;/span&gt;grass-coach
python &lt;span class="nt"&gt;-m&lt;/span&gt; grass &lt;span class="nt"&gt;--demo&lt;/span&gt; &lt;span class="nt"&gt;--no-llm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;




&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/vee-1745" rel="noopener noreferrer"&gt;
        vee-1745
      &lt;/a&gt; / &lt;a href="https://github.com/vee-1745/grass-coach" rel="noopener noreferrer"&gt;
        grass-coach
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🌿 Grass Coach&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A tiny agent that runs on a &lt;strong&gt;local open-weight model&lt;/strong&gt; and has exactly one job: get you off the screen.&lt;/p&gt;

&lt;p&gt;It reads the forecast, air quality, sunset time and your free calendar slots, finds the single best
window to go outside, and hands you a &lt;strong&gt;side-quest card&lt;/strong&gt; with a little rule to play by
You spend ~10 seconds on the screen. Then you leave.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;🌿 GRASS COACH · Sat 10 Oct · Nagpur
──────────────────────────────────────────────────────────
  CHASE THE GOLDEN HOUR
  Ranger's orders: The sun sets at 5:43 PM, so 5:00 PM is
  when the light turns soft and everything looks like a
  film. It's 29°C and the air is moderate (AQI 58)
  WHEN   5:00 PM – 5:30 PM  (today, in 80 min)  🌇 golden hour
  SCORE  83/100 ████████░░ prime
  RULE   Photograph nothing. Memorise one thing and
         describe it to someone later.
  ...
Screen time for this card: ~10 seconds.&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/vee-1745/grass-coach" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Python 3.11+, standard library only. No pip install, no API key, no account.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Open pieces:&lt;/strong&gt; Gemma (via Ollama) as the default writer, &lt;a href="https://open-meteo.com" rel="noopener noreferrer"&gt;Open-Meteo&lt;/a&gt; for open weather and air-quality data, and an OpenAI-compatible adapter so &lt;code&gt;llama.cpp&lt;/code&gt;, LM Studio or vLLM work too. Swapping the model is one line in &lt;code&gt;grass.toml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The interesting part isn't the model. It's what I &lt;em&gt;don't&lt;/em&gt; let the model do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Code owns the facts, the model owns the flavour.&lt;/strong&gt; Small models are bad at arithmetic and good at tone. So the Grass Score (0-100), the window times and the quest rule are all computed in plain Python. The model receives them as JSON and writes only a title, a pitch, a re-worded rule, a packing list and a sign-off. (You can see the exact facts it gets with &lt;code&gt;grass --json&lt;/code&gt;.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Schema-constrained output.&lt;/strong&gt; The request carries a JSON schema (Ollama's &lt;code&gt;format&lt;/code&gt; field, or &lt;code&gt;response_format&lt;/code&gt; on OpenAI-compatible servers), so even a 4B model returns the right shape. Every live Gemma run I did returned a valid card.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A number guard.&lt;/strong&gt; Every number the model writes is checked against the facts it was given. If the model says "it's a lovely 42°C", that's rejected, the model is told exactly why, and it gets one retry. This targets the failure small models actually have: confident, plausible, wrong numbers. It's covered by unit tests that script a fake Ollama server returning hallucinated numbers, malformed JSON and no response at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. It always answers.&lt;/strong&gt; If the model server isn't running or fails twice, a rule-based writer produces the card. If there's no signal, the last good forecast is cached and reused, labelled as stale. I tested those paths in unit tests; I haven't yet tried it on a trail with no signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The calendar stays on your machine.&lt;/strong&gt; A tiny &lt;code&gt;.ics&lt;/code&gt; reader finds your busy slots locally. Nothing about your schedule is sent anywhere.&lt;/p&gt;

&lt;p&gt;There's also &lt;code&gt;grass compare --models gemma3:4b,qwen3:4b,llama3.2:3b&lt;/code&gt;, which runs the same facts through several local models side by side. That only works because the model is a config line, not an API contract.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the first real run taught me
&lt;/h3&gt;

&lt;p&gt;I wrote the code against a fake model server, so the real Gemma run was the actual test. It worked first time, and it also showed me where a 4B model is weak:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It ignored the voice.&lt;/strong&gt; My default voice is "park ranger", but Gemma wrote a generic cheerful "Get out there, friend!". Ironically, the dumb rule-based fallback ("Ranger's orders: ... Leave only footprints.") has more character than the model does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It ignored common sense.&lt;/strong&gt; It told me to pack "a light jacket" (and on another run "a warm scarf") at 27°C. My number guard checks numbers, not sense. Next step: constrain the packing list by temperature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It didn't mention the air.&lt;/strong&gt; AQI was 105 and the card shows it, but the model's pitch never says so. The score and data are honest; the prose isn't always.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The facts never wavered; the prose did.&lt;/strong&gt; Same inputs, three runs, three different texts. But the time, score and rule were identical every time, which is the whole point of the design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One thing I'd fix:&lt;/strong&gt; the "ALSO" list happily showed a 29/100 option. It should hide weak alternatives.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It can work where the grass is.&lt;/strong&gt; A trail with no signal is exactly where a closed API stops. Local weights plus a cached forecast are designed to keep working there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your calendar and location stay yours.&lt;/strong&gt; An agent that knows when you're free and where you live is the kind of data you don't want on someone else's server. With a local model, the prompt never leaves the laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I could change how it behaves.&lt;/strong&gt; Constraining output with a schema, adding a verification layer around the model, swapping models and comparing them on identical input are all things I could do in an afternoon because the model is mine to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs nothing to run.&lt;/strong&gt; No key, no quota, no bill. A tool meant to be used every day can't have a per-call cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Outing
&lt;/h2&gt;

&lt;p&gt;The card above came out at 4:35 AM and pointed me at a 6:00 AM sunrise window.&lt;/p&gt;

&lt;p&gt;I headed out into the cool Nagpur dawn around 6:00 AM for a 30-minute sunrise walk, bringing along a light jacket, my water bottle, and a small notebook to log what I found. I took the challenge seriously (I got to a nice morning walk anyways) and kept my eyes peeled, successfully spotting seven distinct flower colors: bright marigold orange, deep bougainvillea magenta, soft yellow, pure white, crimson red, lavender purple, and tiny wild blue petals nestled along a garden hedge. The AQI sitting at 105 gave the sky a slightly hazy quality, so I adjusted by keeping my pace relaxed and steady rather than turning it into a brisk workout. Stepping away from the laptop after just ten seconds of screen time was a complete breath of fresh air; swapping my usual morning routine (watching reels and youtube on laptop/tab) of mindless scrolling for real sunlight and quiet streets left me feeling remarkably calm, grounded, and present. And also, flowers helped me talk to my crush.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma&lt;/strong&gt;: runs Gemma locally by default (&lt;code&gt;gemma3:4b&lt;/code&gt; through Ollama), with schema-constrained output and a verification layer around it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A huge shoutout to shreyashkakad for contributing (&lt;a href="https://dev.to/shreyashkakad"&gt;https://dev.to/shreyashkakad&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
