3 ms·
But who in their right mind would do the second one? Obviously you can make code both less efficient and less readable. But starting with code that a competent
by abritishguy 12y ago
But who in their right mind would do the second one?
Obviously you can make code both less efficient and less readable. But starting with code that a competent programmer has written, I find it seldom makes it more readable when you make it more efficient.
- michael_h 12y agoBut who in their right mind would do the second one? Oh abritishguy, I can assure you that the world is awash in such magical code snippets.
- abritishguy 12y ago> competent programmer
- autokad 12y agoi tend to agree. take dijkstra's algorith implemented with a fibonacci heap or something very simple like for i = 1 to 100 if x = this do that and something with i else something else with i easy to read, less efficient than: if x = this for i = 1 to 100 do that and something with i else for i = 1 to 100 do something else with i from my experience, compilers usually dont hoist very well edit: sorry, spaces didnt come out well
- mtdewcmu 12y ago>>But who in their right mind would do the second one? Surely you jest. I don't know who, but their handiwork is everywhere.
- pjc50 12y agoPeople using ORM can end up writing the second one without it being obvious.