Hacker News new | ask | show | jobs
by pif 1433 days ago
> I find regex easier to write than to read.

There is nothing new under the sun.

Joel, 22 years ago:

There’s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. [...] The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming: It’s harder to read code than to write it.

https://www.joelonsoftware.com/2000/04/06/things-you-should-...

3 comments

Joel is 100% spot on. This is exactly why I don’t think things like Copilot will catch on. Making programming involve less writing code and more reading code actually makes the job more difficult.
And the corollary: since code is harder to read than write, steer clear of writing clever code where simple code would suffice, as the clever code will be much harder to read.
A second argument is that debugging is harder than writing.
s/writing/reading
I say that because there's a meme that nobody writes regex and that everyone copy-paste it from stackoverflow.