Posts

Comparing LLM results on the same prompt between 3 models - Oooooollama

Image
In my journey to learn how to leverage LLMs for the benefit of my wife's Etsy shop, I decided to run some models locally via Ollama . The advantage of Ollama is that one can locally run open source models like Gemma3 or Mistral or even some of the Phi series (which in a few months will most probably be obsolete 😖). Moreover one can select to run the full model or some flavor of it (as far as parameters go). This post deals with testing the same prompt over 3 different models as a preliminary POC for the final project. AI generated image Hardware, the bane of local LLM serving We have all heard or read about the hardware needs of running a language model, of any size, locally. It needs some GPUs and an overall good supporting hardware. Unfortunately I have none of these at home. My private development playground setup is old (because I like recycling older machines but this is another story).  Hardware setup: CPU: Intel i7, 4th Gen GPU: (1) Nvidia GTX 980 Storage: 250GB SSD Ram...

Vibe Composing (Pt. 2) - The "boring" but exciting parts

Image
After some back and forth with learning and reading all I needed for the project I finally dipped my hands into installing things and creating my project. This was a wild ride because I asked  A.I to create a python project for me. The wild ride begins! Photo created with Google Imagen The amazing triviality So I asked the LLM to create a Python project and use the UV package manager. UV was not installed and I had to install it. Unlike Cursor which would have installed it for me CoPilot did not, just gave me the command and I applied it myself. And then the picture below happened. Screenshot from my own machine The project was created and it even "read my thoughts" and what I meant with RAG and added the relevant description. At this point my mind is blown. Obviously previous context was responsible for the description and yet it was pretty amazing. The rest of the project was completed mostly with completions because I had to practice my Python skills. However even for that...

Vibe Coding? No! Vibe Composing! (Pt.1)

Image
If you are a developer you are (probably and hopefully) familiar or have tried to apply Vibe Coding in your day to day workflow. If you haven't I suggest you give it a shot. It is not a solution for everything but is is one more tool in your belt. Apart from the coding itself though what else can we do inside our IDE that we didn't even think of doing before? This is the first of a series of short posts on my experience in Vibe Composing  rather than Vibe Coding. Consider the following premise; You are given a requirements document from your product manager. The document will probably be a few pages (tens) long. You don't really have time to read all this. You may even ask some A.I chat to summarize it. However, what if you could load the document in your A.I assisted IDE and ask your friendly chat agent to operate based on that document? Fantasy? Reality! Photo by A.I Enter personal project While at a crossroads on my career I had some free time to think about what is the...

NUnit Console Runner and NLog extension logging for your tests

Image
Have you experienced the frustration of tests running perfectly well on your local machine and then failing in CI? This all too familiar "It worked on my machine" comes to mind. You set off to investigate and after a while you realize you are too far into the rabbit hole between code and logs in Kibana and this investigation is getting you nowhere. Wouldn't it be nice if you could hijack the logger and print the logs in the test runner's console? TL;DR NLog can be extended easily and NUnit  Console Runner does not play well with simple console logs.   Photo by  Kaboompics .com  from  Pexels Enter Console logging In .Net in general it is not advisable to log to console in a multi-threaded environment, because the console is not thread safe. While logging simple strings may not cause any problems logging strings with interpolated variables may very well be sub optimal to say the least. Should you use any such debugging technique you are better off with a thread ...

Reviving old hardware en mass or: How I Learned to Stop Worrying and Love the ZorinOS Linux Distribution

Image
Let's see how we can help upgrade and stabilize the school's computers in the classes and labs he said .  But as I wrote before the Local Council's finances are in dire straights.   TL;DR The end may be happy. but the journey was glorious. ZorinOS Logo  Copyright © 2014 - 2020 Zorin Technology Group Ltd. All Rights Reserved. The state of computers in classes and labs Hardware ranging from the last generation of dual core Pentiums to 4th generation i7s with a sprinkle of, surprisingly fast but with very low memory and cache, dual core 64bit AMDs. Packed with dust, ridden with useless software and desktops full of documents over Windows 7 and some Windows 10 build 1803 or less. The list of complaints on slow or stuck PCs is getting longer by the day. The phrase "It does not work" appears in every other row on a spreadsheet. It is the end of June 2019, School year starts September 1st, the teachers do not know what they need on the PCs but they need it...

Volunteering in school IT - A retrospective

Image
The purpose for a PC in a school is to be a teaching tool and not a hurdle. This is a retrospective of the most interesting volunteer work I have ever done (and still do). I live in a small town (~9000 residents), governed by a Local Council. As it happens the Local Council's finances are in dire straits (which I will not go into at all) and at the 3 schools within its jurisdiction (in two of them my children study), 2 primary schools and one middle school, the PCs in the classes have fallen to disarray. TL;DR No such thing this time. Read on How it all begun Somewhere around June 2019 one of the council members mentioned that he is trying to devise a plan to upgrade the school's computers and network infrastructures. Long story short I found myself willingly involved in that project spearheading change on the field while said council member spearheads change in administrative levels on the education board. I will spare you the long night hours upgrading OSs, the mistak...

Evaluating NDepend on current codebase Part 2

Image
In Part 1 we saw a first approach to NDepend starting off with analyzing a project of 2 assemblies and focusing on the smaller assembly. In this part we will focus on the main executable and the gems NDepend discovered in it TL; DR Memory leak detected... Photo by  Daan Mooij  on  Unsplash Enter 3 years old WPF project - Main executable Going back to the dashboard I see the "usual" long types or methods errors, some immutability warnings, which I would have set as errors and 400 violations of "Avoid namespaces mutually dependent" some with debt time of 4 days. "Oh come on.. what 4 days. How hard can it be..." Drilling down into the code (a wpf application) I realize that there is a single class that is injected in the constructor of every view model and I hardly see any services in the system save for calls to the DAL assembly. Without drilling down into the class I changed it's namespace and made the necessary, albeit sisyphic, chan...

Evaluating NDepend on current code base Part 1

Image
A while ago I was asked by one of NDepend's founders to evaluate any .NET code base I wanted with NDepend and write a blog post about it. It turns out I came up with a two-part post. TL; DR Oh boy.... Photo by geralt on Picabay Enter 3 years old WPF project Without revealing the nature of the specific project I would just say it is a feature rich client, with UI elements customized to the customer's needs. It is written using MVVM, some third party grids and communicates with an SQL Server database via a classic  DAL class library. All and all the project is comprised of one executable and one DAL assembly. So off I went and added the necessary assemblies to a new NDepend project and let the analysis run. Given the size of the project it was pretty swift and started off with a a dashboard (or at least this is the view I chose to start from). NDepend desktop Dashboard At the same time a very nifty HTML based dashboard popped up in my browser NDepend HT...

Tests code coverage in Visual Studio Code with C# and .Net Core

Image
While writing tests for you code goes without saying, there is much to be said about code coverage of tests. How much of your code is actually covered by these tens of tests you just wrote? If you work in a TDD approach most probably you don't have such "mundane" questions. Of course you code is 100% covered. You did make sure every test failed before you added that line in your code to make it pass... and that conditional statement... or did you? While purists would argue there is no chance of no coverage I beg to differ. Let alone if you write your tests after the code is written... After such and such years and experience in the industry when we are nearing deadlines some things are thrown out the window. They shouldn't but they are. TL;DR tools help with coverage. In this case .Net Core Test Explorer with coverlet and Coverage Gutters . Photo by  Startup Stock Photos  from  Pexels Coverlet to the rescue As I blogged a while ago I have made myself a warm ...

Visual Studio Code setup I use for C# development

Image
Visual Studio Code has been around a while. However most of the extensions or blog posts out there relate mainly to extensions that facilitate development in JavaScript environments such as Angular, React or NodeJs (to name a few) and even Rust! The IDE is getting great reviews as being fast to load and very responsive as opposed to its bloated and heavy bigger brother, Visual Studio. TL;DR I switched from Visual Studio for good Having worked on Visual Studio since version 4.2 I was used to it being heavy to load and at times even slow to respond. After experiencing VS Code with a little bit of NodeJs development I decided to try and make it my daily driver for .Net Core and C# development. I sought to find extensions to ease my day in the cubicle and see how comfortable will I be with it. I would give it a month on various tasks and workloads. VSCode showing off extensions The month became two months and then 3 months and here I am with a list of very handy (in my opinion) ...

Using custom health checks with Asp.Net Core 2.2

Image
I almost burst with cries of joy when I saw the release of .Net Core 2.2 with the much needed built in and standardized health checks. The preview was great and with each version until the release new blog posts emerged eager to show to the world the new wonder. But as I do like my frameworks fully baked and released I waited patiently for the real deal. TL;DR Implement your own service from IHealthCheck and inject it with whatever you want. It just works! Reading the instructions... The best article I found for the new healthcheck API was this one based on preview code and the best code samples where of course the official samples . However by looking at them something was missing. So I went on a quest to achieve what suited my needs. And my needs are simple. I need to be able to inject some testing code to my custom health check module. Healthcheck for your .Net Core2.2 Services On to the code After I practiced a little bit with the concept of tags I just added a heal...

Running an Asp.Net Core 2.* Web API as a Windows Service

Image
At my current workplace there is a healthy hunger for new technologies and a pragmatic view of the software industry in our corner of the planet. As a Microsoft driven shop, previous reservations of moving to different ecosystems and operating systems have melted away with the arrival and wide adoption of .Net Core. After all the language is the same. The developers need "only" to catch up on their containers. When I joined a month ago as a tech lead, little did I know that putting my money where my mouth is would mean having to deal with outdated Microsoft documentation or even S.O answers to questions such as "How do I run an Asp.Net Core app as a windows service without IIS". TL;DR add a reference to the NuGet package  Microsoft.Aspnetcore.Hosting.Windowsservices , publish and register your executable as a service. A Prophecy? Almost a year ago I wrote a blog post about porting  full framework projects to core . Ever since I have written my share of .Net Cor...

Adjust the message to the audience

Image
A couple of weeks ago had my first public speaking chance. Two 12 minute sessions TED style, in front of an audience between 20-70 years old and non technical. Each sitting had 100 people. The session was about crypto/virtual currencies, real money and everything between them. 12 minutes, non technical, make the message count. Go! TL;DR It was a success and K.I.S.S Version 1 The first version, presented to the other lecturers of the evening for feedback, was rejected by the second slide. The words Bitcoin Mining were present in the slide. Shot down in flames? Yes. Discouraged? No. Slightly depressed. Yes. Version 2 Imagine... A world without bank accounts. Yes this is more or less how it started. as a story... with the song Imagine  playing in my head. I took my super technical slide deck and turn it into a story. How did I do it? Well I was given a tip. Tell a story.  Disclaimer: The "tips" here work for me. They are part of my experience. I suggest searc...

Binding yourself to high level design by details - irrevocably

Little over half a year ago I was present in an unprecedented blunder by a team leader. I saw how the fervor to succeed  made for a design mishap and how the same fervor made for a Mr. Know It All team leader. TL;DR detailed designs are for devs, not VPs or CTOs How to not design like a galley master and not be shackled like a rowing slave When one is asked to make the design document of a new development, one must be very very careful how flows are put on paper. These documents are binding and every word or terminology in them can and will haunt one for a long time. In order to try to minimize a possible mess here are some rules of thumb, gathered from my own experience Detailed documents glide up like migrating birds High level design documents may and will end up to the higher ranks of the corporate hierarchy. Be vague when describing functional parts. Do not put highly detailed implementation details in a high level design, otherwise once the details are stated and ...

Public speaking - baby steps

Image
Sometime last year I decided that I too have something to say to the world. This is how this blog was born. I really feel it is time to take the next step and try my luck on public speaking. TL;DR this is not long hang in there.  Where to start There isn't really a recipe or a user guide on that one. One can start on meetups, try one's luck on a conference out of the blue... Just take your pick.  I am personally starting in my town of residence, giving a 12 minute session on cryptographic and virtual currencies to a non technical audience. These are people I see every day on my way to the country club, school, gym etc. This is as up close and personal as I could start.  Consider this... 12 minutes on such a subject and skip the technical jargon. This is quite a challenge! But as one tiny, great fictional green alien once said..  Where to go from there After that 12 minute challenge I plan to speak on friendlier ground. At work towards colleagues...