RSSAmplifier

Blog

hosain.net

Recent content on hosain.net

hosain.netRSS feed ↗10 posts

Latest posts

Streaming LLM responses in Ollama and Deno

When building AI-powered applications, one of the most frustrating user experiences is waiting for a complete response to load, especially for long-form content. Imagine requesting a 10,000-word story and having to wait 30+ seconds staring at a blank screen before any text appears. This is where streaming comes to the rescue. The Problem with Blocking Responses Traditional AI implementations…

Web browser automation with browser-use and Gemini

I recently experimented with the browser-use library to create an AI agent that can browse the web autonomously. This post walks through a simple example that uses Google’s Gemini AI to find the top post on Hacker News’s “Show HN” section. You can find the complete project code on GitHub . The Setup The implementation is fairly straightforward. Here’s what we need:…

Deno, LangChain, Ollama, and structured outputs

When working with LLMs programmatically, it’s important to receive a structured response from the model. This makes it easier to parse and use the output in your application. In this post, we’ll walk through how to define a schema using zod and query an Ollama model with the help of LangChain. For simplicity, we’ll use Deno , so make sure it’s installed on your system. You can…

Unit Testing React Native Components

tldr: github.com/hosainnet/RNUnitTests I’ve recently jumped ship to React/React Native (and JS in general) and one of the first hurdles for me was figuring out how to unit test RN component code. As many of us starting out, you’ll have probably come across the snowflake project for guidance and inspiration (which deserves credit for most of the content in this post). However since…

Dependency Injection With Dagger 2 and Android

Dependency Injection is one of the patterns we use in software development to achieve separation of concerns, making our code maintainable and testable. Consider the following Activity code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); Retrofit retrofit = new Retrofit.Builder()…

Getting Started With Android Development Using Groovy 2.4 and Android Studio

Groovy 2.4 was released last month with native support for Android development. In this post I’ll explain how to set up a new Android Studio project with Groovy support as I couldn’t find a decent tutorial to explain it for newcomers (like myself). Why Groovy? If you’re new to Groovy, you may ask why would I want to do this? In short: less code = (hopefully) less buggy and more readable…

Grails Upgrade Part 1: 2.1.3 to 2.2.5

We have recently upgraded a fairly large web application from 2.1.3 to 2.4.4. Since it’s a big jump, we split the task into multiple grails upgraded so this post will focus on 2.1.3 to 2.2.5. The best place to start is the official upgrade documentation page . Here are some of the things we’ve encountered during the upgrade: ###“delete() does not work in withNewSession”### Sessions are…

Hello World!

About

I’m Hosain, a software engineer interested in AI/LLMs, web technologies, and mobile development. I enjoy experimenting with tools like Deno , Ollama , and LangChain to explore what’s possible with local and open-source AI models. I also tinker with browser automation, structured LLM outputs, and streaming interfaces. Contact Email: contact AT hosain.net GitHub: hosainnet LinkedIn:…

Projects