Darren J. McLeod

Independent Consultant with expertise designing, developing, and deploying innovative technology solutions at scale using C# and VB.NET. Hands-on Coder & Technology Evangelist focused on determining key client needs, defining product specifications, and delivering high-quality applications that solve critical business problems.

2025-06-13

If your test is failing when nothing is wrong then make it top priority to fix it, or delete it. No test > not working test. These tests will make you no longer trust your test results and they will lose value. You need good dependable tests to be the support beams of your application.

When you delete a test that is not working you have to make sure that there is still some test that covers the code. You can do this with a code coverage tool or do what's called the Poor man's code coverage. Break the code and see what tests failed.

Charlie Chaplin in his hobo character with a cute dog
2025-06-12

What are good tests? Good tests are ones that fail only when there is something really wrong. Like the logic was altered unintentionally by some change. Good tests don't depend on data that might change. Good tests happen when you have complete control of all the inputs.

2025-06-10

and that good tests are in fact "real" code and they do deliver immense value. I began to see tests as "support beams" for the application that prevent it from collapsing.

Darren J. McLeod boosted:
2025-06-07

Anyone here know enough about UI design to point me towards good scientific studies on effective design of web forms? bonus points if it talks about accessibility too. I'm currently working in a volunteer team designing a thing and there's mild dispute about how best to achieve what we want, so I'd like to defer to science if possible.
:boost_requested:
#UX #UI #WebAccessibility

2025-06-05

For a long time, when I first started writing tests, I felt so unproductive writing tests. I would try to write the test as fast as possible so I could move on to the "real" code.

Then one day when a production deployment failed due to missing a simple test I realized the critical value of tests... darrenmcleod.com/2025/06/test-

#SoftwareDevelopment #TDD #UnitTesting

Darren J. McLeod boosted:
2025-06-05

Just found this piece on code styles, from the perspective of human cognitive capabilities and tendencies. This is something I've previously thought a lot about, and even given a short talk about! I've not had time to read it all yet, but from what I've read it seems very well grounded and thorough:

optimal-codestyle.github.io/

#Programming #SoftwareDevelopment #CodingStyle #Cognition

Darren J. McLeod boosted:
Leszek Ciesielskiskolima@hachyderm.io
2025-06-03

So #github #dependabot stopped updating #dotnet dependencies completely (in most scenarios).

Snooping around, it seems like the old "legacy" updater has been made default - the new experimental one was the default for roughly a year by now. One option is to opt in explicitly to the experimental updater: github.com/dependabot/dependab

The other option I guess is waiting for @brettfo changes to get finally merged and then graduated from experimental to default github.com/dependabot/dependab

Darren J. McLeod boosted:
Jimmy EngstrΓΆm :verified:engstromjimmy@dotnet.social
2025-05-27

😱 Is Visual Studio falling behind VS Code?
We met up with Mads Kristensen at Microsoft Build to talk about this πŸ‘€

πŸ“Ί Full video: youtu.be/9vICi8naVBs
#MSBuild #dotnet #VisualStudio #VSCode #AI #CodingAfterWork

Darren J. McLeod boosted:
2025-05-26

wow, wrapping my head around effectively using em and rem units in CSS was a challenge, but I think I got it now.

the main reason for doing this is that if your user sets a different font size in their browser, you want to respect that in your site. and, since the text can be larger or smaller, eveything around it should be able to adapt to that change as well, so it doesn't look out of proportion.

you should use em when the font-size of the parent element is relevant to the property you are setting (such as padding around an h2), and rem when it is not (such as the width of an image).

you should also use rem for media queries, because the proportions of the page will be different if the user changes their browser's font size, so using fixed (px) min- and max-width will not respond to the larger or smaller proportions of the page.

ideally, you should never use px in CSS except in hacky corner cases.

#webDev #webDesign

2025-05-20

@kingconsult missing option smartphone : default webclient in the browser. I tried smartphone : standard app a while ago but didn't like it. Web client is good enough for my needs so haven't bothered to try anything else.

Darren J. McLeod boosted:
Ruth Malan β€” SystemsRuthMalan
2025-05-20

β€œ4. Due to the explosion of demand caused by vibe coding, most organisations will end up needing more software engineers.”

β€” Simon Wardley

linkedin.com/posts/simonwardle

Text of the linked post to avoid the big linkedIn blue blob
Darren J. McLeod boosted:
2025-05-19

The cool thing about writing code is that the computer is doing exactly what you tell it to do.

The cool thing about debugging code is slowly learning what you actually told the computer to do.

Darren J. McLeod boosted:
N-gated Hacker Newsngate
2025-05-17

πŸš€ Wow! Another breakthrough in software development: just move your "ifs" to the top! 🀯 Who knew that rearranging code could solve world hunger? πŸ₯‡ Next up: how to defy gravity by walking upside down! πŸ™ƒ
matklad.github.io/2023/11/15/p

2025-05-10

@dk @scottjenson I've seen this as well.

Darren J. McLeod boosted:
Oleg Kyrylchuk :verified:okyrylchuk@dotnet.social
2025-05-08

C# 14 in the preview allows the null conditional member access operator on the left-hand side of an assignment.

Previously, you had to check if the customer was null before assigning the order.

In C# 14, the GetCurrentOrder method is not called if the customer is null.

---
Level up your .NET skills β€” join 2,960 engineers reading .NET Pulse!

Subscribe: go.okyrylchuk.dev/z7gddz

#dotnet

Darren J. McLeod boosted:
Saji Weerasinghamsajilicious@hachyderm.io
2025-05-04

You can finally do validation with minimal APIs #dotnet #minimalapi #aspnet

youtu.be/U9vOng47a4Y?si=w4NdHH

Darren J. McLeod boosted:
Oleg Kyrylchuk :verified:okyrylchuk@dotnet.social
2025-04-30

Since .NET 5, ASP NET Core has built-in support for the Swashbuckle project (Swagger).

ASP NET Core 9 removes Swashbuckle from the template.

However, the .NET team added support for OpenAPI document generation.

The AddOpenApi method registers the required dependencies.
The MapOpenApi method registers OpenAPI endpoints.

---
Level up your .NET skills β€” join 2,940 engineers reading .NET Pulse!

Subscribe: go.okyrylchuk.dev/z7gddz

#dotnet

Darren J. McLeod boosted:
TechKeysXTechKeysX
2025-04-27
Darren J. McLeod boosted:
samir, a distributed systemsamir@functional.computer
2025-04-18

Thinking of running an object callisthenics workshop at work at some point.

In case you’re unfamiliar, this seems like a decent explanation: williamdurand.fr/2013/06/03/ob

(Sadly, the original article has vanished from the net.)

I think I will add a new rule, though: no logic in constructors. We have factories (or static factory methods) for that. Logic in constructors breaks dependency injection and leads to monstrosities such as Spring.

Thoughts and objections are welcome.

Darren J. McLeod boosted:
Green Webpagegreenwebpage
2025-04-16

This guide will help you install Visual Studio Code in Ubuntu 24.04 by choosing an option that best fits your needs.

Read more:πŸ‘‡
greenwebpage.com/community/how

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst