#testDrivenDevelopment

Solo ingenieríasoloingenieria
2026-01-11

🧪 TDD es escribir pruebas antes del código para garantizar calidad desde el inicio. Aprende el ciclo Red-Green-Refactor y mejora tus proyectos. 💻

Lee más 👉 soloingenieria.org/ingenieria-

Solo ingenieríasoloingenieria
2026-01-11

El código que no se prueba es código esperando fallar. TDD te enseña a escribir pruebas primero y programar después. Menos errores, más confianza. 🧪

Kerrick Long (code)kerrick@ruby.social
2026-01-11

Getting the genie (as @kentbeck calls it) to perform #TDD (Test-Driven Development) is... interesting.

#TestDrivenDevelopment #Software #Programming #AutomatedTests #AI #LLM #AIAssistedDevelopment #VibeCoding #AugmentedCoding

Wait - I need the cancelled message to arrive BEFORE quitting. The message comes through the queue which Tea processes in its event loop. But once "q" is processed, the loop exits. Maybe I need more event loop iterations between "c" and "q".

Actually, looking at test

Not just the test. Shouldn't the _runtime_ forcibly stay open until all commands are finsihed?

Thought for 13s

You're right! When the runtime exits (Command.exit), it should wait for active commands to finish or cancel them. That's the shutdown behavior from the spec (Unit 4d).

Let me add it to make the test pass:

Analyzed @runtime.rb#L70-80

Or should you consider that to be a pre-requisite, stash your changes, implement just that with [@/tdd], then come back in and pop _just_ your test off the stash?

Thought for 3s


Yes, that's the proper TDD approach. My cancel test depends on shutdown behavior. I should:

1. Stash current changes
2. TDD shutdown (Unit 4d)
3. Pop just the cancel test back


~/…/ratatui_ruby-tea $ git stash push -m "WIP: cancel_command test + impl with debug" -- lib/ratatui_ruby/tea/runtime.rb test/test_runtime_custom_command.rb

Run command? [Reject] [Accept]
Jan Van Ryswyckjanvanryswyck
2026-01-08

Test-Driven Development and software design are two sides of the same coin. However, one doesn’t automatically lead to the other. We have to learn about what good design entails, while also learning and practicing Test-Driven Development in conjunction with each other.

2026-01-08

I've a bright, enthusiastic developer started on my team today. As well as in-person mentoring, what book would to recommend to get started with #TestDrivenDevelopment #TDD #programming ?

Jan Van Ryswyckjanvanryswyck
2026-01-06

These are ones that received their share for 2025:
- Elephant Haven
- De Zonnegloed
- Knaagje
- VOC Brasschaat
- Forrest and Friends
- Lwiro Primates Rehabilitation Center
- Ongehoord
- Dryade
- Sea Shepherd Belgium
- Sheldrick Wildlife Trust

(2/2)

Jan Van Ryswyckjanvanryswyck
2026-01-06

On the first day of the new year, I divide all the proceeds of my book to animal welfare organisations. When you buy a copy of my book, you’re not only learning about unit tests, you’re also providing a helping hand to these organisations. Thanks to everyone who purchased my book in 2025!
principal-it.eu/books.html

(1/2)

Level Up Your SharePoint Skills: SPFx Best Practices for Coders

784 words, 4 minutes read time.

The world of SharePoint development is constantly evolving, and mastering the skills required to build robust and scalable applications is crucial for any serious coder. With the rise of SPFx, it’s essential to stay up-to-date with best practices and patterns that can help take your skills to the next level.

Introduction

The SharePoint Framework (SPFx) has revolutionized the way developers build custom applications for Microsoft 365. With its powerful combination of web development, DevOps, and business intelligence capabilities, SPFx offers a unique opportunity for coders to create innovative solutions that can transform businesses. In this article, we’ll explore some essential best practices for SPFx developers, providing practical guidance on how to level up your skills and build high-quality applications.

Understanding the Power of Modularize

