You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
I'm going ahead and accepting this one because of the "write first optimize later" principle you mentioned, and the Knuth quote. Sometimes I forgetWiener Boat– Wiener Boat2014-10-29 22:16:46 +00:00Commented Oct 29, 2014 at 22:16
-
4I am surprised you brought out this old chestnut. You didn't even write the whole quote (it does matter), nor did you factor in sensible design decisions that should be made at the very beginning, like choosing the correct data structures having the appropriate performance characteristics for your particular programming task. That's not premature optimization; it's just sensible design. Writing slow code because you don't know simple performance optimizations that may actually enhance readability is not avoiding premature optimization; it's just a lack of education.Robert Harvey– Robert Harvey2014-10-30 15:40:43 +00:00Commented Oct 30, 2014 at 15:40
-
The question is about priorities, not the entire design process. (Although a specific question about "which is clearer, an object-method or multiple scalar-methods" would be interesting, as either Java or OOP specific.)DougM– DougM2014-10-30 15:46:29 +00:00Commented Oct 30, 2014 at 15:46
-
2Then don't call it design. Call it "I pick the right data structures because I know what I'm doing." Call it "I write reasonably fast code from the beginning, because I know what I'm doing." Knuth's quote was always directed at the folks who don't understand what the 3 percent is (the part of the quote that you omitted), not the folks who are building adequate performance into their programs from the beginning, without using overly obtuse techniques.Robert Harvey– Robert Harvey2014-10-30 15:49:27 +00:00Commented Oct 30, 2014 at 15:49
-
2c2.com/cgi/wiki?PrematureOptimizationRobert Harvey– Robert Harvey2014-10-30 16:19:28 +00:00Commented Oct 30, 2014 at 16:19
|
Show 2 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-java