Last active
August 29, 2015 14:04
Revisions
-
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,12 +16,12 @@ I got my first wind of developer efficiency when I switched from writing my Open It was a huge breath of fresh air when I realized I could be writing C++ instead of C, encapsulating resources as objects and moving my teardown logic into destructors, so that I no longer had to play the `goto error` game. Unfortunately, the switch to C++ ruined my 37-line function for reading files, because the `__FILE__` constant in C++ is not an absolute path. A small price to pay: back to string literals! Then I found out just how easy it was to embed V8 and start using that C++ code directly from JavaScript, thanks to `node-gyp`, and that was when I felt the first twinges of a productivity that mocked all my previous toils. In conclusion, it was Benjamin Franklin who said > Those who would give up essential Productivity, to purchase a little bit of Perfection—those folks got way too much time on their hands. But perhaps it was Lil Jon who put it best: > Turn down for what? -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ With that value structure in mind, I think we can say it better than Don Knuth: The spoils of early productivity are so profound, not only because it makes programming fun and satisfying, but also because you can throw everything away and start over from scratch, once you're convinced that's the right thing to do, and you still come out ahead of the perfectionists. Concretely, if I can leave you with just one tip for early productivity, it is that *you should always (always) take the opportunity to switch from a programming language that leaves obstacles in your way to one that gets out of it*. The Raspberry Pi userland libraries are all written in C, and for a long time I thought I was stuck with it, unless I wanted to reimplement all that low-level machinery myself. -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ With that value structure in mind, I think we can say it better than Don Knuth: The spoils of early productivity are so profound, not only because it makes programming fun and satisfying, but also because you can throw everything away and start over from scratch, once you're convinced that's the right thing to do, and you still come out ahead of the perfectionists. Concretely, if I can leave you with just one tip for early productivity, it is that *you should always (always) take the opportunity to switch from a programming language that puts obstacles in your way to one that gets out of it*. The Raspberry Pi userland libraries are all written in C, and for a long time I thought I was stuck with it, unless I wanted to reimplement all that low-level machinery myself. -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ With that value structure in mind, I think we can say it better than Don Knuth: > Early optimization for productivity trumps all other kinds of early optimization. The spoils of early productivity are so profound, not only because it makes programming fun and satisfying, but also because you can throw everything away and start over from scratch, once you're convinced that's the right thing to do, and you still come out ahead of the perfectionists. Concretely, if I can leave you with any single tip for early productivity, it is that *you should always (always) take the opportunity to switch from a programming language that puts obstacles in your way to one that gets out of it*. -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,13 +10,15 @@ The spoils of early productivity are so profound, not only because it makes prog Concretely, if I can leave you with any single tip for early productivity, it is that *you should always (always) take the opportunity to switch from a programming language that puts obstacles in your way to one that gets out of it*. The Raspberry Pi userland libraries are all written in C, and for a long time I thought I was stuck with it, unless I wanted to reimplement all that low-level machinery myself. I got my first wind of developer efficiency when I switched from writing my OpenGL shader programs as string literals that had to be compiled along with the rest of the project, to loading them at runtime from text files, even though I had to write [a 37-line C function](https://gist.github.com/benjamn/b269f2b4b0f0498e1b8f) for reading files from relative paths. It was a huge breath of fresh air when I realized I could be writing C++ instead of C, encapsulating resources as objects and moving my teardown logic into destructors, so that I no longer had to play the `goto error` game. Unfortunately, the switch to C++ ruined my 37-line function for reading files, because the `__FILE__` constant in C++ is not an absolute path. A small price to pay: back to string literals! Then I found out just how easy it was to embed V8 and start using that C++ code directly from JavaScript, thanks to `node-gyp`, and that was when I first felt the twinge of a productivity that dwarfs all past accomplishments. In conclusion, it was Benjamin Franklin who said > Those who would give up essential Productivity, to purchase a little bit of Perfection—those folks got way too much time on their hands. -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ We've all been told that "premature optimization is the root of all evil," but i Premature optimization is a bad idea for the same reason anything else is a bad idea: it is at odds with—it works actively against—what actually matters. And I'm here to remind you that what actually matters in all but the most academic or maintenance-oriented kinds of programming is **your productivity**. In other words, there is no such thing as premature optimization for productivity. It is never too early to optimize for productivity, because productivity is one of those rare and slippery concepts, like Rationality, that is purely good by definition. With that value structure in mind, I think we can say it better than Don Knuth: > Early optimization for productivity trumps all other kinds of early optimization. -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ We've all been told that "premature optimization is the root of all evil," but isn't that almost a tautology? As soon as we label something "premature" we've already basically decided it is undesirable. Try to think of some other premature things, and then classify them as "good" or "bad." One of those categories will be empty. Premature optimization is a bad idea for the same reason anything else is a bad idea: it is at odds with—it works actively against—what actually matters. And I'm here to remind you that what actually matters in all but the most academic or maintenance-oriented kinds of programming is **your productivity**. In other words, there is no such thing as premature optimization for productivity. It is never too early to optimize for productivity, because productivity is one of those rare and slippery concepts, like Rationality, that is purely good by definition. With this value structure in mind, I think we can say it better than Don Knuth: -
benjamn revised this gist
Jul 17, 2014 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ We've all been told that "premature optimization is the root of all evil," but isn't that almost a tautology? As soon as we label something "premature" we've already basically decided it is undesirable. Try to think of some other premature things, and then classify them as "good" or "bad." One of those categories will be empty. Premature optimization is a bad idea for the same reason anything else is a bad idea: it is at odds with—it works actively against—whatever actually matters. And I'm here to remind you that what actually matters in all but the most academic or maintenance-oriented kinds of programming is **your productivity**. In other words, there is no such thing as premature optimization for productivity. It is never too early to optimize for productivity, because productivity is one of those rare and slippery concepts, like Rationality, that is purely good by definition. With this value structure in mind, I think we can say it better than Don Knuth: @@ -16,6 +16,10 @@ It was a huge breath of fresh air when I realized I could be writing C++ instead Then I found out just how easy it was to embed V8 and start using that C++ code directly from JavaScript, thanks to `node-gyp`, and that was when I first felt the twinge of a productivity that dwarfs all past accomplishments. I think it was Benjamin Franklin who said > Those who would give up essential Productivity, to purchase a little bit of Perfection—those folks got way too much time on their hands. But it was Lil Jon who put it best: > Turn down for what? -
benjamn created this gist
Jul 17, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ We've all been told that "premature optimization is the root of all evil," but isn't that almost a tautology? As soon as we label something "premature" we've already basically decided it is undesirable. Try to think of some other premature things, and then classify them as "good" or "bad." One of those categories will be empty. Premature optimization is a bad idea for the same reason anything else is a bad idea: it is at odds with---it works actively against---whatever actually matters. And I'm here to remind you that what actually matters in all but the most academic or maintenance-oriented kinds of programming is **your productivity**. In other words, there is no such thing as premature optimization for productivity. It is never too early to optimize for productivity, because productivity is one of those rare and slippery concepts, like Rationality, that is purely good by definition. With this value structure in mind, I think we can say it better than Don Knuth: > Early optimization for productivity trumps all other kinds of early optimization. The spoils of early productivity are so profound, not only because it makes programming fun, but also because you can throw everything away and start over from scratch, once you're convinced that's the right thing to do, and you still come out ahead of the perfectionists. Concretely, if I can leave you with any single tip for early productivity, it is that *you should always (always) take the opportunity to switch from a programming language that puts obstacles in your way to one that gets out of it*. The Raspberry Pi userland libraries are all written in C, and for a long time I thought I was stuck with it, unless I wanted to reimplement all that low-level machinery myself. When I switched from writing my OpenGL shader programs as string literals that had to be compiled along with the rest of the project, to loading them at runtime from text files, I thought I was pretty clever. It was a huge breath of fresh air when I realized I could be writing C++ instead of C, encapsulating resources as objects and moving my teardown logic into destructors, so that I no longer had to play the `goto error` game. Unfortunately, the switch to C++ ruined my 37-line function for reading files from relative paths, because the `__FILE__` constant in C++ is not an absolute path. A small price to pay. Then I found out just how easy it was to embed V8 and start using that C++ code directly from JavaScript, thanks to `node-gyp`, and that was when I first felt the twinge of a productivity that dwarfs all past accomplishments. I think it was Benjamin Franklin who said, "Those who would give up essential Productivity, to purchase a little bit of Perfection---those folks got way too much time on their hands." But it was Lil Jon who put it best: "Turn down for what?"