/images/avatar.jpg

Jorge Ortiz-Fuentes' DevBites

Rust unit testing: simplify your tests

Now that we understand the building blocks for writing unit tests in Rust, you probably feel the urge to apply that knowledge and fully cover your application with tests. Don't you? Well, I would ask you to hold your horses and apply it gradually. We still have a lot of ground to cover, but the next sections are probably going to simplify your life right away.

Again in this article, you have the final version of the supervillain.rs file at the bottom and the repo with the incremental commits is available here. In case of doubt, check the code or feel free to reach me through any of my social media accounts.

Rust unit testing: test types

So you have finally learned Rust and are writing cool projects with it? Awesome! However, as soon as your project starts being useful and solving some actual use cases, you realize that the quality of your code is important. Not only that. The larger and more complex your project becomes, the harder it is to manually test every bit of functionality after a change.

Your first temptation might be: "Why should I test everything if my changes only affect this small part of the program?" And, while in some situations that might be true, more often than not our changes affect unexpected parts of our program.

A note about taking notes (part 3)

This is the last article of a series on taking notes. In the previous ones, I shared the reasons why I think taking notes is useful as well as some of the things that I do when I take my notes. This article contains ways of making use of the effort that we have put into writing those notes. Some of them are specifically geared toward digital notes and won't be very useful for handwritten notes, but there is one which applies only to notes on paper. 😉

A note about taking notes (part 2)

This is the second article of a series on taking notes. In the previous one, I listed my reasons for taking notes as well as a few rules of thumb for deciding when it is worth to take a note about a topic. In this article, I will focus on the most practical aspects of note taking and I will share how I do it. It shouldn't come as a shock that these aren't the Note Commandments, but my experience and way of doing things. I am quite happy with most of them, but there is always room for improvement and I will be glad to hear from you and how you tackle the scenarios that I have described here or any others that might be relevant.

A note about taking notes (part 1)

If you are reading this, I'd bet dollars to donuts you already take notes frequently. But, if this is not the case, I am sorry. Not just because you are missing a great opportunity to maximize the production of your brain, but rather because of what you have missed so far. But, don't worry. It ain't late to join the club. The sooner, the better.

I must also acknowledge that this is not a comprehensive guide on note taking, but rather a series of tips that I consider useful. Although, I will not chicken out on sharing my reasons for taking notes, the focus will be on describing how to get the most out of them. I am sharing my experience here and would love to hear about yours. Feel free to ping me in any of the social media platforms, using the links on the home page, if you need, and let me know other tips that have been useful to you. I am looking forward to learning more on the topic!

Set up and run AI Optimizer and Toolkit

Intro

I have decided to create a series of pieces of content on how to use AI. And, since there is no better tool to play with AI than the AI Optimizer and Toolkit, I have chosen to start by explaining how to set it up and run it.

AI Optimizer and Toolkit is an Open Source project created by our team, the Microservices and AI Team. You can use Oracle's AI Optimizer and Toolkit to take your generative AI projects from prototype to production, independently of their size. Using generative AI to match your business needs is challenging and our software helps you to simplify and accelerate the process of developing AI-based tools. AI Optimizer and Toolkit allows you to: