background preloader

Learn to code

Learn to code

JavaScript: la référence - David Flanagan What Happens At Y Combinator What Happens At Y Combinator Paul Graham updated Oct 2013 Y Combinator runs two three-month funding cycles a year, one from January through March and one from June through August. Dinners During each cycle we host a dinner once a week at Y Combinator and invite some eminent person from the startup world to speak. People start to show up for dinners around 6 pm. The time before dinner is a chance for founders to talk to one another and to us in an unstructured way. The speaker usually shows up before 7 and talks informally with the founders before dinner. I didn't consciously realize how much speakers at more public events censored themselves till I was able to compare the same people speaking off the record at YC dinners and on the record at Startup School. One founder wrote: Most of the practical advice is redundant, but there's value in it even as such—if you hear the same things over and over again from different angles, especially from prominent people, it tends to sink in more. Alumni

Getting Out of Binding Situations in JavaScript Most developers don’t know about—or don’t care enough about—binding in JavaScript. Yet this single issue is responsible for a sizeable portion of the questions on most JavaScript-related support channels, and thousands—if not millions—of hairs being tortured away from developer heads every single day. Yet with a little attention to this oft-overlooked subject, you can avoid wasting your time, energy, and patience and move on to more powerful, efficient scripting. Why should we care about binding?#section1 Almost no major object-oriented programming (OOP) languages force you to consider binding. PHP and JavaScript do require you to explicitly state which object you’re accessing, even if it’s the current one. Of course, neither PHP nor JavaScript are actually object-oriented in the traditional sense. In JavaScript, binding is always explicit, and can easily be lost, so a method using this will not refer to the proper object in all situations, unless you force it to. Okay, that’s weird.

Named function expressions demystified Introduction Surprisingly, a topic of named function expressions doesn’t seem to be covered well enough on the web. This is probably why there are so many misconceptions floating around. In a nutshell, named function expressions are useful for one thing only — descriptive function names in debuggers and profilers. I’ll start with a general explanation of what function expressions are how modern debuggers handle them. Function expressions vs. One of the two most common ways to create a function object in ECMAScript is by means of either Function Expression or Function Declaration. We can see that when identifier is omitted, that “something” can only be an expression. A somewhat less obvious example of function expression is the one where function is wrapped with parenthesis — (function foo(){}). To demonstrate with examples: You might also recall that when evaluating JSON with eval, the string is usually wrapped with parenthesis — eval('(' + json + ')'). Function statements JScript bugs

Related: