News for hackers. Stuff that matters.
Re:Learn RegEx step by step, from zero to advanced by umvi on Wednesday November 17, 2021 @09:25AM (#29253366)
If you are a solo dev, you do you, but if you are working in a team and you are building huge regexes with back references and other bells and whistles... I would guess it's not very readable for your teammates. At least for me, when I look at such a regex I have to stare at it for minutes before grokking it.
Re:Learn RegEx step by step, from zero to advanced by otoburb on Wednesday November 17, 2021 @09:44AM (#29253668)
I wonder if there's a metric for code reviews measuring mean-time-to-grok (MTTG).
Re:Learn RegEx step by step, from zero to advanced by marginalia_nu on Wednesday November 17, 2021 @12:39PM (#29256140)
Regexps are fairly terse and replace a lot of code, compared to most languages they probably have an information density at somewhere between 10x-100x higher (i.e. it's not rare to replace 100 lines of code with 1 regex), so I think it's fair to expect it take longer to unpack their meaning.
Re:Learn RegEx step by step, from zero to advanced by burnished on Wednesday November 17, 2021 @12:48PM (#29256296)
Wold that be a reasonable time to ping that coworker and ask them "what does this do?". Not because you can't figure it out, but because they already know?