Arjun typed back, slowly. "The tests didn't have a number with two commas. Don't be sorry. Learn this: never trust a diff you can't see with your own two eyes."
He stared at them side-by-side in Notepad++. The default white backgrounds glared back at him. He scrolled. Then scrolled again. His eyes blurred. The differences were invisible—a changed quantifier here, a removed escape character there. It was like looking for a typo in a phone book. notepad compare plugin
The two panes suddenly flushed with color. A river of green appeared down the left margin—lines that were added. A vein of red on the right—lines that were deleted. And in the middle, a shocking yellow block where the two diverged. Arjun typed back, slowly
His heart stopped. He knew that symbol. In regex, the ? made the quantifier non-greedy. It told the engine to match as few times as possible. In a validation function for currency, that meant it would stop after the first comma group. 1,000,000 would become 1,000 . A million dollars transformed into a thousand. Learn this: never trust a diff you can't
Arjun typed back, slowly. "The tests didn't have a number with two commas. Don't be sorry. Learn this: never trust a diff you can't see with your own two eyes."
He stared at them side-by-side in Notepad++. The default white backgrounds glared back at him. He scrolled. Then scrolled again. His eyes blurred. The differences were invisible—a changed quantifier here, a removed escape character there. It was like looking for a typo in a phone book.
The two panes suddenly flushed with color. A river of green appeared down the left margin—lines that were added. A vein of red on the right—lines that were deleted. And in the middle, a shocking yellow block where the two diverged.
His heart stopped. He knew that symbol. In regex, the ? made the quantifier non-greedy. It told the engine to match as few times as possible. In a validation function for currency, that meant it would stop after the first comma group. 1,000,000 would become 1,000 . A million dollars transformed into a thousand.