Skip to main content

Questions tagged [construction]

0 votes
2 answers
1k views

my following example seems to go into the direction Inheritance VS Composition. But that's not, what i want to ask. I see the concept Inheritance and Composition on one side and the alternative, which ...
Robin Kreuzer's user avatar
4 votes
2 answers
204 views

I've been reading Robert Martin's Clean Code book where it suggests we should separate a programs startup/construction process from its run time logic. In Java (the language the book uses) this ...
Declan McKenna's user avatar
3 votes
1 answer
102 views

I'm working on a class that should manipulate files. Its interface has a Open(string filename) method, and various other methods to retrieve and manipulate the contents. Is it ok to call the open ...
BgrWorker's user avatar
  • 1,704
1 vote
0 answers
102 views

My objects serialize() method is dependent on a call to its clone() method, because of its options to get rid of unwanted data without changing the original instance: serialize: function(opt_filters) ...
bebbi's user avatar
  • 361
2 votes
2 answers
226 views

If I want to load an object from a file, there are a number of things that can go wrong. Thus, one needs a way of handling errors when doing so. In some languages, like haskell, one can return a Maybe ...
Grieverheart's user avatar
3 votes
1 answer
2k views

I'm trying to simplify our unit tests with hand written DSL's. So far I have DSL's that walk developers through processing a service after setting up all preconditions and the construction of an ...
candied_orange's user avatar
-2 votes
4 answers
4k views

It is an error if you do anything in a constructor before calling the superconstructor. I remember that I had problems because of that. Yet, I do not see how this saves us from errors. It could save ...
Val's user avatar
  • 367
31 votes
3 answers
4k views

I'm currently working on a code base that has many classes that implement a Start method. This seems like two-phase construction to me, which I had always considered a bad practice. I can't tell the ...
Dave Hillier's user avatar
  • 3,938

15 30 50 per page