Posts

The BC .NET “Concert Series” – AI Edition

Image
  Last night at the BCIT Arena (a.k.a. BCIT Vancouver Downtown Campus), I had the honour of being the opening band . And what a night it was. I debuted my latest “single” in the AI genre:  WORKS Commons — inspired by my job-hunting adventures and powered by AI to help me cope with interview prep, skill gaps, and the occasional sorrow. I was scheduled for a tight 10-minute set. When I asked the audience to keep time, they kindly informed me I had already played… 18 minutes. When I sing, I sing. The Headliner The main act of the evening was Jasmin Goh , who delivered an electrifying performance on building an AI Agent through the core concepts of AG-UI . She had the crowd hooked with chart-toppers like: Build a Working AI Agent as a .NET CLI Application The unforgettable Blazor Web Application Synthesizer And of course, the crowd-favorite encore: Consuming Agent Notes in Real Time The energy in the arena was fantastic. Curious minds. Smart questions. Real de...

AI Is Here

Image
Introduction I posted this on LinkedIn today. It is not 100% corporate-oriented. In fact, it has nothing to do with the spirit of the platform.  My intention was to reach those feeling the "pinch" to offer them my vision and understanding of what we are witnessing today means. The Post My daily feed is full of posts telling me what “AI” has “done.” My response to that is: Do not be afraid, embrace it. This is what I think. At this very moment, humanity is in the middle of a Revolution. Every home has books, tons of them. Many years ago, humanity had a decent profession: the scribes. Their job was to write books by hand. Generations depended on these scribers.  Then the printing press was invented, and they had to reinvent themselves. The result was that more books were printed, newspapers appeared, and information reached a wider audience. People learned to read. Amazing. Centuries passed, and industrialists made a big push, which climaxed with the Industrial Revolu...

Nugget 16: Mediator Pattern in MVVM

Image
  Problem As this little experiment of mine slowly turns into a tool I use every day, some design issues are starting to show. Nothing dramatic — just the usual growing pains. In this post, I want to talk about a data‑sharing issue between ViewModels and how the Mediator Pattern helped clean things up. The symptom showed up in the Index view, where a grid lists all Job Applications. Earlier, I added date‑range filtering to that view. It works, but it also made the IndexViewModel a bit “fat.” It’s doing too many things now, and that’s something I’ll need to revisit. When the user filters by date, the grid updates correctly. But then you go to the Home page, where the chart lives, and it still loads the entire dataset. It would make much more sense for the chart to reuse the same FromDate and ToDate  and rebuild itself accordingly. That’s where the Mediator Pattern comes in. The Mediator Pattern This pattern is common in MVVM. It lets sibling ViewModels communicate without k...

Nugget 15: Make ChartJs Blazor Bars Display Reliably

Image
 Now that this application passed from a "test toy" to an everyday tool, defects are showing up.  Bug :  Accessing the Chart data after creating a new record does not load any data.  Several problems with this going from the Blazor component lifecycle to how the view model was registered in the DI container . This post works as a "release document" for the changes required.   Config Initialization Config = new BarConfig () created in the constructor and Config.Data.Labels / Config.Data.Datasets cleared. Reason : ChartJs.Blazor exposes Data as a read-only property; ensure Labels/Datasets exist before use to avoid null reference exceptions .  Remove Manual Chat Initialization In The ViewModel The model does not need to initialize the Chart.  This is because the Razor page uses @ ref=ViewModel.Chart , providing the real instance.  The rendered provides the instance when the @ref is used.  If the VM initializes the component, this can cr...

When Life Says 'Reset'

Image
Introduction I am sharing a LinkedIn post I wrote a few days after being laid off. Losing one's source of income is a difficult experience. I wrote this after hearing from colleagues who found themselves in the same position; the objective is simply to let anyone reading this know that they still matter. The Post I was laid off, and I’ve now turned on the “Open to Work” tag. I see others doing the same. The sky, however, has not fallen. My children are still lovely, and coffee still tastes great at all times of the day. What has changed is… a lot. Yes, we need to watch our purse. Readjustments are necessary. Some form of grief will take hold. And yet, we still need to get up early and face the day. So the question remains: what do we do? You and I already know the answer—nature gives us a hint. When a pathogen enters the body, the immune system mobilizes. It’s demanding, energetically expensive, and it leaves us tired. Sometimes we need help. Most importantly, we rest and nourish. ...

Nugget 14: Search By Date with Two Blazor InputDate Components

Image
  This is an enhancement to the same Blazor from previous Nuggets. This post adds two Blazor InputDate components to the Job Bank application.  It does not use an explicit callback mechanism, but property setters in the view model.  What Changed in the View The view contains two InputDate components, each bound to a property in the View Model.  This component exposes Value , ValueChanged , and supports @bind-Value .   @bind-ValueChange could be used for a change binding event, less common for Date, but available if needed.  Using this binding would require updating the ViewModel interface with a handler. How MVVMM Helps We changed the architecture in an earlier Nugget to MVVM, and now it is coming to the rescue!  These are how the controls react to user input and can stay in synch.  This is the recommended approach for dates.  Could the Boolean check boxes be done like this?  Of course! Noteworthy are the control's max/min attribut...

Nugget 14: Connection to MongoDB Atlas - SSL Alert 80

Image
  I'm using MongoDB Atlas (1) to host my NoSQL database. Creating an application with the MERN stack was very straightforward. However, after a few hours, when I tried to run the same application, Atlas displayed an SSL error message. How is this possible? What changed overnight? Something changed overnight, of course! When creating the cluster in Atlas, my IP address was configured (2), and by default, it expired after 6 hours. The error message was a bit misleading, although the problem was discovered after some investigation. Either re-whitelist your IP address or remove and re-add it to fix the error. I had a harder time finding the solution in Atlas, so I'm writing it down. Log in to Atlas, go to Network Access, and fix it there.  There is also an option to be able to access the app from any IP.  I prefer to restrict the IP. After the correction, it worked as expected. The Atlas MongoDB database is impressive (3, 4).   References & Notes MongoDB Atlas ...