November 21

Talking about .NET Testing using NCrunch on the Azure & DevOps Podcast

Have you heard of the Azure & DevOps Podcast?

No? Well let me tell you about it. The Azure & DevOps Podcast is hosted by Jeffrey Palermo of Clear Measure. The stated intent of the podcast is to help you ship software more quickly and more reliably.

Jeffrey was kind enough to have me on his podcast to talk about ".NET Testing using NCrunch". If you'll recall, I put together a lightning talk, Supercharge Your .NET Testing with NCrunch, earlier this year over NCrunch. I like NCrunch and you should too. It will help decrease the amount of time you spend in the write code, execute unit tests, and refactor loop. With AI intruding into the development process and a solid testing strategy, it will help you decrease the amount of time spent to evaluate whether or not changes made by various AI agents is indeed correct.

Anyway, if you'd like to know more, check out the podcast!

Category: .NET, C#, Talks, Tools | Comments Off on Talking about .NET Testing using NCrunch on the Azure & DevOps Podcast
September 8

Any Advice for a Newcomer to the IT World in Houston These Days?

Sorry this post is late Bryan. I made a promise, and here's the follow through.

From Bryan on LinkedIn:

Any advice for a newcomer to the IT world in Houston these days?

There are many different ways to do it, but you asked me and here's how I'd do it if I was starting from scratch:

  1. Attend user group meetings that appeal to you. Match tech stacks or look out for meetings with topics of interest to you.
  2. Attend user group meetings IN-PERSON. Remember, you are trying to build a network. It's alot easier to do that in person than to do that over Teams/Zoom/Slack/WebEx or whatever your favorite video conferencing software is. Most of these user groups will feed you pizza just for showing up! Networking + Learning + Pizza == Good.
  3. Connect with people on LinkedIn. Most speakers will actually give you contact information at the end of their talk.
  4. Talk to the speakers. They are there to talk, so unless they are busy getting setup talk to them. They are going to be public speaking and if they are nervous, some conversation might help them loosen up.
  5. Talk to the organizers. They are some of the most plugged in people in the area. They are also looking to promote the user group, so they'll definitely be up for talking.
  6. Talk to other attendees. Some may be social and others might be shy. Don't be too pushy, but be welcoming.
  7. Show up alittle earlier to the event and talk to people.
  8. Hang out alittle bit after the event and talk to people.

You're pretty heavy on the user groups.

Well yeah, you want to meet people and get plugged in, right?

I can't find any topics that interest me, what do I do now?

User groups are always looking for speakers. Come up with a talk of your own to give at your favorite user group(s). If you can't give a 1-2 hour talk right off the bat, ask the user group organizer if/when they are doing lightning talks. These are shorter and more to the point talks over a more specific topic.

Ok, that's great, but who should I meet in the Houston area?

Here they are in no particular order except for the first one, but I'm biased:

  1. Me
  2. Devlin Liles (Improving)
  3. Claudio Lassala (Improving)
  4. Daniel Scheufler (Improving)
  5. Aaron Stannard (Petabridge)
  6. Jon Badgett
  7. Ahmed Hammad (Improving)
  8. Michael Slater (Improving)
  9. Adam Hems (3Cloud)

If you are reading this and want to be included on this list, let me know and I'll add you to the cool kids list.

What user groups/meet ups does the Code Gorilla go to regularly?

  1. Houston .NET User Group (HDNUG)
  2. North Houston .NET User Group (NHDNUG)
  3. Houston Azure User Group (HAUG)

I'm not seeing any user groups that interest me, now what?

Go to meetup.com, do some googling/binging, or talk to your favorite ChatGPT like LLM and see what they say.

If you want to get plugged in to the tech community, you've got to get out there and meet people.

Now that you've begun developing your network, you may want to get a job. You can spend your day just blindly applying to companies and see where that gets you, or you can leverage your network to help find jobs. Be sure to ask questions like the following:

Do you know anyone who might be looking for someone with my skill set?

This question doesn't put the person on the spot because you are not asking them for a job directly. If you are building a good network, this can help you gain some traction out there on the job hunt. Remember, it's alot easier to get hired when someone is pulling you from the employer side.

That's what I've got. Did I miss anything? Let me know!

August 10

New Talks Page!

If you've come to my blog looking for PowerPoint decks for any of the talks I've given in the past, you can find them over on the Talks page. There is also a video or two over there if you'd like to see me in action.

If you have any suggestions for talks I should give in the future, let me know!

Category: Podcasts, Talks | Comments Off on New Talks Page!
July 26

Combined Paging

The CodeGorilla combines widgets created in code and widgets loaded from a database and then pages the results.

What am I doing?

I came across an interesting requirement the other day. I'm sure we're all familiar with paging. Usually you use it with a database with a large amount of rows in a result set. The code to do that with LINQ is pretty straightforward. In this particular case we are working with widgets.

var offset = (page - 1) * pageSize;
var results = await dbContext.Widgets.Skip(offset).Take(pageSize).ToArrayAsync();

As you can see, there are 2 variables/parameters.

Name Description
page specifies the requested page of results to return (it's also 1-based in this case)
pageSize specifies the maximum number of widgets to return for each page
  • Since we are using the skip/take approach to paging, I'll calculate the offset (the number of widgets to skip over to get to the first widget in the requested page).
  • Once the offset is calculated, run the query and .Skip() and .Take() my way to return the page of widgets I need.

That's pretty clear to do, but what happens when I need to combine 2 sources of Widgets in a paged result set?

The Requirements

Static Widgets Retrieval

  • Retrieve the static widgets for the requested page using a black-box method (GetStaticWidgets).
  • The static items should be paged according to the current page and page size.

    Database Widgets Retrieval

  • Retrieve the database widgets for the requested page using a black-box method (GetDbWidgets).
  • The database widgets should be paged according to the current page and page size, but only after static widgets are considered.

    Paging Logic

  • If static widgets are available for the requested page, fill the page with as many static widgets as possible.
  • If the number of static widgets is less than the page size, fill the remainder of the page with database widgets.
  • If there are no static widgets for the requested page, fill the page entirely with database widgets.
  • If the requested page exceeds the total number of available widgets, return an empty result.

    Result Construction

  • The result must be a concatenation of the static widgets (if any) and the database widgets (if any) for the requested page.
  • The order of widgets must be preserved: static widgets first, then database widgets.

The Code

    public void CombinedPaging_ReturnsExpectedItems(int page = 1, int pageSize = 5, int staticItemCount = 5, int dbItemCount = 5, string[]? expected = null)
    {
        // Calculate the offset for the requested page
        var requestedOffset = (page - 1) * pageSize;
        var dbOffset = requestedOffset;
        var dbTake = pageSize;

        // Get all static widgets (static items)
        var staticWidgets = GetStaticWidgets(staticItemCount);
        var staticWidgetsCount = staticWidgets.Length;
        // Page the static widgets for the current page
        staticWidgets = staticWidgets.Skip(requestedOffset).Take(pageSize).ToArray();

        // If there are any static widgets, determine how many db widgets to fetch
        if (staticWidgetsCount > 0)
        {
            // Calculate the offset for db widgets, accounting for static widgets
            dbOffset = int.Max(0, requestedOffset - staticWidgetsCount);
            if (requestedOffset < staticWidgetsCount)
            {
                // If static widgets fill part of the page, only take the remainder from db
                dbTake = int.Max(0, pageSize - staticWidgets.Length);
            }
            else
            {
                // If static widgets are exhausted, take a full page from db
                staticWidgets = [];
                dbTake = pageSize;
            }
        }

        // Get the db widgets for the calculated offset and take
        var dbItems = GetDbWidgets(dbItemCount, dbOffset, dbTake);

        // Combine static and db widgets for the final result (static first, then db)
        var actual = staticWidgets.Concat(dbItems);

        // Assert that the actual result matches the expected result
        actual.ShouldBe(expected);
    }

The Repository

...and that's how it got done (basically). If you'd like to get a copy of this code, you can get it from my GitHub Repository.

Why would you do this?

For starters, it's what was asked for in the work item. Second, when I was getting started in developing software that used databases, best practice was that you pull back only what you need. No more, no less. That's what this code does. The code that generates the static widgets is going to execute everytime this code is run because the number of static widgets determines the number of widgets I need to pull from the databse.

Anyway, nothing earth-shattering, but I found it an interesting bit of code to write and I hope you did too. If you have any questions or comments, please let me know!

The CodeGorilla combines widgets created in code and widgets loaded from a database and then pages the results. He's smiling for Garo.

Category: .NET, C#, LINQ | Comments Off on Combined Paging
July 2

Lines, Lies, and Logic: Making Sense of Code Metrics – The Slide Deck

If you were able to make it out to the North Houston .NET User Group meeting on June 19th, thank you for coming. I thought the talk was well received and the information provided was very therapeutic for everyone there.

If you'd like to check out a copy of the slide deck I put together, you can get it by clicking on the image below.

undefined

If you have any suggestions or ideas about what I should talk about next, please let me know.

Category: .NET | Comments Off on Lines, Lies, and Logic: Making Sense of Code Metrics – The Slide Deck
June 12

I’m Speaking at the North Houston .NET User Group on June 19th!

Excited to announce that I will be speaking at the North Houston .NET User Group on Thursday, June 19, 2025. You are invited to attend!

Lines, Lies, and Logic: Making Sense of Code Metrics

Code metrics: we’ve seen them in dashboards, status reports, and maybe even used them to win an argument or two. But what do they actually mean—and are they even helpful?

In this light-hearted but informative session, we’ll take a look at a whole grab bag of code metrics, including (but not limited to) Cyclomatic Complexity, Code Coverage %, Maintainability Index, Code Churn, Coupling, Cohesion, and everyone's favorite: Lines. Of. Code.

You’ll learn:

  • What these metrics can tell you about your code
  • What they absolutely cannot
  • How to avoid weaponizing them (intentionally or otherwise)
  • When it's okay to say, “Yeah, this number means nothing.”

We’ll bust some myths, share some laughs, and maybe have a little audience participation along the way. If you've ever looked at a sonar report and felt a mix of confusion, curiosity, and existential dread—this talk is for you.

Bring your questions, your skepticism, and your metric horror stories. You’ll leave with a clearer sense of how to use metrics without losing your mind—or your team's trust.

For more details, check out: https://www.meetup.com/nhdnug/events/307786506

Additionally, I will be sharing the most recent version of my resume for those interested in hiring a software engineer/architect. See you there!

Category: Uncategorized | Comments Off on I’m Speaking at the North Houston .NET User Group on June 19th!
April 17

Microsoft Certified: Azure Data Scientist Associate

Azure Data Scientist Associate badge

Yessir, you read that right. I acquired the Azure Data Scientist Associate certification the other day. A little later than I was hoping for, but I got it done. If I have to blame anything or anybody, I'll blame the CGI-BJSS acquisition and all the stress and uncertainty that has brought.

In other news, did anybody notice that Microsoft has retired the Azure Data Engineer Associate certification as of March 30, 2025? Bummer. I liked that one. Glad I renewed it back in January of 2025 so I won't put that into the retirement bucket until it is expired next January.

Allright...on to the next thing...

Category: Azure, Certifications | Comments Off on Microsoft Certified: Azure Data Scientist Associate
March 26

Seeking Input for My Upcoming Talk on Code Metrics

Howdy!

I'm preparing a talk on code metrics and would love input from the community on what to cover. I'll be presenting this later this year at both the Houston .NET User Group and the North Houston .NET User Group.

Throughout my software engineering career, I’ve encountered many of these metrics, but I’ve rarely seen a single, clear explanation of them all in one place. My goal with this talk is to demystify code metrics—helping software engineers, architects, and engineering managers understand what these metrics are, what insights they provide, and their limitations.

Right now, I’m planning to cover the following metrics:

  • Code Coverage %

  • Cyclomatic Complexity

  • Maintainability Index

  • Lines of Code (LOC)

  • Code Churn

  • Afferent & Efferent Coupling

  • Instability

  • Coupling Between Objects

  • Depth of Inheritance Tree (DIT)

  • Lack of Cohesion in Methods (LCOM)

  • Tight Class Cohesion / Loose Class Cohesion

  • Response for a Class (RFC)

  • Duplication Percentage

  • Defect Density

This is probably more than I can fit into an hour, so I’d love your input:
✅ Which of these metrics should I prioritize?
✅ Are there any important metrics I’ve overlooked?
✅ Have you found specific metrics useful or misleading in your work?

If there’s enough interest, I could explore a deeper dive or a follow-up session on specific metrics. Let me know what you think!

Category: .NET | Comments Off on Seeking Input for My Upcoming Talk on Code Metrics
March 22

Supercharge Your .NET Testing with NCrunch – The Slide Deck

On Thursday, March 20, 2025, I gave a lightning talk at the North Houston .NET User Group meeting in The Woodlands, Texas. If you are interested in the slide deck I put together here's the PowerPoint presentation; Supercharge Your .NET Testing with NCrunch.

The slide deck doesn't really have anything earth shattering. I used it mostly as a guide for what I wanted to cover.

I felt the talk went well. I was hoping for alot of audience participation which I got. Turns out there are a few people who have used NCrunch who were there. It was a good opportunity to compare notes.

TLDR; NCrunch is awesome and you should use it.

If there are any additional questions, let me know and I'll get them answered.

Category: .NET, Tools, unit testing | Comments Off on Supercharge Your .NET Testing with NCrunch – The Slide Deck
March 14

Speaking at the March 2025 North Houston .NET User Group

At the upcoming North Houston .NET User Group meeting (3/20/2025), Tony Cardella, Software Engineer and Software Engineering Capability Lead at BJSS, will be delivering a lightning talk on the topic of NCrunch.

Title: Supercharge Your .NET Testing with NCrunch

Tired of waiting for tests to run? NCrunch is a powerful continuous testing tool for .NET that runs your tests in the background, providing instant feedback, real-time code coverage, and parallel execution to speed up development. In this lightning talk, we’ll explore how NCrunch works, highlight its key features, and see it in action with a quick demo.

More information is available here: https://www.meetup.com/nhdnug/events/305901663/

Hope to see you there!

Category: .NET, BJSS, C#, Tools, unit testing | Comments Off on Speaking at the March 2025 North Houston .NET User Group