Since you’re saying “pieces of software” and not specifically apps I will mention Node.js, the programming framework for javascript apps that run outside of a browser. You can develop websites and services or standalone apps that just run locally. There’s a whole universe of free packages people have created for it.
Create a function that goes into an infinite loop. Then test that function.