Timeline for How can wrapping an expression as a function be Clean Code?
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Jun 6, 2017 at 1:04 | history | suggested | user428517 | CC BY-SA 3.0 |
minor grammar fix in title
|
Jun 5, 2017 at 23:16 | review | Suggested edits | |||
S Jun 6, 2017 at 1:04 | |||||
S May 16, 2017 at 13:34 | history | suggested | SynozeN Technologies | CC BY-SA 3.0 |
grammar changes and correct spelling
|
May 16, 2017 at 9:58 | review | Suggested edits | |||
S May 16, 2017 at 13:34 | |||||
Apr 26, 2017 at 10:33 | history | tweeted | twitter.com/StackSoftEng/status/857180780237398019 | ||
Apr 25, 2017 at 9:16 | vote | accept | imel96 | ||
Apr 25, 2017 at 9:11 | comment | added | imel96 |
@FrankHileman the actual code will probably detract the point of my question. It came with a SomethingProcess interface with only process() method define. It's only used in the class, and everywhere the class is used he put three lines: 1) comment for what it does 2) new Processor() and 3) calling process() on the object. These three lines were repeated at least three times and he said nothing was wrong with that and we could replace it when we start using DI * facepalm *
|
|
Apr 23, 2017 at 22:52 | comment | added | Frank Hileman | Another great example of cargo cult design. What I don't understand is why he did not create several more classes; one can always add more classes to make it more "clean". | |
Apr 19, 2017 at 20:49 | answer | added | R Sahu | timeline score: 2 | |
Apr 19, 2017 at 20:48 | answer | added | civan | timeline score: 2 | |
Apr 19, 2017 at 20:39 | history | edited | imel96 | CC BY-SA 3.0 |
details what are being asked
|
Apr 19, 2017 at 19:58 | answer | added | Frank Puffer | timeline score: 5 | |
Apr 19, 2017 at 19:44 | answer | added | John Wu | timeline score: 2 | |
Apr 19, 2017 at 18:05 | answer | added | Erik Eidt | timeline score: 4 | |
Apr 19, 2017 at 14:40 | answer | added | JacquesB | timeline score: 13 | |
Apr 19, 2017 at 14:40 | comment | added | Mr Cochese | The code, as given, has completely sacrificed thread safety by adding statefulness where it is not clearly not needed. There are reasons to encapsulate an action as an object, such as the command pattern, but it should be explicit in the design that the object is a one-shot usage - for instance, setting the A and B parameters in the constructor would achieve that. | |
Apr 19, 2017 at 14:15 | review | Close votes | |||
Apr 26, 2017 at 3:03 | |||||
Apr 19, 2017 at 14:09 | answer | added | jwenting | timeline score: 1 | |
Apr 19, 2017 at 13:58 | comment | added | gnat | see also: Style for control flow with validation checks | |
Apr 19, 2017 at 13:58 | comment | added | gnat | Possible duplicate of One-line functions that are called only once | |
Apr 19, 2017 at 13:55 | history | asked | imel96 | CC BY-SA 3.0 |