Merl's Blog

Restart

“Have you tried turning it off and on again?”

These are the famous words spoken by anyone who has worked with electronics before.

So why would this logic not work in software?

I was in the process of adding new features and refactoring old code.

This was wonderful. Everything was going peachy, until I came across this one test.

See we had 2 navigation bars, the first was the real deal that had everything we needed. Search bar, menus, people updates, the works.

Then on another newer page we had a very simple version of that, with just the title.

As time went on the simpler version was getting the same features as the first one minus the search bar. Of course some of these buttons and features lead to you to different places.

So refactoring had to be done to replace the simpler bar with the first bar.

I came across a test that needed the simpler bar’s functionality, I made sure I rendered the navigation bar perfectly but the test was failing, thinking it was in the first page.

I tried all the many tricks I have learned throughout my time in Internal Dev. Finally I learned that I had to reset the DOM.

Seriously? It was working great with all the many other tests we had but for some reason I need to reset the DOM here.

OK. So there you go, sometimes you gotta just restart.

Best,

Merl