5,627 reputation
1224
bio website ymarcov.blogspot.com
location Israel
age 24
visits member for 3 years, 5 months
seen Oct 27 at 18:26

I am a 21-years-old software developer from Israel. My hobbies include reading, writing, talking, boxing, playing guitar, singing and intense exposure to adult content.


Nov
15
awarded  Pundit
Oct
5
comment Alternate string formatting options in C++?
The library looks comprehensive and robust. +1
Sep
30
awarded  Explainer
Sep
27
comment When should you create/destroy underlying object in a class that wraps it
Indeed - but in a language without destructors, that's part of the contract when handling unmanaged resources, such as files. Otherwise, you might never close them as long as your process is alive, and most likely never in the time you want to.
Sep
26
comment When should you create/destroy underlying object in a class that wraps it
And, as a general direction, that the constructor approach is only useful so long as you have access to the concrete class. As soon as you start getting into interfaces (or dependency injection), that sort of interface can pose some problems.
Sep
26
comment When should you create/destroy underlying object in a class that wraps it
I'd add gently, for the sake of completeness, that you still want a close() method even when you open it in the constructor.
Jun
26
awarded  Yearling
Apr
29
reviewed Approve gitlab tag wiki excerpt
Apr
29
reviewed Approve gitlab tag wiki
Mar
21
awarded  Guru
Mar
21
awarded  Custodian
Mar
21
reviewed Approve What is the difference between collation and character set?
Dec
10
answered Does Abstract Factory Pattern scale?
Nov
4
revised How you return to a code when you don't remember what you were doing?
deleted 2 characters in body
Oct
31
answered Should mock objects for tests be created at a high or low level
Oct
30
answered How you return to a code when you don't remember what you were doing?
Oct
30
comment Why is it not standard to implement abstraction layers for the file system?
+1 I believe what you were trying to say is "Presume the FS works and shouldn't be tested. Then, if you have a class that ReadsSomething(), implement it in terms of the interface GetSomething(), which this specific implementation of it just so happens to actually read from a file, which, as we said, is presumably working behavior."
Oct
30
answered What is the best way to handle dynamic content?
Oct
30
comment Best way to rename existing unique field names in database?
OP, Note that your proposed solution would require locking the file between checking and adding. Otherwise there'd be a race condition when 2 files with the same name are uploaded simultaneously.
Sep
6
awarded  Good Answer