3 ms·
From Pony documentation: Simplicity Simplicity can be sacrificed for performance. It is more important for the interface to be simple than the implementation.
by jorgeleo 9y ago
From Pony documentation:
Simplicity
Simplicity can be sacrificed for performance. It is more important for the interface to be simple than the implementation. The faster the programmer can get stuff done, the better. It’s ok to make things a bit harder on the programmer to improve performance, but it’s more important to make things easier on the programmer than it is to make things easier on the language/runtime.
This is an excellent design decision. Yes, performance sometimes introduces complexity, and I have been in teams where the philosophy is: "It does not matter if it is slower, but any high schooler that knows HTML has to be able to understand it". The purpose of a program is to satisfy the users, not the developers or the managers, and if the next developer needs to study a thing or two before understanding the code that is OK.
Simplicity should be sacrificed for performance.
- hinkley 9y agoSimplicity should be sacrificed for performance. It doesn’t always have to be that way though. Several important classes of optimization lend themselves to simplifying code. For example, code that effectively makes the same decision three times is both slow and obscures the intent of the code. And there are ways to compartmentalize optimizations so that people working in the general vicinity don’t have to bother with the ‘clever’ code on a daily basis.
- jorgeleo 9y agoI don't see how it relates. The idea is if I have to choose between simplicity and performance, I shall choose performance. Your example does not make sense because you are not choosing simplicity over performance because the code was already performing slow. Compartmentalizing the code to hide the complexity behind a black box does not apply either because you are not making a complex code simpler, the one that has to maintain your black box is still exposed to the "clever" code.
- hinkley 9y agoBy compartmentalizing I mean in the realm of Single Responsibility at the level of a function. A block that scans a table for a match can be moved up and out and then replaced at your leisure with a version that is more sophisticated and faster and the people using it only have to look at it if there’s a bug. They don’t have to look at it then they don’t have to grumble about how it took 10 lines of comments to document four lines of code because you used some uncommonly known property of Logic or Set Theory to eliminate a bunch of duplicate work. And worst case they can revert the changes until they sort it out because it’s just one function with the same interface. (Also, they won’t fight you as much about the initial change because it’s easy to revert and self contained)
- stcredzero 9y agoThe purpose of a program is to satisfy the users, not the developers or the managers, and if the next developer needs to study a thing or two before understanding the code that is OK. Simplicity should be sacrificed for performance. This is self contradictory. Programmer resources need to be allocated to pleasing the users. To please users, you need a certain amount of performance. Performance is not simply and end in itself. Programmer resources can be used to please users in other ways.
- jorgeleo 9y agoI was keeping it PG-13
- stcredzero 9y agoHR is happy to know!