Quick Tip : Learn by Testing

I have already talked about what to looking for when learning a new programming language. One of the points I brought there was “How do I test my code. Unit testing libraries are available in near every major programming language and are an important tool in the belt!

One way to use unit testing libraries effectively is to use them to give yourself a safe playground for learning other libraries or features of the language.

Say you’re working in the .NET space, and you are trying to learn AutoMapper. One of the easiest ways to try out that library is to spin up a simple unit test project, and test your way into understanding the new framework. Start with simple examples from the docs and assert the values you expect. Try out different functions! Be thorough, and try it all out in the safety of a unit testing project that will not negatively impact your current work.

This has a handy benefit of getting you muscle memory using the library as well.

You can do this for learning programming languages as well. Getting unit tests up and running is a great step in learning a new language, and can be inserted right after the ‘hello world’ step!

Even if you are not a TDD fan, consider starting from scratch with unit testing. Happy coding!

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s