News for hackers. Stuff that matters.

locci

Re:Nobel scientist Rita Levi-Montalcini dies, aged 103 on Sunday December 30, 2012 @11:20PM (#4988367)
She was involved in a scandal involving a drug called Cronassial, a pharmaceutical industry called Fidia and the Nobel committee. Through various donations, Fidia (at the time a small pharmaceutical company) used the scientist from 1975 onwards to market a new panacea drug called Cronassial (which was banned in the Nineties across Europe as it was linked to Guillain-Barré syndrome and possibly because of the human spongiform encephalopathy scare). The drug was approved thanks to the corrupt hand of Duilio Poggiolini (with the ministry of health) who was finally arrested in 1993. Fidia's "collaboration" with the scientist culminated in 1986 with the Nobel prize, for which Fidia seems to have corrupted at least one of the committee members with 8 million dollars [1], fact that came out during the Italian corruption trials in the first part of the Nineties.

It seems that Fidia's revenue jumped a 1000 folds thanks to Cronassial, apparently from 600 million Lire to 420 billion, with the drug representing 82% of the revenue, but I wasn't able to find a source for that.

It's quite unfortunate Levi-Montalcini never came clean of this scandal, refusing to comment on anything related to Cronassial and claiming ignorance of the facts.

Disappointing as all this might be, NGF is a great discovery which is well worth a Nobel prize and she seems to have been a very good scientist too.

1) Nilsson M. Nobel committee refutes allegations of corruption. Lancet 1995; 346: 763-4.

