24,678 reputation
350109
bio website
location
age
visits member for 3 years, 8 months
seen yesterday

Status: angry.


Nov
26
comment What should be allowed inside getters and setters?
Obligatory link: javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html
Nov
22
revised Compute if a function is pure
added 1334 characters in body
Nov
22
comment Compute if a function is pure
Many cases are trivially decidable - those pure functions described by Jon Purdy or unpure functions which unconditionally do something dirty; but in general, one can construct cases which are undecidable.
Nov
22
revised Compute if a function is pure
added 43 characters in body
Nov
22
answered Compute if a function is pure
Nov
22
comment When does “proper” programming no longer matter?
You would probably need CERN's equipment to measure the difference, but introducing the itemsLength temporary variable might even make the program slower. Maybe the access to items.length is just as fast as accessing a variable, so the assignment to the temporary variable costs a few nanoseconds? Don't overoptimize just because of some unverified assumptions.
Nov
20
comment Duplication of code (backend and javascript - knockout)
To avoid creating too many ajax requests, start a timeout with something like 300ms; if another keystroke happens till then, clear and restart the timeout again. Once the timeout happens, launch the AJAX request. Obviously, it depends on the number of concurrent users how many AJAX requests are too many.
Nov
20
comment What does it mean that “language A is written in language B”?
Strictly speaking, "PHP has been written in C" is wrong. A language is per se a formal definition, therefore it isn't written in another programmer language (but rather in English); only the compiler, interpreter and/or library can be written in C, C++ or whatever. In practice, for many languages there is one dominant compiler or interpreter, and the distinction between language definition and implementation isn't made.
Nov
20
answered Duplication of code (backend and javascript - knockout)
Nov
20
comment How to discriminate from two nodes with identical frequencies in a Huffman's tree?
The exception would be a preconstructed tree, based e.g. on the frequency of letters in the English language, which is shared a priori by both sides. Other than that, you have to include something that allows reconstructing the key along with the compressed data. Including the frequency is one relatively simple possibility, as long as there is an agreement how to build the tree from that (regarding those cases you asked about).
Nov
19
answered How to discriminate from two nodes with identical frequencies in a Huffman's tree?
Nov
17
reviewed Approve suggested edit on Is adding in the header the license type enough to say: “my code is licensed”?
Nov
17
awarded  Enlightened
Nov
17
awarded  Nice Answer
Nov
15
comment Am I sending large amounts of data sensibly?
shamis: Sure? Sounds like vodoo to me.
Nov
14
comment Am I sending large amounts of data sensibly?
Effectively, the file gets moved anyway, just chunk by chunk instead of all at once.
Nov
14
comment Is there an antipattern to describe this method of coding?
I don't know an official name for it, but this deserves to be a recognized antipattern, since I know programmers who do the same... create layer after layer of pointless wrappers. Maybe "wrapper onion" would be a good fit?
Nov
14
comment Automatic generate code: “derived work”?
@DavidSchwartz In my understanding, the copyright of the derived work stays solely with the author of the original work when there is no new creative input. The second sentence of circular 14 says: a derivative work is copyrightable if it includes what copyright law calls an “original work of authorship.” This implies that there are derived works which are not copyrightable, because they contain no original work of authorship.
Nov
14
comment Automatic generate code: “derived work”?
I think you are right when the transformation is purely technical, like creating a zip file. This is, as Pregring-lg said, a reproduction. But in the case of Doxygen comments becoming a readable documentation, there is also another work, i.e. the templates and style sheets that are used to create the HTML representation of the comments, involved; thus I think the finished HTML document is a derived work.
Nov
14
comment Automatic generate code: “derived work”?
(above taken from wikipedia) - Well, I think this definition also applies to the work of an automated process ("transformed"). I see no restriction that the derived work must introduce new creative input.