Blog

Notes on the .Net ecosystem, Angular, Software Architecture, Machine Learning and CyberSecurity

  • ASP.NET Core
  • MongoDB
  • .NET

Building the rock recommender API

Fifth and last article in the series. After training and evaluating the model, it's time to put everything inside a real API, with MongoDB keeping each person's history and simple endpoints to pick bands, ask for the next song and give a like or dislike. The full code is open on GitHub, in the RockRecommender repository.

Read more →
  • ML.NET
  • Machine Learning
  • .NET

Evaluating the model in practice

Fourth article in the rock recommender series. We trained a model in the previous article, but training is not the same as getting it right. Now we apply, with code, the metrics explained in article 2 (Precision@K, Recall@K and NDCG) on that model, to honestly answer: is it good?

Read more →
  • Machine Learning
  • Recommendation Systems
  • .NET

Recommendation systems: how Spotify knows what you want to hear

This article opens a new series here on the blog, and its destination is very practical: building, from scratch, a rock music recommendation API, similar to what Spotify and Deezer do, with everything running on .NET. But the real subject of the series is not just building a recommender that works, it is understanding, in depth, how to know if it works well.

Read more →
  • Machine Learning
  • Metrics
  • .NET

How to evaluate a recommendation model

Second article in the rock recommender series. In the first one, we saw how a machine decides what to recommend. In this one, I answer the question that closes that article: how do we know these recommendations are actually good? Calmly, and with a numeric example of every metric.

Read more →
  • ML.NET
  • Machine Learning
  • .NET

Building the dataset and training the recommender with ML.NET

Third article in the rock recommender series. The theory from the first two articles (types of recommendation, cold start and the evaluation metrics) now becomes code. Let's build our catalog of bands and songs and train the first model, using ML.NET.

Read more →
  • Angular
  • Micro Frontends
  • Module Federation

Why I used micro-frontends

In my previous article I explained why I chose macroservices on the backend. That meant six separate Angular applications on the front, and every switch between areas reloaded the whole page. Here is how I joined those applications into a single experience, without giving up the isolation they had behind the scenes.

Read more →
  • TorchSharp
  • Transformers
  • Deep Learning

Building a transformer from scratch with TorchSharp

Last article of the series. For five chapters, the transformer was a powerful box we used closed. Now we open it: we are going to build one from scratch, piece by piece, in C#, and you will understand once and for all how the gear behind ChatGPT, CodeBERT and our detector works.

Read more →
  • Machine Learning
  • AI
  • Transformers

CodeBERT and the AIs that read code

Fourth article in the series where we will teach a machine to find security flaws in code. Time to meet the tools: the transformers trained to read source code. Who is who in this family, what each one does differently, and which of them will be the brain of our detector.

Read more →
  • Machine Learning
  • AI
  • NLP

From counting words to transformers

Second article in the series where we will teach a machine to find security flaws in code. But before that, a more basic question: how did machines learn to read? It's a 30-year story, full of clever ideas, and I tell it in the lightest way I can. Come without fear, there are no formulas or math here.

Read more →
  • Machine Learning
  • .NET
  • Security

Teaching the machine to learn

This article opens a series where I bring together two subjects I love: machine learning and information security. The final destination is a vulnerable code detector running on .NET with transformers. But every journey has a first step, and ours is this one: what machine learning is, explained for those who have never trained a model.

Read more →
  • TorchSharp
  • Transformers
  • Security

Building a vulnerable code detector with TorchSharp

Fifth article in the series, and the theory is over: we are going to use CodeBERT and specialize it in recognizing vulnerable code, with training and execution 100% in C#. No Python, no cloud, no sending your code to anyone. And a promise: one of the pieces will stay closed on purpose, because opening it is the subject of the grand finale.

Read more →
  • Security
  • OWASP
  • AppSec

What vulnerable code is and why it goes unnoticed

Third article in the series where we will teach a machine to find security flaws in code. But what flaws are those? In this article I explain what vulnerable code is, show the classic attacks (including the most famous of them all) and tell how these flaws are found today, and why so much still goes unnoticed.

Read more →
  • .NET
  • DDD
  • Clean Architecture

Neither monolith nor microservices: why I chose macroservices

Every architecture debate turns into monolith versus microservices, as if there were only two paths. In the confidential project from my first article I took a third one that almost nobody talks about. Here is what macroservices are and why, for this product, they beat everything else.

Read more →
  • Angular
  • TypeScript
  • Nx

Why I'm not upgrading to Angular 22

Angular 22 has been out since June. I audited my Angular workspace's migration dependency by dependency and concluded it's not time yet. Here is why, tool by tool.

Read more →