Mal eine Frage in die Gemeinschaft.
Vor längerer Zeit hatte ich Mal eine Anleitung wie man in ein #Debian stable einbaut das manche (nicht alles) Pakete aus dem #Testing oder #unstable installiert werden. Mit allen Risiken ich weiß.
Leider finde ich die nicht mehr.
Hat hier jemand einen Tipp 🤔
Means I can type in the comments to replies and they should federate back over to the original thread. Before, WordPress really couldn’t act as a discussion federator; I made it easy on myself by just federating my comment URLs via webmention to wherever they needed to go manually (copy comment, paste into other website text box, submit.) Or at the very best, use my Mastodon or MicroBlog account to respond. Hopefully this makes replying back to others easier now; although I still don’t know about Webmention support or how it works in syndication…
Andy is a huge proponent of test-driven development and explains why – including types of code testing including unit tests and integration tests, when you actually need to run tests, how long they should take, and more.
Why should you unit test? What should you unit test? And how much?
Today's blog post answers these questions and provides some helpful guidelines.
The post is actually a lightly edited extract of a book on unit testing that I started about 10 years ago but never finished. Still, it has aged reasonably well.
The other day my kid asks me to present math problems about area. Early middle school: simple multiplications and divisions. He got taught a formula for areas of trapezoids: A = 1/2h * (b1 + b2).
I decided to show him how to #unittest his #math solution, by giving him a different approach: A = a + 2b, where a = area of the square, and b = area of each triangle on the sides of that square.
He threw a fit and refused to accept my approach, because it wasn’t the same as he had learned.
Educators should avoid making belief that the approach they teach is the only possible one.
You cannot verify your approach by repeating it. That only tests whether it leads to the same outcome, but doesn’t verify. Instead, you need to find a different way to get to the same conclusion, and then compare.
🌐 Ever wished you could share your localhost web app with the world? With #VisualStudio Dev Tunnels, now you can! Check out my latest video to see how:
I think that testable code is reusable code. When you test a function, you run the code in another context than it was built for (the production code). If your code is not reusable you will feel that pain in your tests.
This blog post gives an example of how getting side effects out of functions make them both easier to test and reuse.