4 ms·
Let's assume that the debate was legitimate, doesn't that still put us one "replace all" away from fixing the problem? I don't understand how these guys were "
by phaus 13y ago
Let's assume that the debate was legitimate, doesn't that still put us one "replace all" away from fixing the problem?
I don't understand how these guys were "deadlocked" for weeks.
- gaius 13y agoBecause the spelling wasn't the root cause it was a symptom of a culture that had gone so badly wrong that people engaged in petty arguments just as a way to score points.
- bmelton 13y agoTo be fair, a search and replace for "dialog" would also match patterns like, y'know, "dialogue" too, at least in all the naive replace-all algos I've seen in IDEs. So, the traditional CTRL+F, or :%s/dialog/dialogue/g would have resulted in at least some instances of 'dialoguegue' as a result. Yeah, the obvious remedy there is :%s/guegue/gue/g, but that too could lead to unintended results, etc. Not that I don't agree with the intent of your statement, search and replace across 20k lines of code, over however many files, is likely a more involved process than it sounds like.
- nitrogen 13y agoMaybe some thing like s/dialog\([^u]|$\)/dialogue\1/g Or use variable renaming in an IDE that actually parses the code.
- Crito 13y agoTo match dialog but not dialogue in vim: dialog\> ...in other regex systems: dialog\b "dialog" as part of a variable name with underscores: :%s/dialog_/dialogue_/g "dialog" as part of a variable name with CamelCase: :%s/\([dD]\)ialog\([A-Z][A-z]*\)/\1ialogue\2/g You don't need to capture every case in a single regex substitution, you can use a handful to cover pretty much every case though. This sort of change should not take more than a few minutes max of developer time. I don't have experience with them, but I imagine an IDE with refactoring support should make these sort of changes trivial.
- deleted 13y ago[deleted]
- arghbleargh 13y agoYou can always replace dialoguegue with dialogue again afterwards.
- nailer 13y agoOr use an AST and do a structural replace, rather than use text.