import { declareCustomElement } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';@declareCustomElement({name: 'MyWebPart',metadata: {description: {type: String,default: 'This is a custom web part'}}})export class MyWebPart extends BaseClientSideWebPart {render() {return Hello World!;}onInit() {this.properties.description = 'This is an updated description'; }}

Modularize is a powerful pattern in SPFx development that allows you to break down complex applications into smaller, reusable components. By doing so, you can improve maintainability, scalability, and overall quality of your codebase. In this article, we’ll explore the benefits of modularize and provide guidance on how to implement it effectively.

Using Dependency Injection for Loose Coupling

import { injectable } from 'tsyringe';@injectable()export class MyService {private logger: Logger;constructor(logger: Logger) {this.logger = logger;}public doSomething() {this.logger.log('Doing something');}}

Dependency injection is a design pattern that allows you to decouple components from each other, making it easier to test, maintain, and extend your codebase. In SPFx development, dependency injection is particularly useful when working with services and libraries that need to be injected into your web part or component. In this section, we’ll explore the benefits of using dependency injection in SPFx and provide guidance on how to implement it effectively.

Optimizing Performance with Caching

import { CacheManager } from 'sp-core-library';const cache = new CacheManager();cache.add('myKey', 'myValue');console.log(cache.get('myKey')); // Output: 'myValue'

Optimizing performance is crucial in any web application, and SPFx is no exception. One effective way to improve performance is by using caching mechanisms. In this section, we’ll explore the benefits of caching in SPFx and provide guidance on how to implement it
effectively.

Best Practices for Unit Testing

import { TestBed } from '@angular/core/testing';import { MyService } from './my.service';describe('MyService', () => {beforeEach(() => {TestBed.configureTestingModule({providers: [MyService]});});it('should do something', () => {const service = TestBed.get(MyService);expect(service.doSomething()).toBe(true);});});

Unit testing is an essential part of any software development workflow. In SPFx, unit testing allows you to ensure that your components and services are working as expected, reducing the risk of bugs and errors in your application. In this section, we’ll explore best practices for unit testing in SPFx and provide guidance on how to write effective tests.

Conclusion / Next Steps

In this article, we’ve explored essential best practices for SPFx developers, including modularize, dependency injection, caching, unit testing, and more. By following these guidelines, you’ll be able to build high-quality applications that are scalable, maintainable, and efficient.

Next steps include implementing the patterns and techniques discussed in this article. Start by identifying areas where you can apply modularize, then experiment with dependency injection and caching mechanisms. Finally, take some time to learn about unit testing best practices and apply them to your existing codebase. With dedication and persistence, you’ll become a master SPFx developer in no time.

Call to Action

If this post sparked your creativity, don’t just scroll past. Join the community of makers and tinkerers—people turning ideas into reality with 3D printing. Subscribe for more 3D printing guides and projects, drop a
comment
sharing what you’re printing, or reach out and tell me about your latest project. Let’s build together.

Sources

Disclaimer:

The views and opinions expressed in this post are solely those of the author. The information provided is based on personal research, experience, and understanding of the subject matter at the time of writing. Readers should consult relevant experts or authorities for specific guidance related to their unique situations.

Related Posts

#agileMethodology #bestPractices #businessIntelligence #caching #ClientSide #codingPatterns #collaborationPlatform #customApplication #dependencyInjection #devops #enterpriseSoftware #microsoft365 #modularize #performanceOptimization #serverSide #SharePoint #SharePointDevelopment #SharePointFramework #softwareDevelopment #SPFx #testDrivenDevelopment #unitTesting #WebDevelopment #webPart #workflow

Developer working on SPFx project
Miguel Afonso Caetanoremixtures@tldr.nettime.org
2025-12-22

"A computer can never be held accountable. That’s your job as the human in the loop.

Almost anyone can prompt an LLM to generate a thousand-line patch and submit it for code review. That’s no longer valuable. What’s valuable is contributing code that is proven to work.

Next time you submit a PR, make sure you’ve included your evidence that it works as it should."

simonwillison.net/2025/Dec/18/

#AI #GenerativeAI #AIAgents #SoftwareTesting #Programming #LLMs #CodingAgents #TestDrivenDevelopment

