• Rust, mapping between result types

    I encountered a problem where my function uses,Result<Value, String>, but I also use Hugging Face Candle and std::fs::read, both of which have their own result types. For example, std::fs::read returns io::Result<Vec<u8>>. This means you can’t simply use the standard ? syntax to return the result. There are two ways to handle this: 2. Or, you…

  • Naming your code

    Introduction In this post, we will explore the importance of naming in your code, encompassing functions, parameters, variables—essentially anything that requires a name. Many junior developers often struggle with effective naming. Our goal here is to provide guidelines and best practices for creating meaningful names. Why Naming is Important The primary reason naming is crucial…

  • Rust code coverage

    Introduction An important part of development is writing tests. When I started, things like unit tests didn’t even exist. Now, I can’t imagine doing development without them. I’m a strong believer in test-driven development (TDD). While I don’t strictly adhere to writing tests before implementation, I’ve learned that tests are not just about ensuring quality—they’re…

  • Rust, fighting the borrow checker

    This post is about my experience battling the Rust borrow checker during compilation. This is a common issue, especially for those with a strong OOP background. Spoiler alert: If you are struggling with the borrow checker, you are likely doing something wrong. Specifically, you might be thinking about your code structure in the wrong way.…

  • Understanding Advanced Rust Data Structures

    In this blog post, we’ll dive deep into a Rust code snippet that showcases some of Rust’s powerful features for managing complex data structures in a concurrent environment. Code Breakdown We’ll start with the trait definition and then look at how it’s used in a struct. Trait Definition Struct Definition Detailed Explanation Let’s break down…

  • UI Automation

    Introduction UI automation refers to testing of the user interface using automated systems instead of manual user testing. This is achieved through automation instructions that interacts with the user interface and ensuring that the response from the client is what was expected. The current mindset around automation is giving instructions on what to do.Click on…

  • Process API in AI tooling

    I am currently working on the third iteration of the process API, this time in Rust. The first version, written in JavaScript, aimed to expose user-defined processes without requiring users to write code. This introduced the concept of intent-driven development, where users define the intent and the process API handles the execution. This approach has…

  • Data manager

    In this article, we will explore data management in the context of user interfaces. First, it’s important to differentiate between data and information. For our purposes, we’ll define data as the raw collection of records retrieved from a data source. Information, on the other hand, refers to the insights derived from this data, providing a…

  • RAG models

    This topic can quickly become extensive due to its complexity. My aim here is to document my experiment using llamaindex, ollama, and chroma_db for RAG. In essence, RAG involves conversing with an AI about processed documents. My focus lies not in the intricacies of document processing into vector stores, but rather in engaging with the…

  • Running LLM locally

    For those entrenched in the loop, this might be old news, but it remains crucial for those still traversing the learning curve. Q: How can I execute a Language Model (LM) on my local machine? There’s a valid query as to why one would even consider this. Sure, there are readily available sandbox environments online…