Re:Commits are snapshots not diffs (2020)
by codyb on Thursday April 08, 2021 @02:33PM
(#26742139)
Regular expressions? I really enjoy using them and futzing around but I encourage the people I work with to stay away and to avoid using in production when possible.
[ Parent
| on HN ]
Re:Commits are snapshots not diffs (2020)
by turminal on Thursday April 08, 2021 @02:40PM
(#26742220)
Regular expressions are useful as tools for searching through code, filtering logs, searching through the filesystem..., even if you never commit them into your codebase.
Yes, good clarification. I probably write 10x (maybe 100x? more?) more throwaway regexes than regexes I commit.
Re:Commits are snapshots not diffs (2020)
by trulyme on Thursday April 08, 2021 @04:17PM
(#26743224)
Whoa, why? That sounds like an awful advice to me. By all means, use regexes, but make sure you understand the theory behind them (state machines) so you will know not to parse HTML with them. They are really pretty easy to do right once you grasp the concepts.