Markus Oberlehner

Blog Page 3

Building a ChatGPT Client with Nuxt 3: Leveraging Response Streaming for a Chat-like Experience

ChatGPT has recently gained significant attention due to its powerful natural language understanding and generation capabilities. While the official ChatGPT client offers a decent UX, I wanted to create a better client as a pet project. In this article, I'll share insights on integrating OpenAI response streaming with Nuxt, resulting in a ChatGPT-like experience...

Harnessing ChatGPT as Your Writing Assistant: A Step-by-Step Guide

Are you seeking a trusty sidekick to help you tackle your writing projects? Enter ChatGPT, an AI-powered language model that can give you a helping hand! As a powerful writing assistant, ChatGPT can support you in creating engaging content for your technical audience. But, like any trusty sidekick, it's essential to understand its strengths and limitations to maximize its capabilities...

How To Fix Spacing Between Text Blocks When Using Tailwind CSS

Did you ever encounter the problem that the space between a text block and some other element does not seem right? For example, although we've added the same `mt-4` to a text block and some images, the space between text and image looks much larger than the space between two images. So instead of `mt-4` we try `mt-3`, but it just doesn't work out. This is because the same margin can look visually different if it separates text from some other element or two none text elements because the line height of the text block adds additional spacing...

Using Mock Service Worker with Vitest and fetch

The JavaScript ecosystem has a lot to offer when it comes to testing. With the recent addition of Vitest we get the performance and convenience features of Vite for testing too. Mock Service Worker is an excellent mocking solution for mocking network requests in the browser and Node.js...

TODO Timeboxing

Every couple of months, I reach a point where I have to declare TODO bankruptcy. The items on my TODO list are getting more and more, and I schedule more and more todos each day to get ahead. But obviously, that doesn't work—quite the opposite...

Manual testing, E2E testing, unit testing – how to decide which testing strategy to use?

When we first start to dip our toes into the deep waters of automated software testing, all those different kinds of tests can feel intimidating. In this article, I give you a quick overview of the most crucial testing strategies. After reading this tutorial, you should have a much clearer picture of the strengths and weaknesses of the different kinds of testing methodologies...