739 reputation
610
bio website
location
age
visits member for 3 years, 3 months
seen Apr 17 at 6:55

Sep
30
comment What does SVN do better than Git?
Using git branching and merging are no complex operations. I even use branches in a one-man project, even when there are no requirements for multiple version. Keeping work you can't continue at the moment in a branch, branching when you find out that trying another solution may be much better... However, I agree that git is a bit harder to learn.
Sep
30
comment What does SVN do better than Git?
@jokoon: Efficient in terms of what? Surely not speed since even fast Ethernet is slow compared to local operations.
Sep
20
comment Can we replace XML with JSON entirely?
@StuperUser: XSLT is an language (subset of XML) for which some interpreters were written in at least one another language (probably in C, Java, ...). The same could be done for JSON (define some JSON-T, write the intepreter), couldn't it?
Sep
20
comment Can we replace XML with JSON entirely?
Sure, the only thing lacking in JSON are the attributes, and there are useless for modeling objects (unlike for markup). Sometimes attributes get used as a shortcut for what can be expressed using nested data (e.g., in Hibernate config files), which is handy but actually the existence of choice makes it harder. Config files and modeling objects are two places where JSON is clearly superior.
Sep
20
comment Can we replace XML with JSON entirely?
@StuperUser: How could be it "impossible" with JSON? It's just a transformation, maybe the tools are missing yet. Or is the problem related to the lack of attributes in JSON?
Sep
20
comment Can we replace XML with JSON entirely?
@Paul Tomblin: By using a JSON-schema?
Sep
17
comment Proper OO design for State and Command
@pdr: My bad, I was quite confused as I was writing my question. Your answer was useful, anyway.
Sep
17
comment Proper OO design for State and Command
Currently my classes indeed look like your first example, and I'm starting to like it. Using both the mutable and immutable state allows me to separate responsibilities better. I'll implement a bit more and see.
Sep
16
comment Can we replace XML with JSON entirely?
@Philip Regan: How can be writing an S-Exp any harder then using chevronitis, when it's a trivial 1:1 transformation into a less verbose form?
Sep
15
comment Legal issues with an NDA that I do not want to sign
I'd give them a single chance by pointing what I'm never gonna sign and why. Maybe it was just a lapse of one idiot who should get fired at once. Or it's the company policy... then it's time to say bye bye ASAP.
Sep
15
answered Is there a need for garbage collection in a stack-based language?
Sep
15
comment Legal issues with an NDA that I do not want to sign
"should the document be amended any time in the future and I refuse to sign the amendment that I would be in violation of its terms" - So you're required to sign everything they want. That's quite funny, too.
Sep
15
comment Under what circumstances are flowcharts still a valuable and useful tool?
Rephrasing the question made the censors happy. :D
Sep
13
comment Proper OO design for State and Command
I think you're quite right. There are some advantages of the immutable State (thread-safety, clarity, and trivial rollback), but I'm not sure if it's worth it. Currently I've made some progress using both State and MutableState, and it looks fine. The overhead for having two such classes may be worth it.
Sep
13
comment Proper OO design for State and Command
@pdr: I am actually using neither the State nor the Command Patterns; in fact my State is final (but I'm going to use the Command Pattern for sending commands to the opponent). The classes just represent the state of the game and the user supplied command.
Sep
13
comment When should I use a 2-property class over a pre-built structure like a KeyValuePair?
I think that KeyValuePair<string,string> is fine, assuming the things put in are indeed keys and values. Here, reusing an existing class is a win, since you save writing code and gain interoperability. OTOH, using something as complicated as KeyValuePair<string,KeyValuePair<string,string>> is most of the time simply too complicated to be practical. Sometimes it may be right -- when you need no additional functionality, when the meaning is obvious, and when it works nicely with other classes. YMMV, this is just weighting the pros and contras.
Sep
13
comment Proper OO design for State and Command
@Winston Ewert: You understood me correctly, and maybe immutability was indeed a bad idea here. Or maybe the only problem is that I've created an ugly API and it was just the ugliness which led to this question.
Sep
12
comment Proper OO design for State and Command
@S.Lott: I don't claim it's a good idea. The State never changes, it just gets replaced by another one (created from the MutableState). I'm considering dropping immutability but it wouldn't help much: The problem of Command fiddling with its data remains.
Sep
12
asked Proper OO design for State and Command
Sep
12
comment Does dress code affect your programmers performance
I don't think so. Everybody prefers a different temperature and the dresscode eliminates the only solution for two people sitting in the same room.