Preventing a parser from turning into a (seemingly) god-sized object
So I have a program whose purpose is to take text files and parse them into a binary format that an embedded system understands. However, the text format I’ve inherited that I need to parse is sufficiently complex enough that after refactoring the main parse
routine I’m left with a class with more than 50 methods that almost all look something like parseChannel
, parseWCommand
, parseVCommand
, parsePCommand
, parseLoop
, parseHex
, parseInt
, etc. etc. etc.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
To load or not to load data for unit tests from external files
When unit testing I often find myself debating how much of the data I feed to, and expect back from my units under test, I should include in the actual test files.
Should I refactor large functions that mostly consist of one regex? [closed]
Closed 10 years ago.
Should I refactor large functions that mostly consist of one regex? [closed]
Closed 10 years ago.
Should I refactor large functions that mostly consist of one regex? [closed]
Closed 10 years ago.