joachim, to random
@joachim@drupal.community avatar

I love it when a test fails. It means the test has caught a bug that I hadn't spotted, before I accidentally released it. It means the test is doing its job.

opdavies, to drupal
@opdavies@mastodon.social avatar

Making the easy change to get a test to pass might mean you write more logic in your tests than you expect, at least to begin with.

https://www.oliverdavies.uk/archive/2024/02/16/keep-logic-within-tests-for-as-long-as-you-can

schizanon, to programming

"write tests first" is the "eat more vegetables" of programming

LaurentFr, to random French
@LaurentFr@piaille.fr avatar

J'ai commencé "The Ray Tracer Challenge", c'est un livre expliquant pas à pas comment écrire un moteur de #raytracing.
Le livre permet d'implémenter le programme dans le langage que l'on veut, c'est du #testdrivendevelopment avec les tests permettant de valider les différentes fonctions , ainsi que quelques algorithmes en pseudo-code.
A la fin de chaque chapitre il y a un petit programme supplémentaire à écrire mettant en application ce que l'on vient de coder.

Un exemple du contenu du livre avec une série de tests sur l'implémentation du calcul sur les couleurs

hrefna, to random
@hrefna@hachyderm.io avatar

One of the advantages of is that it encourages you to not implement "cruft."

What do I mean by that?

There are often multiple ways to implement an algorithm and it is always very tempting to do things "because they make sense." Perhaps they even do make sense in the abstract, or because they fit some set of future goals for your project, or whatever.

So your methods accumulate conditionals, everything gets a config, etc.

Testing actively discourages this behavior

1/

hrefna, to random
@hrefna@hachyderm.io avatar

My general view on is that it encourages several things:

  1. "Mockist" software testing approaches where every system is in isolation from others.

  2. Strong interfaces between components, fitting with the mockist approach.

  3. A high degree of dependency injection, passing in objects that you are going to work with.

  4. Minimizing cyclomatic complexity.

These are often desirable, which is why TDD works well for a "design mindset" for many people.

dboehmer, to programming

Test Driven Development sometimes is a huge disappointment to me:

I was writing the test first, and then got really surprised that the new method can’t be called because it’s kinda not implemented. How can that be?! 😠

Oh, I see … 🤡

@Perl #testdrivendevelopment #tdd #programming #unittest

janriemer, to rust

The feeling when you bang your head against the wall for 3 hours and then just try something, but don't really believe in it and suddenly all your unit tests pass! 🎉 :awesome:

This is the beauty of #TestDrivenDevelopment - you can just try and guess until it works.😄 It's such a funny experience!

#Rust #RustLang #Struggle #TDD #Transpiler #Compiler #selecuery #Happy

My editor showing the content of the previously mentioned test that is now passing. The most important data that is tested (needs to be transpiled) looks like an SQL statement (but it is not SQL, rather a weird dialect) with a join clause that consists of complicated parentheses and logical operators like "&&" and "||".

nekohayo, to GNOME
@nekohayo@mastodon.social avatar

Want a nice and reliable #calendar application for #GNOME and #Linux desktops (& #mobile!) in general, based on the @EvolutionGnome data server?

Know some #C #programming and looking for a well-scoped challenge to get your feet wet and put those skills to use in #opensource?

#GNOMECalendar could really use your help to write unit tests, so that we can use #TestDrivenDevelopment #TDD #CI for #refactoring all timezones-related code and make it reliable. Now is the time!
https://fortintam.com/blog/call-for-help-writing-gnome-calendar-compliance-unit-tests/

hamatti, to python
@hamatti@mastodon.world avatar

Since it's almost 100 days till , I took on a new puzzle shared by a friend.

How to combine multiple overlapping strings with each other?

I took and started solving it with while writing a blog post about the progress.

It works but it's not optimized so it only solves the more complex inputs if you have unlimited time and resources.

I figured the progress is the most interesting part so I published it.

https://hamatti.org/posts/compressing-overlapping-strings-in-python/

alephoto85, to golang Italian
@alephoto85@livellosegreto.it avatar

[Tutorial] Learn Go with Tests

@programmazione

Traducendo "Guile Hacker Handbook" ho scoperto l'esistenza di questo libro.

È appunto un manuale sul linguaggio Go basato sul Test Driven Development (TDD).

Non ho ancora avuto modo di iniziarlo ma, come confermato anche dall'autore, è adatto anche a principianti con conoscenze di base (variabili, cicli, funzioni ecc.)

Buona lettura 😉

https://quii.gitbook.io/learn-go-with-tests/

dostalcody, to Java

If anyone knows anyone looking for a job, with 3 years experience in C#, , , or similar languages, 2 years in tools like , and 1 year in pipelines, hit me up! I’m hiring for two positions, hybrid roles at APG, MD. They must be SECRET clearance eligible, if not cleared already.

Also looking for 3 100% On sure as well, if you know someone :)

Jaffa, to random

Wise words from the introduction & conclusion to my dad's #training material when he was learning to be a #software #developer in the early 1980s.

"Will any of this get any better? Probably not."

Jaffa,

There's a pattern of Not Invented Here Syndrome when people put a catchy name on things.

But these fundamentals lead directly to #TDD etc.

"The test design should be made at the same time as the design decision."

#NIH #TestDrivenDevelopment #Software #Development

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines