Development, Testing

TDD Quick tip: “What test should I choose next?”

When test-driving your code, you shift between red (write a failing test), green (write the code needed to make the test pass) & refactor (clean up). But how do you kickstart this loop? What heuristics can you use to guide selection of the next test you write? This article summarizes the most common heuristics and highlights the one I use predominantly:

Pick the test that forces you to add one (and only one) new facet.

Continue reading
Standard
Heuristics, Self-Improvement, Self-Learning, Testing

Legacy code retreat

Have you ever worked with code that literally brought tears to your eyes? Not in the good sense, mind you. I’m talking about code that is such a hassle to work with it makes you rethink some of your career choices. If that’s the case, a legacy code retreat might be just what you need to stop your fear of legacy code and instead start to appreciate the opportunities for improvement it provides. Legacy code can be a joy to work with, if you tackle it the right way.

Continue reading

Standard
Testing, Web Development

Creating cross-browser extensions with Crossrider

Last year I had the opportunity to work on the development of a browser extension for multiple browsers. As I wanted to minimize the amount of browser-specific code and wanted to avoid duplicating my extension for every browser, I used the Crossrider framework. This post provides an overview of my experiences with developing a cross-browser extension using the framework.

The requirements

The extension I had to create was meant to search through web pages as the user visited them and then add some extra functionality to certain keywords on the page. I won’t go into details here, but it’s something similar as Skype’s Click to Call, which does the same with phone numbers: Click to Call recognizes phone numbers and adds a button to the webpage to easily call this number through Skype:

Skype Click to Call in action - copyright www.skype.com

Skype Click to Call in action – copyright http://www.skype.com

Continue reading

Standard