5 ms·
I would agree, but I think there's a common goal among programmers to come up with the most "clever" solution to a problem. It shouldn't be the focus, but it se
by tdavis 18y ago
I would agree, but I think there's a common goal among programmers to come up with the most "clever" solution to a problem. It shouldn't be the focus, but it seems a lot of the time when I see a 100-line function distilled down into 5 lines I have this overriding assumption that it's just... better. I've always known this is a faulty assumption and if I know the code will actually be used and needs to be fast I will test it, but there's this sort of sense of accomplishment that comes along with coming up with really elegant, albeit perhaps unreadable and less performant, solution to a problem.