The Daily WTF
A few months ago, Lee was reviewing a pull request from Eddie. Eddie was a self-appointed “rockstar” developer. Eddie might be a “junior” developer in job title, but they’re up on the latest, greatest, bestest practices, and if everyone would just get out of Eddie’s way, the software would get so much better.
Which is why the pull request Lee was looking at touched nearly every file. Every change was some variation of this:
– if (obj == null) + if (obj is null)
“Did… did you do a ‘Replace in Files’ on the entire solution?” Lee asked.
“Well, I had to use the regex find-and-replace,” Eddie said, “have you ever used that? It’s a great refactoring tool, you can get it with control-H, and then you have to check a box-“
“I know how it works,” Lee said. “Why?”
“Well, a regex, or a regular expression is a-“
To read the full article click on the 'post' link at the top.