Re:My IQ on Sunday November 04, 2012 @01:56PM (#4740595)
I have always thought the point of this kind of questions is that as a candidate you are supposed to provide the right answer which you are expected to provide despite all the ambiguities. This, I guess, should measure some kind of broader intelligence which overthinkers might lack.
Re:JavaScript: Function Invocation Patterns on Friday October 19, 2012 @08:57AM (#4673290)
bind was introduced in ES5 (and previously in most libraries) to fix this

https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...

Re:Custom bots for Unreal Tournament 2004 pass Turing test on Friday September 28, 2012 @01:55PM (#4586882)
They don't even dodge, which is the staple movement in UT games.
Re:Civ II game a decade old on Tuesday June 12, 2012 @02:51PM (#4102084)
Soren Johnson talks about AI cheating in "Playing to lose: AI and Civilization" http://www.youtube.com/watch?v=IJcuQQ1eWWI&feature=playe...
Re:A primer on Python decorators on Thursday April 12, 2012 @06:42AM (#3831797)
I'm no pythonist, but I think setdefault would be perfect for the case

http://docs.python.org/library/stdtypes.html#dict.setdefault

it seems there are many tricks you can use: check out the first reply here () (explaining the batman equation)

() http://math.stackexchange.com/questions/54506/is-this-batman...

Re:Best Resume Ever: How to Woo a Startup on Thursday February 09, 2012 @05:27PM (#3573414)
Re:Javascript Best Practices on Monday January 23, 2012 @07:57PM (#3502924)
I tend to use document.forms['foo'].elements['bar'], here's why:

I use the elements collection because the behaviour of adding each input as a property to the parent form element is a mistake.

I use the bracket notation because it highlights the difference between the implementation symbols and the actual data which is being manipulated. What I mean is that I see a property specified with the dot notation on the same level as an identifier and as such its name is just to remind us humans of its purpose, whereas a property accessed using bracket notation is important both to us and to the program since it specifies a data point.

Re:The Problem with Implicit Scoping in CoffeeScript on Thursday December 29, 2011 @09:00PM (#3406261)
Oh, I see. And you fiddle with globals by manipulating the window/exports object, which I assume are reserved identifiers.

Thanks a lot for clarifying that, it doesn't look that bad this way.

Re:The Problem with Implicit Scoping in CoffeeScript on Thursday December 22, 2011 @05:33AM (#3381103)
Yes, I probably wasn't very clear: what I meant is that a programmer writing a function somewhere in a program must have a complete knowledge of the scope where the function is and will be in the future, including changes in global variables exposed by the interpreter/browser. In the end I would find me forced to add a prefix to all the variables in order to avoid collisions, just like I would be forced to do, if the language only had a single global scope.

This behaviour seems quite unreasonable to me, but I haven't been able to find explanations about it, other than it's expected behaviour.

Re:The Problem with Implicit Scoping in CoffeeScript on Wednesday December 21, 2011 @10:22PM (#3380212)
I think this is a recurring discussion from the dawn of coffeescript. See for example: https://github.com/jashkenas/coffee-script/issues/238

I really don't understand why this isn't being fixed: doesn't global by default break encapsulation? I'm probably missing something, but this is the main reason I haven't tried coffeescript yet.

After reading "A Mathematical Model for the Determination of Total Area Under Glucose Tolerance and Other Metabolic Curves"[1] I am unable to see any malice in this sort of things.

[1]http://care.diabetesjournals.org/content/17/2/152

Google is a search engine, not a content provider: the less time I spend on it, the better it works.

On a personal note, I very much dislike the walls facebook builds around its experience: it annoys me almost as much as content farm popunders.

Re:How I Got My Stolen Laptop Back Within 24 Hours Using Prey on Wednesday September 07, 2011 @04:32PM (#2971294)
He left all that in a parked car?

The faith people on the other side of the Atlantic put in strangers astonishes me every time. Leaving the keys to your car inside the car, leaving the front door open go against the most basic sense of responsability I've been taught, to the point that I feel uneasy the whole travel when I have to leave the car unlocked while on a ferry boat.

L'occasione fa l'uomo ladro - Opportunity makes a thief

Re:Wolfenstein 1D on Wednesday August 17, 2011 @08:13AM (#2894990)
Ken Kutaragi, ex CEO of SCEI, around 2006 declared the new Playstation 3 would be 4D.
Re:The pros and cons of developing a complete Javascript UI on Wednesday August 10, 2011 @09:36AM (#2868093)
This is one of the reasons javascript should be used both on the server and the client.

The server would offload as many procedures to the client as possible (that is none if js is disabled, some if you don't want to expose your guts).

The server html renderers would be the exact same code in the client, the api would be a simple thin wrapper around your "protected" procedures.

You could event support ecmascript5 features on IE6, executing the js in the server.

Re:IQ scores in relation to web browser choice on Thursday July 28, 2011 @08:05PM (#2819565)
Popular browsers are "dragged down to 100" by the mass of people who install the browser because of techie friends, or fashion.

In the second graph you can notice there are many more high IQs individuals using firefox and chrome rather than opera.

actually, the script doesn't make any sense because it would be executed as soon as the browser is idling, that is after it has rendered the dom completely, that is when the DOMContentLoaded event fires. The right way to run a script right after an element has been created is to place the script right after the element closing tag.

You still can use it for setting late binding event handlers though.

I think he meant faster as in executed before, rather than in executed faster.
The same argument could be made about structured programming: "Why should I restrict my programs to have one entry point, one exit point and a single flow?"

The answer is "Because it helps you to manage complexity in the long run".

To continue the "just add a simple global" analogy: after a while you add another, then you peek from a completely different function inside the global variable, modify it if the day is odd and soon you have made a mess of your program. In this case globals are simply a patch to an outdated design.

"It [all the restrictions] says a lot about what functional programming isn’t (it has no assignment, no side effects, no flow of control) but not much about what it is. The functional programmer sounds rather like a mediæval monk, denying himself the pleasures of life in the hope that it will make him virtuous. To those more interested in material benefits, these “advantages” are totally unconvincing."[1]

But the new kinds of glue functional programming brings about are usually worth the squeeze (for some kind of programs in some kind of situations, maybe).

[1] http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf

Re:EBay Patents 10-Click Checkout on Friday July 22, 2011 @09:00AM (#2793307)
Yeah, but what if someone comes up with a 9-click checkout?

http://www.imdb.com/title/tt0129387/quotes?qt=qt0410938

Re:I hate computers. But I love what you can do with them. on Tuesday July 19, 2011 @07:26AM (#2780378)
I really hate this damned machine

I wish they would sell it.

It never does quite what I want

But what I tell it.

Re:Bruce Eckel on JavaScript on Monday July 18, 2011 @07:10AM (#2775810)
FWIW, javascript implementations all behave very similarly surprisingly. There are some quirks of course, like JScript not accepting trailing commas, not allowing array like access to strings and leaking out the names of named function expressions, or like some nastiness in IE behaviour with the global object and window.

Especially considering the history of javascript, it's a miracle we're having it this good. Not so much with the DOOM.

I completely agree with you, but I would use "foo === undefined" for locals and "this/window.foo === undefined" for globals. You can also test for "== null", if you don't care for null values.

Of course due to a bug in the old (v3) spec, you could redefine the builtin undefined as well as some other builtins like NaN and Infinity, but you shouldn't really be doing that and the spec at least is now fixed.

In the meanwhile, to fight that, this is a commonly used pattern for browsers: (function(window,undefined) {

// code //

})(this);

This sounds a lot like what gobolinux is doing [1] with its filesystem/package manager. Did you ever incur in more trouble than it was worth with that approach?

Making the filesystem the actual package database rather than a snapshot of what should be installed is quite tempting.

[1]http://gobolinux.org/index.php?page=at_a_glance

Re:Sega says hackers stole data of 1.29 million users on Sunday June 19, 2011 @07:13PM (#2672243)
when there's a problem and you don't know how to fix it, you pass a law
Re:JSON users: Avoid CSRFs by not using top-level arrays on Saturday June 18, 2011 @08:08PM (#2669850)
I just tested with Firefox portable 3.0.0 and it looks like it was already fixed then (June 2008).
Re:JSON users: Avoid CSRFs by not using top-level arrays on Saturday June 18, 2011 @01:41PM (#2669082)
Because [] is not syntactic sugar for new Array. The code the article wrote about doesn't work in any implementation that I know of. I think the ESv3 spec wasn't very clear: "Create a new array as if by the expression new Array()." But the implementations (always?) did the right thing, and the ESv5 spec is more clear: it adds "where Array is the standard built-in constructor with that name."
You reminded me of Stephen Colbert's on AT&T http://www.youtube.com/watch?v=rsCp-1hgfxI

Older »