Reputation
850
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
8 18
Newest
 Yearling
Impact
~13k people reached

Apr
14
comment How to return warnings alongside result of calculation to caller of a Java method?
If you are feeling lazy you can do #1 using org.apache.commons.lang3.tuple.ImmutablePair from the Apache Commons-Lang project.
Jan
29
comment What's the point of running unit tests on a CI server?
A common case is if they have two change lists and they think the changes are independent but one change set depends on a change from the one. Then the tests pass locally but fail when committed.
Nov
10
awarded  Yearling
Nov
5
awarded  Good Question
Nov
3
awarded  Notable Question
Nov
1
comment Which pattern best describes decoupling file building from output file format?
@ChristianCarter there is no further interaction with the object besides writing it to disk. The fact that if the final step of the pattern was to pass in a file name and it wrote to the disk itself, the overall program would be mostly unchanged means that it really doesn't fit the description of "builder pattern is a replacement for a constructor" theme. I've now come to think of it as a fringe case of builder, but I disagree that it's "pretty clear". You'd never overloading the constructor for a string to build the output which would lead to the "telescoping constructor" anti-pattern.
Oct
30
revised How are comments usually parsed?
fixed grammar where author accidentally a word
Oct
30
suggested approved edit on How are comments usually parsed?
Oct
30
awarded  Nice Question
Oct
30
awarded  Popular Question
Oct
29
comment How are comments usually parsed?
@JanDvorak From the C89 draft in 2.1.1.2 item #3 "Each comment is replaced by one space character." But this is C-specific and this question is for the most common convention across languages and format.
Oct
29
comment How are comments usually parsed?
@JanDvorak a space will effect appearance and removes the understanding and is closer to the semantics of "a comment isn't really there". The primary rendering output will be HTML so in my case ASCII is not as issue as browsers support Unicode. That said, I believe the C standard mandates that comments are replaced with a single space.
Oct
29
comment How are comments usually parsed?
@JacquesB so I'm thinking of treating comments as being replaced in their entirety from the source as a zero-width space, that seems to be equivalent to what you are suggesting.
Oct
29
comment How are comments usually parsed?
@8bittree makes sense, should have thought of that. I'll leave the question as is since it will be more useful this way.
Oct
29
revised How are comments usually parsed?
added 55 characters in body
Oct
29
comment How are comments usually parsed?
Hmm, the newline is the real issue since we are using HTML\XML syntax for comments so it will be multi-line.
Oct
29
comment How are comments usually parsed?
Never thought about strings, that's a good edge case. My current thought was doing simple regex between comment start and end and replacing it with a single space. That would have tripped up your case.
Oct
29
revised How are comments usually parsed?
added 36 characters in body
Oct
29
comment How are comments usually parsed?
@Snowman there is that perspective, but on the other hand if token 'x' has special meaning if its the first token on the line and it appears to be the first token on the line to both the person looking at the source and to the parser reading line-by-line. Seems like a dilemma so I asked the question.
Oct
29
asked How are comments usually parsed?