2,033 reputation
159
bio website
location Netherlands
age
visits member for 3 years, 4 months
seen Jun 9 at 16:21

Mar
11
comment Can commented-out code be valuable documentation?
Indeed, I meant human readability. Small hint here: your most important liability in programming is your code. So, less is truly more here.
Feb
20
comment A simple algorithm for finding duplicate floats
Or use only the bits of the exponent and the base up to a certain precision as the hash value into a table rounded up and a table rounded down. It's not the easiest way though.
Jan
21
comment Is the carriage-return char considered obsolete
@back2dos I must admit 'closer to the network center' was very vague in terms of HMI. I was thinking in terms of the information system boundaries and specifically machine-machine interaction. The information a user provides is also part of a (knowledge) network, which is a key insight to understanding the network relationship I was talking about. By using the word 'center' I implied there is only one center, so 'nexus' would have been a better term.
Jan
17
comment Is the carriage-return char considered obsolete
@back2dos: In large systems, complexity should be avoided in the middle of the network. Mapping, which resides closer to the network center, isn't always a trivial job.
Jan
9
comment Is the carriage-return char considered obsolete
@back2dos: Obviously, all production quality software should be robust (within certain parameters). However, it is more effective to validate software when the state space is minimized. Therefor one should try to minimize the amount of possible input that is allowed.
Dec
8
comment Design backward and forward button operations of a browser
All navigation is unidirectional, so a double-linked list would not be necessary. XOR lists are a nice optimization when you live in the 80's. Two stacks are simple to understand, debug and communicates the idea of a history API the best.
Nov
1
comment Are flag variables an absolute evil?
It's not very OOP, is it? I'd make an interface ala: String myNewPassword = makePassword(randomComposeSupplier(new RandomLowerCaseSupplier(), new RandomUpperCaseSupplier(), new RandomNumberSupplier)); with String makePassword(Supplier<Character> charSupplier); and Supplier<Character> randomComposeSupplier(Supplier<Character>... suppliers); Now you can reuse your suppliers for other tasks, compose them in any way you like and simplify your generatePassword method so it uses minimal state.
Aug
20
comment Why can't there be an “universal” programming language that serves all purposes?
This answer is a horrible analogy. Perhaps if you had written: because the french language allows a different fidelity of expression than the english language, I might have liked the analogy better. But computer languages are not 'things', nor human languages. The correct answer is: we do not know. It'll require more insight in how humans express logic and how they arrive at this point. Furthermore, some languages are 'meta-languages', able to express other DSLs. Should we include these in your question?
Aug
16
comment Are there deprecated practices for multithread and multiprocessor programming that I should no longer use?
+1 Great answer, clearly written and pinpointing the underlying pattern of mutable state. IUBLDSEU should become a meme :)
Aug
9
comment How have languages influenced CPU design?
A professor once told me that the certain CPU's were once designed (in the 70's) around functional programming paradigms. However, I can't find a good reference to an article documenting this.
Jul
25
comment What's the difference between using RDFS/OWL versus XML?
@ZJR Perhaps in saying "for the purpose of developing future products", you assumed the OP was an illiterate and incompetent engineer, unable to even think of systems of a higher degree of complexity. When does metadata become "pragmatic"?
Jul
24
comment What's the difference between using RDFS/OWL versus XML?
Andrew, I agree and would vote up your answer. The currently existing answers below are uninformed and of low quality.
Jul
24
comment What's the difference between using RDFS/OWL versus XML?
Uninformative opinionated answer. Please show references to back-up these claims.
Jul
11
comment Should a server “be lenient” in what it accepts and “discard faulty input silently”?
A strongly disagree. unless it is user-entered input, always be strict on both input and output. What happens when your service needs to be re-implemented? Did you document all the possible date formats? You'll need to implement them all, since you don't want old clients to break. Please, use ISO 8601 for all machine generated date instances and periods: it is well specified and broadly available in libraries. By the way, what does 2011-01-02 really mean? The period of time from 00:00 the 2nd up to 00:00 on the 3rd? In what time-zone?
Jun
18
comment What are studies comparing programmer productivity in determined languages/environments?
These graphs merely illustrate two dimensions (code size and performance). It's easy to find many more relevant dimensions, such as maintainability, readability and availability of libraries, to name a few.
Jun
16
comment Passing class names or objects?
It's not necessarily bad design. However, it seems your switch statement should not return a class but an instance dealing with that class. But it is difficult to make assumptions without knowing the kind of behavior in your static methods. What do they do? What state do they modify?
Jun
14
comment Passing class names or objects?
By the way, if it doesn't, please say so. I can't become a good teacher without feedback :)
Jun
14
comment Passing class names or objects?
If you only have static methods, you are most likely abstracting at the wrong level. A static method is essentially a 'normal' method of the meta-class (the class of the class). But since you probably don't have a language in which you can express behavior of meta-classes, you should model the meta-class as a normal class instead and have it produce instances, just like you'd do with a factory pattern (you'd return factories with behavior that allows you to instantiate objects implementing an interface). Hope this makes sense to you.
May
11
comment Dynamic typing across the whole technology stack - where to enforce data validity?
@tdammers I've seen some pretty large government data exchange projects here in the Netherlands where SOAP is extensively used, applying XML schema's totaling 10's of MB large. Yes, it is complicated, but it would be near impossible to prove any correctness in sth such as JSON. Writing validation for these structures would be near impossible without reinventing the wheel and creating a data validation language. I'm not stating XML schema or XML is readable, it is not. You should use graphical editors to help you interpret.
May
10
comment Dynamic typing across the whole technology stack - where to enforce data validity?
@tdammers I mentioned: "because of the reasons given". There are many facets of XML that make it complex: just have a look at the W3 XML specs. But namespaces (uniqueness) and typing (XML Schema), correctly applied, prevents clashing and allows you to prove correctness of certain algorithms, in turn making the interchange of messages by means of XML simpler (but not easier). Constraining state is not merely a technical issue for compilers, but also allows you to reduce complexity, prune states and prove correctness.