Search Results

Search found 3 results on 1 pages for 'mojuba'.

Page 1/1 | 1 

  • Copyright notices/disclaimers in source files

    - by mojuba
    It's a common practice to place copyright notices, various legal disclaimers and sometimes even full license agreements in each source file of an open-source project. Is this really necessary for a (1) open-source project and (2) closed-source project? What are you trying to achieve or prevent by putting these notices in source files? I understand it's a legal question and I doubt we can get a fully competent answer here at programmers.SO (it's for programmers, isn't it?) What would also be interesting to hear is, when you put legal stuff in your source files, is it because "everyone does it" or you got legal advice? What was the reasoning?

    Read the article

  • How is your working time distributed between coding and thinking?

    - by mojuba
    ...in percentage. For example 60/40 or 90/10 or 100/0. My hypothesis is that the bigger the proportion of time you spend thinking the smaller your code can be as a result (and the less time will be needed to write it down). Think more, write less, in other words. Do you think it is true? As a side note, I think in typical software companies thinking is not part of the culture anyway: you are usually supposed to be sitting there at your computer typing something. You will almost definitely be noticed by your managers if you wander about with a blank look thinking over your next steps with your code. Too bad.

    Read the article

  • JavaScript eval() with `this`

    - by mojuba
    If I define a JavaScript code snippet in my HTML, like so: <div id=myElem onMyUpdate="alert('Update called for ' + this.id)">... then what is the most elegant way of evaluating it from within JavaScript with this properly assigned? What I came up with so far is something like this: if (elem.hasAttribute('onMyUpdate')) (function () { eval(elem.getAttribute('onMyUpdate')) }).call(elem); which looks terrible (to me), but works. Any better/more elegant alternatives? MDN says there used to be the second argument to eval() for doing just that but it's deprecated now; MDN then suggests to use operator with() instead, which, if you follow the link provided, turns out to be made deprecated by the latest standard. Dead end, in other words. (As a side note, StackOverflow ignores the word this in search terms and thus it may miss relevant answers - is there a way of telling it not to?) Edit: I forgot to mention: no jQuery please, just vanilla JavaScript

    Read the article

1