Jan Van Ryswyckjanvanryswyck
2025-10-30

On 4 𝐚𝐧𝐝 5 𝐃𝐞𝐜𝐞𝐦𝐛𝐞𝐫 2025, I’ll be hosting my workshop 𝐖𝐞𝐥𝐥-𝐁𝐚𝐥𝐚𝐧𝐜𝐞𝐝 𝐓𝐞𝐬𝐭-𝐃𝐫𝐢𝐯𝐞𝐧 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐦𝐞𝐧𝐭 at the 𝐁𝐫𝐚𝐢𝐧 𝐄𝐦𝐛𝐚𝐬𝐬𝐲 𝐢𝐧 𝐀𝐧𝐭𝐰𝐞𝐫𝐩.

⏰ The early bird discount expires this Friday, 31/10! So don’t wait if you want to master the art of writing loosely coupled and highly maintainable automated developer tests.

🔗 Secure your spot now: principal-it.eu/training/well-

Nacho Cougilicougil
2025-10-14

Here you've the slides I shared about at 👉
tiny.cc/how-john-tdd-javacro
And here you've the feedback form, in case you can help me (1min of your time) with some words about how I can improve 🙂 🗣️
tiny.cc/how-john-tdd-feedback

Nacho Cougilicougil
2025-10-14

Ey developer!
If, by any chance, you're at and are interested in listening to a history 🏛️ about how "somebody" started to practice/use and see an example with come today at ⏰ 3:55 to Hall B 😉

2025.javacro.hr/eng/Agenda#:~:

Domain-Driven Design Barcelonadddbcn
2025-10-08

Next Wednesday, October 15, starting at 18:45 we’re holding the "TDD & DDD From The Ground Up by @ChrisSimonAu at N26's office.

Check out more information and confirm your attendance at:
meetup.com/dddbcn/events/31144

TDD & DDD from the ground up
SoftwareArchitecture GatheringSAG_Conference
2025-10-02

🤖 How can we combine with without losing the human touch? @claresudbery shares insights from her workshop "How Can You Combine AI With Test Driven Development?" and her session "Let’s Stop Making Each Other Feel Stupid" on fostering learning, psychological safety, and human-centered practices in software development.💡

Read the full interview 👉 t1p.de/d9p1z

Interview: Higher-Level Principles: Clare Sudbery on Asking Simple Questions and Keeping Humans in the Loop
Jan Van Ryswyckjanvanryswyck
2025-09-30

Alternatively, with Test-Driven Development (TDD), software developers start by writing a small test then write just enough code to make it pass, and iterate — building quality into software from the get-go instead of after the fact. This approach aligns heavily with the shift-left testing philosophy where quality is built in, rather than inspected in later. (2/2)

Jan Van Ryswyckjanvanryswyck
2025-09-30

Software developers using traditional methods start out by first writing the code. Only when the work has already been completed do they shift their focus to testing. (1/2)

2025-09-28

Ok this is fun!

My #bzip2 implementation in #Rust is coming along nicely and I've been loosely following a #TestDrivenDevelopment approach which makes working with LLMs a breeze. If an AI assisted rework turns tests red you can immediately start debugging, tuning and optimizing, which is nice and focused.

I'm done with everything including the Move-To-Front Transform encoding and am already getting text file sizes down by 25 to 30%.

Next up: Huff huff huff!

Jan Van Ryswyckjanvanryswyck
2025-09-23

When naming tests, avoid using technical names of functions/classes. When we encorporate the name of a function into the descriptive name of a test method, and the respective function is later renamed, then the description of the test becomes completely useless. A better approach is to describe the behaviour of the production code under test. That way we can refactor more confidently without rendering the names of our tests as obsolete.

Jan Van Ryswyckjanvanryswyck
2025-09-11

Assertion libraries can be considered as mini-DSL’s that make automated tests more readable. When a team of devs make their choice, they usually judge on API preference. While it’s very important to have readable tests, the API should never be the deciding factor. What truly separates a good assertion library is the quality of its failure messages. The more actionable these messages, the faster you’ll diagnose the cause of failing tests.

Client Info

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