41,402 reputation
13101189
bio website
location London, United Kingdom
age
visits member for 3 years, 11 months
seen 16 hours ago

1d
comment Is it poor practice to call methods through multiple objects?
@supercat: I like that. I'm going to ponder it, and then probably steal it. :)
1d
comment Is it poor practice to call methods through multiple objects?
@supercat: Lists and arrays are definitely one of those examples where common sense has to kick in. Although a List<Car> is an object in and of itself, I'd argue that every element in that list is really one of "O's direct component objects". Take your point one step further and we'll talk about each character in a string being owned by the string, not by the object that owns the string. Or maybe ban bitwise operators for working on bits owned by an int. Strict adherance to LoD could definitely get that silly, but that doesn't nullify the guideline.
1d
comment Is it poor practice to call methods through multiple objects?
@supercat: If I'm understanding what you mean, that's exactly what LoD advises you not to do. Each object should have only one owner, which should pass it to child objects as method parameters or expose methods that allow parent objects to access the "grandchild" indirectly. Again, I'm not arguing for the LoD as a hard-and-fast rule here, I'm explaining why there's no mention of multiple ownership in an article about the Law of Demeter -- because the two things are orthogonal.
1d
awarded  Good Answer
Dec
17
awarded  Nice Question
Dec
16
comment Shortest Common Superstring: find shortest string that contains all given string fragments
@majidgeek: Thanks for letting me know.
Dec
16
revised Shortest Common Superstring: find shortest string that contains all given string fragments
added 38 characters in body
Dec
8
awarded  Enlightened
Dec
8
awarded  Nice Answer
Dec
5
comment Is “White-Board-Coding” inappropriate during interviews?
@KyleStrand: It was weird. He totally managed to model the problem I gave him in the interview, but he couldn't apply the same thinking to the business. But, also, he had a more general problem with laziness, so perhaps it was more that he wouldn't than couldn't. And perhaps that's the lesson to be learned, with 5 years of hindsight: technical tests are all well and good, but can't identify a fundamental character flaw.
Dec
3
comment Creating a sort of 'in-language compiler'
Might want to have a look at this book: manning.com/rahien
Dec
3
awarded  Nice Answer
Dec
2
comment Scrum: Is it ok for the design/UX of user story to occur in the same sprint as implementation
@Allan: What your scrum master is failing to understand is that, if the designer has to complete their work before a developer can begin their work, that IS up-front design. Making it happen within the sprint removes none of the cost of up-front design but it does make it less-visible AND makes it harder to estimate your development. If you can find a way to iterate with your designer, that's great, make it part of the sprint and make the effort appropriate to a collaborative task. But up-front is OK, as long as it's honest and, preferably, done before the sprint.
Dec
1
comment Scrum: Is it ok for the design/UX of user story to occur in the same sprint as implementation
Worth mentioning that your question in the subject line is very different from the questions at the bottom of your text. Would be helpful if you edited that to choose one or the other.
Dec
1
revised Scrum: Is it ok for the design/UX of user story to occur in the same sprint as implementation
added 462 characters in body
Dec
1
answered Scrum: Is it ok for the design/UX of user story to occur in the same sprint as implementation
Nov
18
comment Understanding the static keyword
@Allan: Arguably, if you're calling a public method on a class that doesn't affect the state of an instance of that class, it SHOULD be static, to make that clear to the client developer. If that method does so much that it needs mocking, that's a different problem that can be solved a number of different ways.
Oct
30
revised Should I store images in my database or file system in this application?
added 12 characters in body
Oct
30
comment Should I store images in my database or file system in this application?
@EsbenSkovPedersen: "Moving to a CDN" is the "that" in the sentence you quote ... maybe I should edit that line.
Oct
29
revised Should I store images in my database or file system in this application?
deleted 23 characters in body