1,038 reputation
511
bio website
location
age
visits member for 3 years, 7 months
seen Apr 24 at 13:27

Mar
30
comment As a lone developer, how can I be sure I am learning and doing decent work?
If the systems you're developing are vital or will become vital for the company, then please make sure it's understood that having only one developer responsible for the code is risky. Risks could be even higher if the developer is very talented and productive.
Mar
26
comment Why did programming languages start using = for assignment?
@supercat You said it yourself: "Unless the meaning is made clear in context..." Read what Doval wrote and what Wirth wrote. They've got it right.
Mar
25
comment Why did programming languages start using = for assignment?
@supercat: What "Let yz = x" means depends on the context. It could be just nonsense or it could mean "let y, z ∈ ℝ such that yz = x", x being previously introduced. Doval explained this already: what you seem to think is an introduction of a variable ("let x = 4") is actually a shorthand that omits the introduction. Shorthands are used because introducing every variable rigorously is sometimes too cumbersome. See this question for an example of another (potentially confusing) shorthand notation.
Mar
18
comment Why did programming languages start using = for assignment?
@delnan The point is that the meaning of the symbol = does not change when there's a keyword "let" around. It still denotes an equation. Doval explained that quite perfectly.
Mar
17
comment Why did programming languages start using = for assignment?
@delnan: True, "Let 4 = x" is unnatural and confusing (just like inverted jumps) but it's really equivalent to "Let x = 4". Doval has it right. A proper introduction of a variable requires more than just an equation.
Mar
17
comment Why did programming languages start using = for assignment?
@amon: I disagree about the dual meaning in mathematics. "Let 4 = x" is just as valid as "Let x = 4".
Mar
10
comment Is public final completely (not) ok in constant enum fields?
@TomášZato: Think about it. Is the name of a setting really needed by any other class than the "more sophisticated class" (SettingsManager or such) you're planning to write? How many times you actually need to refer to the name attribute? (No need to answer to me. It's your design. I think I would probably end up with only a couple of references and thus "saving keystrokes" would be totally unnecessary here.)
Mar
9
comment Is public final completely (not) ok in constant enum fields?
Why would encapsulation lead to lots of () in this case? Do you need to refer to names and default values of Settings all over your application?
Mar
6
comment OOP Practice: how to best handle dependent dependencies
Ok. I think you should follow Doval's and Doc Brown's advice and separate the task of rendering TextBlocks and Pages to other classes.
Mar
3
comment OOP Practice: how to best handle dependent dependencies
What's the purpose of these classes? Are they needed to hold and handle contents of documents or to render documents or both?
Dec
19
comment How to define “or” logically
I think this is the "purest" approach in certain mathematical sense. The OR-operator is a function after all, and the truth table is really the essence of that function as a relation and a set. Of course this could be written in an amusing OO manner too: BinaryOperator or = new TruthTableBasedBinaryOperator(new TruthTable(false, true, true, true));
Dec
12
comment Design of a datamodel in a OO way
Neural networks? So you could have objects representing neurons or nodes, connections and networks?
Dec
10
comment Why isn't software abstract on a grander scale?
I think your question is somewhat hard to grasp. You believe that software "should be more abstract". Which software? How abstract that software is now and how abstract it should be? Why exactly it should be more abstract? I think finding a working level of abstraction is always a balancing act, and not only in software design. Now your question seems a little bit too abstract and vague. It should probably be less abstract and more precise. Just like some code I've seen and written too.
Dec
9
revised Is Singleton enough for a EMailUtil or there is any better implementation?
edited body
Dec
9
answered Is Singleton enough for a EMailUtil or there is any better implementation?
Dec
2
comment Collections, relationships and tracking changes (in DDD)
I think the question needs more information about the design. It's hard to see why adding or removing Authors would be error-prone and why the business method needs to detect new or removed Authors. Does your Author have an identity? What is the "additional data related to a book and author"?
Nov
28
revised Why 'String' objects are immutable with an explicit constructor in java?
deleted 9 characters in body
Nov
28
revised Why 'String' objects are immutable with an explicit constructor in java?
deleted 9 characters in body
Nov
28
comment When should I refactor a private class into a package-private class?
Thanks for the edit. I am not a huge fan of Java's inner classes either and I guess excluding them is a well thought design choice in C#. Now that your answer doesn't (accidentally) advocate using them, I give it +1
Nov
28
answered Why 'String' objects are immutable with an explicit constructor in java?