Reputation
692
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
7 14
Newest
 Custodian
Impact
~39k people reached

  • 0 posts edited
  • 0 helpful flags
  • 47 votes cast
Jun
27
awarded  Custodian
Jun
27
reviewed Approve Single-responsibility and custom data types
May
6
comment Should I validate a method call's return value even if I know that the method can't return bad input?
I find that first trusting others to do the right thing helps me get the job done faster. That being said, the kind of applications I write are easy to fix when a problem does occur. Someone working with more safety-critical software might think that I'm being too lenient and prefer a more defensive approach.
May
6
comment Should I validate a method call's return value even if I know that the method can't return bad input?
In my opinion, you should use your best judgement and weight different aspects like how much you trust the author to do the right thing, how likely is the function's interface to change, and how tight your time constraints are. That being said, most of the time, the author of a function has a pretty clear idea of what the function's contract should be, even if he does not document it. Because of this, I say you should first trust authors to do the right thing and only become defensive when you know that the function is not well written.
Apr
29
revised Should I validate a method call's return value even if I know that the method can't return bad input?
added 1 character in body
Apr
29
awarded  Yearling
Apr
29
answered Should I validate a method call's return value even if I know that the method can't return bad input?
Apr
17
comment What exactly makes the Haskell type system so revered (vs say, Java)?
I don't know why all the answers mention Maybe only towards the end. If I had to choose just one thing that more popular languages should borrow from Haskell, this would be it. It's a very simple idea (so not very interesting from a theoretical point of view), but this alone would make our jobs so much easier.
Feb
25
asked Should back-end (services) and front-end be different projects?
Feb
10
awarded  Nice Answer
Jan
18
awarded  Notable Question
Jan
13
comment Disadvantages of scoped-based memory management
There are some things that you said that I find interesting and some things that I don't agree with (at least not entirely). I think we could have a pretty interesting discussion, but the comment section isn't very suitable for this, unfortunately.
Dec
15
comment Is there any algorithm pattern to protect any content in the web to ensure I am the first one who created it?
There was a story about a mathematician that discovered a proof and didn't want to publish it yet but also didn't want someone else to get credit. So instead he published the letters of sentence of the proof sorted alphabetically. I forgot what his name was.
Dec
15
comment Is there any algorithm pattern to protect any content in the web to ensure I am the first one who created it?
@R.. Content on the internet usually has a date associated with it (e.g.: forum posts). If there are multiple people claiming to be the original inventors/ discoverers, then you just check the dates.
Oct
23
comment Explicitly define enum values, even if the default value is the same?
I don't understand what you mean. How does enum class help? In our case, specific values were required because they were sent through the network.
Oct
23
revised Explicitly define enum values, even if the default value is the same?
edited body
Oct
23
revised Explicitly define enum values, even if the default value is the same?
deleted 4 characters in body
Oct
23
comment Explicitly define enum values, even if the default value is the same?
@Rotem They did compromise, however, and the code ended up looking like enum Car { DeLorean = 0, Lada }. I'm not sure that's much better, though.
Oct
23
revised Explicitly define enum values, even if the default value is the same?
added 3 characters in body
Oct
23
comment Explicitly define enum values, even if the default value is the same?
@Rotem I didn't insist too much because there were more important things to be done, but I think my argument didn't have credibility because this was pretty old code that happened to never have caused problems before.